Merge pull request #25042 from owncloud/session-settings-ellipsis

add overflow ellipsis to session and device tokens list
This commit is contained in:
Vincent Petry 2016-06-21 12:15:38 +02:00 committed by GitHub
commit af98e3e641
3 changed files with 36 additions and 33 deletions

View File

@ -120,6 +120,10 @@ table.nostyle td { padding: 0.2em 0; }
#sessions .token-list td, #sessions .token-list td,
#devices .token-list td { #devices .token-list td {
border-top: 1px solid #DDD; border-top: 1px solid #DDD;
text-overflow: ellipsis;
max-width: 200px;
white-space: nowrap;
overflow: hidden;
} }
#sessions .token-list td a.icon-delete, #sessions .token-list td a.icon-delete,
#devices .token-list td a.icon-delete { #devices .token-list td a.icon-delete {

View File

@ -27,9 +27,9 @@
var TEMPLATE_TOKEN = var TEMPLATE_TOKEN =
'<tr data-id="{{id}}">' '<tr data-id="{{id}}">'
+ '<td>{{name}}</td>' + '<td class="has-tooltip" title="{{name}}"><span class="token-name">{{name}}</span></td>'
+ '<td><span class="last-activity" title="{{lastActivityTime}}">{{lastActivity}}</span></td>' + '<td><span class="last-activity has-tooltip" title="{{lastActivityTime}}">{{lastActivity}}</span></td>'
+ '<td><a class="icon-delete" title="' + t('core', 'Disconnect') + '"></a></td>' + '<td><a class="icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a></td>'
+ '<tr>'; + '<tr>';
var SubView = Backbone.View.extend({ var SubView = Backbone.View.extend({
@ -80,8 +80,7 @@
viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL'); viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL');
var html = _this.template(viewData); var html = _this.template(viewData);
var $html = $(html); var $html = $(html);
$html.find('.last-activity').tooltip(); $html.find('.has-tooltip').tooltip({container: 'body'});
$html.find('.icon-delete').tooltip();
list.append($html); list.append($html);
}); });
}, },

View File

@ -139,6 +139,34 @@ if($_['passwordChangeSupported']) {
} }
?> ?>
<form id="language" class="section">
<h2>
<label for="languageinput"><?php p($l->t('Language'));?></label>
</h2>
<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
<option value="<?php p($_['activelanguage']['code']);?>">
<?php p($_['activelanguage']['name']);?>
</option>
<?php foreach($_['commonlanguages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
<?php endforeach;?>
<optgroup label=""></optgroup>
<?php foreach($_['languages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
<?php endforeach;?>
</select>
<?php if (OC_Util::getEditionString() === ''): ?>
<a href="https://www.transifex.com/projects/p/owncloud/"
target="_blank" rel="noreferrer">
<em><?php p($l->t('Help translate'));?></em>
</a>
<?php endif; ?>
</form>
<div id="sessions" class="section"> <div id="sessions" class="section">
<h2><?php p($l->t('Sessions'));?></h2> <h2><?php p($l->t('Sessions'));?></h2>
<span class="hidden-when-empty"><?php p($l->t('These are the web, desktop and mobile clients currently logged in to your ownCloud.'));?></span> <span class="hidden-when-empty"><?php p($l->t('These are the web, desktop and mobile clients currently logged in to your ownCloud.'));?></span>
@ -180,34 +208,6 @@ if($_['passwordChangeSupported']) {
</div> </div>
</div> </div>
<form id="language" class="section">
<h2>
<label for="languageinput"><?php p($l->t('Language'));?></label>
</h2>
<select id="languageinput" name="lang" data-placeholder="<?php p($l->t('Language'));?>">
<option value="<?php p($_['activelanguage']['code']);?>">
<?php p($_['activelanguage']['name']);?>
</option>
<?php foreach($_['commonlanguages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
<?php endforeach;?>
<optgroup label=""></optgroup>
<?php foreach($_['languages'] as $language):?>
<option value="<?php p($language['code']);?>">
<?php p($language['name']);?>
</option>
<?php endforeach;?>
</select>
<?php if (OC_Util::getEditionString() === ''): ?>
<a href="https://www.transifex.com/projects/p/owncloud/"
target="_blank" rel="noreferrer">
<em><?php p($l->t('Help translate'));?></em>
</a>
<?php endif; ?>
</form>
<div id="clientsbox" class="section clientsbox"> <div id="clientsbox" class="section clientsbox">
<h2><?php p($l->t('Get the apps to sync your files'));?></h2> <h2><?php p($l->t('Get the apps to sync your files'));?></h2>
<a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank"> <a href="<?php p($_['clients']['desktop']); ?>" rel="noreferrer" target="_blank">