Changeset 333


Ignore:
Timestamp:
05/23/12 18:05:17 (13 years ago)
Author:
tjcschipper
Message:
  • Added rft.ui.InlineButton?, which is another preset like LargeButton? and BlockButton?. This time icon only and no label, made to fit into rftLineWithActions widgets. highlightColor: White/Black? allows for two different versions depending on icon background.
  • Make copies of rft/ui/LineWithActionsWidget and rft/ui/Selector, with -Thijs appended to the classnames. These are an attempt at integrating the newly created buttons in their intended contexts. The original classes and templates are untouched.
  • Changed LargeButton? and BlockButton? to be less hardcoded and just better.
Location:
Dev/branches/rest-dojo-ui/client
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/mockup.html

    r331 r333  
    4040                'rft/ui/QuestionWidget',
    4141                'rft/ui/Selector',
     42                'rft/ui/SelectorThijs',
     43                'rft/ui/LineWithActionsWidgetThijs',
    4244                'rft/ui/TitleGroup',
    4345                'rft/ui/LargeButton',
    4446                'rft/ui/BlockButton',
     47                'rft/ui/InlineButton',
    4548                'dojo/domReady!'
    4649            ],function(parser){
     
    8386                        <div title="Emotional, moral and relational attitudes" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="title:'Emotional, moral and relational attitudes'"></div>
    8487                        <div title="The professional as a participant" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="selected:true">
    85                             <div data-dojo-type="rft.ui.Selector" class="survey" data-dojo-props="title:'Intrinsic motivation'"></div>
    86                             <div data-dojo-type="rft.ui.Selector" class="survey" data-dojo-props="title:'Extrinsic motivation'"></div>
    87                             <div data-dojo-type="rft.ui.Selector" class="survey" data-dojo-props="title:'Motivation to participate'"></div>
    88                             <div data-dojo-type="rft.ui.Selector" class="survey" data-dojo-props="title:'Experience with games'"></div>
    89                             <div data-dojo-type="rft.ui.Selector" class="survey" data-dojo-props="title:'Participant context'"></div>
     88                            <div data-dojo-type="rft.ui.SelectorThijs" class="survey" data-dojo-props="title:'Intrinsic motivation'"></div>
     89                            <div data-dojo-type="rft.ui.SelectorThijs" class="survey" data-dojo-props="title:'Extrinsic motivation'"></div>
     90                            <div data-dojo-type="rft.ui.SelectorThijs" class="survey" data-dojo-props="title:'Motivation to participate'"></div>
     91                            <div data-dojo-type="rft.ui.SelectorThijs" class="survey" data-dojo-props="title:'Experience with games'"></div>
     92                            <div data-dojo-type="rft.ui.SelectorThijs" class="survey" data-dojo-props="title:'Participant context'"></div>
    9093                        </div>
    9194                        <div title="Declarative, procedural and stragegic knowledge" data-dojo-type="dijit.layout.ContentPane"></div>
     
    98101                        <div>Selected question is not yet in survey. These van be included in the survey.</div>
    99102                        <div>Selected question conflicts with an included question. You can only swap these.</div>
    100                         --BUTTON TESTS--
     103                       
    101104                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Save'">Save</button>
    102105                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Cancel'">Cancel</button>
    103                         <button data-dojo-type="rft.ui.BlockButton" data-dojo-props="highlightColor: 'Orange', iconType: null">Add to survey</button>
     106                        <button data-dojo-type="rft.ui.BlockButton" data-dojo-props="highlightColor: 'Orange', iconType: 'Accept'">Add to survey</button>
     107                        <button data-dojo-type="rft.ui.BlockButton" data-dojo-props="highlightColor: 'Orange', iconType: 'Cancel'">Cancel</button>
     108                        <button data-dojo-type="rft.ui.InlineButton" data-dojo-props="highlightColor: 'White', iconType: 'Help', label:'Help?'">Add to survey</button>
     109                        <button data-dojo-type="rft.ui.InlineButton" data-dojo-props="highlightColor: 'White', iconType: 'Inspect', label:'See more details'">Add to survey</button>
    104110                    </div>
    105111                </div>
     
    114120                    </div>
    115121                    <div data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'">
    116                         Nothing here! yet....
    117 
    118                         //sooooooon......
     122                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Settings'">Properties</button>
     123                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Preview'">Preview</button>
     124                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Undo'">Discard</button>
     125                        <button data-dojo-type="rft.ui.LargeButton" data-dojo-props="iconType: 'Accept'">Accept changes</button>
    119126
    120127                    </div>
  • Dev/branches/rest-dojo-ui/client/rft/ui/BlockButton.js

    r331 r333  
    77            showLabel: true,    // Or false? Documentation is retarded about this boolean... true = no label???
    88            highlightColor: 'blue', // Use the CSS class "highlightBlue" this adds to style active/hover transitions.
     9            baseClass: "rftBlockButton",
    910            postMixInProperties: function(){
    1011                if (this.iconType == "none" || this.iconType == null) {
     
    1718            postCreate: function(){
    1819                var capitalizedHighlightColor = this.highlightColor.charAt(0).toUpperCase() + this.highlightColor.slice(1);
    19                 domClass.add(this.domNode, "rftBlockButton highlight"+capitalizedHighlightColor);
     20                domClass.add(this.domNode, "highlight"+capitalizedHighlightColor);
    2021                this.inherited(arguments);
    2122            }
  • Dev/branches/rest-dojo-ui/client/rft/ui/LargeButton.js

    r331 r333  
    77            showLabel: true,    // Or false? Documentation is retarded about this boolean... true = no label???
    88            highlightColor: "blue", // Use the CSS class "highlightBlue" this adds to style active/hover transitions
     9            baseClass: "rftLargeButton",
    910            postMixInProperties: function(){
    1011                this.iconClass = "rftIcon rftIcon"+this.iconType;
     
    1314            postCreate: function(){
    1415                var capitalizedHighlightColor = this.highlightColor.charAt(0).toUpperCase() + this.highlightColor.slice(1);
    15                 domClass.add(this.domNode, "rftLargeButton highlight"+capitalizedHighlightColor);
     16                domClass.add(this.domNode, "highlight"+capitalizedHighlightColor);
    1617                this.inherited(arguments);
    1718            }
Note: See TracChangeset for help on using the changeset viewer.