This is a migrated thread and some comments may be shown as answers.

RadEditor for SharePoint Postback inside update panel bug?

4 Answers 164 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 31 Jan 2012, 01:50 AM

Hello, 

I have been working with the RadEditor for Sharepoint for a few months now. 

Very happy with the functionality and interaction with Sharepoint, but I think I've found a bug.

A form page that contains the editor as well as other asp controls has been put together,
and is working well for the most part.

However there is something strange happens in chrome, and firefox too, not on IE.  

I am using an update panel to avoid postbacks from some cascading dropdowns that show
or hide the instances of the radeditor. 

So would look something like this: 

  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:PlaceHolder>
            <teleriksharepoint:spradeditor runat="server" id="description-txt" 
           dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd">
	   </teleriksharepoint:spradeditor>
            </asp:PlaceHolder>
        <ContentTemplate>
  </asp:UpdatePanel>
the problem is: - after a postback the editor froze and the floating menu does not appear anymore. Other controls still work but the editor breaks, and content is lost. This problem does not happen all the time. I've noticed that it specifically happens when there is text pasted in from some other source (i dunno if this makes any difference or not). It also happens after typing the text too. I found a tentative solution here for my problem. I tried it but it didnt work for me in my page inside sharepoint. I am wondering if this is happening only to me or everybody. What could be the steps to address this kind of issue? There seems to be no javascript error, nor server side one. I am stuck on how to address this. Thanks for any of your help, -Daniel




4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Jan 2012, 04:05 PM
Hello Daniel,

