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 /core/js/share.js | |
parent | 5761bd771f4142394a00083712b63e77f8976946 (diff) | |
download | nextcloud-server-22812c5f0dc57b1598912cf51fd1e5b721519f2d.tar.gz nextcloud-server-22812c5f0dc57b1598912cf51fd1e5b721519f2d.zip |
replace live() with on() in core js
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/js/share.js b/core/js/share.js index 0c45765bd8b..f42124d0e00 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -410,7 +410,7 @@ $(document).ready(function() { firstDay: firstDay }); } - $('a.share').live('click', function(event) { + $('a.share').on('click', function(event) { event.stopPropagation(); if ($(this).data('item-type') !== undefined && $(this).data('item') !== undefined) { var itemType = $(this).data('item-type'); @@ -444,12 +444,12 @@ $(document).ready(function() { } }); - $('#shareWithList li').live('mouseenter', function(event) { + $('#shareWithList').on('mouseenter', 'li', function(event) { // Show permissions and unshare button $(':hidden', this).filter(':not(.cruds)').show(); }); - $('#shareWithList li').live('mouseleave', function(event) { + $('#shareWithList').on('mouseleave', 'li', function(event) { // Hide permissions and unshare button if (!$('.cruds', this).is(':visible')) { $('a', this).hide(); @@ -462,11 +462,11 @@ $(document).ready(function() { } }); - $('.showCruds').live('click', function() { + $('.showCruds').on('click', function() { $(this).parent().find('.cruds').toggle(); }); - $('.unshare').live('click', function() { + $('.unshare').on('click', function() { var li = $(this).parent(); var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); @@ -483,7 +483,7 @@ $(document).ready(function() { }); }); - $('.permissions').live('change', function() { + $('.permissions').on('change', function() { if ($(this).attr('name') == 'edit') { var li = $(this).parent().parent() var checkboxes = $('.permissions', li); @@ -510,7 +510,7 @@ $(document).ready(function() { OC.Share.setPermissions($('#dropdown').data('item-type'), $('#dropdown').data('item-source'), $(li).data('share-type'), $(li).data('share-with'), permissions); }); - $('#linkCheckbox').live('change', function() { + $('#linkCheckbox').on('change', function() { var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); if (this.checked) { @@ -532,12 +532,12 @@ $(document).ready(function() { } }); - $('#linkText').live('click', function() { + $('#linkText').on('click', function() { $(this).focus(); $(this).select(); }); - $('#showPassword').live('click', function() { + $('#showPassword').on('click', function() { $('#linkPass').toggle('blind'); if (!$('#showPassword').is(':checked') ) { var itemType = $('#dropdown').data('item-type'); @@ -548,7 +548,7 @@ $(document).ready(function() { } }); - $('#linkPassText').live('focusout keyup', function(event) { + $('#linkPassText').on('focusout keyup', function(event) { if ( $('#linkPassText').val() != '' && (event.type == 'focusout' || event.keyCode == 13) ) { var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); @@ -560,7 +560,7 @@ $(document).ready(function() { } }); - $('#expirationCheckbox').live('click', function() { + $('#expirationCheckbox').on('click', function() { if (this.checked) { OC.Share.showExpirationDate(''); } else { @@ -575,7 +575,7 @@ $(document).ready(function() { } }); - $('#expirationDate').live('change', function() { + $('#expirationDate').on('change', function() { var itemType = $('#dropdown').data('item-type'); var itemSource = $('#dropdown').data('item-source'); $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'setExpirationDate', itemType: itemType, itemSource: itemSource, date: $(this).val() }, function(result) { @@ -586,7 +586,7 @@ $(document).ready(function() { }); - $('#emailPrivateLink').live('submit', function(event) { + $('#emailPrivateLink').on('submit', function(event) { event.preventDefault(); var link = $('#linkText').val(); var itemType = $('#dropdown').data('item-type'); |