summaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-30 10:41:04 +0100
committerVincent Petry <pvince81@owncloud.com>2014-01-30 13:40:01 +0100
commitd36a2ff9eeedc9ebb2ebbba5d55cc255281e9929 (patch)
treeb54a03363f008fa6eac6f8fc0552d6c9482d4667 /apps/files/js/files.js
parent299a8285bd2601ccbac988b2e3e9b067d47921a2 (diff)
downloadnextcloud-server-d36a2ff9eeedc9ebb2ebbba5d55cc255281e9929.tar.gz
nextcloud-server-d36a2ff9eeedc9ebb2ebbba5d55cc255281e9929.zip
Added .jshintrc
- Also fixes a few JSHint warnings in files app - Added "global" comment on top of files app to suppress warning and also inform devs about what globals are use
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index d794a1584de..441c80762f9 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -1,4 +1,16 @@
-Files={
+/*
+ * Copyright (c) 2014
+ *
+ * This file is licensed under the Affero General Public License version 3
+ * or later.
+ *
+ * See the COPYING-README file.
+ *
+ */
+
+/* global OC, t, n, FileList, FileActions */
+/* global getURLParameter, isPublic */
+var Files = {
// file space size sync
_updateStorageStatistics: function() {
Files._updateStorageStatisticsTimeout = null;
@@ -654,10 +666,10 @@ function procesSelection() {
var totalSize = 0;
for(var i=0; i<selectedFiles.length; i++) {
totalSize+=selectedFiles[i].size;
- };
+ }
for(var i=0; i<selectedFolders.length; i++) {
totalSize+=selectedFolders[i].size;
- };
+ }
$('#headerSize').text(humanFileSize(totalSize));
var selection = '';
if (selectedFolders.length > 0) {
@@ -769,10 +781,11 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) {
}
img.src = previewURL;
});
-}
+};
function getUniqueName(name) {
if (FileList.findFileEl(name).exists()) {
+ var numMatch;
var parts=name.split('.');
var extension = "";
if (parts.length > 1) {
@@ -806,7 +819,7 @@ function checkTrashStatus() {
function onClickBreadcrumb(e) {
var $el = $(e.target).closest('.crumb'),
- $targetDir = $el.data('dir');
+ $targetDir = $el.data('dir'),
isPublic = !!$('#isPublic').val();
if ($targetDir !== undefined && !isPublic) {