Changeset 356


Ignore:
Timestamp:
07/12/12 12:48:00 (13 years ago)
Author:
tjcschipper
Message:
 
Location:
Dev/branches/rest-dojo-ui/client/rft/ui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/ui/LineWithActionsWidget.js

    r355 r356  
    4141                                                        iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
    4242                                                        title: action,
    43                                                         onClick: lang.hitch(this, function(e){
    44                                                                 lang.hitch(this, this.actions[action].callback )(e);
     43                                                        onClick: lang.hitch(this, dojo.partial(function(ac, e){
     44                                                                lang.hitch(this, this.actions[ac].callback )(e);
    4545                                                                event.stop(e);
    4646                                                                return false;
    47                                                         })
     47                                                        }, action))
    4848                                                }, this.actions[action].properties);
    49                                                 properties["class"] = properties.modifiers;
    50                                                 new Button(properties).placeAt(this.buttonsNode);
    51                                         } else {
    52                                                 properties = lang.mixin({
    53                                                         baseClass: 'rftInlineButton',
    54                                                         modifiers: 'black',
    55                                                         label: "Default",
    56                                                         showLabel: false,
    57                                                         iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
    58                                                         title: action,
    59                                                         onClick: lang.hitch(this, function(e){
    60                                                                 lang.hitch(this, this.actions[action].callback)(e);
    61                                                                 event.stop(e);
    62                                                                 return false;
    63                                                         })
    64                                                 }, this.actions[action].properties);
    65                                                 properties["class"] = properties.modifiers;
    66                                                 new Button(properties).placeAt(this.buttonsNode);
     49                                                        properties["class"] = properties.modifiers;
     50                                                        new Button(properties).placeAt(this.buttonsNode);
     51                                                } else {
     52                                                        properties = lang.mixin({
     53                                                                baseClass: 'rftInlineButton',
     54                                                                modifiers: 'black',
     55                                                                label: "Default",
     56                                                                showLabel: false,
     57                                                                iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
     58                                                                title: action,
     59                                                                onClick: lang.hitch(this, dojo.partial(function(ac, e){
     60                                                                        lang.hitch(this, this.actions[ac].callback)(e);
     61                                                                        event.stop(e);
     62                                                                        return false;
     63                                                                }, action))
     64                                                        }, this.actions[action].properties);
     65                                                        properties["class"] = properties.modifiers;
     66                                                        new Button(properties).placeAt(this.buttonsNode);
     67                                                }
    6768                                        }
     69                                },
     70                                refresh: function() {
     71                                        this.titleNode.innerHTML = this.title;
     72                                },
     73                                _onClick: function(e){
     74                                        var preventDefault = this.onClick(e) === false;
     75                                        if (preventDefault) {
     76                                                event.stop(e);
     77                                        }
     78                                        return !preventDefault;
     79                                },
     80                                onClick: function(e) {
     81                                },
     82                                _setTitleAttr: function(value){
     83                                        this.title = value;
     84                                        this.refresh();
    6885                                }
    69                         },
    70                         refresh: function() {
    71                                 this.titleNode.innerHTML = this.title;
    72                         },
    73                         _onClick: function(e){
    74                                 var preventDefault = this.onClick(e) === false;
    75                                 if (preventDefault) {
    76                                         event.stop(e);
    77                                 }
    78                                 return !preventDefault;
    79                         },
    80                         onClick: function(e) {
    81                         },
    82                         _setTitleAttr: function(value){
    83                                 this.title = value;
    84                                 this.refresh();
    85                         }
    86                 });
     86                        });
    8787});
  • Dev/branches/rest-dojo-ui/client/rft/ui/SurveyListView.js

    r355 r356  
    8888                                                actions: {
    8989                                                        "Remove" : {
    90                                                                 callback: lang.hitch(listView, function(){
    91                                                                         source.removeItem(evt);
     90                                                                callback: lang.hitch(listView, function(evt){
     91                                                                        this.removeItem(evt);
    9292                                                                }),
    9393                                                                properties: {
     
    151151                        },
    152152                        removeItem: function(evt){
    153 
     153                                debugger;
    154154                        }
    155155                });
Note: See TracChangeset for help on using the changeset viewer.