Welcome Guest Search | Active Topics | Sign In | Register

Problem with Dialog Control in HTMLEditor Options
Philipp Jenni
Posted: Wednesday, July 23, 2008 4:12:28 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2007
Posts: 98
Hi,

I have add an select file dialog in the add image dialog of the htmleditor. i use this to select a file that are saved on the server.

but when i close my selection dialog, than freeze all other dialogs in my page. have you an solution for this problem...

i have made a sample page...

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Testseite.aspx.cs" Inherits="Testseite" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>

<script language="javascript">
   function showSelectDialog() {
   eo_GetObject('dlgBrowseServer').show(true);
   return false;
   }
   function updateFiles() {
//     eo_Callback('CallbackPanel1',eo_GetObject('treeDialogUploadVerzeichnis').getSelectedNode().getPath());
   }
</script>

<body>
    <form id="form1" runat="server">
    <br />
            <eo:Editor ID="EditorContent" runat="server" BreadcrumbLabelText=""
            DesignTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;Design&lt;/div&gt;"
            Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
            Font-Underline="False" Height="600px" HighlightColor="255, 255, 192" HtmlTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;HTML&lt;/div&gt;"
            PreviewTabButtonText="&lt;div style=&quot;padding-left:18px;padding-top:3px;&quot;&gt;Preview&lt;/div&gt;"
            ToolBarItems="Copy,Cut,Paste,PasteAsText,,ClearFormat,ClearWordFormat,,Redo,Undo,Find;InsertOrEditImage,InsertOrEditLink,InsertOrEditAnchor,RemoveLink,,InsertOrEditTable,,Indent,Outdent,,ForeColor,BackColor,,SpellCheck;Styles,Fonts,FontSizes,Bold,Italic,Underline,,AlignLeft,AlignCenter,AlignRight,AlignJustify,,BulletList,NumberedList"
            ToolBarSet="Custom" Width="100%">
            <DialogContents>
                <eo:EditorDialogContent CommandName="Find" Title="Suchen/Ersetzen">
                    <ContentTemplate>
                        <div style="width: 450px">
                            <table cellspacing="3" cellpadding="1" border="0" style="float: right;">
                                <tr>
                                    <td>
                                        <input type="button" name="eo_editor_default_button" value="Suchen" style="width: 100px;"
                                            onclick="eo_GetContainer(this, 'Editor').execDialogCommand('FindNext', this, event);" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="button" value="Ersetzen" style="width: 100px;" onclick="eo_GetContainer(this, 'Editor').execDialogCommand('FindReplace', this, event);" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="button" value="Alle Ersetzen" style="width: 100px;" onclick="eo_GetContainer(this, 'Editor').execDialogCommand('FindReplaceAll', this, event);" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="button" value="Schliessen" style="width: 100px;" onclick="eo_GetContainer(this, 'Editor').closeDialog(this, event);" />
                                    </td>
                                </tr>
                            </table>
                            <table cellspacing="3" cellpadding="1" border="0">
                                <tr>
                                    <td width="90px" nowrap="nowrap">
                                        Suchen nach:
                                    </td>
                                    <td>
                                        <input type="text" name="eo_editor_find_text" style="width: 200px;" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Ersetzten mit:
                                    </td>
                                    <td>
                                        <input type="text" name="eo_editor_replace_with" style="width: 200px;" />
                                    </td>
                                </tr>
                            </table>
                            <table cellspacing="3" cellpadding="1" border="0">
                                <tr>
                                    <td colspan="2" width="300px" valign="top">
                                        <input type="checkbox" name="eo_editor_find_match_whole_word" value="match_whole_word" />
                                        Nur ganzes Wort suchen
                                        <br />
                                        <input type="checkbox" name="eo_editor_find_match_case" value="match_case" />
                                        Groß-/Kleinschreibung beachten
                                    </td>
                                    <td>
                                        <fieldset style="width: 120px;">
                                            <legend>Suchrichtung</legend>
                                            <input type="radio" name="eo_editor_find_dir" />
                                            Auf
                                            <br />
                                            <input type="radio" name="eo_editor_find_dir" checked />
                                            Ab
                                            <br />
                                        </fieldset>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </ContentTemplate>
                </eo:EditorDialogContent>
                <eo:EditorDialogContent CommandName="InsertOrEditTable" Title="Tabelle einfügen"
                    EditTitle="Tabelle bearbeiten">
                    <ContentTemplate>
                        <table cellspacing="3" cellpadding="1" border="0" style="width: 437px">
                            <tr>
                                <td width="60px" nowrap="nowrap">
                                    Spalten:
                                </td>
                                <td>
                                    <input type="text" name="eo_editor_table_cols" style="width: 100px;" />
                                </td>
                                <td width="60px" nowrap="nowrap">
                                    Reihen:
                                </td>
                                <td colspan="2" rowspan="1">
                                    <input type="text" name="eo_editor_table_rows" style="width: 100px;" />
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    Breite:
                                </td>
                                <td>
                                    <input type="text" name="eo_editor_table_width" style="width: 100px;" />
                                </td>
                                <td nowrap="nowrap">
                                    Höhe:
                                </td>
                                <td colspan="2">
                                    <input type="text" name="eo_editor_table_height" style="width: 100px;" />
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    Rahmenbreite:
                                </td>
                                <td>
                                    <input type="text" name="eo_editor_table_bordersize" style="width: 100px;" />
                                </td>
                                <td nowrap="nowrap">
                                    Rahmenfarbe:
                                </td>
                                <td style="width: 80px;">
                                    <input type="text" name="eo_editor_table_bordercolor" id="eo_editor_table_bordercolor"
                                        style="width: 80px;" />
                                </td>
                                <td>
                                    <eo:ColorPicker ID="colorPicker_BorderColor" runat="server" ControlSkinID="None"
                                        PopupImageUrl="00000100" TitleText="Farbe auswählen:" WebSafeLabelText="Nur Webfarben verwenden."
                                        ClientSideOnChange="setColorInTable">
                                        <PopupStyle CssText="border-right: #999999 1px solid; border-top: #999999 1px solid; font-size: 10pt; border-left: #999999 1px solid; color: #0751b8; border-bottom: #999999 1px solid; font-family: arial; background-color: white" />
                                        <TextBoxStyle CssText="border-right: #7f9db9 1px solid; border-top: #7f9db9 1px solid; border-left: #7f9db9 1px solid; border-bottom: #7f9db9 1px solid" />
                                    </eo:ColorPicker>
                                </td>
                            </tr>
                            <tr>
                                <td nowrap="nowrap">
                                    Zellauffüllung:
                                </td>
                                <td>
                                    <input type="text" name="eo_editor_table_cellpadding" style="width: 100px;" />
                                </td>
                                <td nowrap="nowrap">
                                    Zellraum:
                                </td>
                                <td colspan="2">
                                    <input type="text" name="eo_editor_table_cellspacing" style="width: 100px;" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    <input type="checkbox" name="eo_editor_table_bordercollapse" />
                                    Rahmen zusammenfassen
                                </td>
                            </tr>
                            <tr>
                                <td align="right" colspan="5">
                                    <input type="button" name="eo_editor_default_button" value="Einfügen" style="width: 80px;"
                                        onclick="eo_GetContainer(this, 'Editor').execDialogCommand('InsertOrEditTable', this, event);" /> 
                                    <input type="button" value="Schliessen" style="width: 80px;" onclick="eo_GetContainer(this, 'Editor').closeDialog(this, event);" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </eo:EditorDialogContent>
                <eo:EditorDialogContent CommandName="InsertOrEditImage" Title="Bild einfügen" EditTitle="Bild bearbeiten">
                    <ContentTemplate>
                        <table cellspacing="3" cellpadding="1" border="0" style="width: 387px">
                            <tr>
                                <td width="60px" nowrap="nowrap">
                                    Bild:
                                </td>
                                <td colspan="3">
                                    <input type="text" name="eo_editor_insertimage_url" style="width: 250px;" />
                                    <button name="SelectDialog" value="..." onclick="eo_GetObject('dlgBrowseServer').show(true);"></button>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Beschreibung:
                                </td>
                                <td colspan="3">
                                    <input type="text" name="eo_editor_insertimage_desc" style="width: 250px;" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Breite:
                                </td>
                                <td>
                                    <input type="text" name="eo_editor_insertimage_width" style="width: 90px;" />
                                </td>
                                <td>
                                    Höhe:
                                </td>
                                <td align="right">
                                    <input type="text" name="eo_editor_insertimage_height" style="width: 90px;" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" colspan="4">
                                    <input type="button" name="eo_editor_default_button" value="OK" style="width: 80px;"
                                        onclick="eo_GetContainer(this, 'Editor').execDialogCommand('InsertOrEditImage', this, event);" /> 
                                    <input type="button" value="Schliessen" style="width: 80px;" onclick="eo_GetContainer(this, 'Editor').closeDialog(this, event);" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </eo:EditorDialogContent>
            </DialogContents>
            <FooterStyle CssText="background-color:#cccccc;padding-bottom:2px;" />
            <BreadcrumbDropDownStyle CssText="border-right: #435f96 1px solid; border-top: #435f96 1px solid; border-left: #435f96 1px solid; border-bottom: #435f96 1px solid; background-color: #eef3fa" />
            <EmoticonStyle CssText="background-color:white;border-bottom-color:#c5d3ed;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#c5d3ed;border-left-style:solid;border-left-width:1px;border-right-color:#c5d3ed;border-right-style:solid;border-right-width:1px;border-top-color:#c5d3ed;border-top-style:solid;border-top-width:1px;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;" />
            <HtmlTabButtonStyles>
                <NormalStyle CssText="font-size: 12px; background-image: url(00102004); width: 63px; font-family: tahoma; height: 21px" />
                <HoverStyle CssText="font-size: 12px; background-image: url(00102005); width: 63px; font-family: tahoma; height: 21px" />
                <SelectedStyle CssText="font-size: 12px; background-image: url(00102006); width: 63px; font-family: tahoma; height: 21px" />
            </HtmlTabButtonStyles>
            <BreadcrumbLabelStyle CssText="padding-right: 6px; padding-left: 6px; font-size: 12px; padding-top: 1px; font-family: tahoma" />
            <PreviewTabButtonStyles>
                <NormalStyle CssText="font-size: 12px; background-image: url(00102007); width: 63px; font-family: tahoma; height: 21px" />
                <HoverStyle CssText="font-size: 12px; background-image: url(00102008); width: 63px; font-family: tahoma; height: 21px" />
                <SelectedStyle CssText="font-size: 12px; background-image: url(00102009); width: 63px; font-family: tahoma; height: 21px" />
            </PreviewTabButtonStyles>
            <BreadcrumbItemStyle CssText="background-color:#d7e4fa;border-bottom-color:#002d96;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#002d96;border-left-style:solid;border-left-width:1px;border-right-color:#002d96;border-right-style:solid;border-right-width:1px;border-top-color:#002d96;border-top-style:solid;border-top-width:1px;font-family:tahoma;font-size:12px;margin-top:1px;padding-bottom:1px;padding-left:3px;padding-right:3px;padding-top:1px;" />
            <BreadcrumbItemHoverStyle CssText="background-color:#ffd69c;border-bottom-color:#002d96;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#002d96;border-left-style:solid;border-left-width:1px;border-right-color:#002d96;border-right-style:solid;border-right-width:1px;border-top-color:#002d96;border-top-style:solid;border-top-width:1px;font-family:tahoma;font-size:12px;margin-top:1px;padding-bottom:1px;padding-left:3px;padding-right:3px;padding-top:1px;" />
            <CustomFooterTemplate>
                <div style="float: left; width: 200px;">
                    <asp:PlaceHolder ID="ViewTabs" runat="server"></asp:PlaceHolder>
                </div>
                <div style="padding-top: 1px">
                    <asp:PlaceHolder ID="Breadcrumb" runat="server"></asp:PlaceHolder>
                </div>
            </CustomFooterTemplate>
            <EditAreaStyle CssText="border-bottom-color:gray;border-bottom-style:solid;border-bottom-width:1px;border-left-color:gray;border-left-style:solid;border-left-width:1px;border-right-color:gray;border-right-style:solid;border-right-width:1px;border-top-color:gray;border-top-style:solid;border-top-width:1px;" />
            <HeaderStyle CssText="background-color:#9ebef5;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
            <BreadcrumbItemSeparatorStyle CssText="width: 3px; height: 10px" />
            <EmoticonDropDownStyle CssText="border-right: #435f96 1px solid; border-top: #435f96 1px solid; border-left: #435f96 1px solid; border-bottom: #435f96 1px solid; background-color: #eef3fa" />
            <DesignTabButtonStyles>
                <NormalStyle CssText="font-size: 12px; background-image: url(00102001); width: 63px; font-family: tahoma; height: 21px" />
                <HoverStyle CssText="font-size: 12px; background-image: url(00102002); width: 63px; font-family: tahoma; height: 21px" />
                <SelectedStyle CssText="font-size: 12px; background-image: url(00102003); width: 63px; font-family: tahoma; height: 21px" />
            </DesignTabButtonStyles>
        </eo:Editor>

    
    

    <eo:Dialog ID="dlgBrowseServer" runat="server" BackColor="White" CloseButtonUrl="00020312"
        ControlSkinID="None" HeaderHtml="Dialog Title" Height="216px" Width="320px"
        ClientSideOnAccept="setSelectedPath" ShowButton="cmdDialogImageShow">
        <FooterTemplate> 
        <button name="closeDialog" onclick="eo_GetObject('dlgBrowseServer').cancel();" value="Schliessen">Schliessen</button> 
        <button name="acceptDialog" onclick="eo_GetObject('dlgBrowseServer').accept();" value="OK">OK</button>
        </FooterTemplate>
        <HeaderStyleActive CssText="background-image:url('00020311');color:black;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:5px;padding-left:8px;padding-right:3px;padding-top:0px;" />
        <BorderImages BottomBorder="00020305" BottomLeftCorner="00020304" BottomRightCorner="00020306"
            LeftBorder="00020303" RightBorder="00020307" TopBorder="00020310" TopLeftCorner="00020301"
            TopLeftCornerBottom="00020302" TopRightCorner="00020309" TopRightCornerBottom="00020308" />
        <FooterStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
        <ContentTemplate>
            <eo:CallbackPanel ID="callbackpanelEditImage" runat="server" Height="150px" OnExecute="callbackpanelEditImage_Execute"
                Triggers="{ControlID:treeDialogUploadVerzeichnis;Parameter:}" 
                Width="200px">
                <table style="width: auto;">
                    <tr>
                        <td style="width: 220px; vertical-align: top;">
                            <eo:TreeView ID="treeDialogUploadVerzeichnis" runat="server" ControlSkinID="None"
                                Height="250px" OnItemClick="treeDialogUploadVerzeichnis_ItemClick" Width="220px"
                                ClientSideOnItemClick="" RaisesServerEvent="True">
                                <LookNodes>
                                    <eo:TreeNode CollapsedImageUrl="00030301" DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
                                        ExpandedImageUrl="00030302" ImageUrl="00030301" ItemID="_Default" NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 1px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none"
                                        SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
                                    </eo:TreeNode>
                                </LookNodes>
                                <TopGroup Style-CssText="border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:black;cursor:hand;font-family:Tahoma;font-size:8pt;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;">
                                </TopGroup>
                            </eo:TreeView>
                        </td>
                        <td style="vertical-align: top;">
                            <eo:Grid ID="gridDialogUploadDateien" runat="server" BorderColor="#828790" BorderWidth="1px"
                                ClientSideOnItemSelected="setSelectedPath" ColumnHeaderAscImage="00050204" ColumnHeaderDescImage="00050205"
                                ColumnHeaderDividerImage="00050203" ColumnHeaderHeight="24" FixedColumnCount="1"
                                Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Overline="False"
                                Font-Size="8pt" Font-Strikeout="False" Font-Underline="False" GridLineColor="240, 240, 240"
                                GridLines="Both" Height="258px" ItemHeight="16" PageSize="10" Width="530px">
                                <FooterStyle CssText="padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;" />
                                <ItemStyles>
                                    <eo:GridItemStyleSet>
                                        <ItemStyle CssText="background-color: white" />
                                        <ItemHoverStyle CssText="background-image: url(00050206); background-repeat: repeat-x" />
                                        <SelectedStyle CssText="background-image: url(00050207); background-repeat: repeat-x" />
                                        <CellStyle CssText="padding-left:8px;padding-top:2px;" />
                                    </eo:GridItemStyleSet>
                                </ItemStyles>
                                <ColumnTemplates>
                                    <eo:TextBoxColumn>
                                        <TextBoxStyle CssText="BORDER-RIGHT: #7f9db9 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7f9db9 1px solid; PADDING-LEFT: 2px; FONT-SIZE: 8.75pt; PADDING-BOTTOM: 1px; MARGIN: 0px; BORDER-LEFT: #7f9db9 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #7f9db9 1px solid; FONT-FAMILY: Tahoma" />
                                    </eo:TextBoxColumn>
                                    <eo:DateTimeColumn>
                                        <DatePicker ControlSkinID="None" DayCellHeight="16" DayCellWidth="19" DayHeaderFormat="FirstLetter"
                                            DisabledDates="" OtherMonthDayVisible="True" SelectedDates="" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
                                            TitleRightArrowImageUrl="DefaultSubMenuIcon">
                                            <TodayStyle CssText="font-family: tahoma; font-size: 12px; border-right: #bb5503 1px solid; border-top: #bb5503 1px solid; border-left: #bb5503 1px solid; border-bottom: #bb5503 1px solid" />
                                            <SelectedDayStyle CssText="font-family: tahoma; font-size: 12px; background-color: #fbe694; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
                                            <DisabledDayStyle CssText="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
                                            <PickerStyle CssText="border-bottom-color:#7f9db9;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#7f9db9;border-left-style:solid;border-left-width:1px;border-right-color:#7f9db9;border-right-style:solid;border-right-width:1px;border-top-color:#7f9db9;border-top-style:solid;border-top-width:1px;font-family:Courier New;font-size:8pt;margin-bottom:0px;margin-left:0px;margin-right:0px;margin-top:0px;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                                            <CalendarStyle CssText="background-color: white; border-right: #7f9db9 1px solid; padding-right: 4px; border-top: #7f9db9 1px solid; padding-left: 4px; font-size: 9px; padding-bottom: 4px; border-left: #7f9db9 1px solid; padding-top: 4px; border-bottom: #7f9db9 1px solid; font-family: tahoma" />
                                            <TitleArrowStyle CssText="cursor:hand" />
                                            <DayHoverStyle CssText="font-family: tahoma; font-size: 12px; border-right: #fbe694 1px solid; border-top: #fbe694 1px solid; border-left: #fbe694 1px solid; border-bottom: #fbe694 1px solid" />
                                            <MonthStyle CssText="font-family: tahoma; font-size: 12px; margin-left: 14px; cursor: hand; margin-right: 14px" />
                                            <TitleStyle CssText="background-color:#9ebef5;font-family:Tahoma;font-size:12px;padding-bottom:2px;padding-left:6px;padding-right:6px;padding-top:2px;" />
                                            <OtherMonthDayStyle CssText="font-family: tahoma; font-size: 12px; color: gray; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
                                            <DayHeaderStyle CssText="font-family: tahoma; font-size: 12px; border-bottom: #aca899 1px solid" />
                                            <DayStyle CssText="font-family: tahoma; font-size: 12px; border-right: white 1px solid; border-top: white 1px solid; border-left: white 1px solid; border-bottom: white 1px solid" />
                                        </DatePicker>
                                    </eo:DateTimeColumn>
                                    <eo:MaskedEditColumn>
                                        <MaskedEdit ControlSkinID="None" TextBoxStyle-CssText="BORDER-RIGHT: #7f9db9 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #7f9db9 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 1px; MARGIN: 0px; BORDER-LEFT: #7f9db9 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #7f9db9 1px solid; font-family:Courier New;font-size:8pt;">
                                        </MaskedEdit>
                                    </eo:MaskedEditColumn>
                                </ColumnTemplates>
                                <ColumnHeaderHoverStyle CssText="background-image:url('00050202');padding-left:8px;padding-top:4px;" />
                                <Columns>
                                    <eo:RowNumberColumn Width="50">
                                    </eo:RowNumberColumn>
                                    <eo:StaticColumn AllowSort="True" DataField="File" HeaderText="File" Text="" Width="300">
                                    </eo:StaticColumn>
                                    <eo:StaticColumn AllowSort="True" DataField="Size" HeaderText="Size" Text="">
                                    </eo:StaticColumn>
                                    <eo:StaticColumn AllowSort="True" DataField="Extension" HeaderText="Extension" Width="80">
                                    </eo:StaticColumn>
                                </Columns>
                                <ColumnHeaderStyle CssText="background-image:url('00050201');padding-left:8px;padding-top:4px;" />
                            </eo:Grid>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1" colspan="2">
                             
                        </td>
                    </tr>
                </table>
            </eo:CallbackPanel>
        </ContentTemplate>
        <ContentStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
    </eo:Dialog>
    </form>
