diff options
author | Christopher <kondou@ts.unde.re> | 2013-08-20 12:45:10 -0700 |
---|---|---|
committer | Christopher <kondou@ts.unde.re> | 2013-08-20 12:45:10 -0700 |
commit | 90da518e3e24e088db9e2c7b356fda74266d004d (patch) | |
tree | 90a70e40faac859f7a926ece109a40c9a915e10a /apps | |
parent | de949b1caa4491a8016ed5e609fc781526fea54d (diff) | |
parent | edd92e4c09151238a89816186914f9382293ab9b (diff) | |
download | nextcloud-server-90da518e3e24e088db9e2c7b356fda74266d004d.tar.gz nextcloud-server-90da518e3e24e088db9e2c7b356fda74266d004d.zip |
Merge pull request #4262 from owncloud/fix_jslint_kondou
Fix some JSLint warnings
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/file-upload.js | 15 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 2 | ||||
-rw-r--r-- | apps/files/js/keyboardshortcuts.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/js/public.js | 6 | ||||
-rw-r--r-- | apps/files_versions/js/versions.js | 10 | ||||
-rw-r--r-- | apps/user_ldap/js/settings.js | 2 |
6 files changed, 20 insertions, 19 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 0eddd7e9cd7..49e464b810a 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -1,6 +1,6 @@ $(document).ready(function() { - file_upload_param = { + var file_upload_param = { dropZone: $('#content'), // restrict dropZone to content div //singleFileUploads is on by default, so the data.files array will always have length 1 add: function(e, data) { @@ -142,7 +142,7 @@ $(document).ready(function() { $('#uploadprogressbar').progressbar('value',100); $('#uploadprogressbar').fadeOut(); } - } + }; var file_upload_handler = function() { $('#file_upload_start').fileupload(file_upload_param); }; @@ -163,13 +163,14 @@ $(document).ready(function() { // warn user not to leave the page while upload is in progress $(window).bind('beforeunload', function(e) { - if ($.assocArraySize(uploadingFiles) > 0) + if ($.assocArraySize(uploadingFiles) > 0) { return t('files','File upload is in progress. Leaving the page now will cancel the upload.'); + } }); //add multiply file upload attribute to all browsers except konqueror (which crashes when it's used) if(navigator.userAgent.search(/konqueror/i)==-1){ - $('#file_upload_start').attr('multiple','multiple') + $('#file_upload_start').attr('multiple','multiple'); } //if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder @@ -302,8 +303,7 @@ $(document).ready(function() { } localName = getUniqueName(localName); //IE < 10 does not fire the necessary events for the progress bar. - if($('html.lte9').length > 0) { - } else { + if($('html.lte9').length === 0) { $('#uploadprogressbar').progressbar({value:0}); $('#uploadprogressbar').fadeIn(); } @@ -311,8 +311,7 @@ $(document).ready(function() { var eventSource=new OC.EventSource(OC.filePath('files','ajax','newfile.php'),{dir:$('#dir').val(),source:name,filename:localName}); eventSource.listen('progress',function(progress){ //IE < 10 does not fire the necessary events for the progress bar. - if($('html.lte9').length > 0) { - } else { + if($('html.lte9').length === 0) { $('#uploadprogressbar').progressbar('value',progress); } }); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 5027211b536..097fe521aa6 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -198,7 +198,7 @@ FileActions.register('all', 'Rename', OC.PERMISSION_UPDATE, function () { FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename) { - var dir = $('#dir').val() + var dir = $('#dir').val(); if (dir !== '/') { dir = dir + '/'; } diff --git a/apps/files/js/keyboardshortcuts.js b/apps/files/js/keyboardshortcuts.js index 418c38adb99..9d6c3ae8c33 100644 --- a/apps/files/js/keyboardshortcuts.js +++ b/apps/files/js/keyboardshortcuts.js @@ -131,7 +131,9 @@ var Files = Files || {}; return; } var preventDefault = false; - if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode); + if ($.inArray(event.keyCode, keys) === -1) { + keys.push(event.keyCode); + } if ( $.inArray(keyCodes.n, keys) !== -1 && ($.inArray(keyCodes.cmdFirefox, keys) !== -1 || $.inArray(keyCodes.cmdOpera, keys) !== -1 || $.inArray(keyCodes.leftCmdWebKit, keys) !== -1 || $.inArray(keyCodes.rightCmdWebKit, keys) !== -1 || $.inArray(keyCodes.ctrl, keys) !== -1 || event.ctrlKey)) { preventDefault = true; //new file/folder prevent browser from responding diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 294223aa094..7ffd5e06873 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -31,19 +31,19 @@ $(document).ready(function() { } } FileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename) + var tr = $('tr').filterAttr('data-file', filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href'); } }); FileActions.register('file', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename) + var tr = $('tr').filterAttr('data-file', filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href'); } }); FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = $('tr').filterAttr('data-file', filename) + var tr = $('tr').filterAttr('data-file', filename); if (tr.length > 0) { window.location = $(tr).find('a.name').attr('href')+'&download'; } diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index a14de7dbee2..f57e931bad9 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -124,19 +124,19 @@ function createVersionsDropdown(filename, files) { } function addVersion( revision ) { - title = formatDate(revision.version*1000); - name ='<span class="versionDate" title="' + title + '">' + revision.humanReadableTimestamp + '</span>'; + var title = formatDate(revision.version*1000); + var name ='<span class="versionDate" title="' + title + '">' + revision.humanReadableTimestamp + '</span>'; - path = OC.filePath('files_versions', '', 'download.php'); + var path = OC.filePath('files_versions', '', 'download.php'); - download ='<a href="' + path + "?file=" + files + '&revision=' + revision.version + '">'; + var download ='<a href="' + path + "?file=" + files + '&revision=' + revision.version + '">'; download+='<img'; download+=' src="' + OC.imagePath('core', 'actions/download') + '"'; download+=' name="downloadVersion" />'; download+=name; download+='</a>'; - revert='<span class="revertVersion"'; + var revert='<span class="revertVersion"'; revert+=' id="' + revision.version + '"'; revert+=' value="' + files + '">'; revert+='<img'; diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js index 78ec71b70ad..20d6f76dcd6 100644 --- a/apps/user_ldap/js/settings.js +++ b/apps/user_ldap/js/settings.js @@ -120,7 +120,7 @@ var LdapConfiguration = { } ); } -} +}; $(document).ready(function() { $('#ldapAdvancedAccordion').accordion({ heightStyle: 'content', animate: 'easeInOutCirc'}); |