Changeset 260 for Dev/branches/rest-dojo-ui/client/rft/ui/Page.js
- Timestamp:
- 02/14/12 18:22:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/ui/Page.js
r257 r260 1 define(['dojo/_base/declare','dijit/_WidgetBase','dijit/_Container'], 2 function(declare,_WidgetBase,_Container){ 3 return declare('rft.ui.Page',[_WidgetBase,_Container],{ 4 init: function(args){ 5 } 1 define(['dojo/_base/declare','dojo/query','dojo/_base/json','dojo/dom-attr','dojo/_base/lang','dijit/registry','dijit/_WidgetBase','dijit/_Container'], 2 function(declare,query,json,attr,lang,registry,_WidgetBase,_Container){ 3 return declare('rft.ui.Page',[_WidgetBase,_Container],{ 4 postCreate: function() { 5 this.inherited(arguments); 6 this.args = {}; 7 var props = attr.get(this.domNode,'data-rft-props'); 8 if ( props ) { 9 props = json.fromJson.call(this,'{'+props+'}'); 10 lang.mixin(this.args,props); 11 } 12 }, 13 startup: function() { 14 this.inherited(arguments); 15 query('[data-rft-attach-point]').forEach(lang.hitch(this,function(node){ 16 var name = attr.get(node,'data-rft-attach-point'); 17 this[name] = registry.byNode(node) || node; 18 })); 19 this.init(); 20 }, 21 init: function(){} 22 }); 6 23 }); 7 });
Note: See TracChangeset
for help on using the changeset viewer.