From: Jason Etheridge Date: Mon, 28 Feb 2011 18:24:29 +0000 (-0500) Subject: have the unified wrapper present template controls but let the item attribute editor... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ba6dfd3c0be56186e11b38315bceecd324342dcf;p=evergreen%2Fequinox.git have the unified wrapper present template controls but let the item attribute editor do the work. Pull the reset button into the template bar. Currently broken for applying templates before items get created (or recreated) --- diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.js b/Open-ILS/xul/staff_client/server/cat/copy_editor.js index 26f87703ee..1b8f5aa614 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.js @@ -214,6 +214,25 @@ g.retrieve_templates = function() { function() { g.copy_editor_prefs[ 'template_menu' ] = { 'value' : g.template_menu.value }; g.save_attributes(); }, false ); + + if (xulG.unified_interface) { + if (typeof xulG.update_unified_template_list == 'function') { + xulG.update_unified_template_list(list); + // functions the unified wrapper should use to let the item attribute editor do the heavy lifting for templates + xulG.update_item_editor_template_selection = function(new_value) { + g.template_menu.value = new_value; + g.copy_editor_prefs[ 'template_menu' ] = { 'value' : g.template_menu.value }; + g.save_attributes(); + } + xulG.item_editor_apply_template = function() { g.apply_template(); }; + xulG.item_editor_delete_template = function() { g.delete_template(); }; + xulG.item_editor_save_template = function() { g.save_template(); }; + xulG.item_editor_import_templates = function() { g.import_templates(); }; + xulG.item_editor_export_templates = function() { g.export_templates(); }; + xulG.item_editor_reset = function() { g.reset(); }; + } + } + } catch(E) { g.error.standard_unexpected_error_alert($('catStrings').getString('staff.cat.copy_editor.retrieve_templates.error'), E); } diff --git a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul index 100617f685..62edc318a1 100644 --- a/Open-ILS/xul/staff_client/server/cat/copy_editor.xul +++ b/Open-ILS/xul/staff_client/server/cat/copy_editor.xul @@ -42,7 +42,7 @@ - +