Skip to content

Commit ac27163

Browse files
Move Dropbox/GDrive link to icon
1 parent a09ef66 commit ac27163

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

apps/files_external/css/settings.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ td.mountPoint, td.backend { width:160px; }
1818
#addMountPoint>td.applicable { visibility:hidden; }
1919
#addMountPoint>td.hidden { visibility:hidden; }
2020

21+
#externalStorage .icon-settings {
22+
padding: 11px 20px;
23+
vertical-align: text-bottom;
24+
}
25+
2126
#selectBackend {
2227
margin-left: -10px;
2328
width: 150px;

apps/files_external/js/dropbox.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ $(document).ready(function() {
1111

1212
OCA.External.Settings.mountConfig.whenSelectBackend(function($tr, backend, onCompletion) {
1313
if (backend === 'dropbox') {
14-
var config = $tr.find('.configuration');
14+
var backendEl = $tr.find('.backend');
1515
var el = $(document.createElement('a'))
1616
.attr('href', generateUrl($tr))
1717
.attr('target', '_blank')
18-
.text(t('files_external', 'Dropbox Configuration') + ' ↗')
18+
.attr('title', t('files_external', 'Dropbox App Configuration'))
19+
.addClass('icon-settings svg')
1920
;
2021
el.on('click', function(event) {
2122
var a = $(event.target);
22-
a.attr('href', generateUrl($(this).parent()));
23+
a.attr('href', generateUrl($(this).closest('tr')));
2324
});
24-
config.append(el);
25+
el.tooltip({placement: 'top'});
26+
backendEl.append(el);
2527
}
2628
});
2729

apps/files_external/js/gdrive.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ $(document).ready(function() {
77

88
OCA.External.Settings.mountConfig.whenSelectBackend(function($tr, backend, onCompletion) {
99
if (backend === 'googledrive') {
10-
var config = $tr.find('.configuration');
10+
var backendEl = $tr.find('.backend');
1111
var el = $(document.createElement('a'))
1212
.attr('href', generateUrl($tr))
1313
.attr('target', '_blank')
14-
.text(t('files_external', 'Google Drive Configuration') + ' ↗')
14+
.attr('title', t('files_external', 'Google Drive App Configuration'))
15+
.addClass('icon-settings svg')
1516
;
1617
el.on('click', function(event) {
1718
var a = $(event.target);
18-
a.attr('href', generateUrl($(this).parent()));
19+
a.attr('href', generateUrl($(this).closest('tr')));
1920
});
20-
config.append(el);
21+
el.tooltip({placement: 'top'});
22+
backendEl.append(el);
2123
}
2224
});
2325

0 commit comments

Comments
 (0)