mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 09:17:56 +01:00
Change message.set() to set html instead of text.
Move message div to appear on top of logo and dialog overlays. Minor text modifications.
This commit is contained in:
parent
2eaf21a030
commit
ee6bab1c5a
@ -24,21 +24,21 @@ function Message() {
|
|||||||
this.init = function($element) {
|
this.init = function($element) {
|
||||||
this.$element = $element;
|
this.$element = $element;
|
||||||
}
|
}
|
||||||
this.set = function(text,mode,autoHide,disableEffect) {
|
this.set = function(contents,mode,autoHide,disableEffect) {
|
||||||
console.log("Message:set: ",text,mode,autoHide,disableEffect);
|
console.log("Message:set: ",contents,mode,autoHide,disableEffect);
|
||||||
if(disableEffect) {
|
if(disableEffect) {
|
||||||
self.fill(text,mode,autoHide)
|
self.fill(contents,mode,autoHide)
|
||||||
} else{
|
} else{
|
||||||
self.hide(function() {
|
self.hide(function() {
|
||||||
self.show();
|
self.show();
|
||||||
self.fill(text,mode,autoHide)
|
self.fill(contents,mode,autoHide)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.fill = function(text,mode,autoHide) {
|
this.fill = function(contents,mode,autoHide) {
|
||||||
//console.log("Message:fill: ",text,mode,autoHide);
|
//console.log("Message:fill: ",text,mode,autoHide);
|
||||||
self.clear();
|
self.clear();
|
||||||
self.$element.text(text);
|
self.$element.html(contents);
|
||||||
self.$element.addClass(mode);
|
self.$element.addClass(mode);
|
||||||
self.mode = mode;
|
self.mode = mode;
|
||||||
clearTimeout(autohideTimeout);
|
clearTimeout(autohideTimeout);
|
||||||
@ -47,7 +47,7 @@ function Message() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.clear = function($element) {
|
this.clear = function($element) {
|
||||||
this.$element.text("");
|
this.$element.html("");
|
||||||
this.$element.removeClass(this.mode);
|
this.$element.removeClass(this.mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,11 +431,11 @@ function setState(newState,newHasControl) {
|
|||||||
} else if(newState == Printer.DISCONNECTED_STATE) {
|
} else if(newState == Printer.DISCONNECTED_STATE) {
|
||||||
message.set("Printer disconnected",Message.WARNING,true);
|
message.set("Printer disconnected",Message.WARNING,true);
|
||||||
} else if(newState == Printer.CONNECTING_STATE) {
|
} else if(newState == Printer.CONNECTING_STATE) {
|
||||||
message.set("Printer connecting",Message.INFO,false);
|
message.set("Printer connecting...",Message.INFO,false);
|
||||||
if (prevState != Printer.CONNECTING_STATE) { //enable 'watchdog' if we entered from a different state
|
if (prevState != Printer.CONNECTING_STATE) { //enable 'watchdog' if we entered from a different state
|
||||||
clearTimeout(connectingHintDelay);
|
clearTimeout(connectingHintDelay);
|
||||||
connectingHintDelay = setTimeout(function() {
|
connectingHintDelay = setTimeout(function() {
|
||||||
message.set("Printer still not connected, did you select the correct type?", Message.WARNING, false);
|
message.set("Printer still not connected, did you<br/>select the correct printer type?", Message.WARNING, false);
|
||||||
connectingHintDelay = null;
|
connectingHintDelay = null;
|
||||||
}, connectingHintDelayTime);
|
}, connectingHintDelayTime);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#message {
|
#message {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
text-align: right;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
|
@ -66,8 +66,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="message"></div>
|
|
||||||
|
|
||||||
<!-- center panel -->
|
<!-- center panel -->
|
||||||
<div id="centerpanel">
|
<div id="centerpanel">
|
||||||
|
|
||||||
@ -156,6 +154,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="message"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="portrait">
|
<div id="portrait">
|
||||||
|
Loading…
Reference in New Issue
Block a user