Fix lost flash message in case of error when save editor (crtl-s). Change Esc to Ctrl-Esc to exit from Fullscreen mode, because this cause collision with the Vim mode (Esc key). Add a select into the config button to select 'default', 'vim' or 'emacs' editor

This commit is contained in:
Roberto Perdomo
2013-09-22 18:36:28 -04:30
parent d547a9d6ea
commit 2ebf0d12ed
5 changed files with 38 additions and 11 deletions
@@ -73,6 +73,12 @@ function doClickSave() {
var t = jQuery("input[name='save']");
t.attr('class', '');
t.attr('disabled', '');
var flash = xhr.getResponseHeader('web2py-component-flash');
if(flash) {
jQuery('.flash').html(decodeURIComponent(flash))
.append('<a href="#" class="close">&times;</a>')
.slideDown();
} else jQuery('.flash').hide();
try {
if(json.error) {
window.location.href = json.redirect;