mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-12-22 13:13:48 +01:00
Disabling prev, next and save buttons for now (code ready to enable/disable according to state) #41
This commit is contained in:
parent
5f15b9945c
commit
8745e037a4
@ -37,6 +37,7 @@ function initButtonBehavior() {
|
||||
|
||||
btnPrevious = $(".btnPrevious");
|
||||
btnNext = $(".btnNext");
|
||||
btnSave = $(".btnSave");
|
||||
|
||||
//debug
|
||||
//btnDebug = $(".debugBtn");
|
||||
@ -44,12 +45,6 @@ function initButtonBehavior() {
|
||||
btnNew.on('touchstart mousedown', clearDoodle);
|
||||
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) {
|
||||
// e.preventDefault();
|
||||
// // console.log("clear");
|
||||
@ -392,6 +387,25 @@ function setState(newState,newHasControl) {
|
||||
enableButton(btnSettings, openSettingsWindow);
|
||||
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) {
|
||||
message.set("Lost connection to WiFi box",Message.ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user