2013-08-09 22:25:14 +02:00
|
|
|
var debug = false;
|
2013-08-07 20:47:47 +02:00
|
|
|
|
|
|
|
var printer = new Printer();
|
2013-08-09 22:25:14 +02:00
|
|
|
|
2013-08-07 20:47:47 +02:00
|
|
|
$(function() {
|
|
|
|
console.log("ready");
|
|
|
|
//var wifiboxURL = "http://" + window.location.host + "/cgi-bin/d3dapi";
|
|
|
|
var wifiboxURL = "http://192.168.5.1/cgi-bin/d3dapi";
|
|
|
|
console.log("wifibox URL: " + wifiboxURL);
|
2013-08-09 22:25:14 +02:00
|
|
|
|
2013-08-07 20:47:47 +02:00
|
|
|
initLayouting();
|
|
|
|
|
|
|
|
initDoodleDrawing();
|
|
|
|
initPreviewRendering();
|
|
|
|
|
|
|
|
initButtonBehavior();
|
|
|
|
|
|
|
|
initSettingsPopup(wifiboxURL);
|
|
|
|
|
|
|
|
$("#settings .settings").load("settings.html", function() {
|
|
|
|
console.log("finished loading settings.html, now loading settings...");
|
|
|
|
loadSettings();
|
|
|
|
});
|
|
|
|
|
|
|
|
if(debug) {
|
|
|
|
console.log("debug mode");
|
|
|
|
$("body").css("overflow", "auto");
|
|
|
|
$("#debug_textArea").css("display", "block");
|
|
|
|
}
|
|
|
|
|
|
|
|
printer.init();
|
|
|
|
printer.preheat();
|
|
|
|
|
2013-08-09 22:25:14 +02:00
|
|
|
$(document).on(Printer.UPDATE,update);
|
2013-08-07 20:47:47 +02:00
|
|
|
|
|
|
|
})
|