Skip to content

Commit

Permalink
simmer 2023d continues. Fix tool tips.
Browse files Browse the repository at this point in the history
  • Loading branch information
eepsmedia committed Feb 28, 2023
1 parent 800c6a4 commit 20e6d73
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion eepsmedia/plugins/simmer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</div>

<div id="variableDisplayStrip" >
<p>foo</p>
<p>the variable display strip</p>
</div>

<div id="blocklyDiv" style="width: 100%;"></div>
Expand Down
2 changes: 1 addition & 1 deletion eepsmedia/plugins/simmer/src/simmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const simmer = {
let otherPills = ``;
const theButton = `
<div id="addVariableButton" onclick="simmer.openNewVariableModal()"
title="${DG.plugins.simmer.newVariableButtonTooltip}">
title="${DG.plugins.simmer.toolTips.addVariableButton}">
<span id="addVariablePlusSign">➕</span>
</div>
`;
Expand Down
21 changes: 14 additions & 7 deletions eepsmedia/plugins/simmer/strings/simmer.strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ let DG = {

let simmerStrings = {};



simmer.strings = {

language: null,
Expand All @@ -19,7 +17,7 @@ simmer.strings = {
this.language = iLang;
DG.plugins = simmerStrings[iLang];
this.setStaticStrings();
this.setButtonNames();
this.setToolTipTexts();
// this.setupCODAPDataset();
},

Expand All @@ -31,8 +29,7 @@ simmer.strings = {
if (theStaticStrings.hasOwnProperty(theID)) {
const theValue = theStaticStrings[theID];
try {
document.getElementById(theID).innerHTML = theValue;
// console.log(`Set string for ${theID} in ${iLang}`);
document.getElementById(theID).textContent = theValue;
} catch (msg) {
console.log(msg + ` on ID = ${theID}`);
}
Expand All @@ -41,8 +38,18 @@ simmer.strings = {

},

setButtonNames : async function() {

setToolTipTexts : async function() {
const theToolTips = DG.plugins.simmer.toolTips;
for (const theID in theToolTips) {
if (theToolTips.hasOwnProperty(theID)) {
const theValue = theToolTips[theID];
try {
document.getElementById(theID).title = theValue;
} catch (msg) {
console.log(msg + ` on ID = ${theID}`);
}
}
}
},

}
8 changes: 7 additions & 1 deletion eepsmedia/plugins/simmer/strings/strings.en.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,15 @@ simmerStrings.en = {
staticStrings : {
"newVariableNameBoxLabel" : "new variable name:",
"variableChangeReminderText" : "If you change the variables, the entire dataset will refresh.",
"newVariableButton" : "make new variable",
},

"newVariableButtonTooltip" : "make a new variable",
toolTips : {
"addVariableButton" : "make a new variable",
"trashButtonContainer" : "delete the CODAP dataset",
"shrinkButton" : "shrink this window to get more space",
"expandButton" : "expand this window so you can see and edit your program",
},

"dsTitle" : "results dataset",
"dsDescription" : "simulation results",
Expand Down

0 comments on commit 20e6d73

Please sign in to comment.