diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-10 10:08:40 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-10 10:08:40 +0100 |
commit | e7db48cd7f7190e2d9a256557f0b1215a8c4324a (patch) | |
tree | 2b362c50e74d3332e3e6cf9c363c1c7c5e761f6a | |
parent | bbfd97ce0335f1664d14a696796f9f2c10f2a3bb (diff) | |
parent | 13fa0e2a9d3f89e4479f30b847c7c197276e5537 (diff) | |
download | nextcloud-server-e7db48cd7f7190e2d9a256557f0b1215a8c4324a.tar.gz nextcloud-server-e7db48cd7f7190e2d9a256557f0b1215a8c4324a.zip |
Merge pull request #7133 from owncloud/fix-implied-eval
Fix implied evals and doubled definition of variable
-rw-r--r-- | apps/files/js/filelist.js | 10 | ||||
-rw-r--r-- | apps/files/js/files.js | 2 | ||||
-rw-r--r-- | settings/js/personal.js | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index f538af10362..2883218b2cc 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -435,10 +435,9 @@ window.FileList={ tr.attr('data-file', newname); var path = td.children('a.name').attr('href'); td.children('a.name').attr('href', path.replace(encodeURIComponent(oldname), encodeURIComponent(newname))); + var basename = newname; if (newname.indexOf('.') > 0 && tr.data('type') !== 'dir') { - var basename=newname.substr(0,newname.lastIndexOf('.')); - } else { - var basename=newname; + basename = newname.substr(0,newname.lastIndexOf('.')); } td.find('a.name span.nametext').text(basename); if (newname.indexOf('.') > 0 && tr.data('type') !== 'dir') { @@ -544,10 +543,9 @@ window.FileList={ td.children('a.name .span').text(newName); var path = td.children('a.name').attr('href'); td.children('a.name').attr('href', path.replace(encodeURIComponent(oldName), encodeURIComponent(newName))); + var basename = newName; if (newName.indexOf('.') > 0) { - var basename = newName.substr(0, newName.lastIndexOf('.')); - } else { - var basename = newName; + basename = newName.substr(0, newName.lastIndexOf('.')); } td.children('a.name').empty(); var span = $('<span class="nametext"></span>'); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index a535700c1b3..1ec4c4ec7ab 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -405,7 +405,7 @@ $(document).ready(function() { Files.resizeBreadcrumbs(width, true); // display storage warnings - setTimeout ( "Files.displayStorageWarnings()", 100 ); + setTimeout(Files.displayStorageWarnings, 100); OC.Notification.setDefault(Files.displayStorageWarnings); // only possible at the moment if user is logged in diff --git a/settings/js/personal.js b/settings/js/personal.js index e6e1d538a19..3b876467756 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -158,7 +158,7 @@ $(document).ready(function(){ if(typeof timeout !== 'undefined'){ clearTimeout(timeout); } - timeout = setTimeout('changeDisplayName()',1000); + timeout = setTimeout(changeDisplayName, 1000); } }); @@ -173,7 +173,7 @@ $(document).ready(function(){ if(typeof timeout !== 'undefined'){ clearTimeout(timeout); } - timeout = setTimeout('changeEmailAddress()',1000); + timeout = setTimeout(changeEmailAddress, 1000); } }); |