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".)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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                            }
Note: See TracChangeset for help on using the changeset viewer.