dropdown ui
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
311531ecce
commit
9157f807cc
|
@ -149,10 +149,11 @@ table.nostyle td { padding: 0.2em 0; }
|
||||||
padding: 10px 10px 10px 0;
|
padding: 10px 10px 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sessions .token-list td.icon,
|
#sessions .token-list td.more,
|
||||||
#apppasswords .token-list td.icon {
|
#apppasswords .token-list td.more {
|
||||||
|
overflow: visible;
|
||||||
|
position: relative;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
padding: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#sessions .token-list td,
|
#sessions .token-list td,
|
||||||
|
@ -170,33 +171,50 @@ table.nostyle td { padding: 0.2em 0; }
|
||||||
#apppasswords tr>*:nth-child(2) {
|
#apppasswords tr>*:nth-child(2) {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
#sessions .token-list a.icon,
|
#sessions .token-list td > a.icon,
|
||||||
#apppasswords .token-list a.icon {
|
#apppasswords .token-list td > a.icon {
|
||||||
opacity: 0.6;
|
opacity: 0;
|
||||||
margin-top: 4px;
|
transition: opacity 0.5s;
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#sessions .token-list tr:hover a.icon,
|
#sessions .token-list a.icon,
|
||||||
#apppasswords .token-list tr:hover a.icon {
|
#apppasswords .token-list a.icon {
|
||||||
|
margin-top: 4px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sessions .token-list tr:hover td > a.icon,
|
||||||
|
#apppasswords .token-list tr:hover td > a.icon,
|
||||||
|
#sessions .token-list tr.active td > a.icon,
|
||||||
|
#apppasswords .token-list tr.active td > a.icon{
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
#sessions .token-list td div.configure,
|
#sessions .token-list td div.configure,
|
||||||
#apppasswords .token-list td div.configure {
|
#apppasswords .token-list td div.configure {
|
||||||
display: none;
|
display: none;
|
||||||
height: 18px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#sessions .token-list tr.active div.configure,
|
#sessions .token-list tr.active div.configure,
|
||||||
#apppasswords .token-list tr.active div.configure {
|
#apppasswords .token-list tr.active div.configure {
|
||||||
display: block;
|
display: block;
|
||||||
padding-left: 10px;
|
position: absolute;
|
||||||
|
top: 45px;
|
||||||
|
right: -5px;
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sessions .token-list tr.active .token-name,
|
#sessions .token-list tr.active div.configure > *,
|
||||||
#apppasswords .token-list tr.active .token-name {
|
#apppasswords .token-list tr.active div.configure > *{
|
||||||
display: none;
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sessions .token-list tr.active a.icon-delete,
|
||||||
|
#apppasswords .token-list tr.active a.icon-delete {
|
||||||
|
background-position: left;
|
||||||
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#new-app-login-name,
|
#new-app-login-name,
|
||||||
|
|
|
@ -29,21 +29,19 @@
|
||||||
'<tr data-id="{{id}}">'
|
'<tr data-id="{{id}}">'
|
||||||
+ '<td class="has-tooltip" title="{{title}}">'
|
+ '<td class="has-tooltip" title="{{title}}">'
|
||||||
+ '<span class="token-name">{{name}}</span>'
|
+ '<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>'
|
||||||
+ '<td><span class="last-activity has-tooltip" title="{{lastActivityTime}}">{{lastActivity}}</span></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}}'
|
+ '{{#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}}'
|
+ '{{/if}}'
|
||||||
+ '</td>'
|
|
||||||
+ '<td class="icon">'
|
|
||||||
+ '{{#if canDelete}}'
|
+ '{{#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}}'
|
+ '{{/if}}'
|
||||||
|
+ '</div>'
|
||||||
+ '</td>'
|
+ '</td>'
|
||||||
+ '<tr>';
|
+ '<tr>';
|
||||||
|
|
||||||
|
@ -111,6 +109,7 @@
|
||||||
viewData.lastActivity = OC.Util.relativeModifiedDate(ts);
|
viewData.lastActivity = OC.Util.relativeModifiedDate(ts);
|
||||||
viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL');
|
viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL');
|
||||||
viewData.canScope = token.get('type') === 1;
|
viewData.canScope = token.get('type') === 1;
|
||||||
|
viewData.showMore = viewData.canScope || viewData.canDelete;
|
||||||
|
|
||||||
// preserve title for cases where we format it further
|
// preserve title for cases where we format it further
|
||||||
viewData.title = viewData.name;
|
viewData.title = viewData.name;
|
||||||
|
@ -217,7 +216,7 @@
|
||||||
|
|
||||||
var $el = $(el);
|
var $el = $(el);
|
||||||
$el.on('click', 'a.icon-delete', _.bind(_this._onDeleteToken, _this));
|
$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));
|
$el.on('change', 'input.filesystem', _.bind(_this._onSetTokenScope, _this));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,6 @@ if($_['passwordChangeSupported']) {
|
||||||
<th><?php p($l->t('Name'));?></th>
|
<th><?php p($l->t('Name'));?></th>
|
||||||
<th><?php p($l->t('Last activity'));?></th>
|
<th><?php p($l->t('Last activity'));?></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="token-list icon-loading">
|
<tbody class="token-list icon-loading">
|
||||||
|
|
Loading…
Reference in New Issue