From 3efe3c8b0f945ed5fa52e409663f7e98c35c915a Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Fri, 20 May 2011 03:55:37 -0400 Subject: [PATCH] usability tweak, pull the Create button out of the embedded interfaces and into the wrapping UI for the horizontal variant of the unified vol/copy editor Signed-off-by: Jason Etheridge --- .../staff_client/server/cat/volume_copy_editor.js | 22 +++++++++++++++++++++- .../server/cat/volume_copy_editor_horiz.xul | 6 ++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_editor.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_editor.js index 2938b6a807..468f95e183 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_editor.js +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_editor.js @@ -30,7 +30,27 @@ function my_init() { 'push_xulG' : true, 'alt_print' : false, 'browser_id' : 'volume_pane', - 'passthru_content_params' : xulG + 'passthru_content_params' : xulG, + 'on_url_load' : function() { + if ($('Create')) { // in horizontal UI variant + // Hide the Create button in the embedded volume creator + var f_content = get_contentWindow( $('volume_pane' ) ); + var original_btn = f_content.document.getElementById('Create'); + original_btn.hidden = true; + $('Create').setAttribute( + 'label', + $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.label') + ); + $('Create').setAttribute( + 'accesskey', + $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.accesskey') + ); + g.stash_and_close = function(p) { + // Wire up the method for the replacement button + f_content.g.stash_and_close(p); + } + } + } } ); diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul b/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul index fb22e328f4..99b1276983 100644 --- a/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul +++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_editor_horiz.xul @@ -28,6 +28,8 @@ + +