mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Merge branch 'master' into develop
This commit is contained in:
commit
a545f8f2b1
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
.idea/*
|
.idea/*
|
||||||
www/js/*.js
|
www/js/*.js
|
||||||
|
www/js/libs/*.js
|
||||||
www/css/styles.css
|
www/css/styles.css
|
||||||
www/css/*.min.css
|
www/css/*.min.css
|
||||||
__index.html
|
__index.html
|
||||||
|
@ -43,6 +43,7 @@ function SettingsWindow() {
|
|||||||
|
|
||||||
this.retryLoadSettingsDelay; // retry setTimout instance
|
this.retryLoadSettingsDelay; // retry setTimout instance
|
||||||
this.retrySaveSettingsDelay; // retry setTimout instance
|
this.retrySaveSettingsDelay; // retry setTimout instance
|
||||||
|
this.retryResetSettingsDelay // retry setTimout instance
|
||||||
this.retryRetrieveNetworkStatusDelay;// retry setTimout instance
|
this.retryRetrieveNetworkStatusDelay;// retry setTimout instance
|
||||||
|
|
||||||
this.apFieldSet;
|
this.apFieldSet;
|
||||||
@ -119,6 +120,7 @@ function SettingsWindow() {
|
|||||||
self.clientFieldSet = self.form.find("#clientSettings");
|
self.clientFieldSet = self.form.find("#clientSettings");
|
||||||
self.gcodeSettings = self.form.find("#gcodeSettings");
|
self.gcodeSettings = self.form.find("#gcodeSettings");
|
||||||
self.x3gSettings = self.form.find("#x3gSettings");
|
self.x3gSettings = self.form.find("#x3gSettings");
|
||||||
|
self.btnRestoreSettings = self.form.find("#restoreSettings");
|
||||||
|
|
||||||
btnAP.on('touchstart mousedown',self.showAPSettings);
|
btnAP.on('touchstart mousedown',self.showAPSettings);
|
||||||
btnClient.on('touchstart mousedown',self.showClientSettings);
|
btnClient.on('touchstart mousedown',self.showClientSettings);
|
||||||
@ -127,6 +129,8 @@ function SettingsWindow() {
|
|||||||
btnCreate.on('touchstart mousedown',self.createAP);
|
btnCreate.on('touchstart mousedown',self.createAP);
|
||||||
self.printerSelector.change(self.printerSelectorChanged);
|
self.printerSelector.change(self.printerSelectorChanged);
|
||||||
networkSelector.change(self.networkSelectorChanged);
|
networkSelector.change(self.networkSelectorChanged);
|
||||||
|
self.btnRestoreSettings.on('touchstart mousedown',self.resetSettings);
|
||||||
|
|
||||||
|
|
||||||
// update panel
|
// update panel
|
||||||
var $updatePanelElement = self.form.find("#updatePanel");
|
var $updatePanelElement = self.form.find("#updatePanel");
|
||||||
@ -263,6 +267,40 @@ function SettingsWindow() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.resetSettings = function() {
|
||||||
|
console.log("resetSettings");
|
||||||
|
//$("#restoreSettings").addClass("disabled");
|
||||||
|
self.btnRestoreSettings.attr("disabled", true);
|
||||||
|
|
||||||
|
//console.log(" self.wifiboxURL: ",self.wifiboxURL);
|
||||||
|
|
||||||
|
if (communicateWithWifibox) {
|
||||||
|
$.ajax({
|
||||||
|
url: self.wifiboxURL + "/config/resetall",
|
||||||
|
type: "POST",
|
||||||
|
dataType: 'json',
|
||||||
|
timeout: this.timeoutTime,
|
||||||
|
success: function(response){
|
||||||
|
console.log("Settings:resetSettings response: ",response);
|
||||||
|
if(response.status == "error") {
|
||||||
|
clearTimeout(self.retryResetSettingsDelay);
|
||||||
|
self.retryResetSettingsDelay = setTimeout(function() { self.resetSettings() },self.retryDelay); // retry after delay
|
||||||
|
} else {
|
||||||
|
settings = response.data;
|
||||||
|
console.log(" settings: ",settings);
|
||||||
|
self.fillForm();
|
||||||
|
$(document).trigger(SettingsWindow.SETTINGS_LOADED);
|
||||||
|
|
||||||
|
self.btnRestoreSettings.removeAttr("disabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).fail(function() {
|
||||||
|
console.log("Settings:resetSettings: failed");
|
||||||
|
clearTimeout(self.retryResetSettingsDelay);
|
||||||
|
self.retryResetSettingsDelay = setTimeout(function() { self.resetSettings() },self.retryDelay); // retry after delay
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
this.displayValidationError = function(key,msg) {
|
this.displayValidationError = function(key,msg) {
|
||||||
var formElement = self.form.find("[name|='"+key+"']");
|
var formElement = self.form.find("[name|='"+key+"']");
|
||||||
formElement.addClass("error");
|
formElement.addClass("error");
|
||||||
|
@ -64,23 +64,28 @@
|
|||||||
border: 1px solid rgb(187, 187, 187);
|
border: 1px solid rgb(187, 187, 187);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
> .btnContainer {
|
> .right {
|
||||||
width: 15%;
|
width: 15%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
float:right;
|
float:right;
|
||||||
position:relative;
|
position:relative;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
> .btnOK {
|
> .btnContainer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 3%;
|
bottom: 3%;
|
||||||
right: 7%;
|
right: 7%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
> .btn {
|
||||||
max-width: 85px;
|
max-width: 85px;
|
||||||
min-width: 42px;
|
min-width: 42px;
|
||||||
width: 88%;
|
width: 88%;
|
||||||
height: auto;
|
height: auto;
|
||||||
margin: 0 2% 2% 0;
|
margin: 8% 2% 2% 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
float:right;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
www/img/buttons/btnReset_settings.png
Normal file
BIN
www/img/buttons/btnReset_settings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
@ -115,8 +115,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="bottompanel">
|
<div class="bottompanel">
|
||||||
<div class="settingsContainer"></div>
|
<div class="settingsContainer"></div>
|
||||||
|
<div class="right">
|
||||||
<div class="btnContainer">
|
<div class="btnContainer">
|
||||||
<img src="img/buttons/btnOk_settings.png" class="btnOK" alt="settings"/>
|
<img src="img/buttons/btnOk_settings.png" class="btn btnOK" alt="save"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
3
www/js/libs/jquery-1-9-1.min.js
vendored
3
www/js/libs/jquery-1-9-1.min.js
vendored
File diff suppressed because one or more lines are too long
1
www/js/libs/jquery-cookie.min.js
vendored
1
www/js/libs/jquery-cookie.min.js
vendored
@ -1 +0,0 @@
|
|||||||
!function(a,b,c){function d(a){return a}function e(a){return decodeURIComponent(a.replace(f," "))}var f=/\+/g;a.cookie=function(f,g,h){if(g!==c&&!/Object/.test(Object.prototype.toString.call(g))){if(h=a.extend({},a.cookie.defaults,h),null===g&&(h.expires=-1),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=String(g),b.cookie=[encodeURIComponent(f),"=",h.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}h=g||a.cookie.defaults||{};for(var k,l=h.raw?d:e,m=b.cookie.split("; "),n=0;k=m[n]&&m[n].split("=");n++)if(l(k.shift())===f)return l(k.join("="));return null},a.cookie.defaults={},a.removeCookie=function(b,c){return null!==a.cookie(b,c)?(a.cookie(b,null,c),!0):!1}}(jQuery,document);
|
|
1
www/js/libs/jquery-joyride-2-1.min.js
vendored
1
www/js/libs/jquery-joyride-2-1.min.js
vendored
File diff suppressed because one or more lines are too long
@ -180,6 +180,10 @@
|
|||||||
<legend>Debug</legend>
|
<legend>Debug</legend>
|
||||||
<input type="button" onclick="settingsWindow.downloadlogs()" name="downloadlogs" value="Download logs" class="button" id="downloadlogs"/>
|
<input type="button" onclick="settingsWindow.downloadlogs()" name="downloadlogs" value="Download logs" class="button" id="downloadlogs"/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
<fieldset id="restorePanel">
|
||||||
|
<legend>Restore</legend>
|
||||||
|
<input type="button" name="restoresettings" value="Restore settings to defaults" class="button" id="restoreSettings"/>
|
||||||
|
</fieldset>
|
||||||
</form><br/>
|
</form><br/>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user