You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/07/14 10:35:45 UTC
[09/13] fauxton commit: updated refs/heads/master to 0ec46e9
Fix missing stale query option
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/adc99a4f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/adc99a4f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/adc99a4f
Branch: refs/heads/master
Commit: adc99a4f9825577e22a5249b6d55d1edfdfcbdf6
Parents: 7896340
Author: Garren Smith <ga...@gmail.com>
Authored: Mon Jun 30 12:27:18 2014 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Mon Jun 30 12:27:18 2014 +0200
----------------------------------------------------------------------
.../documents/templates/advanced_options.html | 8 ++-----
app/addons/documents/views.js | 22 +++++++-------------
2 files changed, 9 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adc99a4f/app/addons/documents/templates/advanced_options.html
----------------------------------------------------------------------
diff --git a/app/addons/documents/templates/advanced_options.html b/app/addons/documents/templates/advanced_options.html
index 439e864..c986d4e 100644
--- a/app/addons/documents/templates/advanced_options.html
+++ b/app/addons/documents/templates/advanced_options.html
@@ -101,10 +101,10 @@ the License.
</div>
</div>
<div class="row-fluid">
- <% if (showPreview) { %>
+ <% if (showStale) { %>
<div class="span6">
<div class="checkbox inline">
- <input id="check7" name="stale" type="checkbox" value="true">
+ <input id="check7" name="stale" type="checkbox" value="ok">
<label for="check7">Stale</label>
</div>
</div>
@@ -147,10 +147,6 @@ the License.
<% } %>
</div>
-
-
-
-
<div class="controls-group">
<div id="button-options" class="controls controls-row">
<button type="submit" class="btn btn-success">Query</button>
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/adc99a4f/app/addons/documents/views.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/views.js b/app/addons/documents/views.js
index 97f82b4..4e7459a 100644
--- a/app/addons/documents/views.js
+++ b/app/addons/documents/views.js
@@ -592,7 +592,7 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
toggleTrash: function () {
var $bulkdDeleteButton = this.$('.js-bulk-delete');
- if (this.bulkDeleteDocsCollection.length > 0) {
+ if (this.bulkDeleteDocsCollection && this.bulkDeleteDocsCollection.length > 0) {
$bulkdDeleteButton.removeClass('disabled');
} else {
$bulkdDeleteButton.addClass('disabled');
@@ -1016,18 +1016,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
this.viewName = options.viewName;
this.updateViewFn = options.updateViewFn;
this.previewFn = options.previewFn;
-
- if (typeof(options.hasReduce) === 'undefined') {
- this.hasReduce = true;
- } else {
- this.hasReduce = options.hasReduce;
- }
-
- /*if (typeof(options.showPreview) === 'undefined') {
- this.showPreview = true;
- } else {
- this.showPreview = options.showPreview;
- }*/
+ this.showStale = _.isUndefined(options.showStale) ? false : options.showStale;
+ this.hasReduce = _.isUndefined(options.hasReduce) ? true : options.hasReduce;
},
events: {
@@ -1253,7 +1243,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
serialize: function () {
return {
hasReduce: this.hasReduce,
- showPreview: false
+ showPreview: false,
+ showStale: this.showStale
};
}
});
@@ -1735,7 +1726,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb,
viewName: this.viewName,
ddocName: this.model.id,
hasReduce: this.hasReduce(),
- eventer: this.eventer
+ eventer: this.eventer,
+ showStale: true
}));
}