Alert on main page button click
This commit is contained in:
parent
00221db2c8
commit
2797423008
@ -88,7 +88,6 @@
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
padding-top: 16vh;
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
padding-bottom: 4vh;
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template name="profile">
|
||||
<div class="noScroll">
|
||||
<div id="mainpage{{userProfile}}" onclick="window.location='/'"><h2>Main Page</h2></div>
|
||||
<div id="mainpage{{userProfile}}"><h2>Main Page</h2></div>
|
||||
<div id="logout2" onclick='document.getElementById("login-buttons-logout").click();'><h2>Logout</h2></div>
|
||||
<div id="profWrapper">
|
||||
<div id="profPage" style="background-color:{{divColor 'mainColor'}};min-width:{{screen}}{{textColor}}{{loadNew}}">
|
||||
|
||||
@ -202,6 +202,13 @@ Template.profile.events({
|
||||
}
|
||||
},
|
||||
// MAIN BUTTONS
|
||||
'click #mainpage' () {
|
||||
if (!Meteor.userId() || _.contains([null, undefined, ""], Meteor.user().profile.school)) {
|
||||
alert("Please fill in your profile!");
|
||||
} else {
|
||||
window.location = '/';
|
||||
}
|
||||
},
|
||||
'click .addClass' () {
|
||||
if(Session.equals("profClassTab","addClass")) return;
|
||||
var functionHolder = document.getElementById("profClassInfoHolder");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user