Skip to content

Commit

Permalink
Move Dropbox/GDrive link to icon
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMcCorkell committed Mar 31, 2016
1 parent b61fdbe commit dcc2a55
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions apps/files_external/css/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 6 additions & 4 deletions apps/files_external/js/dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

Expand Down
10 changes: 6 additions & 4 deletions apps/files_external/js/gdrive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});

Expand Down

0 comments on commit dcc2a55

Please sign in to comment.