Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[livejournal] r16304: LJSUP-5547: Update jQuery to v. 1.4.2. R...

Committer: pkornilov
LJSUP-5547: Update jQuery to v. 1.4.2. Remove hacks.
U   trunk/htdocs/js/esn.js
U   trunk/htdocs/js/settings.js
Modified: trunk/htdocs/js/esn.js
===================================================================
--- trunk/htdocs/js/esn.js	2010-03-02 12:09:08 UTC (rev 16303)
+++ trunk/htdocs/js/esn.js	2010-03-03 04:39:22 UTC (rev 16304)
@@ -384,7 +384,7 @@
 };
 
 jQuery(function($){
-	$({selector: 'a.delete-group', context: $('#settings_form')}).live('click', function(e)
+	$('#settings_form').delegate('a.delete-group', 'click', function(e)
 	{
 		var group = this.href.match('&delete_group=(.*?)&')[1];
 		$.post(location.href, {

Modified: trunk/htdocs/js/settings.js
===================================================================
--- trunk/htdocs/js/settings.js	2010-03-02 12:09:08 UTC (rev 16303)
+++ trunk/htdocs/js/settings.js	2010-03-03 04:39:22 UTC (rev 16304)
@@ -5,13 +5,14 @@
 
 	init: function($)
 	{
-		if (!$('#settings_form').length) {
+		Settings.$form = $('#settings_form');
+		if (!Settings.$form.length) {
 			return;
 		}
 		// delegate onclick on all links to confirm form saving
-		$({selector: 'a', context: document}).live('click', Settings.navclick_save);
+		$(document).delegate('a', 'click', Settings.navclick_save);
 		
-		$({selector:'select, input, textarea', context: $('#settings_form')}).live('change', function()
+		Settings.$form.delegate('select, input, textarea', 'change', function()
 		{
 			Settings.form_changed = true;
 		});
@@ -24,7 +25,7 @@
 		}
 		
 		var confirmed = confirm(Settings.confirm_msg);
-		confirmed && $('settings_form').submit();
+		confirmed && Settings.$form.submit();
 	}
 }
 

Tags: js, livejournal, lusever
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments