diff --git a/src/js/main.js b/src/js/main.js
index fc007e1..80a9bab 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -80,6 +80,53 @@ function main() {
});
}
+function showBasicAlert(html, newOptions) {
+ var options = {
+ header: "INFO MESSAGE",
+ okBtnText: "Ok",
+ headercolor: "#d25d5d",
+ hideAfter: false,
+ onOkClick: false,
+ };
+ if (newOptions) {
+ for (var i in newOptions) {
+ options[i] = newOptions[i];
+ }
+ }
+ var alertHtml = $(
+ '
' +
+ '
' +
+ '
' +
+ options["header"] +
+ '
x
' +
+ '
' +
+ '
" +
+ "
" +
+ "
"
+ );
+ alertHtml.find(".htmlcontent").append(html);
+ $("body").append(alertHtml);
+ alertHtml.find(".okbtn").click(function () {
+ if (options.onOkClick) {
+ options.onOkClick();
+ }
+ alertHtml.remove();
+ });
+ alertHtml.find(".closeAlert").click(function () {
+ alertHtml.remove();
+ });
+
+ if (options.hideAfter) {
+ setTimeout(function () {
+ alertHtml.find(".okbtn").click();
+ }, 1000 * options.hideAfter);
+ }
+}
+
function initWhiteboard() {
$(document).ready(function () {
// by default set in readOnly mode
@@ -757,53 +804,6 @@ function initWhiteboard() {
}
}
});
-
- function showBasicAlert(html, newOptions) {
- var options = {
- header: "INFO MESSAGE",
- okBtnText: "Ok",
- headercolor: "#d25d5d",
- hideAfter: false,
- onOkClick: false,
- };
- if (newOptions) {
- for (var i in newOptions) {
- options[i] = newOptions[i];
- }
- }
- var alertHtml = $(
- '' +
- '
' +
- '
' +
- options["header"] +
- '
x
' +
- '
' +
- '
" +
- "
" +
- "
"
- );
- alertHtml.find(".htmlcontent").append(html);
- $("body").append(alertHtml);
- alertHtml.find(".okbtn").click(function () {
- if (options.onOkClick) {
- options.onOkClick();
- }
- alertHtml.remove();
- });
- alertHtml.find(".closeAlert").click(function () {
- alertHtml.remove();
- });
-
- if (options.hideAfter) {
- setTimeout(function () {
- alertHtml.find(".okbtn").click();
- }, 1000 * options.hideAfter);
- }
- }
}
export default main;