syntax
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 02:26:24 +0000 (02:26 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 21 Dec 2005 02:26:24 +0000 (02:26 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@2495 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/controller.js

index e6b9a9d..1dd8e71 100644 (file)
@@ -14,6 +14,8 @@ util.controller.prototype = {
 
        'init' : function (params) {
 
+               var obj = this;
+
                if (typeof params.control_map == 'undefined') throw('util.controller.init: No control_map');
 
                this.control_map = params.control_map;
@@ -34,7 +36,8 @@ util.controller.prototype = {
                                                        case 'on_command':
                                                                if (!this.window_knows_me_by) 
                                                                        throw('util.controller: on_command requires window_knows_me_by');
-                                                               cmd.setAttribute(ev_type, this.window_knows_me_by . ".cmds." i . "()"); 
+                                                               var s = obj.window_knows_me_by + ".cmds." + i + "()";
+                                                               cmd.setAttribute(ev_type, s);   
                                                        break;
                                                        default: cmd.addEventListener(ev_type,this.control_map[i][1],false);
                                                }