summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2018-10-19 11:37:11 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-10-19 20:17:55 +0200
commitc5d3febf37f739b9ffbab636914f2ab368f68bbb (patch)
treeafaef37a4fc6fc46888cd7131ac5ebe8436efcfd /apps
parent543c8634340607c5dd088b9cbdcd85700222ee0b (diff)
downloadnextcloud-server-c5d3febf37f739b9ffbab636914f2ab368f68bbb.tar.gz
nextcloud-server-c5d3febf37f739b9ffbab636914f2ab368f68bbb.zip
Add missing variable declarations
This fixes errors from LGTM like the following one: Variable i is used like a local variable, but is missing a declaration. Signed-off-by: Stefan Weil <sw@weilnetz.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/federatedfilesharing/js/settings-personal.js4
-rw-r--r--apps/federation/js/settings-admin.js2
-rw-r--r--apps/files/js/newfilemenu.js2
-rw-r--r--apps/files/js/sidebarpreviewmanager.js2
-rw-r--r--apps/files_sharing/js/sharedfilelist.js4
5 files changed, 8 insertions, 6 deletions
diff --git a/apps/federatedfilesharing/js/settings-personal.js b/apps/federatedfilesharing/js/settings-personal.js
index c954f74f323..407493640b1 100644
--- a/apps/federatedfilesharing/js/settings-personal.js
+++ b/apps/federatedfilesharing/js/settings-personal.js
@@ -28,7 +28,7 @@ $(document).ready(function() {
// Clipboard!
var clipboard = new Clipboard('.clipboardButton');
clipboard.on('success', function(e) {
- $input = $(e.trigger);
+ var $input = $(e.trigger);
$input.tooltip('hide')
.attr('data-original-title', t('core', 'Copied!'))
.tooltip('fixTitle')
@@ -41,7 +41,7 @@ $(document).ready(function() {
}, 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!');
diff --git a/apps/federation/js/settings-admin.js b/apps/federation/js/settings-admin.js
index 9e3ed763168..da3f3c2d1a0 100644
--- a/apps/federation/js/settings-admin.js
+++ b/apps/federation/js/settings-admin.js
@@ -77,7 +77,7 @@
console.log("typing away");
- url = $(this).val();
+ var url = $(this).val();
// toggle add-button visiblity based on input length
if ( url.length > 0 )
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 01a183a33a7..69450e97c2a 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -171,7 +171,7 @@
/* Find the right actionHandler that should be called.
* Actions is retrieved by using `actionSpec.id` */
- action = _.filter(self._menuItems, function(item) {
+ var action = _.filter(self._menuItems, function(item) {
return item.id == $target.attr('data-action');
}).pop();
action.actionHandler(newname);
diff --git a/apps/files/js/sidebarpreviewmanager.js b/apps/files/js/sidebarpreviewmanager.js
index 27ccd4fc405..69528ce4e43 100644
--- a/apps/files/js/sidebarpreviewmanager.js
+++ b/apps/files/js/sidebarpreviewmanager.js
@@ -9,7 +9,7 @@
*/
(function () {
- SidebarPreviewManager = function (fileList) {
+ var SidebarPreviewManager = function (fileList) {
this._fileList = fileList;
this._previewHandlers = {};
OC.Plugins.attach('OCA.Files.SidebarPreviewManager', this);
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index 19250815bd6..3e2bcf59032 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -90,7 +90,7 @@
var permission = fileData.permissions;
$tr.attr('data-share-permissions', permission);
}
-
+
// add row with expiration date for link only shares - influenced by _createRow of filelist
if (this._linksOnly) {
var expirationTimestamp = 0;
@@ -107,6 +107,8 @@
modifiedColor = 160;
}
+ var formatted;
+ var text;
if (expirationTimestamp > 0) {
formatted = OC.Util.formatDate(expirationTimestamp);
text = OC.Util.relativeModifiedDate(expirationTimestamp);