implement errors onto client
This commit is contained in:
parent
fcdbca066c
commit
4a6b765086
@ -4,6 +4,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<template name="main">
|
<template name="main">
|
||||||
|
{{> sAlert}}
|
||||||
<div class="noScroll">
|
<div class="noScroll">
|
||||||
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
|
<img id="bg" src={{bgSrc}} style="min-width:{{screen}}">
|
||||||
<div id="divLeftBar">
|
<div id="divLeftBar">
|
||||||
|
|||||||
@ -787,7 +787,7 @@ Template.main.events({
|
|||||||
})();
|
})();
|
||||||
Session.set("user", newSetting);
|
Session.set("user", newSetting);
|
||||||
serverData = Session.get("user");
|
serverData = Session.get("user");
|
||||||
sendData("editProfile");
|
sendData("editProfile");
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#" + modifyingInput).next()
|
$("#" + modifyingInput).next()
|
||||||
@ -972,11 +972,17 @@ function sendData(funcName) { // Call Meteor function, and do actions after func
|
|||||||
} else {
|
} else {
|
||||||
Session.set("currentWork",null);
|
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.
|
function closeInput() { // Close a changeable input and change it back to span.
|
||||||
var data = getHomeworkFormData();
|
var data = getHomeworkFormData();
|
||||||
Session.set("currentWork", data);
|
Session.set("currentWork", data);
|
||||||
Session.set("restrictText", {});
|
Session.set("restrictText", {});
|
||||||
$("#"+modifyingInput).css('cursor','pointer');
|
$("#"+modifyingInput).css('cursor','pointer');
|
||||||
|
|||||||
@ -218,7 +218,7 @@ function securityCheck(checklist, input) {
|
|||||||
break;
|
break;
|
||||||
// Comment too long
|
// Comment too long
|
||||||
case 15:
|
case 15:
|
||||||
if (typeof input.comment !== "string" || input.comment > 200) error = 13;
|
if (typeof input.comment !== "string" || input.comment.length > 200) error = 13;
|
||||||
break;
|
break;
|
||||||
// Private class
|
// Private class
|
||||||
case 16:
|
case 16:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user