Skip to content

Commit

Permalink
Fixed up the tag widget, added a total node count to search
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhjk committed Jan 31, 2008
1 parent 7ff57bc commit b875689
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/views/search/_bulk_tag.rhtml
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
<div id="bulk_tag"> <div id="bulk_tag">
<% if nodes.length > 0 -%> <% if nodes.length > 0 -%>
<h1><%= heading %></h1> <h1><%= heading %></h1>
<p id="bulk_tags_notice" style="color: green"><%= flash[:bulk_tags_notice] %></p> <p id="bulk_tags_notice" style="color: green"><%= flash[:bulk_tags_notice] %></p>
<% form_tag(url_for(:controller => "dashboard", :action => "bulk_tag"), <% form_tag(url_for(:controller => "dashboard", :action => "bulk_tag"),
:id => "bulk_tag_list", :class => "remote_form_rjs", :update => "bulk_tag") do -%> :id => "bulk_tag_list", :class => "remote_form_rjs", :update => "bulk_tag") do -%>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/_listing.rhtml
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="node_listing" class="fieldset"> <div id="node_listing" class="fieldset">
<h2>Nodes</h2> <h2>Nodes (<%= nodes.length %> <%= nodes.length == 1 ? "node" : "nodes" %>)</h2>
<%= link_to "Select All Nodes", "javascript: void(0);", { :class => "select_all", :to_select => "tag_node" } %> <%= link_to "Select All Nodes", "javascript: void(0);", { :class => "select_all", :to_select => "tag_node" } %>
<%= link_to "Unselect All Nodes", "javascript: void(0);", { :class => "unselect_all", :to_select => "tag_node" } %> <%= link_to "Unselect All Nodes", "javascript: void(0);", { :class => "unselect_all", :to_select => "tag_node" } %>
<%= render :partial => "nodes/listing", :locals => { :checkbox => true, :nodes => nodes, :table_id => "search_list" }%> <%= render :partial => "nodes/listing", :locals => { :checkbox => true, :nodes => nodes, :table_id => "search_list" }%>
Expand Down
18 changes: 17 additions & 1 deletion public/javascripts/iclassify.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ $(function() {
} }
); );


$("input#tag_list").livequery("change", $("input#tag_list").livequery("keyup",
function() { function() {
current_tags = $(this).val(); current_tags = $(this).val();
$(".tag_cloud_entry").each( $(".tag_cloud_entry").each(
Expand All @@ -173,6 +173,22 @@ $(function() {


} }
); );

/*
$("input#tag_list").livequery(
function () {
var mytags = [];
$(".tag_cloud_entry").each(
function() {
mytags.push($(this).attr("tag"));
}
);
$(this).tagSuggest({
tags: mytags
});
}
);
*/
/* /*
function add_present_tag(link, tag, tag_cloud_id) { function add_present_tag(link, tag, tag_cloud_id) {
link.addClassName("tag_present") link.addClassName("tag_present")
Expand Down
12 changes: 12 additions & 0 deletions public/stylesheets/iclassify.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -364,4 +364,16 @@ h2.inline {


form.inline { form.inline {
display: inline; display: inline;
}

SPAN.tagMatches {
margin-left: 10px;
}

SPAN.tagMatches SPAN {
padding: 2px;
margin-right: 4px;
background-color: #0000AB;
color: #fff;
cursor: pointer;
} }

0 comments on commit b875689

Please sign in to comment.