Dialog
innner tag 1
innner tag 2
innner tag 1
innner tag 2
html
<div id="dialog1"
data-urushi-type="Dialog"
data-urushi-options='{"header" : "Header name"}'>
<div>innner tag 1</div>
<div>innner tag 2</div>
</div>
<div id="dialog2"
data-urushi-type="Dialog"
data-urushi-options='{"header": "Header name", "footer": "footer message", "isDisplayCloseIcon": true}'>
<div>innner tag 1</div>
<div>innner tag 2</div>
<button class="button-primary" data-urushi-type="button">button in dialog</button>
</div>
javascript
//main.js
require.config(requireConfig);
require([ 'templateEngine', 'templateConfig', 'Urushi' ], function(
templateEngine, templateConfig, Urushi) {
templateEngine.renderDocument(document.body, templateConfig).then(function(result) {
var modules = result.widgets;
Urushi.addEvent(
modules.button1.getRootNode(),
'click',
modules.button1, function() {
modules.dialog1.show();
}
);
Urushi.addEvent(
modules.button2.getRootNode(),
'click',
modules.button2, function() {
modules.dialog2.show();
}
);
});
});