Commit cb9f514227c77776c8c3c070d92957087677b28c

Authored by Rodrigo Souto
1 parent 6093d99c

Revert "report-abuse: replace modal windwow by colorbox"

Mistakenly replaced the correct way of doing modals by the old way.

This reverts commit ed63bab09a77c398c9228030a8ace0f11e9a6268.
app/views/profile/report_abuse.html.erb
... ... @@ -9,7 +9,7 @@
9 9 <% end %>
10 10  
11 11 <%= submit_button(:send, _('Report profile'), :style => 'float: left; cursor: pointer;', :id => 'report-abuse-submit-button', :onclick => "jQuery('#form-submit-loading').show()") %>
12   - <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'jQuery.colorbox.close(); return false;')%>
  12 + <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'noosfero.modal.close(); return false;')%>
13 13 <div id="form-submit-loading" class="small-loading" style="width: 16px; height: 16px; margin-top: 3px; float: left; display: none;"></div>
14 14 <% end %>
15 15  
... ... @@ -30,7 +30,7 @@
30 30 success: function(data, status, ajax){
31 31 if ( !data.ok ) display_notice(data.error.message);
32 32 else {
33   - $.colorbox.close();
  33 + noosfero.modal.close();
34 34 display_notice(data.message);
35 35 window.location.reload();
36 36 }
... ...
public/javascripts/report-abuse.js
1 1 jQuery(function($) {
2 2 $('.report-abuse-action').live('click', function() {
3   - if($(this).attr('href'))
4   - $.colorbox({href: $(this).attr('href')});
5   -
  3 + if($(this).attr('href')){
  4 + noosfero.modal.inline($(this).attr('href'), {
  5 + innerHeight: '300px',
  6 + innerWidth: '445px'
  7 + });
  8 + }
6 9 return false;
7 10 });
8 11  
... ...