Merge remote branch 'upstream/master' into PM-1185

This commit is contained in:
dheeyi
2015-05-19 16:07:15 -04:00
64 changed files with 712 additions and 244 deletions

View File

@@ -463,10 +463,17 @@ class G
* @return void
*/
public static function LoadSystem ($strClass)
{ require_once (PATH_GULLIVER . 'class.inputfilter.php');
$filter = new InputFilter();
{
$path = PATH_GULLIVER . 'class.' . $strClass . '.php';
if(file_exists(PATH_GULLIVER . 'class.inputfilter.php')) {
require_once (PATH_GULLIVER . 'class.inputfilter.php');
$filter = new InputFilter();
$path = $filter->validateInput($path, 'path');
} else {
if(!file_exists($path)) {
$path = '';
}
}
require_once ($path);
}
@@ -2656,6 +2663,7 @@ class G
$path = $filter->validateInput($path, "path");
move_uploaded_file( $file, $path . "/" . $nameToSave );
$nameToSave = $filter->validateInput($nameToSave, "path");
@chmod( $path . "/" . $nameToSave, $permission );
umask( $oldumask );

View File

@@ -634,15 +634,29 @@
$dir = dirname($path)."/";
$base = basename($path);
if (!class_exists('G')) {
$realdocuroot = str_replace( '\\', '/', $_SERVER['DOCUMENT_ROOT'] );
$docuroot = explode( '/', $realdocuroot );
array_pop( $docuroot );
$pathhome = implode( '/', $docuroot ) . '/';
array_pop( $docuroot );
$pathTrunk = implode( '/', $docuroot ) . '/';
require_once($pathTrunk.'gulliver/system/class.g.php');
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
foreach($options["props"] as $key => $prop) {
if ($prop["ns"] == "DAV:") {
$options["props"][$key]['status'] = "403 Forbidden";
} else {
if (isset($prop["val"])) {
$query = "REPLACE INTO properties SET path = '$options[path]', name = '$prop[name]', ns= '$prop[ns]', value = '$prop[val]'";
$query = "REPLACE INTO properties SET path = '%s', name = '%s', ns= '%s', value = '%s'";
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns'],$prop['val']));
error_log($query);
} else {
$query = "DELETE FROM properties WHERE path = '$options[path]' AND name = '$prop[name]' AND ns = '$prop[ns]'";
$query = "DELETE FROM properties WHERE path = '%s' AND name = '%s' AND ns = '%s'";
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns']));
}
mysql_query($query);
}

View File

@@ -305,7 +305,7 @@ class SMTP {
break;
case 'LOGIN':
// Start authentication
fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
@fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF);
$rply = $this->get_lines();
$code = substr($rply,0,3);

View File

@@ -949,6 +949,10 @@ class Cases
public function updateCase($sAppUid, $Fields = array())
{
try {
$oApplication = new Application;
if (!$oApplication->exists($sAppUid)) {
return false;
}
$aApplicationFields = $Fields['APP_DATA'];
$Fields['APP_UID'] = $sAppUid;
$Fields['APP_UPDATE_DATE'] = 'now';
@@ -6761,7 +6765,9 @@ class Cases
$flagSupervisors = false;
if ($oDataset->next()) {
if (!in_array($USR_UID,$row)) {
$rows[] = $oDataset->getRow();
}
$flagSupervisors = true;
}
@@ -6789,10 +6795,13 @@ class Cases
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($oDataset->next()) {
if (!in_array($USR_UID,$row)) {
$rows[] = $oDataset->getRow();
}
}
}
}
return $rows;
}

View File

@@ -115,18 +115,6 @@ class dashletProcessMakerEnterprise implements DashletInterface
<div id=\"container\">
<div id=\"page1\">
<div class=\"icon\">
<a href=\"http://processmaker.com/workflow-inbox-and-bpm-inbox\" target=\"_blank\"><img src=\"/images/dashlets/enterprise_list_builder.png\" /></a>
</div>
<div class=\"description\">
<a href=\"http://processmaker.com/workflow-inbox-and-bpm-inbox\" target=\"_blank\">Custom Case List Builder</a>
<br />
Allows an admin to setup custom column views inside a user's cases boxes (inbox, draft, sent, etc). &nbsp;Information from report tables or Dynaforms can then be displayed in the columns making the inbox experience more relevent and useful to the user.
<br />
<a href=\"http://processmaker.com/workflow-inbox-and-bpm-inbox\" target=\"_blank\">Read More&gt;&gt;</a>
</div>
<div class=\"clearf\"></div>
<div class=\"icon\">
<a href=\"http://processmaker.com/bpm-ldap-and-bpm-active-directory\" target=\"_blank\"><img src=\"/images/dashlets/enterprise_ldap.png\" /></a>
</div>

View File

@@ -420,9 +420,11 @@ class license_application extends padl
$DATA = $this->_unwrap_license($dat_str);
if (is_array($DATA)) {
# missing / incorrect id therefore it has been tampered with
if ($DATA['ID'] != G::encryptOld($this->ID1)) {
/*
*Disable to accept licenses from other workspaces
*if ($DATA['ID'] != G::encryptOld($this->ID1)) {
$DATA['RESULT'] = 'CORRUPT';
}
}*/
if ($this->USE_TIME) {
# the license is being used before it's official start
if ($DATA['DATE']['START'] > time() + $this->START_DIF) {

View File

@@ -429,8 +429,8 @@ class PMPluginRegistry
$plugins = array ();
$namePlugin = array ();
foreach ($files as $f) {
//if (preg_match("/^([\w\.]*).ini$/", $f["filename"], $matches)) {
if (preg_match( "/^(.*pluginConfig)\.ini$/", $f["filename"], $matches )) {
if (preg_match("/^([\w\.]*).ini$/", $f["filename"], $matches)) {
//if (preg_match( "/^(.*pluginConfig)\.ini$/", $f["filename"], $matches )) {
$plugins[] = $matches[1];
}
if (preg_match( "/^.*($pluginName)\.php$/", $f["filename"], $matches )) {
@@ -485,7 +485,6 @@ class PMPluginRegistry
*/
$res = $tar->extract( PATH_PLUGINS );
if (! file_exists( PATH_PLUGINS . $pluginFile )) {
throw (new Exception( "File \"$pluginFile\" doesn't exist" ));
}

View File

@@ -2097,7 +2097,7 @@ function PMFAssignUserToGroup ($userId, $groupId)
* @label PMF Create User
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFCreateUser.28.29
*
* @param string(32) | $userId | User ID | The username for the new user.
* @param string(32) | $userId | User Name | The username for the new user.
* @param string(32) | $password | Password of the new user | The password of the new user, which can be up to 32 characters long.
* @param string(32) | $firstname | Firstname of the new user | The first name of the user, which can be up to 50 characters long.
* @param string(32) | $lastname | Lastname of the new user | The last name of the user, which can be up to 50 characters long.
@@ -2820,7 +2820,7 @@ function PMFAddCaseNote($caseUid, $processUid, $taskUid, $userUid, $note, $sendM
function PMFAddAttachmentToArray($arrayData, $index, $value, $suffix = " Copy({i})")
{
if (isset($suffix) && $suffix == "") {
$suffix = " Copy ({i})";
$suffix = " Copy({i})";
}
$newIndex = $index;

View File

@@ -969,6 +969,18 @@ class Processes
}
}
if (isset($oData->taskExtraProperties)) {
foreach ($oData->taskExtraProperties as $key => $value) {
$record = $value;
if (isset($map[$record["OBJ_UID"]])) {
$newUid = $map[$record["OBJ_UID"]];
$oData->taskExtraProperties[$key]["OBJ_UID"] = $newUid;
}
}
}
if (isset($oData->webEntry)) {
foreach ($oData->webEntry as $key => $value) {
$record = $value;
@@ -3739,9 +3751,25 @@ class Processes
}
}
// for public files
//For public files
$PUBLIC_ROOT_PATH = PATH_DATA . 'sites' . PATH_SEP . SYS_SYS . PATH_SEP . 'public' . PATH_SEP . $data->process['PRO_UID'];
//Get WebEntry file names
$arrayWebEntryFile = array();
if (is_dir($PUBLIC_ROOT_PATH)) {
if ($dirh = opendir($PUBLIC_ROOT_PATH)) {
while (($file = readdir($dirh)) !== false) {
if (preg_match("/^(.+)Post\.php$/", $file, $arrayMatch)) {
$arrayWebEntryFile[] = $arrayMatch[1] . ".php";
$arrayWebEntryFile[] = $arrayMatch[1] . "Post.php";
}
}
closedir($dirh);
}
}
//if this process have any mailfile
if (is_dir( $PUBLIC_ROOT_PATH )) {
//get mail files list from this directory
@@ -3749,6 +3777,10 @@ class Processes
foreach ($file_list as $filename) {
// verify if this filename is a valid file, because it could be . or .. on *nix systems
if ($filename != '.' && $filename != '..') {
if (in_array($filename, $arrayWebEntryFile)) {
continue;
}
if (@is_readable( $PUBLIC_ROOT_PATH . PATH_SEP . $filename )) {
$sFileName = $PUBLIC_ROOT_PATH . PATH_SEP . $filename;
if (file_exists( $sFileName )) {
@@ -4094,7 +4126,6 @@ class Processes
$fsData = intval( fread( $fp, 9 ) ); //reading the size of $oData
$contents = fread( $fp, $fsData ); //reading string $oData
$path = PATH_DYNAFORM . $oData->process['PRO_UID'] . PATH_SEP;
if (! is_dir( $path )) {
G::verifyPath( $path, true );
@@ -4180,6 +4211,28 @@ class Processes
}
if (trim( $sIdentifier ) == 'PUBLIC') {
//Get WebEntry file names
$arrayWebEntryFile = array();
$fh = fopen($pmFilename, "rb");
$contents = fread($fh, intval(fread($fh, 9))); //Reading string $oData
while (!feof($fh)) {
$fsFileName = intval(fread($fh, 9)); //Reading the size of $filename
if ($fsFileName > 0) {
$sFileName = fread($fh, $fsFileName); //Reading filename string
if (preg_match("/^(.+)Post\.php$/", $sFileName, $arrayMatch)) {
$arrayWebEntryFile[] = $arrayMatch[1] . ".php";
$arrayWebEntryFile[] = $arrayMatch[1] . "Post.php";
}
}
}
fclose($fh);
//Public files
$sIdentifier = 1;
while (! feof( $fp ) && is_numeric( $sIdentifier )) {
$sIdentifier = fread( $fp, 9 ); //reading the size of $filename
@@ -4192,6 +4245,11 @@ class Processes
if ($fsContent > 0) {
$fileContent = fread( $fp, $fsContent ); //reading string $XmlContent
$newFileName = $pathPublic . $sFileName;
if (in_array($sFileName, $arrayWebEntryFile)) {
continue;
}
$bytesSaved = @file_put_contents( $newFileName, $fileContent );
if ($bytesSaved != $fsContent) {
throw (new Exception( 'Error writing Public file in directory : ' . $pathPublic ));
@@ -4204,7 +4262,6 @@ class Processes
fclose( $fp );
return true;
}
/**

View File

@@ -391,12 +391,23 @@ class Tasks
$oCriteria = new Criteria('workflow');
$oCriteria->add(ObjectPermissionPeer::OP_TASK_SOURCE, $sTaskUID);
ObjectPermissionPeer::doDelete($oCriteria);
//Delete Cases Schedulers
$criteria = new Criteria("workflow");
$criteria->add(CaseSchedulerPeer::TAS_UID, $sTaskUID, Criteria::EQUAL);
$result = CaseSchedulerPeer::doDelete($criteria);
//Delete Configuration
$criteria = new Criteria("workflow");
$criteria->add(ConfigurationPeer::OBJ_UID, $sTaskUID, Criteria::EQUAL);
$result = ConfigurationPeer::doDelete($criteria);
//Delete task
$oTask->remove($sTaskUID);
//Delete cases schedulers added by krlos
$oCriteria = new Criteria('workflow');
$oCriteria->add(CaseSchedulerPeer::TAS_UID, $sTaskUID);
CaseSchedulerPeer::doDelete($oCriteria);
} catch (Exception $oError) {
throw ($oError);
}

View File

@@ -903,15 +903,20 @@ class ProcessMakerWebDav extends HTTP_WebDAV_Server
$dir = dirname($path) . "/";
$base = basename($path);
G::LoadSystem('inputfilter');
$filter = new InputFilter();
foreach ($options["props"] as $key => $prop) {
if ($prop["ns"] == "DAV:") {
$options["props"][$key]['status'] = "403 Forbidden";
} else {
if (isset($prop["val"])) {
$query = "REPLACE INTO properties SET path = '$options[path]', name = '$prop[name]', ns= '$prop[ns]', value = '$prop[val]'";
$query = "REPLACE INTO properties SET path = '%s', name = '%s', ns= '%s', value = '%s'";
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns'],$prop['val']));
error_log($query);
} else {
$query = "DELETE FROM properties WHERE path = '$options[path]' AND name = '$prop[name]' AND ns = '$prop[ns]'";
$query = "DELETE FROM properties WHERE path = '%s' AND name = '%s' AND ns = '%s'";
$query = $filter->preventSqlInjection($query, Array($options['path'],$prop['name'],$prop['ns']));
}
mysql_query($query);
}

View File

@@ -1187,7 +1187,7 @@ class wsBase
$mktimeDueDate = 0;
if (! empty( $dueDate )) {
if (! empty( $dueDate ) && $dueDate != 'null' && $dueDate) {
if (! preg_match( "/^(\d{4})-(\d{2})-(\d{2})$/", $dueDate, $arrayMatch )) {
$result = new wsCreateUserResponse( - 1, G::loadTranslation( "ID_INVALID_DATA" ) . " $dueDate", null );
@@ -1199,7 +1199,7 @@ class wsBase
$mktimeDueDate = mktime( 0, 0, 0, date( "m" ), date( "d" ), date( "Y" ) + 1 );
}
if (! empty( $status )) {
if (! empty( $status ) && $status != 'null' && $status) {
if ($status != "ACTIVE" && $status != "INACTIVE" && $status != "VACATION") {
$result = new wsCreateUserResponse( - 1, G::loadTranslation( "ID_INVALID_DATA" ) . " $status", null );

View File

@@ -1610,12 +1610,14 @@ class workspaceTools
$workspace->checkMafeRequirements($workspaceName, $lang);
/*----------------------------------********---------------------------------*/
$start = microtime(true);
CLI::logging("> Updating cache view...\n");
$workspace->upgradeCacheView(true, false, $lang);
CLI::logging("> Updating List tables...\n");
$workspace->migrateList($workspace->name);
$stop = microtime(true);
$final = $stop - $start;
CLI::logging("<*> Updating cache view Process took $final seconds.\n");
CLI::logging("<*> Updating List Process took $final seconds.\n");
/*----------------------------------********---------------------------------*/
mysql_close($link);
}
@@ -1881,6 +1883,7 @@ class workspaceTools
}
$this->initPropel(true);
$appCache = new AppCacheView();
$users = new Users();
G::LoadClass("case");
$case = new Cases();
@@ -1921,12 +1924,28 @@ class workspaceTools
$rsCriteria = AppCacheViewPeer::doSelectRS($inbCriteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$criteriaUser = new Criteria();
$criteriaUser->addSelectColumn( UsersPeer::USR_UID );
$criteriaUser->addSelectColumn( UsersPeer::USR_FIRSTNAME );
$criteriaUser->addSelectColumn( UsersPeer::USR_LASTNAME );
$criteriaUser->addSelectColumn( UsersPeer::USR_USERNAME );
//Insert new data LIST_INBOX
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$isSelfService = ($row['USR_UID'] == '') ? true : false;
if($row["DEL_THREAD_STATUS"] == 'OPEN'){
//Update information about the previous_user
$row["DEL_PREVIOUS_USR_UID"] = $row["PREVIOUS_USR_UID"];
$criteriaUser->add( UsersPeer::USR_UID, $row["PREVIOUS_USR_UID"] );
$datasetU = UsersPeer::doSelectRS($criteriaUser);
$datasetU->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$datasetU->next();
$arrayUsers = $datasetU->getRow();
$row["DEL_PREVIOUS_USR_USERNAME"] = $arrayUsers["USR_USERNAME"];
$row["DEL_PREVIOUS_USR_FIRSTNAME"]= $arrayUsers["USR_FIRSTNAME"];
$row["DEL_PREVIOUS_USR_LASTNAME"] = $arrayUsers["USR_LASTNAME"];
//Update the due date
$row["DEL_DUE_DATE"] = $row["DEL_TASK_DUE_DATE"];
$listInbox = new ListInbox();
$listInbox->remove($row["APP_UID"],$row["DEL_INDEX"]);
$listInbox->setDeleted(false);

View File

@@ -41,7 +41,7 @@ class AddonsStore extends BaseAddonsStore
$criteria = new Criteria(AddonsStorePeer::DATABASE_NAME);
$criteria->addSelectColumn("*");
$criteria->add(AddonsStorePeer::STORE_TYPE, "license", Criteria::EQUAL);
//$criteria->add(AddonsStorePeer::STORE_ID, $licenseManager->id, Criteria::NOT_EQUAL);
$criteria->add(AddonsStorePeer::STORE_ID, $licenseManager->id, Criteria::NOT_EQUAL);
foreach (AddonsStorePeer::doSelect($criteria) as $store) {
$store->clear();

View File

@@ -56,6 +56,11 @@ class Application extends BaseApplication
*/
public function getAppTitle()
{
$oApplication = new Application;
if (!$oApplication->exists($this->getAppUid())) {
return false;
}
if ($this->getAppUid() == '') {
throw (new Exception( "Error in getAppTitle, the APP_UID can't be blank"));
}
@@ -311,7 +316,9 @@ class Application extends BaseApplication
try {
$oApplication = ApplicationPeer::retrieveByPk( $AppUid );
if (!$oApplication) {
return false;
}
if (is_object($oApplication) && get_class ($oApplication) == 'Application' ) {
$aFields = $oApplication->toArray(BasePeer::TYPE_FIELDNAME);
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);

View File

@@ -1,28 +1,42 @@
<?php
class Configuration extends BaseConfiguration
{
public function create($aData)
public function create(array $arrayData)
{
$con = Propel::getConnection(ConfigurationPeer::DATABASE_NAME);
$cnn = Propel::getConnection(ConfigurationPeer::DATABASE_NAME);
try {
$con->begin();
$this->setCfgUid($aData['CFG_UID']);
$this->setObjUid($aData['OBJ_UID']);
$this->setCfgValue(isset($aData['CFG_VALUE'])?$aData['CFG_VALUE']:'');
$this->setProUid($aData['PRO_UID']);
$this->setUsrUid($aData['USR_UID']);
$this->setAppUid($aData['APP_UID']);
if ($this->validate()) {
$result=$this->save();
$con->commit();
$configuration = new Configuration();
$configuration->setCfgUid($arrayData["CFG_UID"]);
$configuration->setObjUid($arrayData["OBJ_UID"]);
$configuration->setCfgValue((isset($arrayData["CFG_VALUE"]))? $arrayData["CFG_VALUE"] : "");
$configuration->setProUid($arrayData["PRO_UID"]);
$configuration->setUsrUid($arrayData["USR_UID"]);
$configuration->setAppUid($arrayData["APP_UID"]);
if ($configuration->validate()) {
$cnn->begin();
$result = $configuration->save();
$cnn->commit();
//Return
return $result;
} else {
$con->rollback();
throw(new Exception("Failed Validation in class ".get_class($this)."."));
$msg = "";
foreach ($configuration->getValidationFailures() as $validationFailure) {
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
}
throw new Exception(G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . (($msg != "")? "\n" . $msg : ""));
}
} catch (Exception $e) {
$con->rollback();
throw($e);
$cnn->rollback();
throw $e;
}
}

View File

@@ -35,9 +35,10 @@ class Dashboard extends BaseDashboard
try {
if (!isset($data['DAS_UID'])) {
$dashboard = new Dashboard();
$data['DAS_UID'] = G::generateUniqueID();
$data['DAS_CREATE_DATE'] = date('Y-m-d H:i:s');
$dashboard = new Dashboard();
$msg = 'Create ';
} else {
$msg = 'Update ';
@@ -46,8 +47,11 @@ class Dashboard extends BaseDashboard
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$data['DAS_UPDATE_DATE'] = date('Y-m-d H:i:s');
if (isset($data['DAS_TITLE'])) {
$data['DAS_TITLE'] = $filter ->validateInput($data['DAS_TITLE'], "string");
}
$data['DAS_UPDATE_DATE'] = date('Y-m-d H:i:s');
$dashboard->fromArray($data, BasePeer::TYPE_FIELDNAME);
if ($dashboard->validate()) {
$connection->begin();

View File

@@ -316,13 +316,17 @@ class Installer extends Controller
}
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$pathShared = $filter->validateInput($_REQUEST['pathShared'], 'path');
if ($info->pathShared->result) {
$aux = pathinfo( $_REQUEST['pathLogFile'] );
G::verifyPath( $aux['dirname'], true );
if (is_dir( $aux['dirname'] )) {
if (! file_exists( $_REQUEST['pathLogFile'] )) {
@file_put_contents( $_REQUEST['pathLogFile'], '' );
@chmod($_REQUEST['pathShared'], 0770);
@chmod($pathShared , 0770);
}
}
}
@@ -389,6 +393,10 @@ class Installer extends Controller
}
}
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$logFile = $filter->validateInput($logFile, 'path');
$fpt = fopen( $logFile, 'a' );
fwrite( $fpt, sprintf( "%s %s\n", date( 'Y:m:d H:i:s' ), trim( $text ) ) );
fclose( $fpt );

View File

@@ -2661,9 +2661,10 @@ processmap.prototype={
uid:false
};
this.data.build.text(index);
text = text.replace(/"/g, '\\"');
var r = new leimnud.module.rpc.xmlhttp({
url:this.options.dataServer,
args:"action=addText&data="+{uid:this.options.uid,label:text,position:{x:pos.x,y:pos.y}}.toJSONString()
args:"action=addText&data="+{uid:this.options.uid,label:encodeURIComponent(text),position:{x:pos.x,y:pos.y}}.toJSONString()
});
r.callback=function(rpc,index){
var rs = rpc.xmlhttp.responseText.parseJSON();

View File

@@ -52,6 +52,7 @@ function array_sort ($array, $on, $order = SORT_ASC, $query = '')
}
}
}
return $new_array;
}
// $APP_UIDS = explode(',', $_POST['APP_UID']);

View File

@@ -307,7 +307,7 @@ try {
G::auditLog('DeleteLines','Delete all lines in process "'.$resultProcess['PRO_TITLE'].'"');
break;
case 'addText':
$sOutput = $oProcessMap->addText($oData->uid, $oData->label, $oData->position->x, $oData->position->y);
$sOutput = $oProcessMap->addText($oData->uid, html_entity_decode(html_entity_decode($oData->label)), $oData->position->x, $oData->position->y);
$sOutputAux = G::json_decode($sOutput);
$sOutputAux = (array)$sOutputAux;
G::auditLog('AddText','Add new text ('.$sOutputAux['uid'].') in process "'.$resultProcess['PRO_TITLE'].'"');

View File

@@ -66,5 +66,44 @@ if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_DynaDocs', $oProcessMap->getCaseTrackerObjectsCriteria( $_SESSION['PROCESS'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
) );
G::RenderPage( 'publish' );
$bpmn = new ProcessMaker\Project\Bpmn();
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
if ($flagIsBpmn) {
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
$_SESSION["TRACKER_JAVASCRIPT"] = "
<script type=\"text/javascript\">
var winTracker;
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
var li1 = document.getElementById(\"MAP\");
var a1 = li1.getElementsByTagName(\"a\");
a1[0].onclick = function () {
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
li1.className = \"SelectedMenu\";
li2.className = \"mainMenu\";
li3.className = \"mainMenu\";
li4.className = \"mainMenu\";
document.getElementById(\"trackerContainer\").innerHTML = \"\";
return false;
};
var li2 = document.getElementById(\"DYNADOC\");
var a2= li2.getElementsByTagName(\"a\");
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li3 = document.getElementById(\"HISTORY\");
var a3 = li3.getElementsByTagName(\"a\");
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li4 = document.getElementById(\"MESSAGES\");
var a4 = li4.getElementsByTagName(\"a\");
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
}
</script>
";
}
G::RenderPage("publish");

View File

@@ -62,5 +62,45 @@ if ($noShowTitle == 0) {
$G_PUBLISH->AddContent( 'smarty', 'cases/cases_title', '', '', $aFields );
}
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_TransferHistory', Cases::getTransferHistoryCriteria( $_SESSION['APPLICATION'] ), array () );
G::RenderPage( 'publish' );
$bpmn = new ProcessMaker\Project\Bpmn();
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
if ($flagIsBpmn) {
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
$_SESSION["TRACKER_JAVASCRIPT"] = "
<script type=\"text/javascript\">
var winTracker;
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
var li1 = document.getElementById(\"MAP\");
var a1 = li1.getElementsByTagName(\"a\");
a1[0].onclick = function () {
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
li1.className = \"SelectedMenu\";
li2.className = \"mainMenu\";
li3.className = \"mainMenu\";
li4.className = \"mainMenu\";
document.getElementById(\"trackerContainer\").innerHTML = \"\";
return false;
};
var li2 = document.getElementById(\"DYNADOC\");
var a2= li2.getElementsByTagName(\"a\");
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li3 = document.getElementById(\"HISTORY\");
var a3 = li3.getElementsByTagName(\"a\");
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li4 = document.getElementById(\"MESSAGES\");
var a4 = li4.getElementsByTagName(\"a\");
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
}
</script>
";
}
G::RenderPage("publish");

View File

@@ -64,5 +64,45 @@ if ($noShowTitle == 0) {
}
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'tracker/tracker_Messages', Cases::getHistoryMessagesTracker( $_SESSION['APPLICATION'] ), array ('VIEW' => G::LoadTranslation( 'ID_VIEW' )
) );
G::RenderPage( 'publish' );
$bpmn = new ProcessMaker\Project\Bpmn();
$flagIsBpmn = ($bpmn->exists($_SESSION["PROCESS"]))? true : false;
if ($flagIsBpmn) {
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
$_SESSION["TRACKER_JAVASCRIPT"] = "
<script type=\"text/javascript\">
var winTracker;
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
var li1 = document.getElementById(\"MAP\");
var a1 = li1.getElementsByTagName(\"a\");
a1[0].onclick = function () {
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
li1.className = \"SelectedMenu\";
li2.className = \"mainMenu\";
li3.className = \"mainMenu\";
li4.className = \"mainMenu\";
document.getElementById(\"trackerContainer\").innerHTML = \"\";
return false;
};
var li2 = document.getElementById(\"DYNADOC\");
var a2= li2.getElementsByTagName(\"a\");
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li3 = document.getElementById(\"HISTORY\");
var a3 = li3.getElementsByTagName(\"a\");
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li4 = document.getElementById(\"MESSAGES\");
var a4 = li4.getElementsByTagName(\"a\");
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
}
</script>
";
}
G::RenderPage("publish");

View File

@@ -71,11 +71,48 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
$aFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
if (in_array($aFields['PRO_UID'], $bpmnProjects)) {
//bpmb
$_SESSION["APP_UID"] = $aFields["APP_UID"];
$_SESSION["APPLICATION"] = $aFields["APP_UID"];
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'view', 'tracker/viewMap' );
G::RenderPage( 'publish' );
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
$_SESSION["TRACKER_JAVASCRIPT"] = "
<script type=\"text/javascript\">
var winTracker;
if ((navigator.userAgent.indexOf(\"MSIE\") != -1) || (navigator.userAgent.indexOf(\"Trident\") != -1)) {
var li1 = document.getElementById(\"MAP\");
var a1 = li1.getElementsByTagName(\"a\");
a1[0].onclick = function () {
winTracker = window.open(\"$urlTrackerProcessMap\", \"winTracker\");
li1.className = \"SelectedMenu\";
li2.className = \"mainMenu\";
li3.className = \"mainMenu\";
li4.className = \"mainMenu\";
document.getElementById(\"trackerContainer\").innerHTML = \"\";
return false;
};
var li2 = document.getElementById(\"DYNADOC\");
var a2= li2.getElementsByTagName(\"a\");
a2[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li3 = document.getElementById(\"HISTORY\");
var a3 = li3.getElementsByTagName(\"a\");
a3[0].onclick = function () { if (winTracker) { winTracker.close(); } };
var li4 = document.getElementById(\"MESSAGES\");
var a4 = li4.getElementsByTagName(\"a\");
a4[0].onclick = function () { if (winTracker) { winTracker.close(); } };
}
</script>
";
G::RenderPage("publish");
//note: url processmap "../designer?prj_uid=$_SESSION['PROCESS']&prj_readonly=true&app_uid=$_SESSION['APP_UID']"
break;
}
if (isset( $aFields['TITLE'] )) {
@@ -251,4 +288,3 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
G::RenderPage( 'publish' );
break;
}

View File

@@ -63,7 +63,7 @@ foreach ($aInfoFunction as $k => $v) {
}
if ($aDataTriggers[$sOptionTrigger] != '') {
if ((strstr($aDataTriggers[$sOptionTrigger], "@@"))) {
if ((strstr($aDataTriggers[$sOptionTrigger], "@@")) || ($aDataTriggers['PMFUNTION_NAME'] == 'evaluateFunction' && $k == 0 && strstr($aDataTriggers[$sOptionTrigger], "@="))) {
$option = trim($aDataTriggers[$sOptionTrigger]);
} else {
@@ -81,7 +81,7 @@ foreach ($aInfoFunction as $k => $v) {
$option = floatval($aDataTriggers[$sOptionTrigger]);
break;
default:
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "'.array.'")) ? trim($aDataTriggers[$sOptionTrigger]) : "'" . trim($aDataTriggers[$sOptionTrigger]) . "'";
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "'.array.'")) ? trim($aDataTriggers[$sOptionTrigger]) : '"' . trim($aDataTriggers[$sOptionTrigger]) . '"';
break;
}
}

View File

@@ -66,7 +66,7 @@ foreach ($aInfoFunction as $k => $v) {
}
if ($aDataTriggers[$sOptionTrigger] != '') {
if ((strstr($aDataTriggers[$sOptionTrigger], "@@"))) {
if ((strstr($aDataTriggers[$sOptionTrigger], "@@")) || ($aDataTriggers['PMFUNTION_NAME'] == 'evaluateFunction' && $k == 0 && strstr($aDataTriggers[$sOptionTrigger], "@="))) {
$option = $aDataTriggers[$sOptionTrigger];
} else {
@@ -84,7 +84,7 @@ foreach ($aInfoFunction as $k => $v) {
$option = floatval($aDataTriggers[$sOptionTrigger]);
break;
default:
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "array")) ? trim($aDataTriggers[$sOptionTrigger]) : "'" . trim($aDataTriggers[$sOptionTrigger]) . "'";
$option = (is_numeric($aDataTriggers[$sOptionTrigger]) || is_bool($aDataTriggers[$sOptionTrigger]) ) ? trim($aDataTriggers[$sOptionTrigger]) : (strstr($aDataTriggers[$sOptionTrigger], "array")) ? trim($aDataTriggers[$sOptionTrigger]) : '"' . trim($aDataTriggers[$sOptionTrigger]) . '"';
break;
}
}

View File

@@ -58,10 +58,16 @@
</tr>
{/if}
<tr>
<td width="100%" align="center">
<td {php} if (isset($_SESSION["TRACKER_JAVASCRIPT"])) { echo "id=\"trackerContainer\""; } {/php} width="100%" align="center">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
if (isset($_SESSION["TRACKER_JAVASCRIPT"])) {
echo $_SESSION["TRACKER_JAVASCRIPT"];
unset($_SESSION["TRACKER_JAVASCRIPT"]);
}
{/php}
</td>
</tr>

View File

@@ -59,10 +59,16 @@
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0" >
<tr>
<td width="100%" align="center">
<td {php} if (isset($_SESSION["TRACKER_JAVASCRIPT"])) { echo "id=\"trackerContainer\""; } {/php} width="100%" align="center">
{php}
global $G_TEMPLATE;
if ($G_TEMPLATE != '') G::LoadTemplate($G_TEMPLATE);
if (isset($_SESSION["TRACKER_JAVASCRIPT"])) {
echo $_SESSION["TRACKER_JAVASCRIPT"];
unset($_SESSION["TRACKER_JAVASCRIPT"]);
}
{/php}
</td>
</tr>

View File

@@ -1005,9 +1005,7 @@ class CaseScheduler
case "UPD":
$arrayDataAux = $caseScheduler->load($caseSchedulerUid);
if ($arrayData["SCH_END_DATE"] != "") {
$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayData["SCH_END_DATE"];
}
//If the start date has changed then recalculate the next run time
$recalculateDate = ($arrayData["SCH_START_DATE"] == $arrayData["PREV_SCH_START_DATE"])? false : true;

View File

@@ -100,7 +100,7 @@ class ProcessMap
$tmpData[2] = $laneset['bou_y'];
$tmpData[3] = $laneset['bou_width'];
$tmpData[4] = $laneset['bou_height'];
$tmpData[5] = $laneset['dat_type'];
//$tmpData[5] = $laneset['dat_type'];
$tmpData[6] = $laneset['lns_name'];
$tmpData[7] = "";
$tmpData[8] = $laneset['lns_uid'];
@@ -399,7 +399,7 @@ class ProcessMap
$tt = explode('_', $figure[7]);
$this->print_text($img, $figure[6], 10, 90, $black, $font, $X1, $Y1, $X2, $Y2, $figure[0], $tt[0]);
} else {
$this->print_text($img, $figure[6], 10, 90, $black, $font, $X1, $Y1, $X2, $Y2, $figure[0], $figure[5]);
$this->print_text($img, $figure[6], 10, 90, $black, $font, $X1, $Y1, $X2, $Y2, $figure[0]);
}
break;
case 'bpmnLane':

View File

@@ -259,8 +259,7 @@ abstract class Importer
public function removeProject()
{
$project = \ProcessMaker\Project\Adapter\BpmnWorkflow::load($this->metadata["uid"]);
$force = true;
$project->remove($force);
$project->remove(true, false);
}
/**

View File

@@ -1038,10 +1038,10 @@ class BpmnWorkflow extends Project\Bpmn
}
}
public function remove($force = false)
public function remove($flagForceRemoveProject = false, $flagRemoveCases = true)
{
parent::remove($force);
$this->wp->remove();
parent::remove($flagForceRemoveProject);
$this->wp->remove($flagRemoveCases);
}
public static function createFromStruct(array $projectData, $generateUid = true)

View File

@@ -106,11 +106,11 @@ class Workflow extends Handler
$process->update($data);
}
public function remove()
public function remove($flagRemoveCases = true)
{
try {
self::log("Remove Process with uid: {$this->proUid}");
$this->deleteProcess($this->proUid);
$this->deleteProcess($this->proUid, $flagRemoveCases);
self::log("Remove Process Success!");
} catch (\Exception $e) {
self::log("Exception: ", $e->getMessage(), "Trace: ", $e->getTraceAsString());
@@ -559,7 +559,7 @@ class Workflow extends Handler
}
}
public function deleteProcess($sProcessUID)
public function deleteProcess($sProcessUID, $flagRemoveCases = true)
{
try {
//G::LoadClass('case');
@@ -580,17 +580,24 @@ class Workflow extends Handler
$oReportTable = new \ReportTables();
$oCaseTracker = new \CaseTracker();
$oCaseTrackerObject = new \CaseTrackerObject();
//Delete the applications of process
$oCriteria = new \Criteria('workflow');
$oCriteria->add(\ApplicationPeer::PRO_UID, $sProcessUID);
$oDataset = \ApplicationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$oCase = new \Cases();
while ($aRow = $oDataset->getRow()) {
$oCase->removeCase($aRow['APP_UID']);
$oDataset->next();
//Delete the applications of process
if ($flagRemoveCases) {
$case = new \Cases();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ApplicationPeer::APP_UID);
$criteria->add(\ApplicationPeer::PRO_UID, $sProcessUID, \Criteria::EQUAL);
$rsCriteria = \ApplicationPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$result = $case->removeCase($row["APP_UID"]);
}
}
//Delete the tasks of process

View File

@@ -35,7 +35,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -353,7 +353,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -213,13 +213,18 @@ function openCaseNotesWindow(appUid1, delIndex, modalSw, appTitle, proUid, taskU
growMin: 40,
growMax: 80,
maxLengthText : 500,
allowBlank :true,
allowBlank :false,
selectOnFocus :true,
enableKeyEvents: true,
listeners : {
scope : this,
keyup : updateTextCtr,
keydown: updateTextCtr
keydown: updateTextCtr,
'change': function(field, newVal, oldVal){
var textAreaValue = newVal.replace(/^\s+/,'').replace(/\s+$/,'');
field.setValue(textAreaValue.trim());
Ext.getCmp('caseNoteText').focus(false, 200);
}
}
})
],

View File

@@ -107,7 +107,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -61,7 +61,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -932,7 +932,7 @@ emailServer.application = {
var txtSearch = new Ext.form.TextField({
id: "txtSearch",
emptyText: _("ID_ENTER_SEARCH_TERM"),
emptyText: _("ID_EMPTY_SEARCH"),
width: 150,
allowBlank: true,

View File

@@ -472,7 +472,8 @@ Ext.onReady(function() {
method: "POST"
}),
baseParams: {
"action": "addonsList"
"action": "addonsList",
"force" : true
},
//url: "addonsStoreAction?action=addonsList",

View File

@@ -107,7 +107,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -90,7 +90,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -568,7 +568,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -583,7 +583,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -172,7 +172,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 220,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -696,7 +696,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -711,7 +711,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -164,7 +164,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -100,7 +100,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -319,7 +319,10 @@ CloseWindow = function(){
SaveNewCategory = function(){
catName = newForm.getForm().findField('category').getValue();
catName = catName.trim();
if (catName == '') return;
if (catName == '') {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_CATEGORY_NAME")));
return;
}
viewport.getEl().mask(_('ID_PROCESSING'));
Ext.Ajax.request({
url: 'processCategory_Ajax',
@@ -425,7 +428,8 @@ EditCategory = function(){
title: _('ID_EDIT_CATEGORY'),
items: [editForm],
id: 'w',
modal: true
modal: true,
closeAction: "hide"
});
w.show();
}

View File

@@ -360,7 +360,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -367,7 +367,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -382,7 +382,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 110,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -129,7 +129,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -114,7 +114,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {
@@ -535,11 +535,12 @@ EditRole = function(){
editForm.getForm().findField('name').setValue(rowSelected.data.ROL_NAME);
editForm.getForm().findField('status').setValue(rowSelected.data.ROL_STATUS);
w = new Ext.Window({
closeAction: "hide",
autoHeight: true,
id: 'w',
modal: true,
width: 420,
title: _('ID_EDIT_ROLE_TITLE'),
title: _("ID_EDIT_ROLE_TITLE"),
items: [editForm]
});
w.show();

View File

@@ -93,7 +93,7 @@
<td>
<a target="_blank" href="http://www.processmaker.com"><img src="/images/get_started.png" border="0" width="163" height="438"></a>
</td>
<td class="cell2" valign="top">
<td class="cell2" valign="top" align="left">
<p><b><span class="cLow">Welcome to ProcessMaker</span></b></p><br/>
<p style="text-align: justify;"><span class="cLow-min">This new version features a new process designer based upon the Business Process Management Notation 2 standard. It offers a new form designer with flexible layouts for desktops, tablets and cellphones and a new REST API to remotely access ProcessMaker.</span></p>
<p style="text-align: justify;"><span class="cLow-min">To get started, log in using the following credentials. You can change them later:</span></p>
@@ -101,10 +101,8 @@
<span class="cNeg">Password:</span><span class="cLow"> {pass}</span><br><br>
<p style="text-align: justify;"><span class="cLow-min">We suggest you follow our 7 easy videos to automate your workflow. You can see a demo of each step at <a target="_blank" href="http://www.processmaker.com/tutorials">http://www.processmaker.com/tutorials/</a></span></p>
<b><span class="cLow">Other Resources:</span></b><br/><br/>
<b><span class="cLow">Other Resources:</span></b><br/>
<span class="cLow"><a target="_blank" href="http://wiki.processmaker.com">PM Wiki </a>- Manuals</span><br/>
<span class="cLow"><a target="_blank" href="http://forum.processmaker.com">PM Forum </a>- Ask Questions</span><br/><br/>
<p style="text-align: justify;"><span class="cLow-min">We hope you enjoy using ProcessMaker. For more information about our enterprise support and consulting services <a target="_blank" href="http://www.processmaker.com/contact-us">contact us.</a></span></p>

View File

@@ -108,7 +108,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -104,7 +104,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 150,
emptyText: _('ID_ENTER_SEARCH_TERM'),
emptyText: _('ID_EMPTY_SEARCH'),
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -311,7 +311,7 @@ newDashboard = function() {
//Edit Dashboard Action
editDashboard = function() {
var rowSelected = infoGrid.getSelectionModel().getSelected();
if (rowSelected){
if (rowSelected && rowSelected.data.DAS_STATUS == 1 ){
location.href = 'formEditDashboard?DAS_UID=' + rowSelected.data.DAS_UID;
}
};

View File

@@ -1,44 +1,12 @@
<?php
$url = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APP_UID"] . "&tracker_designer=1";
$urlTrackerProcessMap = "../designer?prj_uid=" . $_SESSION["PROCESS"] . "&prj_readonly=true&app_uid=" . $_SESSION["APPLICATION"] . "&tracker_designer=1";
?>
<script type="text/javascript">
var winTracker;
if ((navigator.userAgent.indexOf("MSIE") != -1) || (navigator.userAgent.indexOf("Trident") != -1)) {
var li1 = document.getElementById("MAP");
var a1 = li1.getElementsByTagName("a");
a1[0].href = "javascript:;";
a1[0].onclick = function () { winTracker = window.open("<?php echo $url; ?>", "winTracker"); return false; };
var li2 = document.getElementById("DYNADOC");
var a2= li2.getElementsByTagName("a");
a2[0].onclick = function ()
{
if (winTracker) {
winTracker.close();
}
};
var li3 = document.getElementById("HISTORY");
var a3 = li3.getElementsByTagName("a");
a3[0].onclick = function ()
{
if (winTracker) {
winTracker.close();
}
};
var li4 = document.getElementById("MESSAGES");
var a4 = li4.getElementsByTagName("a");
a4[0].onclick = function ()
{
if (winTracker) {
winTracker.close();
}
};
} else {
document.write("<iframe name=\"casesFrame\" id=\"casesFrame\" src=\"<?php echo $url; ?>\" width=\"99%\" height=\"768\" frameborder=\"0\">");
if (!(navigator.userAgent.indexOf("MSIE") != -1 || navigator.userAgent.indexOf("Trident") != -1)) {
document.write("<iframe name=\"casesFrame\" id=\"casesFrame\" src=\"<?php echo $urlTrackerProcessMap; ?>\" width=\"99%\" height=\"768\" frameborder=\"0\">");
document.write("<p>Your browser does not support iframes.</p>");
document.write("</iframe>");
}

View File

@@ -140,7 +140,7 @@ Ext.onReady(function(){
ctCls:'pm_search_text_field',
allowBlank: true,
width: 100,
emptyText: _('ID_ENTER_SEARCH_TERM'),//'enter search term',
emptyText: _('ID_EMPTY_SEARCH'),//'enter search term',
listeners: {
specialkey: function(f,e){
if (e.getKey() == e.ENTER) {

View File

@@ -12,6 +12,29 @@
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder) {
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
function $_GET(q,s) {
s = (s) ? s : self.location.search;
var re = new RegExp('&'+q+'=([^&]*)','i');

View File

@@ -8,6 +8,27 @@
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<SEARCH_FILTER_FORM type="private"/>
<js type="javascript" replaceTags="1"><![CDATA[
var currentPagedTable = @#PAGED_TABLE_ID;
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder) {
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
var currentPagedTable = @#PAGED_TABLE_ID;
]]></js>
</dynaForm>

View File

@@ -13,6 +13,27 @@
<dynaformsFlatEditor type="private" defaultValue="../dynaforms/dynaforms_FlatEditor"/>
<dynaformsDelete type="private" defaultValue="../dynaforms/dynaforms_Delete"/>
<js type="javascript" replaceTags="1"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder) {
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
function dynaformAdd(){
popupWindow("@G::LoadTranslation(ID_NEW_DYNAFORM)", "@G::encryptlink(@#dynaformsChoseType)?PRO_UID=@%PRO_UID" , 500, 225);
//popupWindow('@G::LoadTranslation(ID_NEW_DYNAFORM)', '@G::encryptlink(@#dynaformsNewPlugin)?PRO_UID=@%PRO_UID' , 500, 350);

View File

@@ -9,6 +9,27 @@
<inputdocsEdit type="private" defaultValue="../inputdocs/inputdocs_Edit"/>
<inputdocsDelete type="private" defaultValue="../inputdocs/inputdocs_Delete"/>
<js type="javascript" replaceTags="1"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder) {
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
var currentPagedTable = @#PAGED_TABLE_ID;
function inputdocsAdd(){//alert('@G::encryptlink(@#inputdocsEdit)?PRO_UID=@%PRO_UID');
popupWindow('@G::LoadTranslation(ID_NEW_INPUTDOCS)', '@G::encryptlink(@#inputdocsEdit)?PRO_UID=@%PRO_UID' , 500, 410);

View File

@@ -1,6 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<dynaForm type="xmlmenu"><MNU_ADD type="link" value="" link="#" onclick="outputdocsAdd(); return false;" colAlign="left" colWidth="100"><en><![CDATA[New]]></en></MNU_ADD><PAGED_TABLE_ID type="private"/><PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/><PRO_UID type="private"/><![CDATA[>
]]><outputdocs_New type="private" defaultValue="../outputdocs/outputdocs_New"/><outputdocs_Edit type="private" defaultValue="../outputdocs/outputdocs_Edit"/><outputdocs_Properties type="private" defaultValue="../outputdocs/outputdocs_Properties"/><outputdocs_Delete type="private" defaultValue="../outputdocs/outputdocs_Delete"/><js type="javascript" replaceTags="1"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder) {
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
var currentPagedTable = @#PAGED_TABLE_ID;
var outputdocsEditor;

View File

@@ -4,5 +4,28 @@
>
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder){
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
]]></JS>
</dynaForm>

View File

@@ -19,6 +19,27 @@
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript" replaceTags="1"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder){
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
var windowWidth = 600;
var windowHeight = 460;

View File

@@ -5,5 +5,27 @@
<PAGED_TABLE_ID type="private"/>
<PAGED_TABLE_FAST_SEARCH type="FastSearch" label="@G::LoadTranslation(ID_SEARCH)"/>
<JS type="javascript"><![CDATA[
add_placeholder("form[PAGED_TABLE_FAST_SEARCH]","@G::LoadTranslation(ID_EMPTY_SEARCH)");
function add_placeholder (id, placeholder){
var el = document.getElementById(id);
el.placeholder = placeholder;
el.onfocus = function () {
if(this.value == this.placeholder) {
this.value = '';
el.style.cssText = '';
}
};
el.onblur = function () {
if(this.value.length == 0) {
this.value = this.placeholder;
el.style.cssText = 'color:#A9A9A9;';
}
};
el.onblur();
}
]]></JS>
</dynaForm>