From 7d527658e613093b46d79a898c17efc06bea21ec Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 26 Nov 2014 12:50:42 +0300 Subject: [PATCH 1/4] Added additional methods from Pouch --- angular-pouchdb.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/angular-pouchdb.js b/angular-pouchdb.js index 385592b..01ef28f 100644 --- a/angular-pouchdb.js +++ b/angular-pouchdb.js @@ -129,7 +129,9 @@ THE SOFTWARE. from: db.replicate.from.bind(db), sync: db.replicate.sync.bind(db) }, - destroy: qify(db.destroy.bind(db)) + destroy: qify(db.destroy.bind(db)), + login: qify(db.login.bind(db)), + getSession: qify(db.getSession.bind(db)) }; } }; From 28183da14a2c268a18ded71c08296544f8ebc04d Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 26 Nov 2014 12:51:37 +0300 Subject: [PATCH 2/4] Added additional methods from Pouch --- angular-pouchdb.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/angular-pouchdb.coffee b/angular-pouchdb.coffee index 6490af4..8b95a80 100644 --- a/angular-pouchdb.coffee +++ b/angular-pouchdb.coffee @@ -103,6 +103,8 @@ pouchdb.provider 'pouchdb', -> from: db.replicate.from.bind(db) sync: db.replicate.sync.bind(db) destroy: qify db.destroy.bind(db) + login: qify db.login.bind(db) + getSession: qify db.getSession.bind(db) ] # pouch-repeat="name in collection" From f02775f536936f3ac3ee966374257a94258f7e12 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 26 Nov 2014 12:54:44 +0300 Subject: [PATCH 3/4] Changed RegExp to execute pouchRepeat Error was when used 'order by create_at'. '_' symbol was missed in reg string --- angular-pouchdb.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-pouchdb.coffee b/angular-pouchdb.coffee index 8b95a80..1e64be3 100644 --- a/angular-pouchdb.coffee +++ b/angular-pouchdb.coffee @@ -118,7 +118,7 @@ pouchdb.directive 'pouchRepeat', top = angular.element(document.createElement('div')) parent.append(top) [cursor, collection, sort] = - /^\s*([a-zA-Z0-9]+)\s*in\s*([a-zA-Z0-9]+)\s*(?:order by\s*([a-zA-Z0-9\.,]+))?$/.exec($attr.pouchRepeat).splice(1) + /^\s*([a-zA-Z0-9]+)\s*in\s*([a-zA-Z0-9]+)\s*(?:order by\s*([^\s]+))?$/.exec($attr.pouchRepeat).splice(1) # The blocks managed by this directive. blocks = [] From 472351b02553da596de534174f3a3894aa60d378 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 26 Nov 2014 12:55:26 +0300 Subject: [PATCH 4/4] Changed RegExp to execute pouchRepeat Error was when used 'order by create_at'. '_' symbol was missed in reg string --- angular-pouchdb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angular-pouchdb.js b/angular-pouchdb.js index 01ef28f..0a50ac2 100644 --- a/angular-pouchdb.js +++ b/angular-pouchdb.js @@ -151,7 +151,7 @@ THE SOFTWARE. parent = $element.parent(); top = angular.element(document.createElement('div')); parent.append(top); - _ref = /^\s*([a-zA-Z0-9]+)\s*in\s*([a-zA-Z0-9]+)\s*(?:order by\s*([a-zA-Z0-9\.,]+))?$/.exec($attr.pouchRepeat).splice(1), cursor = _ref[0], collection = _ref[1], sort = _ref[2]; + _ref = /^\s*([a-zA-Z0-9]+)\s*in\s*([a-zA-Z0-9]+)\s*(?:order by\s*([^\s]+))?$/.exec($attr.pouchRepeat).splice(1), cursor = _ref[0], collection = _ref[1], sort = _ref[2]; blocks = []; vectorOf = sort != null ? (getters = (function() { var _i, _len, _ref1, _results;