start dailymotion support, improve vendor support
This commit is contained in:
@@ -153,29 +153,38 @@ select.interface {
|
||||
last_change = data["last_change"];
|
||||
$('#result>tbody').remove();
|
||||
$('#result').append('<tbody></ybody>');
|
||||
remote = []
|
||||
$.each(data, function(index, infos) {
|
||||
if (!infos) {
|
||||
return;
|
||||
} else if (index == "remotes") {
|
||||
remotes = infos;
|
||||
remotes = {};
|
||||
$.each(infos, function(provider, list) {
|
||||
remotes[provider]={};
|
||||
var keys = [];
|
||||
for (var key in list) {
|
||||
keys.push(key);
|
||||
}
|
||||
keys.sort ();
|
||||
for (i in keys) {
|
||||
remotes[provider][keys[i]]=list[keys[i]];
|
||||
}
|
||||
});
|
||||
} else if (index == "sessions") {
|
||||
$.each(infos, function(pid, infos) {
|
||||
line = '<tr>';
|
||||
line +='<td>'+infos['identifier']+'</td>';
|
||||
line +='<td>'+infos['provider']+'</td>';
|
||||
if (possible=remotes[infos['provider']]) {
|
||||
possible.sort();
|
||||
line += '<td><select id="server_'+pid+'" onchange="server_change('+pid+')">'
|
||||
if (infos['active-vpn']=="") {
|
||||
line += '<option value="">----------------</option>'
|
||||
}
|
||||
$.each(possible, function(i, remote) {
|
||||
$.each(possible, function(name, remote) {
|
||||
line += '<option value="'+remote+'"';
|
||||
if(remote == infos['active-vpn']) {
|
||||
line += ' selected ';
|
||||
}
|
||||
line += '>'+remote+'</option>';
|
||||
line += '>'+name+'</option>';
|
||||
});
|
||||
line+='</select></td>'
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user