Merged colosa/processmaker into master
This commit is contained in:
@@ -14,7 +14,7 @@ Feature: Calendar
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
|
||||
|
||||
# POST /api/1.0/{workspace}/calendar
|
||||
@@ -121,4 +121,4 @@ Feature: Calendar
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
@@ -14,7 +14,7 @@ Feature: Calendar Main Tests
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
|
||||
|
||||
# GET /api/1.0/{workspace}/calendar/<cal_uid>
|
||||
@@ -239,7 +239,7 @@ Feature: Calendar Main Tests
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 8 records
|
||||
And the response has 9 records
|
||||
|
||||
|
||||
# DELETE /api/1.0/{workspace}/calendar
|
||||
@@ -268,4 +268,4 @@ Feature: Calendar Main Tests
|
||||
Then the response status code should be 200
|
||||
And the response charset is "UTF-8"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
@@ -182,4 +182,4 @@ Feature: Calendar Negative Tests
|
||||
Given that I want to delete a "Calendar"
|
||||
And I request "calendar/14606161052f50839307899033145440"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "does not exist"
|
||||
And the response status message should have the following text "cannot be deleted"
|
||||
@@ -16,7 +16,7 @@ Feature: Process Category
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 0 records
|
||||
And the response has 1 records
|
||||
|
||||
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
@@ -44,7 +44,7 @@ Feature: Process Category
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 1 records
|
||||
And the response has 2 records
|
||||
|
||||
|
||||
# PUT /api/1.0/{workspace}/project/categories
|
||||
@@ -93,4 +93,4 @@ Feature: Process Category
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 0 records
|
||||
And the response has 1 records
|
||||
@@ -16,7 +16,7 @@ Feature: Process Category Main Test
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 0 records
|
||||
And the response has 1 records
|
||||
|
||||
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
@@ -54,7 +54,7 @@ Feature: Process Category Main Test
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 7 records
|
||||
And the response has 8 records
|
||||
|
||||
|
||||
# POST /api/1.0/{workspace}/project/category
|
||||
@@ -156,4 +156,4 @@ Feature: Process Category Main Test
|
||||
And the response charset is "UTF-8"
|
||||
And the content type is "application/json"
|
||||
And the type is "array"
|
||||
And the response has 0 records
|
||||
And the response has 1 records
|
||||
@@ -30,4 +30,4 @@ Feature: Process Category Negative Tests
|
||||
Given that I want to delete a "Category"
|
||||
And I request "project/category/4177095085330818c324501061677193"
|
||||
Then the response status code should be 400
|
||||
And the response status message should have the following text "does not exist"
|
||||
And the response status message should have the following text "cannot be deleted"
|
||||
@@ -42,31 +42,6 @@ class pmDynaform
|
||||
return $this->record;
|
||||
}
|
||||
|
||||
public function getMergeValues()
|
||||
{
|
||||
$dataJSON = G::json_decode($this->record["DYN_CONTENT"]);
|
||||
$dt = $dataJSON->items[0]->items;
|
||||
$n = count($dt);
|
||||
for ($i = 0; $i < $n; $i++) {
|
||||
$dr = $dt[$i];
|
||||
$n2 = count($dr);
|
||||
for ($j = 0; $j < $n2; $j++) {
|
||||
if (isset($dr[$j]->name)) {
|
||||
$valueField = isset($this->app_data[$dr[$j]->name]) ? $this->app_data[$dr[$j]->name] : "";
|
||||
$dataJSON->items[0]->items[$i][$j]->defaultValue = $valueField;
|
||||
}
|
||||
}
|
||||
}
|
||||
$a = G::json_encode($dataJSON);
|
||||
$a = str_replace("\/", "/", $a);
|
||||
return $a;
|
||||
}
|
||||
|
||||
public function mergeValues()
|
||||
{
|
||||
$this->record["DYN_CONTENT"] = $this->getMergeValues();
|
||||
}
|
||||
|
||||
public function isResponsive()
|
||||
{
|
||||
return $this->record != null && $this->record["DYN_VERSION"] == 2 ? true : false;
|
||||
|
||||
@@ -22,18 +22,6 @@ function dynaFormChanged(frm) {
|
||||
return false;
|
||||
}
|
||||
$(window).load(function () {
|
||||
var data = jsondata;
|
||||
window.dynaform = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
keys: {
|
||||
server: location.host,
|
||||
projectId: prj_uid,
|
||||
workspace: workspace
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false
|
||||
});
|
||||
|
||||
if (pm_run_outside_main_app === 'true') {
|
||||
if (parent.showCaseNavigatorPanel) {
|
||||
parent.showCaseNavigatorPanel('DRAFT');
|
||||
@@ -44,38 +32,54 @@ $(window).load(function () {
|
||||
}
|
||||
}
|
||||
|
||||
var form = document.getElementsByTagName("form")[0];
|
||||
var data = jsondata;
|
||||
window.project = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
keys: {
|
||||
server: location.host,
|
||||
projectId: prj_uid,
|
||||
workspace: workspace
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false
|
||||
});
|
||||
new PMDynaform.core.Proxy({
|
||||
url: "http://" + window.project.keys.server + "/" + window.project.keys.apiName + "/" + window.project.keys.apiVersion + "/" + window.project.keys.workspace + "/cases/" + app_uid + "/variables",
|
||||
method: 'GET',
|
||||
data: {},
|
||||
keys: window.project.token,
|
||||
successCallback: function (xhr, response) {
|
||||
if (response[jsondata.name] && window.project.setData2) {
|
||||
window.project.setData2(response[jsondata.name]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var type = document.createElement("input");
|
||||
type.type = "hidden";
|
||||
type.name = "TYPE";
|
||||
type.value = "ASSIGN_TASK";
|
||||
|
||||
var uid = document.createElement("input");
|
||||
uid.type = "hidden";
|
||||
uid.name = "UID";
|
||||
uid.value = dyn_uid;
|
||||
|
||||
var position = document.createElement("input");
|
||||
position.type = "hidden";
|
||||
position.name = "POSITION";
|
||||
position.value = "10000";
|
||||
|
||||
var action = document.createElement("input");
|
||||
action.type = "hidden";
|
||||
action.name = "ACTION";
|
||||
action.value = "ASSIGN";
|
||||
|
||||
var dynaformname = document.createElement("input");
|
||||
dynaformname.type = "hidden";
|
||||
dynaformname.name = "__DynaformName__";
|
||||
dynaformname.value = __DynaformName__;
|
||||
|
||||
var appuid = document.createElement("input");
|
||||
appuid.type = "hidden";
|
||||
appuid.name = "APP_UID";
|
||||
appuid.value = app_uid;
|
||||
|
||||
var form = document.getElementsByTagName("form")[0];
|
||||
form.action = "cases_SaveData?UID=" + dyn_uid + "&APP_UID=" + app_uid;
|
||||
form.method = "post";
|
||||
form.appendChild(type);
|
||||
|
||||
@@ -385,7 +385,6 @@ if ($actionAjax == 'dynaformChangeLogViewHistory') {
|
||||
G::LoadClass('pmDynaform');
|
||||
$a = new pmDynaform($_GET['DYN_UID'], $Fields['APP_DATA']);
|
||||
if ($a->isResponsive()) {
|
||||
$a->mergeValues();
|
||||
$a->printView((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION']);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
@@ -475,7 +474,6 @@ if ($actionAjax == 'historyDynaformGridPreview') {
|
||||
G::LoadClass('pmDynaform');
|
||||
$a = new pmDynaform($_GET['DYN_UID'], $Fields['APP_DATA']);
|
||||
if ($a->isResponsive()) {
|
||||
$a->mergeValues();
|
||||
$a->printView((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION']);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_POST['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view');
|
||||
|
||||
@@ -264,7 +264,6 @@ try {
|
||||
G::LoadClass('pmDynaform');
|
||||
$a = new pmDynaform($_GET['UID'], $Fields['APP_DATA']);
|
||||
if ($a->isResponsive()) {
|
||||
$a->mergeValues();
|
||||
$a->printEdit((!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) ? "true" : "false", $_SESSION['APPLICATION'], $array);
|
||||
} else {
|
||||
$G_PUBLISH->AddContent('dynaform', 'xmlform', $_SESSION['PROCESS'] . '/' . $_GET['UID'], '', $Fields['APP_DATA'], 'cases_SaveData?UID=' . $_GET['UID'] . '&APP_UID=' . $_SESSION['APPLICATION'], '', (strtolower($oStep->getStepMode()) != 'edit' ? strtolower($oStep->getStepMode()) : ''));
|
||||
|
||||
@@ -1439,7 +1439,7 @@ class Cases
|
||||
$fields = $case->loadCase($app_uid);
|
||||
$_POST['form'] = $app_data;
|
||||
|
||||
if (!is_null($dyn_uid)) {
|
||||
if (!is_null($dyn_uid) && $dyn_uid != '') {
|
||||
$oDynaform = \DynaformPeer::retrieveByPK($dyn_uid);
|
||||
|
||||
if ($oDynaform->getDynVersion() < 2) {
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/build/css/PMDynaform.css">
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery-1.11.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery.inputmask.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/underscore/underscore-1.6.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/backbone/backbone-min.js"></script>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/build/css/PMDynaform.css">
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery-1.11.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery.inputmask.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/underscore/underscore-1.6.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/backbone/backbone-min.js"></script>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="/lib/pmdynaform/build/css/PMDynaform.css">
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery-1.11.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/jquery/jquery.inputmask.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/underscore/underscore-1.6.js"></script>
|
||||
<script type="text/javascript" src="/lib/pmdynaform/libs/backbone/backbone-min.js"></script>
|
||||
@@ -25,10 +24,31 @@
|
||||
var dyn_uid = '{DYN_UID}';
|
||||
var __DynaformName__ = '{DYNAFORMNAME}';
|
||||
var app_uid = '{APP_UID}';
|
||||
var prj_uid = '{PRJ_UID}';
|
||||
var workspace = '{WORKSPACE}';
|
||||
var credentials = {credentials};
|
||||
$(window).load(function () {
|
||||
var data = jsondata;
|
||||
window.dynaform = new PMDynaform.core.Project({
|
||||
data: data
|
||||
window.project = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
keys: {
|
||||
server: location.host,
|
||||
projectId: prj_uid,
|
||||
workspace: workspace
|
||||
},
|
||||
token: credentials,
|
||||
submitRest: false
|
||||
});
|
||||
new PMDynaform.core.Proxy({
|
||||
url: "http://" + window.project.keys.server + "/" + window.project.keys.apiName + "/" + window.project.keys.apiVersion + "/" + window.project.keys.workspace + "/cases/" + app_uid + "/variables",
|
||||
method: 'GET',
|
||||
data: {},
|
||||
keys: window.project.token,
|
||||
successCallback: function (xhr, response) {
|
||||
if (response[jsondata.name] && window.project.setData2) {
|
||||
window.project.setData2(response[jsondata.name]);
|
||||
}
|
||||
}
|
||||
});
|
||||
$(document).find('form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<!-- translations -->
|
||||
<script type="text/javascript" src="{$translationMafe}"></script>
|
||||
|
||||
Reference in New Issue
Block a user