From 0d1a067742445f7d89c383dc767127814cf24574 Mon Sep 17 00:00:00 2001 From: letsjump Date: Fri, 24 Apr 2015 23:06:19 +0200 Subject: [PATCH] updates for Yii-1.1.16 (jQuery 1.9+): replaced deprecated live() events --- EUpdateDialog/EUpdateDialog.php | 2 +- EUpdateDialog/assets/EUpdateDialog.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/EUpdateDialog/EUpdateDialog.php b/EUpdateDialog/EUpdateDialog.php index 7c0443d..d53cdb3 100644 --- a/EUpdateDialog/EUpdateDialog.php +++ b/EUpdateDialog/EUpdateDialog.php @@ -99,7 +99,7 @@ public function run() // Open update dialog the clicking target elements $cs->registerScript( 'eupdatedialog', " - jQuery( '{$this->target}' ).live( 'click', updateDialogOpen );", + jQuery( '{$this->target}' ).on( 'click', updateDialogOpen );", CClientScript::POS_END ); // Register additional options for an extension diff --git a/EUpdateDialog/assets/EUpdateDialog.js b/EUpdateDialog/assets/EUpdateDialog.js index 6437f47..44f7152 100644 --- a/EUpdateDialog/assets/EUpdateDialog.js +++ b/EUpdateDialog/assets/EUpdateDialog.js @@ -182,8 +182,8 @@ var updateDialog = { this.csrfToken = this.getCsrfToken(); // Attach a handler for all submit buttons in dialog content - $( '.update-dialog-content input[type=submit]' ) - .live( 'click', function( e ){ + $( '.update-dialog-content' ) + .on('click', 'input[type=submit]', function (e) { // Prevent default action e.preventDefault(); @@ -192,8 +192,8 @@ var updateDialog = { }); // Attach a handler for all cancel buttons in dialog content - $( '.update-dialog-content .update-dialog-cancel-button' ) - .live( 'click', function( e ){ + $( '.update-dialog-content' ) + .on('click', '.update-dialog-cancel-button', function (e) { // Prevent default action e.preventDefault();