diff --git a/src/tab.js b/src/tab.js index 3257a216c7..96a15dde2f 100644 --- a/src/tab.js +++ b/src/tab.js @@ -138,9 +138,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 --git a/src/window.js b/src/window.js index 908840460c..4d7852d830 100644 --- a/src/window.js +++ b/src/window.js @@ -956,31 +956,34 @@ var button_add = jQuery('', { '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('', { '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('', { '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('