Ignore:
Timestamp:
08/09/12 17:09:46 (13 years ago)
Author:
tjcschipper
Message:
  • Modifiers property on LineWithActions? and selectors is gone! Yay! Colour handling now happens through a combination of up to four CSS classes.

    "red/blue/orange/green/purple/etc": These do not do anything in themselves, they just mark a certain element as being of that colour.
    "inheritBgColor": Any element that has this class assigned will adjust its color to the color class of their parents. A 'div.blue' has no colour itself, but a 'div.inheritBgColor' within that div will turn blue. It also adjusts text colour to white.
    "bg": Any element with this property will also take on any colour class assigned to itself. This overrides 'inheritBgColor' if the element has both classes, so you could still make an orange button in a 'blue' container if you wanted. If the element itself does not have a colour class, it will stay transparent. This also adjusts text colour to white.
    "light": This class modifies the inherited/set colour to its lighter version (see RFT Design Sheet). For example, it can be used when placing a blue BlockButton? on an already blue LineWithActions?: adding the light class will differentiate the button from the background.

For examples of how to implement/derive more specific style rules using these classes, see rftButtons.css.

  • Changed all widgets still using the 'modifiers' to assign proper colour classes where necessary. (For instance, changed Selector.js to always set its main buttons to "light".)
Location:
Dev/branches/rest-dojo-ui/client/rft/ui
Files:
8 edited

Legend:

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

    r370 r396  
    1616                        baseClass: 'rftLineWithButtons',
    1717                        title: '',
    18                         modifiers: "blue",
    1918                        selectable: false,
    2019                        userObject: null,
     
    2827                                this.inherited(arguments);
    2928                                this._setupActions();
    30                                 domClass.add(this.domNode, this.modifiers);
     29                                domClass.add(this.domNode, "inheritBgColor bg");
    3130                                this.refresh();
    3231                        },
     
    3736                                                properties = lang.mixin({
    3837                                                        baseClass: 'rftBlockButton',
    39                                                         modifiers: this.modifiers,
     38                            "class": "inheritBgColor light",
    4039                                                        label: "Default",
    4140                                                        iconClass: 'rftIcon rftIcon'+this.actions[action].properties.icon,
     
    4746                            }, this.actions[action])
    4847                                                }, this.actions[action].properties);
    49                         properties["class"] = properties.modifiers;
    5048                        new Button(properties).placeAt(this.buttonsNode);
    5149                    } else {
    5250                        properties = lang.mixin({
    5351                            baseClass: 'rftInlineButton',
    54                             modifiers: 'black',
    5552                            label: "Default",
    5653                            showLabel: false,
     
    6360                            }, this.actions[action])
    6461                        }, this.actions[action].properties);
    65                         properties["class"] = properties.modifiers;
    6662                        new Button(properties).placeAt(this.buttonsNode);
    6763                    }
  • Dev/branches/rest-dojo-ui/client/rft/ui/ObjectBox.js

    r359 r396  
    1515            startup: function() {
    1616                this.line1 = new LineWithActionsWidget({
    17                     modifiers: 'green',
    1817                    actions: {
    1918                        "inspectIcon": {
     
    2120                            properties: {
    2221                                blockButton: false,
    23                                 modifiers: "white",
    2422                                icon: "Inspect"
    2523                            }
     
    2826                }).placeAt(this.line1Node);
    2927                this.line2 = new LineWithActionsWidget({
    30                     modifiers: 'green'
    3128                }).placeAt(this.line1Node);
    3229                var line3Actions = this._createLine3Actions();
    3330                this.line3 = new LineWithActionsWidget({
    34                     modifiers: 'green',
    3531                    actions: line3Actions
    3632                }).placeAt(this.line1Node);
     
    5046                            blockButton: true,
    5147                            label: action,
    52                             modifiers: "trans",
    5348                            icon: action.charAt(0).toUpperCase()+action.slice(1)
    5449                        }
     
    7671            }
    7772        });
    78     });
     73});
  • Dev/branches/rest-dojo-ui/client/rft/ui/Selector.js

    r370 r396  
    3131            templateString: templateString,
    3232            baseClass: 'rftSelector',
    33             modifiers: 'blue',
    3433
    3534            title: "",
     
    4746
    4847            startup: function() {
    49                 domClass.add(this.domNode, this.modifiers);
    5048                domClass.add(this.selectedColorNode, "pending");
    5149
     
    6967                            properties: {
    7068                                 blockButton: true,
    71                                  modifiers: this.modifiers,
    7269                                 label: action.title || actionName,
    7370                                 icon: action.icon,
     
    8178                this._titleLine = new LineWithActionsWidget({
    8279                    title: this.title,
    83                     modifiers: this.modifiers,
    8480                    actions: actions
    8581                },this.titleNode);
     
    8985                this._selectorLine = new LineWithActionsWidget({
    9086                    title: 'None',
    91                     modifiers: this.modifiers,
    9287                    actions: {
    9388                        "Toggle dropdown" : {
     
    9590                            properties: {
    9691                                blockButton: true,
    97                                 modifiers: this.modifiers,
    9892                                showLabel: false,
    9993                                icon: "HalfArrowDown"
     
    162156                                blockButton: false,
    163157                                showLabel: false,
    164                                 icon: action.icon,
     158                                icon: action.icon + " black",
    165159                                tooltip: action.description
    166160                            }
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/AccountListView.js

    r389 r396  
    3131                                                properties: {
    3232                                                        blockButton: false,
    33                                                         icon: "Delete",
    34                                                         modifiers: "white"
     33                                                        icon: "Delete"
    3534                                                }
    3635                                        }
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/CategoryListView.js

    r389 r396  
    3131                            properties: {
    3232                                blockButton: false,
    33                                 icon: "Delete",
    34                                 modifiers: "white"
     33                                icon: "Delete"
    3534                            }
    3635                        }
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/MultipleChoiceListView.js

    r389 r396  
    3131                            properties: {
    3232                                blockButton: false,
    33                                 icon: "Delete",
    34                                 modifiers: "white"
     33                                icon: "Delete"
    3534                            }
    3635                        }
  • Dev/branches/rest-dojo-ui/client/rft/ui/lists/QuestionListView.js

    r389 r396  
    3232                                blockButton: false,
    3333                                icon: "Delete",
    34                                 modifiers: "white",
    3534                                label: "Remove"
    3635                            }
     
    4140                                blockButton: false,
    4241                                icon: "Inspect",
    43                                 modifiers: "white",
    4442                                label: "Show info"
    4543                            }
  • Dev/branches/rest-dojo-ui/client/rft/ui/templates/SessionBar.html

    r350 r396  
    11<div class="${baseClass}">
    22    <span class="rftIcon rftIconSession" data-dojo-attach-point="iconNode"></span>
    3     <div data-dojo-type="rft.ui.LineWithActionsWidget" data-dojo-attach-point="upperNode" data-dojo-props="modifiers: 'green', actions: {'inspect':{callback: inspect, properties: {blockButton: true, modifiers: 'white'}}}"></div>
     3    <div data-dojo-type="rft.ui.LineWithActionsWidget" data-dojo-attach-point="upperNode" data-dojo-props="actions: {'inspect':{callback: inspect, properties: {blockButton: true}}}"></div>
    44    <div data-dojo-type="rft.ui.LineWithActionsWidget" data-dojo-attach-point="lowerNode"></div>
    55</div>
Note: See TracChangeset for help on using the changeset viewer.