Merged colosa/processmaker into master

This commit is contained in:
jonathan quispe
2015-03-05 10:57:19 -04:00
3 changed files with 47 additions and 17 deletions

View File

@@ -1516,9 +1516,20 @@ class Processes
{
foreach ($SubProcess as $key => $row) {
$oSubProcess = new SubProcess();
if ($oSubProcess->subProcessExists( $row['SP_UID'] )) {
$oSubProcess->remove( $row['SP_UID'] );
}
//if ($oSubProcess->subProcessExists( $row['SP_UID'] )) {
// $oSubProcess->remove( $row['SP_UID'] );
//}
//Delete
$criteria = new Criteria("workflow");
$criteria->add(SubProcessPeer::PRO_PARENT, $row["PRO_PARENT"], Criteria::EQUAL);
$criteria->add(SubProcessPeer::TAS_PARENT, $row["TAS_PARENT"], Criteria::EQUAL);
$result = SubProcessPeer::doDelete($criteria);
//Create
$res = $oSubProcess->create( $row );
}
return;

View File

@@ -764,6 +764,13 @@ class Workflow extends Handler
$oCriteria->add(\CaseTrackerObjectPeer::PRO_UID, $sProcessUID);
\ProcessUserPeer::doDelete($oCriteria);
//Delete SubProcess
$criteria = new \Criteria("workflow");
$criteria->add(\SubProcessPeer::PRO_PARENT, $sProcessUID, \Criteria::EQUAL);
$result = \SubProcessPeer::doDelete($criteria);
//Delete WebEntries
$webEntry = new \ProcessMaker\BusinessModel\WebEntry();

View File

@@ -30,7 +30,15 @@ function formatAMPM(date, initVal) {
minutes = minutes < 10 ? '0'+minutes : minutes;
var strTime = hours + ':' + minutes + ' ' + ampm;
return strTime;
}
};
function isBrowserIE(){
if ( (navigator.userAgent.indexOf("MSIE")!=-1) || (navigator.userAgent.indexOf("Trident")!=-1) ){
return true;
} else {
return false;
}
};
Ext.onReady(function(){
openToRevisePanel = function() {
@@ -1531,20 +1539,24 @@ Ext.onReady(function(){
TabPanel.setActiveTab(tabId);
}
else {
TabPanel.add({
id: tabId,
title: menuSelectedTitle[name],
frameConfig: {name: name + 'Frame', id: name + 'Frame'},
defaultSrc: uri,
loadMask: {msg: _('ID_LOADING_GRID') + '...'},
autoWidth: true,
closable: true,
autoScroll: true,
bodyStyle: {height: (PMExt.getBrowser().screen.height - 60) + 'px', overflow: 'auto'}
}).show();
if(!isBrowserIE()){
TabPanel.add({
id: tabId,
title: menuSelectedTitle[name],
frameConfig: {name: name + 'Frame', id: name + 'Frame'},
defaultSrc: uri,
loadMask: {msg: _('ID_LOADING_GRID') + '...'},
autoWidth: true,
closable: true,
autoScroll: true,
bodyStyle: {height: (PMExt.getBrowser().screen.height - 60) + 'px', overflow: 'auto'}
}).show();
TabPanel.doLayout();
}
TabPanel.doLayout();
}else{
var windContainer = window.open(uri,"winContainer");
}
}
}
},
failure: function ( result, request) {