summaryrefslogtreecommitdiffstats
path: root/settings/js/authtoken_view.js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-11-14 18:19:27 +0100
committerRobin Appelman <robin@icewind.nl>2016-11-16 15:24:32 +0100
commit9157f807cc9a8a0aa5c68de572bff230dd7e2a49 (patch)
tree78db00592feb554061b94da40297306db62d90cb /settings/js/authtoken_view.js
parent311531ecce497663960877fc536ba94deff27bc0 (diff)
downloadnextcloud-server-9157f807cc9a8a0aa5c68de572bff230dd7e2a49.tar.gz
nextcloud-server-9157f807cc9a8a0aa5c68de572bff230dd7e2a49.zip
dropdown ui
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'settings/js/authtoken_view.js')
-rw-r--r--settings/js/authtoken_view.js19
1 files changed, 9 insertions, 10 deletions
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index 7ba3ce0b924..20fe5235eb0 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -29,21 +29,19 @@
'<tr data-id="{{id}}">'
+ '<td class="has-tooltip" title="{{title}}">'
+ '<span class="token-name">{{name}}</span>'
- + '<div class="configure">'
- + '<input class="filesystem checkbox" type="checkbox" id="{{id}}_filesystem" {{#if scope.filesystem}}checked{{/if}}/>'
- + '<label for="{{id}}_filesystem">' + t('core', 'Allow filesystem access') + '</label><br/>'
- + '</div>'
+ '</td>'
+ '<td><span class="last-activity has-tooltip" title="{{lastActivityTime}}">{{lastActivity}}</span></td>'
- + '<td class="icon">'
+ + '<td class="more">'
+ + '{{#if showMore}}<a class="icon icon-more"/>{{/if}}'
+ + '<div class="popovermenu bubble open menu configure">'
+ '{{#if canScope}}'
- + '<a class="icon icon-settings has-tooltip" title="' + t('core', 'Configure') + '"></a>'
+ + '<input class="filesystem checkbox" type="checkbox" id="{{id}}_filesystem" {{#if scope.filesystem}}checked{{/if}}/>'
+ + '<label for="{{id}}_filesystem">' + t('core', 'Allow filesystem access') + '</label><br/>'
+ '{{/if}}'
- + '</td>'
- + '<td class="icon">'
+ '{{#if canDelete}}'
- + '<a class="icon icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a>'
+ + '<a class="icon icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '">' + t('core', 'Revoke') +'</a>'
+ '{{/if}}'
+ + '</div>'
+ '</td>'
+ '<tr>';
@@ -111,6 +109,7 @@
viewData.lastActivity = OC.Util.relativeModifiedDate(ts);
viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL');
viewData.canScope = token.get('type') === 1;
+ viewData.showMore = viewData.canScope || viewData.canDelete;
// preserve title for cases where we format it further
viewData.title = viewData.name;
@@ -217,7 +216,7 @@
var $el = $(el);
$el.on('click', 'a.icon-delete', _.bind(_this._onDeleteToken, _this));
- $el.on('click', 'a.icon-settings', _.bind(_this._onConfigureToken, _this));
+ $el.on('click', '.icon-more', _.bind(_this._onConfigureToken, _this));
$el.on('change', 'input.filesystem', _.bind(_this._onSetTokenScope, _this));
});