Skip to content

Commit

Permalink
Item12019: if the ajax response is a 419 'request for user validation…
Browse files Browse the repository at this point in the history
…' use jqDialog to pass it on (experimental)

git-svn-id: http://svn.foswiki.org/trunk/Html5EditContrib@15232 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Jul 30, 2012
1 parent b1b9a45 commit b2b05fc
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions lib/Foswiki/Contrib/Html5EditContrib/Hallojs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,7 @@ sub renderJS {
}).bind('hallodeactivated', function(event, data){
var item = jQuery(this).data('hallo');
if (item.isModified()) {
foswiki.post('save', { text: this.innerHTML, wysiwyg_edit: 'go', web: foswiki.getPreference('WEB'), topic: foswiki.getPreference('TOPIC') })
.success(function(event, data) {alert('Data saved: ' + data);})
.error(function(event, data) {
//TODO: this darstadly hack is because i've not made a POST form and used that to submit the save, so strikeone has a hissyfit
//OH BOY YOU CANT BE SERIOUS - and it relies on the strikeone.js being loaded due to the bootstrap search being POST..
var entirehtml = jQuery(event.responseText).filter('.foswikiMain');
var last = entirehtml[0];
var message = jQuery(last.innerHTML).filter('.container-fluid');
message.dialog({
height: 410,
width: 600,
modal: true,
title: 'confirm change'
});
jQuery('.s1js_available').show();
});
foswiki.post('save', { text: this.innerHTML, wysiwyg_edit: 'go', web: foswiki.getPreference('WEB'), topic: foswiki.getPreference('TOPIC') });
}
}).bind('halloactivated', function(event, data){
});
Expand Down

0 comments on commit b2b05fc

Please sign in to comment.