mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Merge branch 'feature/printerdriver' of https://github.com/Doodle3D/doodle3d-client into feature/printerdriver
# By peteruithoven # Via peteruithoven * 'feature/printerdriver' of https://github.com/Doodle3D/doodle3d-client: Disabling prev, next and save buttons for now (code ready to enable/disable according to state) #41
This commit is contained in:
commit
176f8f4ae1
@ -37,6 +37,7 @@ function initButtonBehavior() {
|
|||||||
|
|
||||||
btnPrevious = $(".btnPrevious");
|
btnPrevious = $(".btnPrevious");
|
||||||
btnNext = $(".btnNext");
|
btnNext = $(".btnNext");
|
||||||
|
btnSave = $(".btnSave");
|
||||||
|
|
||||||
//debug
|
//debug
|
||||||
//btnDebug = $(".debugBtn");
|
//btnDebug = $(".debugBtn");
|
||||||
@ -44,12 +45,6 @@ function initButtonBehavior() {
|
|||||||
btnNew.on('touchstart mousedown', clearDoodle);
|
btnNew.on('touchstart mousedown', clearDoodle);
|
||||||
btnPrint.on('touchstart mousedown', print);
|
btnPrint.on('touchstart mousedown', print);
|
||||||
|
|
||||||
// not using these at the moment
|
|
||||||
$("#btnPrevious").css("opacity", "0.3");
|
|
||||||
btnNext.css("opacity", "0.3");
|
|
||||||
$("#btnSave").css("opacity", "0.3");
|
|
||||||
// btnInfo.css("opacity", "0.3");
|
|
||||||
|
|
||||||
// btnClear.click(function(e) {
|
// btnClear.click(function(e) {
|
||||||
// e.preventDefault();
|
// e.preventDefault();
|
||||||
// // console.log("clear");
|
// // console.log("clear");
|
||||||
@ -398,6 +393,25 @@ function setState(newState,newHasControl) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* save, next and prev buttons */
|
||||||
|
switch(newState) {
|
||||||
|
/*case Printer.WIFIBOX_DISCONNECTED_STATE:
|
||||||
|
disableButton(btnPrevious);
|
||||||
|
disableButton(btnNext);
|
||||||
|
disableButton(btnSave);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
enableButton(btnPrevious, null);
|
||||||
|
enableButton(btnNext, null);
|
||||||
|
enableButton(btnSave, null);
|
||||||
|
break;*/
|
||||||
|
default:
|
||||||
|
disableButton(btnPrevious);
|
||||||
|
disableButton(btnNext);
|
||||||
|
disableButton(btnSave);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(newState == Printer.WIFIBOX_DISCONNECTED_STATE) {
|
if(newState == Printer.WIFIBOX_DISCONNECTED_STATE) {
|
||||||
message.set("Lost connection to WiFi box",Message.ERROR);
|
message.set("Lost connection to WiFi box",Message.ERROR);
|
||||||
} else if(prevState == Printer.WIFIBOX_DISCONNECTED_STATE) {
|
} else if(prevState == Printer.WIFIBOX_DISCONNECTED_STATE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user