My changes

Added commit and report number to work cards
This commit is contained in:
Arav-Agarwal 2016-08-31 01:28:37 -04:00
parent 21435b5866
commit 188d8033ac
5 changed files with 22 additions and 11 deletions

View File

@ -124,7 +124,7 @@ p.text {
} }
.login-button { .login-button {
display: none !important;
} }
#github { #github {

View File

@ -893,3 +893,4 @@ input, textarea {
#markDone:hover, #markConfirm:hover, #markReport:hover { #markDone:hover, #markConfirm:hover, #markReport:hover {
box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.15); box-shadow: inset 0 0 0 99999px rgba(0,0,0,0.15);
} }

View File

@ -177,11 +177,12 @@
</div> </div>
<div id="markConfirm" style="color:{{work 'userConfirm'}}"> <div id="markConfirm" style="color:{{work 'userConfirm'}}">
<i class="fa fa-thumbs-up" aria-hidden="true"></i> <i class="fa fa-thumbs-up" aria-hidden="true"></i>
<p>{{work 'confirmations'}}</p> <p>{{work 'confirmationLength'}}</p>
</div> </div>
<div id="markReport" style="color:{{work 'userReport'}}"> <div id="markReport" style="color:{{work 'userReport'}}">
<i class="fa fa-thumbs-down" aria-hidden="true"></i> <i class="fa fa-thumbs-down" aria-hidden="true"></i>
<p>{{work 'reports'}}</p> <p>{{work 'reportLength'}}</p>
</div> </div>
</div> </div>
</div> </div>
@ -234,6 +235,13 @@
<div class="cWorkCont"> <div class="cWorkCont">
<p class="cWorkName">{{name}}</p> <p class="cWorkName">{{name}}</p>
<span class="cWorkDate" style="font-weight:{{cardDate}}">{{dueDate}}</span> <span class="cWorkDate" style="font-weight:{{cardDate}}">{{dueDate}}</span>
<i class="fa fa-thumbs-up" aria-hidden="true"></i>
<span>{{confirmationLength}} </span>
<i class="fa fa-thumbs-down" aria-hidden="true"></i>
<span>{{reportLength}} </span>
</div> </div>
</div> </div>
</template> </template>

View File

@ -109,6 +109,7 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective
j = 0; j = 0;
} }
} }
} }
while(thisWork.indexOf("no") !== -1) thisWork.splice(thisWork.indexOf("no"),1); // Splice all filtered works. while(thisWork.indexOf("no") !== -1) thisWork.splice(thisWork.indexOf("no"),1); // Splice all filtered works.
@ -130,6 +131,9 @@ Template.registerHelper('myClasses', () => { // Gets all classes and respective
} }
thisWork[j].typeColor = workColors[thisWork[j].type]; thisWork[j].typeColor = workColors[thisWork[j].type];
thisWork[j].confirmationLength = thisWork[j].confirmations.length // Counts the number of confiramtions and reportsfor a particular work
thisWork[j].reportLength = thisWork[j].reports.length
var hoverHighlight = Session.get("classDispHover"); // Highlight/scale related class works on hover. var hoverHighlight = Session.get("classDispHover"); // Highlight/scale related class works on hover.
if(hoverHighlight !== null && hoverHighlight === found._id) { if(hoverHighlight !== null && hoverHighlight === found._id) {
thisWork[j].scale = "-ms-transform: scale(1.12)-webkit-transform: scale(1.12);transform: scale(1.12)"; thisWork[j].scale = "-ms-transform: scale(1.12)-webkit-transform: scale(1.12);transform: scale(1.12)";
@ -564,7 +568,6 @@ Template.main.events({
input.style.width = "70%"; input.style.width = "70%";
input.style.padding = "0.1%"; input.style.padding = "0.1%";
input.id = ele.id + "a"; input.id = ele.id + "a";
input.setAttribute("opc", ele.getAttribute("opc"));
ele.parentNode.appendChild(input); ele.parentNode.appendChild(input);
if (ele.getAttribute("re") == "readonly") { if (ele.getAttribute("re") == "readonly") {
input.readOnly = true; input.readOnly = true;
@ -906,8 +909,6 @@ function formReadable(input) { // Makes work information readable by users.
input.userReport = ""; input.userReport = "";
} }
input.confirmations = input.confirmations.length;
input.reports = input.reports.length;
var comments = input.comments; var comments = input.comments;
var resort = []; var resort = [];

View File

@ -10,7 +10,8 @@ import {
var superadmins = [ var superadmins = [
"ybq987@gmail.com", "ybq987@gmail.com",
"ksjdragon@gmail.com" "ksjdragon@gmail.com",
"aravagarwal3073@gmail.com"
]; ];
var worktype = ["test", "quiz", "project", "normal", "other"]; var worktype = ["test", "quiz", "project", "normal", "other"];