[noosfero/noosfero][next] 2 commits: Revert "report-abuse: replace modal windwow by colorbox"
Rodrigo Souto
gitlab at gitlab.com
Wed Apr 22 17:17:51 BRT 2015
Rodrigo Souto pushed to branch next at Noosfero / noosfero
Commits:
cb9f5142 by Rodrigo Souto at 2015-04-22T16:42:16Z
Revert "report-abuse: replace modal windwow by colorbox"
Mistakenly replaced the correct way of doing modals by the old way.
This reverts commit ed63bab09a77c398c9228030a8ace0f11e9a6268.
- - - - -
82ab76ba by Rodrigo Souto at 2015-04-22T17:15:55Z
report-abuse: use modal url instead of inline
- - - - -
2 changed files:
- app/views/profile/report_abuse.html.erb
- public/javascripts/report-abuse.js
Changes:
=====================================
app/views/profile/report_abuse.html.erb
=====================================
--- 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 => 'jQuery.colorbox.close(); return false;')%>
+ <%= button(:cancel, _('Cancel'), {}, :style => 'float: left; padding-top: 0px; padding-bottom: 0px;', :onclick => 'noosfero.modal.close(); return false;')%>
<div id="form-submit-loading" class="small-loading" style="width: 16px; height: 16px; margin-top: 3px; float: left; display: none;"></div>
<% end %>
@@ -30,7 +30,7 @@
success: function(data, status, ajax){
if ( !data.ok ) display_notice(data.error.message);
else {
- $.colorbox.close();
+ noosfero.modal.close();
display_notice(data.message);
window.location.reload();
}
=====================================
public/javascripts/report-abuse.js
=====================================
--- a/public/javascripts/report-abuse.js
+++ b/public/javascripts/report-abuse.js
@@ -1,7 +1,7 @@
jQuery(function($) {
$('.report-abuse-action').live('click', function() {
if($(this).attr('href'))
- $.colorbox({href: $(this).attr('href')});
+ noosfero.modal.url($(this).attr('href'));
return false;
});
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/6093d99cfc43b9a51d342e79dcedc2710dceda46...82ab76ba523a5851833b028c31c11a4a78294010
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150422/ba7992af/attachment.html>
More information about the Noosfero-dev
mailing list