Opened 9 years ago

Last modified 6 years ago

#13279 closed feature

Dojo Confirmation Dialog — at Initial Version

Reported by: tokeefe Owned by:
Priority: low Milestone: 1.10
Component: Dijit Version: 1.7.0b1
Keywords: confirmation dialog Cc:
Blocked By: Blocking:

Description

I would like to propose adding a confirmation dialog to dojo. I have implemented this as an extension of dijit.Dialog and I've attached the source here:


dojo.provide("dijit.ConfirmDialog?");

dojo.declare(

"dijit.ConfirmDialog?", [dijit.Dialog], {

widgetsInTemplate: true, templateString: dojo.cache("dijit", "templates/Confirm.html"), _onOkClick: function(e) {}, _onCancelClick: function(e) {}, constructor: function(props) {

if(typeof(props.OK) == "function")

this._onOkClick = props.OK;

if(typeof(props.CANCEL) == "function")

this._onCancelClick = props.CANCEL;

}

}

);


<div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">

<div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">

<span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span> <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" ta

<span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>

</span>

</div> <div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div> <div style="text-align: center">

<button dojoType="dijit.form.Button" dojoAttachPoint="okButton" dojoAttachEvent="onClick:_onOkClick">OK</button> <button dojoType="dijit.form.Button" dojoAttachPoint="cancelButton" dojoAttachEvent="onClick:_onCancelClick">Cancel</button>

</div>

</div>

Change History (1)

Changed 9 years ago by tokeefe

Attachment: ConfirmDialog.zip added
Note: See TracTickets for help on using tickets.