From: Jason Etheridge Date: Fri, 20 May 2011 07:55:37 +0000 (-0400) Subject: usability tweak, pull the Create button out of the embedded interfaces and into the... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=17e34e387def0e7239f852bb9b92a17e00e1731f;p=evergreen%2Fjoelewis.git 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 --- 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 @@ + +