Skip to content

Commit

Permalink
fix a few issues identified in the resources dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Feb 5, 2010
1 parent f07fe02 commit 915c60d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions public/stylesheets/refinery/refinery.css
Expand Up @@ -789,13 +789,13 @@ body.dialog form {
/*bottom: 0px;*/
/*right: 0px;*/
text-align: right;
float: right;
float: right;
/*position: absolute;*/
margin: 0px;
width: 763px;
}

#upload_image_area {
#upload_image_area, #upload_resource_area {
padding: 12px;
}

Expand Down
Expand Up @@ -24,7 +24,7 @@
<% content_for :head do %>
<script type='text/javascript'>
resource_changed = function() {
$('#current_resource_link').attr('href', $('#current_resource_link').attr('href').replace(/current_link=([^&])*&/, "current_link=" + $('#current_resource').attr('href') + "&");
$('#current_resource_link').attr('href', $('#current_resource_link').attr('href').replace(/current_link=([^&])*&/, "current_link=" + $('#current_resource').attr('href') + "&"));
$('#remove_resource').show();
$('#current_resource_container').show();
$('#no_resource_selected').hide();
Expand All @@ -36,7 +36,7 @@
$('#current_resource_container').hide();
$('#current_resource_text').innerHTML = '';
$('#no_resource_selected').show();
$('#current_resource_link').attr('href', $('#current_resource_link').attr('href').replace(/current_link=([^&])*&/, "current_link=&");
$('#current_resource_link').attr('href', $('#current_resource_link').attr('href').replace(/current_link=([^&])*&/, "current_link=&"));
$(this).hide();
e.preventDefault();
});
Expand Down
20 changes: 10 additions & 10 deletions vendor/plugins/resources/app/views/admin/resources/insert.html.erb
Expand Up @@ -6,7 +6,7 @@
<label for='resource_type_existing' class='stripped'>Existing File</label>
</span>
<% end %>
<span id='upload_resource_radio' class='radio<%= " selected_radio" if @resource.errors.size > 0 %>'>
<span id='upload_resource_radio' class='radio<%= " selected_radio" if @resource.errors.size > 0 or @resources.empty? %>'>
<input type='radio' name='resource_type' value='upload_resource' id='resource_type_upload' <%= "checked='true'" if @resources.empty? or !@resource.errors.empty? %> />
<label for='resource_type_upload' class='stripped'>New File</label>
</span>
Expand All @@ -29,14 +29,14 @@
</ul>
</div>
</div>
<%= will_paginate @resources,
:previous_label => '&laquo; Previous',
:next_label => 'Next &raquo;',
:renderer => Refinery::LinkRenderer,
<%= will_paginate @resources,
:previous_label => '&laquo; Previous',
:next_label => 'Next &raquo;',
:renderer => Refinery::LinkRenderer,
:url => {:controller => "admin/resources", :action => "insert", :dialog => from_dialog?} unless @thickbox %>
</div>
<% end %>
<div id='upload_resource_area' class='dialog_area' <%= "style='display:none;'" if @resources.empty? %>>
<div id='upload_resource_area' class='dialog_area' <%= "style='display:none;'" unless @resources.empty? %>>
<%= render :partial => "form", :locals => {:insert => true} %>
</div>
</div>
Expand All @@ -47,10 +47,10 @@
or
<%= link_to "Cancel", "", :id => "cancel_button", :class => "close_dialog" %>
<%= will_paginate @resources,
:previous_label => '&laquo; Previous',
:next_label => 'Next &raquo;',
:renderer => Refinery::LinkRenderer,
<%= will_paginate @resources,
:previous_label => '&laquo; Previous',
:next_label => 'Next &raquo;',
:renderer => Refinery::LinkRenderer,
:url => {:controller => "admin/resources", :action => "insert", :dialog => from_dialog? } %>
</div>
<% end %>
Expand Down

0 comments on commit 915c60d

Please sign in to comment.