Where should one put some custom javascript code in the application that the WAB generates?
I would like to change the tooltip text during drawing. It would be something like this: esri.bundle.toolbars.draw.resume = "New text here";
Solved! Go to Solution.
Benedek,
You can put his in the MapManager.js constructor function. First you would have to add the esriBundle require to the require list.
'dojo/i18n!esri/nls/jsapi', and the associated var of esriBundle (hopefully you are familiar with AMD programming and the need for requires and their vars to line up).
Then put this line in the constructor function:
esriBundle.toolbars.draw.resume = "New text here";
Benedek,
You can put his in the MapManager.js constructor function. First you would have to add the esriBundle require to the require list.
'dojo/i18n!esri/nls/jsapi', and the associated var of esriBundle (hopefully you are familiar with AMD programming and the need for requires and their vars to line up).
Then put this line in the constructor function:
esriBundle.toolbars.draw.resume = "New text here";
Thank you Robert, that has totally worked!
And one more quick question: If I would like my app to be bilingual, is there a way to update these strings according to the language? I guess a quick and dirty solution would be an if else statement, based on the navigator.language...
Benedek,
I have never been able to get WAB to display in a different language. There is a gentleman in esri France that helped me add the "fr" locale to the widget and he has the widget working in french. It must be more of an OS thing.