545 lines
19 KiB
HTML
545 lines
19 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<SCRIPT language="JavaScript">
|
|
var L_CANCEL_TEXT = "Cancel";
|
|
var L_INSERT_TEXT = "Insert";
|
|
var L_LINKIMGBORDER_TEXT = "Display a border around the image link";
|
|
var L_LINKSELECT_TEXT = "Select a community page: ";
|
|
var L_LINKSELECTPAGE_TEXT = "Select Page";
|
|
var L_LINKWEB_TEXT = "Type in a URL below:";
|
|
var L_PUTITLEFONTFACE_TEXT = "Font Family...";
|
|
var L_PUTITLEFONTSIZE_TEXT = "Font Size...";
|
|
var L_PUTITLELINK_TEXT = "Link...";
|
|
var L_PUTITLENEWTABLE_TEXT = "Table...";
|
|
var L_PUTITLETEXTCOLOR_TEXT = "Font Color...";
|
|
var L_STYLESAMPLE_TEXT = "ABC abc 123";
|
|
var L_TABLEBG_TEXT = "Background";
|
|
var L_TABLEBORDERS_TEXT = "Borders";
|
|
var L_TABLEINPUTBGCOLOR_TEXT = "Background Color: ";
|
|
var L_TABLEINPUTBGIMGURL_TEXT = "Background Image URL: ";
|
|
var L_TABLEINPUTBORDER_TEXT = "Border Width: ";
|
|
var L_TABLEINPUTBORDERCOLOR_TEXT = "Border Color: ";
|
|
var L_TABLEINPUTCELLPADDING_TEXT = "Cell Padding: ";
|
|
var L_TABLEINPUTCELLSPACING_TEXT = "Cell Spacing: ";
|
|
var L_TABLEINPUTCOLUMNS_TEXT = "Columns: ";
|
|
var L_TABLEINPUTROWS_TEXT = "Rows: ";
|
|
var L_TABLEPADDINGANDSPACING_TEXT = "Padding and Spacing";
|
|
var L_TABLEROWSANDCOLS_TEXT = "Rows and Columns";
|
|
var L_TABLEINSERTROW_TEXT = "Insert Row";
|
|
var L_TABLEINSERTCELL_TEXT = "Insert Column";
|
|
var L_TABLEINSERT_TEXT = "Insert Table";
|
|
var L_TABLEUPDATE_TEXT = "Update Table";
|
|
var L_TABLENEW_TEXT = "Create Table";
|
|
var L_TABLEEDIT_TEXT = "Edit Table";
|
|
var L_TIPB_TEXT = "Bold";
|
|
var L_TIPBGCOLOR_TEXT = "Background Color";
|
|
var L_TIPCJ_TEXT = "Center Justify";
|
|
var L_TIPCOPY_TEXT = "Copy Text";
|
|
var L_TIPCUT_TEXT = "Cut Text";
|
|
var L_TIPDONE_TEXT = "Click here when finished editing!";
|
|
var L_TIPFGCOLOR_TEXT = "Font Color";
|
|
var L_TIPFSIZE_TEXT = "Font Size";
|
|
var L_TIPFSTYLE_TEXT = "Font Family";
|
|
var L_TIPI_TEXT = "Italic";
|
|
var L_TIPLINE_TEXT = "Horizontal Rule";
|
|
var L_TIPLINK_TEXT = "Insert Link";
|
|
var L_TIPLJ_TEXT = "Left Justify";
|
|
var L_TIPOL_TEXT = "Numbered List";
|
|
var L_TIPP_TEXT = "Paragraph Style";
|
|
var L_TIPPASTE_TEXT = "Paste Text";
|
|
var L_TIPRJ_TEXT = "Right Justify";
|
|
var L_TIPTABLE_TEXT = "Insert Table";
|
|
var L_TIPU_TEXT = "Underline";
|
|
var L_TIPUL_TEXT = "Bulleted List";
|
|
var L_MODETITLE_TEXT = "Advanced HTML Mode";
|
|
var L_MODETITLE_TEXT = "Click here to edit the HTML directly.";
|
|
var L_MODEDESC_TEXT = "";
|
|
var L_CUSTOMFONT_TEXT = "Other Font...";
|
|
var L_CUSTOMFONTENTRY_TEXT = "Enter the name of your font:";
|
|
var L_SAMPLEFONTENTRY_TEXT = "Arial, Geneva, Sans-serif";
|
|
var L_CLOSEBUTTON_TEXT = "x";
|
|
var L_TBDATABINDING_TEXT = "Columns";
|
|
var L_TBDATALABEL_TEXT = 'Add a placeholder for the selected column.';
|
|
var L_DEFAULTHTML_TEXT = "<DIV></DIV>";
|
|
// Customize Font List
|
|
// FONTNAME_TEXT - Displayed in the pop-up
|
|
// FONTNAMEDEF_TEXT - The font definition used in the HTML
|
|
var L_FONTARIAL_TEXT = "Arial";
|
|
var L_FONTARIALDEF_TEXT = "Geneva, Arial, Sans-serif";
|
|
var L_FONTARIALBLACK_TEXT = "Arial Black";
|
|
var L_FONTARIALBLACKDEF_TEXT = "Arial Black, Geneva, Arial, Sans-serif";
|
|
var L_FONTCOURIERNEW_TEXT = "Courier New";
|
|
var L_FONTCOURIERNEWDEF_TEXT = "Courier New, Courier, Monospace";
|
|
var L_FONTTIMESNEWROMAN_TEXT = "Times New Roman";
|
|
var L_FONTTIMESNEWROMANDEF_TEXT = "Times New Roman, Times, Serif";
|
|
var L_FONTVERDANA_TEXT = "Verdana";
|
|
var L_FONTVERDANADEF_TEXT = "Verdana, Geneva, Arial, Sans-serif";
|
|
var L_LUCIDAHAND_TEXT = "Lucida Handwriting";
|
|
var L_LUCIDAHANDDEF_TEXT = "Lucida Handwriting, Cursive";
|
|
var L_GARAMOND_TEXT = "Garamond";
|
|
var L_GARAMONDDEF_TEXT = "Garamond, Times, Serif";
|
|
var L_WEBDINGS_TEXT = "Webdings";
|
|
var L_WEBDINGSDEF_TEXT = "Webdings";
|
|
var L_WINGDINGS_TEXT = "Wingdings";
|
|
var L_WINGDINGSDEF_TEXT = "Wingdings";
|
|
// Add/ Remove fonts by modifying array
|
|
// _CFont(Definition, Display Text, Symbol)
|
|
// Set Symbol=true for non-alphabetic fonts to append display text in default font to the sample string
|
|
function _CFont(szDef,szText,bSymbol) {
|
|
return new Array(szDef,szText,bSymbol);
|
|
};
|
|
defaultFonts = new Array();
|
|
defaultFonts[0] = _CFont(L_FONTARIALDEF_TEXT, L_FONTARIAL_TEXT, true);
|
|
defaultFonts[1] = _CFont(L_FONTARIALBLACKDEF_TEXT, L_FONTARIALBLACK_TEXT, true);
|
|
defaultFonts[2] = _CFont(L_FONTVERDANADEF_TEXT, L_FONTVERDANA_TEXT, true);
|
|
defaultFonts[3] = _CFont(L_FONTTIMESNEWROMANDEF_TEXT, L_FONTTIMESNEWROMAN_TEXT, true);
|
|
defaultFonts[4] = _CFont(L_GARAMONDDEF_TEXT,L_GARAMOND_TEXT, true);
|
|
defaultFonts[5] = _CFont(L_LUCIDAHANDDEF_TEXT,L_LUCIDAHAND_TEXT, true);
|
|
defaultFonts[6] = _CFont(L_FONTCOURIERNEWDEF_TEXT, L_FONTCOURIERNEW_TEXT, true);
|
|
defaultFonts[7] = _CFont(L_WEBDINGSDEF_TEXT, L_WEBDINGS_TEXT, true);
|
|
defaultFonts[8] = _CFont(L_WINGDINGSDEF_TEXT, L_WINGDINGS_TEXT, true);
|
|
// Width of each toolbar button
|
|
// Entry 5-8 are specify "Paragraph","Font Style", and "Font Size" respectively
|
|
// Update widths if localized
|
|
var L_TOOLBARGIF_TEXT = "toolbar.gif";
|
|
var aSizes = new Array(25,25,8,25,25,25,8,25,25,8,25,25,25,8,25,25,25,8,50);
|
|
function setHTML(szHTML)
|
|
{
|
|
if (g_state.bMode)
|
|
idEditbox.document.body.innerHTML = szHTML
|
|
else
|
|
idEditbox.document.body.innerText = szHTML
|
|
_Editor_MoveSelection(true)
|
|
}
|
|
function getHTML()
|
|
{
|
|
var szRet = (g_state.bMode ? idEditbox.document.body.innerHTML : idEditbox.document.body.innerText)
|
|
return szRet
|
|
}
|
|
function getText() {
|
|
var szRet = ""
|
|
if (g_state.bMode)
|
|
szRet = idEditbox.document.body.innerText
|
|
else {
|
|
setMode(true)
|
|
szRet = idEditbox.document.body.innerText
|
|
setMode(false)
|
|
}
|
|
return szRet
|
|
}
|
|
function getBody()
|
|
{
|
|
var oRet = idEditbox.document.body
|
|
return oRet
|
|
}
|
|
function getWidth()
|
|
{
|
|
var nRet = document.body.offsetWidth
|
|
return nRet
|
|
}
|
|
function getHeight()
|
|
{
|
|
var nRet = document.body.offsetHeight
|
|
return nRet
|
|
}
|
|
|
|
function insertHTML(szHTML)
|
|
{
|
|
var sType
|
|
var sel = g_state.GetSelection()
|
|
sType = sel.type
|
|
if (g_state.bMode) {
|
|
if (sType=="Control")
|
|
sel.item(0).outerHTML = szHTML
|
|
else
|
|
sel.pasteHTML(szHTML)
|
|
}
|
|
else
|
|
sel.text = szHTML
|
|
}
|
|
function setFocus() {
|
|
idEditbox.focus()
|
|
}
|
|
function appendHTML(szHTML) {
|
|
if (g_state.bMode)
|
|
idEditbox.document.body.insertAdjacentHTML("beforeEnd",szHTML)
|
|
else
|
|
idEditbox.document.body.insertAdjacentText("beforeEnd",szHTML)
|
|
}
|
|
function setBGColor(szValue)
|
|
{
|
|
g_state.bgColor = szValue
|
|
if (g_state.bMode)
|
|
idEditbox.document.body.bgColor = g_state.bgColor
|
|
}
|
|
function getBGColor()
|
|
{
|
|
var szRet = g_state.bgColor
|
|
return szRet
|
|
}
|
|
function setDefaultStyle(szValue)
|
|
{
|
|
g_state.css = szValue
|
|
if (g_state.bMode)
|
|
idEditbox.document.body.style.cssText = g_state.css
|
|
}
|
|
function getDefaultStyle()
|
|
{
|
|
var oRet = g_state.css
|
|
return oRet
|
|
}
|
|
function setSkin(szSkin)
|
|
{
|
|
if (szSkin == null)
|
|
document.styleSheets.skin.cssText = g_state.defaultSkin
|
|
else
|
|
document.styleSheets.skin.cssText = szSkin
|
|
document.styleSheets.skin.disabled = false
|
|
}
|
|
function setPopupSkin(szSkin)
|
|
{
|
|
if (szSkin == null)
|
|
document.styleSheets.popupSkin.cssText = g_state.popupSkin
|
|
else
|
|
document.styleSheets.popupSkin.cssText = szSkin
|
|
_CPopup_Init()
|
|
}
|
|
function setToolbar(id,g_state)
|
|
{
|
|
var el = document.all[id]
|
|
if (el)
|
|
el.style.display = (g_state) ? "" : "none"
|
|
if (id=="tbmode")
|
|
_setSize()
|
|
}
|
|
function setLinks(arLinks)
|
|
{
|
|
g_state.aLinks = arLinks
|
|
}
|
|
function setBindings(aBindings)
|
|
{
|
|
if ((aBindings) && (aBindings.length>0))
|
|
{
|
|
g_state.aBindings = aBindings
|
|
for (var iField = DBSelect.length-1; iField > 0; iField--)
|
|
DBSelect[iField] = null
|
|
for (var iField = 0; iField < g_state.aBindings.length; iField++)
|
|
DBSelect.add(new Option(g_state.aBindings[iField]))
|
|
tbDBSelect.style.display = "inline"
|
|
}
|
|
else
|
|
tbDBSelect.style.display = ""
|
|
}
|
|
function setMode(bMode)
|
|
{
|
|
if (bMode!=g_state.bMode) {
|
|
g_state.bMode = bMode
|
|
var objBody = idEditbox.document.body
|
|
if (!bMode&& !g_state.bMode)
|
|
{
|
|
_CPopup_Hide()
|
|
objBody.bgColor = objBody.style.cssText = ""
|
|
if (g_state.customButtons)
|
|
idStandardBar.style.display = "none"
|
|
else
|
|
idToolbar.style.display = "none"
|
|
objBody.innerText = idEditbox.document.body.innerHTML
|
|
objBody.className = "textMode"
|
|
}
|
|
if ((bMode) && (g_state.bMode))
|
|
{
|
|
setDefaultStyle(g_state.css)
|
|
setBGColor(g_state.bgColor)
|
|
objBody.className = idStandardBar.style.display = idToolbar.style.display = ""
|
|
objBody.innerHTML = idEditbox.document.body.innerText
|
|
}
|
|
_setSize()
|
|
cbMode.checked = !bMode
|
|
_Editor_MoveSelection(true)
|
|
setFocus()
|
|
}
|
|
return bMode
|
|
}
|
|
function addButton(sID,sButton)
|
|
{
|
|
if (!sID)
|
|
tbButtons.insertAdjacentHTML("beforeEnd","<BR>")
|
|
else
|
|
tbButtons.insertAdjacentHTML("beforeEnd","<INPUT TYPE=\"button\" ONCLICK=\"_userButtonClick(this)\" CLASS=\"userButton\" ID=\"" + sID + "\" VALUE=\"" + sButton + "\"> ")
|
|
g_state.customButtons = true
|
|
}
|
|
// EDITOR PRIVATE
|
|
function _Format(szHow, szValue) {
|
|
var oSel = g_state.GetSelection()
|
|
var sType = oSel.type
|
|
var oTarget = (sType == "None" ? idEditbox.document : oSel)
|
|
var oBlock = (oSel.parentElement != null ? _CUtil_GetBlock(oSel.parentElement()) : oSel.item(0))
|
|
setFocus()
|
|
switch(szHow)
|
|
{
|
|
case "BackColor":
|
|
var el = null
|
|
if (oSel.parentElement != null) {
|
|
el = _CUtil_GetElement(oSel.parentElement(),"TD")
|
|
if (!el) el = _CUtil_GetElement(oSel.parentElement(),"TH")
|
|
if (!el) el = _CUtil_GetElement(oSel.parentElement(),"TR")
|
|
if (!el) el = _CUtil_GetElement(oSel.parentElement(),"TABLE")
|
|
}
|
|
else
|
|
el = _CUtil_GetElement(oSel.item(0),"TABLE")
|
|
if (el)
|
|
el.bgColor = szValue
|
|
else
|
|
setBGColor(szValue)
|
|
break;
|
|
case "Justify":
|
|
if (oBlock)
|
|
{
|
|
oBlock.style.textAlign = ""
|
|
if (((oBlock.tagName=="TABLE") || (oBlock.tagName=="IMG")) && (("left"==oBlock.align) && ("Left"==szValue))) {
|
|
oBlock.align = ""
|
|
break;
|
|
}
|
|
oBlock.align = szValue
|
|
if ((oBlock.tagName=="HR") || ((oBlock.tagName=="IMG") && szValue!="Center")) break;
|
|
}
|
|
szHow=szHow+szValue
|
|
szValue=""
|
|
// Fall through
|
|
default:
|
|
oTarget.execCommand(szHow, false, szValue)
|
|
break
|
|
}
|
|
g_state.RestoreSelection()
|
|
setFocus()
|
|
return true
|
|
}
|
|
|
|
|
|
|
|
function _initEditor() {
|
|
g_state = new _CState()
|
|
window.onresize = _setSize
|
|
var sz = ""
|
|
sz += ""+ "<STYLE>"+ ".DataBound{border:1 solid #999999;margin:1;font-family:Courier;background:#F1F1F1}\n"+ ".textMode {border-top: 1px black solid;font: 10pt courier}\n.NOBORDER TD {border:1px gray solid}"+ "BODY {border: 1px white solid;border-top: none;}"+ "</STYLE>"+ "<BODY ONCONTEXTMENU=\"return false\">";
|
|
var txt = window.opener.formObj.value;
|
|
if(txt.match(/^\s*<div/i) == null){
|
|
sz +="<DIV>"+txt+"</DIV>";
|
|
}else{
|
|
sz += txt;
|
|
}
|
|
sz += "</BODY>"
|
|
_CPopup_Init()
|
|
idEditbox.document.designMode = "on"
|
|
idEditbox.document.open("text/html","replace")
|
|
idEditbox.document.write(sz)
|
|
idEditbox.document.close()
|
|
idEditbox.document.body.onblur = g_state.SaveSelection
|
|
idEditbox.document.onkeydown = _Editor_KeyDownHandler
|
|
idEditbox.document.onmousedown = _Editor_ClickHandler
|
|
idEditbox.document.ondblclick = _Editor_DblClickHandler
|
|
setTimeout("_pageReady()",0)
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _Editor_MoveSelection(bDir) {
|
|
var tr = idEditbox.document.body.createTextRange()
|
|
tr.collapse(bDir)
|
|
tr.select()
|
|
}
|
|
function _Editor_ClickHandler() {
|
|
g_state.selection = null
|
|
}
|
|
function _Editor_KeyDownHandler() {
|
|
var ev = this.parentWindow.event
|
|
if (ev.keyCode==9)
|
|
g_state.SaveSelection()
|
|
else
|
|
g_state.selection=null
|
|
}
|
|
function _Editor_DblClickHandler() {
|
|
// Shortcuts
|
|
var el = this.parentWindow.event.srcElement
|
|
if (el.tagName=="IMG") {
|
|
el.removeAttribute("width")
|
|
el.removeAttribute("height")
|
|
el.style.removeAttribute("width")
|
|
el.style.removeAttribute("height")
|
|
el.width = el.width
|
|
el.height = el.height
|
|
}
|
|
if (el.tagName=="TABLE")
|
|
_CPopup_Show('Table')
|
|
}
|
|
function _setSize() {
|
|
document.all.idEditbox.style.pixelHeight = document.body.clientHeight - idToolbar.offsetHeight - document.all.idMode.offsetHeight
|
|
document.all.idPopup.style.pixelLeft = (document.body.clientWidth - idPopup.document.all.puRegion.offsetWidth) / 2
|
|
}
|
|
function _pageReady()
|
|
{
|
|
idEditbox.document.body.oncontextmenu = new Function("return false")
|
|
if (g_state.szSearch!="")
|
|
idPopup.document.domain = idEditbox.document.domain = document.domain = g_state.szSearch
|
|
//_Editor_MoveSelection(false)
|
|
if (self.parent.RTELoaded)
|
|
self.parent.RTELoaded(self)
|
|
if (document.styleSheets.skin.disabled)
|
|
setSkin(null)
|
|
_setSize()
|
|
idEditor.style.visibility=""
|
|
}
|
|
function _userButtonClick(el)
|
|
{
|
|
if (parent.RTEButton) parent.RTEButton(self, el.id)
|
|
}
|
|
function _drawToolbar()
|
|
{
|
|
var aIds = new Array("bold","italic","bar3","left","center","right","bar4","orderedlist","unorderedlist","bar5","line","link","table","bar6","textcolor","fontstyle","fontsize","bar7","done")
|
|
var aTips = new Array(L_TIPB_TEXT,L_TIPI_TEXT,"",L_TIPLJ_TEXT,L_TIPCJ_TEXT,L_TIPRJ_TEXT,"",L_TIPOL_TEXT,L_TIPUL_TEXT,"",L_TIPLINE_TEXT,L_TIPLINK_TEXT,L_TIPTABLE_TEXT,"",L_TIPFGCOLOR_TEXT,L_TIPFSTYLE_TEXT,L_TIPFSIZE_TEXT,"",L_TIPDONE_TEXT)
|
|
var aCommand = new Array("_Format('bold')","_Format('italic')",null,"_Format('Justify','Left')","_Format('Justify','Center')","_Format('Justify','Right')",null,"_Format('insertorderedlist')","_Format('insertunorderedlist')",null,"_Format('InsertHorizontalRule')","_CPopup_Show('Link')","_CPopup_Show('Table')",null,"_CPopup_Show('ForeColor')","_CPopup_Show('font')","_CPopup_Show('fontsize')",null,"doneEditing()")
|
|
var sz = "<DIV ID=idStandardBar><NOBR>", iLeft=0, iHeight=24
|
|
for (var i = 0 ; i < aSizes.length; i++)
|
|
{
|
|
sz += ""+ "<SPAN CLASS=tbButton ONKEYPRESS=\"if (event.keyCode==13) {" + aCommand[i] + ";event.keyCode=0}\" " + (aTips[i]=="" ? "" : ("TABINDEX=" + (i+1))) + " "+ "ID=\"tb" + aIds[i] + "\" "+ "STYLE=\"width: " + aSizes[i] + ";height:" + iHeight+ "\""+ ">" + "<SPAN "+ "STYLE=\""+ "position:absolute;"+ "width:" + aSizes[i] + ";height:" + iHeight + ";"+ "clip: rect(0 " + aSizes[i] + " " + iHeight + " 0)"+ "\""+ ">"+ "<IMG "+ "TITLE=\"" + aTips[i] + "\" "+ "ONCLICK=\"" + aCommand[i] + "; event.cancelBubble=true\" "+ "ONMOUSEDOWN=\"if (event.button==1) this.style.pixelTop=-" + (iHeight*2) + "\" "+ "ONMOUSEOVER=\"this.style.pixelTop=-" + iHeight + "\" "+ "ONMOUSEOUT=\"this.style.pixelTop=0\" "+ "ONMOUSEUP=\"this.style.pixelTop=-" + iHeight + "\" "+ "SRC=\"" + L_TOOLBARGIF_TEXT + "\" "+ "STYLE=\"position:absolute;top:0;left:-" + iLeft + "\""+ ">"+ "</SPAN>"+ "</SPAN>" + (aTips[i]=="" ? "</NOBR><NOBR>" : "")
|
|
iLeft += aSizes[i]
|
|
}
|
|
sz += ""+ "</NOBR>"+ "<SPAN CLASS=tbButton ID=\"tbDBSelect\">" + "<SPAN "+ "STYLE=\""+ "position:absolute;"+ "width: 100;"+ "clip: rect(0 100 " + iHeight + " 0)"+ "\""+ ">"+ "<SELECT "+ "ID=DBSelect "+ "ONCLICK='event.cancelBubble=true;' "+ "ONCHANGE='_CPopup_InsertDatabound(this)' "+ ">"+ "<OPTION>"+ "- " + L_TBDATABINDING_TEXT + " -"+ "</OPTION>"+ "</SELECT>"
|
|
document.write(sz + "</DIV>")
|
|
}
|
|
function _drawModeSelect() {
|
|
var sz = "<TABLE CELLSPACING=0 CELLPADDING=0 ID=idMode>"
|
|
+ "<TR><TD><INPUT TYPE=checkbox ID=cbMode ONCLICK=\"setMode(!this.checked)\"></TD>"
|
|
+ "<TD><LABEL FOR=cbMode>" + L_MODETITLE_TEXT + "</LABEL>" + L_MODEDESC_TEXT
|
|
+ "</TD></TR></TABLE>";
|
|
document.write(sz);
|
|
cbMode.checked = false;
|
|
}
|
|
// _CState
|
|
function _CState()
|
|
{
|
|
this.selection = null
|
|
this.bMode = true
|
|
this.customButtons = false
|
|
this.css = this.bgColor = ""
|
|
this.defaultSkin = document.styleSheets.skin.cssText
|
|
this.popupSkin = document.styleSheets.popupSkin.cssText
|
|
this.aLinks = new Array()
|
|
this.szSearch = location.search.substring(1)
|
|
this.aBindings = new Array()
|
|
this.aListPopups = new Object()
|
|
this.aCache = new Object()
|
|
this.RestoreSelection = _CState_RestoreSelection
|
|
this.GetSelection = _CState_GetSelection
|
|
this.SaveSelection = _CState_SaveSelection
|
|
}
|
|
function _CState_RestoreSelection()
|
|
{
|
|
if (this.selection) this.selection.select()
|
|
}
|
|
function _CState_GetSelection()
|
|
{
|
|
var oSel = this.selection
|
|
if (!oSel) {
|
|
oSel = idEditbox.document.selection.createRange()
|
|
oSel.type = idEditbox.document.selection.type
|
|
}
|
|
return oSel
|
|
}
|
|
function _CState_SaveSelection()
|
|
{
|
|
g_state.selection = idEditbox.document.selection.createRange()
|
|
g_state.selection.type = idEditbox.document.selection.type
|
|
}
|
|
|
|
</SCRIPT>
|
|
<SCRIPT SRC="ieEdit.js"></SCRIPT>
|
|
<STYLE>
|
|
body {margin:0pt;border:none;padding:0pt}
|
|
#tbDBSelect {display:none;text-align:left;width: 100;margin-right: 1pt;margin-bottom: 0pt;margin-top: 0pt;padding: 0pt}
|
|
#DBSelect, #idMode, .userButton {font:8pt arial}
|
|
#DBSelect {width:100}
|
|
#idMode {margin-top:0pt}
|
|
.tbButton {text-align:left;margin:0pt 1pt 0pt 0pt;padding:0pt}
|
|
#EditBox {position: relative}
|
|
</STYLE>
|
|
<STYLE ID=skin DISABLED>
|
|
#EditBox {margin: 0px 11px 0px 11px}
|
|
#tbUpRight, #tbUpLeft {width:20px}
|
|
#idMode {margin-left:11px;padding:0pt}
|
|
#idMode LABEL {color: navy;text-decoration: underline}
|
|
#tbTopBar {height:19px}
|
|
#tbButtons, #tbContents {background: #cccccc;vertical-align: top}
|
|
#tbContents {padding:0px 5px}
|
|
#tbBottomBar {height:6px}
|
|
</STYLE>
|
|
<STYLE ID=defPopupSkin>
|
|
#popup BODY {margin:0px;border-top:none}
|
|
#popup .colorTable {height:91px}
|
|
#popup #header {width:100%}
|
|
#popup #close {cursor:default;font:bold 8pt system;width:16px;text-align: center}
|
|
#popup #content {padding:10pt}
|
|
#popup TABLE {vertical-align:top}
|
|
#popup .tabBody {border:1px black solid;border-top: none}
|
|
#popup .tabItem, #popup .tabSpace {border-bottom:1px black solid;border-left:1px black solid}
|
|
#popup .tabItem {border-top:1px black solid;font:10pt arial,geneva,sans-serif;}
|
|
#popup .currentColor {width:20px;height:20px; margin: 0pt;margin-right:15pt;border:1px black solid}
|
|
#popup .tabItem DIV {margin:3px;padding:0px;cursor: hand}
|
|
#popup .tabItem DIV.disabled {color: gray;cursor: default}
|
|
#popup .selected {font-weight:bold}
|
|
</STYLE>
|
|
<STYLE ID=popupSkin>
|
|
#popup BODY {border: 3px #000000 solid; background: #F1F1F1}
|
|
#popup #header {background: #aaaaaa; color: white}
|
|
#popup #caption {text-align: left;font: bold 12pt arial , geneva, sans-serif}
|
|
#popup .ColorTable, #popup #idList TD#current {border: 1px black solid}
|
|
#popup #idList TD{cursor: hand;border: 1px #F1F1F1 solid}
|
|
#popup #close {border: 1px #ffffff solid;background: #000000;cursor:hand;color: #ffbd21;font-weight: bold;margin-right: 6px;padding:0px 4px 2px}
|
|
#popup #tableProps .tablePropsTitle {color:#006699;text-align:left;margin:0pt;border-bottom: 1px black solid;margin-bottom:5pt}
|
|
#tableButtons, #tableProps {padding:5px}
|
|
#popup #tableContents {height:175px}
|
|
#popup #tableProps .tablePropsTitle, #popup #tableProps, #popup #tableProps TABLE {font:bold 9pt Arial, Geneva, Sans-serif}
|
|
#popup #tableOptions {font:9pt Arial, Geneva, Sans-serif;padding:15pt 5pt}
|
|
#popup #puDivider {background:black;width:1px}
|
|
#popup #content {margin: 0pt;padding:5pt 5pt 10pt 5pt}
|
|
#popup #ColorPopup {width: 250px}
|
|
#popup .ColorTable TR {height:6px}
|
|
#popup .ColorTable TD {width:6px;cursor:hand}
|
|
#popup .block P,#popup .block H1,#popup .block H2,#popup .block H3,
|
|
#popup .block H4, #popup .block H5,#popup .block H6,#popup .block PRE {margin:0pt;padding:0pt}
|
|
#popup #customFont {font:12pt Arial;text-decoration:italic}
|
|
</STYLE>
|
|
<SCRIPT>
|
|
var g_state
|
|
window.onload = _initEditor
|
|
</SCRIPT>
|
|
<title>Edit Window</title>
|
|
</HEAD>
|
|
<BODY ONCONTEXTMENU="return false" TABINDEX ="-1" SCROLL ="no" ONSELECTSTART ="return false" ONDRAGSTART="return false" ONSCROLL="return false">
|
|
<DIV ID="idEditor" STYLE="VISIBILITY:hidden">
|
|
<TABLE ID=idToolbar WIDTH="100%" CELLSPACING=0 CELLPADDING=0 ONCLICK="_CPopup_Hide()">
|
|
<TR ID=tbTopBar><TD ID=tbUpLeft></TD><TD COLSPAN=2 ID=tbUpMiddle></TD><TD ID=tbUpRight></TD></TR>
|
|
<TR><TD ID=tbMidLeft></TD>
|
|
<TD ID=tbContents><SCRIPT>_drawToolbar()</SCRIPT></TD></form>
|
|
<TD ID=tbButtons ALIGN=right></TD><TD ID=tbMidRight></TD>
|
|
</TR>
|
|
<TR ID=tbbottomBar><TD ID=tbLowLeft></TD><TD COLSPAN=2 ID=tbLowMiddle></TD><TD ID=tbLowRight></TD></TR>
|
|
</TABLE>
|
|
<IFRAME NAME="idPopup" STYLE="HEIGHT: 200px; LEFT: 25px; MARGIN-TOP: 8px; POSITION: absolute; VISIBILITY: hidden; WIDTH: 200px; Z-INDEX: -1"></IFRAME>
|
|
<IFRAME ID="EditBox" NAME="idEditbox" WIDTH="100%" HEIGHT="100%" ONFOCUS="_CPopup_Hide()"></IFRAME>
|
|
<DIV ID="tbmode" style="visibility: hidden;"><SCRIPT>_drawModeSelect()</SCRIPT></DIV>
|
|
</DIV>
|
|
<script language="JavaScript">
|
|
function doneEditing() {
|
|
window.blur();
|
|
window.opener.focus();
|
|
window.opener.setContent(getHTML());
|
|
window.close();
|
|
}
|
|
</script>
|
|
</BODY>
|
|
</HTML>
|