From: Yves K. <yku...@us...> - 2004-10-26 07:35:05
|
Update of /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31223/xwysiwyg/mod/xwysiwyg/_htmlarea/popups Modified Files: blank.html custom2.html editor_help.html fullscreen.html insert_image.html insert_table.html link.html old-fullscreen.html old_insert_image.html popup.js select_color.html Log Message: saved in unix-format Index: old-fullscreen.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/old-fullscreen.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** old-fullscreen.html 25 Oct 2004 18:13:58 -0000 1.1.1.1 --- old-fullscreen.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,131 **** ! <html> ! <head><title>Fullscreen Editor</title> ! <style type="text/css"> body { margin: 0px; border: 0px; background-color: buttonface; } </style> ! ! <script> ! ! // if we pass the "window" object as a argument and then set opener to ! // equal that we can refer to dialogWindows and popupWindows the same way ! if (window.dialogArguments) { opener = window.dialogArguments; } ! ! var _editor_url = "../"; ! document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js" language="Javascript1.2"></scr'+'ipt>'); ! ! var parent_objname = location.search.substring(1,location.search.length); // parent editor objname ! var parent_config = opener.document.all[parent_objname].config; ! ! var config = cloneObject( parent_config ); ! var objname = 'editor'; // name of this editor ! ! // DOMViewerObj = config; ! // DOMViewerName = 'config'; ! // window.open('/innerHTML/domviewer.htm'); ! ! /* ---------------------------------------------------------------------- *\ ! Function : ! Description : ! \* ---------------------------------------------------------------------- */ ! ! function _CloseOnEsc() { ! if (event.keyCode == 27) { ! update_parent(); ! window.close(); ! return; ! } ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : cloneObject ! Description : copy an object by value instead of by reference ! Usage : var newObj = cloneObject(oldObj); ! \* ---------------------------------------------------------------------- */ ! ! function cloneObject(obj) { ! var newObj = new Object; ! ! // check for array objects ! if (obj.constructor.toString().indexOf('function Array(') == 1) { ! newObj = obj.constructor(); ! } ! ! for (var n in obj) { ! var node = obj[n]; ! if (typeof node == 'object') { newObj[n] = cloneObject(node); } ! else { newObj[n] = node; } ! } ! ! return newObj; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : resize_editor ! Description : resize the editor when the user resizes the popup ! \* ---------------------------------------------------------------------- */ ! ! function resize_editor() { // resize editor to fix window ! var editor = document.all['_editor_editor']; ! ! newWidth = document.body.offsetWidth; ! newHeight = document.body.offsetHeight - editor.offsetTop; ! ! if (newWidth < 0) { newWidth = 0; } ! if (newHeight < 0) { newHeight = 0; } ! ! editor.style.width = newWidth; ! editor.style.height = newHeight; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : init ! Description : run this code on page load ! \* ---------------------------------------------------------------------- */ ! ! function init() { ! // change maximize button to minimize button ! config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor', 'update_parent(); window.close();', 'fullscreen_minimize.gif']; ! ! // set htmlmode button to refer to THIS editor ! config.btnList["htmlmode"] = ['HtmlMode', 'View HTML Source', 'editor_setmode(\'editor\')', 'ed_html.gif']; ! ! // change image url to be relative to current path ! config.imgURL = "../images/"; ! ! // generate editor and resize it ! editor_generate('editor', config); ! resize_editor(); ! ! // switch mode if needed ! if (parent_config.mode == 'textedit') { editor_setmode(objname, 'textedit'); } ! ! // set child window contents ! var parentHTML = opener.editor_getHTML(parent_objname); ! editor_setHTML(objname, parentHTML); ! ! // continuously update parent editor window ! window.setInterval(update_parent, 333); ! ! // setup event handlers ! document.body.onkeypress = _CloseOnEsc; ! window.onresize = resize_editor; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : update_parent ! Description : update parent window editor field with contents from child window ! \* ---------------------------------------------------------------------- */ ! ! function update_parent() { ! var childHTML = editor_getHTML(objname); ! opener.editor_setHTML(parent_objname, childHTML); ! } ! ! ! </script> ! </head> ! <body scroll="no" onload="init()" onunload="update_parent()"> ! ! <div style="margin: 0 0 0 0; border-width: 1; border-style: solid; border-color: threedshadow threedhighlight threedhighlight threedshadow; "></div> ! ! <textarea name="editor" style="width:100%; height:300px"></textarea><br> ! </body></html> \ No newline at end of file --- 1,131 ---- ! <html> ! <head><title>Fullscreen Editor</title> ! <style type="text/css"> body { margin: 0px; border: 0px; background-color: buttonface; } </style> ! ! <script> ! ! // if we pass the "window" object as a argument and then set opener to ! // equal that we can refer to dialogWindows and popupWindows the same way ! if (window.dialogArguments) { opener = window.dialogArguments; } ! ! var _editor_url = "../"; ! document.write('<scr'+'ipt src="' +_editor_url+ 'editor.js" language="Javascript1.2"></scr'+'ipt>'); ! ! var parent_objname = location.search.substring(1,location.search.length); // parent editor objname ! var parent_config = opener.document.all[parent_objname].config; ! ! var config = cloneObject( parent_config ); ! var objname = 'editor'; // name of this editor ! ! // DOMViewerObj = config; ! // DOMViewerName = 'config'; ! // window.open('/innerHTML/domviewer.htm'); ! ! /* ---------------------------------------------------------------------- *\ ! Function : ! Description : ! \* ---------------------------------------------------------------------- */ ! ! function _CloseOnEsc() { ! if (event.keyCode == 27) { ! update_parent(); ! window.close(); ! return; ! } ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : cloneObject ! Description : copy an object by value instead of by reference ! Usage : var newObj = cloneObject(oldObj); ! \* ---------------------------------------------------------------------- */ ! ! function cloneObject(obj) { ! var newObj = new Object; ! ! // check for array objects ! if (obj.constructor.toString().indexOf('function Array(') == 1) { ! newObj = obj.constructor(); ! } ! ! for (var n in obj) { ! var node = obj[n]; ! if (typeof node == 'object') { newObj[n] = cloneObject(node); } ! else { newObj[n] = node; } ! } ! ! return newObj; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : resize_editor ! Description : resize the editor when the user resizes the popup ! \* ---------------------------------------------------------------------- */ ! ! function resize_editor() { // resize editor to fix window ! var editor = document.all['_editor_editor']; ! ! newWidth = document.body.offsetWidth; ! newHeight = document.body.offsetHeight - editor.offsetTop; ! ! if (newWidth < 0) { newWidth = 0; } ! if (newHeight < 0) { newHeight = 0; } ! ! editor.style.width = newWidth; ! editor.style.height = newHeight; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : init ! Description : run this code on page load ! \* ---------------------------------------------------------------------- */ ! ! function init() { ! // change maximize button to minimize button ! config.btnList["popupeditor"] = ['popupeditor', 'Minimize Editor', 'update_parent(); window.close();', 'fullscreen_minimize.gif']; ! ! // set htmlmode button to refer to THIS editor ! config.btnList["htmlmode"] = ['HtmlMode', 'View HTML Source', 'editor_setmode(\'editor\')', 'ed_html.gif']; ! ! // change image url to be relative to current path ! config.imgURL = "../images/"; ! ! // generate editor and resize it ! editor_generate('editor', config); ! resize_editor(); ! ! // switch mode if needed ! if (parent_config.mode == 'textedit') { editor_setmode(objname, 'textedit'); } ! ! // set child window contents ! var parentHTML = opener.editor_getHTML(parent_objname); ! editor_setHTML(objname, parentHTML); ! ! // continuously update parent editor window ! window.setInterval(update_parent, 333); ! ! // setup event handlers ! document.body.onkeypress = _CloseOnEsc; ! window.onresize = resize_editor; ! } ! ! /* ---------------------------------------------------------------------- *\ ! Function : update_parent ! Description : update parent window editor field with contents from child window ! \* ---------------------------------------------------------------------- */ ! ! function update_parent() { ! var childHTML = editor_getHTML(objname); ! opener.editor_setHTML(parent_objname, childHTML); ! } ! ! ! </script> ! </head> ! <body scroll="no" onload="init()" onunload="update_parent()"> ! ! <div style="margin: 0 0 0 0; border-width: 1; border-style: solid; border-color: threedshadow threedhighlight threedhighlight threedshadow; "></div> ! ! <textarea name="editor" style="width:100%; height:300px"></textarea><br> ! </body></html> \ No newline at end of file Index: link.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/link.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** link.html 25 Oct 2004 18:13:55 -0000 1.1.1.1 --- link.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,155 **** ! <html> ! ! <head> ! <title>Insert/Modify Link</title> ! <script type="text/javascript" src="popup.js"></script> ! <script type="text/javascript"> ! window.resizeTo(400, 200); ! ! I18N = window.opener.HTMLArea.I18N.dialogs; ! ! function i18n(str) { ! return (I18N[str] || str); ! }; ! ! function onTargetChanged() { ! var f = document.getElementById("f_other_target"); ! if (this.value == "_other") { ! f.style.visibility = "visible"; ! f.select(); ! f.focus(); ! } else f.style.visibility = "hidden"; ! }; ! ! function Init() { ! __dlg_translate(I18N); ! __dlg_init(); ! var param = window.dialogArguments; ! var target_select = document.getElementById("f_target"); ! var use_target = true; ! if (param) { ! if ( typeof param["f_usetarget"] != "undefined" ) { ! use_target = param["f_usetarget"]; ! } ! if ( typeof param["f_href"] != "undefined" ) { ! document.getElementById("f_href").value = param["f_href"]; ! document.getElementById("f_title").value = param["f_title"]; ! comboSelectValue(target_select, param["f_target"]); ! if (target_select.value != param.f_target) { ! var opt = document.createElement("option"); ! opt.value = param.f_target; ! opt.innerHTML = opt.value; ! target_select.appendChild(opt); ! opt.selected = true; ! } ! } ! } ! if (! use_target) { ! document.getElementById("f_target_label").style.visibility = "hidden"; ! document.getElementById("f_target").style.visibility = "hidden"; ! document.getElementById("f_target_other").style.visibility = "hidden"; ! } ! var opt = document.createElement("option"); ! opt.value = "_other"; ! opt.innerHTML = i18n("Other"); ! target_select.appendChild(opt); ! target_select.onchange = onTargetChanged; ! document.getElementById("f_href").focus(); ! document.getElementById("f_href").select(); ! }; ! ! function onOK() { ! var required = { ! // f_href shouldn't be required or otherwise removing the link by entering an empty ! // url isn't possible anymore. ! // "f_href": i18n("You must enter the URL where this link points to") ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! // pass data back to the calling window ! var fields = ["f_href", "f_title", "f_target" ]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = el.value; ! } ! if (param.f_target == "_other") ! param.f_target = document.getElementById("f_other_target").value; ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! table .label { text-align: right; width: 8em; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! ! #buttons { ! margin-top: 1em; border-top: 1px solid #999; ! padding: 2px; text-align: right; ! } ! </style> ! ! </head> ! ! <body onload="Init()"> ! <div class="title">Insert/Modify Link</div> ! <form> ! <table border="0" style="width: 100%;"> ! <tr> ! <td class="label">URL:</td> ! <td><input type="text" id="f_href" style="width: 100%" /></td> ! </tr> ! <tr> ! <td class="label">Title (tooltip):</td> ! <td><input type="text" id="f_title" style="width: 100%" /></td> ! </tr> ! <tr> ! <td class="label"><span id="f_target_label">Target:</span></td> ! <td><select id="f_target"> ! <option value="">None (use implicit)</option> ! <option value="_blank">New window (_blank)</option> ! <option value="_self">Same frame (_self)</option> ! <option value="_top">Top frame (_top)</option> ! </select> ! <input type="text" name="f_other_target" id="f_other_target" size="10" style="visibility: hidden" /> ! </td> ! </tr> ! </table> ! ! <div id="buttons"> ! <button type="submit" name="ok" onclick="return onOK();">OK</button> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </div> ! </form> ! </body> ! </html> --- 1,155 ---- ! <html> ! ! <head> ! <title>Insert/Modify Link</title> ! <script type="text/javascript" src="popup.js"></script> ! <script type="text/javascript"> ! window.resizeTo(400, 200); ! ! I18N = window.opener.HTMLArea.I18N.dialogs; ! ! function i18n(str) { ! return (I18N[str] || str); ! }; ! ! function onTargetChanged() { ! var f = document.getElementById("f_other_target"); ! if (this.value == "_other") { ! f.style.visibility = "visible"; ! f.select(); ! f.focus(); ! } else f.style.visibility = "hidden"; ! }; ! ! function Init() { ! __dlg_translate(I18N); ! __dlg_init(); ! var param = window.dialogArguments; ! var target_select = document.getElementById("f_target"); ! var use_target = true; ! if (param) { ! if ( typeof param["f_usetarget"] != "undefined" ) { ! use_target = param["f_usetarget"]; ! } ! if ( typeof param["f_href"] != "undefined" ) { ! document.getElementById("f_href").value = param["f_href"]; ! document.getElementById("f_title").value = param["f_title"]; ! comboSelectValue(target_select, param["f_target"]); ! if (target_select.value != param.f_target) { ! var opt = document.createElement("option"); ! opt.value = param.f_target; ! opt.innerHTML = opt.value; ! target_select.appendChild(opt); ! opt.selected = true; ! } ! } ! } ! if (! use_target) { ! document.getElementById("f_target_label").style.visibility = "hidden"; ! document.getElementById("f_target").style.visibility = "hidden"; ! document.getElementById("f_target_other").style.visibility = "hidden"; ! } ! var opt = document.createElement("option"); ! opt.value = "_other"; ! opt.innerHTML = i18n("Other"); ! target_select.appendChild(opt); ! target_select.onchange = onTargetChanged; ! document.getElementById("f_href").focus(); ! document.getElementById("f_href").select(); ! }; ! ! function onOK() { ! var required = { ! // f_href shouldn't be required or otherwise removing the link by entering an empty ! // url isn't possible anymore. ! // "f_href": i18n("You must enter the URL where this link points to") ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! // pass data back to the calling window ! var fields = ["f_href", "f_title", "f_target" ]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = el.value; ! } ! if (param.f_target == "_other") ! param.f_target = document.getElementById("f_other_target").value; ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! table .label { text-align: right; width: 8em; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! ! #buttons { ! margin-top: 1em; border-top: 1px solid #999; ! padding: 2px; text-align: right; ! } ! </style> ! ! </head> ! ! <body onload="Init()"> ! <div class="title">Insert/Modify Link</div> ! <form> ! <table border="0" style="width: 100%;"> ! <tr> ! <td class="label">URL:</td> ! <td><input type="text" id="f_href" style="width: 100%" /></td> ! </tr> ! <tr> ! <td class="label">Title (tooltip):</td> ! <td><input type="text" id="f_title" style="width: 100%" /></td> ! </tr> ! <tr> ! <td class="label"><span id="f_target_label">Target:</span></td> ! <td><select id="f_target"> ! <option value="">None (use implicit)</option> ! <option value="_blank">New window (_blank)</option> ! <option value="_self">Same frame (_self)</option> ! <option value="_top">Top frame (_top)</option> ! </select> ! <input type="text" name="f_other_target" id="f_other_target" size="10" style="visibility: hidden" /> ! </td> ! </tr> ! </table> ! ! <div id="buttons"> ! <button type="submit" name="ok" onclick="return onOK();">OK</button> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </div> ! </form> ! </body> ! </html> Index: old_insert_image.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/old_insert_image.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** old_insert_image.html 25 Oct 2004 18:13:54 -0000 1.1.1.1 --- old_insert_image.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,206 **** ! <!-- based on insimage.dlg --> ! ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN"> ! <HTML id=dlgImage STYLE="width: 432px; height: 194px; "> ! <HEAD> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <meta http-equiv="MSThemeCompatible" content="Yes"> ! <TITLE>Insert Image</TITLE> ! <style> ! html, body, button, div, input, select, fieldset { font-family: MS Shell Dlg; font-size: 8pt; position: absolute; }; ! </style> ! <SCRIPT defer> ! ! function _CloseOnEsc() { ! if (event.keyCode == 27) { window.close(); return; } ! } ! ! function _getTextRange(elm) { ! var r = elm.parentTextEdit.createTextRange(); ! r.moveToElementText(elm); ! return r; ! } ! ! window.onerror = HandleError ! ! function HandleError(message, url, line) { ! var str = "An error has occurred in this dialog." + "\n\n" ! + "Error: " + line + "\n" + message; ! alert(str); ! window.close(); ! return true; ! } ! ! function Init() { ! var elmSelectedImage; ! var htmlSelectionControl = "Control"; ! var globalDoc = window.dialogArguments; ! var grngMaster = globalDoc.selection.createRange(); ! ! // event handlers ! document.body.onkeypress = _CloseOnEsc; ! btnOK.onclick = new Function("btnOKClick()"); ! ! txtFileName.fImageLoaded = false; ! txtFileName.intImageWidth = 0; ! txtFileName.intImageHeight = 0; ! ! if (globalDoc.selection.type == htmlSelectionControl) { ! if (grngMaster.length == 1) { ! elmSelectedImage = grngMaster.item(0); ! if (elmSelectedImage.tagName == "IMG") { ! txtFileName.fImageLoaded = true; ! if (elmSelectedImage.src) { ! txtFileName.value = elmSelectedImage.src.replace(/^[^*]*(\*\*\*)/, "$1"); // fix placeholder src values that editor converted to abs paths ! txtFileName.intImageHeight = elmSelectedImage.height; ! txtFileName.intImageWidth = elmSelectedImage.width; ! txtVertical.value = elmSelectedImage.vspace; ! txtHorizontal.value = elmSelectedImage.hspace; ! txtBorder.value = elmSelectedImage.border; ! txtAltText.value = elmSelectedImage.alt; ! selAlignment.value = elmSelectedImage.align; ! } ! } ! } ! } ! txtFileName.value = txtFileName.value || "http://"; ! txtFileName.focus(); ! } ! ! function _isValidNumber(txtBox) { ! var val = parseInt(txtBox); ! if (isNaN(val) || val < 0 || val > 999) { return false; } ! return true; ! } ! ! function btnOKClick() { ! var elmImage; ! var intAlignment; ! var htmlSelectionControl = "Control"; ! var globalDoc = window.dialogArguments; ! var grngMaster = globalDoc.selection.createRange(); ! ! // error checking ! ! if (!txtFileName.value || txtFileName.value == "http://") { ! alert("Image URL must be specified."); ! txtFileName.focus(); ! return; ! } ! if (txtHorizontal.value && !_isValidNumber(txtHorizontal.value)) { ! alert("Horizontal spacing must be a number between 0 and 999."); ! txtHorizontal.focus(); ! return; ! } ! if (txtBorder.value && !_isValidNumber(txtBorder.value)) { ! alert("Border thickness must be a number between 0 and 999."); ! txtBorder.focus(); ! return; ! } ! if (txtVertical.value && !_isValidNumber(txtVertical.value)) { ! alert("Vertical spacing must be a number between 0 and 999."); ! txtVertical.focus(); ! return; ! } ! ! // delete selected content and replace with image ! if (globalDoc.selection.type == htmlSelectionControl && !txtFileName.fImageLoaded) { ! grngMaster.execCommand('Delete'); ! grngMaster = globalDoc.selection.createRange(); ! } ! ! idstr = "\" id=\"556e697175657e537472696e67"; // new image creation ID ! if (!txtFileName.fImageLoaded) { ! grngMaster.execCommand("InsertImage", false, idstr); ! elmImage = globalDoc.all['556e697175657e537472696e67']; ! elmImage.removeAttribute("id"); ! elmImage.removeAttribute("src"); ! grngMaster.moveStart("character", -1); ! } else { ! elmImage = grngMaster.item(0); ! if (elmImage.src != txtFileName.value) { ! grngMaster.execCommand('Delete'); ! grngMaster = globalDoc.selection.createRange(); ! grngMaster.execCommand("InsertImage", false, idstr); ! elmImage = globalDoc.all['556e697175657e537472696e67']; ! elmImage.removeAttribute("id"); ! elmImage.removeAttribute("src"); ! grngMaster.moveStart("character", -1); ! txtFileName.fImageLoaded = false; ! } ! grngMaster = _getTextRange(elmImage); ! } ! ! if (txtFileName.fImageLoaded) { ! elmImage.style.width = txtFileName.intImageWidth; ! elmImage.style.height = txtFileName.intImageHeight; ! } ! ! if (txtFileName.value.length > 2040) { ! txtFileName.value = txtFileName.value.substring(0,2040); ! } ! ! elmImage.src = txtFileName.value; ! ! if (txtHorizontal.value != "") { elmImage.hspace = parseInt(txtHorizontal.value); } ! else { elmImage.hspace = 0; } ! ! if (txtVertical.value != "") { elmImage.vspace = parseInt(txtVertical.value); } ! else { elmImage.vspace = 0; } ! ! elmImage.alt = txtAltText.value; ! ! if (txtBorder.value != "") { elmImage.border = parseInt(txtBorder.value); } ! else { elmImage.border = 0; } ! ! elmImage.align = selAlignment.value; ! grngMaster.collapse(false); ! grngMaster.select(); ! window.close(); ! } ! </SCRIPT> ! </HEAD> ! <BODY id=bdy onload="Init()" style="background: threedface; color: windowtext;" scroll=no> ! ! <DIV id=divFileName style="left: 0.98em; top: 1.2168em; width: 7em; height: 1.2168em; ">Image URL:</DIV> ! <INPUT ID=txtFileName type=text style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()"> ! ! <DIV id=divAltText style="left: 0.98em; top: 4.1067em; width: 6.58em; height: 1.2168em; ">Alternate Text:</DIV> ! <INPUT type=text ID=txtAltText tabIndex=15 style="left: 8.54em; top: 3.8025em; width: 21.5em; height: 2.1294em; " onfocus="select()"> ! ! <FIELDSET id=fldLayout style="left: .9em; top: 7.1em; width: 17.08em; height: 7.6em;"> ! <LEGEND id=lgdLayout>Layout</LEGEND> ! </FIELDSET> ! ! <FIELDSET id=fldSpacing style="left: 18.9em; top: 7.1em; width: 11em; height: 7.6em;"> ! <LEGEND id=lgdSpacing>Spacing</LEGEND> ! </FIELDSET> ! ! <DIV id=divAlign style="left: 1.82em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Alignment:</DIV> ! <SELECT size=1 ID=selAlignment tabIndex=20 style="left: 10.36em; top: 8.8218em; width: 6.72em; height: 1.2168em; "> ! <OPTION id=optNotSet value=""> Not set </OPTION> ! <OPTION id=optLeft value=left> Left </OPTION> ! <OPTION id=optRight value=right> Right </OPTION> ! <OPTION id=optTexttop value=textTop> Texttop </OPTION> ! <OPTION id=optAbsMiddle value=absMiddle> Absmiddle </OPTION> ! <OPTION id=optBaseline value=baseline SELECTED> Baseline </OPTION> ! <OPTION id=optAbsBottom value=absBottom> Absbottom </OPTION> ! <OPTION id=optBottom value=bottom> Bottom </OPTION> ! <OPTION id=optMiddle value=middle> Middle </OPTION> ! <OPTION id=optTop value=top> Top </OPTION> ! </SELECT> ! ! <DIV id=divHoriz style="left: 19.88em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Horizontal:</DIV> ! <INPUT ID=txtHorizontal style="left: 24.92em; top: 8.8218em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=25 onfocus="select()"> ! ! <DIV id=divBorder style="left: 1.82em; top: 12.0159em; width: 8.12em; height: 1.2168em; ">Border Thickness:</DIV> ! <INPUT ID=txtBorder style="left: 10.36em; top: 11.5596em; width: 6.72em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=21 onfocus="select()"> ! ! <DIV id=divVert style="left: 19.88em; top: 12.0159em; width: 3.64em; height: 1.2168em; ">Vertical:</DIV> ! <INPUT ID=txtVertical style="left: 24.92em; top: 11.5596em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=30 onfocus="select()"> ! ! <BUTTON ID=btnOK style="left: 31.36em; top: 1.0647em; width: 7em; height: 2.2em; " type=submit tabIndex=40>OK</BUTTON> ! <BUTTON ID=btnCancel style="left: 31.36em; top: 3.6504em; width: 7em; height: 2.2em; " type=reset tabIndex=45 onClick="window.close();">Cancel</BUTTON> ! ! </BODY> </HTML> \ No newline at end of file --- 1,206 ---- ! <!-- based on insimage.dlg --> ! ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML 3.2//EN"> ! <HTML id=dlgImage STYLE="width: 432px; height: 194px; "> ! <HEAD> ! <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ! <meta http-equiv="MSThemeCompatible" content="Yes"> ! <TITLE>Insert Image</TITLE> ! <style> ! html, body, button, div, input, select, fieldset { font-family: MS Shell Dlg; font-size: 8pt; position: absolute; }; ! </style> ! <SCRIPT defer> ! ! function _CloseOnEsc() { ! if (event.keyCode == 27) { window.close(); return; } ! } ! ! function _getTextRange(elm) { ! var r = elm.parentTextEdit.createTextRange(); ! r.moveToElementText(elm); ! return r; ! } ! ! window.onerror = HandleError ! ! function HandleError(message, url, line) { ! var str = "An error has occurred in this dialog." + "\n\n" ! + "Error: " + line + "\n" + message; ! alert(str); ! window.close(); ! return true; ! } ! ! function Init() { ! var elmSelectedImage; ! var htmlSelectionControl = "Control"; ! var globalDoc = window.dialogArguments; ! var grngMaster = globalDoc.selection.createRange(); ! ! // event handlers ! document.body.onkeypress = _CloseOnEsc; ! btnOK.onclick = new Function("btnOKClick()"); ! ! txtFileName.fImageLoaded = false; ! txtFileName.intImageWidth = 0; ! txtFileName.intImageHeight = 0; ! ! if (globalDoc.selection.type == htmlSelectionControl) { ! if (grngMaster.length == 1) { ! elmSelectedImage = grngMaster.item(0); ! if (elmSelectedImage.tagName == "IMG") { ! txtFileName.fImageLoaded = true; ! if (elmSelectedImage.src) { ! txtFileName.value = elmSelectedImage.src.replace(/^[^*]*(\*\*\*)/, "$1"); // fix placeholder src values that editor converted to abs paths ! txtFileName.intImageHeight = elmSelectedImage.height; ! txtFileName.intImageWidth = elmSelectedImage.width; ! txtVertical.value = elmSelectedImage.vspace; ! txtHorizontal.value = elmSelectedImage.hspace; ! txtBorder.value = elmSelectedImage.border; ! txtAltText.value = elmSelectedImage.alt; ! selAlignment.value = elmSelectedImage.align; ! } ! } ! } ! } ! txtFileName.value = txtFileName.value || "http://"; ! txtFileName.focus(); ! } ! ! function _isValidNumber(txtBox) { ! var val = parseInt(txtBox); ! if (isNaN(val) || val < 0 || val > 999) { return false; } ! return true; ! } ! ! function btnOKClick() { ! var elmImage; ! var intAlignment; ! var htmlSelectionControl = "Control"; ! var globalDoc = window.dialogArguments; ! var grngMaster = globalDoc.selection.createRange(); ! ! // error checking ! ! if (!txtFileName.value || txtFileName.value == "http://") { ! alert("Image URL must be specified."); ! txtFileName.focus(); ! return; ! } ! if (txtHorizontal.value && !_isValidNumber(txtHorizontal.value)) { ! alert("Horizontal spacing must be a number between 0 and 999."); ! txtHorizontal.focus(); ! return; ! } ! if (txtBorder.value && !_isValidNumber(txtBorder.value)) { ! alert("Border thickness must be a number between 0 and 999."); ! txtBorder.focus(); ! return; ! } ! if (txtVertical.value && !_isValidNumber(txtVertical.value)) { ! alert("Vertical spacing must be a number between 0 and 999."); ! txtVertical.focus(); ! return; ! } ! ! // delete selected content and replace with image ! if (globalDoc.selection.type == htmlSelectionControl && !txtFileName.fImageLoaded) { ! grngMaster.execCommand('Delete'); ! grngMaster = globalDoc.selection.createRange(); ! } ! ! idstr = "\" id=\"556e697175657e537472696e67"; // new image creation ID ! if (!txtFileName.fImageLoaded) { ! grngMaster.execCommand("InsertImage", false, idstr); ! elmImage = globalDoc.all['556e697175657e537472696e67']; ! elmImage.removeAttribute("id"); ! elmImage.removeAttribute("src"); ! grngMaster.moveStart("character", -1); ! } else { ! elmImage = grngMaster.item(0); ! if (elmImage.src != txtFileName.value) { ! grngMaster.execCommand('Delete'); ! grngMaster = globalDoc.selection.createRange(); ! grngMaster.execCommand("InsertImage", false, idstr); ! elmImage = globalDoc.all['556e697175657e537472696e67']; ! elmImage.removeAttribute("id"); ! elmImage.removeAttribute("src"); ! grngMaster.moveStart("character", -1); ! txtFileName.fImageLoaded = false; ! } ! grngMaster = _getTextRange(elmImage); ! } ! ! if (txtFileName.fImageLoaded) { ! elmImage.style.width = txtFileName.intImageWidth; ! elmImage.style.height = txtFileName.intImageHeight; ! } ! ! if (txtFileName.value.length > 2040) { ! txtFileName.value = txtFileName.value.substring(0,2040); ! } ! ! elmImage.src = txtFileName.value; ! ! if (txtHorizontal.value != "") { elmImage.hspace = parseInt(txtHorizontal.value); } ! else { elmImage.hspace = 0; } ! ! if (txtVertical.value != "") { elmImage.vspace = parseInt(txtVertical.value); } ! else { elmImage.vspace = 0; } ! ! elmImage.alt = txtAltText.value; ! ! if (txtBorder.value != "") { elmImage.border = parseInt(txtBorder.value); } ! else { elmImage.border = 0; } ! ! elmImage.align = selAlignment.value; ! grngMaster.collapse(false); ! grngMaster.select(); ! window.close(); ! } ! </SCRIPT> ! </HEAD> ! <BODY id=bdy onload="Init()" style="background: threedface; color: windowtext;" scroll=no> ! ! <DIV id=divFileName style="left: 0.98em; top: 1.2168em; width: 7em; height: 1.2168em; ">Image URL:</DIV> ! <INPUT ID=txtFileName type=text style="left: 8.54em; top: 1.0647em; width: 21.5em;height: 2.1294em; " tabIndex=10 onfocus="select()"> ! ! <DIV id=divAltText style="left: 0.98em; top: 4.1067em; width: 6.58em; height: 1.2168em; ">Alternate Text:</DIV> ! <INPUT type=text ID=txtAltText tabIndex=15 style="left: 8.54em; top: 3.8025em; width: 21.5em; height: 2.1294em; " onfocus="select()"> ! ! <FIELDSET id=fldLayout style="left: .9em; top: 7.1em; width: 17.08em; height: 7.6em;"> ! <LEGEND id=lgdLayout>Layout</LEGEND> ! </FIELDSET> ! ! <FIELDSET id=fldSpacing style="left: 18.9em; top: 7.1em; width: 11em; height: 7.6em;"> ! <LEGEND id=lgdSpacing>Spacing</LEGEND> ! </FIELDSET> ! ! <DIV id=divAlign style="left: 1.82em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Alignment:</DIV> ! <SELECT size=1 ID=selAlignment tabIndex=20 style="left: 10.36em; top: 8.8218em; width: 6.72em; height: 1.2168em; "> ! <OPTION id=optNotSet value=""> Not set </OPTION> ! <OPTION id=optLeft value=left> Left </OPTION> ! <OPTION id=optRight value=right> Right </OPTION> ! <OPTION id=optTexttop value=textTop> Texttop </OPTION> ! <OPTION id=optAbsMiddle value=absMiddle> Absmiddle </OPTION> ! <OPTION id=optBaseline value=baseline SELECTED> Baseline </OPTION> ! <OPTION id=optAbsBottom value=absBottom> Absbottom </OPTION> ! <OPTION id=optBottom value=bottom> Bottom </OPTION> ! <OPTION id=optMiddle value=middle> Middle </OPTION> ! <OPTION id=optTop value=top> Top </OPTION> ! </SELECT> ! ! <DIV id=divHoriz style="left: 19.88em; top: 9.126em; width: 4.76em; height: 1.2168em; ">Horizontal:</DIV> ! <INPUT ID=txtHorizontal style="left: 24.92em; top: 8.8218em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=25 onfocus="select()"> ! ! <DIV id=divBorder style="left: 1.82em; top: 12.0159em; width: 8.12em; height: 1.2168em; ">Border Thickness:</DIV> ! <INPUT ID=txtBorder style="left: 10.36em; top: 11.5596em; width: 6.72em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=21 onfocus="select()"> ! ! <DIV id=divVert style="left: 19.88em; top: 12.0159em; width: 3.64em; height: 1.2168em; ">Vertical:</DIV> ! <INPUT ID=txtVertical style="left: 24.92em; top: 11.5596em; width: 4.2em; height: 2.1294em; ime-mode: disabled;" type=text size=3 maxlength=3 value="" tabIndex=30 onfocus="select()"> ! ! <BUTTON ID=btnOK style="left: 31.36em; top: 1.0647em; width: 7em; height: 2.2em; " type=submit tabIndex=40>OK</BUTTON> ! <BUTTON ID=btnCancel style="left: 31.36em; top: 3.6504em; width: 7em; height: 2.2em; " type=reset tabIndex=45 onClick="window.close();">Cancel</BUTTON> ! ! </BODY> </HTML> \ No newline at end of file Index: insert_table.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/insert_table.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** insert_table.html 25 Oct 2004 18:13:51 -0000 1.1.1.1 --- insert_table.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,175 **** ! <html> ! ! <head> ! <title>Insert Table</title> ! ! <script type="text/javascript" src="popup.js"></script> ! ! <script type="text/javascript"> ! ! window.resizeTo(400, 100); ! ! function Init() { ! i18n = window.opener.HTMLArea.I18N.dialogs; // load the HTMLArea plugin and lang file ! __dlg_translate(i18n); ! __dlg_init(); ! document.getElementById("f_rows").focus(); ! }; ! ! function onOK() { ! var required = { ! "f_rows": "You must enter a number of rows", ! "f_cols": "You must enter a number of columns" ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! var fields = ["f_rows", "f_cols", "f_width", "f_unit", "f_fixed", ! "f_align", "f_border", "f_spacing", "f_padding"]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = (el.type == "checkbox") ? el.checked : el.value; ! } ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! form p { ! margin-top: 5px; ! margin-bottom: 5px; ! } ! .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; } ! .fr { width: 7em; float: left; padding: 2px 5px; text-align: right; } ! fieldset { padding: 0px 10px 5px 5px; } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! .space { padding: 2px; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! form { padding: 0px; margin: 0px; } ! </style> ! ! </head> ! ! <body onload="Init()"> ! ! <div class="title">Insert Table</div> ! ! <form action="" method="get"> ! <table border="0" style="padding: 0px; margin: 0px"> ! <tbody> ! ! <tr> ! <td style="width: 4em; text-align: right">Rows:</td> ! <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td> ! <td style="width: 4em; text-align: right">Width:</td> ! <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td> ! <td><select size="1" name="unit" id="f_unit" title="Width unit"> ! <option value="%" selected="1" >Percent</option> ! <option value="px" >Pixels</option> ! <option value="em" >Em</option> ! </select></td> ! </tr> ! <tr> ! <td style="width: 4em; text-align: right">Cols:</td> ! <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td> ! <td style="text-align: right"><input type="checkbox" checked="checked" name="fixed" id="f_fixed" /></td> ! <td colspan="2"><label for="f_fixed" ! >Fixed width columns</label></td> ! </tr> ! </tbody> ! </table> ! ! <p /> ! ! <fieldset style="float: left; margin-left: 5px;"> ! <legend>Layout</legend> ! ! <div class="space"></div> ! ! <div class="fl">Alignment:</div> ! <select size="1" name="align" id="f_align" ! title="Positioning of this table"> ! <option value="" selected="1" >Not set</option> ! <option value="left" >Left</option> ! <option value="right" >Right</option> ! <option value="texttop" >Texttop</option> ! <option value="absmiddle" >Absmiddle</option> ! <option value="baseline" >Baseline</option> ! <option value="absbottom" >Absbottom</option> ! <option value="bottom" >Bottom</option> ! <option value="middle" >Middle</option> ! <option value="top" >Top</option> ! </select> ! ! <p /> ! ! <div class="fl">Border thickness:</div> ! <input type="text" name="border" id="f_border" size="5" value="1" ! title="Leave empty for no border" /> ! <!-- ! <p /> ! ! <div class="fl">Collapse borders:</div> ! <input type="checkbox" name="collapse" id="f_collapse" /> ! --> ! <div class="space"></div> ! ! </fieldset> ! ! <fieldset style="float:right; margin-right: 5px;"> ! <legend>Spacing</legend> ! ! <div class="space"></div> ! ! <div class="fr">Cell spacing:</div> ! <input type="text" name="spacing" id="f_spacing" size="5" value="1" ! title="Space between adjacent cells" /> ! ! <p /> ! ! <div class="fr">Cell padding:</div> ! <input type="text" name="padding" id="f_padding" size="5" value="1" ! title="Space between content and border in cell" /> ! ! <div class="space"></div> ! ! </fieldset> ! ! <div style="margin-top: 85px; border-top: 1px solid #999; padding: 2px; text-align: right;"> ! <button type="button" name="ok" onclick="return onOK();">OK</button> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </div> ! ! </form> ! ! </body> </html> \ No newline at end of file --- 1,175 ---- ! <html> ! ! <head> ! <title>Insert Table</title> ! ! <script type="text/javascript" src="popup.js"></script> ! ! <script type="text/javascript"> ! ! window.resizeTo(400, 100); ! ! function Init() { ! i18n = window.opener.HTMLArea.I18N.dialogs; // load the HTMLArea plugin and lang file ! __dlg_translate(i18n); ! __dlg_init(); ! document.getElementById("f_rows").focus(); ! }; ! ! function onOK() { ! var required = { ! "f_rows": "You must enter a number of rows", ! "f_cols": "You must enter a number of columns" ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! var fields = ["f_rows", "f_cols", "f_width", "f_unit", "f_fixed", ! "f_align", "f_border", "f_spacing", "f_padding"]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = (el.type == "checkbox") ? el.checked : el.value; ! } ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! form p { ! margin-top: 5px; ! margin-bottom: 5px; ! } ! .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; } ! .fr { width: 7em; float: left; padding: 2px 5px; text-align: right; } ! fieldset { padding: 0px 10px 5px 5px; } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! .space { padding: 2px; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! form { padding: 0px; margin: 0px; } ! </style> ! ! </head> ! ! <body onload="Init()"> ! ! <div class="title">Insert Table</div> ! ! <form action="" method="get"> ! <table border="0" style="padding: 0px; margin: 0px"> ! <tbody> ! ! <tr> ! <td style="width: 4em; text-align: right">Rows:</td> ! <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td> ! <td style="width: 4em; text-align: right">Width:</td> ! <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td> ! <td><select size="1" name="unit" id="f_unit" title="Width unit"> ! <option value="%" selected="1" >Percent</option> ! <option value="px" >Pixels</option> ! <option value="em" >Em</option> ! </select></td> ! </tr> ! <tr> ! <td style="width: 4em; text-align: right">Cols:</td> ! <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td> ! <td style="text-align: right"><input type="checkbox" checked="checked" name="fixed" id="f_fixed" /></td> ! <td colspan="2"><label for="f_fixed" ! >Fixed width columns</label></td> ! </tr> ! </tbody> ! </table> ! ! <p /> ! ! <fieldset style="float: left; margin-left: 5px;"> ! <legend>Layout</legend> ! ! <div class="space"></div> ! ! <div class="fl">Alignment:</div> ! <select size="1" name="align" id="f_align" ! title="Positioning of this table"> ! <option value="" selected="1" >Not set</option> ! <option value="left" >Left</option> ! <option value="right" >Right</option> ! <option value="texttop" >Texttop</option> ! <option value="absmiddle" >Absmiddle</option> ! <option value="baseline" >Baseline</option> ! <option value="absbottom" >Absbottom</option> ! <option value="bottom" >Bottom</option> ! <option value="middle" >Middle</option> ! <option value="top" >Top</option> ! </select> ! ! <p /> ! ! <div class="fl">Border thickness:</div> ! <input type="text" name="border" id="f_border" size="5" value="1" ! title="Leave empty for no border" /> ! <!-- ! <p /> ! ! <div class="fl">Collapse borders:</div> ! <input type="checkbox" name="collapse" id="f_collapse" /> ! --> ! <div class="space"></div> ! ! </fieldset> ! ! <fieldset style="float:right; margin-right: 5px;"> ! <legend>Spacing</legend> ! ! <div class="space"></div> ! ! <div class="fr">Cell spacing:</div> ! <input type="text" name="spacing" id="f_spacing" size="5" value="1" ! title="Space between adjacent cells" /> ! ! <p /> ! ! <div class="fr">Cell padding:</div> ! <input type="text" name="padding" id="f_padding" size="5" value="1" ! title="Space between content and border in cell" /> ! ! <div class="space"></div> ! ! </fieldset> ! ! <div style="margin-top: 85px; border-top: 1px solid #999; padding: 2px; text-align: right;"> ! <button type="button" name="ok" onclick="return onOK();">OK</button> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </div> ! ! </form> ! ! </body> </html> \ No newline at end of file Index: insert_image.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/insert_image.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** insert_image.html 25 Oct 2004 18:13:33 -0000 1.1.1.1 --- insert_image.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,191 **** ! <html> ! ! <head> ! <title>Insert Image</title> ! ! <script type="text/javascript" src="popup.js"></script> ! ! <script type="text/javascript"> ! ! window.resizeTo(400, 100); ! ! function Init() { ! __dlg_init(); ! var param = window.dialogArguments; ! if (param) { ! document.getElementById("f_url").value = param["f_url"]; ! document.getElementById("f_alt").value = param["f_alt"]; ! document.getElementById("f_border").value = param["f_border"]; ! document.getElementById("f_align").value = param["f_align"]; ! document.getElementById("f_vert").value = param["f_vert"]; ! document.getElementById("f_horiz").value = param["f_horiz"]; ! window.ipreview.location.replace(param.f_url); ! } ! document.getElementById("f_url").focus(); ! }; ! ! function onOK() { ! var required = { ! "f_url": "You must enter the URL" ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! // pass data back to the calling window ! var fields = ["f_url", "f_alt", "f_align", "f_border", ! "f_horiz", "f_vert"]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = el.value; ! } ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! function onPreview() { ! var f_url = document.getElementById("f_url"); ! var url = f_url.value; ! if (!url) { ! alert("You have to enter an URL first"); ! f_url.focus(); ! return false; ! } ! window.ipreview.location.replace(url); ! return false; ! }; ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! form p { ! margin-top: 5px; ! margin-bottom: 5px; ! } ! .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; } ! .fr { width: 6em; float: left; padding: 2px 5px; text-align: right; } ! fieldset { padding: 0px 10px 5px 5px; } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! .space { padding: 2px; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! form { padding: 0px; margin: 0px; } ! </style> ! ! </head> ! ! <body onload="Init()"> ! ! <div class="title">Insert Image</div> ! <!--- new stuff ---> ! <form action="" method="get"> ! <table border="0" width="100%" style="padding: 0px; margin: 0px"> ! <tbody> ! ! <tr> ! <td style="width: 7em; text-align: right">Image URL:</td> ! <td><input type="text" name="url" id="f_url" style="width:75%" ! title="Enter the image URL here" /> ! <button name="preview" onclick="return onPreview();" ! title="Preview the image in a new window">Preview</button> ! </td> ! </tr> ! <tr> ! <td style="width: 7em; text-align: right">Alternate text:</td> ! <td><input type="text" name="alt" id="f_alt" style="width:100%" ! title="For browsers that don't support images" /></td> ! </tr> ! ! </tbody> ! </table> ! ! <p /> ! ! <fieldset style="float: left; margin-left: 5px;"> ! <legend>Layout</legend> ! ! <div class="space"></div> ! ! <div class="fl">Alignment:</div> ! <select size="1" name="align" id="f_align" ! title="Positioning of this image"> ! <option value="" >Not set</option> ! <option value="left" >Left</option> ! <option value="right" >Right</option> ! <option value="texttop" >Texttop</option> ! <option value="absmiddle" >Absmiddle</option> ! <option value="baseline" selected="1" >Baseline</option> ! <option value="absbottom" >Absbottom</option> ! <option value="bottom" >Bottom</option> ! <option value="middle" >Middle</option> ! <option value="top" >Top</option> ! </select> ! ! <p /> ! ! <div class="fl">Border thickness:</div> ! <input type="text" name="border" id="f_border" size="5" ! title="Leave empty for no border" /> ! ! <div class="space"></div> ! ! </fieldset> ! ! <fieldset style="float:right; margin-right: 5px;"> ! <legend>Spacing</legend> ! ! <div class="space"></div> ! ! <div class="fr">Horizontal:</div> ! <input type="text" name="horiz" id="f_horiz" size="5" ! title="Horizontal padding" /> ! ! <p /> ! ! <div class="fr">Vertical:</div> ! <input type="text" name="vert" id="f_vert" size="5" ! title="Vertical padding" /> ! ! <div class="space"></div> ! ! </fieldset> ! <br clear="all" /> ! <table width="100%" style="margin-bottom: 0.2em"> ! <tr> ! <td valign="bottom"> ! Image Preview:<br /> ! <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="300" src=""></iframe> ! </td> ! <td valign="bottom" style="text-align: right"> ! <button type="button" name="ok" onclick="return onOK();">OK</button><br> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </td> ! </tr> ! </table> ! </form> ! </body> ! </html> --- 1,191 ---- ! <html> ! ! <head> ! <title>Insert Image</title> ! ! <script type="text/javascript" src="popup.js"></script> ! ! <script type="text/javascript"> ! ! window.resizeTo(400, 100); ! ! function Init() { ! __dlg_init(); ! var param = window.dialogArguments; ! if (param) { ! document.getElementById("f_url").value = param["f_url"]; ! document.getElementById("f_alt").value = param["f_alt"]; ! document.getElementById("f_border").value = param["f_border"]; ! document.getElementById("f_align").value = param["f_align"]; ! document.getElementById("f_vert").value = param["f_vert"]; ! document.getElementById("f_horiz").value = param["f_horiz"]; ! window.ipreview.location.replace(param.f_url); ! } ! document.getElementById("f_url").focus(); ! }; ! ! function onOK() { ! var required = { ! "f_url": "You must enter the URL" ! }; ! for (var i in required) { ! var el = document.getElementById(i); ! if (!el.value) { ! alert(required[i]); ! el.focus(); ! return false; ! } ! } ! // pass data back to the calling window ! var fields = ["f_url", "f_alt", "f_align", "f_border", ! "f_horiz", "f_vert"]; ! var param = new Object(); ! for (var i in fields) { ! var id = fields[i]; ! var el = document.getElementById(id); ! param[id] = el.value; ! } ! __dlg_close(param); ! return false; ! }; ! ! function onCancel() { ! __dlg_close(null); ! return false; ! }; ! ! function onPreview() { ! var f_url = document.getElementById("f_url"); ! var url = f_url.value; ! if (!url) { ! alert("You have to enter an URL first"); ! f_url.focus(); ! return false; ! } ! window.ipreview.location.replace(url); ! return false; ! }; ! </script> ! ! <style type="text/css"> ! html, body { ! background: ButtonFace; ! color: ButtonText; ! font: 11px Tahoma,Verdana,sans-serif; ! margin: 0px; ! padding: 0px; ! } ! body { padding: 5px; } ! table { ! font: 11px Tahoma,Verdana,sans-serif; ! } ! form p { ! margin-top: 5px; ! margin-bottom: 5px; ! } ! .fl { width: 9em; float: left; padding: 2px 5px; text-align: right; } ! .fr { width: 6em; float: left; padding: 2px 5px; text-align: right; } ! fieldset { padding: 0px 10px 5px 5px; } ! select, input, button { font: 11px Tahoma,Verdana,sans-serif; } ! button { width: 70px; } ! .space { padding: 2px; } ! ! .title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px; ! border-bottom: 1px solid black; letter-spacing: 2px; ! } ! form { padding: 0px; margin: 0px; } ! </style> ! ! </head> ! ! <body onload="Init()"> ! ! <div class="title">Insert Image</div> ! <!--- new stuff ---> ! <form action="" method="get"> ! <table border="0" width="100%" style="padding: 0px; margin: 0px"> ! <tbody> ! ! <tr> ! <td style="width: 7em; text-align: right">Image URL:</td> ! <td><input type="text" name="url" id="f_url" style="width:75%" ! title="Enter the image URL here" /> ! <button name="preview" onclick="return onPreview();" ! title="Preview the image in a new window">Preview</button> ! </td> ! </tr> ! <tr> ! <td style="width: 7em; text-align: right">Alternate text:</td> ! <td><input type="text" name="alt" id="f_alt" style="width:100%" ! title="For browsers that don't support images" /></td> ! </tr> ! ! </tbody> ! </table> ! ! <p /> ! ! <fieldset style="float: left; margin-left: 5px;"> ! <legend>Layout</legend> ! ! <div class="space"></div> ! ! <div class="fl">Alignment:</div> ! <select size="1" name="align" id="f_align" ! title="Positioning of this image"> ! <option value="" >Not set</option> ! <option value="left" >Left</option> ! <option value="right" >Right</option> ! <option value="texttop" >Texttop</option> ! <option value="absmiddle" >Absmiddle</option> ! <option value="baseline" selected="1" >Baseline</option> ! <option value="absbottom" >Absbottom</option> ! <option value="bottom" >Bottom</option> ! <option value="middle" >Middle</option> ! <option value="top" >Top</option> ! </select> ! ! <p /> ! ! <div class="fl">Border thickness:</div> ! <input type="text" name="border" id="f_border" size="5" ! title="Leave empty for no border" /> ! ! <div class="space"></div> ! ! </fieldset> ! ! <fieldset style="float:right; margin-right: 5px;"> ! <legend>Spacing</legend> ! ! <div class="space"></div> ! ! <div class="fr">Horizontal:</div> ! <input type="text" name="horiz" id="f_horiz" size="5" ! title="Horizontal padding" /> ! ! <p /> ! ! <div class="fr">Vertical:</div> ! <input type="text" name="vert" id="f_vert" size="5" ! title="Vertical padding" /> ! ! <div class="space"></div> ! ! </fieldset> ! <br clear="all" /> ! <table width="100%" style="margin-bottom: 0.2em"> ! <tr> ! <td valign="bottom"> ! Image Preview:<br /> ! <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" height="200" width="300" src=""></iframe> ! </td> ! <td valign="bottom" style="text-align: right"> ! <button type="button" name="ok" onclick="return onOK();">OK</button><br> ! <button type="button" name="cancel" onclick="return onCancel();">Cancel</button> ! </td> ! </tr> ! </table> ! </form> ! </body> ! </html> Index: blank.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/blank.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** blank.html 25 Oct 2004 18:13:55 -0000 1.1.1.1 --- blank.html 26 Oct 2004 07:34:54 -0000 1.2 *************** *** 1,2 **** ! <html> </html> \ No newline at end of file --- 1,2 ---- ! <html> </html> \ No newline at end of file Index: fullscreen.html =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/xwysiwyg/mod/xwysiwyg/_htmlarea/popups/fullscreen.html,v ret... [truncated message content] |