User Profile & Activity

Member
Page
of 4
Posted: April 13, 2012 9:12 AM

Hi,

 

Do you have any news regarding MVC Components?

Nicolas

Posted: July 8, 2011 5:10 AM

But how do you explain that all other resources (like "Copy this Row" or "Copy this Table") are displayed correctly when setting culture to "en-US" (despite the fact that there is no "wglang_en-US.xml" file yet) ?

For me this is clearly a bug or a bad design on Intersoft's side... could you please at least correct this for the next release?

Nicolas

Posted: July 7, 2011 5:40 AM

Hi Riendy,

I understand that you don't have all localization cultures. The issue here has nothing to do with missing localizations as my example is using the default culture (filename="default.xml" culture="en-US").

Please let's try a simple example with Intersoft's WebGrid7 sample.
If I take the 'MultipleRowSelection.aspx' web page sample and I add

protected void Page_Load(object sender, EventArgs e)
{
	Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US"); // or "fr-FR"
	WebGrid1.LayoutSettings.TextSettings.Language = LanguageMode.UseCulture;
}

in code behind, if I select multiple rows and I right-click to make appear the context menu, I get the following issue: missing resource for "Copy Selection" (see attached image "ex1.PNG"). This resource is however available by default (see "ex2.PNG") in "default.xml" (culture="en-US").

Of course, if I use another IS's EXISTING culture (fr-FR), everything works well but "Copy Selection" (see "ex3.PNG"), which is OK, as the concerned resource ("<CopySelection>") is clearly missing in "wglang_fr-FR.xml".

So now, could you please explain me what I did wrong and why the english resource disappears using "en-US" culture, though still present in "default.xml" (see "<CopySelection>Copy Selection</CopySelection>")?

As a suggestion for a solution, couldn't you display at least the default culture text resource if this one is missing in the current culture instead of just blank?

This would be much more user friendly and would avoid complaints from our lost users...

Thank you and best regards,

Nicolas

Posted: July 4, 2011 10:10 AM

Hi again,

I found an issue using WebGrid.LayoutSettings.TextSettings.Language property.

As long as you change this property to any other than default (UseDefault), some resources disappear.

Example: WebGrid.LayoutSettings.TextSettings.Language = LanguageMode.UseCulture
=> context menu have empty menu items for "Copy Selection" and "Delete Selection".

Thank you and best regards,

Nicolas

Hello Handy,

 

I just found the bug: the panel containing webtexteditor was hidden at first page load and that was causing the error afterwards.

Best Regards,

Nicolas

Hello Handy,

I'm using .Net 3.5, asp.net 2.0 with IIS v5.1 on my Windows XP machine and I experience the same problem (very slow upload, more then 5 seconds for a file less thank 600 kb).

I'm only able to reproduce this issue on our web solution.

I tried to reproduce it with Intersoft samples or with a brand new website, but it is impossible to reproduce.

Then, I tried to compare my web.config with the one from your samples and I was able to exclude that the problem comes from web.config.

In Design view, here is my webtexteditor :

<ISWebTextEditor:WebTextEditor ID="textEditor" runat="server" Width="100%" Height="500px"
            EnableViewState="false" DefaultStyleMode="ElegantBlueStyle"
            OnInitializeToolBar="textEditor_InitializeToolBar"
            OnPreInitialize="textEditor_PreInitialize">
            <FlyPostBackSettings PostControlState="False" PostHiddenFields="False" PostInputControls="True"
            PostViewState="False" />
            <ToolBarSettings ToolBarMode="Complete" />
        </ISWebTextEditor:WebTextEditor>

I initialize the fileuploader using the textEditor_PreInitialize event:

protected void textEditor_PreInitialize(object sender, EventArgs e)
        {
            // init WebTextEditor Css 
            WebTextEditorCssFile webTextEditorCssFile = new WebTextEditorCssFile
            {
                FilePath = Constant.StylePath + "/Documentation/helpPage.css",
                Type = WebTextEditorCssType.DesignerStyleSheet
            };
            WebTextEditorCssFile webTextEditorCssFile2 = new WebTextEditorCssFile
            {
                FilePath = Constant.StylePath + "/Documentation/helpPage.css",
                Type = WebTextEditorCssType.RuntimeStyleSheet
            };
            textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile);
            textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile2);

            // Images Library
            WebTextEditorMediaResourceGroup mediaResourceGroup = new WebTextEditorMediaResourceGroup();
            mediaResourceGroup.Name = "media1";
            mediaResourceGroup.Text = "Photos";
            WebTextEditorResource resource = new WebTextEditorResource();
            resource.Name = "Images";
            // Get or create an new folder for the help page, depending on screen name and language
            resource.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/"));
            resource.AllowUserUpload = true;

            //WebTextEditorResource resource2 = new WebTextEditorResource();
            //resource2.Name = "Thumbnails";
            //// Get or create an new folder for the help page, depending on screen name and language
            //resource2.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/"));

            mediaResourceGroup.Resources.Add(resource);
            //mediaResourceGroup.Resources.Add(resource2);
            textEditor.MediaResources.Add(mediaResourceGroup);

            // View Settings
            textEditor.ViewSettings.EnableHTMLView = true;
            textEditor.ViewSettings.EnableSplitView = true;
            textEditor.ViewSettings.EnablePreview = true;
            textEditor.ViewSettings.EnableDesignView = true;

            textEditor.FileUploaderSettings.DefaultUploadMediaResource = "Images";
            // File Uploader of WebTextEditor
            // todo : as soon as we have an answer from Intersoft
            // Case URL : http://www.intersoftpt.com/Community/WebTextEditor/WebTextEditor-Load-Dynamically-an-user-control-containing-a-WebTextEditor-with-fileuploader/
            textEditor.FileUploaderSettings.Enabled = true;
            textEditor.FileUploaderSettings.TotalUploadSizeLimit = 1000000; // 1000kb limit
            textEditor.FileUploaderSettings.FileTypes = "*.jpg;*.png;*.zip";
        }

