webbuild: added server side javascript includes and css styles
This commit is contained in:
parent
0601482f54
commit
12d8eafdc4
3
Makefile
3
Makefile
@ -19,6 +19,7 @@ configdir = ${sysconfdir}/autodist
|
|||||||
localstatedir= /var
|
localstatedir= /var
|
||||||
piddir= ${localstatedir}/run/autodist
|
piddir= ${localstatedir}/run/autodist
|
||||||
cgidir = ${localstatedir}/www/cgi-bin
|
cgidir = ${localstatedir}/www/cgi-bin
|
||||||
|
htmldir = ${localstatedir}/www/html
|
||||||
|
|
||||||
srcdir = .
|
srcdir = .
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
@ -49,6 +50,7 @@ install-dirs:
|
|||||||
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
@$(INSTALL_DIR) $(DESTDIR)$(bindir)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
@$(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(cgidir)
|
@$(INSTALL_DIR) $(DESTDIR)$(cgidir)
|
||||||
|
@$(INSTALL_DIR) $(DESTDIR)$(htmldir)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_datadir)
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_datadir)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)
|
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/template/autoupdate/spec-patches-build/old
|
@$(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-sudo $(DESTDIR)$(libexecdir)/webbuild-sudo
|
||||||
@$(INSTALL_SCRIPT) webbuild/webbuild-checkpassword $(DESTDIR)$(libexecdir)/webbuild-checkpassword
|
@$(INSTALL_SCRIPT) webbuild/webbuild-checkpassword $(DESTDIR)$(libexecdir)/webbuild-checkpassword
|
||||||
@$(INSTALL_SCRIPT) webbuild/webbuild-functions $(DESTDIR)$(pck_datadir)/webbuild-functions
|
@$(INSTALL_SCRIPT) webbuild/webbuild-functions $(DESTDIR)$(pck_datadir)/webbuild-functions
|
||||||
|
@cp -a webbuild/html/* $(DESTDIR)$(htmldir)
|
||||||
|
|
||||||
install-data:
|
install-data:
|
||||||
@$(INSTALL_DATA) etc/autodist/config $(DESTDIR)$(configdir)/config
|
@$(INSTALL_DATA) etc/autodist/config $(DESTDIR)$(configdir)/config
|
||||||
|
32
webbuild/html/scripts/socialbox.js
Normal file
32
webbuild/html/scripts/socialbox.js
Normal 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);
|
||||||
|
}
|
14
webbuild/html/scripts/webbuild.js
Normal file
14
webbuild/html/scripts/webbuild.js
Normal 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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user