Merge remote-tracking branch 'upstream/3.0.1.8' into 3.0.1.7-Gmail

This commit is contained in:
Dante
2016-03-15 10:51:18 -04:00
43 changed files with 2083 additions and 1697 deletions

View File

@@ -0,0 +1,15 @@
<?php
namespace ProcessMaker\BusinessModel\DynaForm;
abstract class Validator implements ValidatorInterface
{
protected $json;
public function __construct($json)
{
$this->json = $json;
}
}

View File

@@ -0,0 +1,20 @@
<?php
namespace ProcessMaker\BusinessModel\DynaForm;
class ValidatorCheckGroup extends Validator
{
public function validatePost(&$post)
{
$json = $this->json;
if ($json === null) {
return;
}
if (!isset($post[$json->variable])) {
$post[$json->variable] = array();
$post[$json->variable . "_label"] = \G::json_encode(array());
}
}
}

View File

@@ -0,0 +1,55 @@
<?php
namespace ProcessMaker\BusinessModel\DynaForm;
class ValidatorFactory
{
const TITLE = "title";
const SUBTITLE = "subtitle";
const LABEL = "label"; //deprecated
const LINK = "link";
const IMAGE = "image";
const FILE = "file";
const SUBMIT = "submit";
const BUTTON = "button";
const GRID = "grid";
const SUBFORM = "subform";
const TEXT = "text";
const TEXTAREA = "textarea";
const DROPDOWN = "dropdown";
const CHECKBOX = "checkbox";
const CHECKGROUP = "checkgroup";
const RADIO = "radio";
const DATETIME = "datetime";
const SUGGEST = "suggest";
const HIDDEN = "hidden";
const FORM = "form";
const CELL = "cell";
const ANNOTATION = "label"; //todo
const GEOMAP = "location";
const QRCODE = "scannerCode";
const SIGNATURE = "signature";
const IMAGEM = "imageMobile";
const AUDIOM = "audioMobile";
const VIDEOM = "videoMobile";
const PANEL = "panel";
const MSGPANEL = "msgPanel";
/**
*
* @param type $type
* @param type $json
* @return \ProcessMaker\BusinessModel\DynaForm\ValidatorInterface
*/
public static function createValidatorClass($type = '', $json = null)
{
switch ($type) {
case ValidatorFactory::CHECKGROUP:
return new ValidatorCheckGroup($json);
default :
return null;
}
}
}

View File

@@ -0,0 +1,9 @@
<?php
namespace ProcessMaker\BusinessModel\DynaForm;
interface ValidatorInterface
{
public function validatePost(&$post);
}

View File

@@ -42,11 +42,12 @@ class Lists {
$filters["start"] = isset( $dataList["start"] ) ? $dataList["start"] : "0";
$filters["limit"] = isset( $dataList["limit"] ) ? $dataList["limit"] : "25";
$filters["sort"] = isset( $dataList["sort"] ) ? $dataList["sort"] : "";
$filters["dir"] = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
$filters["dir"] = isset( $dataList["dir"] ) ? $dataList["dir"] : "ASC";
$filters["action"] = isset( $dataList["action"] ) ? $dataList["action"] : "";
$filters['newestthan'] = isset( $dataList['newestthan'] ) ? $dataList['newestthan'] : '';
$filters['newestthan'] = isset( $dataList['newerThan'] ) ? $dataList['newerThan'] : '';
$filters['oldestthan'] = isset( $dataList['oldestthan'] ) ? $dataList['oldestthan'] : '';
// Select list

View File

@@ -30,7 +30,8 @@ class XmlImporter extends Importer
throw new \Exception(\G::LoadTranslation("ID_INVALID_FILE"));
}
$this->dom->load((is_null($filename))? $this->filename : $filename);
$loadFilename = (is_null($filename))? $this->filename : $filename;
$this->dom->loadXml(file_get_contents($loadFilename));
$this->root = $this->dom->documentElement;
// validate version

View File

@@ -717,7 +717,7 @@ class BpmnWorkflow extends Project\Bpmn
}
*/
public function createTaskByElement($elementUid, $elementType, $key, $elementUidDest="")
public function createTaskByElement($elementUid, $elementType, $key, $elementUidDest="", $routeType = '')
{
try {
$flagElementTaskRelation = false;
@@ -735,7 +735,8 @@ class BpmnWorkflow extends Project\Bpmn
$flagElementTaskRelation = false;
}
}
if ($flagElementTaskRelation) {
if ($flagElementTaskRelation || (isset($this->arrayElementTaskRelation[$elementUid]) && $routeType ===
'SEC-JOIN')) {
$taskUid = $this->arrayElementTaskRelation[$elementUid];
} else {
$taskPosX = 0;
@@ -816,7 +817,10 @@ class BpmnWorkflow extends Project\Bpmn
}
if($elementUidDest != ""){
$aElement[$elementUid][$elementUidDest] = $elementUidDest;
$aElement[$elementUid] = $elementUidDest;
if($routeType === 'SEC-JOIN'){
$this->arrayElementTaskRelation[$elementUid] = $taskUid;
}else
$this->arrayElementTaskRelation = $aElement;
}else {
//Array - Add element
@@ -911,7 +915,8 @@ class BpmnWorkflow extends Project\Bpmn
$gatewayUid,
"bpmnGateway",
"gateway-to-gateway",
$arrayFlowData["FLO_ELEMENT_DEST"]
$arrayFlowData["FLO_ELEMENT_DEST"],
$routeType
);
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);

View File

@@ -222,8 +222,8 @@ class Light extends Api
public function doGetCasesListDraft(
$start = 0,
$limit = 10,
$sort = 'DEL_DELEGATE_DATE',
$dir = 'DESC',
$sort = 'DEL_DELEGATE_DATE',
$dir = 'DESC',
$cat_uid = '',
$pro_uid = '',
$search = '',