diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-18 22:38:44 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-01-30 17:00:54 +0100 |
commit | 22812c5f0dc57b1598912cf51fd1e5b721519f2d (patch) | |
tree | 13b9599505b4cc974fe8249898476b91640f63d7 /apps/files | |
parent | 5761bd771f4142394a00083712b63e77f8976946 (diff) | |
download | nextcloud-server-22812c5f0dc57b1598912cf51fd1e5b721519f2d.tar.gz nextcloud-server-22812c5f0dc57b1598912cf51fd1e5b721519f2d.zip |
replace live() with on() in core js
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/filelist.js | 8 | ||||
-rw-r--r-- | apps/files/js/files.js | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 04b7d92e2c3..57c281f2fdc 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -335,7 +335,7 @@ var FileList={ $(document).ready(function(){ $('#notification').hide(); - $('#notification .undo').live('click', function(){ + $('#notification').on('click', '.undo', function(){ if (FileList.deleteFiles) { $.each(FileList.deleteFiles,function(index,file){ $('tr').filterAttr('data-file',file).show(); @@ -361,16 +361,16 @@ $(document).ready(function(){ FileList.lastAction = null; OC.Notification.hide(); }); - $('#notification .replace').live('click', function() { + $('#notification').on('click', '.replace', function() { OC.Notification.hide(function() { FileList.replace($('#notification').data('oldName'), $('#notification').data('newName'), $('#notification').data('isNewFile')); }); }); - $('#notification .suggest').live('click', function() { + $('#notification').on('click', '.suggest', function() { $('tr').filterAttr('data-file', $('#notification').data('oldName')).show(); OC.Notification.hide(); }); - $('#notification .cancel').live('click', function() { + $('#notification').on('click', '.cancel', function() { if ($('#notification').data('isNewFile')) { FileList.deleteCanceled = false; FileList.deleteFiles = [$('#notification').data('oldName')]; diff --git a/apps/files/js/files.js b/apps/files/js/files.js index c817d8431e2..9fd9b73a947 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -110,7 +110,7 @@ $(document).ready(function() { } // Triggers invisible file input - $('#upload a').live('click', function() { + $('#upload a').on('click', function() { $(this).parent().children('#file_upload_start').trigger('click'); return false; }); @@ -118,7 +118,7 @@ $(document).ready(function() { var lastChecked; // Sets the file link behaviour : - $('td.filename a').live('click',function(event) { + $('td.filename').on('click','a',function(event) { if (event.ctrlKey || event.shiftKey) { event.preventDefault(); if (event.shiftKey) { @@ -184,7 +184,7 @@ $(document).ready(function() { procesSelection(); }); - $('td.filename input:checkbox').live('change',function(event) { + $('#fileList').on('change', 'td.filename input:checkbox',function(event) { if (event.shiftKey) { var last = $(lastChecked).parent().parent().prevAll().length; var first = $(this).parent().parent().prevAll().length; |