</body>
</html>


You must edit the constant rootpath and firstdir that the page running correctly

Code: C#
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.IO;


public partial class Testseite : System.Web.UI.Page
{
    private const string rootpath = "C:\\Daten\\jNetSoftware\\jNetSoftware.ch\\V.2.0.x";
    private const string firstdir = "\\FCKEditor.NET";

    protected void Page_Load(object sender, EventArgs e)
    {
        DataTable table = new DataTable();
        table.Columns.Add(new DataColumn("ID"));
        table.Columns.Add(new DataColumn("ParentID"));
        table.Columns.Add(new DataColumn("Text"));

        int id = 0;

        if (treeDialogUploadVerzeichnis.Nodes.Count == 0)
        {
            loadSubDirs(rootpath + firstdir, ref id, 0, table);
            DataSet set = new DataSet();
            set.Tables.Add(table);
            set.Relations.Add(table.Columns[0], table.Columns[1]);
            set.Relations[0].Nested = true;

            treeDialogUploadVerzeichnis.DataSource = set;
            treeDialogUploadVerzeichnis.DataFields = "Text";
            treeDialogUploadVerzeichnis.DataBind();
            treeDialogUploadVerzeichnis.Nodes[0].Expanded = true;
            loadFiles("\\FCKEditor.NET");
        }
    }

