felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvalc...@apache.org
Subject svn commit: r1235702 - /felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js
Date Wed, 25 Jan 2012 09:42:05 GMT
Author: vvalchev
Date: Wed Jan 25 09:42:05 2012
New Revision: 1235702

URL: http://svn.apache.org/viewvc?rev=1235702&view=rev
Log:
Fixed FELIX-3314 Sort UPnP devices in alphabetical order
https://issues.apache.org/jira/browse/FELIX-3314

Modified:
    felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js

Modified: felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js?rev=1235702&r1=1235701&r2=1235702&view=diff
==============================================================================
--- felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js (original)
+++ felix/trunk/webconsole-plugins/upnp/src/main/resources/res/upnp.js Wed Jan 25 09:42:05
2012
@@ -256,6 +256,7 @@ function listDevices() {
 	
 	$.post(pluginRoot, { 'action': 'listDevices' }, function(data) {
 		if (data && data.devices) {
+			data.devices.sort(function(a,b){ return a.props['UPnP.device.friendlyName'] > b.props['UPnP.device.friendlyName']});
 			$.each(data.devices, function(index) {
 				var html = addDevice(this);
 				browser.treeview( { add: html.appendTo(browser) } );



Mime
View raw message