layout improvement

This commit is contained in:
Rick Companje 2017-05-16 11:57:13 +02:00
parent f486bd1777
commit b07ff8c130
2 changed files with 41 additions and 33 deletions

View File

@ -20,6 +20,7 @@
var _printerAPI = new PrinterAPI();
var _pageData = {};
var _updateStatus = {};
var _title;
var PAGE_ID = "#settings";
@ -37,6 +38,7 @@
console.log(PAGE_ID+":pageinit");
_page = $(this);
_title = _page.find(".ui-title");
$("#divSettings").hide();
d3d.util.showLoader();
@ -44,6 +46,8 @@
$("#lstPrinters").on("change", function(data) {
var printerType = $(this).val();
d3d.util.showLoader();
_configAPI.savePrinterType(printerType,function(successData) {
refreshSettings();
},function(failData) {
@ -106,6 +110,8 @@
return;
}
var boxURL = "http://"+_pageData.localip;
_title.text("Settings for " + _pageData.wifiboxid);
_configAPI.init(boxURL);
_printerAPI.init(boxURL);

View File

@ -279,15 +279,14 @@
</div><!-- /header -->
<div id="divSettings" role="main" class="ui-content">
<p class="intro">Use this page to select which 3D-printer is connected to your Doodle3D WiFi-Box. By selecting a printer the default settings for this printer will be loaded. Values are saved automatically.</p>
<p class="intro">Use this page to select which 3D-printer is connected to your Doodle3D WiFi-Box. You can change settings per printer. Your settings are saved automatically.</p>
<div data-role="collapsible" data-collapsed="false">
<label for="name">Please select your 3D-printer model:</label>
<select id="lstPrinters"></select>
<div data-role="collapsible">
<h3>Printer settings</h3>
<div data-role="fieldcontain">
<label for="name">3D Printer model:</label>
<select id="lstPrinters"></select>
</div>
<div data-role="fieldcontain">
<!-- <label for="name"></label>
@ -311,9 +310,38 @@
<div class="ui-block-c"><input placeholder="z" name="dimensionsZ" id="dimensionsZ" type="number" data-mini="true"/></div>
</div>
</div>
<div data-role="collapsible">
<h3>GCODE settings</h3>
<div data-role="fieldcontain">
<label for="startgcode">Start gcode:</label>
<textarea name="startgcode" id="startgcode"></textarea>
</div>
<div data-role="fieldcontain">
<label for="endgcode">End gcode:</label>
<textarea name="endgcode" id="endgcode"></textarea>
</div>
<div data-role="collapsible" data-mini="true">
<h3>Help</h3>
<small>
The following texts are replaced:
<dl>
<dt>{printingTemp}</dt><dd>Printing temperature</dd>
<dt>{printingBedTemp}</dt><dd>Printing bed temperature</dd>
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
<dt>{printerType}</dt><dd>Printer type</dd>
<dt>{if heatedBed}</dt><dd>Enable line if printer has heated bed</dd>
</dl>
</small>
</div>
</div>
</div>
<div data-role="collapsible" data-collapsed="false">
<div data-role="collapsible">
<h3>Material settings</h3>
<div data-role="fieldcontain">
@ -328,33 +356,7 @@
</div>
<div data-role="collapsible">
<h3>GCODE settings</h3>
<div data-role="fieldcontain">
<label for="startgcode">Start gcode:</label>
<textarea name="startgcode" id="startgcode"></textarea>
</div>
<div data-role="fieldcontain">
<label for="endgcode">End gcode:</label>
<textarea name="endgcode" id="endgcode"></textarea>
</div>
<div data-role="collapsible" data-mini="true">
<h3>Help</h3>
<small>
The following texts are replaced:
<dl>
<dt>{printingTemp}</dt><dd>Printing temperature</dd>
<dt>{printingBedTemp}</dt><dd>Printing bed temperature</dd>
<dt>{preheatTemp}</dt><dd>Preheat temperature</dd>
<dt>{preheatBedTemp}</dt><dd>Preheat bed temperature</dd>
<dt>{printerType}</dt><dd>Printer type</dd>
<dt>{if heatedBed}</dt><dd>Enable line if printer has heated bed</dd>
</dl>
</small>
</div>
</div>
</div>
</div>