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