Changes between Initial Version and Version 1 of Ticket #13279


Ignore:
Timestamp:
Jun 30, 2011, 12:43:49 AM (8 years ago)
Author:
bill
Comment:

See also #2256. I've seen this request a few times, maybe it's worth adding. (Note that we can't look at your code unless you've filed a CLA, have you?)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13279

    • Property Milestone changed from tbd to future
    • Property Summary changed from Dojo Confirmation Dialog to Dialog: confirmation dialog
  • Ticket #13279 – Description

    initial v1  
    1 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:
    2 
    3 ------------------ WIDGET JAVASCRIPT ------------------------------
    4 dojo.provide("dijit.ConfirmDialog");
    5 
    6 dojo.declare(
    7     "dijit.ConfirmDialog",
    8     [dijit.Dialog],
    9     {   
    10         widgetsInTemplate: true,
    11         templateString: dojo.cache("dijit",   "templates/Confirm.html"),
    12         _onOkClick: function(e) {},
    13         _onCancelClick: function(e) {},
    14         constructor: function(props)
    15         {   
    16             if(typeof(props.OK) == "function")
    17                 this._onOkClick = props.OK;
    18    
    19             if(typeof(props.CANCEL) == "function")
    20                 this._onCancelClick = props.CANCEL;
    21         }   
    22     }   
    23 );
    24 
    25 ---------   HTML TEMPLATE (dijit/templates/Confirm.html) -----------
    26 <div class="dijitDialog" role="dialog" aria-labelledby="${id}_title">
    27     <div dojoAttachPoint="titleBar" class="dijitDialogTitleBar">
    28         <span dojoAttachPoint="titleNode" class="dijitDialogTitle" id="${id}_title"></span>
    29         <span dojoAttachPoint="closeButtonNode" class="dijitDialogCloseIcon" dojoAttachEvent="ondijitclick: onCancel" title="${buttonCancel}" role="button" ta
    30             <span dojoAttachPoint="closeText" class="closeText" title="${buttonCancel}">x</span>
    31         </span>
    32     </div>
    33     <div dojoAttachPoint="containerNode" class="dijitDialogPaneContent"></div>
    34     <div style="text-align: center">
    35         <button dojoType="dijit.form.Button" dojoAttachPoint="okButton" dojoAttachEvent="onClick:_onOkClick">OK</button>
    36         <button dojoType="dijit.form.Button" dojoAttachPoint="cancelButton" dojoAttachEvent="onClick:_onCancelClick">Cancel</button>
    37     </div>
    38 </div>
     1I 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