implement sAlert

This commit is contained in:
Yaman Qalieh 2016-10-01 16:18:48 -04:00
parent 18c784fab3
commit 204a2691b7
3 changed files with 6 additions and 1 deletions

View File

@ -39,3 +39,5 @@ harrison:papa-parse
pfafman:filesaver
flemay:less-autoprefixer
natestrauser:select2
juliancwirko:s-alert
juliancwirko:s-alert-stackslide

View File

@ -59,6 +59,8 @@ iron:middleware-stack@1.1.0
iron:router@1.0.13
iron:url@1.0.11
jquery@1.11.9
juliancwirko:s-alert@3.2.0
juliancwirko:s-alert-stackslide@3.1.3
lai:collection-extensions@0.2.1_1
launch-screen@1.0.12
less@2.7.5

View File

@ -212,7 +212,8 @@ Template.profile.events({
// MAIN BUTTONS
'click #mainpage' () {
if (!Meteor.userId() || _.contains([null, undefined, ""], Meteor.user().profile.school)) {
alert("Please fill in your profile!");
sAlert.closeAll();
sAlert.error('Please fill in your profile!', {effect: 'stackslide', position: 'top'});
} else {
window.location = '/';
}