mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 22:25:56 -05:00
some global js functions
This commit is contained in:
parent
3fe312ead6
commit
7cf7d23bc4
@ -7,12 +7,12 @@ adminroot_DATA = ftr.html linkOpaque.gif status.html aspl-license.txt \
|
||||
mt-daapd.css mt-daapd.png config.html index.html required.gif \
|
||||
gpl-license.html aspl-license.html thanks.html feedback.html \
|
||||
playlist.html playlist.js smart.html smart.js DAAPApplet-0.1.jar \
|
||||
smartpopup.html applet.html CREDITS
|
||||
smartpopup.html applet.html mt-daapd.js CREDITS
|
||||
|
||||
EXTRA_DIST = ftr.html linkOpaque.gif status.html aspl-license.txt \
|
||||
gpl-license.txt linkTransparent.gif config-update.html hdr.html \
|
||||
mt-daapd.css mt-daapd.png config.html index.html required.gif \
|
||||
gpl-license.html aspl-license.html thanks.html feedback.html \
|
||||
playlist.html playlist.js smart.html smart.js DAAPApplet-0.1.jar \
|
||||
smartpopup.html applet.html CREDITS
|
||||
smartpopup.html applet.html mt-daapd.js CREDITS
|
||||
|
||||
|
46
admin-root/mt-daapd.js
Executable file
46
admin-root/mt-daapd.js
Executable file
@ -0,0 +1,46 @@
|
||||
/* JavaScript file containing basic stuff */
|
||||
|
||||
var reqStatus;
|
||||
var globalStatus = new Array();
|
||||
|
||||
function popUp(URL)
|
||||
{ day = new Date();
|
||||
id = day.getTime();
|
||||
eval("pagemtdaapdplPop = window.open(URL, 'mtdaapdple', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=240,left=320,top=448');");
|
||||
}
|
||||
|
||||
/* Temporary stuff follows */
|
||||
|
||||
function processStatus()
|
||||
{ globalStatus['statistics'] = new Array();
|
||||
var xmldoc = reqStatus.responseXML;
|
||||
}
|
||||
|
||||
|
||||
function reqStatusStateChange()
|
||||
{ if(reqStatus.readyState == 4)
|
||||
{ if(reqStatus.status == 200)
|
||||
{ processStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getStatusXML(url, async)
|
||||
{ // branch for native XMLHttpRequest object
|
||||
if (window.XMLHttpRequest)
|
||||
{ reqStatus = new XMLHttpRequest();
|
||||
reqStatus.onreadystatechange = reqStatusStateChange;
|
||||
reqStatus.open("GET", url, async);
|
||||
return reqStatus.send(null);
|
||||
// branch for IE/Windows ActiveX version
|
||||
} else if (window.ActiveXObject)
|
||||
{ reqStatus = new ActiveXObject("Microsoft.XMLHTTP");
|
||||
if (reqStatus)
|
||||
{ reqStatus.onreadystatechange = reqStatusStateChange;
|
||||
reqStatus.open("GET", url, async);
|
||||
return reqStatus.send();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user