Merged in gproly/processmaker/3.0.1-GA (pull request #2554)

PM-1659
This commit is contained in:
Julio Cesar Laura Avendaño
2015-08-03 08:51:27 -04:00

View File

@@ -265,6 +265,13 @@ class pmDynaform
$json->rows = count($rows); $json->rows = count($rows);
$json->data = $rows; $json->data = $rows;
} }
//todo compatibility 'columnWidth'
foreach ($json->columns as $column) {
if (!isset($column->columnWidth)) {
$json->layout = "static";
$column->columnWidth = "";
}
}
} }
//languages //languages
if ($this->lang === null && $key === "language" && isset($json->language)) { if ($this->lang === null && $key === "language" && isset($json->language)) {
@@ -517,13 +524,14 @@ class pmDynaform
exit(); exit();
} }
public function printPmDynaform() public function printPmDynaform($js = "")
{ {
$json = G::json_decode($this->record["DYN_CONTENT"]); $json = G::json_decode($this->record["DYN_CONTENT"]);
$this->jsonr($json); $this->jsonr($json);
$javascrip = "" . $javascrip = "" .
"<script type='text/javascript'>" . "<script type='text/javascript'>" .
"var jsonData = " . G::json_encode($json) . ";" . "var jsonData = " . G::json_encode($json) . ";" .
$js .
"</script>"; "</script>";
$file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html'); $file = file_get_contents(PATH_HOME . 'public_html/lib/pmdynaform/build/pmdynaform.html');