diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js index b1bbde7a69..b04c2acae1 100644 --- a/core/js/shareconfigmodel.js +++ b/core/js/shareconfigmodel.js @@ -8,7 +8,7 @@ * */ -/* global moment */ +/* global moment, oc_appconfig, oc_config */ (function() { if (!OC.Share) { diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js index d1b326a56b..a9849ef916 100644 --- a/core/js/sharedialogexpirationview.js +++ b/core/js/sharedialogexpirationview.js @@ -8,7 +8,7 @@ * */ -/* global moment */ +/* global moment, Handlebars */ (function() { if (!OC.Share) { @@ -107,7 +107,7 @@ $target.tooltip('hide'); $target.removeClass('error'); - expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD'); + var expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD'); this.model.get('linkShare').expiration = expiration; this.model.saveLinkShare({ expiration: expiration diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 8ad2e27009..83bf797900 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -8,6 +8,8 @@ * */ +/* globals Clipboard, Handlebars */ + (function() { if (!OC.Share) { OC.Share = {}; @@ -131,7 +133,7 @@ var clipboard = new Clipboard('.clipboardButton'); clipboard.on('success', function(e) { - $input = $(e.trigger); + var $input = $(e.trigger); $input.tooltip({placement: 'bottom', trigger: 'manual', title: t('core', 'Copied!')}); $input.tooltip('show'); _.delay(function() { @@ -139,7 +141,7 @@ }, 3000); }); clipboard.on('error', function (e) { - $input = $(e.trigger); + var $input = $(e.trigger); var actionMsg = ''; if (/iPhone|iPad/i.test(navigator.userAgent)) { actionMsg = t('core', 'Not supported!'); @@ -206,7 +208,7 @@ }, onPasswordKeyUp: function(event) { - if(event.keyCode == 13) { + if(event.keyCode === 13) { this.onPasswordEntered(); } }, diff --git a/core/js/sharedialogmailview.js b/core/js/sharedialogmailview.js index 79741e92ac..b62936b115 100644 --- a/core/js/sharedialogmailview.js +++ b/core/js/sharedialogmailview.js @@ -8,6 +8,8 @@ * */ +/* globals escapeHTML, Handlebars */ + (function() { if (!OC.Share) { OC.Share = {}; @@ -137,7 +139,7 @@ fetch: 'getShareWithEmail', search: search.term }, function(result) { - if (result.status == 'success' && result.data.length > 0) { + if (result.status === 'success' && result.data.length > 0) { response(result.data); } }); diff --git a/core/js/sharedialogresharerinfoview.js b/core/js/sharedialogresharerinfoview.js index 600e2ecbf5..654eebf499 100644 --- a/core/js/sharedialogresharerinfoview.js +++ b/core/js/sharedialogresharerinfoview.js @@ -8,6 +8,8 @@ * */ +/* globals Handlebars */ + (function() { if (!OC.Share) { OC.Share = {}; diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index d156d30cec..540bafa5c1 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -8,6 +8,8 @@ * */ +/* globals Handlebars */ + (function() { if (!OC.Share) { OC.Share = {}; @@ -254,8 +256,6 @@ var $element = $(event.target); var $li = $element.closest('li'); var shareId = $li.data('share-id'); - var shareType = $li.data('share-type'); - var shareWith = $li.attr('data-share-with'); // adjust checkbox states var $checkboxes = $('.permissions', $li).not('input[name="edit"]').not('input[name="share"]'); diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index 5637ffc3a0..2c60f216ef 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -8,6 +8,8 @@ * */ +/* globals Handlebars */ + (function() { if(!OC.Share) { OC.Share = {}; @@ -148,7 +150,7 @@ function (result) { $loading.addClass('hidden'); $loading.removeClass('inlineblock'); - if (result.ocs.meta.statuscode == 100) { + if (result.ocs.meta.statuscode === 100) { var users = result.ocs.data.exact.users.concat(result.ocs.data.users); var groups = result.ocs.data.exact.groups.concat(result.ocs.data.groups); var remotes = result.ocs.data.exact.remotes.concat(result.ocs.data.remotes); @@ -404,7 +406,7 @@ if (this.configModel.get('isRemoteShareAllowed')) { sharePlaceholder = t('core', 'Share with users, groups or remote users…'); } else { - sharePlaceholder = t('core', 'Share with users or groups…') + sharePlaceholder = t('core', 'Share with users or groups…'); } } else if (this.configModel.get('isRemoteShareAllowed')) { sharePlaceholder = t('core', 'Share with users or remote users…');