diff --git a/workflow/engine/methods/outputdocs/outputdocs_Edit.php b/workflow/engine/methods/outputdocs/outputdocs_Edit.php index d4d405373..9fbf55fb1 100755 --- a/workflow/engine/methods/outputdocs/outputdocs_Edit.php +++ b/workflow/engine/methods/outputdocs/outputdocs_Edit.php @@ -61,13 +61,30 @@ try { switch ($type) { case 'HTML': - //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aFields , '../outputdocs/outputdocs_Save'); - $oHeadPublisher = & headPublisher::getSingleton(); - $oHeadPublisher->assign( 'OUT_DOC_UID', $_GET['OUT_DOC_UID'] ); - $translations = G::getTranslations( Array ('ID_FILE','ID_OUT_PUT_DOC_UPLOAD_TITLE','ID_UPLOADING_FILE','ID_UPLOAD','ID_CANCEL','ID_SAVE','ID_LOAD_FROM_FILE','ID_SELECT_TEMPLATE_FILE','ID_ALERT_MESSAGE','ID_INVALID_FILE') ); - // $oHeadPublisher->assign('TRANSLATIONS', $translations); - $oHeadPublisher->addExtJsScript( 'outputdocs/htmlEditor', false ); //adding a javascript file .js - G::RenderPage( 'publish', 'extJs' ); + global $G_PUBLISH; + $G_PUBLISH = new Publisher(); + $fcontent = ''; + $proUid = ''; + $filename = ''; + $title = ''; + require_once 'classes/model/OutputDocument.php'; + $oOutputDocument = new OutputDocument(); + if (isset( $_REQUEST['OUT_DOC_UID'] )) { + $aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] ); + $fcontent = $aFields['OUT_DOC_TEMPLATE']; + $proUid = $aFields['PRO_UID']; + $filename = $aFields['OUT_DOC_FILENAME']; + $title = $aFields['OUT_DOC_TITLE']; + } + $aData = Array ( + 'PRO_UID' => $proUid, + 'OUT_DOC_TEMPLATE' => $fcontent, + 'FILENAME' => $filename, + 'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'], + 'OUT_DOC_TITLE'=> $title, + ); + $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData ); + G::RenderPage( 'publish', 'blank' ); die(); break; case 'JRXML': diff --git a/workflow/engine/xmlform/outputdocs/outputdocs_Edit.xml b/workflow/engine/xmlform/outputdocs/outputdocs_Edit.xml index 38e7bfc69..208a4b172 100755 --- a/workflow/engine/xmlform/outputdocs/outputdocs_Edit.xml +++ b/workflow/engine/xmlform/outputdocs/outputdocs_Edit.xml @@ -20,7 +20,19 @@ function cancel(){ tinyMCE.execCommand('mceRemoveControl',false,'form[OUT_DOC_TEMPLATE]'); - outputdocsEditor.remove(); + if (( _BROWSER.name == 'msie' ) && ( _BROWSER.version < '9' )) { + window.close(); + } else { + outputdocsEditor.remove(); + } + } + if (( _BROWSER.name == 'msie' ) && ( _BROWSER.version < '9' )) { + function outputdocsSave( form ) { + tinyMCE.execCommand('mceRemoveControl',false,'form[OUT_DOC_TEMPLATE]'); + form.action = '../outputdocs/outputdocs_Save'; + ajax_post( form.action, form, 'POST' ); + window.close(); + } } ]]> diff --git a/workflow/engine/xmlform/outputdocs/outputdocs_Options.xml b/workflow/engine/xmlform/outputdocs/outputdocs_Options.xml index afd7f8b42..93088e9a1 100755 --- a/workflow/engine/xmlform/outputdocs/outputdocs_Options.xml +++ b/workflow/engine/xmlform/outputdocs/outputdocs_Options.xml @@ -25,7 +25,7 @@ var outputdocsEditor; var left = (screen.width/2)-(w/2); var top = (screen.height/2);//-(h/2); - var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); + var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left); } ////////////////////////////////////////////////////