[pLog-svn] r3292 - plog/trunk/js/ui

mark at devel.lifetype.net mark at devel.lifetype.net
Fri Apr 28 03:17:39 GMT 2006


Author: mark
Date: 2006-04-28 03:17:38 +0000 (Fri, 28 Apr 2006)
New Revision: 3292

Modified:
   plog/trunk/js/ui/plogui.js
Log:
Keep the preselect result when you add a new category through ajax.

Modified: plog/trunk/js/ui/plogui.js
===================================================================
--- plog/trunk/js/ui/plogui.js	2006-04-27 21:18:13 UTC (rev 3291)
+++ plog/trunk/js/ui/plogui.js	2006-04-28 03:17:38 UTC (rev 3292)
@@ -115,8 +115,9 @@
 	    {
 			tmpText = $( 'postCategories' ).options[i-1].text;
 			tmpValue = $( 'postCategories' ).options[i-1].value;
+			tmpSelected = $( 'postCategories' ).options[i-1].selected;
 			$( 'postCategories' ).options[i] = new Option( tmpText, tmpValue );
-			$( 'postCategories' ).options[i].selected = false;
+			$( 'postCategories' ).options[i].selected = tmpSelected;
 	    }
 	    $( 'postCategories' ).options[0] = new Option( catName, catId );
 	    $( 'postCategories' ).options[0].selected = true;



More information about the pLog-svn mailing list