couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From garrensmith <...@git.apache.org>
Subject [GitHub] couchdb-fauxton pull request: Part 2/2 for Mango:
Date Wed, 08 Apr 2015 10:28:02 GMT
Github user garrensmith commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/362#discussion_r27958293
  
    --- Diff: app/addons/documents/index-results/actions.js ---
    @@ -71,7 +71,49 @@ function (app, FauxtonAPI, ActionTypes, Stores, HeaderStores, HeaderActions,
Doc
           });
         },
     
    +    newMangoResultsList: function (options) {
    +      FauxtonAPI.dispatch({
    +        type: ActionTypes.INDEX_RESULTS_NEW_RESULTS,
    +        options: options
    +      });
    +    },
    +
    +    runMangoFindQuery: function (options) {
    +      var query = JSON.parse(options.queryCode),
    +          collection = indexResultsStore.getCollection();
    +
    +      this.clearResults();
    +
    +      return collection
    +        .runQuery(options.queryCode)
    +        .then(function () {
    +          this.resultsListReset();
    +          this.newMangoResultsList({
    +            collection: collection,
    +            isListDeletable: indexResultsStore.isListDeletable(),
    +            query: options.queryCode,
    +            typeOfIndex: 'mango',
    +            textEmptyIndex: 'No Results Found!',
    +            bulkCollection: Documents.BulkDeleteDocCollection
    +          });
    +        }.bind(this), function (res) {
    +          FauxtonAPI.addNotification({
    +            msg: res.reason,
    +            clear:  true,
    +            type: 'error'
    +          });
    +
    +          this.resultsListReset();
    +        }.bind(this));
    +    },
    +
         reloadResultsList: function () {
    +      if (indexResultsStore.getTypeOfIndex() === 'mango') {
    +        return this.runMangoFindQuery({
    --- End diff --
    
    Maybe split this into its own method called `reloadMangoResultsList`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message