Merged master into fixing-broken-features
This commit is contained in:
3
Rakefile
3
Rakefile
@@ -230,8 +230,7 @@ def buildMafe(homeDir, targetDir, mode)
|
|||||||
"#{homeDir}/build/js/designer.js" => "#{mafeDir}/designer.min.js",
|
"#{homeDir}/build/js/designer.js" => "#{mafeDir}/designer.min.js",
|
||||||
"#{homeDir}/build/js/mafe.js" => "#{mafeDir}/mafe.min.js",
|
"#{homeDir}/build/js/mafe.js" => "#{mafeDir}/mafe.min.js",
|
||||||
"#{homeDir}/build/css/mafe.css" => "#{mafeDir}/mafe.min.css",
|
"#{homeDir}/build/css/mafe.css" => "#{mafeDir}/mafe.min.css",
|
||||||
"#{homeDir}/img/*.*" => "#{imgTargetDir}",
|
"#{homeDir}/img/*.*" => "#{imgTargetDir}"
|
||||||
"#{homeDir}/srcForm/img/*.*" => "#{imgTargetDir}"
|
|
||||||
})
|
})
|
||||||
|
|
||||||
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
puts "\nCopying lib files into: #{jsTargetDir}".bold
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ pake_task('workspace-backup', 'project_exists');
|
|||||||
pake_desc("restore a previously backed-up workspace\n args: [-o|--overwrite] <filename> <workspace>");
|
pake_desc("restore a previously backed-up workspace\n args: [-o|--overwrite] <filename> <workspace>");
|
||||||
pake_task('workspace-restore', 'project_exists');
|
pake_task('workspace-restore', 'project_exists');
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
pake_desc("check standard code\n args: <directory>");
|
pake_desc("check standard code\n args: <directory>");
|
||||||
pake_task('check-standard-code', 'project_exists' );
|
pake_task('check-standard-code', 'project_exists' );
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_version
|
* Function run_version
|
||||||
|
|||||||
@@ -46,21 +46,6 @@ $(window).load(function () {
|
|||||||
|
|
||||||
var form = document.getElementsByTagName("form")[0];
|
var form = document.getElementsByTagName("form")[0];
|
||||||
|
|
||||||
var el = form.elements;
|
|
||||||
var dt = data.items[0].items;
|
|
||||||
for (var i = 0; i < dt.length; i++) {
|
|
||||||
var dr = dt[i];
|
|
||||||
for (var j = 0; j < dr.length; j++) {
|
|
||||||
if (dr[j].name) {
|
|
||||||
for (var k = 0; k < el.length; k++) {
|
|
||||||
if (el[k].name === dr[j].name) {
|
|
||||||
el[k].name = "form[" + dr[j].name + "]";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var type = document.createElement("input");
|
var type = document.createElement("input");
|
||||||
type.type = "hidden";
|
type.type = "hidden";
|
||||||
type.name = "TYPE";
|
type.name = "TYPE";
|
||||||
|
|||||||
@@ -1424,11 +1424,12 @@ class Cases
|
|||||||
* @access public
|
* @access public
|
||||||
* @param string $app_uid, Uid for case
|
* @param string $app_uid, Uid for case
|
||||||
* @param array $app_data, Data for case variables
|
* @param array $app_data, Data for case variables
|
||||||
|
* @param string $dyn_uid, Uid for dynaform
|
||||||
*
|
*
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*/
|
*/
|
||||||
public function setCaseVariables($app_uid, $app_data)
|
public function setCaseVariables($app_uid, $app_data, $dyn_uid = null)
|
||||||
{
|
{
|
||||||
Validator::isString($app_uid, '$app_uid');
|
Validator::isString($app_uid, '$app_uid');
|
||||||
Validator::appUid($app_uid, '$app_uid');
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
@@ -1436,7 +1437,18 @@ class Cases
|
|||||||
|
|
||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$fields = $case->loadCase($app_uid);
|
$fields = $case->loadCase($app_uid);
|
||||||
$data['APP_DATA'] = array_merge($fields['APP_DATA'], $app_data);
|
$_POST['form'] = $app_data;
|
||||||
|
|
||||||
|
if (!is_null($dyn_uid)) {
|
||||||
|
$oDynaform = \DynaformPeer::retrieveByPK($dyn_uid);
|
||||||
|
|
||||||
|
if ($oDynaform->getDynVersion() < 2) {
|
||||||
|
$oForm = new \Form ( $fields['PRO_UID'] . "/" . $dyn_uid, PATH_DYNAFORM );
|
||||||
|
$oForm->validatePost();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data['APP_DATA'] = array_merge($fields['APP_DATA'], $_POST['form']);
|
||||||
$case->updateCase($app_uid, $data);
|
$case->updateCase($app_uid, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1905,5 +1917,30 @@ class Cases
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Put execute triggers
|
||||||
|
*
|
||||||
|
* @access public
|
||||||
|
* @param string $app_uid , Uid for case
|
||||||
|
* @param bool|string $del_index , Index for case
|
||||||
|
* @param string $obj_type , Index for case
|
||||||
|
* @param string $obj_uid , Index for case
|
||||||
|
*
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*/
|
||||||
|
public function putExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid)
|
||||||
|
{
|
||||||
|
Validator::isString($app_uid, '$app_uid');
|
||||||
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
|
Validator::isInteger($del_index, '$del_index');
|
||||||
|
|
||||||
|
$oCase = new \Cases();
|
||||||
|
$aField = $oCase->loadCase($app_uid, $del_index);
|
||||||
|
$tas_uid = $aField["TAS_UID"];
|
||||||
|
|
||||||
|
$task = new \Tasks();
|
||||||
|
$aField["APP_DATA"] = $oCase->executeTriggers($tas_uid, $obj_type, $obj_uid, "AFTER", $aField["APP_DATA"]);
|
||||||
|
$aField = $oCase->updateCase($app_uid, $aField);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -610,6 +610,7 @@ class Variable
|
|||||||
$variableSql = "";
|
$variableSql = "";
|
||||||
$sqlLimit = "";
|
$sqlLimit = "";
|
||||||
$variableSqlLimit = "";
|
$variableSqlLimit = "";
|
||||||
|
$sqlConditionLike = "";
|
||||||
|
|
||||||
$criteria = new \Criteria("workflow");
|
$criteria = new \Criteria("workflow");
|
||||||
|
|
||||||
|
|||||||
@@ -838,17 +838,18 @@ class Cases extends Api
|
|||||||
*
|
*
|
||||||
* @param string $app_uid {@min 1}{@max 32}
|
* @param string $app_uid {@min 1}{@max 32}
|
||||||
* @param array $request_data
|
* @param array $request_data
|
||||||
|
* @param string $dyn_uid {@from path}
|
||||||
*
|
*
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*
|
*
|
||||||
* @url PUT /:app_uid/variable
|
* @url PUT /:app_uid/variable
|
||||||
*/
|
*/
|
||||||
public function doPutCaseVariables($app_uid, $request_data)
|
public function doPutCaseVariables($app_uid, $request_data, $dyn_uid = '')
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$cases = new \ProcessMaker\BusinessModel\Cases();
|
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||||
$cases->setCaseVariables($app_uid, $request_data);
|
$cases->setCaseVariables($app_uid, $request_data, $dyn_uid);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
}
|
}
|
||||||
@@ -994,5 +995,27 @@ class Cases extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute triggers
|
||||||
|
*
|
||||||
|
* @param string $app_uid {@min 1}{@max 32}
|
||||||
|
* @param string $del_index {@from body}
|
||||||
|
* @param string $obj_type {@from body}
|
||||||
|
* @param string $obj_uid {@from body}
|
||||||
|
*
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*
|
||||||
|
* @url PUT /:app_uid/execute-triggers
|
||||||
|
*/
|
||||||
|
public function doPutExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||||
|
$cases->putExecuteTriggers($app_uid, $del_index, $obj_type, $obj_uid);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,10 +132,10 @@
|
|||||||
<a href="#" class="mafe-menu-variable"></a>
|
<a href="#" class="mafe-menu-variable"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-variable-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-variable-create"><span></span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!--<li>
|
||||||
<a href="#" class="mafe-menu-eventmessages"></a>
|
<a href="#" class="mafe-menu-eventmessages"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-eventmessages-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-eventmessages-create"><span></span></a>
|
||||||
</li>
|
</li>-->
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="mafe-menu-dynaform"></a>
|
<a href="#" class="mafe-menu-dynaform"></a>
|
||||||
<a href="#" class="btn_create mafe-menu-dynaform-create"><span></span></a>
|
<a href="#" class="btn_create mafe-menu-dynaform-create"><span></span></a>
|
||||||
|
|||||||
@@ -967,7 +967,7 @@ function validateFieldSizeAutoincrement(valueType, defaultValue) {
|
|||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
id: 'REP_TAB_NAME',
|
id: 'REP_TAB_NAME',
|
||||||
fieldLabel: _("ID_TABLE_NAME") + ' <span style="font-size:9">('+_("ID_AUTO_PREFIX") + ' "PMT")</span>',
|
fieldLabel: _("ID_TABLE_NAME") + ' <span style="font-size:9">('+_("ID_AUTO_PREFIX") + ' "PMT_")</span>',
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
emptyText: _("ID_SET_A_TABLE_NAME"),
|
emptyText: _("ID_SET_A_TABLE_NAME"),
|
||||||
width: 250,
|
width: 250,
|
||||||
|
|||||||
Reference in New Issue
Block a user