diff options
author | Garren Smith <garren.smith@gmail.com> | 2014-01-14 14:34:20 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2014-01-14 14:34:20 +0200 |
commit | b9d30b1483f731358b8ace6dc052a2641132f16a (patch) | |
tree | 8a894ed6d4fb716e3393e4b11b53c6a894779f96 | |
parent | e5cac79282b7a631b969b59f9647b3a3dd47c37b (diff) | |
download | couchdb-b9d30b1483f731358b8ace6dc052a2641132f16a.tar.gz |
Fauxton: Bug fixes
* Fix failing tests
* Fix pagination not showing correct number when docs less than limit
* Fix create new view failing with new design doc
* Add Fauxton logo for grunt couchserver
-rw-r--r-- | src/fauxton/app/addons/documents/templates/index_row_docular.html | 2 | ||||
-rw-r--r-- | src/fauxton/app/addons/documents/views.js | 3 | ||||
-rw-r--r-- | src/fauxton/app/addons/fauxton/components.js | 4 | ||||
-rw-r--r-- | src/fauxton/app/addons/permissions/tests/viewsSpec.js | 2 | ||||
-rw-r--r-- | src/fauxton/tasks/couchserver.js | 18 |
5 files changed, 25 insertions, 4 deletions
diff --git a/src/fauxton/app/addons/documents/templates/index_row_docular.html b/src/fauxton/app/addons/documents/templates/index_row_docular.html index 446a03161..e8973adae 100644 --- a/src/fauxton/app/addons/documents/templates/index_row_docular.html +++ b/src/fauxton/app/addons/documents/templates/index_row_docular.html @@ -19,7 +19,7 @@ the License. <pre class="prettyprint"><%- doc.prettyJSON() %></pre> <div class="btn-group"> - <a href="#<%= doc.url('app') %>" class="btn btn-small edits">Edit <%= doc.docType() %></a> + <a href="#<%= url %>" class="btn btn-small edits">Edit <%= doc.docType() %></a> <% if (doc.isEditable()) { %> <button href="#" class="btn btn-small btn-danger delete" title="Delete this document."><i class="icon icon-trash"></i></button> <% } %> diff --git a/src/fauxton/app/addons/documents/views.js b/src/fauxton/app/addons/documents/views.js index 0139eca9d..99025410b 100644 --- a/src/fauxton/app/addons/documents/views.js +++ b/src/fauxton/app/addons/documents/views.js @@ -405,7 +405,8 @@ function(app, FauxtonAPI, Components, Documents, Databases, pouchdb, resizeColum serialize: function() { return { - doc: this.model + doc: this.model, + url: this.model.url('app') }; } }); diff --git a/src/fauxton/app/addons/fauxton/components.js b/src/fauxton/app/addons/fauxton/components.js index a9f45addb..cda61c590 100644 --- a/src/fauxton/app/addons/fauxton/components.js +++ b/src/fauxton/app/addons/fauxton/components.js @@ -123,6 +123,10 @@ function(app, FauxtonAPI, ace) { }, pageEnd: function () { + if (this.collection.length < this.pageLimit()) { + return this.collection.length; + } + return (this.previousParams.length * this.pageLimit()) + this.pageLimit(); } diff --git a/src/fauxton/app/addons/permissions/tests/viewsSpec.js b/src/fauxton/app/addons/permissions/tests/viewsSpec.js index e5330c066..27abca461 100644 --- a/src/fauxton/app/addons/permissions/tests/viewsSpec.js +++ b/src/fauxton/app/addons/permissions/tests/viewsSpec.js @@ -25,7 +25,7 @@ define([ 'names': ['_user'], 'roles': [] } - }, {database: 'fakedb'}); + }, {database: {id: 'fakedb', safeID: function () { return this.id; }}}); section = new Views.Permissions({ database: 'fakedb', diff --git a/src/fauxton/tasks/couchserver.js b/src/fauxton/tasks/couchserver.js index b9ff3ef1b..5ccbfe11e 100644 --- a/src/fauxton/tasks/couchserver.js +++ b/src/fauxton/tasks/couchserver.js @@ -19,7 +19,8 @@ module.exports = function (grunt) { http = require("http"), httpProxy = require('http-proxy'), send = require('send'), - options = grunt.config('couchserver'); + options = grunt.config('couchserver'), + _ = grunt.util._; // Options var dist_dir = options.dist || './dist/debug/', @@ -98,6 +99,21 @@ module.exports = function (grunt) { watch.stdout.pipe(process.stdout); watch.stderr.pipe(process.stderr); + var logo = [ + [""], + [" ______ _ "], + ["| ____| | | "], + ["| |__ __ _ _ _ __ __ | |_ ___ _ __ "], + ["| __| / _` | | | | | \\ \\/ / | __| / _ \\ | '_ \\ "], + ["| | | (_| | | |_| | > < | |_ | (_) | | | | |"], + ["|_| \\__,_| \\__,_| /_/\\_\\ \\__| \\___/ |_| |_|"], + [""] + ]; + + _.each(logo, function (line) { + console.log(line.toString()); + }); + log.writeln('Listening on ' + port); }); |