Escape external strings
issue9351 review301651002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Escape external strings (issue9351)
|
||||
* Add context to export URL
|
||||
* Allow changes to editable tree checkboxes without first selecting the line
|
||||
|
||||
|
||||
+36
-36
@@ -135,12 +135,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);
|
||||
@@ -148,14 +148,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]]);
|
||||
@@ -767,7 +767,7 @@
|
||||
this.el = jQuery('<button/>', {
|
||||
title: attributes.string || '',
|
||||
});
|
||||
this.el.append(attributes.string || '');
|
||||
this.el.text(attributes.string || '');
|
||||
if (this.attributes.rule) {
|
||||
this.el.append(' ').append(jQuery('<span/>', {
|
||||
'class': 'badge'
|
||||
@@ -2912,14 +2912,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);
|
||||
@@ -2944,20 +2944,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);
|
||||
@@ -2978,7 +2978,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?')));
|
||||
@@ -2986,14 +2986,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');
|
||||
@@ -3018,9 +3018,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;
|
||||
}
|
||||
@@ -3033,14 +3033,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);
|
||||
@@ -3056,21 +3056,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);
|
||||
@@ -3100,18 +3100,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);
|
||||
@@ -3136,8 +3136,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/>')
|
||||
@@ -3153,14 +3153,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.rpc({
|
||||
'method': 'model.' + model + '.read',
|
||||
@@ -3181,7 +3181,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);
|
||||
@@ -3205,7 +3205,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)))
|
||||
@@ -3219,7 +3219,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);
|
||||
@@ -3364,7 +3364,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) {
|
||||
@@ -3416,7 +3416,7 @@
|
||||
'class': 'completion'
|
||||
}).append(jQuery('<a/>', {
|
||||
'href': '#'
|
||||
}).append(this._format(value)))
|
||||
}).text(this._format(value)))
|
||||
.click(function(evt) {
|
||||
evt.preventDefault();
|
||||
if (this.match_selected) {
|
||||
@@ -3604,7 +3604,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
|
||||
|
||||
+7
-7
@@ -677,7 +677,7 @@ var Sao = {};
|
||||
}).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': '#',
|
||||
@@ -866,7 +866,7 @@ var Sao = {};
|
||||
add_title: function(title) {
|
||||
this.header.append(jQuery('<h4/>', {
|
||||
'class': 'modal-title'
|
||||
}).append(title));
|
||||
}).text(title));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1102,18 +1102,18 @@ var Sao = {};
|
||||
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;
|
||||
|
||||
+4
-4
@@ -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');
|
||||
@@ -544,7 +544,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');
|
||||
|
||||
+3
-3
@@ -140,7 +140,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/>', {
|
||||
@@ -148,13 +148,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;
|
||||
};
|
||||
|
||||
|
||||
+9
-9
@@ -140,7 +140,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();
|
||||
@@ -389,7 +389,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();
|
||||
}))
|
||||
@@ -559,7 +559,7 @@
|
||||
'role': 'menuitem',
|
||||
'href': '#',
|
||||
'tabindex': -1
|
||||
}).append(
|
||||
}).text(
|
||||
button.attributes.string || ''))
|
||||
.click(function(evt) {
|
||||
evt.preventDefault();
|
||||
@@ -598,7 +598,7 @@
|
||||
'role': 'menuitem',
|
||||
'href': '#',
|
||||
'tabindex': -1,
|
||||
}).append(name))
|
||||
}).text(name))
|
||||
.click(function(evt) {
|
||||
evt.preventDefault();
|
||||
var ids = screen.current_view.selected_records
|
||||
@@ -625,7 +625,7 @@
|
||||
'role': 'menuitem',
|
||||
'href': '#',
|
||||
'tabindex': -1
|
||||
}).append(action.name))
|
||||
}).text(action.name))
|
||||
.click(function(evt) {
|
||||
evt.preventDefault();
|
||||
var prm = jQuery.when();
|
||||
@@ -671,7 +671,7 @@
|
||||
'role': 'menuitem',
|
||||
'href': '#',
|
||||
'tabindex': -1,
|
||||
}).append(export_.name))
|
||||
}).text(export_.name))
|
||||
.click(function(evt) {
|
||||
evt.preventDefault();
|
||||
this.do_export(export_);
|
||||
@@ -1039,7 +1039,7 @@
|
||||
'role': 'menuitem',
|
||||
'href': '#',
|
||||
'tabindex': -1,
|
||||
}).append(name).appendTo(jQuery('<li/>', {
|
||||
}).text(name).appendTo(jQuery('<li/>', {
|
||||
'role': 'presentation',
|
||||
}).appendTo(menu));
|
||||
if (typeof callback == 'string') {
|
||||
@@ -1074,14 +1074,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_();
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
this.screen.view_name == 'calendar') {
|
||||
element.find('.fc-time').remove();
|
||||
}
|
||||
element.append(event.description);
|
||||
element.text(event.description);
|
||||
element.css('white-space', 'pre')
|
||||
.css('overflow', 'hidden')
|
||||
.css('text-overflow', 'ellipsis')
|
||||
|
||||
+6
-6
@@ -778,7 +778,7 @@ function eval_pyson(value){
|
||||
'href': '#' + tab_id
|
||||
})
|
||||
.append(img)
|
||||
.append(text))
|
||||
.text(text))
|
||||
.appendTo(this.nav);
|
||||
pane.html(tab).appendTo(this.panes);
|
||||
if (!this.selected) {
|
||||
@@ -873,7 +873,7 @@ function eval_pyson(value){
|
||||
'class': 'caret',
|
||||
})));
|
||||
if (attributes.string) {
|
||||
link.append(attributes.string);
|
||||
link.text(attributes.string);
|
||||
}
|
||||
},
|
||||
add: function(widget) {
|
||||
@@ -1012,7 +1012,7 @@ function eval_pyson(value){
|
||||
if (domains.length) {
|
||||
domains.map(function(d, i) {
|
||||
var name = d[0];
|
||||
this.label.append(name + ' ');
|
||||
this.label.text(name + ' ');
|
||||
jQuery('<span/>', {
|
||||
'class': 'badge',
|
||||
}).text(counter[i]).appendTo(this.label);
|
||||
@@ -1215,13 +1215,13 @@ function eval_pyson(value){
|
||||
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) {
|
||||
@@ -2179,7 +2179,7 @@ function eval_pyson(value){
|
||||
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);
|
||||
})));
|
||||
|
||||
+1
-1
@@ -734,7 +734,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();
|
||||
|
||||
+21
-21
@@ -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');
|
||||
@@ -599,27 +599,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();
|
||||
@@ -721,13 +721,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();
|
||||
@@ -801,13 +801,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();
|
||||
@@ -914,14 +914,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);
|
||||
@@ -961,7 +961,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/>', {
|
||||
@@ -971,7 +971,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/>', {
|
||||
@@ -980,7 +980,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);
|
||||
@@ -1144,7 +1144,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/>', {
|
||||
@@ -1437,7 +1437,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);
|
||||
|
||||
this.button_url = jQuery('<a/>', {
|
||||
@@ -1445,7 +1445,7 @@
|
||||
'target': '_blank',
|
||||
'rel': 'noreferrer noopener',
|
||||
}).append(Sao.common.ICONFACTORY.get_icon_img('tryton-public')
|
||||
).append(' ' + Sao.i18n.gettext("URL Export"))
|
||||
).text(' ' + Sao.i18n.gettext("URL Export"))
|
||||
.appendTo(this.column_buttons);
|
||||
this.dialog.body.on('change click', this.set_url.bind(this));
|
||||
|
||||
@@ -1455,7 +1455,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/>', {
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@
|
||||
this.header.append(jQuery('<h4/>', {
|
||||
'class': 'model-title',
|
||||
'title': this.name,
|
||||
}).append(Sao.common.ellipsize(this.name, 80)));
|
||||
}).text(Sao.common.ellipsize(this.name, 80)));
|
||||
this.widget.append(this.screen.screen_container.el);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user