webbuild: added server side javascript includes and css styles

This commit is contained in:
Silvan Calarco 2012-09-21 13:03:27 +02:00
parent 0601482f54
commit 12d8eafdc4
3 changed files with 49 additions and 0 deletions

View File

@ -19,6 +19,7 @@ configdir = ${sysconfdir}/autodist
localstatedir= /var
piddir= ${localstatedir}/run/autodist
cgidir = ${localstatedir}/www/cgi-bin
htmldir = ${localstatedir}/www/html
srcdir = .
DESTDIR =
@ -49,6 +50,7 @@ install-dirs:
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
@$(INSTALL_DIR) $(DESTDIR)$(cgidir)
@$(INSTALL_DIR) $(DESTDIR)$(htmldir)
@$(INSTALL_DIR) $(DESTDIR)$(pck_datadir)
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/template/autoupdate/spec-patches-build/old
@ -74,6 +76,7 @@ install-programs:
@$(INSTALL_SCRIPT) webbuild/webbuild-sudo $(DESTDIR)$(libexecdir)/webbuild-sudo
@$(INSTALL_SCRIPT) webbuild/webbuild-checkpassword $(DESTDIR)$(libexecdir)/webbuild-checkpassword
@$(INSTALL_SCRIPT) webbuild/webbuild-functions $(DESTDIR)$(pck_datadir)/webbuild-functions
@cp -a webbuild/html/* $(DESTDIR)$(htmldir)
install-data:
@$(INSTALL_DATA) etc/autodist/config $(DESTDIR)$(configdir)/config

View File

@ -0,0 +1,32 @@
var url = "/cgi-bin/webbuild.cgi"
function ajax_getvalues_refresh(request) {
if (request != "")
request=request+"&REQUEST=refresh";
else
request="REQUEST=refresh";
if (window.XMLHttpRequest)
xmlhttp1 = new XMLHttpRequest();
else if (window.ActiveXObject)
xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
else
return;
xmlhttp1.onreadystatechange = function() {
if (xmlhttp1.readyState != 4)
return;
if (xmlhttp1.responseXML == undefined) {
return;
}
var xmldoc = xmlhttp1.responseXML.documentElement;
if (xmldoc.getElementsByTagName("socialbox").length >0) {
document.getElementById("socialbox").innerHTML = xmldoc.getElementsByTagName("socialbox")[0].childNodes[0].nodeValue;
$(function() { $('.scroll-pane').jScrollPane({scrollbarWidth:10}); });
}
lastupdate = (+new Date());
}
xmlhttp1.open("POST", url, true);
xmlhttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp1.send(request);
}

View File

@ -0,0 +1,14 @@
function getCheckedValuesByName(checkboxname) {
var e=document.getElementsByName(checkboxname);
var p="";
for (var j=0;j<e.length;j++) {
if (e[j].checked) p+=e[j].value+" ";
};
return p;
}
function getSelectedValueById(selectname) {
var i=document.getElementById(selectname).selectedIndex;
return document.getElementById(selectname).options[i].value;
}