Ignore:
Timestamp:
03/13/13 17:07:58 (12 years ago)
Author:
hendrikvanantwerpen
Message:

Added grunt tasks and code cleanup.

Added grunt for less and jshint procesing.
Cleanup of code to pass jshint (one bug found :).

Location:
Dev/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk

    • Property svn:ignore
      •  

        old new  
        11data
        22nbproject
         3node_modules
  • Dev/trunk/client

    • Property svn:externals
      •  

        old new  
        1 dojo http://svn.dojotoolkit.org/src/tags/release-1.8.0/dojo
        2 dijit http://svn.dojotoolkit.org/src/tags/release-1.8.0/dijit
        3 dojox http://svn.dojotoolkit.org/src/tags/release-1.8.0/dojox
        4 util http://svn.dojotoolkit.org/src/tags/release-1.8.0/util
         1dojo http://svn.dojotoolkit.org/src/tags/release-1.8.3/dojo
         2dijit http://svn.dojotoolkit.org/src/tags/release-1.8.3/dijit
         3dojox http://svn.dojotoolkit.org/src/tags/release-1.8.3/dojox
         4util http://svn.dojotoolkit.org/src/tags/release-1.8.3/util
  • Dev/trunk/client/qed/widgets/list/List.js

    r420 r426  
    5252            };
    5353        },
    54         _createListNode: function(item) {},
    55         _createAvatarNode: function(item) {},
     54        _createListNode: function(/*item*/) {},
     55        _createAvatarNode: function(/*item*/) {},
    5656
    5757        appendItem: function(item) {
     
    8686            .forEach(lang.hitch(this,function(node){
    8787                registry.byNode(node).destroyRecursive();
    88                 this.removeCallback && this.removeCallback(item);
     88                if ( this.removeCallback ) { this.removeCallback(item); }
    8989            }));
    9090            this.source.sync();
  • Dev/trunk/client/qed/widgets/list/OrderedList.js

    r407 r426  
    55    './List',
    66    'dojo/text!./templates/OrderedList.html'
    7     ],function(
    8         declare,
    9         lang,
    10         Button,
    11         List,
    12         templateString
    13         ){
    14         return declare([List],{
    15             templateString: templateString,
    16             baseClass: 'rftLineListView',
     7],function(
     8    declare,
     9    lang,
     10    Button,
     11    List,
     12    templateString
     13    ){
     14    return declare([List],{
     15        templateString: templateString,
     16        baseClass: 'rftLineListView',
    1717
    18             startup: function() {
    19                 if ( this._started ){ return; }
    20                 this.inherited(arguments);
     18        startup: function() {
     19            if ( this._started ){ return; }
     20            this.inherited(arguments);
    2121
    22                 new Button({
    23                     label: "Move up",
    24                     showLabel: false,
    25                     iconClass: "rftIcon rftIconFullArrowUp",
    26                     baseClass: "rftBlockButton",
    27                     'class': "trans",
    28                     onClick: lang.hitch(this, function() {
    29                         this._moveSelectedItem("up");
    30                     })
    31                 }, this.btnListMoveUp).startup();
     22            new Button({
     23                label: "Move up",
     24                showLabel: false,
     25                iconClass: "rftIcon rftIconFullArrowUp",
     26                baseClass: "rftBlockButton",
     27                'class': "trans",
     28                onClick: lang.hitch(this, function() {
     29                    this._moveSelectedItem("up");
     30                })
     31            }, this.btnListMoveUp).startup();
    3232
    33                 new Button({
    34                     label: "Move down",
    35                     showLabel: false,
    36                     iconClass: "rftIcon rftIconFullArrowDown",
    37                     baseClass: "rftBlockButton",
    38                     'class': "trans",
    39                     onClick: lang.hitch(this, function() {
    40                         this._moveSelectedItem("down");
    41                     })
    42                 }, this.btnListMoveDown).startup();
    43             },
     33            new Button({
     34                label: "Move down",
     35                showLabel: false,
     36                iconClass: "rftIcon rftIconFullArrowDown",
     37                baseClass: "rftBlockButton",
     38                'class': "trans",
     39                onClick: lang.hitch(this, function() {
     40                    this._moveSelectedItem("down");
     41                })
     42            }, this.btnListMoveDown).startup();
     43        },
    4444
    45             _moveSelectedItem: function(dir) {
    46                 var node = this.source.getSelectedNodes()[0];
    47                 if (node) {
    48                     if (dir === "up") {
    49                         if (node.previousSibling) {
    50                             return node.parentNode.insertBefore(node, node.previousSibling);
    51                         } else {
    52                             return false;
    53                         }
     45        _moveSelectedItem: function(dir) {
     46            var node = this.source.getSelectedNodes()[0];
     47            if (node) {
     48                if (dir === "up") {
     49                    if (node.previousSibling) {
     50                        return node.parentNode.insertBefore(node, node.previousSibling);
     51                    } else {
     52                        return false;
     53                    }
    5454
    55                     } else if (dir === "down") {
    56                         if (node.nextSibling) {
    57                             return node.parentNode.insertBefore(node.nextSibling, node);
    58                         } else {
    59                             return false;
    60                         }
     55                } else if (dir === "down") {
     56                    if (node.nextSibling) {
     57                        return node.parentNode.insertBefore(node.nextSibling, node);
    6158                    } else {
    62                         throw "Invalid move direction passed!";
     59                        return false;
    6360                    }
    6461                } else {
    65                     return false;
     62                    throw "Invalid move direction passed!";
    6663                }
    67             },
     64            } else {
     65                return false;
     66            }
     67        },
    6868
    69             insertItem: function(item) {
    70                 var anchor = this.source.getSelectedNodes()[0];
    71                 if (anchor) {
    72                     this.source.insertNodes(false,[item], false, anchor);
    73                 } else {
    74                     this.appendItem(item);
    75                 }
     69        insertItem: function(item) {
     70            var anchor = this.source.getSelectedNodes()[0];
     71            if (anchor) {
     72                this.source.insertNodes(false,[item], false, anchor);
     73            } else {
     74                this.appendItem(item);
    7675            }
     76        }
    7777
    78         });
    7978    });
     79});
  • Dev/trunk/client/qed/widgets/list/_EditableListMixin.js

    r407 r426  
    99            .map(function(node){
    1010                var value = registry.byId(node.id).get('value');
    11                 this.source.setItem(node.id, value)
     11                this.source.setItem(node.id, value);
    1212                return value;
    1313            },this);
Note: See TracChangeset for help on using the changeset viewer.