dojo - Adding a message icon to Dijit Dialog -


i new dojo , trying create (dijit) dialog pop displays message , icon. doing programatically , have managed create dialog have not been able figure out how add icon image dialog.

i found solution seemed promising ended not working.

heres tried

dialog declaration in dialog.js

this.mydialog = new dialog({                          title: this.title,                         content: "<center>"+this.content+"</center>"+"<br>",                         dolayout: false,                         style: "width: 50%"                         }); 

icon class in css

.myicon {  background: url("fakepath/images/32.png");  background-repeat: no-repeat;  width: 16px;  height: 16px;  text-align: left; } 

declaring dialog in jsp

<ui:dialog title="dialog box" id="mydialog" content="hi there"      buttontype="ok" iconclass="myicon"></ui:dialog> 

i dialog pop message no icons or hint of 1 (the empty placeholder when image path wrong)

dijit/dialog not support iconclass property, nothing being done value set.

where expecting icon appear? in title bar or part of content window?

if want in title bar need override template dialog uses when instantiate widget , make place icon in overridden template.

see dijit/templates/dialog.html

if want part of content window, need write html set content.

<div class="dialogmessage">    <div class="dijitinline messageicon error></div>    <div class="dijitinline message">       <span>your message here.</span>    </div> </div> 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -