aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-08-10 08:58:57 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-10 08:58:57 +0200
commitde44ab0244a0a47dad04b8b53b5d55e31a0e430e (patch)
treed656dbe6c8da37919ec707ca6579bfd8af9d04a5 /settings/js
parent3bf609cd31b6e93eb78681b6ecc1dbb5cd35439f (diff)
downloadnextcloud-server-de44ab0244a0a47dad04b8b53b5d55e31a0e430e.tar.gz
nextcloud-server-de44ab0244a0a47dad04b8b53b5d55e31a0e430e.zip
Always show delete icon for new tokens
* Always show delete icon * Hide form if the new icon is deleted
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/authtoken_view.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index 354173341bc..c8cf66a6cea 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -183,6 +183,8 @@
_newAppPassword: undefined,
+ _newAppId: undefined,
+
_hideAppPasswordBtn: undefined,
_addingToken: false,
@@ -255,10 +257,13 @@
});
$.when(creatingToken).done(function (resp) {
+ // We can delete token we add
+ resp.deviceToken.canDelete = true;
_this.collection.add(resp.deviceToken);
_this.render();
_this._newAppLoginName.val(resp.loginName);
_this._newAppPassword.val(resp.token);
+ _this._newAppId = resp.deviceToken.id;
_this._toggleFormResult(false);
_this._newAppPassword.select();
_this._tokenName.val('');
@@ -293,6 +298,10 @@
var $row = $target.closest('tr');
var id = $row.data('id');
+ if (id === this._newAppId) {
+ this._toggleFormResult(true);
+ }
+
var token = this.collection.get(id);
if (_.isUndefined(token)) {
// Ignore event