Skip to content

Commit b10afe0

Browse files
committed
update asyncSuccessMessage in examples
1 parent 4b3f59c commit b10afe0

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

examples/templates/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,28 @@ <h4>
8282
modalID: "#create-modal"
8383
});
8484

85+
var asyncSuccessMessage = [
86+
"<div ",
87+
"style='position:fixed;top:0;z-index:10000;width:100%;border-radius:0;' ",
88+
"class='alert alert-icon alert-success alert-dismissible fade show mb-0' role='alert'>",
89+
"Success: Book was updated.",
90+
"<button type='button' class='close' data-dismiss='alert' aria-label='Close'>",
91+
"<span aria-hidden='true'>&times;</span>",
92+
"</button>",
93+
"</div>",
94+
"<script>",
95+
"$('.alert').fadeTo(2000, 500).slideUp(500, function () {$('.alert').slideUp(500).remove();});",
96+
"<\/script>"
97+
].join("");
98+
8599
function updateBookModalForm() {
86100
$(".update-book").each(function () {
87101
$(this).modalForm({
88102
formURL: $(this).data("form-url"),
89103
asyncUpdate: true,
90104
asyncSettings: {
91105
closeOnSubmit: false,
92-
successMessage: "<div style='position:fixed;top:0;z-index:10000;width:100%;border-radius:0;' class='alert alert-icon alert-success alert-dismissible fade show mb-0' role='alert'>Success: Book was updated.<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>&times;</span></button></div><script>$('.alert').fadeTo(2000, 500).slideUp(500, function () {$('.alert').slideUp(500).remove();});<\/script>",
106+
successMessage: asyncSuccessMessage,
93107
dataUrl: "books/",
94108
dataElementId: "#books-table",
95109
dataKey: "table",

0 commit comments

Comments
 (0)