changeset 2ebd40cda25b in sao:5.0
details: https://hg.tryton.org/sao?cmd=changeset;node=2ebd40cda25b
description:
Do not override icons with text
issue9388
review325521002
(grafted from 102ef3b3209de2f409a48d6738d0c63333b0adb9)
diffstat:
src/tab.js | 7 ++++---
src/window.js | 30 ++++++++++++++++++------------
2 files changed, 22 insertions(+), 15 deletions(-)
diffs (101 lines):
diff -r a9a0c944f9c0 -r 2ebd40cda25b src/tab.js
--- a/src/tab.js Wed Jun 03 21:02:49 2020 +0200
+++ b/src/tab.js Fri Jun 05 19:12:53 2020 +0200
@@ -136,9 +136,10 @@
'role': 'menuitem',
'href': '#',
'tabindex': -1
- }).append(Sao.common.ICONFACTORY.get_icon_img(item.icon, {
- 'aria-hidden': 'true',
- })).text(' ' + item.label).appendTo(menuitem);
+ }).text(' ' + item.label).prepend(
+ Sao.common.ICONFACTORY.get_icon_img(item.icon, {
+ 'aria-hidden': 'true',
+ })).appendTo(menuitem);
this.menu_buttons[item.id] = menuitem;
link.click(function(evt) {
evt.preventDefault();
diff -r a9a0c944f9c0 -r 2ebd40cda25b src/window.js
--- a/src/window.js Wed Jun 03 21:02:49 2020 +0200
+++ b/src/window.js Fri Jun 05 19:12:53 2020 +0200
@@ -932,31 +932,34 @@
var button_add = jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-add')
+ }).text(' ' + Sao.i18n.gettext('Add')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-add')
).click(function(){
this.fields_all.find('.bg-primary').each(function(i, el_field)
{
this.sig_sel_add(el_field);
}.bind(this));
- }.bind(this)).text(' ' + Sao.i18n.gettext('Add'))
+ }.bind(this))
.appendTo(this.column_buttons);
jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-remove')
+ }).text(' ' + Sao.i18n.gettext('Remove')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-remove')
).click(function(){
// sig_unsel
this.fields_selected.children('li.bg-primary').remove();
- }.bind(this)).text(' ' + Sao.i18n.gettext('Remove'))
+ }.bind(this))
.appendTo(this.column_buttons);
jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-clear')
+ }).text(' ' + Sao.i18n.gettext('Clear')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-clear')
).click(function(){
this.fields_selected.empty();
- }.bind(this)).text(' ' + Sao.i18n.gettext('Clear'))
+ }.bind(this))
.appendTo(this.column_buttons);
jQuery('<hr>').appendTo(this.column_buttons);
@@ -1116,10 +1119,11 @@
jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-search')
+ }).text(' ' + Sao.i18n.gettext('Auto-Detect')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-search')
).click(function(){
this.autodetect();
- }.bind(this)).text(' ' + Sao.i18n.gettext('Auto-Detect'))
+ }.bind(this))
.appendTo(this.column_buttons);
var chooser_label = jQuery('<label/>', {
@@ -1431,19 +1435,21 @@
jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-save')
+ }).text(' ' + Sao.i18n.gettext('Save Export')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-save')
).click(function(){
this.addreplace_predef();
- }.bind(this)).text(' ' + Sao.i18n.gettext('Save Export'))
+ }.bind(this))
.appendTo(this.column_buttons);
jQuery('<button/>', {
'class': 'btn btn-default btn-block',
'type': 'button'
- }).append(Sao.common.ICONFACTORY.get_icon_img('tryton-delete')
+ }).text(' ' + Sao.i18n.gettext('Delete Export')).prepend(
+ Sao.common.ICONFACTORY.get_icon_img('tryton-delete')
).click(function(){
this.remove_predef();
- }.bind(this)).text(' ' + Sao.i18n.gettext('Delete Export'))
+ }.bind(this))
.appendTo(this.column_buttons);
var predefined_exports_column = jQuery('<div/>', {