Ignore:
Timestamp:
09/05/12 14:41:13 (13 years ago)
Author:
hendrikvanantwerpen
Message:

Added build infrastructure and reorganised code to match it.

Page navigation is now done by the rft/app/Controller class. pages
inherit generally from rft/app/Page, which is a BorderContainer?. The
Page uses normal widget mechanism like templateString, all data-rft-*
are obsolete, use normal data-dojo-* options again in templates.
This is done so the pages of the app can be included in the build.
URLs are linked to pages through registration, which is done in
run.js. The routes are defined in the routes.js file. Page class names
and URLs are now independent.

Reduced includes in index.html to one CSS file and two JS files. Dojo
stylesheets are now included thorugh externals.css.

Dojo 1.8 doesn't require the dotted names in declares anymore. All these
are now removed (redundant with module path and JS filename anyway)
and in templates a module id is used, so iso 'dijit.form.Form' use
'dijit/form/Form' now. This is more consistent with requires in the JS
code and they are picked up by the build system.

Removed any old-style dojo.<function> code and use loaded modules
everywhere.

Lots of whitespace unification.

Location:
Dev/branches/rest-dojo-ui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui

    • Property svn:ignore
      •  

        old new  
        11nbproject
        22.project
         3release
  • Dev/branches/rest-dojo-ui/client

    • Property svn:externals
      •  

        old new  
        1 dojotoolkit http://svn.dojotoolkit.org/src/tags/release-1.8.0
         1dojo http://svn.dojotoolkit.org/src/tags/release-1.8.0/dojo
         2dijit http://svn.dojotoolkit.org/src/tags/release-1.8.0/dijit
         3dojox http://svn.dojotoolkit.org/src/tags/release-1.8.0/dojox
         4util http://svn.dojotoolkit.org/src/tags/release-1.8.0/util
  • Dev/branches/rest-dojo-ui/client/rft/ui/Breadcrumbs.js

    r406 r407  
    55    'dojo/dom-class',
    66    'dojo/topic',
    7     'dijit/_WidgetBase'
    8 ], function(declare, baseArray, Button, domClass, topic, _WidgetBase){
    9     return declare('rft.ui.Breadcrumbs', [_WidgetBase], {
     7    'dijit/_WidgetBase',
     8    '../app/Controller'
     9], function(declare, baseArray, Button, domClass, topic, _WidgetBase,Controller){
     10    return declare([_WidgetBase], {
    1011        _crumbs: [],
    1112       
     
    1415        },
    1516        _getIndexOf: function(label) {
    16             dojo.forEach(this._crumbs, function(crumb, index){
    17                 if (crumb.label == label) {
     17            baseArray.forEach(this._crumbs, function(crumb, index){
     18                if (crumb.label === label) {
    1819                    return index;
    1920                }
     
    3132            var removals = this._crumbs.slice(index+1);
    3233            this._crumbs = this._crumbs.slice(0, index+1);
    33             dojo.forEach(removals, function(removal){
     34            baseArray.forEach(removals, function(removal){
    3435                removal.widget.destroyRecursive(false); // boolean "keepDOMnode"
    3536            }, this);
     
    6061                iconClass: "dijitNoIcon",
    6162                onClick: lang.hitch(this, function(){
    62                     rft.api.loadPage(path);  // TODO: fix this call!
     63                    Controller.go(path);  // TODO: fix this call!
    6364                })
    6465            });
    6566        },
    6667        _createBreadcrumbs: function() {
    67             dojo.forEach(this._crumbs, function(crumb, index){
     68            baseArray.forEach(this._crumbs, function(crumb, index){
    6869                if (!crumb.widget) {
    6970                    crumb.widget = this._createBreadcrumb(crumb.label, crumb.path);
Note: See TracChangeset for help on using the changeset viewer.