|
1 | 1 | /* |
2 | 2 | * Filename : output.js |
3 | | - * Functions : now, today, sanitizeString, getSubgoalInfo, getActionInfo, createCSV, |
| 3 | + * Functions : now, today, sanitizeString, getSubgoalInfo, getActionInfo, createCSV, |
4 | 4 | * downloadCSV, downloadURI, create_zip, parseSubgoalArray, createOldCSV |
5 | | - * Description : |
| 5 | + * Description : |
6 | 6 | */ |
7 | 7 |
|
8 | 8 |
|
@@ -63,7 +63,7 @@ function getSubgoalInfo(){ |
63 | 63 | var currSubgoal = subgoalList[j]; //Current Input |
64 | 64 | subgoalEntry.push("\n"); |
65 | 65 | subgoalEntry.push("\n"); // new row |
66 | | - subgoalEntry.push("Subgoal " + (j+1)); |
| 66 | + subgoalEntry.push("Subgoal " + (parseInt(j)+1)); |
67 | 67 | subgoalEntry.push(sanitizeString(currSubgoal.name)); |
68 | 68 | subgoalEntry.push("\n"); // new row |
69 | 69 | subgoalEntry.push("Will the persona have formed this subgoal as a step to their overall goal?"); |
@@ -192,10 +192,10 @@ function getActionInfo(actionList, j){ |
192 | 192 | actionEntry.push(actionList[i].postAction.facetValues["tinker"]); |
193 | 193 | actionEntry.push("\n"); |
194 | 194 | actionEntry.push("Action Image Name:"); |
195 | | - actionEntry.push("S"+(1 + parseInt(j))+"A"+(1 + parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1)); |
| 195 | + actionEntry.push("S"+(1 + parseInt(j))+"A"+(parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1)); |
196 | 196 | actionEntry.push("\n"); |
197 | 197 |
|
198 | | - downloadURI(actionList[i].imgURL, "S"+(1 + parseInt(j))+"A"+(1 + parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1)); |
| 198 | + downloadURI(actionList[i].imgURL, "S"+(1 + parseInt(j))+"A"+(parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1)); |
199 | 199 | } |
200 | 200 | return actionEntry.join(","); |
201 | 201 | } |
@@ -230,7 +230,7 @@ function createCSV() { |
230 | 230 |
|
231 | 231 | var fullContent = getSubgoalInfo(); |
232 | 232 | csvContent += fullContent; |
233 | | - |
| 233 | + |
234 | 234 | return csvContent; |
235 | 235 | } |
236 | 236 |
|
@@ -332,7 +332,7 @@ function create_zip(csvContent, old) { |
332 | 332 |
|
333 | 333 | /* |
334 | 334 | * Function: parseSubgoalArray |
335 | | - * |
| 335 | + * |
336 | 336 | */ |
337 | 337 | function parseSubgoalArray(){ |
338 | 338 | var userInput= getSubgoalArrayFromLocal(); |
@@ -392,7 +392,7 @@ function parseSubgoalArray(){ |
392 | 392 | newName = newName.slice(0, newName.length-1) |
393 | 393 | } |
394 | 394 |
|
395 | | - downloadURI(currI.actions[i].imgURL, "S"+(1 + parseInt(j))+"A"+(1 + parseInt(i))+"_"+newName); |
| 395 | + downloadURI(currI.actions[i].imgURL, "S"+(1 + parseInt(j))+"A"+(parseInt(i))+"_"+newName); |
396 | 396 | } |
397 | 397 |
|
398 | 398 | if (entry.length != 0) { |
|
0 commit comments