Update to v1.0.2

Change timeout to 30 seconds
Add version info to settings
This commit is contained in:
2014-05-14 21:05:33 +01:00
parent ff92dc6f41
commit 0fa7bd127f
16 changed files with 201 additions and 121 deletions

View File

@@ -15,6 +15,7 @@ var form = function() {
};
this.config = this.getConfig();
this.updateForm();
this.showVersion(this.config.pblversion,this.config.jsversion);
this.attach();
}
form.prototype.getConfig = function() {
@@ -25,6 +26,8 @@ form.prototype.getConfig = function() {
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var config = {};
config.jsversion = getParameterByName("jsversion");
config.pblversion = getParameterByName("pblversion");
config.apikey = getParameterByName("apikey");
config.update = getParameterByName("update");
config.dark = (getParameterByName("dark") == "true")?true:false;
@@ -58,6 +61,21 @@ form.prototype.updateForm = function() {
this.el.flick.children[0].innerHTML = "OFF";
}
}
form.prototype.showVersion = function(pbl,js) {
var version = (pbl)?pbl:js;
var listItems = document.getElementsByClassName("app-version");
for (var i=0;i<listItems.length;i++) {
if(listItems[i].getAttribute("data-version") == version) {
var h3 = listItems[i].getElementsByTagName("h3")[0];
h3.innerHTML = h3.innerHTML + " &ndash; <span>INSTALLED</span>";
}
}
if(pbl && js) {
document.getElementById("appversioninfo").innerHTML = pbl;
document.getElementById("jsversioninfo").innerHTML = js;
document.getElementById("versioninfo").style.display = "inline";
}
}
form.prototype.attach = function() {
var that = this;
this.el.bgcolour.addEventListener("click", function(e) {