diff options
author | Alexander Weidinger <irgendwie@users.noreply.github.com> | 2016-11-20 19:43:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-20 19:43:51 +0100 |
commit | 00764f2de1b52292d555a4c87dac8c717f42a330 (patch) | |
tree | 5beaa07032a5be1305fc79551e2fb156383be538 /js | |
parent | 406cdbf71768f6deca2c9654a333397d29b11100 (diff) | |
parent | e03f442edd800d71a85ce9434eb70f28763e5333 (diff) |
Merge pull request #2 from nextcloud/show-contacts-without-fn
Show contacts without fn
Diffstat (limited to 'js')
-rw-r--r-- | js/dav/dav.js | 2 | ||||
-rw-r--r-- | js/dav/lib/template/address_book_query.js | 4 | ||||
-rw-r--r-- | js/models/contact_model.js | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/js/dav/dav.js b/js/dav/dav.js index 384b2f08..0e46f394 100644 --- a/js/dav/dav.js +++ b/js/dav/dav.js @@ -2832,7 +2832,7 @@ var _prop = require('./prop'); var _prop2 = _interopRequireDefault(_prop); function addressBookQuery(object) { - return '<card:addressbook-query xmlns:card="urn:ietf:params:xml:ns:carddav"\n xmlns:d="DAV:">\n <d:prop>\n ' + object.props.map(_prop2['default']) + '\n </d:prop>\n <!-- According to http://stackoverflow.com/questions/23742568/google-carddav-api-addressbook-multiget-returns-400-bad-request,\n Google\'s CardDAV server requires a filter element. I don\'t think all addressbook-query calls need a filter in the spec though? -->\n <card:filter>\n <card:prop-filter name="FN">\n </card:prop-filter>\n </card:filter>\n </card:addressbook-query>'; + return '<card:addressbook-query xmlns:card="urn:ietf:params:xml:ns:carddav"\n xmlns:d="DAV:">\n <d:prop>\n ' + object.props.map(_prop2['default']) + '\n </d:prop>\n <!-- According to http://stackoverflow.com/questions/23742568/google-carddav-api-addressbook-multiget-returns-400-bad-request,\n Google\'s CardDAV server requires a filter element. I don\'t think all addressbook-query calls need a filter in the spec though? -->\n </card:addressbook-query>'; } module.exports = exports['default']; diff --git a/js/dav/lib/template/address_book_query.js b/js/dav/lib/template/address_book_query.js index 9545ecec..3b6e5796 100644 --- a/js/dav/lib/template/address_book_query.js +++ b/js/dav/lib/template/address_book_query.js @@ -8,9 +8,5 @@ export default function addressBookQuery(object) { </d:prop> <!-- According to http://stackoverflow.com/questions/23742568/google-carddav-api-addressbook-multiget-returns-400-bad-request, Google's CardDAV server requires a filter element. I don't think all addressbook-query calls need a filter in the spec though? --> - <card:filter> - <card:prop-filter name="FN"> - </card:prop-filter> - </card:filter> </card:addressbook-query>` } diff --git a/js/models/contact_model.js b/js/models/contact_model.js index d5ea49ce..28a1c759 100644 --- a/js/models/contact_model.js +++ b/js/models/contact_model.js @@ -49,7 +49,9 @@ angular.module('contactsApp') } property = model.getProperty('n'); if(property) { - return property.value.join(); + return property.value.filter(function(elem) { + return elem; + }).join(' '); } return undefined; } |