implement errors onto client

This commit is contained in:
Yaman Qalieh 2016-10-28 23:47:26 -04:00
parent fcdbca066c
commit 4a6b765086
3 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@
</head>
<template name="main">
{{> sAlert}}
<div class="noScroll">
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
<div id="divLeftBar">

View File

@ -972,6 +972,12 @@ function sendData(funcName) { // Call Meteor function, and do actions after func
} else {
Session.set("currentWork",null);
}
if (error !== undefined) {
sAlert.error(error.error[1] || error.message, {
effect: 'stackslide',
position: 'top'
});
}
});
}

View File

@ -218,7 +218,7 @@ function securityCheck(checklist, input) {
break;
// Comment too long
case 15:
if (typeof input.comment !== "string" || input.comment > 200) error = 13;
if (typeof input.comment !== "string" || input.comment.length > 200) error = 13;
break;
// Private class
case 16: