Merge wrapper js
This commit is contained in:
parent
06a50b189d
commit
cfeb2797e3
1 changed files with 6 additions and 0 deletions
|
@ -913,6 +913,9 @@ jQuery.extend( jQuery.easing,
|
||||||
} else if (cmd === "updating") {
|
} else if (cmd === "updating") {
|
||||||
this.ws.ws.close();
|
this.ws.ws.close();
|
||||||
return this.ws.onCloseWebsocket(null, 4000);
|
return this.ws.onCloseWebsocket(null, 4000);
|
||||||
|
} else if (cmd === "injectHtml") {
|
||||||
|
console.log("inject", message);
|
||||||
|
return $("body").append(message.params);
|
||||||
} else {
|
} else {
|
||||||
return this.sendInner(message);
|
return this.sendInner(message);
|
||||||
}
|
}
|
||||||
|
@ -1148,6 +1151,9 @@ jQuery.extend( jQuery.easing,
|
||||||
Wrapper.prototype.displayPrompt = function(message, type, caption, placeholder, cb) {
|
Wrapper.prototype.displayPrompt = function(message, type, caption, placeholder, cb) {
|
||||||
var body, button, input;
|
var body, button, input;
|
||||||
body = $("<span class='message'>" + message + "</span>");
|
body = $("<span class='message'>" + message + "</span>");
|
||||||
|
if (placeholder == null) {
|
||||||
|
placeholder = "";
|
||||||
|
}
|
||||||
input = $("<input type='" + type + "' class='input button-" + type + "' placeholder='" + placeholder + "'/>");
|
input = $("<input type='" + type + "' class='input button-" + type + "' placeholder='" + placeholder + "'/>");
|
||||||
input.on("keyup", (function(_this) {
|
input.on("keyup", (function(_this) {
|
||||||
return function(e) {
|
return function(e) {
|
||||||
|
|
Loading…
Reference in a new issue