implement errors onto client
This commit is contained in:
parent
fcdbca066c
commit
4a6b765086
@ -4,6 +4,7 @@
|
||||
</head>
|
||||
|
||||
<template name="main">
|
||||
{{> sAlert}}
|
||||
<div class="noScroll">
|
||||
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
|
||||
<div id="divLeftBar">
|
||||
|
||||
@ -787,7 +787,7 @@ Template.main.events({
|
||||
})();
|
||||
Session.set("user", newSetting);
|
||||
serverData = Session.get("user");
|
||||
sendData("editProfile");
|
||||
sendData("editProfile");
|
||||
}
|
||||
|
||||
$("#" + modifyingInput).next()
|
||||
@ -972,11 +972,17 @@ 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'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function closeInput() { // Close a changeable input and change it back to span.
|
||||
var data = getHomeworkFormData();
|
||||
var data = getHomeworkFormData();
|
||||
Session.set("currentWork", data);
|
||||
Session.set("restrictText", {});
|
||||
$("#"+modifyingInput).css('cursor','pointer');
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user