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>
This commit is contained in:
Stefan Weil 2018-10-19 11:37:11 +02:00 committed by Roeland Jago Douma
parent 543c863434
commit c5d3febf37
No known key found for this signature in database
GPG Key ID: F941078878347C0C
8 changed files with 11 additions and 9 deletions

View File

@ -28,7 +28,7 @@ $(document).ready(function() {
// Clipboard! // Clipboard!
var clipboard = new Clipboard('.clipboardButton'); var clipboard = new Clipboard('.clipboardButton');
clipboard.on('success', function(e) { clipboard.on('success', function(e) {
$input = $(e.trigger); var $input = $(e.trigger);
$input.tooltip('hide') $input.tooltip('hide')
.attr('data-original-title', t('core', 'Copied!')) .attr('data-original-title', t('core', 'Copied!'))
.tooltip('fixTitle') .tooltip('fixTitle')
@ -41,7 +41,7 @@ $(document).ready(function() {
}, 3000); }, 3000);
}); });
clipboard.on('error', function (e) { clipboard.on('error', function (e) {
$input = $(e.trigger); var $input = $(e.trigger);
var actionMsg = ''; var actionMsg = '';
if (/iPhone|iPad/i.test(navigator.userAgent)) { if (/iPhone|iPad/i.test(navigator.userAgent)) {
actionMsg = t('core', 'Not supported!'); actionMsg = t('core', 'Not supported!');

View File

@ -77,7 +77,7 @@
console.log("typing away"); console.log("typing away");
url = $(this).val(); var url = $(this).val();
// toggle add-button visiblity based on input length // toggle add-button visiblity based on input length
if ( url.length > 0 ) if ( url.length > 0 )

View File

@ -171,7 +171,7 @@
/* Find the right actionHandler that should be called. /* Find the right actionHandler that should be called.
* Actions is retrieved by using `actionSpec.id` */ * 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'); return item.id == $target.attr('data-action');
}).pop(); }).pop();
action.actionHandler(newname); action.actionHandler(newname);

View File

@ -9,7 +9,7 @@
*/ */
(function () { (function () {
SidebarPreviewManager = function (fileList) { var SidebarPreviewManager = function (fileList) {
this._fileList = fileList; this._fileList = fileList;
this._previewHandlers = {}; this._previewHandlers = {};
OC.Plugins.attach('OCA.Files.SidebarPreviewManager', this); OC.Plugins.attach('OCA.Files.SidebarPreviewManager', this);

View File

@ -107,6 +107,8 @@
modifiedColor = 160; modifiedColor = 160;
} }
var formatted;
var text;
if (expirationTimestamp > 0) { if (expirationTimestamp > 0) {
formatted = OC.Util.formatDate(expirationTimestamp); formatted = OC.Util.formatDate(expirationTimestamp);
text = OC.Util.relativeModifiedDate(expirationTimestamp); text = OC.Util.relativeModifiedDate(expirationTimestamp);

View File

@ -25,7 +25,7 @@
var $element = $(element); var $element = $(element);
$clone = $("<input />"); var $clone = $("<input />");
// Name added for JQuery Validation compatibility // Name added for JQuery Validation compatibility
// Element name is required to avoid script warning. // Element name is required to avoid script warning.

View File

@ -167,7 +167,7 @@ OC.L10N = {
* @private * @private
*/ */
_getPlural: function(number) { _getPlural: function(number) {
locale = OC.getLocale(); var locale = OC.getLocale();
if ('pt_BR' === locale) { if ('pt_BR' === locale) {
// temporary set a locale for brazilian // temporary set a locale for brazilian
locale = 'xbr'; locale = 'xbr';

View File

@ -91,7 +91,7 @@
var palette = new Array(); var palette = new Array();
palette.push(color1); palette.push(color1);
var step = stepCalc(steps, [color1, color2]) var step = stepCalc(steps, [color1, color2])
for (i = 1; i < steps; i++) { for (var i = 1; i < steps; i++) {
var r = parseInt(color1.r + (step[0] * i)); var r = parseInt(color1.r + (step[0] * i));
var g = parseInt(color1.g + (step[1] * i)); var g = parseInt(color1.g + (step[1] * i));
var b = parseInt(color1.b + (step[2] * i)); var b = parseInt(color1.b + (step[2] * i));