The gui shows as it would with the css commented out, so I don't think that is the issue,
I have made changes a js file, but i am not sure exactly what changes have been made since it failed. The js file is as follows:
Code: Select all
// add methods
ProgressReportCreator.prototype.setColor = function(doc, score) {
switch(score) {
case 0:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(0, 0, 0);
break;
case 1:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(139, 0, 0);
break;
case 2:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(255, 0, 0);
break;
case 3:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(255, 165, 0);
break;
case 4:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(255, 255, 0);
break;
case 5:
doc.setDrawColor(0, 0, 0);
doc.setFillColor(0, 80, 0);
break;
}
};
ProgressReportCreator.prototype.createPDF = function() {
// Create Document Object
var doc = new jsPDF("landscape", "mm", "a4");
// Title
doc.setFontSize(22);
doc.text("Progress Report Chart", 150,20, "center");
//black line colour
doc.setDrawColor(0, 0, 0);
//width
doc.setLineWidth(0.5);
//vertical axis
doc.line(20,30,20,190);
//horizontal axis
doc.line(20,130,270,130);
//Date
doc.setFontSize(22);
doc.text("Date: " + moment(this.date).format("DD-MMM-YYYY"),280,20,"right");
//Name
doc.text("Name: " + this.firstName + " " + this.lastName,20,20);
//Key
doc.setFontSize(10);
doc.text("Key:", 100,40);
doc.setFontSize(10);
this.setColor(doc, 1);
doc.roundedRect(120,36,5,5,1,1, "FD");
doc.text("1. introduced",126,40);
this.setColor(doc, 2);
doc.roundedRect(151, 36, 5, 5, 1, 1, 'FD');
doc.setDrawColor(0,0,0);
doc.text("2. Beginner", 158,40);
this.setColor(doc, 3);
doc.roundedRect(184,36,5,5,1,1, "FD");
doc.setDrawColor(0,0,0);
doc.text("3. Intermediate", 190,40);
this.setColor(doc, 4);
doc.roundedRect(216,36,5,5,1,1, "FD");
doc.setDrawColor(0,0,0);
doc.text("4. Advanced", 222,40);
this.setColor(doc, 5);
doc.roundedRect(248,36,5,5,1,1, "FD");
doc.setDrawColor(0,0,0);
doc.text("5. Test", 254,40);
//X- Axis titles
doc.setFillColor(0,0,0);
doc.setFontSize(10);
doc.text("DSSSM / Cockpit Drill",24,180,90);
doc.text("Blind Spots",31,180,90);
doc.text("Steering",38,180,90);
doc.text("Use of Mirrors",45,180,90);
doc.text("Use of Signals",52,180,90);
doc.text("Adequate Clearance",59,180,90);
doc.text("Progress, Hesitancy",66,180,90);
doc.text("Reference Points",73,180,90);
doc.text("Peep & Creep",80,180,90);
doc.text("Moving Off & Stopping",87,180,90);
doc.text("MSM",94,180,90);
doc.text("MSPSL",101,180,90);
doc.text("Emergency Stop",108,180,90);
doc.text("Hill Start",115,180,90);
doc.text("Overtaking",122,180,90);
doc.text("Awareness & Anticipation",129,180,90);
doc.text("Emerging (Left)",136,180,90);
doc.text("Emerging (Right)",143,180,90);
doc.text("Approaching Junctions (Right)",150,180,90);
doc.text("Approaching Junctions (Left)",157,180,90);
doc.text("T-Junctions",164,180,90);
doc.text("Crossroads",171,180,90);
doc.text("Meeting Other Traffic",178,180,90);
doc.text("Crossing Traffic",185,180,90);
doc.text("Roundabouts",192,180,90);
doc.text("Pedestrian Crossings",199,180,90);
doc.text("Straight line Reversing",206,180,90);
doc.text("Bay Parking",213,180,90);
doc.text("Parallel Parking",220,180,90);
doc.text("Turn in the Road",227,180,90);
doc.text("Left Reverse (Sharp)",234,180,90);
doc.text("Left Reverse (Sweeping)",241,180,90);
doc.text("Right Reverse (Sharp)",248,180,90);
doc.text("Right Reverse (Sweeping)",255,180,90);
doc.text("Show Me / Tell Me",262,180,90);
doc.text("Independent Driving",269,180,90);
//data
//DSSSM / Cockpit Drill
this.setColor(doc, this.cockpitDrill);
doc.rect(20,130,7,this.cockpitDrill * (-15), "FD");
//Blind Spots
this.setColor(doc, this.blindSpots);
doc.rect(27,130,7,this.blindSpots * (-15), "FD");
//Steering
this.setColor(doc, this.steering);
doc.rect(34,130,7,this.steering * (-15), "FD");
//Use of Mirrors
this.setColor(doc, this.useOfMirrors);
doc.rect(41,130,7,this.useOfMirrors * (-15), "FD");
//Use of Signals
this.setColor(doc, this.useOfSignals);
doc.rect(48,130,7,this.useOfSignals * (-15), "FD");
//Adequate Clearance
this.setColor(doc, this.adequateClearance);
doc.rect(55,130,7,this.adequateClearance * (-15), "FD");
//Progress, Hesitancy, Normal Positioning
this.setColor(doc, this.progressHesitancy);
doc.rect(62,130,7,this.progressHesitancy * (-15), "FD");
//Reference Points
this.setColor(doc, this.referencePoints);
doc.rect(69,130,7,this.referencePoints * (-15), "FD");
//Peep & Creep
this.setColor(doc, this.peepCreep);
doc.rect(76,130,7,this.peepCreep * (-15), "FD");
//Moving Off & Stopping
this.setColor(doc, this.movingOffStopping);
doc.rect(83,130,7,this.movingOffStopping * (-15), "FD");
//MSM
this.setColor(doc, this.mSM);
doc.rect(90,130,7,this.mSM * (-15), "FD");
//MSPSL
this.setColor(doc, this.mSPSL);
doc.rect(97,130,7,this.mSPSL * (-15), "FD");
//Emergency Stop
this.setColor(doc, this.emergencyStop);
doc.rect(104,130,7,this.emergencyStop * (-15), "FD");
//Hill Start
this.setColor(doc, this.hillStart);
doc.rect(111,130,7,this.hillStart * (-15), "FD");
//Overtaking
this.setColor(doc, this.overtaking);
doc.rect(118,130,7,this.overtaking * (-15), "FD");
//Awareness & Anticipation
this.setColor(doc, this.awarenessAnticipation);
doc.rect(125,130,7,this.awarenessAnticipation * (-15), "FD");
//Emerging (Left)
this.setColor(doc, this.emergingLeft);
doc.rect(132,130,7,this.emergingLeft * (-15), "FD");
//Emerging (Right)
this.setColor(doc, this.emergingRight);
doc.rect(139,130,7,this.emergingRight * (-15), "FD");
//Approaching Junctions (Right)
this.setColor(doc, this.approachingJunctionsRight);
doc.rect(146,130,7,this.approachingJunctionsRight * (-15), "FD");
//Approaching Junctions (Left)
this.setColor(doc, this.approachingJunctionsLeft);
doc.rect(153,130,7,this.approachingJunctionsLeft * (-15), "FD");
//T-Junctions
this.setColor(doc, this.tJunctions);
doc.rect(160,130,7,this.tJunctions * (-15), "FD");
//Crossroads
this.setColor(doc, this.crossroads);
doc.rect(167,130,7,this.crossroads * (-15), "FD");
//Meeting Other Traffic
this.setColor(doc, this.meetingOtherTraffic);
doc.rect(174,130,7,this.meetingOtherTraffic * (-15), "FD");
//Crossing traffic
this.setColor(doc, this.crossingTraffic);
doc.rect(181,130,7,this.crossingTraffic * (-15), "FD");
//Roundabouts
this.setColor(doc, this.roundabouts);
doc.rect(188,130,7,this.roundabouts * (-15), "FD");
//Pedestrian Crossings
this.setColor(doc, this.pedestrianCrossings);
doc.rect(195,130,7,this.pedestrianCrossings * (-15), "FD");
//Straight Line Reversing
this.setColor(doc, this.straightLineReversing);
doc.rect(202,130,7,this.straightLineReversing * (-15), "FD");
//Bay Parking
this.setColor(doc, this.bayParking);
doc.rect(209,130,7,this.bayParking * (-15), "FD");
//Parallel Parking
this.setColor(doc, this.parallelParking);
doc.rect(216,130,7,this.parallelParking * (-15), "FD");
//Turn in the Road
this.setColor(doc, this.turnInTheRoad);
doc.rect(223,130,7,this.turnInTheRoad * (-15), "FD");
//Left Reverse(Sharp)
this.setColor(doc, this.leftReverseSharp);
doc.rect(230,130,7,this.leftReverseSharp * (-15), "FD");
//Left Reverse (Sweeping)
this.setColor(doc, this.leftReverseSweeping);
doc.rect(237,130,7,this.leftReverseSweeping * (-15), "FD");
//Right Reverse (Sharp)
this.setColor(doc, this.rightReverseSharp);
doc.rect(244,130,7,this.rightReverseSharp * (-15), "FD");
//Right Reverse (Sweeping)
this.setColor(doc, this.rightReverseSweeping);
doc.rect(251,130,7,this.rightReverseSweeping * (-15), "FD");
//Show Me / Tell Me
this.setColor(doc, this.showMeTellMe);
doc.rect(258,130,7,this.showMeTellMe * (-15), "FD");
//Independent Driving
this.setColor(doc, this.independentDriving);
doc.rect(265,130,7,this.independentDriving * (-15), "FD");
return doc.output('datauristring');
};
ProgressReportCreator.prototype.displayAsJPG = function(uristring) {
Apperyio.storage.pdfurl.set(uristring);
pdf2jpg.execute();
};
ProgressReportCreator.prototype.createPDFAndDisplayAsJPG = function() {
var uristring = this.createPDF();
this.displayAsJPG(uristring);
};
ProgressReportCreator.prototype.emailProgressReport = function() {
// Prepare parameters
var to = Apperyio.storage.progressChartView.get("$['client_email']");
var toName = Apperyio.storage.progressChartView.get("$['client_firstname']") + " " + Apperyio.storage.progressChartView.get("$['client_lastname']");
var bcc = Apperyio.storage.instructor.get("$['email']");
var bccName;
if(Apperyio.storage.instructor.get("$['businessName']") !== "") {
bccName = Apperyio.storage.instructor.get("$['businessName']");
} else {
bccName = Apperyio.storage.instructor.get("$['firstName']") + " " + Apperyio.storage.instructor.get("$['lastName']");
}
var fromName = bccName;
var subject = "Driver's Progress Chart";
var body = "[b]Progress Chart - " + moment(this.date).format("DD-MMM-YYYY") + "[/b]";
var filename = "progresschart - " + moment(this.date).format("DD-MMM-YYYY");
var jpg = Apperyio.storage.jpgurl.get();
var pdf = Apperyio.storage.pdfurl.get();
//execute service
emailChart.execute({
data: {
"to" : to,
"toName" : toName,
"bcc" : bcc,
"bccName" : bccName,
"fromName" : fromName,
"subject" : subject,
"body" : body,
"filename" : filename,
"jpg" : jpg,
"pdf" : pdf
}
});
};
I can't see anything in that file which would affect the slider rendering.