From 3cfe2a895d02314901aacc03faa38c3af35ff06f Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 4 Nov 2005 16:19:11 +0000 Subject: [PATCH] commands were broken. Added a commandset to the first overlay, and changed observes into command git-svn-id: svn://svn.open-ils.org/ILS/trunk@1952 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/main/menu.js | 20 ++-- .../staff_client/server/main/menu_frame.xul | 6 +- .../server/main/menu_frame_menus.xul | 98 ++++++++++--------- .../server/main/menu_frame_overlay.xul | 1 + 4 files changed, 59 insertions(+), 66 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/main/menu.js b/Open-ILS/xul/staff_client/server/main/menu.js index 3d7cca8ce3..85b0cee94c 100644 --- a/Open-ILS/xul/staff_client/server/main/menu.js +++ b/Open-ILS/xul/staff_client/server/main/menu.js @@ -4,8 +4,8 @@ if (typeof main == 'undefined') main = {}; main.menu = function () { JSAN.use('util.error'); this.error = new util.error(); - this.error.sdump('D_ERROR',window); + this.w = window; } main.menu.prototype = { @@ -14,23 +14,15 @@ main.menu.prototype = { var obj = this; - var cmd_close_window = window.document.getElementById('cmd_close_window'); - if (cmd_close_window) { - this.error.sdump('D_TRACE', 'cmd_close_window = ' + cmd_close_window ); - cmd_close_window.addEventListener('command', function() { dump('hiccup\n'); alert('help'); window.close(); }, false); - } + var cmd_close_window = this.w.document.getElementById('cmd_close_window'); + if (cmd_close_window) + cmd_close_window.addEventListener('command', function() { obj.w.close(); }, false); - var test_button = window.document.getElementById('cmd_test_button'); - if (test_button) { - this.error.sdump('D_TRACE', 'test_button = ' + test_button ); - test_button.addEventListener('command', function() { dump('hiccup\n'); alert('help'); window.close(); }, false); - } - - var cmd_new_window = window.document.getElementById('cmd_new_window'); + var cmd_new_window = this.w.document.getElementById('cmd_new_window'); if (cmd_new_window) cmd_new_window.addEventListener('command', function() { alert('Not Yet Implemented'); }, false); - var cmd_broken = window.document.getElementById('cmd_broken'); + var cmd_broken = this.w.document.getElementById('cmd_broken'); if (cmd_broken) cmd_broken.addEventListener('command', function() { alert('Not Yet Implemented'); }, false); diff --git a/Open-ILS/xul/staff_client/server/main/menu_frame.xul b/Open-ILS/xul/staff_client/server/main/menu_frame.xul index 52edb1c959..8aa97337c0 100644 --- a/Open-ILS/xul/staff_client/server/main/menu_frame.xul +++ b/Open-ILS/xul/staff_client/server/main/menu_frame.xul @@ -53,9 +53,7 @@ ]]> - - - + @@ -66,7 +64,5 @@ -