svn commit: r889851 [15/17] - in /ofbiz/branches/addbirt: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/fin...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r889851 [15/17] - in /ofbiz/branches/addbirt: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/fin...

doogie-3
Modified: ofbiz/branches/addbirt/framework/images/webapp/images/htmledit/whizzywig.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/images/webapp/images/htmledit/whizzywig.js?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/images/webapp/images/htmledit/whizzywig.js (original)
+++ ofbiz/branches/addbirt/framework/images/webapp/images/htmledit/whizzywig.js Fri Dec 11 23:11:39 2009
@@ -1,59 +1,67 @@
-var whizzywig_version = 'Whizzywig v55i'; //IE color palette bug; idTa!=TA?x HTML + hidden; row/col bug; link form bugs;Enter = <P>; fix user but bug;
-//Copyright � 2005-2007 John Goodman - john.goodman(at)unverse.net  *date 070324
+var whizzywig_version='Whizzywig v59'; //briefer whereami, xC(); paNode=>pa; hilite in FF; whizzybrowse;
+//Copyright © 2005-2009 John Goodman - www.unverse.net  *date 091104
 //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)
+//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 btn=[]; //object containing button strip information
+ btn._w=16; btn._h=16; btn._f="/images/htmledit/WhizzywigToolbar.png"; //set to path to toolbar image
+var buttonPath;  //path to custom toolbar button images; "textbuttons" means don't use images; default tries btn[_f]
+var buttonExt;   //extension (e.g. .png) for toolbar button images;  default '.gif'
 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.
+var idTa;        //id of the textarea (param to makeWhizzyWig)
 //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();
+var oW, sel, rng, papa, trail, ppw, wn=window; //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;
+ idTa=txtArea;
  whizzies[whizzies.length]=idTa;
