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