Welcome Guest Search | Active Topics | Sign In | Register

EO Dialog not applying show modal Options
PThompson
Posted: Tuesday, September 8, 2009 7:37:00 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Hi

I have applied an eo:dialog to use as a popup on my page. However I cannot get the show modal to work.

I've tried the following scenarios.

1. the eo dialog in a callbackpanel with a button. On the button click I set the IsModal to true server side.
eg: this.dlgSendPopup.IsModal = true;
this.dlgSendPopup.HeaderHtml = "Send Email";
this.dlgSendPopup.InitialState = EO.Web.DialogState.Visible;


The dialog pops up but is not modal with the page.

2. the eo dialog still in the callbackpanel with a button. In the callbackpanel client side before execute I use the eo_GetObject for the dialog passing true to the show method.

eg: eo_GetObject('dlgSendPopup').show(true);

Then return false to the serverside callback execute method. Again the dialog control pop's up but not in modal mode.

Can you tell me what I'm missing please?

Thanks
eo_support
Posted: Tuesday, September 8, 2009 9:43:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Your code looks fine to us. Please try to isolate the problem into a separate test page. We will try to run it here as soon as we have that. As soon as we can see the problem, we should be able to tell you exactly what's wrong.

Thanks!
PThompson
Posted: Tuesday, September 8, 2009 10:01:31 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
OK, I've stripped it out to a test page and I still cannot get to dialog to show in modal mode .

Here's the test code. This version is setting modal server side then closing the dialog box on either button click

HTML:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="testpopup.aspx.cs" Inherits="Applications_Informs2_Maintenance_testpopup" %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<eo:CallbackPanel ID="cbpCopyCommands" runat="server"
Triggers="{ControlID:imgDeleteCopy;Parameter:imgDeleteCopy},{ControlID:imgCopyCampaignLinks;Parameter:imgCopyCampaignLinks},{ControlID:imgSendCampaign;Parameter:imgSendCampaign},{ControlID:imgUpdate;Parameter:imgUpdate},{ControlID:imgCancel;Parameter:imgCancel},{ControlID:dlgSendPopup;Parameter:dlgSendPopup},{ControlID:dlgCopyPopup;Parameter:dlgCopyPopup}"
GroupName="CopyMgmt"
Width="100%" OnExecute="cbpCopyCommands_Execute" >
<table id="commandbuttons" border="0" width="100%">
<tr>
<td colspan="2">
<hr style="text-align: left; width: 100%;" />
</td>
</tr>
<tr>
<td align="left" style="width: 30%; vertical-align: bottom;">
<asp:ImageButton ID="imgDeleteCopy" runat="server" AlternateText="Delete Copy" ImageUrl="~/Images/Informs/Enabled_Delete.gif"
ToolTip="Delete Copy" />
&nbsp;&nbsp;&nbsp;
<asp:ImageButton ID="imgCopyCampaignLinks" runat="server" AlternateText="Copy Campaign Links"
ImageUrl="~/Images/Informs/Enabled_Copy.gif" ToolTip="Copy Campaign Links" />
&nbsp;&nbsp;&nbsp; <strong>
<asp:ImageButton ID="imgSendCampaign" runat="server" ImageUrl="~/Images/Informs/email.GIF"
ToolTip="Email copy list to Local ATP's" AlternateText="Send Copy List" /></strong>
&nbsp;&nbsp;&nbsp;
</td>
<td align="right" style="width: 70%; vertical-align: bottom;">
<asp:ImageButton ID="imgUpdate" runat="server" AlternateText="Edit Copy" ImageUrl="~/Images/Informs/Enabled_Open.gif"
ToolTip="Edit Copy" />&nbsp;&nbsp;
<asp:ImageButton ID="imgCancel" runat="server" AlternateText="Cancel Changes" ImageUrl="~/Images/Informs/Enabled_Cancel.gif"
ToolTip="Cancel Changes" />&nbsp;
</td>
</tr>
</table>

<eo:Dialog ID="dlgCopyPopup" runat="server" Height="150px" Width="250px" ControlSkinID="None"
BorderWidth="1px" ShadowColor="LightGray" BorderColor="#335C88" ShadowDepth="3"
AcceptButton="imgCopyBtn" CancelButton="imgCancelCopyBtn"
BorderStyle="Solid" BackShadeColor="Transparent" HeaderHtml="Copy Campaign Carts Links ">
<FooterTemplate>
<div id="dialogbuttons" style="text-align: center;">
<asp:ImageButton ID="imgCopyBtn" runat="server" AlternateText="Copy Campaign" CommandName="CopyCampaign"
ToolTip="Copy campaign cart links to another campaign" ImageUrl="~/Images/Informs/Enabled_Copy.gif"
Style="width: 45px; height: 30px;" />
<asp:ImageButton ID="imgCancelCopyBtn" runat="server" AlternateText="Cancel Copy" CommandName="Cancel"
ToolTip="Cancel Copy" ImageUrl="~/Images/Informs/Enabled_Cancel_Sml.gif"
Style="width: 50px; height: 30px;" />
</div>
</FooterTemplate>
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; padding-bottom: 3px; padding-top: 3px; font-family: tahoma; background-image: url(00070104);" />
<FooterStyleActive CssText="background-color: #e5f1fd; padding-bottom: 8px;" />
<ContentTemplate>
<table border="0" width="100%" style="background-color:Transparent;">
<tr>
<td style="width:40%"> Source ID:</td>
<td><asp:TextBox ID="txtSourceId" runat="server" /></td>
</tr>
<tr>
<td style="width:60%"> Destination ID:</td>
<td> <asp:TextBox ID="txtDestinationId" runat="server" /> </td>
</tr>
</table >
</ContentTemplate>
<ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" />
<CloseEffect Type="Fade" />
</eo:Dialog>

