- Home
- Forum
- ASP.NET MVC
- Dialog Footer Template not displayed / formatted correcty
Dialog Footer Template not displayed / formatted correcty
Screenshot
@(Html.EJ()
.Dialog("messageBox")
.Title("Message")
.IsResponsive(true)
.EnableModal(false)
.ShowOnInit(false).ShowFooter(true).FooterTemplateId("messageBoxFooter")
)
<script id="messageBoxFooter" type="text/x-jsrender">
<div>
@Html.EJ().Button("btn1").Size(ButtonSize.Large).Text("OK")
@Html.EJ().Button("btn2").Size(ButtonSize.Mini).Text("Cancel")
</div>
</script>
Thank you very much for your quick reply and for the sample provided. The sample works well in my enviroment - as long as I set the 'UnobtrusiveJavaScriptEnabled' setting in my Web.config to false.
In my application I work with
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
If you set that to true in the sample the problem with the two tiny (unstyled?) buttons remains. Could this be a place to start further investigations? Thank you!
|
[@viewpage]
@(Html.EJ().Dialog("messageBox").Title("Message").IsResponsive(true).EnableModal(false) .ShowOnInit(false).ShowFooter(true).FooterTemplateId("messageBoxFooter").ClientSideEvents(evt => evt.Create("createDialog"))
)
In script section:
<script type="text/javascript">
function createDialog() {
ej.widget.init($("#messageBox_wrapper"));
}
</script> |
Thank you, this is working! Excellent support!
Another small relation question about the ejDialog: Is it possible to use the Dialog as replacement for JavaScript's 'confirm' function? Like that
function actionBegin(args) {
if (args.requestType == "delete") {
if (!confirm('Are you sure to this?')) { // THIS LINE
args.cancel = true;
return;
}
}
}
If I open the Dialog in THIS LINE the function will continue executing. Is there a chance to prevent the Dialog's open function from executing the continuing code?
Thank you for your reply and the excellent support. I found another solution for the issue.
- 8 Replies
- 3 Participants
-
RG Robert Glaser
- Aug 24, 2017 09:59 AM UTC
- Oct 10, 2017 05:36 AM UTC