diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-04 12:11:32 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-04 12:11:32 -0800 |
commit | 6d3b61f3884d6cf7b2eb68cdd60c713620afabbd (patch) | |
tree | 7051ae377055969aeeed9f4490e8478afaad0b5d /apps/files/js/fileactions.js | |
parent | 0609f30d1c4ab01804d0ecf943c0d9146bb41cb7 (diff) | |
parent | ba1b9df8a9c2da0f46f2b5a587eeb92c8c3d528d (diff) | |
download | nextcloud-server-6d3b61f3884d6cf7b2eb68cdd60c713620afabbd.tar.gz nextcloud-server-6d3b61f3884d6cf7b2eb68cdd60c713620afabbd.zip |
Merge pull request #7011 from owncloud/jshint
Added .jshintrc
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index f36457f01a8..9a69d7b3688 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -1,3 +1,15 @@ +/* + * Copyright (c) 2014 + * + * This file is licensed under the Affero General Public License version 3 + * or later. + * + * See the COPYING-README file. + * + */ + +/* global OC, FileList */ +/* global trashBinApp */ var FileActions = { actions: {}, defaults: {}, @@ -45,8 +57,9 @@ var FileActions = { return filteredActions; }, getDefault: function (mime, type, permissions) { + var mimePart; if (mime) { - var mimePart = mime.substr(0, mime.indexOf('/')); + mimePart = mime.substr(0, mime.indexOf('/')); } var name = false; if (mime && FileActions.defaults[mime]) { @@ -141,13 +154,14 @@ var FileActions = { parent.parent().children().last().find('.action.delete').remove(); if (actions['Delete']) { var img = FileActions.icons['Delete']; + var html; if (img.call) { img = img(file); } if (typeof trashBinApp !== 'undefined' && trashBinApp) { - var html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />'; + html = '<a href="#" original-title="' + t('files', 'Delete permanently') + '" class="action delete delete-icon" />'; } else { - var html = '<a href="#" class="action delete delete-icon" />'; + html = '<a href="#" class="action delete delete-icon" />'; } var element = $(html); element.data('action', actions['Delete']); @@ -174,10 +188,11 @@ var FileActions = { }; $(document).ready(function () { + var downloadScope; if ($('#allowZipDownload').val() == 1) { - var downloadScope = 'all'; + downloadScope = 'all'; } else { - var downloadScope = 'file'; + downloadScope = 'file'; } if (typeof disableDownloadActions == 'undefined' || !disableDownloadActions) { |