PDA

View Full Version : X.Msg.Info modal=true not runing



hakandonmez
Dec 10, 2014, 6:58 PM
Code Behind cs file
the following code running, but Modal= true not running



public void XMsgInfo(string title, string html, Ext.Net.Icon icon, Ext.Net.UI ui, bool autohide, bool modal)
{
Ext.Net.Button ExtNetBtnAccept = new Ext.Net.Button
{
Text = "ok",
Handler = "this.up('infopanel').destroy();",
Icon = Ext.Net.Icon.Accept,
PaddingSpec = "5"
};

X.Msg.Info(
new InfoPanel
{
Icon = icon,
StyleSpec = "box-shadow: 4px 4px 8px rgba(0, 0, 0, .175);",
Title = title,
Html = html,
AutoHide = autohide,
UI = ui,
Buttons = { ExtNetBtnAccept },
Modal = modal,
Alignment = AnchorPoint.Center
}
).Show();
}

Daniil
Dec 23, 2014, 8:51 AM
Hi @hakandonmez,

Thank you for the report. Created an Issue.
https://github.com/extnet/Ext.NET/issues/621

Also another issue has been discovered.
https://github.com/extnet/Ext.NET/issues/622

I've fixed that locally and will commit to SVN soon. It will go to the v3.1.0 release.

Here is an example with both the fixes applied.

Example

<%@ Page Language="C#" %>

<script runat="server">
protected void Show(object sender, DirectEventArgs e)
{
this.XMsgInfo("title", "html", Icon.Cake, UI.Danger, false, true);
}

public void XMsgInfo(string title, string html, Ext.Net.Icon icon, Ext.Net.UI ui, bool autohide, bool modal)
{
Ext.Net.Button ExtNetBtnAccept = new Ext.Net.Button
{
Text = "ok",
Handler = "this.up('infopanel').destroy();",
Icon = Ext.Net.Icon.Accept,
PaddingSpec = "5"
};

X.Msg.Info(
new InfoPanel
{
Icon = icon,
StyleSpec = "box-shadow: 4px 4px 8px rgba(0, 0, 0, .175);",
Title = title,
Html = html,
AutoHide = autohide,
UI = ui,
Buttons = { ExtNetBtnAccept },
Modal = modal,
Alignment = AnchorPoint.Center
}
).Show();
}
</script>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET v3 Example</title>

<style>
div.x-mask {
border: none;
}
</style>

<script>
Ext.net.InfoPanel.override({
toFront: function () {
this.setZIndex(this.zIndexManager.zseed);

if (this.modal) {
this.zIndexManager._showModalMask(this);
}
}
});
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Button runat="server" Text="Show" OnDirectClick="Show" />
</form>
</body>
</html>