From: Jason Etheridge Date: Wed, 13 Jun 2012 06:30:36 +0000 (-0400) Subject: expose hard-coded toolbar layout option X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c4df2e9ccacb369304dfeca0cfe94286b35d801a;p=contrib%2FConifer.git expose hard-coded toolbar layout option If the open-ils.menu.toolbar preference or ui.general.button_bar org unit setting references a non-existent toolbar, then a hard-coded stock toolbar will render. However, the menu entry 'None' will be selected under the Admin -> Workstation Administration -> Toolbars -> Current menu, which is confusing. With this change, a Default menu entry will be selected whenever the hard- coded layout has cause to render, and you can also explicitly select that menu entry to use the default and save it as your workstation default. Signed-off-by: Jason Etheridge Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js index e0db32e0d0..7b781a1eed 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js @@ -1732,6 +1732,14 @@ main.menu.prototype = { ) ); + x.appendChild( + create_menuitem( + offlineStrings.getString('staff.main.button_bar.default'), + 'default', + true + ) + ); + for (var i = 0; i < this.data.list.atb.length; i++) { var def = this.data.list.atb[i]; x.appendChild( @@ -1778,6 +1786,7 @@ main.menu.prototype = { var x = document.getElementById('main.menu.admin.client.toolbars.current.popup'); if (x) { var selectitems = x.getElementsByAttribute('value',button_bar); + if(selectitems.length < 1) selecteditems = x.getElementsByAttribute('value','default'); if(selectitems.length > 0) selectitems[0].setAttribute('checked','true'); } } diff --git a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties index 39e4974fb7..8a44950a07 100644 --- a/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties +++ b/Open-ILS/xul/staff_client/chrome/locale/en-US/offline.properties @@ -321,6 +321,7 @@ barcode_choice.asset_label=Item : %1$s barcode_choice.serial_label=Serial : %1$s barcode_choice.booking_label=Booking : %1$s staff.main.button_bar.none=None +staff.main.button_bar.default=Default util.hide_elements.title=Hide UI Elements util.hide_elements.desc=This is a list of hideable elements for this interface. Check the ones that you want hidden and the library (and descendants) you want to affect: util.hide_elements.current_setting_preamble=Workstation library %1$s is currently hiding these elements based on a setting inherited from %2$s: