Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrantje <brantje@gmail.com>2017-10-29 14:32:28 +0300
committerbrantje <brantje@gmail.com>2017-10-29 16:14:08 +0300
commit5ed525e4b16a8d5237b29d81a328bd38b2737d01 (patch)
treee8d0ea21c7728e3c84d587c4a664419c9f594ed9 /js/app/directives
parent18522e85b6c86a7bc65ba08269a2611d281436ef (diff)
Make use of icon groups
Diffstat (limited to 'js/app/directives')
-rw-r--r--js/app/directives/icon.js7
-rw-r--r--js/app/directives/iconpicker.js7
2 files changed, 11 insertions, 3 deletions
diff --git a/js/app/directives/icon.js b/js/app/directives/icon.js
index de0c00e3..21e70d1d 100644
--- a/js/app/directives/icon.js
+++ b/js/app/directives/icon.js
@@ -45,8 +45,11 @@
if(scope.credential.icon && scope.credential.icon.type){
scope.iconUrl = 'data:image/'+ scope.credential.icon.type +';base64,' + scope.credential.icon.content;
} else {
- var url = window.btoa(angular.copy(scope.credential.url)).replace('/','_');
- scope.iconUrl = OC.generateUrl('apps/passman/api/v2/icon/') + url + '/'+ scope.credential.credential_id;
+ if(scope.credential.url) {
+ var url = window.btoa(angular.copy(scope.credential.url)).replace('/', '_');
+ scope.iconUrl = OC.generateUrl('apps/passman/api/v2/icon/') + url + '/' +
+ scope.credential.credential_id;
+ }
}
}, true);
}
diff --git a/js/app/directives/iconpicker.js b/js/app/directives/iconpicker.js
index 57667875..dd6d85e1 100644
--- a/js/app/directives/iconpicker.js
+++ b/js/app/directives/iconpicker.js
@@ -40,13 +40,18 @@
link: function(scope, element) {
IconService.getIcons().then(function(icons) {
- scope.icons = icons;
+ scope.iconGroups = icons;
});
scope.selectIcon = function(icon) {
scope.selectedIcon = icon;
};
+ scope.jumpToGroup = function(groupName) {
+ var offset = $('#'+groupName).position();
+ $('.iconList').scrollTop(offset.top);
+ };
+
scope.useIcon = function() {
$http.get(scope.selectedIcon.url).then(function(result) {
var base64Data = window.btoa(result.data);