You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by vv...@apache.org on 2010/04/14 15:15:06 UTC

svn commit: r933940 - /felix/trunk/webconsole/src/main/resources/res/ui/bundles.js

Author: vvalchev
Date: Wed Apr 14 13:15:06 2010
New Revision: 933940

URL: http://svn.apache.org/viewvc?rev=933940&view=rev
Log:
Fixed FELIX-2257 /Bundle sort order is not stored in a cookie anymore/
https://issues.apache.org/jira/browse/FELIX-2257

Modified:
    felix/trunk/webconsole/src/main/resources/res/ui/bundles.js

Modified: felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/bundles.js?rev=933940&r1=933939&r2=933940&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/bundles.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/bundles.js Wed Apr 14 13:15:06 2010
@@ -40,7 +40,10 @@ function renderData( eventData, filter )
         showDetails(id);
     }
     initStaticWidgets();
-	
+
+	var cv = $.cookies.get("webconsolebundlelist");
+	if (cv) bundlesTable.trigger('sorton', [cv]);
+
 	// show dialog on error
 	if (eventData.error) bundleOpError.dialog('open').find('pre').text(eventData.error)
 }
@@ -244,18 +247,15 @@ $(document).ready(function(){
 	});
 
 	// check for cookie
-	var cv = $.cookies.get("webconsolebundlelist");
-	var lo = (cv ? cv.split(",") : [1,0]);
 	bundlesTable = $("#plugin_table").tablesorter({
 		headers: {
 			0: { sorter:"digit" },
 			5: { sorter: false }
 		},
 		textExtraction:mixedLinksExtraction,
-		sortList: cv ? [lo] : false
 	}).bind("sortEnd", function() {
-		bundlesTable.eq(0).attr("config");
-		$.cookies.set("webconsolebundlelist", bundlesTable.sortList.toString());
+		var t = bundlesTable.eq(0).attr("config");
+		if (t.sortList) $.cookies.set("webconsolebundlelist", t.sortList);
 	});
 	bundlesBody     = bundlesTable.find('tbody');
 	bundlesTemplate = bundlesBody.find('tr').clone();