From ed63bab09a77c398c9228030a8ace0f11e9a6268 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 21 Apr 2015 17:21:14 -0300 Subject: [PATCH] report-abuse: replace modal windwow by colorbox --- app/views/profile/report_abuse.html.erb | 4 ++-- public/javascripts/report-abuse.js | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/views/profile/report_abuse.html.erb b/app/views/profile/report_abuse.html.erb index 1eeddfa..0b63206 100644 --- a/app/views/profile/report_abuse.html.erb +++ b/app/views/profile/report_abuse.html.erb @@ -9,7 +9,7 @@ <% end %> <%= submit_button(:send, _('Report profile'), :style => 'float: left; cursor: pointer;', :id => 'report-abuse-submit-button', :onclick => "jQuery('#form-submit-loading').show()") %> - <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'noosfero.modal.close(); return false;')%> + <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'jQuery.colorbox.close(); return false;')%> <% end %> @@ -30,7 +30,7 @@ success: function(data, status, ajax){ if ( !data.ok ) display_notice(data.error.message); else { - noosfero.modal.close(); + $.colorbox.close(); display_notice(data.message); window.location.reload(); } diff --git a/public/javascripts/report-abuse.js b/public/javascripts/report-abuse.js index dcd25b8..611b525 100644 --- a/public/javascripts/report-abuse.js +++ b/public/javascripts/report-abuse.js @@ -1,11 +1,8 @@ jQuery(function($) { $('.report-abuse-action').live('click', function() { - if($(this).attr('href')){ - noosfero.modal.inline($(this).attr('href'), { - innerHeight: '300px', - innerWidth: '445px' - }); - } + if($(this).attr('href')) + $.colorbox({href: $(this).attr('href')}); + return false; }); -- libgit2 0.21.2