Fix position of new or renamed addressbook
This commit is contained in:
parent
4248cbcb16
commit
bc86ff1e04
|
@ -53,7 +53,7 @@
|
|||
* @memberof AddressBook
|
||||
* @desc Search for cards among all addressbooks matching some criterias.
|
||||
* @param {string} search - the search string to match
|
||||
* @param {hash} [options] - additional options to the query (excludeGroups and excludeLists)
|
||||
* @param {object} [options] - additional options to the query (excludeGroups and excludeLists)
|
||||
* @returns a collection of Cards instances
|
||||
*/
|
||||
AddressBook.$filterAll = function(search, options) {
|
||||
|
@ -82,7 +82,9 @@
|
|||
addressbook.isOwned = this.activeUser.isSuperUser || addressbook.owner == this.activeUser.login;
|
||||
addressbook.isSubscription = addressbook.owner != this.activeUser.login;
|
||||
sibling = _.find(this.$addressbooks, function(o) {
|
||||
return (o.isRemote || (o.id != 'personal'
|
||||
return (o.isRemote
|
||||
|| (!addressbook.isSubscription && o.isSubscription)
|
||||
|| (o.id != 'personal'
|
||||
&& o.isSubscription === addressbook.isSubscription
|
||||
&& o.name.localeCompare(addressbook.name) === 1));
|
||||
});
|
||||
|
@ -161,7 +163,7 @@
|
|||
* @memberof AddressBook.prototype
|
||||
* @desc Search for cards matching some criterias
|
||||
* @param {string} search - the search string to match
|
||||
* @param {hash} [options] - additional options to the query
|
||||
* @param {object} [options] - additional options to the query
|
||||
* @returns a collection of Cards instances
|
||||
*/
|
||||
AddressBook.prototype.$filter = function(search, options) {
|
||||
|
|
Loading…
Reference in a new issue