mirror of https://github.com/calzoneman/sync.git
Merge pull request #604 from Xaekai/phoning.it.in
Prevent rendering of <iframes> and <objects> in the error message …
This commit is contained in:
commit
6aebe82298
|
@ -394,7 +394,7 @@ function queue(pos, src) {
|
||||||
if (data.id == null || data.type == null) {
|
if (data.id == null || data.type == null) {
|
||||||
makeAlert("Error", "Failed to parse link " + link +
|
makeAlert("Error", "Failed to parse link " + link +
|
||||||
". Please check that it is correct",
|
". Please check that it is correct",
|
||||||
"alert-danger")
|
"alert-danger", true)
|
||||||
.insertAfter($("#addfromurl"));
|
.insertAfter($("#addfromurl"));
|
||||||
} else {
|
} else {
|
||||||
emitQueue.push({
|
emitQueue.push({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function makeAlert(title, text, klass) {
|
function makeAlert(title, text, klass, textOnly) {
|
||||||
if(!klass) {
|
if(!klass) {
|
||||||
klass = "alert-info";
|
klass = "alert-info";
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,9 @@ function makeAlert(title, text, klass) {
|
||||||
|
|
||||||
var al = $("<div/>").addClass("alert")
|
var al = $("<div/>").addClass("alert")
|
||||||
.addClass(klass)
|
.addClass(klass)
|
||||||
.html(text)
|
|
||||||
.appendTo(wrap);
|
.appendTo(wrap);
|
||||||
|
textOnly ? al.text(text) : al.html(text) ;
|
||||||
|
|
||||||
$("<br/>").prependTo(al);
|
$("<br/>").prependTo(al);
|
||||||
$("<strong/>").text(title).prependTo(al);
|
$("<strong/>").text(title).prependTo(al);
|
||||||
$("<button/>").addClass("close pull-right").html("×")
|
$("<button/>").addClass("close pull-right").html("×")
|
||||||
|
|
Loading…
Reference in New Issue