Ignore:
Timestamp:
02/14/12 18:22:25 (13 years ago)
Author:
hendrikvanantwerpen
Message:
  • Clear LoginDialog? on show (in case of re-show).
  • Allow to link nodes/widgets to rft.ui.Page members with data-rft-attach-point attribute.
  • Allow arguments to a page to be passed with data-rft-props argument. Content loader rft.content sets this argument on the top node of a loaded page.
  • Have longer cookie-lifetime and update cookie when session is restored. Allow session restore in API and client code.
  • Moved startup Javascript to rft/run.js.
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         }
     1define(['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        });
    623    });
    7 });
Note: See TracChangeset for help on using the changeset viewer.