diff options
author | Garren Smith <garren.smith@gmail.com> | 2014-02-13 10:59:45 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2014-02-13 10:59:45 +0200 |
commit | e54d1d8fc0f36ea737d2693364ee83324a98cddf (patch) | |
tree | 4ae93909aff4278f48ec3d805cbe45ad86d96ce2 | |
parent | 72adab90471f107cfd4478d04ecb3b90e3f1d3f4 (diff) | |
download | couchdb-e54d1d8fc0f36ea737d2693364ee83324a98cddf.tar.gz |
Fauxton: Fix login issue
-rw-r--r-- | src/fauxton/app/addons/auth/resources.js | 2 | ||||
-rw-r--r-- | src/fauxton/app/core/couchdbSession.js | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/fauxton/app/addons/auth/resources.js b/src/fauxton/app/addons/auth/resources.js index 0c9b1f5df..ed06175e0 100644 --- a/src/fauxton/app/addons/auth/resources.js +++ b/src/fauxton/app/addons/auth/resources.js @@ -53,6 +53,8 @@ function (app, FauxtonAPI, CouchdbSession) { initialize: function (options) { if (!options) { options = {}; } + _.bindAll(this); + this.messages = _.extend({}, { missingCredentials: 'Username or password cannot be blank.', passwordsNotMatch: 'Passwords do not match.', diff --git a/src/fauxton/app/core/couchdbSession.js b/src/fauxton/app/core/couchdbSession.js index c59a8fc28..747ef3e5f 100644 --- a/src/fauxton/app/core/couchdbSession.js +++ b/src/fauxton/app/core/couchdbSession.js @@ -34,8 +34,8 @@ function (FauxtonAPI) { fetch = _.bind(this.fetchOnce, this); if (options.forceFetch) { - fetch = this.fetch; - Backbone.fetchCache.clearItem(_.result(this.url)); + fetch = _.bind(this.fetch, this); + Backbone.fetchCache.clearItem(_.result(this, 'url')); } return fetch(opt).then(function () { |