diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-06-23 22:48:46 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-06-23 22:48:46 +0200 |
commit | e070e292bfddc89ddcda251a5f6141e855ef284a (patch) | |
tree | aa99de584e810332c15c88da1b43e70967ea555b /apps/files/js | |
parent | 167ba14af76dcf88340cbe56c513be367cfc13f4 (diff) | |
parent | 7d4747ea1692f42b9ae007cf5da654a95c610ec3 (diff) | |
download | nextcloud-server-e070e292bfddc89ddcda251a5f6141e855ef284a.tar.gz nextcloud-server-e070e292bfddc89ddcda251a5f6141e855ef284a.zip |
Merge pull request #9170 from owncloud/files-renamevalidationblur
Fix blurring of invalid file name on rename
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/filelist.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index d5e16f9e20e..55afedb2065 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1195,9 +1195,20 @@ return true; }; + function restore() { + input.tipsy('hide'); + tr.data('renaming',false); + form.remove(); + td.children('a.name').show(); + } + form.submit(function(event) { event.stopPropagation(); event.preventDefault(); + if (input.hasClass('error')) { + return; + } + try { var newName = input.val(); input.tipsy('hide'); @@ -1267,10 +1278,7 @@ input.addClass('error'); } if (event.keyCode === 27) { - input.tipsy('hide'); - tr.data('renaming',false); - form.remove(); - td.children('a.name').show(); + restore(); } }); input.click(function(event) { |