Skip to content

Commit

Permalink
Fix security_image paths
Browse files Browse the repository at this point in the history
  • Loading branch information
atd committed Dec 30, 2010
1 parent 820979e commit a13d89d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
5 changes: 4 additions & 1 deletion app/views/activities/_new.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<% if receiver.sent_ties_allowing(current_user, 'create', 'activity').any? %>
<% content_for :javascript do %>
securityImage = "<%= escape_javascript(image_tag('btn/btn_security.png', :id => 'security_image', :alt => 'security')) %>";
downImage = "<%= escape_javascript(image_tag('btn/btn_down.png')) %>";

$("#security").dropdownchecklist( { closeRadioOnClick: true } );
$("#security_image").parent().width(28);
$("#security_image").parent().parent().width(28);
Expand All @@ -13,7 +16,7 @@
<%= f.text_field :text, :id => "input_activities", :size => 85 %>
<div id="activities_share_btn">
<div id="securities">
<%= f.select :_activity_tie_id, receiver.sent_ties_allowing(current_user, 'create', 'activity').map{ |t| [ t(t.relation_name, :count => :other), t.id ] }, {}, :id => 'security' %>
<%= f.select :_activity_tie_id, receiver.sent_ties_allowing(current_user, 'create', 'activity').map{ |t| [ t.relation_name, t.id ] }, {}, :id => 'security' %>
</div>
<%= image_submit_tag "btn/btn_share.png" %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,20 +460,10 @@
var text = self._formatText(selectOptions, options.firstItemChecksAll, firstOption);
var controlLabel = controlWrapper.find(".ui-dropdownchecklist-text");

var image = $("<img>");
image.attr("src", "/images/btn/btn_security.png");
image.attr('alt', 'security');
image.attr('id','security_image');

var down = $("<img>");
down.attr("src","/images/btn/btn_down.png")



//controlLabel.html(text);
controlLabel.html(image);
controlLabel.html(securityImage);
controlLabel.append(" ");
controlLabel.append(down);
controlLabel.append(downImage);
//controlLabel.attr("title", text);
controlLabel.attr("title", "security");

Expand Down Expand Up @@ -784,4 +774,4 @@
}
});

})(jQuery);
})(jQuery);

0 comments on commit a13d89d

Please sign in to comment.