Changeset 6047
- Timestamp:
- 04/12/10 19:38:25 (3 years ago)
- Location:
- luci2/cbi2/htdocs
- Files:
-
- 1 added
- 2 modified
-
index.html (added)
-
nyu2.js (modified) (1 diff)
-
nyu2/widget.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
luci2/cbi2/htdocs/nyu2.js
r6037 r6047 56 56 dhtmlHistory.addListener(load); //On history change, call 'load' function 57 57 }); 58 59 60 nyu2_fon_require(new Array("cbi2rpc", "validator", "widget"),61 function() {62 var rpcProxy = new CBI2Proxy("luci2/json");63 rpcProxy.invoke({"method": "dispatchTree"}, nyu2_init_tree);64 });65 66 function nyu2_init_tree(object) {67 nyu2_tree = object;68 } -
luci2/cbi2/htdocs/nyu2/widget.js
r6038 r6047 85 85 86 86 widgets.depend = Class.create(Widget, { 87 isContainer: true, 88 isNamespace: true, 89 87 90 initialize: function($super, parent, name, options) { 88 91 $super(parent, name, options); … … 118 121 } 119 122 this.active = !this.active; 123 this.namespace.node.fire("nyu2:updated"); 120 124 }, 121 125 … … 134 138 var self = this; 135 139 b.on("submit", function() { self.submit(); }); 140 this.node.on("change", function() { this.fire("nyu2:updated"); }); 136 141 }, 137 142 … … 189 194 }); 190 195 196 widgets.menu = Class.create(Widget, { 197 isNamespace: true, 198 199 initialize: function($super, parent, name, options) { 200 $super(parent, name, options); 201 this.header.update(options.caption); 202 } 203 }); 204 205 widgets.entry = Class.create(Widget, { 206 initialize: function($super, parent, name, options) { 207 $super(parent, name, options); 208 this.body.update(options.caption); 209 this.node.on("click", 210 function() { this.fire("nyu2:navigate", options.page); }); 211 } 212 }); 213 191 214 nyu2_notify_loaded("widget");
