From 69abc612b45c080bf67293ce0555669c6a1520d2 Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Wed, 10 Jun 2015 11:18:22 -0400 Subject: [PATCH 1/5] BUG-17427 HTML Editor available for multiple Textarea controls in Dynaforms --- gulliver/js/dveditor/core/dveditor.js | 251 +++++++++++++------------- 1 file changed, 129 insertions(+), 122 deletions(-) diff --git a/gulliver/js/dveditor/core/dveditor.js b/gulliver/js/dveditor/core/dveditor.js index 20a2770ab..03aeebace 100755 --- a/gulliver/js/dveditor/core/dveditor.js +++ b/gulliver/js/dveditor/core/dveditor.js @@ -1,129 +1,136 @@ -function DVEditor(where,body,oHiddenInput,height,mode) +function DVEditor(where,body,oHiddenInput,height,mode,editorId) { - var me=this; - var hiddenInput=oHiddenInput; - var iframe=$dce("iframe"); - //NOTE: className no funciona en FIREFOX - iframe.style.width="100%"; - iframe.style.height=height; - iframe.style.margin="0px"; - iframe.style.padding="0px"; - iframe.style.border="none"; - where.appendChild(iframe); - var head=document.childNodes[0].childNodes[0]; - var header=''; - if (iframe.contentWindow) - { - var doc=iframe.contentWindow.document; - } - else - { - var doc=iframe.contentDocument; - } - var _header=$dce("head");// head.cloneNode(true); - for(var i=0;i'+header+''+body+''); + doc.close(); + doc.designMode="on"; + if (mode=="edit") { + doc.contentEditable=true; + } else { + doc.contentEditable=false; + } + this.doc=doc; + + me.insertHTML = function (html) { - } - } - header=_header.innerHTML; - //alert(header); - doc.open(); - doc.write(''+header+''+body+''); - doc.close(); - doc.designMode="on"; - if(mode=="edit"){ - doc.contentEditable=true; - }else{ - doc.contentEditable=false; - } - this.doc=doc; - me.insertHTML=function (html) - { - var cmd = 'inserthtml'; - var bool = false; - var value = html; - try + var cmd = 'inserthtml'; + var bool = false; + var value = html; + try { + doc.execCommand(cmd,bool,value); + } catch (e) { + } + return false; + }; + + me.command = function() { - doc.execCommand(cmd,bool,value); - } catch (e) { - } - return false; - }; - me.command=function() - { - var cmd = this.getAttribute('name'); - var bool = false; - var value = this.getAttribute('cmdValue') || null; - if (value == 'promptUser') - value = prompt( - (typeof(G_STRINGS[this.getAttribute('promptText')])!=='undefined')? - G_STRINGS[this.getAttribute('promptText')]: - this.getAttribute('promptText') - ); - try + var cmd = this.getAttribute('name'); + var bool = false; + var value = this.getAttribute('cmdValue') || null; + if (value == 'promptUser') { + value = prompt( + (typeof(G_STRINGS[this.getAttribute('promptText')])!=='undefined')? + G_STRINGS[this.getAttribute('promptText')]: + this.getAttribute('promptText') + ); + } + try { + if (editorId) { + if (window.ActiveXObject && cmd == 'hilitecolor') { + doc.selection.createRange().pasteHTML('' +doc.selection.createRange().text +''); + } else { + eval("window._editor" +editorId+".doc.execCommand(cmd,bool,value);"); + } + } else { + doc.execCommand(cmd,bool,value); + } + } catch (e) { + } + return false; + }; + + me.loadToolBar = function(uri) { - doc.execCommand(cmd,bool,value); - } catch (e) { - } - return false; - } - me.loadToolBar=function(uri) - { - var tb=WebResource(uri); - iframe.parentNode.insertBefore(tb,iframe); - me.setToolBar(tb); - } - me.setToolBar=function(toolbar) - { - var buttons=toolbar.getElementsByTagName('area'); - for(var b=0;b Date: Wed, 10 Jun 2015 15:56:06 +0000 Subject: [PATCH 2/5] BUG-17411 Output document generados con smarty para codigo en template --- .../engine/classes/model/OutputDocument.php | 74 ++++++++++++------- 1 file changed, 46 insertions(+), 28 deletions(-) diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index 47d48d602..0e53cf3dc 100755 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -178,12 +178,12 @@ class OutputDocument extends BaseOutputDocument if(!empty($aData['OUT_DOC_DESCRIPTION'])){ $description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION']; } - if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ - $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; - } - if(!empty($aData['OUT_DOC_GENERATE'])){ - $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; - } + if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; + } + if(!empty($aData['OUT_DOC_GENERATE'])){ + $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + } if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ $pdfSecurity = 'Disabled'; }else{ @@ -199,14 +199,14 @@ class OutputDocument extends BaseOutputDocument if(!empty($aData['OUT_DOC_TAGS'])){ $description .= ", Tags: ".$aData['OUT_DOC_TAGS']; } - if(!empty($aData['OUT_DOC_OPEN_TYPE'])){ - if($aData['OUT_DOC_OPEN_TYPE']==0){ - $genLink = 'Open the file'; - }else{ - $genLink = 'Download the file'; - } - $description .= ", By clicking on the generated file link: ".$genLink; - } + if(!empty($aData['OUT_DOC_OPEN_TYPE'])){ + if($aData['OUT_DOC_OPEN_TYPE']==0){ + $genLink = 'Open the file'; + }else{ + $genLink = 'Download the file'; + } + $description .= ", By clicking on the generated file link: ".$genLink; + } G::auditLog("CreateOutputDocument", $description); return $aData['OUT_DOC_UID']; @@ -268,12 +268,12 @@ class OutputDocument extends BaseOutputDocument if(!empty($aData['OUT_DOC_DESCRIPTION'])){ $description .= ", Description: ".$aData['OUT_DOC_DESCRIPTION']; } - if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ - $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; - } - if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ - $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; - } + if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Report Generator: ". $aData['OUT_DOC_REPORT_GENERATOR']; + } + if(!empty($aData['OUT_DOC_REPORT_GENERATOR'])){ + $description .= ", Output Document to Generate: ".$aData['OUT_DOC_GENERATE']; + } if($aData['OUT_DOC_PDF_SECURITY_ENABLED']==0){ $pdfSecurity = 'Disabled'; }else{ @@ -289,14 +289,14 @@ class OutputDocument extends BaseOutputDocument if(!empty($aData['OUT_DOC_TAGS'])){ $description .= ", Tags: ".$aData['OUT_DOC_TAGS']; } - if(!empty($aData['OUT_DOC_OPEN_TYPE'])){ - if($aData['OUT_DOC_OPEN_TYPE']==0){ - $genLink = 'Open the file'; - }else{ - $genLink = 'Download the file'; - } - $description .= ", By clicking on the generated file link: ".$genLink; - } + if(!empty($aData['OUT_DOC_OPEN_TYPE'])){ + if($aData['OUT_DOC_OPEN_TYPE']==0){ + $genLink = 'Open the file'; + }else{ + $genLink = 'Download the file'; + } + $description .= ", By clicking on the generated file link: ".$genLink; + } if (isset($aData['OUT_DOC_TEMPLATE'])) { $description .= ", [EDIT TEMPLATE]"; } @@ -556,6 +556,24 @@ class OutputDocument extends BaseOutputDocument if (($sUID != '') && is_array($aFields) && ($sPath != '')) { $sContent = G::replaceDataGridField($sContent, $aFields); + if (strpos($sContent, ''; + $oFile = fopen($sPath . $sFilename . '_smarty.html', 'wb'); + fwrite($oFile, $sContent); + fclose($oFile); + $template->templateFile = $sPath . $sFilename . '_smarty.html'; + //assign the variables and use the template $template + $template->assign($aFields); + $sContent = $template->fetch($template->templateFile); + unlink($template->templateFile); + } + G::verifyPath($sPath, true); //Start - Create .doc From ab832b65f7f288c24fd2dd8335533107e24fd649 Mon Sep 17 00:00:00 2001 From: Brayan Pereyra Date: Wed, 10 Jun 2015 16:48:12 -0400 Subject: [PATCH 3/5] BUG-17552 Dependatnt checkgroups into grids --- gulliver/system/class.xmlform.php | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 5f2c36a66..954d6315d 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -4028,6 +4028,42 @@ class XmlForm_Field_CheckGroup extends XmlForm_Field } } + + /** + * Renderring the checkgroup inner grid for Staff Eval Plugin + * @see class.form.php#validateArray(); + * @author Edauto + * @since 2012-07-20 + */ + public function renderGrid($values = NULL, $owner = NULL) { + $this->executeSQL ( $owner ); + $disable = ($owner->mode === 'view') ? 'disabled="disabled" ' : ' '; + $r = 1; + $result = array(); + foreach ( $values as $v ) { // foreach the grid row with selection + $i=1; + $html = ''; + if (! is_array ( $v )) { + $aV = explode ( '|', str_replace(" ","",$v)); + } else { + $aV = $v; + } + foreach ( $this->options as $optionName => $option ) { // foreach the options of checkbox group + $bChecked = in_array ( $i , $aV, true ) || in_array($optionName, $aV, true); + $html .= 'name . ']['. $r .']['. $this->name .'][]" '; + $html .= 'type="checkbox" value="' . $optionName . '" ' . ($bChecked ? 'checked ' : ' ') ; + $html .= $disable . '>' . $option . ''; + if(++$i==count($this->options)){ + $html .= ' ' . $this->renderHint(); + } + $html .= '
'; + } + $result[] = $html; + $r++; + } + return $result; + } } /* TODO: DEPRECATED */ From 673ce17e3f0d90f97712146cb011bf19710f7a10 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Fri, 19 Jun 2015 15:07:50 -0400 Subject: [PATCH 4/5] PM-2876 0017471 Change text from "ProcessMaker Dev Tools/User Applications" to "User Applications" SOLVED --- workflow/engine/templates/oauth2/clientSetup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/templates/oauth2/clientSetup.js b/workflow/engine/templates/oauth2/clientSetup.js index e0f051809..639f3d218 100644 --- a/workflow/engine/templates/oauth2/clientSetup.js +++ b/workflow/engine/templates/oauth2/clientSetup.js @@ -645,7 +645,7 @@ clientSetup.application = { //style: "margin: 0 auto 0 auto;", //width: 550, //height: 450, - title: "
" + "ProcessMaker Dev Tools / User Applications" + "
", + title: "
" + "User Applications" + "
", border: false, listeners: { From 2a20e92d569bdab8c7747668294486947787053d Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Fri, 19 Jun 2015 15:31:29 -0400 Subject: [PATCH 5/5] =?UTF-8?q?PM-2914=20La=20funci=C3=B3n=20RouteCase=20n?= =?UTF-8?q?o=20puede=20probarse=20desde=20ADMIN/WEB=20SERVICES=20TEST=20SO?= =?UTF-8?q?LVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/menus/setup.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/workflow/engine/menus/setup.php b/workflow/engine/menus/setup.php index bd3dc2998..82f195f66 100755 --- a/workflow/engine/menus/setup.php +++ b/workflow/engine/menus/setup.php @@ -66,10 +66,6 @@ if ($RBAC->userCanAccess('PM_SETUP') == 1) { //$G_TMP_MENU->AddIdRawOption('REPORT_TABLES', '../reportTables/main', 'Report Tables', 'icon-tables.png','', 'settings'); $G_TMP_MENU->AddIdRawOption('PM_TABLES', '../pmTables', G::LoadTranslation('ID_ADDITIONAL_TABLES'), 'icon-tables.png','', 'settings'); - - if (!$partnerFlag) { - $G_TMP_MENU->AddIdRawOption('WEBSERVICES', 'webServices', G::LoadTranslation('ID_WEB_SERVICES'), 'icon-webservices.png', '', 'settings'); - } $G_TMP_MENU->AddIdRawOption('LOGIN', 'loginSettings', G::LoadTranslation('LOGIN'), "",'', 'settings'); $G_TMP_MENU->AddIdRawOption('DASHBOARD', '../dashboard/dashletsList', ucfirst(G::LoadTranslation('ID_DASHBOARD')), '', '', 'settings'); /*----------------------------------********---------------------------------*/