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