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:
-rw-r--r--controller/translationcontroller.php1
-rw-r--r--js/app/directives/iconpicker.js7
-rw-r--r--templates/views/partials/icon-picker.html3
3 files changed, 11 insertions, 0 deletions
diff --git a/controller/translationcontroller.php b/controller/translationcontroller.php
index 2e293b33..939c6190 100644
--- a/controller/translationcontroller.php
+++ b/controller/translationcontroller.php
@@ -143,6 +143,7 @@ class TranslationController extends ApiController {
'pick.icon.search' => $this->trans->t('Search icons'),
'pick.icon.custom.label' => $this->trans->t('Upload a custom icon:'),
'use.icon' => $this->trans->t('Use this icon'),
+ 'use.icon.delete' => $this->trans->t('Delete current icon'),
'selected.icon' => $this->trans->t('Selected icon'),
// templates/views/partials/edit_credential/custom_fields.html
diff --git a/js/app/directives/iconpicker.js b/js/app/directives/iconpicker.js
index 763ca554..fafb1136 100644
--- a/js/app/directives/iconpicker.js
+++ b/js/app/directives/iconpicker.js
@@ -108,6 +108,13 @@
fr.readAsDataURL(f);
});
+ scope.deleteIcon = function() {
+ delete scope.credential.icon.type;
+ delete scope.credential.icon.content;
+ delete scope.credential.icon;
+ $('#iconPicker').dialog('close');
+ };
+
scope.useIcon = function() {
if(scope.customIcon){
diff --git a/templates/views/partials/icon-picker.html b/templates/views/partials/icon-picker.html
index 4109a259..7ab33c6f 100644
--- a/templates/views/partials/icon-picker.html
+++ b/templates/views/partials/icon-picker.html
@@ -31,6 +31,9 @@
<br />
<button ng-click="useIcon()">{{ 'use.icon' | translate}}</button>
</div>
+ <div ng-if="credential.icon">
+ <button ng-click="deleteIcon()">{{ 'use.icon.delete' | translate}}</button>
+ </div>
</div>
</div>