You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by de...@apache.org on 2014/08/19 19:47:42 UTC

fauxton commit: updated refs/heads/secondary-indexes to fb4fc10

Repository: couchdb-fauxton
Updated Branches:
  refs/heads/secondary-indexes e13fabf7a -> fb4fc1083


removed Preview from the indexes since it's borked


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/fb4fc108
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/fb4fc108
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/fb4fc108

Branch: refs/heads/secondary-indexes
Commit: fb4fc10836df076c28007e61d9ef2fa6be59dde4
Parents: e13fabf
Author: deathbearbrown <de...@gmail.com>
Authored: Tue Aug 19 13:47:36 2014 -0400
Committer: deathbearbrown <de...@gmail.com>
Committed: Tue Aug 19 13:47:36 2014 -0400

----------------------------------------------------------------------
 app/addons/indexes/views.js | 42 ----------------------------------------
 app/core/api.js             |  1 -
 2 files changed, 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fb4fc108/app/addons/indexes/views.js
----------------------------------------------------------------------
diff --git a/app/addons/indexes/views.js b/app/addons/indexes/views.js
index 421495f..f621e4b 100644
--- a/app/addons/indexes/views.js
+++ b/app/addons/indexes/views.js
@@ -107,48 +107,6 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
 
        FauxtonAPI.navigate(fragment, {trigger: false});
        FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: this.ddocID, view: this.viewName});
-    },
-
-
-    previewView: function(event, paramsInfo) {
-      event.preventDefault();
-      var that = this,
-      mapVal = this.mapVal(),
-      reduceVal = this.reduceVal(),
-      paramsArr = [];
-
-      if (paramsInfo && paramsInfo.params) {
-        paramsArr = paramsInfo.params;
-      }
-
-      var params = _.reduce(paramsArr, function (params, param) {
-        params[param.name] = param.value;
-        return params;
-      }, {reduce: false});
-
-      FauxtonAPI.addNotification({
-        msg: "<strong>Warning!</strong> Preview executes the Map/Reduce functions in your browser, and may behave differently from CouchDB.",
-        type: "warning",
-        fade: true,
-        escape: false // beware of possible XSS when the message changes
-      });
-
-      var promise = FauxtonAPI.Deferred();
-
-      if (!this.database.allDocs || this.database.allDocs.params.include_docs !== true) {
-        this.database.buildAllDocs({limit: Databases.DocLimit.toString(), include_docs: true});
-        promise = this.database.allDocs.fetch();
-       } else {
-        promise.resolve();
-       }
-
-      promise.then(function () {
-        params.docs = that.database.allDocs.map(function (model) { return model.get('doc');});
-        var queryPromise = pouchdb.runViewQuery({map: mapVal, reduce: reduceVal}, params);
-        queryPromise.then(function (results) {
-          FauxtonAPI.triggerRouteEvent('updatePreviewDocs', {rows: results.rows, ddoc: that.getCurrentDesignDoc().id, view: that.viewName});
-        });
-      });
     }
   });
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/fb4fc108/app/core/api.js
----------------------------------------------------------------------
diff --git a/app/core/api.js b/app/core/api.js
index 8ba1416..6053d65 100644
--- a/app/core/api.js
+++ b/app/core/api.js
@@ -29,7 +29,6 @@ function(FauxtonAPI, Layout, Router, RouteObject, utils) {
   //global app events
   FauxtonAPI.Events = _.extend({}, Backbone.Events);
 
-
   FauxtonAPI.navigate = function(url, _opts) {
     var options = _.extend({trigger: true}, _opts );
     FauxtonAPI.router.navigate(url,options);