Use link instead of button
This commit is contained in:
parent
e10e8f8897
commit
22f93c6018
14
index.php
14
index.php
@ -28,7 +28,7 @@ $domaines = array(
|
|||||||
'name' => 'Orion',
|
'name' => 'Orion',
|
||||||
'url' => 'https://orion.netdldata.net/',
|
'url' => 'https://orion.netdldata.net/',
|
||||||
'real' => 'orion.lan',
|
'real' => 'orion.lan',
|
||||||
'port' => 80,
|
'port' => 443,
|
||||||
'img' => 'favicon_omv.png'
|
'img' => 'favicon_omv.png'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
@ -150,13 +150,16 @@ for (var key in servers) {
|
|||||||
var div = $('<div />', {
|
var div = $('<div />', {
|
||||||
class: 'button ' + orientation(orientation_etat)
|
class: 'button ' + orientation(orientation_etat)
|
||||||
});
|
});
|
||||||
|
var link = $('<a />', {
|
||||||
|
href: server.url,
|
||||||
|
});
|
||||||
|
div.append(link);
|
||||||
var button = $('<button />', {
|
var button = $('<button />', {
|
||||||
class: 'server',
|
class: 'server',
|
||||||
type: 'button',
|
type: 'button',
|
||||||
onclick: 'site("' + server.url + '")',
|
|
||||||
html: '<img class="favicon" src="images/' + server.img + '"><div class="description">' + server.name + '</div>'
|
html: '<img class="favicon" src="images/' + server.img + '"><div class="description">' + server.name + '</div>'
|
||||||
});
|
});
|
||||||
div.append(button);
|
link.append(button);
|
||||||
$("#buttons").append(div);
|
$("#buttons").append(div);
|
||||||
if (server.hasOwnProperty('running')){
|
if (server.hasOwnProperty('running')){
|
||||||
if (server.running) {
|
if (server.running) {
|
||||||
@ -178,11 +181,6 @@ function cookies() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function site(url) {
|
|
||||||
console.log(url);
|
|
||||||
document.location.href=url;
|
|
||||||
}
|
|
||||||
|
|
||||||
function orientation (status) {
|
function orientation (status) {
|
||||||
if (status == false)
|
if (status == false)
|
||||||
return "left";
|
return "left";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user