Changeset 369 for Dev/branches/rest-dojo-ui/client/rft/pages/session.js
- Timestamp:
- 07/20/12 11:54:11 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/pages/session.js
r367 r369 15 15 _listView: null, 16 16 _select: null, 17 _accounts: null, 17 18 onVisit: function() { 18 19 if ( this.pageArgs.uid ) { … … 20 21 .then(lang.hitch(this,function(obj){ 21 22 this.session = obj; 23 this._setupListView(); 22 24 this._refresh(); 23 25 })); 24 26 this._setupAutoComplete(); 25 this._ setupListView();27 this._accounts = []; 26 28 } else { 27 29 throw "No valid uid or session passed!"; … … 36 38 }, 37 39 onInvite: function() { 38 this._addAccount( { title : this._select.displayedValue });40 this._addAccount(this._select.item.i); 39 41 this._select.reset(); 40 42 }, 41 43 onSave: function(evt) { 42 44 lang.mixin(this.session,this.propertiesForm.get('value')); 45 this.session.accounts = this._accounts; 43 46 store.put(this.session) 44 47 .then(function(){ … … 55 58 }, 56 59 _addAccount: function(item) { 60 this._accounts.push(item); 57 61 this._listView.insertItem(item); 58 62 }, … … 61 65 controller: this 62 66 }).placeAt(this.listViewNode); 67 for (account in this.session.accounts) { 68 this._accounts.push(this.session.accounts[account]); 69 this._listView.insertItem({ "title" : this.session.accounts[account] }); 70 } 63 71 this._listView.startup(); 64 72 },
Note: See TracChangeset
for help on using the changeset viewer.