diff --git a/admin/index.go b/admin/index.go index 757071b4..2bb69f68 100644 --- a/admin/index.go +++ b/admin/index.go @@ -47,6 +47,9 @@ const indextpl = `
{{"{{ box.title }}"}} {{"{{ box.msg }}"}} +
diff --git a/admin/static/index.html b/admin/static/index.html index d0dd4d9e..012768ed 100644 --- a/admin/static/index.html +++ b/admin/static/index.html @@ -45,6 +45,9 @@
{{ box.title }} {{ box.msg }} +
diff --git a/admin/static/js/app.js b/admin/static/js/app.js index b2c7db55..f40523b0 100644 --- a/admin/static/js/app.js +++ b/admin/static/js/app.js @@ -275,7 +275,8 @@ angular.module("FICApp") b.cancel = function() { $scope.boxes.pop($scope.boxes.indexOf(b)); } - $timeout(function() { b.cancel(); }, b.timeout); + if (b.timeout >= 0) + $timeout(function() { b.cancel(); }, b.timeout); } } @@ -288,10 +289,14 @@ angular.module("FICApp") var mybox = { 'kind': kind, 'title': title, - 'msg': msg, 'timeout': tmout, }; + if (Array.isArray(msg)) + mybox['list'] = msg; + else + mybox['msg'] = msg; + $rootScope._newBoxes.push(mybox); }; $rootScope.newYesNoBox = function(kind, title, msg, yesFunc, noFunc, tmout) {