PM 816 "Mostrar al usuario que ejecuta..." SOLVED
Code Issue: Mostrar al usuario que ejecuta un caso el tipo de archivo a ser subido en un Input Document Cause: Al crear un nuevo Input Document se configura campo "Allowed file extensions" donde se determina el tipo de extension es permitodo y al hacer correr el caso al subir un Input Document no se muestra que tipo de extension se configuro. Solution: Cuando se ejecuta el caso al hacer click en "Attach", se mostrara un mensaje que determinar el tipo de extension de archivos permitidos.
This commit is contained in:
@@ -803,7 +803,7 @@ else{cases_AllOutputdocsList.refresh();}}.extend(this);oRPC.make();}.extend(this
|
||||
parent.parent.propStore.load();parent.parent.triggerStore.load();}}}
|
||||
var uploadInputDocument=function(docID,appDocId,docVersion,actionType){if(actionType){if(actionType=="R"){windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;}
|
||||
if(actionType=="NV"){windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT_VERSION;}}else{windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT;docVersion=1;actionType="";appDocId="";}
|
||||
oPanel=new leimnud.module.panel();oPanel.options={size:{w:550,h:300},position:{x:0,y:0,center:true},title:windowTitle,theme:"processmaker",statusBar:false,control:{resize:true,roll:false},fx:{modal:true,opacity:true,blinkToFront:true,fadeIn:false}};oPanel.events={remove:function(){delete(oPanel);}.extend(this)};oPanel.make();oPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:"action=uploadInputDocument&docID="+docID+"&appDocId="+appDocId+"&docVersion="+docVersion+"&actionType="+actionType});oRPC.callback=function(rpc){oPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();oPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();};var uploadToReviseInputDocument=function(docID,appDocId,docVersion,actionType){if(actionType){if(actionType=="R"){windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;}
|
||||
oPanel=new leimnud.module.panel();oPanel.options={size:{w:550,h:355},position:{x:0,y:0,center:true},title:windowTitle,theme:"processmaker",statusBar:false,control:{resize:true,roll:false},fx:{modal:true,opacity:true,blinkToFront:true,fadeIn:false}};oPanel.events={remove:function(){delete(oPanel);}.extend(this)};oPanel.make();oPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:"action=uploadInputDocument&docID="+docID+"&appDocId="+appDocId+"&docVersion="+docVersion+"&actionType="+actionType});oRPC.callback=function(rpc){oPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();oPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();};var uploadToReviseInputDocument=function(docID,appDocId,docVersion,actionType){if(actionType){if(actionType=="R"){windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;}
|
||||
if(actionType=="NV"){windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT_VERSION;}}else{windowTitle=G_STRINGS.ID_UPLOAD_NEW_INPUT;docVersion=1;actionType="";}
|
||||
oPanel=new leimnud.module.panel();oPanel.options={size:{w:550,h:300},position:{x:0,y:0,center:true},title:windowTitle,theme:"processmaker",statusBar:false,control:{resize:true,roll:false},fx:{modal:true,opacity:true,blinkToFront:true,fadeIn:false}};oPanel.events={remove:function(){delete(oPanel);}.extend(this)};oPanel.make();oPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:"action=uploadToReviseInputDocument&docID="+docID+"&appDocId="+appDocId+"&docVersion="+docVersion+"&actionType="+actionType});oRPC.callback=function(rpc){oPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();oPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();};var inputDocumentVersionHistory=function(docID,appDocId){oPanel=new leimnud.module.panel();oPanel.options={size:{w:550,h:400},position:{x:0,y:0,center:true},title:G_STRINGS.ID_INPUT_DOCUMENT_HISTORY,theme:"processmaker",statusBar:false,control:{resize:true,roll:false},fx:{modal:true,opacity:true,blinkToFront:true,fadeIn:false}};oPanel.events={remove:function(){delete(oPanel);}.extend(this)};oPanel.make();oPanel.loader.show();var oRPC=new leimnud.module.rpc.xmlhttp({url:'cases_Ajax',args:"action=inputDocumentVersionHistory&docID="+docID+"&appDocId="+appDocId});oRPC.callback=function(rpc){oPanel.loader.hide();var scs=rpc.xmlhttp.responseText.extractScript();oPanel.addContent(rpc.xmlhttp.responseText);scs.evalScript();}.extend(this);oRPC.make();};
|
||||
var PROCESSMAP_STEP_EDIT=false;var PROCESSMAP_USER_EDIT=false;var processmapOutputsPanel;var _client=getClientWindowSize();var processmap=function(){this.data={load:function()
|
||||
|
||||
@@ -5552,6 +5552,13 @@ class G
|
||||
$clean = ($lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean;
|
||||
return $clean;
|
||||
}
|
||||
|
||||
public static function getInputDocSupportedExtension()
|
||||
{
|
||||
$arraySupportedExtension = array("Doc", "docx", "xls", "xlsx", "ppt", "pptx", "pdf", "exe", "jpg", "jpeg", "gif", "png", "mp3", "mp4", "wmv", "rar", "txt", "pm", "htm", "html", "po", "zip");
|
||||
|
||||
return $arraySupportedExtension;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5647,4 +5654,3 @@ function __ ($msgID, $lang = SYS_LANG, $data = null)
|
||||
{
|
||||
return G::LoadTranslation( $msgID, $lang, $data );
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ function dynaformHistory(PRO_UID,APP_UID,TAS_UID, DYN_UID)
|
||||
scs.evalScript();
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
}
|
||||
}
|
||||
function toggleTable(tablename){
|
||||
table=getElementByName(tablename);
|
||||
if(table.style.display == ''){
|
||||
@@ -377,11 +377,11 @@ var pauseCase = function() {
|
||||
var oPauseDiv = document.getElementById('pausediv');
|
||||
document.getElementById('spause').style.display = 'none';
|
||||
document.getElementById('scpause').style.display = 'block';
|
||||
|
||||
|
||||
oPauseDiv.style.display = 'block';
|
||||
|
||||
/*pausecasePanel = new leimnud.module.panel();
|
||||
|
||||
|
||||
pausecasePanel.options = {
|
||||
size :{w:400,h:150},
|
||||
position:{x:0,y:0,center:true},
|
||||
@@ -721,7 +721,7 @@ var showDynaforms = function() {
|
||||
remove: function() {delete(oPanel2);}.extend(this)
|
||||
};
|
||||
oPanel2.make();
|
||||
|
||||
|
||||
var iframe=document.createElement('iframe');
|
||||
iframe.setAttribute('id','dynaFormIframe');
|
||||
iframe.src = 'cases_Ajax?action=showDynaform&DYN_UID='+DYN_UID;
|
||||
@@ -729,9 +729,9 @@ var showDynaforms = function() {
|
||||
iframe.style.width='790';
|
||||
iframe.style.height=_client.height-20;
|
||||
oPanel2.addContent(iframe);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function showDynaformHistory(DYN_UID,HISTORY_ID)
|
||||
{
|
||||
oPanel2 = new leimnud.module.panel();
|
||||
@@ -874,7 +874,7 @@ var deleteGeneratedDocument = function(APP_DOC_UID) {
|
||||
|
||||
/**
|
||||
* Resend the message that was sent.
|
||||
*
|
||||
*
|
||||
* @Param Application ID
|
||||
* @Param Message ID
|
||||
* @Author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||
@@ -905,7 +905,7 @@ var resendMessage = function(APP_UID, APP_MSG_UID)
|
||||
scs.evalScript();
|
||||
}.extend(this);
|
||||
oRPC2.make();
|
||||
|
||||
|
||||
}.extend(this);
|
||||
oRPC.make();
|
||||
}.extend(this)
|
||||
@@ -931,7 +931,7 @@ function showdebug()
|
||||
}
|
||||
}
|
||||
|
||||
var uploadInputDocument = function(docID,appDocId,docVersion,actionType){
|
||||
var uploadInputDocument = function(docID,appDocId,docVersion,actionType){
|
||||
if(actionType){
|
||||
if(actionType=="R"){
|
||||
windowTitle=G_STRINGS.ID_UPLOAD_REPLACE_INPUT;
|
||||
@@ -947,7 +947,7 @@ var uploadInputDocument = function(docID,appDocId,docVersion,actionType){
|
||||
}
|
||||
oPanel = new leimnud.module.panel();
|
||||
oPanel.options = {
|
||||
size :{w:550,h:300},
|
||||
size :{w:550,h:355},
|
||||
position:{x:0,y:0,center:true},
|
||||
title :windowTitle,
|
||||
theme :"processmaker",
|
||||
|
||||
@@ -922,6 +922,11 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$inpDocMaxFilesizeUnit = $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"];
|
||||
$inpDocMaxFilesize = $inpDocMaxFilesize * (($inpDocMaxFilesizeUnit == "MB")? 1024 *1024 : 1024); //Bytes
|
||||
|
||||
$arraySupportedExtension = G::getInputDocSupportedExtension();
|
||||
$stringSupportedExtension = implode(", ", $arraySupportedExtension);
|
||||
|
||||
$Fields["INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL"] = ($InpDocData["INP_DOC_TYPE_FILE"] != "*.*")? $InpDocData["INP_DOC_TYPE_FILE"] . "." : $stringSupportedExtension . ".";
|
||||
|
||||
$Fields["INP_DOC_MAX_FILESIZE"] = $inpDocMaxFilesize;
|
||||
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
|
||||
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
|
||||
@@ -943,6 +948,11 @@ switch (($_POST['action']) ? $_POST['action'] : $_REQUEST['action']) {
|
||||
$inpDocMaxFilesizeUnit = $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"];
|
||||
$inpDocMaxFilesize = $inpDocMaxFilesize * (($inpDocMaxFilesizeUnit == "MB")? 1024 *1024 : 1024); //Bytes
|
||||
|
||||
$arraySupportedExtension = G::getInputDocSupportedExtension();
|
||||
$stringSupportedExtension = implode(", ", $arraySupportedExtension);
|
||||
|
||||
$Fields["INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL"] = ($InpDocData["INP_DOC_TYPE_FILE"] != "*.*")? $InpDocData["INP_DOC_TYPE_FILE"] . "." : $stringSupportedExtension . ".";
|
||||
|
||||
$Fields["INP_DOC_MAX_FILESIZE"] = $inpDocMaxFilesize;
|
||||
$Fields["INP_DOC_MAX_FILESIZE_LABEL"] = ($inpDocMaxFilesize > 0)? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
|
||||
$Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
|
||||
|
||||
@@ -40,6 +40,12 @@
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.APP_DOC_FILENAME} </td> //-->
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.APP_DOC_FILENAME}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL}</td>
|
||||
<td class="FormFieldContent" width="{$form_fieldContentWidth}">{$form.INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="FormLabel" width="{$form_labelWidth}">{$APP_DOC_COMMENT}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.APP_DOC_COMMENT} </td> //-->
|
||||
|
||||
@@ -16,6 +16,11 @@
|
||||
<APP_DOC_FILENAME type="file">
|
||||
<en><![CDATA[File]]></en>
|
||||
</APP_DOC_FILENAME>
|
||||
|
||||
<INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL type="text" maxlength="30" validate="Any" size="10" mode="view">
|
||||
<en>Supported Extensions</en>
|
||||
</INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL>
|
||||
|
||||
<APP_DOC_COMMENT type="textarea" rows="5" cols="32" colWidth="200" titleAlign="left" align="left">
|
||||
<en><![CDATA[Comments]]></en>
|
||||
</APP_DOC_COMMENT>
|
||||
|
||||
Reference in New Issue
Block a user