fixed encoding in flash messages, thanks Vlad

This commit is contained in:
Massimo Di Pierro
2012-05-28 13:23:40 -05:00
parent ac864ceaf4
commit 5001a0d16f
6 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -71,7 +71,7 @@ function doClickSave() {
success: function(json,text,xhr){
// show flash message (if any)
var flash=xhr.getResponseHeader('web2py-component-flash');
var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash'));
if (flash) jQuery('.flash').html(flash).slideDown();
else jQuery('.flash').hide();
@@ -149,7 +149,7 @@ function doToggleBreakpoint(filename, url) {
success: function(json,text,xhr){
// show flash message (if any)
var flash=xhr.getResponseHeader('web2py-component-flash');
var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash'));
if (flash) jQuery('.flash').html(flash).slideDown();
else jQuery('.flash').hide();
try {
+1 -1
View File
@@ -86,7 +86,7 @@ function web2py_ajax_page(method, action, data, target) {
var html=xhr.responseText;
var content=xhr.getResponseHeader('web2py-component-content');
var command=xhr.getResponseHeader('web2py-component-command');
var flash=xhr.getResponseHeader('web2py-component-flash');
var flash=decodeURIComponent(xhr.getResponseHeader('web2py-component-flash'));
var t = jQuery('#'+target);
if(content=='prepend') t.prepend(html);
else if(content=='append') t.append(html);