Sharepoint InputFormTextBox не работает на панели обновления? - PullRequest
2 голосов
/ 09 апреля 2010

У меня есть две панели в панели обновления.На панели 1 есть кнопка.Если я нажму, Panel1 будет видна = false, а Panel2 будет видна = true.В Panel2 я разместил SharePoint: InPutFormTextBox.Это не рендеринг панели инструментов HTML и отображение, как показано ниже изображение.

 <SharePoint:InputFormTextBox runat="server"   ID="txtSummary" ValidationGroup="CreateCase" Rows="8" Columns="80" RichText="true" RichTextMode="Compatible" AllowHyperlink="true" TextMode="MultiLine" />

http://i700.photobucket.com/albums/ww5/vsrikanth/careersummary-1.jpg

Ответы [ 2 ]

0 голосов
/ 23 января 2015
                    <SharePoint:InputFormTextBox ID="tbComment" CssClass="sp-comment-textarea" runat="server" TextMode="MultiLine" RichText="True"></SharePoint:InputFormTextBox>
                    <%--textbox for temporay focus - trick the IE behavior on partial submit--%>
                    <input type="text" id="<%= tbComment.ClientID %>_hiddenFocusInput_" style="width: 0px; height: 0px; position: absolute; top: -3000px;" />
                    <%--tricking code that makes the 'SharePoint:InputFormTextBox' to work correctly in udate panel on partial podtback--%>
                    <script id="<%= tbComment.ClientID %>_InputFormTextBoxAfterScript" type="text/javascript">
                        (function () {
                            // where possible rich textbox only
                            if (browseris.ie5up && (browseris.win32 || browseris.win64bit) && !IsAccessibilityFeatureEnabled()) {
                                //  find this script element
                                var me = document.getElementById("<%= tbComment.ClientID %>_InputFormTextBoxAfterScript");
                                if (me) {
                                    // search for script block of the rich textbox initialization
                                    var scriptElement = me.previousSibling;
                                    while (scriptElement && (scriptElement.nodeType != 1 || scriptElement.tagName.toLowerCase() != "script")) {
                                        scriptElement = scriptElement.previousSibling;
                                    }
                                    // get the content of the found script block
                                    var innerContent = scriptElement.text;
                                    if (typeof innerContent == 'undefined') {
                                        innerContent = scriptElement.innerHTML
                                    }
                                    // get text with function call that initializes the rich textbox
                                    var callInitString = "";
                                    innerContent.toString().replace(/(RTE_ConvertTextAreaToRichEdit\([^\)]+\))/ig, function (p0, p1) { callInitString = p1; });
                                    // register on page load (partial updates also)
                                    Sys.Application.add_load(function (sender, args) {
                                        setTimeout(function () {
                                            // get the toolbar of the rich textbox
                                            var toolbar = $get("<%= tbComment.ClientID %>_toolbar");
                                            // if not found then we should run initialization
                                            if (!toolbar) {
                                                // move focus to the hidden input
                                                $get("<%= tbComment.ClientID %>_hiddenFocusInput_").focus();
                                                // reset some global variables of the SharePoint rich textbox
                                                window.g_aToolBarButtons = null;
                                                window.g_fRTEFirstTimeGenerateCalled = true;
                                                window.g_oExtendedRichTextSupport = null;
                                                parent.g_oExtendedRichTextSupport = null;
                                                // call the initialization code
                                                eval(callInitString);
                                                setTimeout(function () {
                                                    // call 'onload' code of the rich textbox
                                                    eval("RTE_TextAreaWindow_OnLoad('<%= tbComment.ClientID %>');");
                                                }, 0);
                                            }
                                        }, 0);
                                    });
                                }
                            }
                        })();
                    </script>
0 голосов
/ 09 апреля 2010

Поля расширенного текста SharePoint начинаются как текстовые области, и некоторые JavaScript в событии загрузки страницы заменяют их другим элементом управления, если вы используете поддерживаемый браузер.

С панелью обновления страница не загружается, поэтому скрипт никогда не вызывается.

Попробуйте скрыть раздел, используя css / javascript, а не свойство visible на стороне сервера. Как правило, это позволяет вам вносить любые необходимые изменения в форму, не используя sharepoint, не видя никаких изменений.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...