Declined
Last Updated: 27 Feb 2015 21:30 by ADMIN
IKKI
Created on: 06 Jan 2013 10:02
Category: Kendo UI for jQuery
Type: Feature Request
1
The best way I think to create a confirm window(dialog)~
Now, we create a confirm window by these code:

$(".exitBtn").click(function(e){
    e.preventDefault();
    var exitWindow = $("<div class='p20 tac' />").kendoWindow({
        title: "exit...",
        resizable: false,
        modal: true
    });
    exitWindow.data("kendoWindow").content($("#exit").html()).center().open();
    exitWindow.find(".confirm,.cancel").click(function() {
        if ($(this).hasClass("confirm")) {
            alert("blabla...");
        }
        exitWindow.data("kendoWindow").close();
    }).end()
});
<script id="exit" type="text/x-kendo-template">
    <p>blabla...</p>
</script>

It's so complicate!!!!!!!!!!
I want to coding in this way:
$(".exitBtn").click(function(){
    $("<div class='p20 tac' />").kendoWindow({
        title: "exit...",
        content: "<p>blabla...</p>",
        resizable: false,
        modal: true,
        center: true,
        okVal: "Exit",
        cancelVal: "I don't",
        ok: function(){
            alert(Exiting...);
        },
        cancel: function(){
            exitWindow.close();
        }
    });
});
1 comment
ADMIN
Brandon
Posted on: 10 May 2013 19:33
Closed due to zero votes