]> BookStack Code Mirror - bookstack/blobdiff - resources/assets/js/global.js
Added basic system tests for markdown editor, Added extra test helpers
[bookstack] / resources / assets / js / global.js
index aa5e60ce450fa2a91864d0ca17dabc9a72895dfd..9e2b3b8eac1263956505c7f3424e87d6c1d440c4 100644 (file)
@@ -54,10 +54,10 @@ $.expr[":"].contains = $.expr.createPseudo(function (arg) {
 // Global jQuery Elements
 $(function () {
 
-
     var notifications = $('.notification');
     var successNotification = notifications.filter('.pos');
     var errorNotification = notifications.filter('.neg');
+    var warningNotification = notifications.filter('.warning');
     // Notification Events
     window.Events.listen('success', function (text) {
         successNotification.hide();
@@ -66,6 +66,10 @@ $(function () {
             successNotification.show();
         }, 1);
     });
+    window.Events.listen('warning', function (text) {
+        warningNotification.find('span').text(text);
+        warningNotification.show();
+    });
     window.Events.listen('error', function (text) {
         errorNotification.find('span').text(text);
         errorNotification.show();