0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-12-22 13:13:48 +01:00

Use host as API base URL.

This commit is contained in:
Wouter R 2013-07-29 19:07:41 +02:00
parent 7972273e27
commit d78317ecd6
3 changed files with 6 additions and 7 deletions

View File

@ -140,6 +140,8 @@
$(function() {
console.log("ready");
var wifiboxURL = "http://" + window.location.host + "/cgi-bin/d3dapi";
console.log("wifibox URL: " + wifiboxURL);
initLayouting();
@ -148,7 +150,7 @@
initButtonBehavior();
initSettingsPopup();
initSettingsPopup(wifiboxURL);
$("#settings .settings").load("settings.html", function() {
console.log("finished loading settings.html, now loading settings...");

View File

@ -1,10 +1,6 @@
var sendIndex;
var sendLength;
//var kastjeURL = "http://192.168.10.1/cgi-bin/d3dapi/";
var kastjeURL = "http://192.168.5.1/cgi-bin/d3dapi/";
var data = "";
function startPrint(gcode) {
console.log("f:startPrint()");

View File

@ -1,4 +1,4 @@
var wifiboxURL = "http://192.168.5.1/cgi-bin/d3dapi";
var wifiboxURL;//"http://192.168.5.1/cgi-bin/d3dapi";
var settings = {
layerHeight: 0.2,
@ -25,8 +25,9 @@ settingsForm.submit(function(e) {
return false;
})
function initSettingsPopup() {
function initSettingsPopup(apiURL) {
console.log("f:initSettingsPopup()");
wifiboxURL = apiURL;
$("#contentOverlay").hide();