|
|
@ -44,6 +44,7 @@ |
|
|
|
items: [{ |
|
|
|
xtype: "listview", |
|
|
|
title: gettext("Available servers"), |
|
|
|
ref: "serverlist", |
|
|
|
region: "west", |
|
|
|
width: 350, |
|
|
|
split: true, |
|
|
@ -51,7 +52,12 @@ |
|
|
|
store: new Ext.data.DirectStore({ |
|
|
|
directFn: MumbleList.servers, |
|
|
|
fields: [ 'id', 'name' ], |
|
|
|
autoLoad: true |
|
|
|
autoLoad: true, |
|
|
|
listeners: { |
|
|
|
load: function( store, records, objects ){ |
|
|
|
mainpanel.serverlist.select(0); |
|
|
|
} |
|
|
|
} |
|
|
|
}), |
|
|
|
columns: [{ |
|
|
|
header: gettext("Name"), |
|
|
@ -59,11 +65,6 @@ |
|
|
|
width: 1. |
|
|
|
}], |
|
|
|
listeners: { |
|
|
|
beforerender: function( listview ){ |
|
|
|
listview.store.on("load", function( store, records, objects ){ |
|
|
|
listview.select(0); |
|
|
|
}); |
|
|
|
}, |
|
|
|
dblclick: function(listview){ |
|
|
|
selectedstuff = listview.getSelectedRecords(); |
|
|
|
MumbleList.serverurl( selectedstuff[0].data.id, function(provider, response){ |
|
|
@ -73,6 +74,7 @@ |
|
|
|
selectionchange: function(listview, nodes){ |
|
|
|
selectedstuff = listview.getSelectedRecords(); |
|
|
|
MumbleList.serverinfo( selectedstuff[0].data.id, function(provider, response){ |
|
|
|
mainpanel.selectedServer = response.result; |
|
|
|
var info = renderserverinfos(response.result); |
|
|
|
mainpanel.descrippanel.el.dom.children[1].children[0].innerHTML = info; |
|
|
|
}); |
|
|
@ -84,6 +86,12 @@ |
|
|
|
title: gettext("Server overview"), |
|
|
|
ref: 'descrippanel', |
|
|
|
html: gettext("Loading..."), |
|
|
|
buttons: [{ |
|
|
|
text: gettext('Server details'), |
|
|
|
handler: function( button, state ){ |
|
|
|
location.href = mainpanel.selectedServer.detailsurl; |
|
|
|
} |
|
|
|
}] |
|
|
|
}], |
|
|
|
}); |
|
|
|
function updateLayout(){ |
|
|
|