summaryrefslogtreecommitdiffstats
path: root/apps
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 /apps
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 'apps')
-rw-r--r--apps/files/js/filelist.js8
-rw-r--r--apps/files/js/files.js6
-rw-r--r--apps/files_external/js/dropbox.js4
-rw-r--r--apps/files_external/js/google.js7
-rw-r--r--apps/files_external/js/settings.js6
5 files changed, 15 insertions, 16 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index d0810f70145..72b353b48c2 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -309,7 +309,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();
@@ -335,16 +335,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 8aec701e53f..7c377afc620 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;
});
@@ -123,7 +123,7 @@ $(document).ready(function() {
var lastChecked;
// Sets the file link behaviour :
- $('td.filename a').live('click',function(event) {
+ $('#fileList').on('click','td.filename a',function(event) {
if (event.ctrlKey || event.shiftKey) {
event.preventDefault();
if (event.shiftKey) {
@@ -189,7 +189,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;
diff --git a/apps/files_external/js/dropbox.js b/apps/files_external/js/dropbox.js
index a9a3155e677..cd3c957e0a8 100644
--- a/apps/files_external/js/dropbox.js
+++ b/apps/files_external/js/dropbox.js
@@ -36,7 +36,7 @@ $(document).ready(function() {
}
});
- $('#externalStorage tbody tr input').live('keyup', function() {
+ $('#externalStorage tbody').on('keyup', 'tr input', function() {
var tr = $(this).parent().parent();
if ($(tr).hasClass('\\\\OC\\\\Files\\\\Storage\\\\Dropbox') && $(tr).find('[data-parameter="configured"]').val() != 'true') {
var config = $(tr).find('.configuration');
@@ -52,7 +52,7 @@ $(document).ready(function() {
}
});
- $('.dropbox').live('click', function(event) {
+ $('.dropbox').on('click', function(event) {
event.preventDefault();
var app_key = $(this).parent().find('[data-parameter="app_key"]').val();
var app_secret = $(this).parent().find('[data-parameter="app_secret"]').val();
diff --git a/apps/files_external/js/google.js b/apps/files_external/js/google.js
index 7d759d13da4..9b7f9514f12 100644
--- a/apps/files_external/js/google.js
+++ b/apps/files_external/js/google.js
@@ -33,8 +33,7 @@ $(document).ready(function() {
}
});
- $('#externalStorage tbody tr').live('change', function() {
- console.log('hello');
+ $('#externalStorage tbody').on('change', 'tr', function() {
if ($(this).hasClass('\\\\OC\\\\Files\\\\Storage\\\\Google') && $(this).find('[data-parameter="configured"]').val() != 'true') {
if ($(this).find('.mountPoint input').val() != '') {
if ($(this).find('.google').length == 0) {
@@ -44,7 +43,7 @@ $(document).ready(function() {
}
});
- $('#externalStorage tbody tr .mountPoint input').live('keyup', function() {
+ $('#externalStorage tbody').on('keyup', 'tr .mountPoint input', function() {
var tr = $(this).parent().parent();
if ($(tr).hasClass('\\\\OC\\\\Files\\\\Storage\\\\Google') && $(tr).find('[data-parameter="configured"]').val() != 'true' && $(tr).find('.google').length > 0) {
if ($(this).val() != '') {
@@ -55,7 +54,7 @@ $(document).ready(function() {
}
});
- $('.google').live('click', function(event) {
+ $('.google').on('click', function(event) {
event.preventDefault();
var tr = $(this).parent().parent();
var configured = $(this).parent().find('[data-parameter="configured"]');
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 6cbc2180084..172ef097fbf 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -71,7 +71,7 @@ OC.MountConfig={
$(document).ready(function() {
$('.chzn-select').chosen();
- $('#selectBackend').live('change', function() {
+ $('#selectBackend').on('change', function() {
var tr = $(this).parent().parent();
$('#externalStorage tbody').append($(tr).clone());
$('#externalStorage tbody tr').last().find('.mountPoint input').val('');
@@ -135,11 +135,11 @@ $(document).ready(function() {
return defaultMountPoint+append;
}
- $('#externalStorage td').live('change', function() {
+ $('#externalStorage').on('change', 'td', function() {
OC.MountConfig.saveStorage($(this).parent());
});
- $('td.remove>img').live('click', function() {
+ $('td.remove>img').on('click', function() {
var tr = $(this).parent().parent();
var mountPoint = $(tr).find('.mountPoint input').val();
if ( ! mountPoint) {