Merge wrapper js
This commit is contained in:
parent
e93b5c3c1c
commit
16efba2b91
1 changed files with 28 additions and 9 deletions
|
@ -683,7 +683,6 @@ jQuery.extend( jQuery.easing,
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- src/Ui/media/Notifications.coffee ---- */
|
||||
|
||||
|
||||
|
@ -784,6 +783,13 @@ jQuery.extend( jQuery.easing,
|
|||
return _this.close(elem);
|
||||
};
|
||||
})(this));
|
||||
$("input", elem).on("keyup", (function(_this) {
|
||||
return function(e) {
|
||||
if (e.keyCode === 13) {
|
||||
return _this.close(elem);
|
||||
}
|
||||
};
|
||||
})(this));
|
||||
return elem;
|
||||
};
|
||||
|
||||
|
@ -1152,9 +1158,9 @@ jQuery.extend( jQuery.easing,
|
|||
return this.notifications.add("notification-" + message.id, message.params[0], body, message.params[2]);
|
||||
};
|
||||
|
||||
Wrapper.prototype.displayConfirm = function(message, captions, cb) {
|
||||
var body, button, buttons, caption, fn, i, j, len;
|
||||
body = $("<span class='message-outer'><span class='message'>" + message + "</span></span>");
|
||||
Wrapper.prototype.displayConfirm = function(body, captions, cb) {
|
||||
var button, buttons, caption, fn, i, j, len;
|
||||
body = $("<span class='message-outer'><span class='message'>" + body + "</span></span>");
|
||||
buttons = $("<span class='buttons'></span>");
|
||||
if (!(captions instanceof Array)) {
|
||||
captions = [captions];
|
||||
|
@ -1170,7 +1176,12 @@ jQuery.extend( jQuery.easing,
|
|||
})(this);
|
||||
for (i = j = 0, len = captions.length; j < len; i = ++j) {
|
||||
caption = captions[i];
|
||||
button = $("<a href='#" + caption + "' class='button button-confirm button-" + caption + " button-" + (i + 1) + "' data-value='" + (i + 1) + "'>" + caption + "</a>");
|
||||
button = $("<a></a>", {
|
||||
href: "#" + caption,
|
||||
"class": "button button-confirm button-" + caption + " button-" + (i + 1),
|
||||
"data-value": i + 1
|
||||
});
|
||||
button.text(caption);
|
||||
fn(button);
|
||||
buttons.append(button);
|
||||
}
|
||||
|
@ -1205,11 +1216,15 @@ jQuery.extend( jQuery.easing,
|
|||
|
||||
Wrapper.prototype.displayPrompt = function(message, type, caption, placeholder, cb) {
|
||||
var body, button, input;
|
||||
body = $("<span class='message'>" + message + "</span>");
|
||||
body = $("<span class='message'></span>").text(message);
|
||||
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) {
|
||||
return function(e) {
|
||||
_this.verifyEvent(input, e);
|
||||
|
@ -1219,7 +1234,10 @@ jQuery.extend( jQuery.easing,
|
|||
};
|
||||
})(this));
|
||||
body.append(input);
|
||||
button = $("<a href='#" + caption + "' class='button button-" + caption + "'>" + caption + "</a>");
|
||||
button = $("<a></a>", {
|
||||
href: "#" + caption,
|
||||
"class": "button button-" + caption
|
||||
}).text(caption);
|
||||
button.on("click", (function(_this) {
|
||||
return function(e) {
|
||||
_this.verifyEvent(button, e);
|
||||
|
@ -1561,7 +1579,7 @@ jQuery.extend( jQuery.easing,
|
|||
if (value instanceof Array) {
|
||||
value = this.toHtmlSafe(value);
|
||||
} else {
|
||||
value = String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
value = String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
||||
value = value.replace(/<([\/]{0,1}(br|b|u|i|small))>/g, "<$1>");
|
||||
}
|
||||
values[i] = value;
|
||||
|
@ -1622,6 +1640,7 @@ jQuery.extend( jQuery.easing,
|
|||
}).call(this);
|
||||
|
||||
|
||||
|
||||
/* ---- src/Ui/media/WrapperZeroFrame.coffee ---- */
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue