Changeset 364


Ignore:
Timestamp:
07/17/12 16:49:30 (13 years ago)
Author:
jkraaijeveld
Message:

Since lists where common, created a ListView? base class with basic functionality. For the session editor, created a AccountListView? which only has the created method declared and derives everything else from ListView?.

Location:
Dev/branches/rest-dojo-ui/client/rft
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/css/layout.css

    r358 r364  
    484484    overflow: hidden;
    485485}
     486
     487/* Generic list with lines */
     488.claro .rftLineListView {
     489    width: 400px;
     490    max-height: 500px;
     491}
     492.claro .rftLineListView .rftLineListViewContent {
     493    max-width: 400px;
     494    overflow: auto;
     495}
  • Dev/branches/rest-dojo-ui/client/rft/pages/session.html

    r359 r364  
    2727                        <fieldset class="align">
    2828                            <label for="accountsInput">Add new</label>
    29                             <input type="text" data-dojo-type="dijit.form.TextBox" data-dojo-props="placeHolder: 'Enter email address here...'" />
    30                             <button data-dojo-type="dijit.form.Button" data-dojo-props="baseClass: 'rftBlockButton', class: 'green', iconClass: 'rftIcon rftIconPlus'">Invite</button>
     29                            <input type="text" data-rft-attach-point="emailBox" data-dojo-type="dijit.form.TextBox" data-dojo-props="placeHolder: 'Enter email address here...'" />
     30                            <button data-rft-attach-point="btnInvite" data-dojo-type="dijit.form.Button" data-rft-attach-event="onClick:onInvite" data-dojo-props="baseClass: 'rftBlockButton', class: 'green', iconClass: 'rftIcon rftIconPlus'">Invite</button>
    3131                            <br/><br/>
     32                           
     33                            <div data-rft-attach-point="listViewNode" class="rftLineListView">
     34                            </div>
     35                            <!--
    3236                            <div data-dojo-type="rft.ui.List" data-dojo-props="region:'center'" style="width: 500px;">
    3337                                <div data-dojo-type="rft.ui.LineWithActionsWidget" data-dojo-props="title:'a.bezuijen@tudelft.nl', modifiers: 'green', actions: {'Cancel':{callback: function(){}, properties: {blockButton: false, icon: 'Delete', modifiers:'white'}}}"></div>
    3438                                <div data-dojo-type="rft.ui.LineWithActionsWidget" data-dojo-props="title:'i.mayer@tudelft.nl', modifiers: 'green', actions: {'Cancel':{callback: function(){}, properties: {blockButton: false, icon: 'Delete', modifiers:'white'}}}"></div>
    3539                            </div>
     40                            -->
    3641                        </fieldset>
    3742
  • Dev/branches/rest-dojo-ui/client/rft/pages/session.js

    r359 r364  
    55        'rft/store',
    66        'rft/ui/_Page',
    7         'rft/content'],
    8         function(declare,lang,event,Deferred,store,_Page,content){
     7        'rft/content',
     8    'rft/ui/AccountListView'
     9    ],
     10        function(declare,lang,event,Deferred,store,_Page,content,AccountListView){
    911                return declare('rft.pages.session',[_Page],{
    1012                        session: null,
     13                        listView: null,
    1114                        onVisit: function() {
    1215                                if ( this.pageArgs.uid ) {
     
    1619                        this._refresh();
    1720                                        }));
     21                    this._setupListView();
    1822                                } else {
    19                                         throw "No valid uid or survey passed!";
     23                                        throw "No valid uid or session passed!";
    2024                                }
    2125                        },
     
    2630                this.titleNode.innerHTML = this.session.title || '';
    2731                this.propertiesForm.set('value',this.session);
     32            },
     33            onInvite: function() {
     34                this._addAccount({ title : this.emailBox.get('value') });
     35                this.emailBox.set('value', "");
    2836            },
    2937            onSave: function(evt) {
     
    4149                content.goTo('sessions');
    4250                return false;
     51            },
     52            _addAccount: function(item) {
     53                this.listView.insertItem(item);
     54            },
     55            _setupListView: function() {
     56                this.listView = new AccountListView( {
     57                    controller: this
     58                }).placeAt(this.listViewNode);
     59                this.listView.startup();
    4360            }
     61
    4462                });
    4563});
  • Dev/branches/rest-dojo-ui/client/rft/ui/Selector.js

    r362 r364  
    1212    './LineWithActionsWidget',
    1313    'dojo/text!./templates/Selector.html',
    14     'dojo/dom-class'
     14    'dojo/dom-class',
    1515    ],function(
    1616        declare,
     
    102102                }
    103103            },
     104
    104105            onToggle: function(evt) {
    105106                if (this._folded) {
Note: See TracChangeset for help on using the changeset viewer.