fixed problem with headers in components

This commit is contained in:
mdipierro
2012-09-04 15:07:09 -05:00
parent f2247bc5b6
commit d9121967e7
4 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.6 (2012-09-04 14:47:09) stable
Version 2.0.6 (2012-09-04 15:07:04) stable
+4
View File
@@ -16,6 +16,8 @@
'are not used yet': 'are not used yet',
'Are you sure you want to delete this object?': 'Are you sure you want to delete this object?',
'arguments': 'arguments',
'at char %s': 'at char %s',
'at line %s': 'at line %s',
'back': '<<back',
'can be a git repo': 'can be a git repo',
'Change admin password': 'Change admin password',
@@ -58,6 +60,7 @@
'exposes': 'exposes',
'exposes:': 'exposes:',
'extends': 'extends',
'failed to compile file because:': 'failed to compile file because:',
'file does not exist': 'file does not exist',
'file saved on %s': 'file saved on %s',
'filter': 'filter',
@@ -87,6 +90,7 @@
'modules': 'modules',
'New application wizard': 'New application wizard',
'New simple application': 'New simple application',
'online designer': 'online designer',
'Overwrite installed app': 'Overwrite installed app',
'Pack all': 'Pack all',
'Peeking at file': 'Peeking at file',
+5 -5
View File
@@ -55,7 +55,7 @@ function doClickSave() {
prepareDataForSave('saved_on', jQuery("input[name='saved_on']").val()),
prepareDataForSave('saved_on', jQuery("input[name='saved_on']").val()),
prepareDataForSave('from_ajax','true')));
// console.info(area.textarea.value);
// console.info(area.textarea.value);
jQuery("input[name='saved_on']").attr('style','background-color:yellow');
jQuery("input[name='saved_on']").val('saving now...')
jQuery.ajax({
@@ -65,13 +65,13 @@ function doClickSave() {
dataType: "json",
data: dataForPost[0],
timeout: 5000,
beforeSend: function(xhr) {
beforeSend: function(xhr) {
xhr.setRequestHeader('web2py-component-location',document.location);
xhr.setRequestHeader('web2py-component-element','doClickSave');},
success: function(json,text,xhr){
success: function(json,text,xhr){
// show flash message (if any)
var flash=xhr.getResponseHeader('web2py-component-flash');
// show flash message (if any)
var flash=xhr.getResponseHeader('web2py-component-flash');
if (flash) jQuery('.flash').html(decodeURIComponent(flash)).slideDown();
else jQuery('.flash').hide();
+1 -1
View File
@@ -549,7 +549,7 @@ def wsgibase(environ, responder):
# ##################################################
if request.cid:
rheaders = response.headers
rheaders = http_response.headers
if response.flash and \
not 'web2py-component-flash' in rheaders:
rheaders['web2py-component-flash'] = \