Skip to content

Commit

Permalink
Merge pull request #121 from subuash/master
Browse files Browse the repository at this point in the history
Fix Issue #113 and part of #13
  • Loading branch information
subuash authored Jan 20, 2021
2 parents 10d17bb + e8d9054 commit c5e9605
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions scripts/output.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Filename : output.js
* Functions : now, today, sanitizeString, getSubgoalInfo, getActionInfo, createCSV,
* Functions : now, today, sanitizeString, getSubgoalInfo, getActionInfo, createCSV,
* downloadCSV, downloadURI, create_zip, parseSubgoalArray, createOldCSV
* Description :
* Description :
*/


Expand Down Expand Up @@ -63,7 +63,7 @@ function getSubgoalInfo(){
var currSubgoal = subgoalList[j]; //Current Input
subgoalEntry.push("\n");
subgoalEntry.push("\n"); // new row
subgoalEntry.push("Subgoal " + (j+1));
subgoalEntry.push("Subgoal " + (parseInt(j)+1));
subgoalEntry.push(sanitizeString(currSubgoal.name));
subgoalEntry.push("\n"); // new row
subgoalEntry.push("Will the persona have formed this subgoal as a step to their overall goal?");
Expand Down Expand Up @@ -192,10 +192,10 @@ function getActionInfo(actionList, j){
actionEntry.push(actionList[i].postAction.facetValues["tinker"]);
actionEntry.push("\n");
actionEntry.push("Action Image Name:");
actionEntry.push("S"+(1 + parseInt(j))+"A"+(1 + parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1));
actionEntry.push("S"+(1 + parseInt(j))+"A"+(parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1));
actionEntry.push("\n");

downloadURI(actionList[i].imgURL, "S"+(1 + parseInt(j))+"A"+(1 + parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1));
downloadURI(actionList[i].imgURL, "S"+(1 + parseInt(j))+"A"+(parseInt(actionList[i].id))+"_"+actionList[i].name.substring(1, actionList[i].name.length-1));
}
return actionEntry.join(",");
}
Expand Down Expand Up @@ -230,7 +230,7 @@ function createCSV() {

var fullContent = getSubgoalInfo();
csvContent += fullContent;

return csvContent;
}

Expand Down Expand Up @@ -332,7 +332,7 @@ function create_zip(csvContent, old) {
/*
* Function: parseSubgoalArray
*
*
*/
function parseSubgoalArray(){
var userInput= getSubgoalArrayFromLocal();
Expand Down Expand Up @@ -392,7 +392,7 @@ function parseSubgoalArray(){
newName = newName.slice(0, newName.length-1)
}

downloadURI(currI.actions[i].imgURL, "S"+(1 + parseInt(j))+"A"+(1 + parseInt(i))+"_"+newName);
downloadURI(currI.actions[i].imgURL, "S"+(1 + parseInt(j))+"A"+(parseInt(i))+"_"+newName);
}

if (entry.length != 0) {
Expand Down
2 changes: 0 additions & 2 deletions scripts/prewalkthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,6 @@ function handlePreWalkthroughInfo () {
else {
saveVarToLocal("personaPronoun", personaPronoun);
saveVarToLocal("personaPossessive", personaPossessive);
sidebarBody().find("#pronounInput").val('');
sidebarBody().find("#possessiveInput").val('');

var personaName = getVarFromLocal("personaName");
setStatusToTrue("gotPronoun");
Expand Down

0 comments on commit c5e9605

Please sign in to comment.