&nbsp;

<eo:Dialog ID="dlgSendPopup" runat="server" Height="150px" Width="250px" ControlSkinID="None"
BorderWidth="1px" ShadowColor="LightGray" BorderColor="#335C88" ShadowDepth="3"
AcceptButton="imgSendBtn" CancelButton="imgCancelSendBtn"
BorderStyle="Solid" BackShadeColor="Transparent" HeaderHtml="Send Cart info to Local ATP's">
<FooterTemplate>
<div id="divSendButtons" style="text-align: center;">
<asp:ImageButton ID="imgSendBtn" runat="server"
AlternateText="Email cart into to local ATP's" CommandName="SendCampaign"
ToolTip="Email cart into to local ATP's" ImageUrl="~/Images/Informs/email.GIF"
Style="width: 45px; height: 30px;" />
<asp:ImageButton ID="imgCancelSendBtn" runat="server" AlternateText="Cancel Send" CommandName="Cancel"
ToolTip="Cancel Send" ImageUrl="~/Images/Informs/Enabled_Cancel_Sml.gif"
Style="width: 50px; height: 30px;" />
</div>
</FooterTemplate>
<HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; padding-bottom: 3px; padding-top: 3px; font-family: tahoma; background-image: url(00070104);" />
<FooterStyleActive CssText="background-color: #e5f1fd; padding-bottom: 8px;" />
<ContentTemplate>
<table border="0" width="100%" style="background-color:Transparent;">
<tr>
<td style="width:40%"> Campaign ID:</td>
<td style="width:60%"><asp:TextBox ID="txtSendCampaignId" runat="server" /></td>
</tr>
</table>
</ContentTemplate>
<ContentStyleActive CssText="border-top: #335c88 1px solid; background-color: #e5f1fd" />
<CloseEffect Type="Fade" />
</eo:Dialog>


</eo:CallbackPanel>
</asp:Content>


CODEBEHIND

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Applications_Informs2_Maintenance_testpopup : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void cbpCopyCommands_Execute(object sender, EO.Web.CallbackEventArgs e)
{
try
{
string eventArg;
string trigger = e.Parameter;

switch (trigger)
{
case "imgDeleteCopy":
break;
case "imgCopyCampaignLinks":
this.LoadCopyPopup();
break;
case "imgSendCampaign":
this.LoadSendPopup();
break;
case "dlgCopyPopup":
eventArg = ((EO.Web.CallbackPanel)sender).LastTrigger.EventTarget;
this.ApplyCopyCampaign(eventArg);
break;
case "dlgSendPopup":
eventArg = ((EO.Web.CallbackPanel)sender).LastTrigger.EventTarget;
this.ApplySendCampaign(eventArg);
break;
case "imgUpdate":
break;
case "imgCancel":
break;
}
}
catch (Exception Ex)
{
throw Ex;
}
}

private void LoadCopyPopup()
{
try
{
this.dlgCopyPopup.IsModal = true;
this.dlgCopyPopup.InitialState = EO.Web.DialogState.Visible;
}
catch (Exception ex)
{
throw ex;
}
}
private void LoadSendPopup()
{
try
{
this.dlgSendPopup.IsModal = true;
this.dlgSendPopup.InitialState = EO.Web.DialogState.Visible;
}
catch (Exception ex)
{
throw ex;
}
}

private void ApplyCopyCampaign(string eventArg)
{
try
{

this.dlgCopyPopup.InitialState = EO.Web.DialogState.Hidden;

}
catch (Exception ex)
{
throw ex;
}
}
private void ApplySendCampaign(string eventArg)
{
try
{

this.dlgSendPopup.InitialState = EO.Web.DialogState.Hidden;
}
catch (Exception ex)
{
throw ex;
}
}
}


eo_support
Posted: Tuesday, September 8, 2009 11:32:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to remove BackShadeColor="Transparent" from your dialog. You cannot have a transparent shade color and a modal dialog at the same time because the shade is what provides the modal functionalities. You can set the BackShadeOpacity to a very low value so that the shade is not noticeable.

Thanks!
PThompson
Posted: Tuesday, September 8, 2009 12:24:04 PM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Excellent it works.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.