summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-02-03 21:55:54 -0800
committerThomas Müller <thomas.mueller@tmit.eu>2013-02-03 21:55:54 -0800
commit04b97a1906c40451880ef3534fc7fd87fcbdc438 (patch)
treeed0aac53a68322cf52204402f68e1f91d0a2306d /core
parent5ceddabaa65396d42fe67b4b6de5cd72bcb28f11 (diff)
parentb1da1db0eb5d738d5d5e5379796c048614d2ba00 (diff)
downloadnextcloud-server-04b97a1906c40451880ef3534fc7fd87fcbdc438.tar.gz
nextcloud-server-04b97a1906c40451880ef3534fc7fd87fcbdc438.zip
Merge pull request #1229 from owncloud/from_live_to_on
replace live() with on() in core js
Diffstat (limited to 'core')
-rw-r--r--core/js/oc-vcategories.js4
-rw-r--r--core/js/share.js26
2 files changed, 15 insertions, 15 deletions
diff --git a/core/js/oc-vcategories.js b/core/js/oc-vcategories.js
index 609703f2cc9..3e75767c49c 100644
--- a/core/js/oc-vcategories.js
+++ b/core/js/oc-vcategories.js
@@ -50,7 +50,7 @@ var OCCategories= {
$('#category_dialog').remove();
},
open : function(event, ui) {
- $('#category_addinput').live('input',function() {
+ $('#category_addinput').on('input',function() {
if($(this).val().length > 0) {
$('#category_addbutton').removeAttr('disabled');
}
@@ -61,7 +61,7 @@ var OCCategories= {
$('#category_addbutton').attr('disabled', 'disabled');
return false;
});
- $('#category_addbutton').live('click',function(e) {
+ $('#category_addbutton').on('click',function(e) {
e.preventDefault();
if($('#category_addinput').val().length > 0) {
OCCategories.add($('#category_addinput').val());
diff --git a/core/js/share.js b/core/js/share.js
index 0c45765bd8b..6ad4130690d 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) {
+ $('#fileList').on('click', 'a.share', 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) {
+ $('#fileList').on('mouseenter', '#dropdown #shareWithList li', function(event) {
// Show permissions and unshare button
$(':hidden', this).filter(':not(.cruds)').show();
});
- $('#shareWithList li').live('mouseleave', function(event) {
+ $('#fileList').on('mouseleave', '#dropdown #shareWithList 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() {
+ $('#fileList').on('click', '#dropdown .showCruds', function() {
$(this).parent().find('.cruds').toggle();
});
- $('.unshare').live('click', function() {
+ $('#fileList').on('click', '#dropdown .unshare', 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() {
+ $('#fileList').on('change', '#dropdown .permissions', 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() {
+ $('#fileList').on('change', '#dropdown #linkCheckbox', 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() {
+ $('#fileList').on('click', '#dropdown #linkText', function() {
$(this).focus();
$(this).select();
});
- $('#showPassword').live('click', function() {
+ $('#fileList').on('click', '#dropdown #showPassword', 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) {
+ $('#fileList').on('focusout keyup', '#dropdown #linkPassText', 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() {
+ $('#fileList').on('click', '#dropdown #expirationCheckbox', function() {
if (this.checked) {
OC.Share.showExpirationDate('');
} else {
@@ -575,7 +575,7 @@ $(document).ready(function() {
}
});
- $('#expirationDate').live('change', function() {
+ $('#fileList').on('change', '#dropdown #expirationDate', 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) {
+ $('#fileList').on('submit', '#dropdown #emailPrivateLink', function(event) {
event.preventDefault();
var link = $('#linkText').val();
var itemType = $('#dropdown').data('item-type');