Skip to content

Commit

Permalink
Merge pull request refinery#1530 from resolve/f/multi-image
Browse files Browse the repository at this point in the history
Actually allow multiple to be set via url param.
  • Loading branch information
parndt committed Mar 29, 2012
2 parents 2f8c1aa + 778bf86 commit fb0bf98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions images/app/controllers/refinery/admin/images_controller.rb
Expand Up @@ -84,6 +84,7 @@ def init_dialog
@update_image = params[:update_image]
@thumbnail = params[:thumbnail]
@callback = params[:callback]
@multiple = params[:multiple]
@conditions = params[:conditions]
end

Expand Down
5 changes: 4 additions & 1 deletion images/app/views/refinery/admin/images/insert.html.erb
Expand Up @@ -38,7 +38,10 @@
<% content_for :javascripts do %>
<script>
$(document).ready(function(){
new ImageDialog({callback: <%= @callback.present? ? "self.parent.#{@callback}" : "null" %>, multiple: false}).create();
new ImageDialog({
callback: <%= @callback.present? ? "self.parent.#{h @callback}" : "null" %>,
multiple: <%= @multiple == true %>
}).create();
});
</script>
<% end %>

0 comments on commit fb0bf98

Please sign in to comment.