diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/file-upload.js | 23 | ||||
-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 | 8 | ||||
-rw-r--r-- | apps/files_versions/js/versions.js | 10 | ||||
-rw-r--r-- | apps/user_ldap/js/settings.js | 4 |
6 files changed, 25 insertions, 26 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 942a07dfccc..08047c25fdb 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); }; @@ -156,20 +156,21 @@ $(document).ready(function() { // http://stackoverflow.com/a/6700/11236 var size = 0, key; for (key in obj) { - if (obj.hasOwnProperty(key)) size++; + if (obj.hasOwnProperty(key)) { size++; } } return size; }; // 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 @@ -179,7 +180,7 @@ $(document).ready(function() { crumb=crumb.next('div.crumb'); } //if that isn't enough, start removing items from the breacrumb except for the current folder and it's parent - var crumb=$('div.crumb').first(); + crumb=$('div.crumb').first(); var next=crumb.next('div.crumb'); while($('div.controls').height()>40 && next.next('div.crumb').length>0){ crumb.remove(); @@ -189,7 +190,7 @@ $(document).ready(function() { //still not enough, start shorting down the current folder name var crumb=$('div.crumb>a').last(); while($('div.controls').height()>40 && crumb.text().length>6){ - var text=crumb.text() + var text=crumb.text(); text=text.substr(0,text.length-6)+'...'; crumb.text(text); } @@ -291,7 +292,7 @@ $(document).ready(function() { } var localName=name; if(localName.substr(localName.length-1,1)=='/'){//strip / - localName=localName.substr(0,localName.length-1) + localName=localName.substr(0,localName.length-1); } if(localName.indexOf('/')){//use last part of url localName=localName.split('/').pop(); @@ -300,8 +301,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(); } @@ -309,8 +309,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 aa66a57a7b5..f05a320e72d 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -200,7 +200,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 cc2b5d42139..1d3bae925bc 100644 --- a/apps/files/js/keyboardshortcuts.js +++ b/apps/files/js/keyboardshortcuts.js @@ -131,7 +131,7 @@ 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 @@ -165,4 +165,4 @@ var Files = Files || {}; removeA(keys, event.keyCode); }); }; -})(Files);
\ No newline at end of file +})(Files); diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 294223aa094..6182e1dde0e 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'; } @@ -51,7 +51,7 @@ $(document).ready(function() { } // Add some form data to the upload handler - file_upload_param.formData = { + var file_upload_param.formData = { MAX_FILE_SIZE: $('#uploadMaxFilesize').val(), requesttoken: $('#publicUploadRequestToken').val(), dirToken: $('#dirToken').val(), diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index ca479507d48..9c3c74721f0 100644 --- a/apps/files_versions/js/versions.js +++ b/apps/files_versions/js/versions.js @@ -124,12 +124,12 @@ 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+=' id="' + revision.version + '"'; @@ -138,7 +138,7 @@ function createVersionsDropdown(filename, files) { 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 52d5dbc48d9..0082ded55c1 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'}); @@ -204,4 +204,4 @@ $(document).ready(function() { LdapConfiguration.refreshConfig(); } }); -});
\ No newline at end of file +}); |