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:
11 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/lists/AccountListView.js

    r406 r407  
    1212    OrderedList
    1313) {
    14     return declare('rft.ui.lists.AccountListView',[OrderedList],{
     14    return declare([OrderedList],{
    1515        baseClass: 'rftAccountListView',
    1616        type: 'account',
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/CategoryListView.js

    r396 r407  
    33    'dojo/_base/lang',
    44    '../LineWithActionsWidget',
    5     './List',
    6     ],function(
    7         declare,
    8         lang,
    9         LineWithActionsWidget,
    10         List
    11         ) {
    12         return declare('rft.ui.lists.CategoryListView',[List],{
    13             baseClass: 'rftLineListView',
     5    './List'
     6],function(
     7    declare,
     8    lang,
     9    LineWithActionsWidget,
     10    List
     11) {
     12    return declare([List],{
     13        baseClass: 'rftLineListView',
    1414
    15             _createAvatarNode: function(item) {
    16                 var node = document.createElement("div");
    17                 node.className = "dragAvatar";
    18                 node.innerHTML = item.title;
    19                 return node;
    20             },
     15        _createAvatarNode: function(item) {
     16            var node = document.createElement("div");
     17            node.className = "dragAvatar";
     18            node.innerHTML = item.title;
     19            return node;
     20        },
    2121
    22             _createListNode: function(item) {
    23                 var w = new LineWithActionsWidget({
    24                     title: item,
    25                     'class': "orange",
    26                     actions: {
    27                         "Remove" : {
    28                             callback: lang.hitch(this, function() {
    29                                 this.removeItem(item, w);
    30                             }),
    31                             properties: {
    32                                 blockButton: false,
    33                                 icon: "Delete"
    34                             }
     22        _createListNode: function(item) {
     23            var w = new LineWithActionsWidget({
     24                title: item,
     25                'class': "orange",
     26                actions: {
     27                    "Remove" : {
     28                        callback: lang.hitch(this, function() {
     29                            this.removeItem(item, w);
     30                        }),
     31                        properties: {
     32                            blockButton: false,
     33                            icon: "Delete"
    3534                        }
    3635                    }
    37                 });
    38                 w.startup();
    39                 return w.domNode;
    40             }
     36                }
     37            });
     38            w.startup();
     39            return w.domNode;
     40        }
    4141
    42         });
    4342    });
     43});
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/List.js

    r405 r407  
    1919    BorderContainer,
    2020    templateString){
    21     return declare('rft.ui.lists.List',[BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{
     21    return declare([BorderContainer,_TemplatedMixin,_WidgetsInTemplateMixin],{
    2222        templateString: templateString,
    2323        baseClass: 'rftList',
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/MultipleChoiceListView.js

    r406 r407  
    1212    OrderedList
    1313    ) {
    14     return declare('rft.ui.lists.MultipleChoiceListView',[OrderedList],{
     14    return declare([OrderedList],{
    1515        baseClass: 'rftMultipleChoiceListView',
    1616        type: 'multipleChoiceOption',
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/OrderedList.js

    r405 r407  
    1212        templateString
    1313        ){
    14         return declare('rft.ui.lists.OrderedList',[List],{
     14        return declare([List],{
    1515            templateString: templateString,
    1616            baseClass: 'rftLineListView',
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/QuestionListView.js

    r406 r407  
    1212    OrderedList
    1313){
    14     return declare('rft.ui.lists.QuestionListView',[OrderedList],{
     14    return declare([OrderedList],{
    1515        baseClass: 'rftSurveyListView',
    1616        type: 'question',
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/_EditableListMixin.js

    r404 r407  
    44    'dijit/registry'
    55],function(declare,lang,registry){
    6     return declare('rft.ui.lists._EditableListMixin',null,{
     6    return declare(null,{
    77        getItems: function() {
    88            return this.source.getAllNodes()
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/List.html

    r389 r407  
    11<div>
    2         <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
     2        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">
    33                <h3 data-dojo-attach-point="titleNode"></h3>
    44        </div>
    5         <div data-dojo-type="dijit.layout.ContentPane"
     5        <div data-dojo-type="dijit/layout/ContentPane"
    66             data-dojo-props="region: 'center'"
    77             data-dojo-attach-point="sourceNode"
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/templates/OrderedList.html

    r389 r407  
    11<div>
    2         <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'top'">
     2        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'">
    33                <h3 data-dojo-attach-point="titleNode"></h3>
    44        </div>
    5         <div data-dojo-type="dijit.layout.ContentPane"
     5        <div data-dojo-type="dijit/layout/ContentPane"
    66             data-dojo-props="region: 'center'"
    77             data-dojo-attach-point="sourceNode"
    88             class="${baseClass}Content">
    99        </div>
    10         <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region: 'bottom'" data-dojo-attach-point="buttonsNode">
     10        <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'bottom'" data-dojo-attach-point="buttonsNode">
    1111                    <span>Move selected: </span>
    1212                    <button data-dojo-attach-point="btnListMoveUp" ></button>
Note: See TracChangeset for help on using the changeset viewer.