/** * This file loads some fix for the textarea of the forms for IE9 and IE10 */ function RTE_GetEditorIFrame(b) { var c = null, a = document; if (null != a.frames && a.frames.length == 0 && a.parentWindow.parent != null) a = a.parentWindow.parent.document; if (null != a.frames && a.frames.length > 0) { var d = a.getElementById(RTE_GetEditorIFrameID(b)); if (d != null) c = d.contentWindow } return c } function RTE_DD_GetMenuFrame() { var a = null,b = RTE_DD_GetMenuElement(); if (null != b) { if (window.frames.length > 0) { a = window.frames[g_strRTETextEditorPullDownMenuID].window; } } else if (document.parentWindow != null && document.parentWindow.frames != null) { a = document.parentWindow.parent.document.getElementById(g_strRTETextEditorPullDownMenuID).contentWindow; } if (null == a) { if (g_fRTEFirstCallToGetMenu) { g_fRTEFirstCallToGetMenu = false; return null } } return a } function RTE_EventHookUp(a) { var b = RTE_GetEditorDocument(a); b.body.onkeydown = new Function("RTE_OnKeyDown('" + a + "', this.ownerDocument.defaultView||this.ownerDocument.parentWindow)"); b.body.onkeyup = new Function("RTE_OnKeyUp('" + a + "', this.ownerDocument.defaultView||this.ownerDocument.parentWindow)"); b.body.onmouseup = new Function("RTE_OnMouseUp('" + a + "')"); b.body.onselectstart = new Function("RTE_OnSelectStart('" + a + "', this.ownerDocument.defaultView||this.ownerDocument.parentWindow)"); b.body.oncontextmenu = new Function("return false"); RTE_GetEditorElement(a).onblur = new Function("RTE_OnBlur('" + a + "');"); RTE_GetEditorElement(a).onfocus = new Function("RTE_OnFocus('" + a + "');") } function RTE_DD_OpenMenu(d, l, v, m, w, step) { alert("Sorry but this feature has been disabled"); return; var a = RTE_DD_GetMenuElement(), b = RTE_DD_GetMenuFrame(); if (step==undefined) { if (event.stopPropagation) event.stopPropagation(); event.cancelBubble = true; } if (step != "step2") { if (!g_fRTEMenuMoved && step==undefined) { b = insertAdjacentElement(g_elemRTELastTextAreaConverted, "afterEnd", a); b.onreadystatechange = function() { if (this.readyState=="complete") { RTE_DD_OpenMenu(d, l, v, m, w, "step1") } }; return; } // something here makes the popup to open/close if (g_strRTEDDBaseElementID == d && g_strRTEDDButtonMnemonic == l) { RTE_DD_CloseMenu(); RTE_RestoreSelection(d); return } null != g_strRTEDDBaseElementID && null != g_strRTEDDButtonMnemonic && RTE_DD_CloseMenu(); g_strRTEDDBaseElementID = d; g_strRTEDDButtonMnemonic = l; g_iRTEMenuItemMax = w - 1; RTE_SaveSelection(d); a.setAttribute(g_strRTEBaseElementIDAttributeName, d); a.setAttribute(g_strRTEButtonMnemonicAttributeName, l); a.setAttribute(g_strRTEMenuOpeningAttributeName, "1"); a.style.top = "0px"; a.style.left = "0px"; a.style.height = ""; a.style.width = ""; var x = "form.js",t = RTE_GetWebLocale(d); b.document.open("text/html", "replace"); b.document.write('
"); b.document.close(); b.document.onreadystatechange = function() { if (this.readyState=="complete") { RTE_DD_OpenMenu(d, l, v, m, w, "step2") } }; return; } b.document.body.onkeydown = new Function("RTE_DD_OnKeyDown(this);"); a.style.border = "0px"; b.document.body.style.border = "1px solid black"; a.style.display = "block"; a.setAttribute("keepvisible","yes"); var k = RTE_TB_GetToolBarButton(d, l); var y = b.document.getElementById("divAroundMenu"), s = b.document.getElementById(g_strRTEMenuTableElementName), r = 300, n = RTE_GetElementWindowCoordinates(a), g = RTE_GetElementWindowCoordinates(k), B = g[g_iRTELeft], C = g[g_iRTETop], z = k.offsetWidth, A = k.offsetHeight, h = s.scrollWidth + 4, f = s.scrollHeight + 4, u = document.body.clientWidth, q = document.body.clientHeight, i = g[g_iRTETop] + k.offsetHeight - n[g_iRTETop], p = RTE_GetEditorDocument(d), c; if (m == "1037" || m == "1025" || p.dir == "rtl") c = g[g_iRTERight] - h - n[g_iRTELeft]; else c = g[g_iRTELeft] - n[g_iRTELeft]; var o = false; if (f > r) { o = true; f = r } if (f > q) { o = true; f = q - 30 } var j = document.body.scrollTop; j += document.body.parentElement.scrollTop; if (i + f > q + j) { i = g[g_iRTETop] - f; if (j > i) i = j } p = RTE_GetEditorDocument(d); if (m == "1037" || m == "1025" || p.dir == "rtl") b.document.body.dir = "rtl"; if (o) { b.document.body.scroll = "yes"; h += 22; if (b.document.body.dir == "rtl") { c -= 22; if (e > c) c = e } } else b.document.body.scroll = ""; var e = document.body.scrollLeft; e += document.body.parentElement.scrollLeft; if (c + h > u + e) { if (b.document.body.dir != "rtl") c = u + e - h; if (e > c) c = e } a.style.zIndex = 500; a.style.left = c+"px"; a.style.top = i+"px"; a.style.width = h+"px"; a.style.height = f+"px"; RTE_DD_SetHighlightOnMenuItem(RTE_DD_GetMenuItem(0)); a.style.display = "block"; } function RTE_DD_CloseMenu() { var b = RTE_DD_GetMenuElement(); if (null == b) return; if (b.getAttribute("keepvisible") == "yes") return; /* TODO */ b.style.display = "none"; g_strRTEDDBaseElementID != null && g_strRTEDDButtonMnemonic != null && RTE_TB_ClearButtonHover(RTE_TB_GetToolBarButton(g_strRTEDDBaseElementID, g_strRTEDDButtonMnemonic)); g_strRTEDDBaseElementID = null; g_strRTEDDButtonMnemonic = null; g_elemRTEHighlightedMenuItem = null; g_iRTEHighlightedMenuItem = -1; g_iRTEMenuItemMax = -1; var a = document.parentWindow.parent; if (a) try { a.g_strRTEDDBaseElementID = null; a.g_strRTEDDButtonMnemonic = null; a.g_elemRTEHighlightedMenuItem = null; a.g_iRTEHighlightedMenuItem = -1; a.g_iRTEMenuItemMax = -1 } catch (c) {} } function RTE_OnBlur(a) { var e=RTE_DD_GetMenuElement(); if (e.getAttribute("keepvisible") == "yes") return; /* TODO */ try { RTE_SaveSelection(a) } catch (b) {} g_strRTEPrevTextEditor = g_strRTETextEditorWithTheFocus; g_strRTETextEditorWithTheFocus = null; RTE_StartResetToolBarTimer(a); RTE_DD_CloseMenu(); if (RTE_ToolBarButtonWithTheFocus() == null && !g_fRTEDialogIsOpen) { RTE_DisableToolBar(a); RTE_DD_CloseMenu() } } // for the People Picker function ConvertEntityToSpan(c, e) { if (matches[c] == null) matches[c] = []; var f = e.getAttribute("Key"), g = e.getAttribute("DisplayText"), i = e.getAttribute("IsResolved"), h = e.getAttribute("Description"), j = "ms-entity-unresolved"; if (i == "True") j = "ms-entity-resolved"; var a = ""; a += ""; else a += ""; } else a += ""; //if (browseris.ie8standard) a += "\r"; if (g != "") a += STSHtmlEncode(g); else a += STSHtmlEncode(f); /*if (browseris.ie8standard) a += "\r\r"; else*/ a += ""; return a } // There is a problem with the function used to show the Lookup fields from the core.js file -- here is the fix _spBodyOnLoadFunctionNames.push(function() { var lookuptypeintextbox=[]; var i=lookuptypeintextbox.length,html,e,choices,j,len if (document.querySelector) lookuptypeintextbox = document.querySelectorAll('.ms-lookuptypeintextbox') else { var inputs = document.getElementsByTagName('input'); for (len=inputs.length, i=0; i " } else a += ""; a += ""; if (PreferContentEditableDiv(c)) { if (browseris.safari) a += "