Changeset 365 for Dev/branches/rest-dojo-ui/client/rft/pages/session.js
- Timestamp:
- 07/18/12 17:07:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/rest-dojo-ui/client/rft/pages/session.js
r364 r365 3 3 'dojo/_base/event', 4 4 'dojo/_base/Deferred', 5 'dijit/form/FilteringSelect', 6 'rft/elastic/ElasticReadStore', 5 7 'rft/store', 6 8 'rft/ui/_Page', … … 8 10 'rft/ui/AccountListView' 9 11 ], 10 function(declare,lang,event,Deferred, store,_Page,content,AccountListView){12 function(declare,lang,event,Deferred,FilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){ 11 13 return declare('rft.pages.session',[_Page],{ 12 14 session: null, … … 19 21 this._refresh(); 20 22 })); 23 this._setupAutoComplete(); 21 24 this._setupListView(); 22 25 } else { … … 32 35 }, 33 36 onInvite: function() { 34 this._addAccount({ title : this. emailBox.get('value') });35 this. emailBox.set('value', "");37 this._addAccount({ title : this.accountBox.get('value') }); 38 this.accountBox.set('value', ""); 36 39 }, 37 40 onSave: function(evt) { … … 58 61 }).placeAt(this.listViewNode); 59 62 this.listView.startup(); 63 }, 64 _setupAutoComplete: function() { 65 66 var accountStore = new ElasticReadStore({ 67 url: "http://localhost:9200/rft/_search", 68 requestMethod: "POST" 69 }); 70 var accountText = new FilteringSelect({ 71 name: "accountBox", 72 store: accountStore, 73 autoComplete: false, 74 required: true, 75 labelType: "text", 76 placeHolder: "Enter email address here...", 77 pageSize: 10, 78 hasDownArrow: false, 79 style: "width: 400", 80 searchAttr: "title", 81 id: "accountText" 82 }, "accountBox"); 83 accountText.startup(); 60 84 } 85 61 86 62 87 });
Note: See TracChangeset
for help on using the changeset viewer.