Yoji SHIDARA
null+****@clear*****
Thu Sep 20 16:44:33 JST 2012
Yoji SHIDARA 2012-09-20 16:44:33 +0900 (Thu, 20 Sep 2012) New Revision: 3e6b6ce2be15af3c52d3a05341cfdb6546b5e74f https://github.com/groonga/gcs/commit/3e6b6ce2be15af3c52d3a05341cfdb6546b5e74f Log: Extract search conditions out of content Modified files: public/js/gcs.js Modified: public/js/gcs.js (+9 -6) =================================================================== --- public/js/gcs.js 2012-09-20 16:05:50 +0900 (d9358e7) +++ public/js/gcs.js 2012-09-20 16:44:33 +0900 (ee6b342) @@ -19,7 +19,10 @@ App.DomainSelectorView = Ember.View.extend({ }); App.SearchController = Ember.ObjectController.extend({ - content: {query: null, perPage: 5, start: 0}, + content: null, + query: null, + perPage: 5, + start: 0, urlForRawRequest: function() { var domain = App.currentDomain; var searchEndpoint = 'http://' + domain.endpoint + '/2011-02-01/search'; @@ -29,21 +32,21 @@ App.SearchController = Ember.ObjectController.extend({ }.property('paramsForRequest'), paramsForRequest: function() { var domain = App.currentDomain; - var query = this.get('content.query'); - var start = this.get('content.start'); + var query = this.get('query'); + var start = this.get('start'); var params = { q: query, - size: this.get('content.perPage'), + size: this.get('perPage'), start: start, 'return-fields': domain.fieldNames ? domain.fieldNames.join(',') : [] }; return params; - }.property('content.query', 'content.perPage', 'content.start', 'App.currentDomain'), + }.property('query', 'perPage', 'start', 'App.currentDomain'), executeSearch: function(query) { var domain = App.currentDomain; var searchEndpoint = 'http://' + domain.endpoint + '/2011-02-01/search'; - var perPage = this.get('content.perPage'); + var perPage = this.get('perPage'); var params = this.get('paramsForRequest'); $.ajax({ type: 'GET', -------------- next part -------------- HTML����������������������������... Descargar