changeset d5af715eb572 in sao:5.2
details: https://hg.tryton.org/sao?cmd=changeset;node=d5af715eb572
description:
Escape external strings
issue9351
review301651002
(grafted from 2d55ed2f2bb12fd6fbe387fc768ad4394c00c20a)
diffstat:
CHANGELOG | 2 +
src/common.js | 72 ++++++++++++++++++++++++++--------------------------
src/sao.js | 14 +++++-----
src/screen.js | 8 ++--
src/session.js | 6 ++--
src/tab.js | 18 ++++++------
src/view/calendar.js | 2 +-
src/view/form.js | 10 +++---
src/view/tree.js | 2 +-
src/window.js | 40 ++++++++++++++--------------
10 files changed, 88 insertions(+), 86 deletions(-)
diffs (717 lines):
diff -r 6b921aef82dc -r d5af715eb572 CHANGELOG
--- a/CHANGELOG Sun May 10 11:34:47 2020 +0200
+++ b/CHANGELOG Tue May 26 09:57:34 2020 +0200
@@ -1,3 +1,5 @@
+* Escape external strings (issue9351)
+
Version 5.2.14 - 2020-05-01
* Bug fixes (see mercurial logs for details)
diff -r 6b921aef82dc -r d5af715eb572 src/common.js
--- a/src/common.js Sun May 10 11:34:47 2020 +0200
+++ b/src/common.js Tue May 26 09:57:34 2020 +0200
@@ -124,12 +124,12 @@
jQuery('<div/>', {
'class': 'checkbox'
}).append(jQuery('<label/>')
- .append(jQuery('<input/>', {
+ .text(' ' + k)
+ .prepend(jQuery('<input/>', {
'type': 'radio',
'name': 'selection',
'value': i
- }))
- .append(' ' + k))
+ })))
.appendTo(dialog.body);
});
dialog.body.find('input').first().prop('checked', true);
@@ -137,14 +137,14 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
dialog.modal.modal('hide');
prm.fail();
}).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(function() {
+ }).text(Sao.i18n.gettext('OK')).click(function() {
var i = dialog.body.find('input:checked').attr('value');
dialog.modal.modal('hide');
prm.resolve(values[keys[i]]);
@@ -754,7 +754,7 @@
this.el = el;
} else {
this.el = jQuery('<button/>');
- this.el.append(attributes.string || '');
+ this.el.text(attributes.string || '');
if (this.attributes.rule) {
this.el.append(' ').append(jQuery('<span/>', {
'class': 'badge'
@@ -2852,14 +2852,14 @@
'aria-hidden': true,
})).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Message: '))
+ }).text(Sao.i18n.gettext('Message: '))
).append(jQuery('<span/>')
- .append(message)
+ .text(message)
.css('white-space', 'pre-wrap')));
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(function() {
+ }).text(Sao.i18n.gettext('OK')).click(function() {
this.close(dialog);
prm.resolve('ok');
}.bind(this)).appendTo(dialog.footer);
@@ -2884,20 +2884,20 @@
'aria-hidden': true,
})).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Warning: '))
+ }).text(Sao.i18n.gettext('Warning: '))
).append(jQuery('<h4/>')
- .append(title)
+ .text(title)
.css('white-space', 'pre-wrap'));
if (message) {
content.append(jQuery('<span/>')
- .append(message)
+ .text(message)
.css('white-space', 'pre-wrap'));
}
dialog.body.append(content);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(function() {
+ }).text(Sao.i18n.gettext('OK')).click(function() {
this.close(dialog);
prm.resolve('ok');
}.bind(this)).appendTo(dialog.footer);
@@ -2918,7 +2918,7 @@
'class': 'checkbox',
}).append(jQuery('<label/>')
.append(always)
- .append(Sao.i18n.gettext('Always ignore this warning.')))
+ .text(Sao.i18n.gettext('Always ignore this warning.')))
);
dialog.body.append(jQuery('<p/>')
.text(Sao.i18n.gettext('Do you want to proceed?')));
@@ -2926,14 +2926,14 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('No')).click(function() {
+ }).text(Sao.i18n.gettext('No')).click(function() {
this.close(dialog);
prm.reject();
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('Yes')).click(function() {
+ }).text(Sao.i18n.gettext('Yes')).click(function() {
this.close(dialog);
if (always.prop('checked')) {
prm.resolve('always');
@@ -2958,9 +2958,9 @@
'aria-hidden': true,
})).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Confirmation: '))
+ }).text(Sao.i18n.gettext('Confirmation: '))
).append(jQuery('<span/>')
- .append(message)
+ .text(message)
.css('white-space', 'pre-wrap')));
return dialog;
}
@@ -2973,14 +2973,14 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.close(dialog);
prm.reject();
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(function() {
+ }).text(Sao.i18n.gettext('OK')).click(function() {
this.close(dialog);
prm.resolve();
}.bind(this)).appendTo(dialog.footer);
@@ -2996,21 +2996,21 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.close(dialog);
prm.resolve('cancel');
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('No')).click(function() {
+ }).text(Sao.i18n.gettext('No')).click(function() {
this.close(dialog);
prm.resolve('ko');
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('Yes')).click(function() {
+ }).text(Sao.i18n.gettext('Yes')).click(function() {
this.close(dialog);
prm.resolve('ok');
}.bind(this)).appendTo(dialog.footer);
@@ -3040,18 +3040,18 @@
'class': 'form-group'
}).append(jQuery('<label/>', {
'for': 'ask-dialog-entry'
- }).append(question)).append(entry));
+ }).text(question)).append(entry));
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.close(dialog);
prm.reject();
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(function() {
+ }).text(Sao.i18n.gettext('OK')).click(function() {
this.close(dialog);
prm.resolve(entry.val());
}.bind(this)).appendTo(dialog.footer);
@@ -3076,8 +3076,8 @@
'aria-hidden': true,
})).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Write Concurrency Warning: '))
- ).append(Sao.i18n.gettext('This record has been modified ' +
+ }).text(Sao.i18n.gettext('Write Concurrency Warning: '))
+ ).text(Sao.i18n.gettext('This record has been modified ' +
'while you were editing it.')))
.append(jQuery('<p/>').text(Sao.i18n.gettext('Choose:')))
.append(jQuery('<ul/>')
@@ -3093,14 +3093,14 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.close(dialog);
prm.reject();
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('Compare')).click(function() {
+ }).text(Sao.i18n.gettext('Compare')).click(function() {
this.close(dialog);
Sao.Tab.create({
'model': model,
@@ -3114,7 +3114,7 @@
jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('Write Anyway')).click(function() {
+ }).text(Sao.i18n.gettext('Write Anyway')).click(function() {
this.close(dialog);
prm.resolve();
}.bind(this)).appendTo(dialog.footer);
@@ -3138,7 +3138,7 @@
'aria-hidden': true,
})).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Warning: '))
+ }).text(Sao.i18n.gettext('Warning: '))
).append(jQuery('<p/>')
.append(jQuery('<pre/>')
.text(details)))
@@ -3152,7 +3152,7 @@
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('Close')).click(function() {
+ }).text(Sao.i18n.gettext('Close')).click(function() {
this.close(dialog);
prm.resolve();
}.bind(this)).appendTo(dialog.footer);
@@ -3289,7 +3289,7 @@
'class': 'action action-' + action_id
}).append(jQuery('<a/>', {
'href': '#'
- }).append(this._format_action(content)))
+ }).text(this._format_action(content)))
.click(function(evt) {
evt.preventDefault();
if (this.action_activated) {
@@ -3341,7 +3341,7 @@
'class': 'completion'
}).append(jQuery('<a/>', {
'href': '#'
- }).append(this._format(value)))
+ }).text(this._format(value)))
.click(function(evt) {
evt.preventDefault();
if (this.match_selected) {
@@ -3528,7 +3528,7 @@
var button = jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('Close')).click(close)
+ }).text(Sao.i18n.gettext('Close')).click(close)
.appendTo(dialog.footer);
dialog.modal.on('shown.bs.modal', function() {
// Force the click trigger
diff -r 6b921aef82dc -r d5af715eb572 src/sao.js
--- a/src/sao.js Sun May 10 11:34:47 2020 +0200
+++ b/src/sao.js Tue May 26 09:57:34 2020 +0200
@@ -669,7 +669,7 @@
}).click(function(evt) {
evt.preventDefault();
Sao.preferences();
- }).append(preferences.status_bar));
+ }).text(preferences.status_bar));
var title = Sao.i18n.gettext("Logout");
jQuery('#user-logout').append(jQuery('<a/>', {
'href': '#',
@@ -858,7 +858,7 @@
add_title: function(title) {
this.header.append(jQuery('<h4/>', {
'class': 'modal-title'
- }).append(title));
+ }).text(title));
}
});
@@ -1094,18 +1094,18 @@
var global_shortcuts_dl = jQuery('<dl/>', {
'class': 'dl-horizontal col-md-6'
}).append(jQuery('<h5/>')
- .append(Sao.i18n.gettext('Global shortcuts')))
+ .text(Sao.i18n.gettext('Global shortcuts')))
.appendTo(row);
var tab_shortcuts_dl = jQuery('<dl/>', {
'class': 'dl-horizontal col-md-6'
}).append(jQuery('<h5/>')
- .append(Sao.i18n.gettext('Tab shortcuts')))
- .appendTo(row);
+ .text(Sao.i18n.gettext('Tab shortcuts')))
+ .appendTo(row);
shortcuts_defs().forEach(function(definition) {
- var dt = jQuery('<dt/>').append(definition.label);
+ var dt = jQuery('<dt/>').text(definition.label);
var dd = jQuery('<dd/>').append(jQuery('<kbd>')
- .append(definition.shortcut));
+ .text(definition.shortcut));
var dest_dl;
if (definition.id) {
dest_dl = tab_shortcuts_dl;
diff -r 6b921aef82dc -r d5af715eb572 src/screen.js
--- a/src/screen.js Sun May 10 11:34:47 2020 +0200
+++ b/src/screen.js Tue May 26 09:57:34 2020 +0200
@@ -30,7 +30,7 @@
this.filter_button = jQuery('<button/>', {
type: 'button',
'class': 'btn btn-default'
- }).append(Sao.i18n.gettext('Filters'));
+ }).text(Sao.i18n.gettext('Filters'));
this.filter_button.click(this.search_box.bind(this));
this.search_entry = jQuery('<input/>', {
'class': 'form-control mousetrap',
@@ -111,7 +111,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1
- }).append(name)
+ }).text(name)
.click(domain, this.bookmark_activate.bind(this)))
.appendTo(dropdown_bookmark);
}
@@ -203,7 +203,7 @@
role: 'tab',
'data-toggle': 'tab',
'href': '#' + i
- }).append(name + ' ').append(counter)).appendTo(nav);
+ }).text(name + ' ').append(counter)).appendTo(nav);
this.tab_counter.push(counter);
}.bind(this));
nav.find('a:first').tab('show');
@@ -542,7 +542,7 @@
jQuery('<button/>', {
'class': 'btn btn-primary',
type: 'submit'
- }).append(Sao.i18n.gettext('Find'))
+ }).text(Sao.i18n.gettext('Find'))
.click(search).appendTo(dialog.footer);
}
this.search_modal.modal('show');
diff -r 6b921aef82dc -r d5af715eb572 src/session.js
--- a/src/session.js Sun May 10 11:34:47 2020 +0200
+++ b/src/session.js Tue May 26 09:57:34 2020 +0200
@@ -136,7 +136,7 @@
}).append(jQuery('<label/>', {
'class': 'control-label',
'for': 'database'
- }).append(Sao.i18n.gettext('Database')))
+ }).text(Sao.i18n.gettext('Database')))
.append(dialog.database_select)
.append(dialog.database_input)
).append(jQuery('<div/>', {
@@ -144,13 +144,13 @@
}).append(jQuery('<label/>', {
'class': 'control-label',
'for': 'login'
- }).append(Sao.i18n.gettext('User name')))
+ }).text(Sao.i18n.gettext('User name')))
.append(dialog.login_input)
);
dialog.button = jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(' ' + Sao.i18n.gettext("Login")).appendTo(dialog.footer);
+ }).text(' ' + Sao.i18n.gettext("Login")).appendTo(dialog.footer);
return dialog;
};
diff -r 6b921aef82dc -r d5af715eb572 src/tab.js
--- a/src/tab.js Sun May 10 11:34:47 2020 +0200
+++ b/src/tab.js Tue May 26 09:57:34 2020 +0200
@@ -138,7 +138,7 @@
'tabindex': -1
}).append(Sao.common.ICONFACTORY.get_icon_img(item.icon, {
'aria-hidden': 'true',
- })).append(' ' + item.label).appendTo(menuitem);
+ })).text(' ' + item.label).appendTo(menuitem);
this.menu_buttons[item.id] = menuitem;
link.click(function(evt) {
evt.preventDefault();
@@ -387,7 +387,7 @@
'aria-hidden': true
}).append('×')).append(jQuery('<span/>', {
'class': 'sr-only'
- }).append(Sao.i18n.gettext('Close'))).click(function(evt) {
+ }).text(Sao.i18n.gettext('Close'))).click(function(evt) {
evt.preventDefault();
tab.close();
}))
@@ -557,7 +557,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1
- }).append(
+ }).text(
button.attributes.string || ''))
.click(function(evt) {
evt.preventDefault();
@@ -596,7 +596,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1,
- }).append(name))
+ }).text(name))
.click(function(evt) {
evt.preventDefault();
var ids = screen.current_view.selected_records
@@ -623,7 +623,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1
- }).append(action.name))
+ }).text(action.name))
.click(function(evt) {
evt.preventDefault();
var prm = jQuery.when();
@@ -669,7 +669,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1,
- }).append(export_.name))
+ }).text(export_.name))
.click(function(evt) {
evt.preventDefault();
this.do_export(export_);
@@ -1037,7 +1037,7 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1,
- }).append(name).appendTo(jQuery('<li/>', {
+ }).text(name).appendTo(jQuery('<li/>', {
'role': 'presentation',
}).appendTo(menu));
if (typeof callback == 'string') {
@@ -1072,14 +1072,14 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1,
- }).append(Sao.i18n.gettext('Add...'))));
+ }).text(Sao.i18n.gettext('Add...'))));
menu.append(jQuery('<li/>', {
'role': 'presentation',
}).append(jQuery('<a/>', {
'role': 'menuitem',
'href': '#',
'tabindex': -1,
- }).append(Sao.i18n.gettext('Manage...'))
+ }).text(Sao.i18n.gettext('Manage...'))
.click(function(evt) {
evt.preventDefault();
window_();
diff -r 6b921aef82dc -r d5af715eb572 src/view/calendar.js
--- a/src/view/calendar.js Sun May 10 11:34:47 2020 +0200
+++ b/src/view/calendar.js Tue May 26 09:57:34 2020 +0200
@@ -255,7 +255,7 @@
this.screen.view_name == 'calendar') {
element.find('.fc-time').remove();
}
- element.append(event.description);
+ element.text(event.description);
element.css('white-space', 'pre');
var model_access = Sao.common.MODELACCESS.get(
this.screen.model_name);
diff -r 6b921aef82dc -r d5af715eb572 src/view/form.js
--- a/src/view/form.js Sun May 10 11:34:47 2020 +0200
+++ b/src/view/form.js Tue May 26 09:57:34 2020 +0200
@@ -728,7 +728,7 @@
'href': '#' + tab_id
})
.append(img)
- .append(text))
+ .text(text))
.appendTo(this.nav);
pane.html(tab).appendTo(this.panes);
if (!this.selected) {
@@ -823,7 +823,7 @@
'class': 'caret',
})));
if (attributes.string) {
- link.append(attributes.string);
+ link.text(attributes.string);
}
},
add: function(widget) {
@@ -1008,13 +1008,13 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.close(dialog);
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'button'
- }).append(Sao.i18n.gettext('OK')).click(this.write
+ }).text(Sao.i18n.gettext('OK')).click(this.write
.bind(this, widget, dialog))
.appendTo(dialog.footer);
dialog.content.submit(function(evt) {
@@ -1884,7 +1884,7 @@
return function(option) {
dropdown.append(jQuery('<li/>').append(jQuery('<a/>', {
'href': '#'
- }).append(option).click(function(evt) {
+ }).text(option).click(function(evt) {
evt.preventDefault();
document.execCommand(properties.command, false,
option);
})));
diff -r 6b921aef82dc -r d5af715eb572 src/view/tree.js
--- a/src/view/tree.js Sun May 10 11:34:47 2020 +0200
+++ b/src/view/tree.js Tue May 26 09:57:34 2020 +0200
@@ -472,7 +472,7 @@
var more_button = jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('More')
+ }).text(Sao.i18n.gettext('More')
).click(function() {
this.display_size += Sao.config.display_size;
this.display();
diff -r 6b921aef82dc -r d5af715eb572 src/window.js
--- a/src/window.js Sun May 10 11:34:47 2020 +0200
+++ b/src/window.js Tue May 26 09:57:34 2020 +0200
@@ -87,7 +87,7 @@
dialog.footer.append(jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(button_text).click(function() {
+ }).text(button_text).click(function() {
this.response('RESPONSE_CANCEL');
}.bind(this)));
}
@@ -96,7 +96,7 @@
dialog.footer.append(jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('New')).click(function() {
+ }).text(Sao.i18n.gettext('New')).click(function() {
this.response('RESPONSE_ACCEPT');
}.bind(this)));
}
@@ -105,12 +105,12 @@
dialog.footer.append(jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('Save')));
+ }).text(Sao.i18n.gettext('Save')));
} else {
dialog.footer.append(jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('OK')));
+ }).text(Sao.i18n.gettext('OK')));
}
dialog.content.submit(function(e) {
this.response('RESPONSE_OK');
@@ -598,27 +598,27 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.response('RESPONSE_CANCEL');
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('Find')).click(function() {
+ }).text(Sao.i18n.gettext('Find')).click(function() {
this.response('RESPONSE_APPLY');
}.bind(this)).appendTo(dialog.footer);
if (kwargs.new_ && Sao.common.MODELACCESS.get(model).create) {
jQuery('<button/>', {
'class': 'btn btn-default',
'type': 'button'
- }).append(Sao.i18n.gettext('New')).click(function() {
+ }).text(Sao.i18n.gettext('New')).click(function() {
this.response('RESPONSE_ACCEPT');
}.bind(this)).appendTo(dialog.footer);
}
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
+ }).text(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
dialog.content.submit(function(e) {
this.response('RESPONSE_OK');
e.preventDefault();
@@ -719,13 +719,13 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.response('RESPONSE_CANCEL');
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
+ }).text(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
dialog.content.submit(function(e) {
this.response('RESPONSE_OK');
e.preventDefault();
@@ -802,13 +802,13 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function() {
+ }).text(Sao.i18n.gettext('Cancel')).click(function() {
this.response('RESPONSE_CANCEL');
}.bind(this)).appendTo(dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
+ }).text(Sao.i18n.gettext('OK')).appendTo(dialog.footer);
dialog.content.submit(function(e) {
this.response('RESPONSE_OK');
e.preventDefault();
@@ -915,14 +915,14 @@
jQuery('<button/>', {
'class': 'btn btn-link',
'type': 'button'
- }).append(Sao.i18n.gettext('Cancel')).click(function(){
+ }).text(Sao.i18n.gettext('Cancel')).click(function(){
this.response('RESPONSE_CANCEL');
}.bind(this)).appendTo(this.dialog.footer);
jQuery('<button/>', {
'class': 'btn btn-primary',
'type': 'submit'
- }).append(Sao.i18n.gettext('OK')).click(function(e){
+ }).text(Sao.i18n.gettext('OK')).click(function(e){
this.response('RESPONSE_OK');
e.preventDefault();
}.bind(this)).appendTo(this.dialog.footer);
@@ -965,7 +965,7 @@
this.fields_all.find('.bg-primary').each(function(i, el_field)
{
this.sig_sel_add(el_field);
}.bind(this));
- }.bind(this)).append(' '+Sao.i18n.gettext('Add'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Add'))
.appendTo(this.column_buttons);
jQuery('<button/>', {
@@ -975,7 +975,7 @@
).click(function(){
// sig_unsel
this.fields_selected.children('li.bg-primary').remove();
- }.bind(this)).append(' '+Sao.i18n.gettext('Remove'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Remove'))
.appendTo(this.column_buttons);
jQuery('<button/>', {
@@ -984,7 +984,7 @@
}).append(Sao.common.ICONFACTORY.get_icon_img('tryton-clear')
).click(function(){
this.fields_selected.empty();
- }.bind(this)).append(' '+Sao.i18n.gettext('Clear'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Clear'))
.appendTo(this.column_buttons);
jQuery('<hr>').appendTo(this.column_buttons);
@@ -1154,7 +1154,7 @@
}).append(Sao.common.ICONFACTORY.get_icon_img('tryton-search')
).click(function(){
this.autodetect();
- }.bind(this)).append(' '+Sao.i18n.gettext('Auto-Detect'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Auto-Detect'))
.appendTo(this.column_buttons);
var chooser_label = jQuery('<label/>', {
@@ -1467,7 +1467,7 @@
}).append(Sao.common.ICONFACTORY.get_icon_img('tryton-save')
).click(function(){
this.addreplace_predef();
- }.bind(this)).append(' '+Sao.i18n.gettext('Save Export'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Save Export'))
.appendTo(this.column_buttons);
jQuery('<button/>', {
@@ -1476,7 +1476,7 @@
}).append(Sao.common.ICONFACTORY.get_icon_img('tryton-delete')
).click(function(){
this.remove_predef();
- }.bind(this)).append(' '+Sao.i18n.gettext('Delete Export'))
+ }.bind(this)).text(' ' + Sao.i18n.gettext('Delete Export'))
.appendTo(this.column_buttons);
var predefined_exports_column = jQuery('<div/>', {