add leave class button
This commit is contained in:
parent
a797de4c0e
commit
e68ffb9dba
@ -74,6 +74,7 @@ Template.registerHelper('myClasses', () => {
|
||||
found.subscribers = found.subscribers.length;
|
||||
|
||||
if(found.admin === Meteor.userId()) found.box = " owned";
|
||||
found.mine = true;
|
||||
array.push(found);
|
||||
|
||||
var thisWork = work.find({class: courses[i]}).fetch();
|
||||
|
||||
@ -317,11 +317,11 @@
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 40%;
|
||||
width: 45%;
|
||||
}
|
||||
|
||||
.teacher {
|
||||
width: 25%;
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.hour {
|
||||
@ -332,6 +332,10 @@
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.hour.classText, .subscribers.classText {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#creRules {
|
||||
position: absolute;
|
||||
}
|
||||
@ -536,7 +540,11 @@
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.userBox .fa-times {
|
||||
.classBox .fa-times {
|
||||
font-size: 110% !important;
|
||||
}
|
||||
|
||||
.userBox .fa-times, .classBox .fa-times {
|
||||
font-size: 150%;
|
||||
|
||||
-webkit-transition: color 0.4s ease;
|
||||
@ -545,7 +553,7 @@
|
||||
transition: color 0.4s ease;
|
||||
}
|
||||
|
||||
.userBox .fa-times:hover {
|
||||
.userBox .fa-times:hover, .classBox .fa-times:hover {
|
||||
color: #CC4444;
|
||||
}
|
||||
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
<div class="classHolder" style="max-height:{{classHolderHeight}}">
|
||||
{{#each myClasses}}
|
||||
{{> classDisplay}}
|
||||
|
||||
{{/each}}
|
||||
{{#if noclass}}
|
||||
<h3>No results found...</h3>
|
||||
@ -199,6 +200,9 @@
|
||||
<span class="teacher classText">{{teacher}}</span>
|
||||
<span class="hour classText">{{hour}}</span>
|
||||
<span class="subscribers classText">{{subscribers}}</span>
|
||||
{{#if mine}}
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
{{/if}}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -506,6 +506,11 @@ Template.profile.events({
|
||||
sendData("trackUserInClass");
|
||||
|
||||
},
|
||||
'click .classBox .fa-times' (event) {
|
||||
var box = event.target.parentNode;
|
||||
Session.set("serverData", box.getAttribute("classid"));
|
||||
sendData("leaveClass");
|
||||
},
|
||||
'click .userBox .fa-times' (event) {
|
||||
var box = event.target.parentNode;
|
||||
Session.set("serverData", [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user