You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2014/02/03 11:12:29 UTC

[05/22] couchdb commit: updated refs/heads/paginate-api-options to 5d2a6f9

Whitespace


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

Branch: refs/heads/paginate-api-options
Commit: af4a1b9dd3d68e5a722a5f1ccf3565491cfbfd2d
Parents: 96be583
Author: Simon Metson <si...@cloudant.com>
Authored: Sun Jan 26 19:05:22 2014 +0000
Committer: suelockwood <de...@apache.org>
Committed: Wed Jan 29 10:34:28 2014 -0500

----------------------------------------------------------------------
 src/fauxton/app/addons/documents/views.js | 52 +++++++++++++-------------
 1 file changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/af4a1b9d/src/fauxton/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js
index aeb5983..93fd0d4 100644
--- a/src/fauxton/app/addons/documents/views.js
+++ b/src/fauxton/app/addons/documents/views.js
@@ -136,7 +136,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     template: "addons/documents/templates/upload_modal",
 
     disableLoader: true,
-    
+
     initialize: function (options) {
       _.bindAll(this);
     },
@@ -201,7 +201,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       this.$('.progress').addClass('hide');
       this.clear_error_msg();
       this.$('.modal').modal();
-      // hack to get modal visible 
+      // hack to get modal visible
       $('.modal-backdrop').css('z-index',1025);
     },
 
@@ -257,7 +257,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       this.$('.progress').addClass('hide');
       this.clear_error_msg();
       this.$('.modal').modal();
-      // hack to get modal visible 
+      // hack to get modal visible
       $('.modal-backdrop').css('z-index',1025);
     },
 
@@ -400,8 +400,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     },
 
     destroy: function (event) {
-      event.preventDefault(); 
-      
+      event.preventDefault();
+
       window.alert('Cannot delete a document generated from a view.');
     },
 
@@ -453,7 +453,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       this.newView = options.newView || false;
       this.showNumbers = options.showNumbers;
       this.pagination = options.pagination;
-      
+
       this.listenTo(this.collection, 'totalRows:decrement', this.render);
     },
 
@@ -667,7 +667,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
           });
 
           model.collection.remove(model.id);
-          if (!!model.id.match('_design')) { 
+          if (!!model.id.match('_design')) {
             FauxtonAPI.triggerRouteEvent('reloadDesignDocs');
           }
           that.$('.bulk-delete').addClass('disabled');
@@ -712,13 +712,13 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
           return true;
         },
-        
+
         nextUrlfn: function () {
           return collection.urlNextPage(perPage());
         }
       });
     },
-    
+
     cleanup: function () {
       this.allDocsNumber.remove();
       _.each(this.rows, function (row) {row.remove();});
@@ -869,12 +869,12 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         }
         deferred.reject();
      });
-      
+
       return deferred;
     },
 
     saveDoc: function(event) {
-      var json, notification, 
+      var json, notification,
       that = this,
       editor = this.editor,
       validDoc = this.getDocFromEditor();
@@ -1357,7 +1357,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       ddoc.removeDdocView(viewName);
 
       if (ddoc.hasViews()) {
-        promise = ddoc.save(); 
+        promise = ddoc.save();
       } else {
         promise = ddoc.destroy();
       }
@@ -1377,7 +1377,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
       $('#dashboard-content').scrollTop(0); //scroll up
 
       if (this.hasValidCode() && this.$('#new-ddoc:visible').val() !=="") {
-        var mapVal = this.mapEditor.getValue(), 
+        var mapVal = this.mapEditor.getValue(),
         reduceVal = this.reduceVal(),
         viewName = this.$('#index-name').val(),
         ddoc = this.getCurrentDesignDoc(),
@@ -1428,7 +1428,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
           if (that.reduceFunStr !== reduceVal) {
             that.reduceFunStr = reduceVal;
-            that.advancedOptions.renderOnUpdatehasReduce(that.hasReduce()); 
+            that.advancedOptions.renderOnUpdatehasReduce(that.hasReduce());
           }
 
           FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: ddocName, view: viewName});
@@ -1454,15 +1454,15 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
 
     updateView: function(event, paramInfo) {
        event.preventDefault();
- 
+
        if (this.newView) { return alert('Please save this new view before querying it.'); }
- 
+
        var errorParams = paramInfo.errorParams,
            params = paramInfo.params;
- 
+
        if (_.any(errorParams)) {
          _.map(errorParams, function(param) {
- 
+
            // TODO: Where to add this error?
            // bootstrap wants the error on a control-group div, but we're not using that
            //$('form.view-query-update input[name='+param+'], form.view-query-update select[name='+param+']').addClass('error');
@@ -1479,14 +1479,14 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
            selector: ".advanced-options .errors-container",
            clear: true
          });
- 
+
          return false;
       }
- 
+
        var fragment = window.location.hash.replace(/\?.*$/, '');
        fragment = fragment + '?' + $.param(params);
        FauxtonAPI.navigate(fragment, {trigger: false});
- 
+
        FauxtonAPI.triggerRouteEvent('updateAllDocs', {ddoc: this.ddocID, view: this.viewName});
     },
 
@@ -1537,7 +1537,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
     getCurrentDesignDoc: function () {
       return this.designDocSelector.getCurrentDesignDoc();
     },
-    
+
     isCustomReduceEnabled: function() {
       return $("#reduce-function-selector").val() == "CUSTOM";
     },
@@ -1570,7 +1570,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         var editor = this[editorName];
         if (editorName === "reduceEditor" && ! this.isCustomReduceEnabled()) {
           return true;
-        } 
+        }
         return editor.hadValidCode();
       }, this);
     },
@@ -1657,7 +1657,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         ddocName: this.model.id,
         database: this.database
       }));
-      
+
       this.advancedOptions = this.insertView('#query', new Views.AdvancedOptions({
         updateViewFn: this.updateView,
         previewFn: this.previewView,
@@ -1703,7 +1703,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         this.mapEditor.setValue(this.langTemplates[this.defaultLang].map);
         //Use a built in view by default
         //this.reduceEditor.setValue(this.langTemplates[this.defaultLang].reduce);
-      } 
+      }
 
       this.mapEditor.editSaved();
       this.reduceEditor && this.reduceEditor.editSaved();
@@ -1800,7 +1800,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum
         permissions_url: '#' + this.database.url('app') + '/permissions',
         db_url: '#' + this.database.url('index') + '?limit=' + Databases.DocLimit,
         database: this.collection.database,
-        database_url: '#' + this.database.url('app'), 
+        database_url: '#' + this.database.url('app'),
         docLinks: docLinks,
         docLimit: Databases.DocLimit,
         addLinks: addLinks,