]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/xul/staff_client/server/main/menu.js
new window test
[working/Evergreen.git] / Open-ILS / xul / staff_client / server / main / menu.js
1 dump('entering main/menu.js\n');
2
3 if (typeof main == 'undefined') main = {};
4 main.menu = function () {
5
6         JSAN.use('util.error'); this.error = new util.error();
7         JSAN.use('main.window'); this.window = new main.window();
8
9         this.w = window;
10 }
11
12 main.menu.prototype = {
13
14         'init' : function() {
15
16                 var obj = this;
17
18                 var cmd_close_window = this.w.document.getElementById('cmd_close_window');
19                         if (cmd_close_window) 
20                                 cmd_close_window.addEventListener('command', function() { obj.w.close(); }, false);
21                         
22                 var cmd_new_window = this.w.document.getElementById('cmd_new_window');
23                         if (cmd_new_window)
24                                 cmd_new_window.addEventListener('command', 
25                                         function() { obj.window.open('/xul/server/main/menu_frame.xul','test' + obj.window.appshell_name_increment++ ,'chrome'); },
26                                         false );
27
28                 var cmd_broken = this.w.document.getElementById('cmd_broken');
29                         if (cmd_broken)
30                                 cmd_broken.addEventListener('command', function() { alert('Not Yet Implemented'); }, false);
31                 
32         },
33
34         'close_tab' : function (t_idx) {
35         }
36
37 }
38
39 dump('exiting main/menu.js\n');