felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r741256 - /felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
Date Thu, 05 Feb 2009 19:38:34 GMT
Author: cziegeler
Date: Thu Feb  5 19:38:34 2009
New Revision: 741256

URL: http://svn.apache.org/viewvc?rev=741256&view=rev
Log:
FELIX-858 : Fix sorting problems and sort table by name per default.

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=741256&r1=741255&r2=741256&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/bundles.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/bundles.js Thu Feb  5 19:38:34 2009
@@ -201,8 +201,8 @@
 	}
 }
 
-function renderBundles(data) {	
-    $(document).ready(function(){
+function renderBundles(data) {
+	$(document).ready(function(){
     	renderView( ["Id", "Name", "Status", "Actions"],
         		"<input type='hidden' name='action' value='install' style='margin-left:20px;'/>"
+
                 "<input class='input' type='file' name='bundlefile' size='50' style='margin-left:10px;'/>"
+
@@ -214,10 +214,20 @@
         $("#refreshPackages").click(refreshPackages);
         renderData(data);
         
+        var extractMethod = function(node) {
+        	var link = node.getElementsByTagName("a");
+            if ( link && link.length == 1 ) {
+            	return link[0].innerHTML;
+            }
+            return node.innerHTML;
+        };
         $("#bundles").tablesorter({
-            headers: { 
+            headers: {
+        	    0: { sorter:"digit"},
                 3: { sorter: false }
-            } 
+            },
+            sortList: [[1,0]],
+            textExtraction:extractMethod 
         });
     });
 }



Mime
View raw message