From 9f9061d908bd7d8a42b741a1e0b57588aebe938d Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Wed, 2 Jan 2013 23:01:38 -0500 Subject: [PATCH] made a few more detaily fixes --- app/assets/javascripts/Jit/graphsettings.js | 10 +++++++--- app/assets/stylesheets/topics.css.scss | 4 ++++ app/views/topics/_topic.html.erb | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/Jit/graphsettings.js b/app/assets/javascripts/Jit/graphsettings.js index 49b34535..a332b058 100644 --- a/app/assets/javascripts/Jit/graphsettings.js +++ b/app/assets/javascripts/Jit/graphsettings.js @@ -548,8 +548,7 @@ function onCreateLabelHandler(domElement, node) { data-url="/topics/$_id_$" \ data-object="topic" \ data-attribute="name" \ - data-type="input"> \ - $_name_$ \ + data-type="input">$_name_$ \ \ $_desc_$ \ \ @@ -609,11 +609,15 @@ function onCreateLabelHandler(domElement, node) { html = html.replace(/\$_name_\$/g, node.name); html = html.replace(/\$_userid_\$/g, node.getData("userid")); html = html.replace(/\$_username_\$/g, node.getData("username")); + + var desc_nil = "Click to add description."; + html = html.replace(/\$_desc_nil_\$/g, desc_nil); if (node.getData("desc") == "") { - html = html.replace(/\$_desc_\$/g, 'Click to add description.'); + html = html.replace(/\$_desc_\$/g, desc_nil); } else { html = html.replace(/\$_desc_\$/g, node.getData("desc")); } + html = html.replace(/\$_link_\$/g, node.getData("link")); html = html.replace(/\$_metacode_choices_\$/g, metacode_choices); diff --git a/app/assets/stylesheets/topics.css.scss b/app/assets/stylesheets/topics.css.scss index b672a538..f1fd4ea9 100644 --- a/app/assets/stylesheets/topics.css.scss +++ b/app/assets/stylesheets/topics.css.scss @@ -43,3 +43,7 @@ line-height: 24px;} height: 1em; float: right; } + +.gray { + color: #999999; +} diff --git a/app/views/topics/_topic.html.erb b/app/views/topics/_topic.html.erb index 346d8aeb..1faf3d5d 100644 --- a/app/views/topics/_topic.html.erb +++ b/app/views/topics/_topic.html.erb @@ -7,4 +7,5 @@

<%=topic.desc %>

<%= link_to topic.link, topic.link, :class => 'link', :target => '_blank' %> -<% end %> \ No newline at end of file + <%= best_in_place topic, :name, :nil => 'lol' %> +<% end %>