Not sure how complicated it is but i would like to add a 'Help' button onto some of the widgets i have on my application. I tried coping the 'Measure' widget code but i can't get to work. I would gratefully appreciate any help please.
I have added the help image to html with the following and can see the help icon inside the widget.
div data-dojo-type="jimu/dijit/LoadingShelter" data-dojo-attach-point="shelter" data-dojo-props="hidden:true"></div>
<br><br><br><br><br><br><br><br><br><br><br><br>
<img src="widgets/ElevationProfile/images/help.png" height="25" width="62" data-dojo-attach-point="helpImage" style="cursor:pointer" />
</div>
I added the function in the _blindEvents: Function like so.
_bindEvents: function () {
this.own(on(this.btnClear, 'click', lang.hitch(this, this._clear)));
html.setStyle(this.btnClear, 'display', 'none');
this.own(on(this.btnExport, 'click', lang.hitch(this, this._export)));
this.own(on(this.helpImage, 'click', lang.hitch(this, function() {
var win = window.open("widgets/ElevationProfile/help/index.html", "_blank");
win.focus();
})));
html.setStyle(this.btnExport, 'display', 'none');
html.setStyle(this.btnInfo, 'display', 'none');
html.setStyle(this.btnDownload, 'display', 'none');
},
Just,
this._bindEvents();
alright this is to much back and forth with bits and pieces. Can you attach your whole widget,
When I added your widget to an app it had the help button and the mouse changed and the help doc showed when clicked.
WHAT! Did you add to Dev Web Appbuilder folder or the deployed app? i am working with ta deployed application.
Robert i see the problem i was testing in Chrome, once i opened the application on Firefox i was able click on the help button. So is the issue with Chrome?
Also does not work on internet explorer.
Nope I primarily work in Chrome and it worked fine for me.
interesting. i am on Version 57.0.2987.133 on Chrome.
Also does not work on internet explorer for me.
Any idea on why i am having these issues with these browsers.
try using a new incognito window in chrome and paste your apps url in the addressbar to verify if it is a cache issue.