Move Dropbox/GDrive link to icon

This commit is contained in:
Robin McCorkell 2016-03-31 23:20:00 +01:00
parent a09ef66eea
commit ac27163f68
3 changed files with 17 additions and 8 deletions

View File

@ -18,6 +18,11 @@ td.mountPoint, td.backend { width:160px; }
#addMountPoint>td.applicable { visibility:hidden; }
#addMountPoint>td.hidden { visibility:hidden; }
#externalStorage .icon-settings {
padding: 11px 20px;
vertical-align: text-bottom;
}
#selectBackend {
margin-left: -10px;
width: 150px;

View File

@ -11,17 +11,19 @@ $(document).ready(function() {
OCA.External.Settings.mountConfig.whenSelectBackend(function($tr, backend, onCompletion) {
if (backend === 'dropbox') {
var config = $tr.find('.configuration');
var backendEl = $tr.find('.backend');
var el = $(document.createElement('a'))
.attr('href', generateUrl($tr))
.attr('target', '_blank')
.text(t('files_external', 'Dropbox Configuration') + ' ↗')
.attr('title', t('files_external', 'Dropbox App Configuration'))
.addClass('icon-settings svg')
;
el.on('click', function(event) {
var a = $(event.target);
a.attr('href', generateUrl($(this).parent()));
a.attr('href', generateUrl($(this).closest('tr')));
});
config.append(el);
el.tooltip({placement: 'top'});
backendEl.append(el);
}
});

View File

@ -7,17 +7,19 @@ $(document).ready(function() {
OCA.External.Settings.mountConfig.whenSelectBackend(function($tr, backend, onCompletion) {
if (backend === 'googledrive') {
var config = $tr.find('.configuration');
var backendEl = $tr.find('.backend');
var el = $(document.createElement('a'))
.attr('href', generateUrl($tr))
.attr('target', '_blank')
.text(t('files_external', 'Google Drive Configuration') + ' ↗')
.attr('title', t('files_external', 'Google Drive App Configuration'))
.addClass('icon-settings svg')
;
el.on('click', function(event) {
var a = $(event.target);
a.attr('href', generateUrl($(this).parent()));
a.attr('href', generateUrl($(this).closest('tr')));
});
config.append(el);
el.tooltip({placement: 'top'});
backendEl.append(el);
}
});