From e91c0682fbab45f435cceefa10bf3b172107cb55 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Sun, 30 Sep 2007 21:44:15 +0000 Subject: [PATCH] Removed file because doubt on merge. Will replace with new version just after git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@580794 13f79535-47bb-0310-9956-ffa450edef68 --- .../webapp/images/htmledit/whizzywig.js | 488 ------------------ 1 file changed, 488 deletions(-) delete mode 100644 framework/images/webapp/images/htmledit/whizzywig.js diff --git a/framework/images/webapp/images/htmledit/whizzywig.js b/framework/images/webapp/images/htmledit/whizzywig.js deleted file mode 100644 index ef5175707e..0000000000 --- a/framework/images/webapp/images/htmledit/whizzywig.js +++ /dev/null @@ -1,488 +0,0 @@ -var whizzywig_version = 'Whizzywig v55i'; //IE color palette bug; idTa!=TA?x HTML + hidden; row/col bug; link form bugs;Enter =

; fix user but bug; -//Copyright © 2005-2007 John Goodman - john.goodman(at)unverse.net *date 070324 -//Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -//The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -var buttonPath; //path to toolbar button images; unset or "textbuttons" means don't use images -var buttonStrip=[]; //object containing button strip information (optional) -var cssFile; //url of CSS stylesheet to attach to edit area -var imageBrowse; //path to page for image browser -var linkBrowse; //path to page for link browser -var idTa; //id of the textarea to whizzywig (param to makeWhizzyWig) -var gentleClean = "true"; //true: cleanUp preserves spans, inline styles and classes; false: deletes same; ask: asks. -//OTHER GLOBALS -var oW, sel, rng, papa, trail, ppw; //Whizzy contentWindow, current sel, range, parent, DOM path, popwindow; -var sels = ''; -var buts = ''; -var vals = new Array(); -var opts = new Array(); -var dobut = new Array(); -var whizzies = new Array(); - -function makeWhizzyWig(txtArea, controls){ // make a WhizzyWig from the textarea - idTa = txtArea; - whizzies[whizzies.length]=idTa; - if (!document.designMode) {// (Safari ???) - if (idTa.nodeName=="TEXTAREA") tagButs(); - alert("Whizzywig "+t("editor not available for your browser")); - return; - } - var taContent = o(idTa).defaultValue ? o(idTa).defaultValue : o(idTa).innerHTML ? o(idTa).innerHTML: ''; //anything in the textarea? - if (!o(idTa).rows < 5) o(idTa).rows='15';//IE won't use % from style - taWidth = o(idTa).style.width ? o(idTa).style.width : o(idTa).cols + "ex"; //grab the width and... - taHeight = o(idTa).style.height ? o(idTa).style.height : o(idTa).rows + "em"; //...height from the textarea - if (o(idTa).nodeName=="TEXTAREA"){ - o(idTa).style.color = '#060'; - o(idTa).style.zIndex = '2'; - } else w(''); - h(idTa); - var frm=o(idTa).parentNode; - while (frm.nodeName != 'FORM') frm=frm.parentNode;//if not form, keep trying - addEvt(frm,"submit",syncTextarea); - w(''); - var dsels = 'fontname fontsize formatblock'; - var dbuts = ' bold italic underline | left center right | number bullet indent outdent | undo redo | color hilite rule | link image table | word clean html spellcheck '; - var tbuts = ' tstart add_row_above add_row_below delete_row | add_column_before add_column_after delete_column | table_in_cell'; - var t_end = ''; //table controls end, if needed - controls = controls ? controls.toLowerCase() : "all"; - if (controls=="all") controls = dsels +' newline '+ dbuts + tbuts; - else controls += tbuts; - w('

'); - gizmos = controls.split(' '); - for (var i = 0; i < gizmos.length; i++) { - if (gizmos[i]){ //make buttons and selects for toolbar, in order requested - if (gizmos[i] == 'tstart') { - w(''; - } - else if (gizmos[i] == '|') w(' | '); - else if (gizmos[i] == 'newline') w('
'); - else if ((dsels+sels).indexOf(gizmos[i]) != -1) makeSelect(gizmos[i]) - else if ((dbuts+buts+tbuts).indexOf(gizmos[i]) != -1) makeButton(gizmos[i]); - } - } - w(t_end) //table controls end - w('. '); - w(fGo('LINK')); - if (linkBrowse) w(' '); - w(t('Link address (URL)')+':
'+t("Open link in new window")+fNo(t("OK"),"insertLink()"));//LINK_FORM end - w(fGo('IMAGE')); - if (imageBrowse) w(' '); - w(t('Image address (URL)')+':
'+t("Align")+': '+t("Border")+': '+t("Margin")+':'+fNo(t("Insert Image"),"insertImage()"));//IMAGE_FORM end - w(fGo('TABLE')+t("Rows")+': '+t("Columns")+': '+t("Border width")+': '+fNo(t("Insert Table"),"makeTable()"));//TABLE_FORM end - w(fGo('COLOR')+'

'+t("click below or enter a")+' '+t("color name")+'
'+"\n"); - var wC = new Array("00","33","66","99","CC","FF") //color table - for (i=0; i"); - for (j=0; j'+"\n"); - } - } - w(''); - } - w("
\n"); //end color table,COLOR_FORM - w("
\n"); //controls end - w(''+"\n"); - - w(''+"\n"); - - var startHTML = "\n\n"; - if (cssFile) startHTML += '\n'; - startHTML += '\n\n'+tidyD(taContent)+'\n'; - oW = o("whizzy"+idTa).contentWindow; - - var d=oW.document; - try{d.designMode = "on";} catch(e){ setTimeout('oW.designMode = "on";', 100);} - d.open(); - d.write(startHTML); - d.close(); - if (oW.addEventListener) oW.addEventListener("keypress", kb_handler, true); //keyboard shortcuts for Moz - else {d.body.attachEvent("onpaste",function(){setTimeout('cleanUp()',10);});} - addEvt(d,"mouseup", whereAmI); - addEvt(d,"keyup", whereAmI); - addEvt(d,"dblclick", doDbl); - idTa=null; -} //end makeWhizzyWig -function addEvt(o,e,f){ if(window.addEventListener) o.addEventListener(e, f, false); else o.attachEvent("on"+e,f);} -function doDbl(){if (papa.nodeName == 'IMG') doImage(); else if (papa.nodeName == 'A') doLink();} -function makeButton(button){ // assemble the button requested - var butHTML, ucBut = button.substring(0,1).toUpperCase(); - ucBut += button.substring(1); - ucBut = t(ucBut.replace(/_/g,' ')); - if (!document.frames && (button=="word" ||button=="spellcheck")) return; //Not allowed from Firefox - if (o(idTa).nodeName!="TEXTAREA" && button=="html") return; - if (!buttonPath || buttonPath == "textbuttons") - butHTML = '\n"; - else butHTML = ''; - //if space in name include text as well - w(butHTML); -} -function fGo(id){ return '