- if (!document.designMode) {// (Safari ???)
+ if (!document.designMode) {
   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
+ var taContent=o(idTa).defaultValue ? o(idTa).defaultValue : o(idTa).innerHTML ? o(idTa).innerHTML: ''; //anything in the textarea?
+ //this line is commented as it is not allowing bigger textarea than rows
+ //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';
+ o(idTa).style.color='#060';
+ o(idTa).style.zIndex='2';
  } else w('<input type="hidden" id="wzhid_'+idTa+'" name="'+idTa+'" />');
  h(idTa);
  var frm=o(idTa).parentNode;
  while (frm.nodeName != 'FORM') frm=frm.parentNode;//if not form, keep trying
  addEvt(frm,"submit",syncTextarea);
  w('<style type="text/css">button {vertical-align:middle;padding:0;margin:1px 0} button img{vertical-align:middle;margin:-1px} select{vertical-align:middle;margin:1px}  .wzCtrl {background:ButtonFace; border:2px outset ButtonShadow; padding:5px;} #sourceTa{color:#060;font-family:mono;} #whizzyWig {border-width:1px}</style>');
- 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;
+ var dsels='formatblock';
+ if (!navigator.userAgent.match('AppleWebKit')){dsels+=' fontname fontsize'} //Font u/s on Chrome/Safari
+ var dbuts=' bold italic underline | left center right justify | number bullet indent outdent | undo redo | color hilite rule | link image table | clean html spellcheck ';
+ btns=dbuts.split(' ');
+ for (var i=0, pos=0; i < btns.length; i++) {
+  if(btns[i] && btns[i]!='|') {btn[btns[i]]=btn._w*pos++};
+ }
+ 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 '+ buts + dbuts + tbuts;
  else controls += tbuts;
  w('<div style="width:'+taWidth+'" onmouseover="c(\''+idTa+'\')"><div id="CONTROLS'+idTa+'" class="wzCtrl" unselectable="on">');
- gizmos = controls.split(' ');
- for (var i = 0; i < gizmos.length; i++) {
+ 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('<div id="TABLE_CONTROLS'+idTa+'" style="display:none" unselectable="on">');
-    t_end = '</div>';
+    t_end='</div>';
    }
    else if (gizmos[i] == '|') w('&nbsp;<big style="padding-bottom:2em">|</big>&nbsp;');
    else if (gizmos[i] == 'newline') w('<br>');
@@ -71,12 +79,12 @@
  w(t('Image address (URL)')+': <input type="text" id="if_url'+idTa+'" size="50"> <label title='+t("to display if image unavailable")+'><br>'+t("Alternate text")+':<input id="if_alt'+idTa+'" type="text" size="50"></label><br>'+t("Align")+':<select id="if_side'+idTa+'"><option value="none">_&hearts;_ '+t("normal")+'</option><option value="left">&hearts;= &nbsp;'+t("left")+'</option><option value="right">=&hearts; &nbsp;'+t("right")+'</option></select> '+t("Border")+':<input type="text" id="if_border'+idTa+'" size="20" value="0" title="'+t("number or CSS e.g. 3px maroon outset")+'"> '+t("Margin")+':<input type="text" id="if_margin'+idTa+'" size="20" value="0" title="'+t("number or CSS e.g. 5px 1em")+'">'+fNo(t("Insert Image"),"insertImage()"));//IMAGE_FORM end
  w(fGo('TABLE')+t("Rows")+':<input type="text" id="tf_rows'+idTa+'" size="2" value="3"> <select id="tf_head'+idTa+'"><option value="0">'+t("No header row")+'</option><option value="1">'+t("Include header row")+'</option></select> '+t("Columns")+':<input type="text" id="tf_cols'+idTa+'" size="2" value="3"> '+t("Border width")+':<input type="text" id="tf_border'+idTa+'" size="2" value="1"> '+fNo(t("Insert Table"),"makeTable()"));//TABLE_FORM end
  w(fGo('COLOR')+'<input type="hidden" id="cf_cmd'+idTa+'"><div style="background:#000;padding:1px;height:22px;width:125px;float:left"><div id="cPrvw'+idTa+'" style="background-color:red; height:100%; width:100%"></div></div> <input type=text id="cf_color'+idTa+'" value="red" size=17 onpaste=vC(value) onblur=vC(value)> <input type="button" onmouseover=vC() onclick=sC() value="'+t("OK")+'">  <input type="button" onclick="hideDialogs();" value="'+t("Cancel")+'"><br> '+t("click below or enter a")+' <a href="http://www.unverse.net/colortable.htm" target="_blank">'+t("color name")+'</a><br clear=all> <table border=0 cellspacing=1 cellpadding=0 width=480 bgcolor="#000000">'+"\n");
- var wC = new Array("00","33","66","99","CC","FF")  //color table
+ var wC=new Array("00","33","66","99","CC","FF")  //color table
  for (i=0; i<wC.length; i++){
   w("<tr>");
   for (j=0; j<wC.length; j++){
    for (k=0; k<wC.length; k++){
-    var clr = wC[i]+wC[j]+wC[k];
+    var clr=wC[i]+wC[j]+wC[k];
     w(' <td style="background:#'+clr+';height:12px;width:12px" onmouseover=vC("#'+clr+'") onclick=sC("#'+clr+'")></td>'+"\n");
    }
   }
@@ -87,38 +95,34 @@
  w('<div class="wzCtrl" id="showWYSIWYG'+idTa+'" style="display:none"><input type="button" onclick="showDesign();" value="'+t("Hide HTML")+'">');
  tagButs();
  w('</div>'+"\n");
-
+
  w('<iframe style="border:1px inset ButtonShadow;width:100%;height:'+taHeight+'" src="javascript:;" id="whizzy'+idTa+'"></iframe></div>'+"\n");
 
- var startHTML = "<html>\n<head>\n";
+ var startHTML="<html>\n<head>\n";
  if (cssFile) startHTML += '<link media="all" type="text/css" href="'+cssFile+'" rel="stylesheet">\n';
- startHTML += '</head>\n<body id="'+idTa+'">\n'+tidyD(taContent)+'</body>\n</html>';
- oW = o("whizzy"+idTa).contentWindow;
+ startHTML += '</head>\n<body id="'+idTa+'" style="background-image:none">\n'+tidyD(taContent)+'</body>\n</html>';
+ 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();
+ 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);
+ 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 addEvt(o,e,f){ if(wn.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();
+ 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 = '<button type=button onClick=makeSo("'+button+'")>'+ucBut+"</button>\n";
- else butHTML = '<button  title="'+ucBut+'" type=button onClick=makeSo("'+button+'")>'+(buttonStrip[button]!=undefined?'<div style="width:'+buttonStrip._w+'px;height:'+buttonStrip._h+'px;background-image:url('+buttonStrip._f+');background-position:'+buttonStrip[button]+'px 0px"></div>':'<img src="'+buttonPath+button+'.gif" alt="'+ucBut+'" onError="this.parentNode.innerHTML=this.alt">')+'</button>';
- //if space in name include text as well
+ ucBut=t(ucBut.replace(/_/g,' '));
+ if (!document.frames && (button=="spellcheck")) return; //Not allowed from Firefox
+ if (o(idTa).nodeName!="TEXTAREA" && button=="html") return;
+ if (!buttonExt) buttonExt='.gif';
+ if (buttonPath == "textbuttons")
+   butHTML='<button type=button onClick=makeSo("'+button+'")>'+ucBut+"</button>\n";
+ else butHTML='<button  title="'+ucBut+'" type=button onClick=makeSo("'+button+'")>'+(btn[button]!=undefined?'<div style="width:'+btn._w+'px;height:'+btn._h+'px;background-image:url('+btn._f+');background-position:-'+btn[button]+'px 0px"></div>':'<img src="'+buttonPath+button+buttonExt+'" alt="'+ucBut+'" onError="this.parentNode.innerHTML=this.alt">')+'</button>\n';
  w(butHTML);
 }
 function fGo(id){ return '<div id="'+id+'_FORM'+idTa+'" unselectable="on" style="display:none" onkeypress="if(event.keyCode==13) {return false;}"><hr>'+"\n"; }//new form
@@ -127,21 +131,21 @@
 }
 function makeSelect(select){ // assemble the <select> requested
  if (select == 'formatblock') {
-  var h = "Heading";
- var values = ["<p>", "<p>", "<h1>", "<h2>", "<h3>", "<h4>", "<h5>", "<h6>", "<address>",  "<pre>"];
- var options = [t("Choose style")+":", t("Paragraph"), t(h)+" 1 ", t(h)+" 2 ", t(h)+" 3 ", t(h)+" 4 ", t(h)+" 5 ", t(h)+" 6", t("Address"), t("Fixed width<pre>")];
+  var h="Heading";
+ var values=["<p>", "<p>", "<h1>", "<h2>", "<h3>", "<h4>", "<h5>", "<h6>", "<address>",  "<pre>"];
+ var options=[t("Choose style")+":", t("Paragraph"), t(h)+" 1 ", t(h)+" 2 ", t(h)+" 3 ", t(h)+" 4 ", t(h)+" 5 ", t(h)+" 6", t("Address"), t("Fixed width<pre>")];
  } else if (select == 'fontname') {
-var values = ["Arial, Helvetica, sans-serif", "Arial, Helvetica, sans-serif","'Arial Black', Helvetica, sans-serif", "'Comic Sans MS' fantasy", "Courier New, Courier, monospace", "Georgia, serif", "Impact,sans-serif","'Times New Roman', Times, serif", "'Trebuchet MS',sans-serif", "Verdana, Arial, Helvetica, sans-serif"];
- var options = [t("Font")+":", "Arial","Arial Black", "Comic", "Courier", "Georgia", "Impact","Times New Roman", "Trebuchet","Verdana"];
+var values=["Arial, Helvetica, sans-serif", "Arial, Helvetica, sans-serif","'Arial Black', Helvetica, sans-serif", "'Comic Sans MS' fantasy", "Courier New, Courier, monospace", "Georgia, serif", "Impact,sans-serif","'Times New Roman', Times, serif", "'Trebuchet MS',sans-serif", "Verdana, Arial, Helvetica, sans-serif"];
+ var options=[t("Font")+":", "Arial","Arial Black", "Comic", "Courier", "Georgia", "Impact","Times New Roman", "Trebuchet","Verdana"];
  } else if (select == 'fontsize') {
-  var values = ["3", "1", "2", "3", "4", "5", "6", "7"];
-  var options = [t("Font size")+":", "1 "+t("Small"), "2", "3", "4", "5", "6", "7 "+t("Big")];
- } else {
-  var values = vals[select];
-  var options = opts[select];
+  var values=["3", "1", "2", "3", "4", "5", "6", "7"];
+  var options=[t("Font size")+":", "1 "+t("Small"), "2", "3", "4", "5", "6", "7 "+t("Big")];
+ } else {
+  var values=vals[select];
+  var options=opts[select];
  }
  w('<select id="'+select+idTa+'" onchange="doSelect(this.id);">'+"\n");
- for (var i = 0; i < values.length; i++) {
+ for (var i=0; i < values.length; i++) {
   w(' <option value="' + values[i] + '">' + options[i] + "</option>\n");
  }
  w("</select>\n");
@@ -149,17 +153,20 @@
 function tagButs() {
  w('<input type="button" onclick=\'doTag("<h1>")\' value="H1" title="<H1>"><input type="button" onclick=\'doTag("<h2>")\' value="H2" title="<H2>"><input type="button" onclick=\'doTag("<h3>")\' value="H3" title="<H3>"><input type="button" onclick=\'doTag("<h4>")\' value="H4" title="<H4>"><input type="button" onclick=\'doTag("<p>")\' value="P" title="<P>"><input type="button" onclick=\'doTag("<strong>")\' value="S" title="<STRONG>" style="font-weight:bold"><input type="button" onclick=\'doTag("<em>")\' value="E" title="<EM>" style="font-style:italic;"><input type="button" onclick=\'doTag("<li>")\' value="&bull;&mdash;" title="<LI>"><input type="button" onclick=\'doTag("<a>")\' value="@" title="<A HREF= >"><input type="button" onclick=\'doTag("<img>")\' value="[&hearts;]" title="<IMG SRC= >"><input type="button" onclick=\'doTag("<br />")\' value="&larr;" title="<BR />">');
 }
-function makeSo(command, option) {  //format selected text or line in the whizzy
+function xC(c,o){return oW.document.execCommand(c,false,o);}
+function makeSo(cm,op) {  //format selected text or line in the whizzy
  hideDialogs();
- if (buts.indexOf(command)!=-1) {insHTML(dobut[command]); return;} //user button
- if (!document.all) oW.document.execCommand('useCSS',false, true); //no spans for bold, italic
- if ("leftrightcenterjustify".indexOf(command) !=-1) command = "justify" + command;
- else if (command == "number") command = "insertorderedlist";
- else if (command == "bullet") command = "insertunorderedlist";
- else if (command == "rule") command = "inserthorizontalrule";
- switch (command) {
+ oW.focus();
+ if(dobut[cm]) {insHTML(dobut[cm]); return;}
+ if (/Firefox/.test(navigator.userAgent)) {xC("styleWithCSS",cm=="hilite")} //no spans for bold, italic, ok hilite
+ if (cm == "justify") cm = "full";
+ if ("leftrightcenterfull".indexOf(cm) !=-1) cm="justify" + cm;
+ else if (cm == "number") cm="insertorderedlist";
+ else if (cm == "bullet") cm="insertunorderedlist";
+ else if (cm == "rule") cm="inserthorizontalrule";
+ switch (cm) {
   case "color": o('cf_cmd'+idTa).value="forecolor"; if (textSel()) s('COLOR_FORM'+idTa); break;
-  case "hilite" : o('cf_cmd'+idTa).value="backcolor"; if (textSel()) s('COLOR_FORM'+idTa); break;
+  case "hilite" : o('cf_cmd'+idTa).value=cm; if (textSel()) s('COLOR_FORM'+idTa); break;
   case "image" : doImage(); break;
   case "link" : doLink(); break;
   case "html" : showHTML(); break;
@@ -172,56 +179,58 @@
   case "add_column_after" : doCol('add','1'); break;
   case "table_in_cell" : hideDialogs(); s('TABLE_FORM'+idTa); break;
   case "clean" : cleanUp(); break;
-  case "word" : oW.document.execCommand("paste", false, false); gentleClean=false; cleanUp(); break;
   case "spellcheck" : spellCheck(); break;
-  default: oW.document.execCommand(command, false, option);
+  default: xC(cm,op);
  }
+ oW.focus();
 }
 function doSelect(selectname) {  //select on toolbar used - do it
- var idx = o(selectname).selectedIndex;
- var selected = o(selectname).options[idx].value;
- o(selectname).selectedIndex = 0;
+ var idx=o(selectname).selectedIndex;
+ var selected=o(selectname).options[idx].value;
+ o(selectname).selectedIndex=0;
  selectname=selectname.replace(idTa,"");
  if (" _formatblock_fontname_fontsize".indexOf('_'+selectname) > 0) {
-  var cmd = selectname;
-  oW.document.execCommand(cmd, false, selected);
+  var cmd=selectname;
+  oW.focus();
+  xC(cmd,selected);
  } else {
   insHTML(selected);
- }
+ }  
  oW.focus();
 }
 function vC(colour) { // view Color
- if (!colour) colour = o('cf_color'+idTa).value;
- o('cPrvw'+idTa).style.backgroundColor = colour;
- o('cf_color'+idTa).value = colour;
+ if (!colour) colour=o('cf_color'+idTa).value;
+ o('cPrvw'+idTa).style.backgroundColor=colour;
+ o('cf_color'+idTa).value=colour;
 }
 function sC(color) {  //set Color
  hideDialogs();
- var cmd = o('cf_cmd'+idTa).value;
- if  (!color) color = o('cf_color'+idTa).value;
+ var cmd=o('cf_cmd'+idTa).value;
+ if  (!color) color=o('cf_color'+idTa).value;
  if (rng) rng.select();
- oW.document.execCommand(cmd, false, color);
+ if (cmd=="hilite") try {xC("hilitecolor",color);} catch(e){xC("backcolor",color);}
+ else {xC(cmd,color);}
  oW.focus();
 }
 function doLink(){
  if (textSel()) {
-  if (papa.nodeName == 'A') o("lf_url"+idTa).value = papa.href;
+  if (papa.nodeName == 'A') o("lf_url"+idTa).value=papa.href;
   s('LINK_FORM'+idTa);
  }
 }
-function insertLink() {
+function insertLink(url) {
  if (rng) rng.select();
- URL = o("lf_url"+idTa).value;
- if (URL.replace(/ /g,"") == "") oW.document.execCommand('Unlink',false,null);
+ URL=url ? url : o("lf_url"+idTa).value;
+ if (URL.replace(/ /g,"") == "") xC('Unlink',null);
  else if (o("lf_new"+idTa).checked) insHTML('<a href="'+URL+'" target="_blank">');
- else oW.document.execCommand('CreateLink',false,URL);
+ else xC('CreateLink',URL);
  hideDialogs();
 }
 function doImage(){
  if (papa && papa.nodeName == 'IMG'){
-  o("if_url"+idTa).value = papa.src;
+  o("if_url"+idTa).value=papa.src;
   o("if_alt"+idTa).value=papa.alt;
-  o("if_side"+idTa).selectedIndex=(papa.align=="left")?1:(papa.align=="right")?2:0;
+  o("if_side"+idTa).selectedIndex=(papa.align=="left")?1:(papa.align=="right")?2:0;
   o("if_border"+idTa).value=papa.style.border?papa.style.border:papa.border>0?papa.border:0;
   o("if_margin"+idTa).value=papa.style.margin?papa.style.margin:papa.hspace>0?papa.hspace:0;
  }
@@ -249,14 +258,14 @@
   else s('TABLE_FORM'+idTa);
 }
 function doRow(toDo,below) { //insert or delete a table row
- var paNode=papa;
- while (paNode.tagName != "TR") paNode=paNode.parentNode;
- var tRow=paNode.rowIndex;
- var tCols=paNode.cells.length;
- while (paNode.tagName != "TABLE") paNode=paNode.parentNode;
- if (toDo == "delete") paNode.deleteRow(tRow);
+ var pa=papa;
+ while (pa.tagName != "TR") pa=pa.parentNode;
+ var tRow=pa.rowIndex;
+ var tCols=pa.cells.length;
+ while (pa.tagName != "TABLE") pa=pa.parentNode;
+ if (toDo == "delete") pa.deleteRow(tRow);
  else {
-  var newRow=paNode.insertRow(tRow+parseInt(below)); //1=below  0=above
+  var newRow=pa.insertRow(tRow+parseInt(below)); //1=below  0=above
    for (i=0; i < tCols; i++){
     var newCell=newRow.insertCell(i);
     newCell.innerHTML="#";
@@ -264,25 +273,22 @@
  }
 }
 function doCol(toDo,after) { //insert or delete a column
- var paNode=papa;
- while (paNode.tagName != 'TD') paNode=paNode.parentNode;
- var tCol=paNode.cellIndex;
- while (paNode.tagName != "TABLE") paNode=paNode.parentNode;
- var tRows=paNode.rows.length;
+ var pa=papa;
+ while (pa.tagName != 'TD') pa=pa.parentNode;
+ var tCol=pa.cellIndex;
+ while (pa.tagName != "TABLE") pa=pa.parentNode;
+ var tRows=pa.rows.length;
  for (i=0; i < tRows; i++){
-  if (toDo == "delete") paNode.rows[i].deleteCell(tCol);
+  if (toDo == "delete") pa.rows[i].deleteCell(tCol);
   else {
-   var newCell=paNode.rows[i].insertCell(tCol+parseInt(after)); //if after=0 then before
+   var newCell=pa.rows[i].insertCell(tCol+parseInt(after)); //if after=0 then before
    newCell.innerHTML="#";
   }
  }
 }
 function makeTable() { //insert a table
  hideDialogs();
- var rows=o('tf_rows'+idTa).value;
- var cols=o('tf_cols'+idTa).value;
- var border=o('tf_border'+idTa).value;
- var head=o('tf_head'+idTa).value;
+ var rows=o('tf_rows'+idTa).value, cols=o('tf_cols'+idTa).value, border=o('tf_border'+idTa).value, head=o('tf_head'+idTa).value;
  if ((rows > 0) && (cols > 0)) {
   var table='<table border="' + border + '">';
   for (var i=1; i <= rows; i++) {
@@ -302,7 +308,7 @@
  }
 }
 function doWin(URL) {  //popup  for browse function
- ppw=window.open(URL,'popWhizz','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=640,height=480,top=100');
+ ppw=wn.open(URL,'popWhizz','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=640,height=480,top=100');
  ppw.focus();
 }
 function spellCheck() {  //check spelling with ieSpell if available
@@ -312,96 +318,89 @@
  } catch(e) {
   if(e.number==-2146827859) {
   if (confirm("ieSpell is not installed on your computer. \n Click [OK] to go to download page."))
-    window.open("http://www.iespell.com/download.php","DownLoad");
+    wn.open("http://www.iespell.com/download.php","DownLoad");
   } else {
    alert("Error Loading ieSpell: Exception " + e.number);
   }
  }
 }
-function cleanUp(){  //clean up crud inserted by Micro$oft Orifice
- oW.document.execCommand("removeformat",false,null);
- var h=oW.document.body.innerHTML;
- var vicious=false;
- if (gentleClean=="ask") vicious=confirm(t('Remove all styles and classes?'));
- if (!gentleClean || vicious){
- h=h.replace(/<\/?(SPAN|DEL|INS|U|DIR)[^>]*>/gi, "")
- .replace(/\b(CLASS|STYLE)=\"[^\"]*\"/gi, "")
- .replace(/\b(CLASS|STYLE)=\w+/gi, "");
- }
- if(!o('fontname'+idTa) || !o('fontsize'+idTa)) h=h.replace(/<\?FONT[^>]*>/gi, "");
- h=h.replace(/<\/?(FONT|SPAN|COL|XML|ST1|SHAPE|V:|O:|F:|F |PATH|LOCK|IMAGEDATA|STROKE|FORMULAS)[^>]*>/gi, "")
- .replace(/\bCLASS=\"?MSO\w*\"?/gi, "")
- .replace(/[�]/g,'-') //long �
- .replace(/[��]/g, "'") //single smartquotes ��
- .replace(/[��]/g, '"') //double smartquotes ��
- .replace(/align="?justify"?/gi, "") //justify sends some browsers mad
- .replace(/<(TABLE|TD|TH|COL)(.*)(WIDTH|HEIGHT)=["'0-9A-Z]*/gi, "<$1$2") //no fixed size tables (%OK) [^A-Za-z>]
- .replace(/<([^>]+)>\s*<\/\1>/gi, ""); //empty tag
- oW.document.body.innerHTML=h;
-}
 function hideDialogs() {
- h('LINK_FORM'+idTa);
- h('IMAGE_FORM'+idTa);
- h('COLOR_FORM'+idTa);
- h('TABLE_FORM'+idTa);
- h('TABLE_CONTROLS'+idTa);
+ h('LINK_FORM'+idTa); h('IMAGE_FORM'+idTa); h('COLOR_FORM'+idTa); h('TABLE_FORM'+idTa); h('TABLE_CONTROLS'+idTa);
 }
 function showDesign() {
  oW.document.body.innerHTML=tidyD(o(idTa).value);
- h(idTa);
- h('showWYSIWYG'+idTa);
- s('CONTROLS'+idTa);
- s('whizzy'+idTa);
+ h(idTa); h('showWYSIWYG'+idTa); s('CONTROLS'+idTa); s('whizzy'+idTa);
  if(o("whizzy"+idTa).contentDocument) o("whizzy"+idTa).contentDocument.designMode="on"; //FF loses it on hide
  oW.focus();
 }
-function showHTML() {
- var t=(window.get_xhtml) ? get_xhtml(oW.document.body) : oW.document.body.innerHTML;
- o(idTa).value=tidyH(t);
- h('CONTROLS'+idTa);
- h('whizzy'+idTa);
- s(idTa);
- s('showWYSIWYG'+idTa);
+function showHTML() {
+ o(idTa).value=tidyH(oW.document);
+ h('CONTROLS'+idTa); h('whizzy'+idTa); s(idTa); s('showWYSIWYG'+idTa);
  o(idTa).focus();
 }
 
 function syncTextarea() { //tidy up before we go-go
  for (var i=0;i<whizzies.length;i++){
   var t=whizzies[i];
-  var b=o("whizzy"+t).contentWindow.document.body;
-  if (o(t).style.display == 'block') b.innerHTML=o(t).value;
-  b.innerHTML=tidyH(b.innerHTML);
-  var r=(o(t).nodeName!="TEXTAREA") ? o('wzhid_'+o(t).id) : o(t);
-  r.value=(window.get_xhtml) ? get_xhtml(b) : b.innerHTML;
-  r.value=r.value.replace(location.href+'#','#'); //IE anchor bug
+  var d=o("whizzy"+t).contentWindow.document;
+  if (o(t).style.display == 'block') d.body.innerHTML=o(t).value;
+  var ret=(o(t).nodeName!="TEXTAREA") ? o('wzhid_'+o(t).id) : o(t);
+  ret.value=tidyH(d);
  }
 }
+function cleanUp(){ xC("removeformat",null); tidyH(oW.document);}
 function tidyD(h){ //FF designmode likes <B>,<I>...
- h=h.replace(/<(\/?)strong([^>]*)>/gi, "<$1B$2>");
- h=h.replace(/<(\/?)em([^>]*)>/gi, "<$1I$2>");
+ h=h.replace(/<(\/?)strong([^>]*)>/gi, "<$1B$2>");
+ h=h.replace(/<(\/?)em>/gi, "<$1I>");
  return h;
 }
-function tidyH(h){ //...but <B>,<I> deprecated
- h=h.replace(/<(\w+)[^>]*>\s*<\/\1>/gi, ""); //empty tag <([^>]+)>\s*<\/\1>
- h=h.replace(/(<\/?)[Bb]>/g, "$1strong>");
- h=h.replace(/(<\/?)[Ii]>/g, "$1em>");
- h=h.replace(/(<\/?)[Bb](\s+[^>]*)>/g, "$1strong$2>");
- h=h.replace(/(<\/?)[Ii](\s+[^>]*)>/g, "$1em$2>");
- h=h.replace(location.href+'#','#'); //IE anchor bug
- return h;
+function tidyH(d){ //attempt valid xhtml
+ function lc(str){return str.toLowerCase()}
+ function qa(str){return str.replace(/(\s+\w+=)([^"][^>\s]*)/gi,'$1"$2"');}
+ function sa(str){return str.replace(/("|;)\s*[A-Z-]+\s*:/g,lc);}
+ var sz=new Array('medium','xx-small','x-small','small','medium','large','x-large','xx-large');
+ fs=d.getElementsByTagName("FONT");
+ for (var i=0;i<fs.length;i++){
+  if (fs[i].face) {fs[i].style.fontFamily = fs[i].face; fs[i].removeAttribute('face');}
+  if (fs[i].size) {fs[i].style.fontSize = sz[fs[i].size]; fs[i].removeAttribute('size');}
+  if (fs[i].color) {fs[i].style.color = fs[i].color; fs[i].removeAttribute('color');}
+ }
+ ih=d.body.innerHTML;
+ ih=ih.replace(/(<\/?)FONT([^>]*)/gi,"$1span$2")
+ .replace(/(<\/?)[Bb](\s+[^>]*)?>/g, "$1strong$2>")
+ .replace(/(<\/?)[Ii](\s+[^>]*)?>/g, "$1em$2>")
+ .replace(/<\/?(COL|XML|ST1|SHAPE|V:|O:|F:|F |PATH|LOCK|IMAGEDATA|STROKE|FORMULAS)[^>]*>/gi, "")
+ .replace(/\bCLASS="?(MSOw*|Apple-style-span)"?/gi,"")
+ .replace(/<[^>]+=[^>]+>/g,qa) //quote all atts
+ .replace(/[–]/g,'-') //long –
+ .replace(/[‘’]/g, "'") //single smartquotes ‘’
+ .replace(/[“â€?]/g, '"') //double smartquotes “â€?
+ .replace(/<(TABLE|TD|TH|COL)(.*)(WIDTH|HEIGHT)=["'0-9A-Z]*/gi, "<$1$2") //no fixed size tables (%OK) [^A-Za-z>]
+ .replace(/<([^>]+)>\s*<\/\1>/gi, "") //empty tag
+ .replace(/>(<\/?[C-Z])/gi,">\n$1") //newline adjacent tags
+ .replace(/(<BR ?\/?>)([^\r\n])/gi,"$1\n$2") //newline on BR
+ .replace(/([^\n])<(P|DIV|TABLE|FORM)/gi,"$1\n\n<$2") //add white space
+ .replace(/\n<(LI|OPTION|TR|INPUT)/gi,"\n <$1") //indent..
+ .replace(/\n<(TD|TH)/gi,"\n  <$1") //..more
+ .replace(location.href+'#','#') //IE anchor bug
+ .replace(/<(IMG|INPUT|BR|HR|LINK|META)([^>]*)>/gi,"<$1$2 />")  //self-close tags
+ .replace(/(<\/?[A-Z]*)/g,lc) //lowercase tags...
+ .replace(/style="[^"]*"/gi,sa) //and style atts
+ return ih;
 }
 function kb_handler(e) { // keyboard controls for Moz
+ var cmd=false, prm=false;
  if (e && (e.ctrlKey && e.keyCode == e.DOM_VK_V)||(e.shiftKey && e.keyCode == e.DOM_VK_INSERT))
   {setTimeout('cleanUp()',10);}
- if (e && e.keyCode==13 && papa.nodeName=="BODY") makeSo("formatblock","<p>");
- if (e && e.ctrlKey) {
+ else if (e && e.keyCode==13 && !e.shiftKey &&papa.nodeName=="BODY") {cmd="formatblock";prm="<p>";}
+ else if (e && e.ctrlKey) {
   var k=String.fromCharCode(e.charCode).toLowerCase();
-  var cmd=(k=='b')?'bold':(k=='i')?'italic':(k=='u')?'underline':(k=='l')?'link':(k=='m')?'image':'';
-  if (cmd) {
-   makeSo(cmd, true);
-   e.preventDefault();  // stop the event bubble
-   e.stopPropagation();
-  }
+  var cmd=(k=='b')?'bold':(k=='i')?'italic':(k=='l')?'link':(k=='m')?'image':false;
+ }
+ if (cmd) {
+  makeSo(cmd, prm);
+  e.preventDefault();  // stop the event bubble
+  e.stopPropagation();
  }
 }
 function doTag(html) { // insert HTML into text area
@@ -409,11 +408,11 @@
  if (!html) html=prompt("Enter some HTML or text to insert:", "");
  o(idTa).focus();
  if (html == '<a>') {
-  url=prompt("Link address:","http://");
+  url=prompt("Link address:","http://");
   html='<a href="'+url+'">';
  }
  if (html == '<img>') {
-  url=prompt("Address of image:","http://");
+  url=prompt("Address of image:","http://");
   var alt=prompt("Description of image");
   html ='<img src="'+url+'" alt="'+alt+'">';
  }
@@ -430,46 +429,41 @@
    after=o(idTa).value.slice(o(idTa).selectionEnd);
    o(idTa).value =before+html+sel+close+after;
  }
- o(idTa).focus();
+ o(idTa).focus();
 }
 function insHTML(html) { //insert HTML at current selection
- if (!html) html=prompt("Enter some HTML or text to insert:", "");
+ if (!html) html=prompt(t("Enter some HTML or text to insert:"), "");
  if (html.indexOf('js:') == 0) {
-  try{eval(html.replace(/^js:/,''))} catch(e){};
-  return;
- }
- try {
-  if(sel.type && sel.type!="Text") sel="";
-  oW.document.execCommand("inserthtml", false, html + sel);
- }
- catch (e) {
-  if (document.selection) {
-   if(papa && papa.nodeName == 'IMG') {papa.outerHTML=html;}
-   else if(rng) {rng.select(); rng.pasteHTML(html+rng.htmlText);}
-  }
+  try{eval(html.replace(/^js:/,''))} catch(e){}; return;
  }
+ try {if (sel.type && sel.type!="Text") sel=""; xC("inserthtml",html+sel);}
+ catch (e) {if (document.selection) {
+  if (papa && papa.nodeName == 'IMG') {papa.outerHTML=html;}
+  else if(rng) {rng.select(); rng.pasteHTML(html+rng.htmlText);}
+ } }
  whereAmI();
 }
-function whereAmI(e){//070322
- if (!e) var e=window.event;
- if (window.getSelection){
-  sel=oW.getSelection();
-  papa=(e && e.type=='mouseup') ? e.target : (sel.anchorNode.nodeName == '#text') ? sel.anchorNode.parentNode : sel.anchorNode;
- } else {
+function whereAmI(e){
+ if (!e) var e=wn.event;
+ var mu=e&&e.type=='mouseup';
+ if (wn.getSelection){
+  sel=oW.getSelection(),sn=sel.anchorNode;
+  papa=mu?e.target:(sn.nodeName == '#text')?sn.parentNode:sn;
+ } else {
   sel=oW.document.selection;
   rng=sel.createRange();
-  papa=(e && e.type=='mouseup')? e.srcElement : (sel.type == "Control") ? rng.item(0) : rng.parentElement();
+  papa=mu?e.srcElement:(sel.type == "Control")?rng.item(0):rng.parentElement();
  }
- var paNode=papa;
- trail=papa.nodeName;
- while (!paNode.nodeName.match(/^(HTML|BODY)/) && paNode.className!="wzCtrl") {
-  paNode=paNode.parentNode;
-  trail=paNode.nodeName + '>' + trail;
- }
- if (paNode.className=="wzCtrl") trail=sel=rng=null;
- var id=paNode.nodeName=="HTML" ? paNode.getElementsByTagName("BODY")[0].id : paNode.id.replace("CONTROL","");
- c(id);
- window.status=id+":"+trail;
+ var pa=papa;
+ trail=papa.nodeName;
+ while (!pa.nodeName.match(/^(HTML|BODY)/) && pa.className!="wzCtrl") {
+  pa=pa.parentNode;
+  trail=pa.nodeName + '>' + trail;
+ }
+ if (pa.className=="wzCtrl") trail=sel=rng=null;
+ var id=pa.nodeName=="HTML" ? pa.getElementsByTagName("BODY")[0].id : pa.id.replace("CONTROL","");
+ c(id);
+ wn.status=id+":"+trail;
  if (trail.indexOf('TABLE') > 0) s('TABLE_CONTROLS'+idTa); else h('TABLE_CONTROLS'+idTa);
 }
 function c(id) {//set current whizzy
@@ -477,12 +471,12 @@
  if (id!=idTa){
   idTa=id;
   try {oW=o("whizzy"+id).contentWindow;} catch(e){alert('set current: '+id);}
-  if (oW) {oW.focus();window.status=oW.document.body.id; }
+  if (oW) {if(oW.focus)oW.focus();wn.status=oW.document.body.id; }
  }
-}
-function textSel() { if (sel  && sel.type != "None") return true;  else {alert(t("Select some text first")); return false;}}
+}
+function textSel() { if (sel  && sel != "" && sel.type != "None") return true;  else {alert(t("Select some text first")); return false;}}
 function s(id) {o(id).style.display='block';} //show element
 function h(id) {o(id).style.display='none';} //hide element
 function o(id) { return document.getElementById(id); } //get element by ID
 function w(str) { return document.write(str); } //document write
-function t(key) {return (window.language && language[key]) ? language[key] :  key;} //translation
\ No newline at end of file
+function t(key) {return (wn.language && language[key]) ? language[key] :  key;} //translation
\ No newline at end of file

Modified: ofbiz/branches/addbirt/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/images/webapp/images/selectall.js?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/branches/addbirt/framework/images/webapp/images/selectall.js Fri Dec 11 23:11:39 2009
@@ -383,16 +383,22 @@
   * @param expandTxt Localized 'Expand' text
   * @param collapseTxt Localized 'Collapse' text
 */
-function toggleScreenlet(link, areaId, expandTxt, collapseTxt){
+function toggleScreenlet(link, areaId, saveCollapsed, expandTxt, collapseTxt){
     toggleCollapsiblePanel(link, areaId, expandTxt, collapseTxt);
     var container = $(areaId);
     var screenlet = container.up('div');
     if(container.visible()){
         var currentParam = screenlet.id + "_collapsed=false";
         var newParam = screenlet.id + "_collapsed=true";
+        if(saveCollapsed=='true'){
+            setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet.id+"_collapsed",'true');
+        }
     } else {
         var currentParam = screenlet.id + "_collapsed=true";
         var newParam = screenlet.id + "_collapsed=false";
+        if(saveCollapsed=='true'){
+            setUserLayoutPreferences('GLOBAL_PREFERENCES',screenlet.id+"_collapsed",'false');
+        }
     }
     var paginationMenus = $$('div.nav-pager');
     paginationMenus.each(function(menu) {
@@ -496,3 +502,22 @@
     }
   }
 }
+
+//calls ajax request for storing user layout preferences
+function setUserLayoutPreferences(userPrefGroupTypeId, userPrefTypeId, userPrefValue){
+  new Ajax.Request('ajaxSetUserPreference',{
+    method: "post",
+    parameters: {userPrefGroupTypeId: userPrefGroupTypeId, userPrefTypeId: userPrefTypeId, userPrefValue: userPrefValue},
+    onLoading: function(transport){
+    },
+
+    onSuccess: function(transport){
+    },
+
+    onComplete: function(transport){
+    }
+ });
+}
+
+function toggleLeftColumn(){
+}

Modified: ofbiz/branches/addbirt/framework/minilang/documents/MiniLang.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/minilang/documents/MiniLang.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/minilang/documents/MiniLang.xml (original)
+++ ofbiz/branches/addbirt/framework/minilang/documents/MiniLang.xml Fri Dec 11 23:11:39 2009
@@ -23,6 +23,6 @@
  xmlns="http://docbook.org/ns/docbook">
  <title>The Entity Engine</title>
  <para>
-   A description of the Mini Language guide can be found at the <link xl:href="http://docs.ofbiz.org/display/OFBIZ/Mini-Language+Guide">OFBiz documentation site</link>
+   A description of the Mini Language guide can be found at the <link xl:href="http://cwiki.apache.org/confluence/display/OFBIZ/Mini-Language+Guide">OFBiz documentation site</link>
  </para>
 </section>

Modified: ofbiz/branches/addbirt/framework/service/documents/ServiceEngine.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/service/documents/ServiceEngine.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/service/documents/ServiceEngine.xml (original)
+++ ofbiz/branches/addbirt/framework/service/documents/ServiceEngine.xml Fri Dec 11 23:11:39 2009
@@ -23,6 +23,6 @@
  xmlns="http://docbook.org/ns/docbook">
  <title>The Service Engine</title>
     <para>
-       A description of the service engine can be found at the <link xl:href="http://docs.ofbiz.org/display/OFBTECH/Service+Engine+Guide">OFBiz documentation site</link>
+       A description of the service engine can be found at the <link xl:href="http://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide">OFBiz documentation site</link>
     </para>
 </section>

Modified: ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelParam.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelParam.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelParam.java (original)
+++ ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelParam.java Fri Dec 11 23:11:39 2009
@@ -236,6 +236,8 @@
             return "dateTime";
         } else if (ObjectType.instanceOf(com.ibm.icu.util.Calendar.class, this.type)) {
             return "dateTime";
+        } else if (ObjectType.instanceOf(java.sql.Date.class, this.type)) {
+            return "date";
         } else if (ObjectType.instanceOf(java.util.Date.class, this.type)) {
             return "dateTime";
         } else if (ObjectType.instanceOf(java.lang.Long.class, this.type)) {

Modified: ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelService.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelService.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelService.java (original)
+++ ofbiz/branches/addbirt/framework/service/src/org/ofbiz/service/ModelService.java Fri Dec 11 23:11:39 2009
@@ -1238,7 +1238,7 @@
 
         // SOAP binding
         SOAPBinding soapBinding = new SOAPBindingImpl();
-        soapBinding.setStyle("document");
+        soapBinding.setStyle("rpc");
         soapBinding.setTransportURI("http://schemas.xmlsoap.org/soap/http");
 
         Binding binding = def.createBinding();

Modified: ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Classpath.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Classpath.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Classpath.java (original)
+++ ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Classpath.java Fri Dec 11 23:11:39 2009
@@ -88,6 +88,9 @@
         }
      }
 
+    public void instrument(String instrumenterFile, String instrumenterClassName) {
+        _elements = InstrumenterWorker.instrument(_elements, instrumenterFile, instrumenterClassName);
+    }
 
     @Override
     public String toString() {
@@ -128,6 +131,12 @@
         if (parent == null) {
             parent = ClassLoader.getSystemClassLoader();
         }
+        return getClassLoader(parent);
+    }
+
+    public ClassLoader getClassLoader(ClassLoader parent) {
+        URL[] urls = getUrls();
+
         return new URLClassLoader(urls, parent);
     }
 

Modified: ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Start.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Start.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/Start.java Fri Dec 11 23:11:39 2009
@@ -56,7 +56,7 @@
 
     private static final String SHUTDOWN_COMMAND = "SHUTDOWN";
     private static final String STATUS_COMMAND = "STATUS";
-    private static final double REQUIRED_JDK = 1.5;
+    private static final double REQUIRED_JDK = 1.6;
 
     public void init(String[] args, boolean fullInit) throws IOException {
         String globalSystemPropsFileName = System.getProperty("ofbiz.system.props");
@@ -225,6 +225,7 @@
             classPath.addComponent(config.baseConfig);
         }
 
+        classPath.instrument(config.instrumenterFile, config.instrumenterClassName);
         // set the classpath/classloader
         System.setProperty("java.class.path", classPath.toString());
         this.classloader = classPath.getClassLoader();
@@ -447,6 +448,8 @@
         public String baseDtd;
         public String baseConfig;
         public String logDir;
+        public String instrumenterClassName;
+        public String instrumenterFile;
         public List<String> loaders;
         public String awtHeadless;
         public String splashLogo;
@@ -643,6 +646,9 @@
                 TimeZone.setDefault(TimeZone.getTimeZone(tzString));
             }
 
+            instrumenterClassName = getProp(props, "ofbiz.instrumenterClassName", null);
+            instrumenterFile = getProp(props, "ofbiz.instrumenterFile", null);
+
             // loader classes
             loaders = new ArrayList<String>();
             int currentPosition = 1;

Modified: ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/test.properties
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/test.properties?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/test.properties (original)
+++ ofbiz/branches/addbirt/framework/start/src/org/ofbiz/base/start/test.properties Fri Dec 11 23:11:39 2009
@@ -50,6 +50,9 @@
 # -- Auto-Shutdown after load
 ofbiz.auto.shutdown=true
 
+ofbiz.instrumenterClassName=org.ofbiz.base.config.CoberturaInstrumenter
+ofbiz.instrumenterFile=runtime/logs/cobertura.dat
+
 # --- Default Derby system home directory
 #derby.system.home=runtime/data/derby
 

Modified: ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.bat
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.bat?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.bat (original)
+++ ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.bat Fri Dec 11 23:11:39 2009
@@ -1,7 +1,8 @@
 set OFBIZ_HOME=../..
 set CP=./build/lib/ofbiz-testtools.jar
-set CP=%CP%;./lib/httpclient-4.0-beta1.jar
 set CP=%CP%;./lib/selenium-java-client-driver.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/build/lib/ofbiz-base.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/httpclient-4.0.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/jdom-1.1.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/scripting/jython-nooro.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/junit.jar
@@ -13,4 +14,10 @@
 rem For Example:
 rem convertSeleniumIDE.bat <recorded_script> <converted_script>
 
-"%JAVA_HOME%/bin/java.exe" -cp %CP% org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter %1 %2
+rem following commands needs MkTemp for Windows (http://gnuwin32.sourceforge.net/packages/mktemp.htm)
+rem and Sed for Windows (http://gnuwin32.sourceforge.net/packages/sed.htm) to work
+tempFile=`mktemp tempFileXXX.html`
+sed '2d' %1 > $tempFile
+rem BEware the following command is provided for convenience and remains untestet
+"%JAVA_HOME%/bin/java.exe" -cp %CP% org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter "%tempFile%" %2
+del "%tempFile%"
\ No newline at end of file

Modified: ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.sh
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.sh?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.sh (original)
+++ ofbiz/branches/addbirt/framework/testtools/convertSeleniumIDE.sh Fri Dec 11 23:11:39 2009
@@ -1,8 +1,9 @@
 #!/bin/sh
 export OFBIZ_HOME=../..
 export CP=./build/lib/ofbiz-testtools.jar
-export CP=$CP:./lib/httpclient-4.0-beta1.jar
 export CP=$CP:./lib/selenium-java-client-driver.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/build/lib/ofbiz-base.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/lib/httpclient-4.0.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/jdom-1.1.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/scripting/jython-nooro.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar
@@ -20,5 +21,9 @@
   JAVA=java
 fi
 
-"$JAVA" -cp $CP org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter "$@"
+tempFile=`mktemp tempFileXXX.html`
+sed '2d' $1 > $tempFile
+
+"$JAVA" -cp $CP org.ofbiz.testtools.seleniumxml.SeleniumIDEConverter "$tempFile" "$2"
+rm $tempFile
 exit 0

Modified: ofbiz/branches/addbirt/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml Fri Dec 11 23:11:39 2009
@@ -77,12 +77,15 @@
                 <para>The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed value="500" command). You can
                     remove this at the start of the test if you don't want the delay</para>
                 <para>- Here are some screen shots of what you should be seeing.</para>
-                <!--para>
-                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup1.jpeg" height="150" width="400"></graphic>
-                            </para>
-                            <para>
-                                <graphic fileref="/images/seleniums/ofbizSeleniumSetup2.jpeg" height="150" width="400"></graphic> <graphic fileref="/images/seleniums/ofbizSeleniumSetup3.jpeg" height="150" width="400"></graphic>/>
-                            </para-->
+                <para>
+                    <mediaobject>
+                        <imageobject>
+                            <imagedata fileref="/images/help/ofbizSeleniumSetup1.png" width="638" depth="478"/>
+                        </imageobject>
+                        <textobject><phrase>Selenium server in action</phrase></textobject>
+                        <caption>This is a screen capture when Selenium server is launched</caption>
+                    </mediaobject>
+                </para>
             </section>
             <section>
                 <title>4.2 run the Example test webtools/Run Selenium</title>

Modified: ofbiz/branches/addbirt/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml Fri Dec 11 23:11:39 2009
@@ -190,7 +190,7 @@
     </section>
     <section>
         <title>Note : Please follows the link</title>
-        <para><!--ulink> http://docs.ofbiz.org/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink--></para>
+        <para><!--ulink> http://cwiki.apache.org/confluence/display/OFBIZ/Ant+Script+to+build+new+ofbiz+self+cert  </ulink--></para>
         <para> if your found the problem “ofbiz.org cert is expired causes peer not authenticated“. </para>
     </section>
 </section>

Modified: ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.bat
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.bat?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.bat (original)
+++ ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.bat Fri Dec 11 23:11:39 2009
@@ -1,8 +1,8 @@
 rem set JAVA_HOME=%JDK_15%
 set OFBIZ_HOME=../..
 set CP=./build/lib/ofbiz-testtools.jar
-set CP=%CP%;./lib/httpclient-4.0-beta1.jar
 set CP=%CP%;./lib/selenium-java-client-driver.jar
+set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/httpclient-4.0.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/jdom-1.1.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/scripting/jython-nooro.jar
 set CP=%CP%;%OFBIZ_HOME%/framework/base/lib/junit.jar

Modified: ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.sh
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.sh?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.sh (original)
+++ ofbiz/branches/addbirt/framework/testtools/runSeleniumXml.sh Fri Dec 11 23:11:39 2009
@@ -1,9 +1,9 @@
 #!/bin/sh
-# export JAVA_HOME=$JDK_15
+
 export OFBIZ_HOME=../..
 export CP=./build/lib/ofbiz-testtools.jar
-export CP=$CP:./lib/httpclient-4.0-beta1.jar
 export CP=$CP:./lib/selenium-java-client-driver.jar
+export CP=$CP:$OFBIZ_HOME/framework/base/lib/httpclient-4.0.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/jdom-1.1.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/scripting/jython-nooro.jar
 export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar

Modified: ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumIDEConverter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumIDEConverter.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumIDEConverter.java (original)
+++ ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumIDEConverter.java Fri Dec 11 23:11:39 2009
@@ -42,139 +42,36 @@
 
     private Document ideFile;
     private Element xmlDestRoot;
-
-    private    Namespace ns = Namespace.getNamespace("http://www.w3.org/1999/xhtml");
+    private Namespace ns = Namespace.getNamespace("http://www.w3.org/1999/xhtml");
     private Map root;
-    
+
     public void convert(String ideFile, String xmlFile) throws JDOMException, IOException, SAXException, ParserConfigurationException {
-    
         readInputFile(ideFile);
-    
         convertIDECommands();
-        
         createSeleniumXml(xmlFile);
     }
 
-
     private void readInputFile(String input) throws JDOMException, IOException, SAXException, ParserConfigurationException {
-        
         File xmlFile = new File(input);
         SAXBuilder builder = new SAXBuilder();
-        this.ideFile = builder.build(xmlFile);    
-        
-        //this.root = new HashMap();
-        //this.root.put("doc", freemarker.ext.dom.NodeModel.parse(xmlFile));
-    }
-
-    
-/*    private void convertIDECommands() throws JDOMException {
-        
-        //XPath path = XPath.newInstance("html/body/table/tbody");
-        Element root = this.ideFile.getRootElement();
-
-        this.xmlDestRoot = new Element("testcase");
-    
-        //TODO: there must be a better way to do this with JDom
-        Element e1 = root.getChild("body",ns);
-        Element e2 = e1.getChild("table",ns);
-        Element e3 = e2.getChild("tbody",ns);
-        List<Element> list = e3.getChildren("tr", ns);
-        List<Element> commands = root.getChild("body",ns).getChild("table",ns).getChild("tbody",ns).getChildren("tr", ns);
-        for(Element elem: commands) {
-            processIDECommand(elem);
-        }
-
-    }
-*/    
-/*    private void processIDECommand(Element elem) throws JDOMException {
-
-        
-        List<Element> cmd = elem.getChildren("td", ns);
-        Element cmdElem = cmd.get(0);
-    
-        String cmdToCompare = cmdElem.getValue();
-        System.out.println("Checking for cmd: " + cmdToCompare);
-        if("clickAndWait".compareTo(cmdElem.getValue()) == 0 ) {
-            System.out.println("Found clickAndWait");
-            this.xmlDestRoot.addContent( buildCommand("click", "locator", cmd.get(1).getValue(), null, null) );
-            this.xmlDestRoot.addContent( buildCommand("waitForPageToLoad", "value", "10000", null, null) );
-            
-        } else if("type".compareTo( cmdElem.getValue()) == 0  ) {
-            System.out.println("Found type");
-            this.xmlDestRoot.addContent ( buildCommand("type", "name", cmd.get(1).getValue(), "value", cmd.get(2).getValue()) );
-            
-        } else if("select".compareTo(cmdElem.getValue()) == 0 ) {
-            System.out.println("Found select");
-            this.xmlDestRoot.addContent( buildCommand("select", "locator", cmd.get(1).getValue(), "option", cmd.get(2).getValue()) );
-            
-        } else if("open".compareTo(cmdElem.getValue()) == 0 ) {
-            System.out.println("Found open");
-            this.xmlDestRoot.addContent( buildCommand("open", "value", cmd.get(1).getValue(), null, null) );
-            
-        } else if("click".compareTo(cmdElem.getValue()) == 0 ) {
-            Element newCmd = new Element("click");
-            newCmd.setAttribute("locator", cmd.get(1).getValue());
-            this.xmlDestRoot.addContent(newCmd);
-            
-        } else if("doubleClick".compareTo(cmdElem.getValue()) == 0 ) {
-            Element newCmd = new Element("doubleClick");
-            newCmd.setAttribute("locator", cmd.get(1).getValue());
-            this.xmlDestRoot.addContent(newCmd);
-            
-        } else {
-            System.out.println("WARNING: No definition for " + cmdElem.getValue());
-        }
-        
+        this.ideFile = builder.build(xmlFile);
     }
-*/    
 
     private void createSeleniumXml(String outputFile) {
-        
         try {
-              FileOutputStream out = new FileOutputStream(outputFile);
-              XMLOutputter serializer = new XMLOutputter( Format.getPrettyFormat());
-              serializer.output(this.xmlDestRoot, out);
-              out.flush();
-              out.close();
+            FileOutputStream out = new FileOutputStream(outputFile);
+            XMLOutputter serializer = new XMLOutputter( Format.getPrettyFormat());
+            serializer.output(this.xmlDestRoot, out);
+            out.flush();
+            out.close();
         } catch (IOException e) {
-              System.err.println(e);
-        }
-    }
-    /**
-     * @param args
-     */
-/*    public static void main(String[] args) {
-        // TODO Auto-generated method stub
-        if(args.length != 2) {
-            System.out.println("Please include the source and destination file paths.");
-        } else {
-            SeleniumIDEConverter sel = new SeleniumIDEConverter();
-            try {
-                sel.convert(args[0], args[1]);
-                
-            } catch (Exception e) {
-                // TODO Auto-generated catch block
-                e.printStackTrace();
-            }
+            System.err.println(e);
         }
     }
 
-        File xmlFile = new File(input);
-        SAXBuilder builder = new SAXBuilder();
-        this.ideFile = builder.build(xmlFile);
-
-        //this.root = new HashMap();
-        //this.root.put("doc", freemarker.ext.dom.NodeModel.parse(xmlFile));
-    }
-*/
-
     private void convertIDECommands() throws JDOMException {
-
-        //XPath path = XPath.newInstance("html/body/table/tbody");
         Element root = this.ideFile.getRootElement();
-
         this.xmlDestRoot = new Element("testcase");
-
         //TODO: there must be a better way to do this with JDom
         Element e1 = root.getChild("body",ns);
         Element e2 = e1.getChild("table",ns);
@@ -184,48 +81,57 @@
         for(Element elem: commands) {
             processIDECommand(elem);
         }
-
     }
 
     private void processIDECommand(Element elem) throws JDOMException {
-
-
         List<Element> cmd = UtilGenerics.cast(elem.getChildren("td", ns));
         Element cmdElem = cmd.get(0);
-
         String cmdToCompare = cmdElem.getValue();
         System.out.println("Checking for cmd: " + cmdToCompare);
+
         if ("clickAndWait".compareTo(cmdElem.getValue()) == 0) {
             System.out.println("Found clickAndWait");
             this.xmlDestRoot.addContent(buildCommand("click", "locator", cmd.get(1).getValue(), null, null));
             this.xmlDestRoot.addContent(buildCommand("waitForPageToLoad", "value", "10000", null, null));
-
         } else if ("type".compareTo(cmdElem.getValue()) == 0 ) {
             System.out.println("Found type");
             this.xmlDestRoot.addContent (buildCommand("type", "name", cmd.get(1).getValue(), "value", cmd.get(2).getValue()));
-
         } else if ("select".compareTo(cmdElem.getValue()) == 0) {
             System.out.println("Found select");
             this.xmlDestRoot.addContent(buildCommand("select", "locator", cmd.get(1).getValue(), "option", cmd.get(2).getValue()));
-
         } else if ("open".compareTo(cmdElem.getValue()) == 0) {
             System.out.println("Found open");
             this.xmlDestRoot.addContent(buildCommand("open", "value", cmd.get(1).getValue(), null, null));
-
         } else if ("click".compareTo(cmdElem.getValue()) == 0) {
             Element newCmd = new Element("click");
             newCmd.setAttribute("locator", cmd.get(1).getValue());
             this.xmlDestRoot.addContent(newCmd);
-
         } else if ("doubleClick".compareTo(cmdElem.getValue()) == 0) {
             Element newCmd = new Element("doubleClick");
             newCmd.setAttribute("locator", cmd.get(1).getValue());
             this.xmlDestRoot.addContent(newCmd);
-
+        } else if ("echo".compareTo(cmdElem.getValue()) == 0) {
+             System.out.println("Found echo");
+             Element newCmd = new Element("print");
+             newCmd.setAttribute("value", cmd.get(1).getValue());
+             this.xmlDestRoot.addContent(newCmd);
+        } else if ("verifyTextPresent".compareTo(cmdElem.getValue()) == 0) {
+            System.out.println("Found verifyTextPresent");
+            this.xmlDestRoot.addContent(buildCommand("getBodyText", "out", "bodySource", null, null));
+            this.xmlDestRoot.addContent(buildCommand("assertContains", "test", cmd.get(1).getValue(), "src", "${bodySource}"));
+        } else if ("verifyTextNotPresent".compareTo(cmdElem.getValue()) == 0) {
+            System.out.println("Found verifyTextNotPresent");
+            this.xmlDestRoot.addContent(buildCommand("getBodyText", "out", "bodySource", null, null));
+            this.xmlDestRoot.addContent(buildCommand("assertNotContains", "test", cmd.get(1).getValue(), "src", "${bodySource}"));
+        } else if ("assertTitle".compareTo(cmdElem.getValue()) == 0) {
+            System.out.println("Found assertTitle");
+            this.xmlDestRoot.addContent(buildCommand("assertTitle", "value", cmd.get(1).getValue(), null, null));
+        } else if ("assertConfirmation".compareTo(cmdElem.getValue()) == 0) {
+            System.out.println("Found assertConfirmation");
+            this.xmlDestRoot.addContent(buildCommand("assertConfirmation", "value", cmd.get(1).getValue(), null, null));
         } else {
             System.out.println("WARNING: No definition for " + cmdElem.getValue() + " defaulting to us 'reflection'.");
             Element newCmd = new Element(cmdElem.getValue());
-            //List attributes = cmdElem.getAttributes();
             int size = cmd.size()-1;
             for(int i=1; i<size; i++) {
                 String paramValue = cmd.get(i).getValue();
@@ -234,11 +140,9 @@
             }
             this.xmlDestRoot.addContent(newCmd);
         }
-
     }
 
     private Element buildCommand(String name, String attrib1, String value1, String attrib2, String value2) {
-
         Element newCmd = new Element(name);
         if (attrib1 != null) {
             newCmd.setAttribute(attrib1, value1);
@@ -253,18 +157,15 @@
      * @param args
      */
     public static void main(String[] args) {
-        // TODO Auto-generated method stub
         if (args.length != 2) {
             System.out.println("Please include the source and destination file paths.");
         } else {
             SeleniumIDEConverter sel = new SeleniumIDEConverter();
             try {
                 sel.convert(args[0], args[1]);
-
             } catch (Exception e) {
-                // TODO Auto-generated catch block
                 e.printStackTrace();
             }
         }
     }
-}
\ No newline at end of file
+}