diff --git a/Makefile b/Makefile index 63e5478..26d7b9a 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/webbuild/html/scripts/socialbox.js b/webbuild/html/scripts/socialbox.js new file mode 100644 index 0000000..ad27228 --- /dev/null +++ b/webbuild/html/scripts/socialbox.js @@ -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); +} diff --git a/webbuild/html/scripts/webbuild.js b/webbuild/html/scripts/webbuild.js new file mode 100644 index 0000000..7311c2f --- /dev/null +++ b/webbuild/html/scripts/webbuild.js @@ -0,0 +1,14 @@ +function getCheckedValuesByName(checkboxname) { + var e=document.getElementsByName(checkboxname); + var p=""; + + for (var j=0;j