This works but it is too slow to use in a production website.

Do you have any idea what is causing the fileUploader to be very slow?

Best Regards,

 

Nicolas

I also run the sample without issue.

 

However, when I include it in our website, the message "FileUploaded is not enabled" appears (with the same code...)

Posted: March 11, 2011 6:37 AM

Hello Yudi,

If I use your sample project WebGridCulture.zip, I can't add references you mentioned in section 5 of your procedure (juste above).

The reference files are already in web.config you sent me...

If I remove all and try to re-reference the dll, here is the result (see attached pictures).

Am I right about adding a virtual directory for CommonLibrary? (see iis.png)

 

Best Regards,

Nicolas

 

 

Posted: March 8, 2011 9:35 AM

Hello,

 

Thank you for your answer.

I tried to use your sample website and also to create a new page in WebGridSamples project, but with both solutions I have an error "Failed to map the path '/CommonLibrary/Webgrid/V7_0_7200/Localization/' (see attached jpg) when I launch the web site.


Moreover, your answer doesn't explain how to deploy and use it on a web server.

 

Do I need to copy the russian language resource file in the bin directory?

Best Regards,

Nicolas

Dear Handy,

 

I tried to move the code into textEditor_PreInitialize server side event.

 

However, I still have a message "File Uploader is not enabled" when I click the option "Insert from Computer" with the following code:

<ISWebTextEditor:WebTextEditor ID="textEditor" runat="server" Width="100%" Height="500px"
            EnableViewState="false" DefaultStyleMode="ElegantBlueStyle"
            OnInitializeToolBar="textEditor_InitializeToolBar"
            OnPreInitialize="textEditor_PreInitialize">
            <FlyPostBackSettings PostControlState="False" PostHiddenFields="False" PostInputControls="True"
            PostViewState="False" />
            <ToolBarSettings ToolBarMode="Complete" />
        </ISWebTextEditor:WebTextEditor>

and:

protected void textEditor_PreInitialize(object sender, EventArgs e)
        {
            // init WebTextEditor Css 
            WebTextEditorCssFile webTextEditorCssFile = new WebTextEditorCssFile
            {
                FilePath = Constant.StylePath + "/Documentation/helpPage.css",
                Type = WebTextEditorCssType.DesignerStyleSheet
            };
            WebTextEditorCssFile webTextEditorCssFile2 = new WebTextEditorCssFile
            {
                FilePath = Constant.StylePath + "/Documentation/helpPage.css",
                Type = WebTextEditorCssType.RuntimeStyleSheet
            };
            textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile);
            textEditor.RootTextEditor.CssFiles.Add(webTextEditorCssFile2);

            // Images Library
            WebTextEditorMediaResourceGroup mediaResourceGroup = new WebTextEditorMediaResourceGroup();
            mediaResourceGroup.Name = "media1";
            mediaResourceGroup.Text = "Photos";
            WebTextEditorResource resource = new WebTextEditorResource();
            resource.Name = "Images";
            // Get or create an new folder for the help page, depending on screen name and language
            resource.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/"));
            resource.AllowUserUpload = true;

            WebTextEditorResource resource2 = new WebTextEditorResource();
            resource2.Name = "Thumbnails";
            // Get or create an new folder for the help page, depending on screen name and language
            resource2.Url = VirtualPathUtility.ToAbsolute(Path.Combine(ConfigurationManager.AppSettings["DocumentationDirectory"], "Images/"));

            mediaResourceGroup.Resources.Add(resource);
            mediaResourceGroup.Resources.Add(resource2);
            textEditor.MediaResources.Add(mediaResourceGroup);

            // View Settings
            textEditor.ViewSettings.EnableHTMLView = true;
            textEditor.ViewSettings.EnableSplitView = true;
            textEditor.ViewSettings.EnablePreview = true;
            textEditor.ViewSettings.EnableDesignView = true;

            textEditor.FileUploaderSettings.DefaultUploadMediaResource = "Images";
            textEditor.FileUploaderSettings.Enabled = true;
            textEditor.FileUploaderSettings.TotalUploadSizeLimit = 100000; // 100kb limit
            textEditor.FileUploaderSettings.FileTypes = "*.jpg;*.png";
        }

Do you have any idea of what is causing file uploader to not be correctly enabled?

 

Best Regards,

Nicolas

All times are GMT -5. The time now is 12:23 PM.
Previous Next