From 4655e5609eaace05e61ed5aeee5dbd418ddd28cf Mon Sep 17 00:00:00 2001 From: Rick Companje Date: Fri, 1 May 2015 19:12:05 +0200 Subject: [PATCH] preparing image --- .gitignore | 4 ++++ Makefile | 4 ++++ js/Printer.js | 6 ++++++ js/api/SketchAPI.js | 2 ++ js/previewRendering.js | 2 +- js/settings/NetworkPanel.js | 10 ++++++++++ js/settings/UpdatePanel.js | 4 ++++ www/printmanager/js/Doodle.js | 2 +- 8 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 817405d..d6a611c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ less/verticalshapes_backup.css __settings.html css/_settings.css node_modules/* + +*.tgz + +*.tgz diff --git a/Makefile b/Makefile index 9be84e2..93ded34 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,7 @@ define Package/doodle3d-client/install $(INSTALL_DIR) $(1)/www $(INSTALL_DIR) $(1)/www/filemanager + $(INSTALL_DIR) $(1)/www/printmanager $(INSTALL_DIR) $(1)/www/css $(INSTALL_DIR) $(1)/www/img #$(INSTALL_DIR) $(1)/www/js @@ -72,14 +73,17 @@ define Package/doodle3d-client/install $(CP) $(PKG_BUILD_DIR)/www/img/* $(1)/www/img/ $(CP) $(PKG_BUILD_DIR)/www/filemanager/* $(1)/www/filemanager/ + $(CP) $(PKG_BUILD_DIR)/www/printmanager/* $(1)/www/printmanager/ ifeq ($(CONFIG_DOODLE3D_CLIENT_MINIFY_JS),y) $(CP) $(PKG_BUILD_DIR)/www/js/doodle3d-client.min.js $(1)/www/js/ + $(CP) $(PKG_BUILD_DIR)/www/js/doodle3d-api.min.js $(1)/www/js/ else #NOTE: if using a symlink here installation with openwrt make fails # when trying to build with minification after package has been built # without minification (dangling symlink breaks openwrt's final copy command) $(CP) $(PKG_BUILD_DIR)/www/js/doodle3d-client.js $(1)/www/js/doodle3d-client.min.js + $(CP) $(PKG_BUILD_DIR)/www/js/doodle3d-api.js $(1)/www/js/doodle3d-api.min.js #$(LN) -s /www/js/doodle3d-client.js $(1)/www/js/doodle3d-client.min.js endif diff --git a/js/Printer.js b/js/Printer.js index 831bce5..1726020 100644 --- a/js/Printer.js +++ b/js/Printer.js @@ -19,6 +19,7 @@ function setPrintprogress(val) { //*/ function Printer() { + var className = 'Printer'; Printer.WIFIBOX_DISCONNECTED_STATE = "wifibox disconnected"; Printer.UNKNOWN_STATE = "unknown"; // happens when a printer is connection but there isn't communication yet @@ -275,6 +276,11 @@ function Printer() { } this.checkStatus = function() { + + if (limitedFeatures) { + return; //don't check printer status when in limitedFeatures mode + } + //console.log("Printer:checkStatus"); this.stateOverruled = false; //console.log(" stateOverruled: ",this.stateOverruled); diff --git a/js/api/SketchAPI.js b/js/api/SketchAPI.js index 11a2348..bcdca9c 100644 --- a/js/api/SketchAPI.js +++ b/js/api/SketchAPI.js @@ -7,12 +7,14 @@ */ function SketchAPI() { + var className = 'SketchAPI'; this.load = function(id,success,fail) { API.get('sketch/?id='+id,success,fail); } this.save = function(data,success,fail) { + console.log(className,'saving sketch',data); API.post('sketch',{data:data},success,fail); } diff --git a/js/previewRendering.js b/js/previewRendering.js index db74c44..c0b5cff 100644 --- a/js/previewRendering.js +++ b/js/previewRendering.js @@ -16,7 +16,7 @@ var previewCtx_tmp; var previewDefaults = { rotation: 0, //Math.PI/90, - numLayers: 5, //was 10 + numLayers: 1, //was 10 showTravelLines: false } diff --git a/js/settings/NetworkPanel.js b/js/settings/NetworkPanel.js index 9745d20..5b5ccbf 100644 --- a/js/settings/NetworkPanel.js +++ b/js/settings/NetworkPanel.js @@ -111,6 +111,10 @@ function NetworkPanel() { _self.retrieveNetworkStatus(false); } this.refreshNetworks = function(completeHandler) { + if (limitedFeatures) { + return; //don't check printer status when in limitedFeatures mode + } + //console.log("NetworkPanel:refreshNetworks"); _api.scan(function(data) { // completed //console.log("NetworkPanel:scanned"); @@ -143,7 +147,13 @@ function NetworkPanel() { }; this.retrieveNetworkStatus = function(connecting) { + + if (limitedFeatures) { + return; //don't check network status when in limitedFeatures mode + } + //console.log("NetworkPanel:retrieveNetworkStatus"); + _api.status(function(data) { if(data.status === "") { data.status = NetworkAPI.STATUS.CREATED.toString(); diff --git a/js/settings/UpdatePanel.js b/js/settings/UpdatePanel.js index 6afd3cc..a82b02e 100644 --- a/js/settings/UpdatePanel.js +++ b/js/settings/UpdatePanel.js @@ -136,6 +136,10 @@ function UpdatePanel() { } this.checkStatus = function(keepChecking) { + if (limitedFeatures) { + return; //don't check printer status when in limitedFeatures mode + } + if (!communicateWithWifibox) return; $.ajax({ url: self.wifiboxURL + "/update/status", diff --git a/www/printmanager/js/Doodle.js b/www/printmanager/js/Doodle.js index f074aac..7abf815 100644 --- a/www/printmanager/js/Doodle.js +++ b/www/printmanager/js/Doodle.js @@ -36,7 +36,7 @@ var Doodle = function(svgData,settings) { function getSvgFileData() { return '' + ''; + '">'; } function setFromSvgPathDescription(svgData) {