Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix web resources mucking up form in IE

  • Loading branch information...
commit aa3c3ac4b7b4a209d34cc58edd8ed2cdb369cfbb 1 parent 531c3aa
@sethwalker authored
View
3  app/views/layouts/application.rhtml
@@ -32,6 +32,7 @@
</div>
<%= yield %>
+ <%= yield :content_footer %>
</div>
</div>
@@ -54,6 +55,8 @@
<% if onload_script = yield( :javascript_onload )-%>
<script type='text/javascript'>
jQ$( function() {
+ jQ$('.js-only').removeClass('js-only');
+ jQ$('.js-hide').hide();
<%= onload_script %>
} );
</script>
View
8 app/views/profiles/form/_web_resource.html.haml
@@ -12,8 +12,12 @@
= ff.text_field :web_resource, :size => 20, :maxlength => 100, :index => index
= ff.label "#{index}_web_resource", 'Web service info'
- unless web_resource.new_record?
- .toolbar.icons-only
+ .toolbar.icons-only.js-only
.icon
- = button_to 'Delete', profile_web_resource_path(profile, web_resource), :method => :delete , :class => 'remote confirm delete action', :remote_url => formatted_profile_web_resource_path(profile, web_resource, :xml ), :title => 'Delete'
+ = link_to 'Delete', profile_web_resource_path(profile, web_resource), :class => 'remote confirm delete action', :remote_url => formatted_profile_web_resource_path(profile, web_resource, :xml ), :title => 'Delete'
+ - content_for :content_footer do
+ .deleteables.js-hide
+ = button_to "Delete \"#{web_resource.web_resource_type}\" #{web_resource.web_resource}", profile_web_resource_path(profile, web_resource), :method => 'delete'
+ -#, :class => 'remote confirm delete action', :remote_url => formatted_profile_web_resource_path(profile, web_resource, :xml ), :title => 'Delete'
View
2  app/views/profiles/form/list/_web_resource.html.haml
@@ -6,6 +6,6 @@
= render :partial => 'profiles/form/web_resource', :locals => { :web_resource => web_resource, :f => f, :profile => profile }
= render :partial => 'profiles/form/web_resource', :locals => { :web_resource => profile.web_resources.build, :f => f, :profile => profile }
.row
- .toolbar
+ .toolbar.js-only
= link_to 'Add web service', new_profile_web_resource_path(profile), :class => 'remote new action'
View
2  app/views/shared/_google_analytics.rhtml
@@ -1,3 +1,4 @@
+<% unless RAILS_ENV == 'development' %>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
@@ -8,3 +9,4 @@
pageTracker._trackPageview();
</script>
+<% end %>
View
2  public/javascripts/forms.js
@@ -57,7 +57,7 @@ Crabgrass.Forms = function() {
},
delete_successful: function( el ) {
- jQ$(el).parents().filter('.row').eq(0).hide('drop', { direction: 'down', duration: 400, callback: function() { this.remove(); } } );
+ jQ$(el).parents().filter('.row').eq(0).hide('drop', { direction: 'down', duration: 400, callback: function() { jQ$(this).remove(); } } );
},
new_successful: function( el, response ) {
View
11 public/stylesheets/sass/160-ui.sass
@@ -340,3 +340,14 @@ body.action_alert #main .landing > .last_column
.online_padding
:margin-top 0
.online_inner_padding
+
+.js-only, .js-staging
+ :display none
+
+.deleteables
+ :margin-top 150px
+ :float left
+ :padding 20px
+ :width 400px
+ :background-color #e5a3a3
+ :border #858b80 solid 1px
Please sign in to comment.
Something went wrong with that request. Please try again.