We tried to reproduce the problem but without success. Could you please provide a live URL to the problematic page so that we can examine it with Firebug and see what is causing the problem? We need also your aspx page and the configuration files (SPEditorTools.js, ConfigFile.xml and ListConfigFile.xml, ToolsFile.xml and ListToolsFile.xml of RadEditor and any scripts that you attach to the RadEditor's events.

In the meantime please render the content area as an editable DIV (ContentAreaMode="Div" and see whether the issue still persists?

Regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Daniel
Top achievements
Rank 1
answered on 31 Jan 2012, 05:41 PM
Hello Rumen, 

Thanks for your response. I tried changing the ContentAreaMode and the problem is still happening. 
Unfortunately I cannot provide a live link because all this forms are on an administrator side of our ecommerce site. 

In the aspx page there is an specific instance that i am looking at "txtDescription". 

I am gonna keep trying to fix this in the meantime thanks for any help you could provide. 

Regards,
Daniel

----------------SPEditorTools.js
 ------------------------------------------

Type.registerNamespace("Telerik.Web.UI.Editor");


function RadEditorClientLoad(editor, args)
{
if (typeof (RadEditorClientDialogParameters) != 'undefined' && RadEditorClientDialogParameters[editor.get_id()])
{
var editorParameters = RadEditorClientDialogParameters[editor.get_id()];
editor._dialogParameters = editorParameters;
if (editorParameters.EditingScenario == "WebPart")
{
var spwptool = editor.getToolByName("SPInsertWebPart");
if (spwptool)
{
spwptool.setState($T.Editor.CommandStates.Disabled);
}
}
if (editorParameters.EditorBackgroundColor)
{
editor.get_contentArea().style.backgroundColor = editorParameters.EditorBackgroundColor;
}
if (typeof (editorParameters.LoadFunction) == 'string')
{
var loadFunction = eval(editorParameters.LoadFunction);
loadFunction(editor, args);
}
editor._editingScenario = editorParameters.EditingScenario;
Telerik.Web.UI.RadEditor.prototype.get_editingScenario = function () { return this._editingScenario; };
//backwards compatibility
editor.editingScenario = editorParameters.EditingScenario;
}
}


if (typeof (Telerik.Web.UI.Editor.CommandList) == "undefined")
Telerik.Web.UI.Editor.CommandList = {};


Telerik.Web.UI.Editor.CommandList["MOSSRightToLeft"] =
Telerik.Web.UI.Editor.CommandList["SPRightToLeft"] = function (commandName, editor, args)
{
Telerk_SP_SetDirectionOfSelection(editor, "rtl");
};


Telerik.Web.UI.Editor.CommandList["MOSSLeftToRight"] =
Telerik.Web.UI.Editor.CommandList["SPLeftToRight"] = function (commandName, editor, args)
{
Telerk_SP_SetDirectionOfSelection(editor, "ltr");
};




Telerik.Web.UI.Editor.CommandList["ToggleSource"] =
Telerik.Web.UI.Editor.CommandList["SPToggleSource"] = function (commandName, editor, args)
{
if (editor.get_mode() != Telerik.Web.UI.EditModes.Html)
{
editor.set_mode(Telerik.Web.UI.EditModes.Html);
var tool = editor.getToolByName("SPToggleSource");
if (tool) tool.set_enabled(true);
}
else
{
editor.set_mode(Telerik.Web.UI.EditModes.Design);
}
};


Telerik.Web.UI.Editor.CommandList["MOSSImageManager"] =
Telerik.Web.UI.Editor.CommandList["SPImageManager"] = function (commandName, editor, args)
{
//TODO: when editing image, set elemImage
if (!AssetPickerConfig) alert("Asset pickers are not available in this configuration!");
var params = editor._dialogParameters;
var inserting = true;
var elemImage = editor.get_document().createElement("img");


var assetPickerValue = $get("ms-rteinput-image");
if (assetPickerValue == null)
{
assetPickerValue = document.createElement("input");
assetPickerValue.id = "ms-rteinput-image";
assetPickerValue.value = elemImage.src;
assetPickerValue.type = "hidden";
document.body.appendChild(assetPickerValue);
}


var configObj = new AssetPickerConfig("");
configObj.ClientID = editor.get_id();
configObj.DefaultAssetLocation = "";
configObj.DefaultAssetImageLocation = "";
configObj.CurrentWebBaseUrl = params["CurrentWebBaseUrl"];
configObj.AllowExternalUrls = params["AllowExternalUrls"];
configObj.ManageHyperlink = false;
configObj.AssetUrlClientID = assetPickerValue.id;
configObj.ReturnCallback = function (url, text, config, newAsset)
{
elemImage.src = assetPickerValue.value;
document.body.removeChild(assetPickerValue);
if (inserting && elemImage.src)
{
editor.pasteHtml($telerik.getOuterHtml(elemImage), "InsertImage");
}
};


var imageAssetObj = new ImageAsset(elemImage.src);
imageAssetObj.LaunchModalAssetPicker(configObj);
};


Telerik.Web.UI.Editor.CommandList["MOSSLinkManager"] =
Telerik.Web.UI.Editor.CommandList["SPLinkManager"] = function (commandName, editor, args)
{
//TODO: when editing link, set elemLink
if (!AssetPickerConfig || !LinkAsset) alert("Asset pickers are not available in this configuration!");


var params = editor._dialogParameters;
var inserting = true;
var elemLink = editor.get_document().createElement("a");


var assetPickerValue = $get("ms-rteinput-link");
if (assetPickerValue == null)
{
assetPickerValue = document.createElement("input");
assetPickerValue.id = "ms-rteinput-link";
assetPickerValue.value = elemLink.href;
assetPickerValue.type = "hidden";
document.body.appendChild(assetPickerValue);
}


var configObj = new AssetPickerConfig("");
configObj.ClientID = editor.get_id();
configObj.DefaultAssetLocation = "";
configObj.DefaultAssetImageLocation = "";
configObj.CurrentWebBaseUrl = params["CurrentWebBaseUrl"];
configObj.AllowExternalUrls = params["AllowExternalUrls"];
configObj.AssetUrlClientID = assetPickerValue.id;
configObj.ReturnCallback = function (url, text, config, newAsset)
{
elemLink.href = assetPickerValue.value;
document.body.removeChild(assetPickerValue);
if (inserting && url)
{
var images = elemLink.getElementsByTagName("img");
var textContent = elemLink.innerText != null ? elemLink.innerText : elemLink.textContent;
if (textContent === "" && (!images || !images.length))
{
var textNode = elemLink.ownerDocument.createTextNode(text);
elemLink.appendChild(textNode);
}
editor.pasteHyperLink(elemLink, "InsertLink");
}
};


var linkAsset = new LinkAsset(elemLink.href);
linkAsset.ManageLinkDisplayText = false;
linkAsset.LaunchModalAssetPicker(configObj);
};


Telerik.Web.UI.Editor.CommandList["MOSSTemplateManager"] =
Telerik.Web.UI.Editor.CommandList["SPTemplateManager"] = function (commandName, editor, args)
{
var fragmentId = null;
var currentAtomic = editor.getSelectedElement();
if ((currentAtomic) && (currentAtomic.id === "__publishingReusableFragment"))
{
fragmentId = currentAtomic.fragmentid;
}
var dialogInput = {};
dialogInput.fragmentId = fragmentId;
var params = editor._dialogParameters;
var webUrl = params["CurrentWebBaseUrl"];
if (webUrl.lastIndexOf("/") + 1 !== webUrl.length)
{
webUrl += "/";
}
var dialogUrl = webUrl + "_layouts/ReusableTextPicker.aspx";
var callbackFn = function (dialogOutput)
{
if (!dialogOutput)
{
return;
}
var fragment = dialogOutput.fragmentView;
editor.pasteHtml(fragment, "TemplateManager");
};
commonShowModalDialog(dialogUrl, "dialogHeight:600px; dialogWidth:800px; center:yes; resizable:yes; scroll:no; status:no;", callbackFn, dialogInput);
};


Telerik.Web.UI.Editor.CommandList["SPInsertWebPart"] = function (commandName, editor, args)
{
if (!WPAdder && LoadWPAdderOnDemand)
{
LoadWPAdderOnDemand();
ExecuteOrDelayUntilEventNotified(
function ()
{
if (WPAdder)
{
RadEditorShowWPAdder(editor);
}
},
"_spEventWebPartAdderReady");
return;
}
if (WPAdder)
{
RadEditorShowWPAdder(editor);
}
};


var RadEditorOriginalGetRange = null, RadEditorOriginalAddSelectedItemToPage = null, RadEditorOriginalHide = null;


function RadEditorShowWPAdder(editor)
{
if (typeof (RTE) == "undefined" || typeof (WPAdder) == "undefined") return;


if (!RadEditorOriginalAddSelectedItemToPage)
{
RadEditorOriginalAddSelectedItemToPage = _WPAdder.prototype.addSelectedItemToPage;
RadEditorOriginalHide = _WPAdder.prototype.hide;
_WPAdder.prototype.addSelectedItemToPage = function () { RadEditorOriginalAddSelectedItemToPage.call(this); RTE.Cursor.get_range = RadEditorOriginalGetRange; }
_WPAdder.prototype.hide = function () { RadEditorOriginalHide.call(this); RTE.Cursor.get_range = RadEditorOriginalGetRange; }
}
if (!RadEditorOriginalGetRange)
{
RadEditorOriginalGetRange = RTE.Cursor.get_range;
RTE.Cursor.get_range = function () { return RadEditorFakeRange(editor) };
WPAdder.show();
}


}


function RadEditorFakeRange(editor)
{
var obj = RadEditorOriginalGetRange();
obj.getEditableRegion = function () { return editor.get_contentArea(); };
obj.collapse = function () { return; };
obj.replaceHtml = function (html) { editor.pasteHtml(html) };
return obj;
}


//Contains the href of HtmlEditorTableFormats.css
var Telerik_RadEditor_TableFormatsCSSLink = "";


//overwriting getDialogArguments for the predefined table layouts
Telerik.Web.UI.Editor.CommandList._oldGetDialogArguments = Telerik.Web.UI.Editor.CommandList._getDialogArguments;
Telerik.Web.UI.Editor.CommandList._getDialogArguments = function (argument, tagName, editor, commandName)
{
//cal the original function from RadEditor for ASP.NET AJAX 
Telerik.Web.UI.Editor.CommandList._oldGetDialogArguments(argument, tagName, editor, commandName);
if (!argument.tableLayoutCssFile)
{
//Add css
if ("TD" == tagName || "TH" == tagName || "TABLE" == tagName)
{
//set the link for the Table formats css
if (!Telerik_RadEditor_TableFormatsCSSLink)
{
var links = document.getElementsByTagName("LINK");
var linksLength = links.length;
for (var i = 0; i < linksLength; i++)
{
var href = links[i].getAttribute("href");
if (href.indexOf("HtmlEditorTableFormats.css") != -1)
{
Telerik_RadEditor_TableFormatsCSSLink = href;
break;
}
}
}
argument.tableLayoutCssFile = Telerik_RadEditor_TableFormatsCSSLink.substring(0, Telerik_RadEditor_TableFormatsCSSLink.indexOf("?"));
}
}
}


//Rich Text Support
function Telerik_SP_RichTextSubmit(editor, fieldID)
{
var editorContent = RadEditorGetStorageHtml(editor);
if (editorContent.length > 0)
{
var contentLength = 1 + editorContent.length;
while (editorContent.length < contentLength)
{
contentLength = editorContent.length;
editorContent = editorContent.replace(/^[\s]*<div\s+class=[\""\']?ExternalClass\w*[\""\']?>([\s\S]*)<\/div>/ig, '$1');
}
}
var contentTextBox = $get(fieldID);
//sp 2010 - enhanced rich text hides normal textbox
if (!contentTextBox) contentTextBox = $get(fieldID + "_spSave");
if (($telerik.isSafari2 || $telerik.isSafari3) && typeof (contentTextBox.innerText) != "undefined")
{
contentTextBox.innerText = editorContent;
}
else
{
contentTextBox.value = editorContent;
}


//sp 2010 - stop original field from submitting
if (typeof (RTE) != "undefined" && RTE.RichTextEditor)
{
RTE.RichTextEditor.transferContentsToInputField = function (arg) { return; }
}
}


// support functions
function RadEditorGetStorageHtml(editor)
{
//RTE.ReusableContent.getEditableRegionStorageHtml from original editor used here
if (typeof (RTE) != "undefined" && RTE.ReusableContent)
{
var editorContentElement = null;
if (editor.get_mode() == Telerik.Web.UI.EditModes.Html)
{
editorContentElement = editor.get_document().createElement("div");
Telerik.Web.UI.Editor.Utils.setElementInnerHtml(editorContentElement, editor.get_html(true));
}
else
{
editorContentElement = editor.get_contentArea();
}
var newHtml = RTE.ReusableContent.getEditableRegionStorageHtml(editorContentElement);
return newHtml;
}
else
{
return editor.get_html(true);
}
}


function Telerk_SP_SetDirectionOfSelection(editor, strDirection)
{
var rngSelection = editor.getSelection();
var strTagNames;
strTagNames = "|H1|H2|H3|H4|H5|H6|P|PRE|TD|DIV|BLOCKQUOTE|DT|DD|TABLE|HR|IMG|BODY|TR|UL|OL|";
if (rngSelection.getParentElement())
{
var elemSelectionParent = rngSelection.getParentElement();
while ((elemSelectionParent != null) && (strTagNames.indexOf("|" + elemSelectionParent.tagName + "|") == -1))
{
elemSelectionParent = elemSelectionParent.parentNode;
}
if (elemSelectionParent == editor.get_contentArea()) elemSelectionParent = null;
if (elemSelectionParent)
{
Telerik_SP_SetDirectionOnElement(elemSelectionParent, strDirection);
}
}
}


function Telerik_SP_SetDirectionOnElement(element, strDirection)
{
if ("ltr" == strDirection)
{
element.dir = "ltr";
element.align = "left";
}
else if ("rtl" == strDirection)
{
element.dir = "rtl";
element.align = "right";
}
}


if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); 

----------------------ToolsFile.xml-----------------------------------------------

<root>
<modules>
<module name="RadEditorDomInspector" />
</modules>
<tools>
<tool name="Cut" shortcut="CTRL+X" />
<tool name="Copy" shortcut="CTRL+C" />
<tool name="Paste" shortcut="CTRL+V" />
<tool name="Undo" shortcut="CTRL+Z" />
<tool name="Redo" shortcut="CTRL+Y" />
<tool separator="true" />
<tool name="FontName" />
<tool name="FontSize" />
<tool name="Bold" shortcut="CTRL+B" />
<tool name="Italic" shortcut="CTRL+I" />
<tool name="Underline" shortcut="CTRL+U" />
<tool name="StrikeThrough" />
<tool name="Subscript" />
<tool name="Superscript" />
<tool name="BackColor" />
<tool name="ForeColor" />
<tool name="FormatStripper" />
</tools>
<tools>
<tool name="InsertUnorderedList" />
<tool name="InsertOrderedList" />
<tool name="Outdent" />
<tool name="Indent" />
<tool name="SPLeftToRight" text="Left to Right" />
<tool name="SPRightToLeft" text="Right to Left" />
<tool name="JustifyLeft" />
<tool name="JustifyCenter" />
<tool name="JustifyRight" />
<tool name="JustifyFull" />
<tool separator="true" />
<tool name="ApplyClass" />
<tool separator="true" />
<tool name="AjaxSpellCheck" />
<tool separator="true" />
<tool name="FormatBlock" />
<tool name="InsertHorizontalRule" />
<tool name="ToggleSource" />
</tools>
<tools>
<tool name="InsertTable" />
<tool name="ToggleTableBorder" />
<tool separator="true" />
<tool name="ImageManager" />
<tool name="MediaManager" />
<tool name="FlashManager" />
<tool separator="true" />
<tool name="SPLinkManager" text="Insert Link" />
<tool name="Unlink" />
<tool separator="true" />
<tool name="SPTemplateManager" text="Insert Reusable Content" />
<tool separator="true" />
<tool name="SPInsertWebPart" text="Insert Web Part"/>
<tool separator="true" />
<tool name="Help" />
</tools>
<contextMenus>
<contextMenu forElement="*">
<tool name="Cut"/>
<tool name="Copy"/>
<tool name="Paste"/>
</contextMenu>
</contextMenus>
<classes>
<class name="Clear Class" value="" />
<class name="Normal" value=".ms-rteStyle-Normal" />
<class name="Highlight" value=".ms-rteStyle-Highlight" />
<class name="By Line" value=".ms-rteStyle-Byline" />
<class name="Tag Line" value=".rteStyle-Tagline" />
<class name="Comment" value=".ms-rteStyle-Comment" />
<class name="References" value=".ms-rteStyle-References" />
<class name="Caption" value=".ms-rteStyle-Caption" />
</classes>
<paragraphs>
<paragraph name="&lt;H1 class='ms-rteElement-H1'>Heading 1&lt;/H1>" value="&lt;H1 class='ms-rteElement-H1'>" />
<paragraph name="&lt;H2 class='ms-rteElement-H2'>Heading 2&lt;/H2>" value="&lt;H2 class='ms-rteElement-H2'>" />
<paragraph name="&lt;H3 class='ms-rteElement-H3'>Heading 3&lt;/H3>" value="&lt;H3 class='ms-rteElement-H3'>" />
<paragraph name="&lt;H4 class='ms-rteElement-H4'>Heading 4&lt;/H4>" value="&lt;H4 class='ms-rteElement-H4'>" />
<paragraph name="&lt;H1 class='ms-rteElement-H1B'>Colored Heading 1&lt;/H1>" value="&lt;H1 class='ms-rteElement-H1B'>" />
<paragraph name="&lt;H2 class='ms-rteElement-H2B'>Colored Heading 2&lt;/H2>" value="&lt;H2 class='ms-rteElement-H2B'>" />
<paragraph name="&lt;H3 class='ms-rteElement-H3B'>Colored Heading 3&lt;/H3>" value="&lt;H3 class='ms-rteElement-H3B'>" />
<paragraph name="&lt;H4 class='ms-rteElement-H4B'>Colored Heading 4&lt;/H4>" value="&lt;H4 class='ms-rteElement-H4B'>" />
<paragraph name="&lt;p class='ms-rteElement-P'>Paragraph&lt;/p>" value="&lt;p class='ms-rteElement-P'>" />
<paragraph name="&lt;div class='ms-rteElement-Callout1'>Callout 1&lt;/div>" value="&lt;div class='ms-rteElement-Callout1'>" />
<paragraph name="&lt;div class='ms-rteElement-Callout2'>Callout 2&lt;/div>" value="&lt;div class='ms-rteElement-Callout2'>" />
<paragraph name="&lt;div class='ms-rteElement-Callout3'>Callout 3&lt;/div>" value="&lt;div class='ms-rteElement-Callout3'>" />
<paragraph name="&lt;div class='ms-rteElement-Callout4'>Callout 4&lt;/div>" value="&lt;div class='ms-rteElement-Callout4'>" />
</paragraphs>
<fontNames>
<item name="Arial" />
<item name="Calibri" />
<item name="Comic Sans" />
<item name="Courier" />
<item name="Garamond" />
<item name="Georgia" />
<item name="Impact" />
<item name="Lucida Console" />
<item name="Palatino Linotype" />
<item name="Times New Roman" />
<item name="Trebuchet MS" />
<item name="Verdana" />
</fontNames>
</root>

-------------------------ListToolsFile.xml ------------------------------------------

<root>
<tools name="EnhancedToolbar">
<tool name="Cut" shortcut="CTRL+X" />
<tool name="Copy" shortcut="CTRL+C" />
<tool name="Paste" shortcut="CTRL+V" />
<tool name="FormatStripper" />
<tool separator="true" />
<tool name="Undo" shortcut="CTRL+Z"/>
<tool name="Redo" shortcut="CTRL+Y"/>
<tool separator="true" />
<tool name="InsertTable" />
<tool name="SplitCell" />
<tool name="MergeColumns" />
<tool separator="true" />
<tool name="SPLinkManager" text="Insert Link" />
<tool name="ImageManager" />
</tools>
<tools name="BasicToolbar">
<tool name="FontName" />
<tool name="FontSize" />
<tool separator="true" />
<tool name="Bold" shortcut="CTRL+B" />
<tool name="Italic" shortcut="CTRL+I" />
<tool name="Underline" shortcut="CTRL+U" />
<tool separator="true" />
<tool name="JustifyLeft" shortcut="CTRL+L" />
<tool name="JustifyCenter" shortcut="CTRL+E" />
<tool name="JustifyRight" shortcut="CTRL+R" />
<tool separator="true" />
<tool name="InsertOrderedList" />
<tool name="InsertUnorderedList" />
<tool name="Indent" />
<tool name="Outdent" shortcut="CTRL+M" />
<tool separator="true" />
<tool name="ForeColor" />
<tool name="BackColor" />
<tool separator="true" />
<tool name="SPLeftToRight" text="Left to Right" />
<tool name="SPRightToLeft" text="Right to Left" />
</tools>
<contextMenus>
<contextMenu forElement="*">
<tool name="Cut"/>
<tool name="Copy"/>
<tool name="Paste"/>
</contextMenu>
</contextMenus>
</root>

---------------------------- ConfigFile.xml ---------------------------------
<configuration>
<property name="ToolbarMode">ShowOnFocus</property>
<property name="ToolsWidth">560px</property>
<property name="ContentAreaMode">Div</property>
<property name="DocumentsFilters">
<item>*.*</item>
</property>
<property name="ImagesPaths">
<item>/PublishingImages</item>
</property>
<property name="ImagesFilters">
<item>*.jp*</item>
<item>*.gif</item>
<item>*.png</item>
</property>
<property name="FlashFilters">
    <item>*.swf</item>
    <item>*.flv</item>
  </property>
</configuration>

---------------ListConfigFile.xml ----------------------------

<configuration>
<property name="EditModes">Design,Html</property>
<property name="Height">240px</property>
<property name="Width">530px</property>
</configuration>

---------------- Product.aspx--------------------------



<%@ Page Language="C#" Inherits="Administration.Pages.ProductForm, Application.Administration, Version=1.0.0.0, Culture=neutral, PublicKeyToken="" MasterPageFile="/_catalogs/masterpage/custom.master" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Register TagPrefix="ppt" TagName="LocaleControl" Src="~/_controltemplates/LocaleControl.ascx" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.712.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<%@ Register TagPrefix="telerikSharepoint" Namespace="Telerik.SharePoint" Assembly="RadEditorSharePoint, Version=6.1.6.0, culture=neutral, PublicKeyToken=1f131a624888eeed" %>


<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Product Edit Administration
</asp:Content>


<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<script type="text/javascript">


function checkIt(evt) {
    evt = (evt) ? evt : window.event
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        return false
    }
    return true
}


function toggle(x){
    var divx = document.getElementById('protocols'+x)
    if (divx.style.display == 'none') {
        divx.style.display = 'block'
    } else {
        divx.style.display = 'none'
    }
}
</script>
  <div id="content" style="width:1000px;"> 
     <telerik:RadAjaxPanel ID="UpdatePanelProducts" runat="server">
       
        <asp:Literal ID="litDebug" runat="server" />
        <h1 class="breadcrumb">
            <asp:Literal runat="server" ID="litPageText" />
        </h1>
        <div class="datatable_border">
            <div class="datatable_bg">
                <asp:Literal runat="server" ID="errorTextLit" />
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr class="odd" valign="top">
                                <td valign="top" width="33%" align="right">
                                    <strong>Display Name: </strong>
                                </td>
                                <td>
                                    <asp:Label ID="lbDisplayName" runat="server" Text="" />
                                </td>
                            </tr>
                            <tr class="odd" valign="top">
                                <td valign="top" width="33%" align="right">
                                    <strong>Category: </strong><em style="color: Red;">*</em>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlCategory" runat="server" Width="290px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Subcategory:</strong><em style="color: Red;">*</em>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSubcategory" runat="server" Width="290px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Secondary Subcategory:</strong>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSecondarySub" runat="server" Width="290px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Product Type:</strong><em style="color: Red;">*</em>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlProductType" runat="server" Width="290px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                        <div id="species" style="display: block;">
                            <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                <tr valign="top" class="odd">
                                    <td valign="top" width="33%" align="right">
                                        <strong>Species:</strong><em style="color: Red;">*</em>
                                    </td>
                                    <td>
                                        <asp:RadioButtonList ID="rdlButtonSpecies" runat="server" Width="488px" RepeatColumns="3">
                                        </asp:RadioButtonList>
                                        <br />
                                        <asp:TextBox runat="server" ID="txtSpecies" /><asp:Button runat="server" ID="btnAddSpecies"
                                            Text="Add Species" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="proteinOrName" style="display: block;">
                            <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                <tr valign="top" class="odd">
                                    <td valign="top" width="33%" align="right">
                                        <strong>
                                            <asp:Label runat="server" ID="lblProteinOrName" Text="Name/Protein:" />
                                        </strong><em style="color: Red;">*</em>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtProteinOrName" runat="server" Width="290px"></asp:TextBox>
                                    </td>
                                </tr>
                            </table>
                        </div>
                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Research Interest(s):</strong>
                        </td>
                        <td>
                            <asp:CheckBoxList ID="cblResearchInterest" runat="server" Width="600px" RepeatColumns="3">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Catalog Number:</strong><em style="color: Red;">*</em>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCatalogNumber" runat="server" Width="290px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Animal Free Product:</strong>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkAnimalFree" runat="server"></asp:CheckBox>
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Country of Origin:</strong>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlCountryOrigin" runat="server" Width="290px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>


                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td width="33%" align="right">
                                    <strong>Size Group:</strong>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlSizeGroup" runat="server" Width="290px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%"  align="right">
                                    <strong>Size(s) Offered:</strong>
                                </td>
                                <td>
                                    <asp:CheckBoxList runat="server" ID="cblSizesOffered" Width="488px" RepeatColumns="3" />
                                    <br />
                                    <asp:Literal runat="server" ID="litNotes" />
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Size(s) Displayed:</strong>
                                </td>
                                <td>
                                    <asp:CheckBoxList runat="server" ID="cblSizesDisplayed" Width="488px" RepeatColumns="3" />
                                </td>
                            </tr>
                        </table>


                <!-- Description -->
                <asp:PlaceHolder id="PlaceDescription" runat="server" visible="false">
                    <div id="description-div" style="display: block;">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Description:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtDescription" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd" ContentAreaMode="Div">
                                    </teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>


                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Related References:</strong>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkReferenceAdd" runat="server" Text="Add" />
                                    <asp:LinkButton ID="lnkReferenceEdit" runat="server" Text="Edit" />
                                    <asp:LinkButton ID="lnkReferenceDelete" runat="server" Text="Delete Selected" Visible="False" />
                                    <asp:LinkButton ID="lnkReferenceSubmit" runat="server" Text="Submit" Visible="False" />
                                    <asp:LinkButton ID="lnkReferenceCancel" runat="server" Text="Done" Visible="False" />
                                    <br />
                                    <telerik:radcombobox id="RadComboReferences" runat="server" width="390px" height="200px"
                                        filter="Contains" emptymessage="Click 'Add' to add a Reference" markfirstmatch="true"
                                        visible="False" />
                                    <asp:ListBox ID="lbxReferences" runat="server" Width="390px" SelectionMode="Multiple"
                                        Enabled="false" />
                                </td>
                            </tr>
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Related Products:</strong>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lnkRelatedProductsAdd" runat="server" Text="Add" />
                                    <asp:LinkButton ID="lnkRelatedProductsEdit" runat="server" Text="Edit" />
                                    <asp:LinkButton ID="lnkRelatedProductsDelete" runat="server" Text="Delete Selected" Visible="False" />
                                    <asp:LinkButton ID="lnkRelatedProductsSubmit" runat="server" Text="Submit" Visible="False" />
                                    <asp:LinkButton ID="lnkRelatedProductsCancel" runat="server" Text="Done" Visible="False" />
                                    <br />
                                    <telerik:radcombobox id="RadComboRelatedProducts" runat="server" width="390px" height="200px"
                                        filter="Contains" emptymessage="Click 'Add' to add a Reference" markfirstmatch="true"
                                        showmoreresultsbox="True" enableloadondemand="True"> 
                                        <HeaderTemplate>
                                            <table style="width: 275px" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td style="width: 150px;">
                                                        Display Name</td>
                                                    <td style="width: 125px;">
                                                        [Catalog Number]</td>
                                                </tr>
                                            </table>
                                        </HeaderTemplate>
                                    </telerik:radcombobox>
                                    <asp:ListBox ID="lbxRelatedProducts" runat="server" Width="390px" SelectionMode="Multiple"
                                        Enabled="false" />
                                </td>
                            </tr>
                        </table>
                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                    <tr valign="top" class="odd">
                        <td width="33%" align="right">
                            <strong>Product Status:</strong>
                        </td>
                        <td>
                            <asp:CheckBox ID="chkStatus" runat="server" Text=" Active if Checked" />
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>New Until:</strong>
                        </td>
                        <td>
                            <sharepoint:datetimecontrol runat="server" id="dtcNewUntil" dateonly="true" />
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Available To:</strong>
                        </td>
                        <td>
                            <ppt:localecontrol id="localeCtrlAvailableTo" includeclientclass="true" runat="server" />
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Manufacturer:</strong>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlManufacturer" runat="server" Width="290px" />
                        </td>
                    </tr>
                    <tr valign="top" class="odd">
                        <td valign="top" width="33%" align="right">
                            <strong>Material Safety Data Sheet:</strong>
                        </td>
                        <td>
                            <telerik:radupload id="rupMsds" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                        </td>
                    </tr>
                </table>
                <!-- Pubmed-->
                <asp:PlaceHolder id="PlacePubMed" runat="server" visible="false">
                    <div id="protien-specific" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>PubMed Keyword:</strong>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtPubMedKeyword" Width="290px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder> 
                <!-- Synonyms -->
                <asp:PlaceHolder id="PlaceSynonyms" runat="server" visible="false" >
                    <div id="synonym-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable"> 
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Synonyms:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtSynonyms" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                    <br />
                                    <label>
                                        *One synonym per line</label>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Source -->
                <asp:PlaceHolder id="PlaceSource" runat="server" visible="false">
                    <div id="source-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Source:</strong>
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddlSource" Width="290px" />
                                    <br />
                                    <asp:Label runat="server" ID="lblSource" Text="New Source: " /><asp:TextBox runat="server"
                                        ID="txtSource" /><asp:Button runat="server" Text="Add Source" ID="btnSource" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Purity -->
                <asp:PlaceHolder id="PlacePurity" runat="server" visible="false">
                    <div id="purity-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Purity:</strong>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtPurity" Width="90px" onKeyPress="return checkIt(event)" />
                                    %
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Biological Activity -->
                <asp:PlaceHolder id="PlaceBioActivity" runat="server">
                    <div id="bioactivity-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Biological Activity:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtBioActivity" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Sequence -->
                <asp:PlaceHolder id="PlaceSequence" runat="server" visible="false">
                    <div id="sequence-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td width="33%" align="right">
                                    <strong>AA Sequence:</strong>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtSequence" Width="290px" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Cross Reactivity -->
                <asp:PlaceHolder id="PlaceCrossReact" runat="server" visible="false">
                    <div id="crossreact-div" style="display: block">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Cross-Reactivity:</strong>
                                </td>
                                <td>
                                    <asp:CheckBoxList runat="server" ID="cblReactivity" Width="488px" RepeatColumns="3" />
                                    <br />
                                    <asp:Label runat="server" ID="lblCross" Text="New Cross-Reactivity: " />
                                    <asp:TextBox runat="server" ID="txtReactivity" />
                                    <asp:Button runat="server" Text="Add Cross-Reactivity" ID="btnReactivity" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Proteases -->
                <asp:PlaceHolder id="PlaceProteases" runat="server" visible="false">
                    <div id="proteases-div" style="display: block;">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Reaction Buffer:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtReactionBuffer" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Immunogen -->
                <asp:PlaceHolder id="PlaceImmunogen" runat="server" visible="false">
                    <div id="immunogen-div" style="display: block;">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Immunogen:</strong>
                                </td>
                                <td>
                                    <!-- <asp:LinkButton runat="server" ID="lnkImmunogen" Text="Add Protien Product" /><br /> -->
                                    <teleriksharepoint:spradeditor runat="server" id="txtImmunogen" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Preparation -->
                <asp:PlaceHolder id="PlacePreparation" runat="server" visible="false">
                    <div id="preparation-div">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Preparation:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtPreparation" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- Product Images -->
                <asp:PlaceHolder id="PlaceProductImages" runat="server" visible="false">
                    <div id="productimage-div">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Product Images:</strong>
                                </td>
                                <td>
                                    <telerik:radupload id="rupImages" runat="server" controlobjectsvisibility="Default"
                                        localization-select="Browse" allowedfileextensions=".jpg,.png,.gif,.jpeg,.bmp" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
                <!-- COAs -->
                <asp:PlaceHolder id="PlaceCoa" runat="server" visible="false">
                    <div id="coa-div">
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Certificates of Analysis:</strong><br />
                                    (Please, upload certificate)
                                </td>
                                <td>
                                    <telerik:radupload id="rupCoA" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                                </td>
                            </tr>
                        </table>
                    </div>
                </asp:PlaceHolder>
            </div>
        </div>
        <!-- APPLICATION -->
        <asp:PlaceHolder id="PlaceApplication" runat="server" visible="false">
            <div class="datatable_border">
                <div class="datatable_bg">
                    <div class="tabletitle">Application</div>
                        <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                            <tr valign="top" class="odd">
                                <td valign="top" width="33%" align="right">
                                    <strong>Application Text:</strong>
                                </td>
                                <td>
                                    <teleriksharepoint:spradeditor runat="server" id="txtApplication" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                </td>
                            </tr>
                        </table>


                        <asp:PlaceHolder id="PlaceElisaDirect" runat="server" visible="false">
                            <div class="tabletitle">ELISA - Direct</div>
                            <div id="elisadirect-div">
                                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>ELISA - Direct Text:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtDirect" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Link to Protocol:</strong>
                                        </td>
                                        <td>
                                            <asp:LinkButton runat="server" ID="lnkDirectProtocol" Text="click to expand Protocols" /><br>
                                            <div id="protocols1" style="display: none">
                                                <asp:CheckBoxList runat="server" ID="hypDriectProtocol" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Product Image:</strong>
                                        </td>
                                        <td>
                                            <telerik:radupload id="rupDirect" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Direct - Note:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtDirectNote" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:PlaceHolder>


                        <asp:PlaceHolder id="PlaceElisaSandwich" runat="server" visible="false">
                            <div class="tabletitle">ELISA - Sandwich</div>
                            <div id="elisasandwich-div">
                                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>ELISA - Sandwich Text:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtSandwich" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Link to Protocol:</strong>
                                        </td>
                                        <td>
                                            <asp:LinkButton runat="server" ID="lnkSandwich" Text="click to expand Protocols" /><br />
                                            <div id="protocols2" style="display: none">
                                                <asp:CheckBoxList runat="server" ID="hypSandwich" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Product Image:</strong>
                                        </td>
                                        <td>
                                           <telerik:radupload id="rupSanwich" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Sandwich - Note:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtSandwichNote" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:PlaceHolder>      
                    
                        <asp:PlaceHolder ID="PlaceWesternBlot" runat="server" visible="false">
                            <div class="tabletitle">Western Blot</div>
                            <div id="westernblot-div">
                                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Western Blot Text:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtWestern" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Link to Protocol:</strong>
                                        </td>
                                        <td>
                                            <asp:LinkButton runat="server" ID="lnkWestern" Text="click to expand Protocols" /><br />
                                            <div id="protocols3" style="display: none">
                                                <asp:CheckBoxList runat="server" ID="hypWestern" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Product Image:</strong>
                                        </td>
                                        <td>
                                           <telerik:radupload id="rupWestern" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                                        </td>
                                    </tr>
                                    <tr class="odd" valign="top">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Western Blot - Note:</strong>
                                        </td>
                                        <td>
                                             <teleriksharepoint:spradeditor runat="server" id="txtWesternNote" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:PlaceHolder>


                        <asp:PlaceHolder ID="PlaceNeutralization" runat="server" visible="false">
                            <div class="tabletitle">Neutralization</div>
                            <div id="neutralization-div">
                                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                        <strong>Neutralization Text:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtNeutralization" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:PlaceHolder>


                        <asp:PlaceHolder ID="PlaceImmunochemistry" runat="server" visible="false">
                            <div class="tabletitle">Immunohistochemistry</div>
                            <div id="immunohistochemistry-div">
                                <table border="0" cellpadding="5" cellspacing="0" class="datatable">
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Immunohistochemistry Text:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtImmuno" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Link to Protocol:</strong>
                                        </td>
                                        <td>
                                            <asp:LinkButton runat="server" ID="lnkImmuno" Text="click to expand Protocols" /><br>
                                            <div id="protocols4" style="display: none">
                                                <asp:CheckBoxList runat="server" ID="hypImmuno" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Product Image:</strong>
                                        </td>
                                        <td>
                                            <telerik:radupload id="rupImmuno" runat="server" controlobjectsvisibility="None" localization-select="Browse" />
                                        </td>
                                    </tr>
                                    <tr valign="top" class="odd">
                                        <td valign="top" width="33%" align="right">
                                            <strong>Immunohistochemistry - Note:</strong>
                                        </td>
                                        <td>
                                            <teleriksharepoint:spradeditor runat="server" id="txtImmunoNote" dialoghandlerurl="~/Telerik.Web.UI.DialogHandler.axd"></teleriksharepoint:spradeditor>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:PlaceHolder>
                </div>
            </div>
        </asp:PlaceHolder>
        
        </telerik:RadAjaxPanel> 
    </div>
    <div class="buttondiv">
        <asp:Button runat="server" CssClass="buttonlink3" ID="btnSubmit" Text="Save Changes" />
        <asp:Button runat="server" CssClass="buttonlink3" ID="btnCancel" Text="Cancel" />
    </div>
</asp:Content>





0
Daniel
Top achievements
Rank 1
answered on 02 Feb 2012, 11:02 PM
So i haven't found a easy solution to do this.

What i ended up doing is to have a bunch of update panels containing the postback controls and set them to be conditional.  
There are some specific cases whts this approach does not work. By that time it is better to reload and start again.

RadAjaxpanels would not work for me because it would break some contianed user controls (with update panels ) .

I can't believe I went through all this trouble just to avoid post backs :P

As a sidenote: this problem it would only occur if i started to change the text (change font size, font face, etc..).
In Chrome and Firefox, not IE.

if i loaded the page from server the editor would work fine. 


0
Rumen
Telerik team
answered on 03 Feb 2012, 03:37 PM
Hello,

Do you get any JavaScript errors when the problem happen?

Do you experience the problem with the ShowOnFocus toolbar mode only? My suggestion is to test with the Default toolbar mode and if it works to use it.

Could you please also download and test the latest version 6.2.1 of RadEditor for SharePoint 2010?

Kind regards,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Editor
Asked by
Daniel
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or