    private void loadSubDirs(string dir, ref int id, int parent, DataTable table)
    {
        id++;
        if (parent == 0)
        {
            table.Rows.Add(new Object[] { id, null, Path.GetFileName(dir).ToString() });
        }
        else
        {
            table.Rows.Add(new Object[] { id, parent, Path.GetFileName(dir).ToString() });
        }
        parent = id;
        string[] subdirs = Directory.GetDirectories(dir);
        foreach (string subdir in subdirs)
        {
            loadSubDirs(subdir, ref id, parent, table);
        }
    }

    protected void treeDialogUploadVerzeichnis_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
    {
    }

    private string getPath(EO.Web.TreeNode e)
    {
        string path = "";
        if (e.ParentNode.Text != null)
        {
            path = getPath(e.ParentNode);
        }
        return path + "\\" + e.Text;
    }

    private void loadFiles(string path)
    {
        FileInfo oFile;

        string script = "&lt;script language=\"JavaScript\"&gt;\n" +
                        "function setSelectedPath() {\n" +
                        "document.getElementById('eo_editor_insertimage_url').value = '" + path.Replace("\\", "\\\\") + "\\\\' + eo_GetObject('gridDialogUploadDateien').getSelectedItem().getCell(1).getValue(); \n } \n" +
                        "&lt;/script&gt;\n";

        // "document.getElementById('Text1').value = document.getElementById('TextBox1').value + '\\' + eo_GetObject('Grid1').getSelectedItem().getCell(1).getValue();";

        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "setSelectedPath", script);

        DataTable table = new DataTable();
        table.Columns.Add(new DataColumn("File"));
        table.Columns.Add(new DataColumn("Size"));
        table.Columns.Add(new DataColumn("Extension"));

        foreach (string file in Directory.GetFiles(rootpath + path))
        {
            oFile = new FileInfo(file);
            table.Rows.Add(new Object[] { Path.GetFileName(file), oFile.Length, Path.GetExtension(file) });
        }
        gridDialogUploadDateien.DataSource = table;
        gridDialogUploadDateien.DataBind();
    }

    protected void callbackpanelEditImage_Execute(object sender, EO.Web.CallbackEventArgs e)
    {
        string path = getPath(treeDialogUploadVerzeichnis.SelectedNode);
        loadFiles(path);
        dlgBrowseServer.InitialState = EO.Web.DialogState.Visible;
    }
}


eo_support
Posted: Wednesday, July 23, 2008 6:40:18 AM
Rank: Administration
Groups: Administration

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

This is a known issue. We already have a build that fixed this issue. Please see your private message for download location.

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.