Added shortname for display, changed description max length to 300

This commit is contained in:
Kenneth Jao 2017-04-13 02:11:31 -04:00
parent 479ed28e14
commit a6fc7f618c
4 changed files with 9 additions and 8 deletions

View File

@ -54,7 +54,7 @@
#mobileBody { #mobileBody {
width: 100%; width: 100%;
height: 92%; height: 91%;
margin-bottom: 10%; margin-bottom: 10%;
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
@ -126,12 +126,12 @@
.mName { .mName {
font-size: 4.3vw !important; font-size: 4.3vw !important;
width: 50%; width: 70%;
} }
.mDate { .mDate {
font-size: 3.4vw !important; font-size: 3.4vw !important;
width: 48%; width: 28%;
text-align: right; text-align: right;
} }

View File

@ -192,7 +192,7 @@
<input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" readonly> <input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" readonly>
<i class="fa fa-angle-down" aria-hidden="true"></i> <i class="fa fa-angle-down" aria-hidden="true"></i>
</div> </div>
<textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="150" placeholder="Description"></textarea> <textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="300" placeholder="Description"></textarea>
<div id="mRestrictText"> <div id="mRestrictText">
<span class="resText">{{restrict 'name'}}</span> <span class="resText">{{restrict 'name'}}</span>
<span class="resText">{{restrict 'description'}}</span> <span class="resText">{{restrict 'description'}}</span>
@ -211,7 +211,7 @@
<input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" onfocus="this.blur()" readonly> <input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" onfocus="this.blur()" readonly>
<i class="fa fa-angle-down" aria-hidden="true"></i> <i class="fa fa-angle-down" aria-hidden="true"></i>
</div> </div>
<textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="150" placeholder="Description" value="{{work 'description'}}"></textarea> <textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="300" placeholder="Description" value="{{work 'description'}}"></textarea>
<div id="mRestrictText"> <div id="mRestrictText">
<span class="resText">{{restrict 'name'}}</span> <span class="resText">{{restrict 'name'}}</span>
<span class="resText">{{restrict 'description'}}</span> <span class="resText">{{restrict 'description'}}</span>
@ -236,7 +236,7 @@
<div id="typeCont"> <div id="typeCont">
<input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" onfocus="this.blur()" readonly> <input id="type" class="mAddForm" form="type" placeholder="Type" value="{{work 'type'}}" onfocus="this.blur()" readonly>
</div> </div>
<textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="150" placeholder="Description" value="{{work 'description'}}" onfocus="this.blur()" readonly></textarea> <textarea id="description" class="mAddForm restrict" form="description" rows="8" maxLength="300" placeholder="Description" value="{{work 'description'}}" onfocus="this.blur()" readonly></textarea>
<div id="mRestrictText"> <div id="mRestrictText">
<span class="resText">{{restrict 'name'}}</span> <span class="resText">{{restrict 'name'}}</span>
<span class="resText">{{restrict 'description'}}</span> <span class="resText">{{restrict 'description'}}</span>

View File

@ -692,8 +692,9 @@ mobileWork = function() {
var classid = array[i].thisClassWork[j].classid; var classid = array[i].thisClassWork[j].classid;
var desc = array[i].thisClassWork[j].description; var desc = array[i].thisClassWork[j].description;
if(desc) { if(desc) {
array[i].thisClassWork[j].shortdesc = (desc.length <= 40 ) ? desc : desc.substring(0,20) +"..."; array[i].thisClassWork[j].shortdesc = (desc.length <= 30 ) ? desc : desc.substring(0,30) + "...";
} }
array[i].thisClassWork[j].shortname = (name.length <= 20) ? name : name.substring(0,20) + "...";
array[i].thisClassWork[j]["class"] = (classid === Meteor.userId()) ? "Personal" : classes.findOne({_id:classid}).name; array[i].thisClassWork[j]["class"] = (classid === Meteor.userId()) ? "Personal" : classes.findOne({_id:classid}).name;
if(_.contains(array[i].thisClassWork[j].done, Meteor.userId())) { if(_.contains(array[i].thisClassWork[j].done, Meteor.userId())) {
array[i].thisClassWork[j].isDone = true; array[i].thisClassWork[j].isDone = true;

View File

@ -248,7 +248,7 @@ function securityCheck(checklist, input) {
break; break;
// Description too long // Description too long
case 12: case 12:
if ((typeof input.description !== "string" || input.description.length > 150) && input.description !== undefined) error = 11; if ((typeof input.description !== "string" || input.description.length > 300) && input.description !== undefined) error = 11;
break; break;
// Moderator of class // Moderator of class
case 13: case 13: