Ignore:
Timestamp:
07/18/12 17:07:48 (13 years ago)
Author:
jkraaijeveld
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/rest-dojo-ui/client/rft/pages/session.js

    r364 r365  
    33        'dojo/_base/event',
    44        'dojo/_base/Deferred',
     5    'dijit/form/FilteringSelect',
     6    'rft/elastic/ElasticReadStore',
    57        'rft/store',
    68        'rft/ui/_Page',
     
    810    'rft/ui/AccountListView'
    911    ],
    10         function(declare,lang,event,Deferred,store,_Page,content,AccountListView){
     12        function(declare,lang,event,Deferred,FilteringSelect,ElasticReadStore,store,_Page,content,AccountListView){
    1113                return declare('rft.pages.session',[_Page],{
    1214                        session: null,
     
    1921                        this._refresh();
    2022                                        }));
     23                    this._setupAutoComplete();
    2124                    this._setupListView();
    2225                                } else {
     
    3235            },
    3336            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', "");
    3639            },
    3740            onSave: function(evt) {
     
    5861                }).placeAt(this.listViewNode);
    5962                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();
    6084            }
     85
    6186
    6287                });
Note: See TracChangeset for help on using the changeset viewer.