BUG 0000 Report tables ver2 (improvements to pmtables data edit)
improvements and unification with PMTables
@@ -689,7 +689,7 @@ class AdditionalTables extends BaseAdditionalTables {
|
||||
$aData['className'] = $sClassName;
|
||||
$aData['connection'] = $connection;
|
||||
$aData['GUID'] = $sAddTabUid;
|
||||
$aData['firstColumn'] = strtoupper($aFields[1]['FLD_NAME']);
|
||||
$aData['firstColumn'] = strtoupper($aFields[0]['FLD_NAME']);
|
||||
$aData['totalColumns'] = count($aFields);
|
||||
$aData['useIdGenerator'] = 'false';
|
||||
$oTP1 = new TemplatePower(PATH_TPL . 'additionalTables' . PATH_SEP . 'Table.tpl');
|
||||
@@ -1170,8 +1170,7 @@ var additionalTablesDataDelete = function(sUID, sKeys) {
|
||||
$sClassPeerName = $sClassName . 'Peer';
|
||||
$con = Propel::getConnection($aData['DBS_UID']);
|
||||
$oCriteria = new Criteria($aData['DBS_UID']);
|
||||
var_dump($aData['DBS_UID']);
|
||||
print_r($oCriteria);
|
||||
|
||||
//eval('$oCriteria->addSelectColumn(' . $sClassPeerName . '::PM_UNIQUE_ID);');
|
||||
eval('$oCriteria->addSelectColumn("\'1\' AS DUMMY");');
|
||||
foreach ($aData['FIELDS'] as $aField) {
|
||||
@@ -1221,7 +1220,8 @@ var additionalTablesDataDelete = function(sUID, sKeys) {
|
||||
}
|
||||
|
||||
$oCriteriaCount = clone $oCriteria;
|
||||
$count = $sClassPeerName::doCount($oCriteria);
|
||||
//$count = $sClassPeerName::doCount($oCriteria);
|
||||
eval('$count = '.$sClassPeerName.'::doCount($oCriteria);');
|
||||
|
||||
if (isset($limit)) {
|
||||
$oCriteria->setLimit($limit);
|
||||
@@ -1229,7 +1229,8 @@ var additionalTablesDataDelete = function(sUID, sKeys) {
|
||||
if (isset($start)) {
|
||||
$oCriteria->setOffset($start);
|
||||
}
|
||||
$rs = $sClassPeerName::doSelectRS($oCriteria);
|
||||
//$rs = $sClassPeerName::doSelectRS($oCriteria);
|
||||
eval('$rs = '.$sClassPeerName.'::doSelectRS($oCriteria);');
|
||||
$rs->setFetchmode (ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rows = Array();
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* pmTables controller
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||
* @inherits Controller
|
||||
* @access public
|
||||
*/
|
||||
|
||||
class pmTables extends Controller
|
||||
{
|
||||
public $debug = true;
|
||||
/**
|
||||
* @param boolean debug
|
||||
*/
|
||||
public $debug = FALSE;
|
||||
|
||||
/**
|
||||
* getting default list
|
||||
* @param string $httpData->PRO_UID (opional)
|
||||
*/
|
||||
public function index($httpData)
|
||||
{
|
||||
global $RBAC;
|
||||
@@ -26,11 +39,18 @@ class pmTables extends Controller
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
/**
|
||||
* edit pmtable
|
||||
* @param string $httpData->id
|
||||
*/
|
||||
public function edit($httpData)
|
||||
{
|
||||
$addTabUid = isset($_GET['id']) ? $_GET['id'] : false;
|
||||
require_once PATH_CONTROLLERS . 'pmTablesProxy.php';
|
||||
$addTabUid = isset($httpData->id) ? $httpData->id : false;
|
||||
$table = false;
|
||||
$repTabPluginPermissions = false;
|
||||
$additionalTables = new AdditionalTables();
|
||||
$additionalTables = new AdditionalTables();
|
||||
|
||||
if ($addTabUid !== false) { // if is a edit request
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
@@ -38,7 +58,6 @@ class pmTables extends Controller
|
||||
$tableFields = array();
|
||||
$fieldsList = array();
|
||||
|
||||
$additionalTables = new AdditionalTables();
|
||||
$table = $additionalTables->load($addTabUid, true);
|
||||
|
||||
// list the case fields
|
||||
@@ -52,7 +71,7 @@ class pmTables extends Controller
|
||||
//list dynaform fields
|
||||
switch ($table['ADD_TAB_TYPE']) {
|
||||
case 'NORMAL':
|
||||
$fields = $this->_getDynafields($table['PRO_UID']);
|
||||
$fields = pmTablesProxy::_getDynafields($table['PRO_UID']);
|
||||
|
||||
foreach ($fields as $field) {
|
||||
//select to not assigned fields for available grid
|
||||
@@ -73,7 +92,7 @@ class pmTables extends Controller
|
||||
// $G_FORM = new Form($table['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||
// $gridFields = $G_FORM->getVars(false);
|
||||
$fieldsList = array();
|
||||
$gridFields = $this->_getGridDynafields($table['PRO_UID'], $gridId);
|
||||
$gridFields = pmTablesProxy::_getGridDynafields($table['PRO_UID'], $gridId);
|
||||
foreach ($gridFields as $gfield) {
|
||||
if (!in_array($gfield['name'], $tableFields)) {
|
||||
$fieldsList[] = array(
|
||||
@@ -105,6 +124,10 @@ class pmTables extends Controller
|
||||
G::RenderPage('publish', 'extJs');
|
||||
}
|
||||
|
||||
/**
|
||||
* show pmTable data list
|
||||
* @param string $httpData->id
|
||||
*/
|
||||
function data($httpData)
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
@@ -119,7 +142,12 @@ class pmTables extends Controller
|
||||
|
||||
|
||||
/**
|
||||
* protected functions
|
||||
* - protected functions (non-callable from controller outside) -
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get simple report plugin definition
|
||||
* @param $type
|
||||
*/
|
||||
protected function _getSimpleReportPluginDef()
|
||||
{
|
||||
@@ -140,104 +168,5 @@ class pmTables extends Controller
|
||||
return $repTabPluginPermissions;
|
||||
}
|
||||
|
||||
protected function _getDynafields($proUid, $type = 'xmlform')
|
||||
{
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
$fields = array();
|
||||
$fieldsNames = array();
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
|
||||
$oCriteria->add(DynaformPeer::PRO_UID, $proUid);
|
||||
$oCriteria->add(DynaformPeer::DYN_TYPE, $type);
|
||||
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
|
||||
$excludeFieldsList = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit',
|
||||
'listbox', 'checkgroup', 'grid', 'javascript');
|
||||
|
||||
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
if (file_exists(PATH_DYNAFORM . PATH_SEP . $aRow['DYN_FILENAME'] . '.xml')) {
|
||||
$G_FORM = new Form($aRow['DYN_FILENAME'], PATH_DYNAFORM, SYS_LANG);
|
||||
|
||||
if ($G_FORM->type == 'xmlform' || $G_FORM->type == '') {
|
||||
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||
if (!in_array($fieldNode->type, $excludeFieldsList) && !in_array($fieldName, $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||
$fieldsNames[] = $fieldName;
|
||||
|
||||
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||
$fieldsNames[] = $fieldName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
protected function _getGridDynafields($proUid, $gridId)
|
||||
{
|
||||
$fields = array();
|
||||
$fieldsNames = array();
|
||||
$excludeFieldsList = array('title', 'subtitle', 'link', 'file', 'button', 'reset', 'submit',
|
||||
'listbox', 'checkgroup', 'grid', 'javascript');
|
||||
|
||||
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||
|
||||
$G_FORM = new Form($proUid . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||
|
||||
if ($G_FORM->type == 'grid') {
|
||||
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||
if (!in_array($fieldNode->type, $excludeFieldsList) && !in_array($fieldName, $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||
$fieldsNames[] = $fieldName;
|
||||
|
||||
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||
$fieldsNames[] = $fieldName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
protected function _getGridFields($proUid)
|
||||
{
|
||||
$aFields = array();
|
||||
$aFieldsNames = array();
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
|
||||
$oCriteria->add(DynaformPeer::PRO_UID, $proUid);
|
||||
$oDataset = DynaformPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$G_FORM = new Form($aRow['DYN_FILENAME'], PATH_DYNAFORM, SYS_LANG);
|
||||
if ($G_FORM->type == 'xmlform') {
|
||||
foreach($G_FORM->fields as $k => $v) {
|
||||
if ($v->type == 'grid') {
|
||||
if (!in_array($k, $aFieldsNames)) {
|
||||
$aFields[] = array('name' => $k, 'xmlform' => str_replace($proUid . '/', '', $v->xmlGrid));
|
||||
$aFieldsNames[] = $k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
return $aFields;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +1,72 @@
|
||||
<?php
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
/**
|
||||
* pmTablesProxy
|
||||
* @author Erik Amaru Ortiz <erik@colosa.com, aortiz.erik@gmail.com>
|
||||
* @inherits HttpProxyController
|
||||
* @access public
|
||||
*/
|
||||
|
||||
//G::LoadClass('processMap');
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
|
||||
class pmTablesProxy extends HttpProxyController
|
||||
{
|
||||
public function getList($params)
|
||||
|
||||
/**
|
||||
* get pmtables list
|
||||
* @param string $httpData->start
|
||||
* @param string $httpData->limit
|
||||
* @param string $httpData->textFilter
|
||||
*/
|
||||
public function getList($httpData)
|
||||
{
|
||||
G::LoadClass('configuration');
|
||||
G::LoadClass('processMap');
|
||||
$configurations = new Configurations();
|
||||
$processMap = new processMap();
|
||||
|
||||
// setting parameters
|
||||
$config = $configurations->getConfiguration('additionalTablesList', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||
$env = $configurations->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$limit_size = isset($config->pageSize) ? $config['pageSize'] : 20;
|
||||
$start = isset($params->start) ? $params->start : 0;
|
||||
$limit = isset($params->limit) ? $params->limit : $limit_size;
|
||||
$filter = isset($params->textFilter) ? $params->textFilter : '';
|
||||
$pro_uid = isset($params->pro_uid) ? $params->pro_uid : null;
|
||||
$start = isset($httpData->start) ? $httpData->start : 0;
|
||||
$limit = isset($httpData->limit) ? $httpData->limit : $limit_size;
|
||||
$filter = isset($httpData->textFilter) ? $httpData->textFilter : '';
|
||||
$pro_uid = isset($httpData->pro_uid) ? $httpData->pro_uid : null;
|
||||
|
||||
//$process = $pro_uid == '' ? array('not_equal'=>$pro_uid) : array('equal'=>$pro_uid);
|
||||
$process = null;
|
||||
if ($pro_uid !== null) {
|
||||
$process = $pro_uid == '' ? array('not_equal'=>$pro_uid) : array('equal'=>$pro_uid);
|
||||
$addTables = AdditionalTables::getAll($start, $limit, $filter, $process);
|
||||
|
||||
$c = $processMap->getReportTablesCriteria($pro_uid);
|
||||
$oDataset = RoutePeer::doSelectRS($c);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$reportTablesOldList = array();
|
||||
while($oDataset->next()) {
|
||||
$reportTablesOldList[] = $oDataset->getRow();
|
||||
}
|
||||
$addTables['count'] += count($reportTablesOldList);
|
||||
|
||||
foreach ($reportTablesOldList as $i => $oldRepTab) {
|
||||
$addTables['rows'][] = array(
|
||||
'ADD_TAB_UID' => $oldRepTab['REP_TAB_UID'],
|
||||
'PRO_UID' => $oldRepTab['PRO_UID'],
|
||||
'ADD_TAB_DESCRIPTION' => $oldRepTab['REP_TAB_TITLE'],
|
||||
'ADD_TAB_NAME' => $oldRepTab['REP_TAB_NAME'],
|
||||
'ADD_TAB_TYPE' => $oldRepTab['REP_TAB_TYPE'],
|
||||
'TYPE' => 'CLASSIC'
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$addTables = AdditionalTables::getAll($start, $limit, $filter);
|
||||
}
|
||||
|
||||
return $addTables;
|
||||
}
|
||||
|
||||
/**
|
||||
* get processesList
|
||||
*/
|
||||
public function getProcessList()
|
||||
{
|
||||
require_once 'classes/model/Process.php';
|
||||
@@ -34,6 +75,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $process->getAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* get database connection list
|
||||
*/
|
||||
public function getDbConnectionsList()
|
||||
{
|
||||
G::LoadClass ( 'dbConnections');
|
||||
@@ -50,23 +94,26 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $dbConnections;
|
||||
}
|
||||
|
||||
public function availableFieldsReportTables($params)
|
||||
/**
|
||||
* get dynaform fields
|
||||
* @param string $httpData->PRO_UID
|
||||
* @param string $httpData->TYPE
|
||||
* @param string $httpData->GRID_UID
|
||||
*/
|
||||
public function getDynafields($httpData)
|
||||
{
|
||||
G::LoadClass('reportTables');
|
||||
//G::LoadClass('xmlfield_InputPM');
|
||||
|
||||
$aFields['FIELDS'] = array();
|
||||
$aFields['PRO_UID'] = $_POST['PRO_UID'];
|
||||
$aFields['PRO_UID'] = $httpData->PRO_UID;
|
||||
|
||||
if(isset($_POST['TYPE']) && $_POST['TYPE'] == 'GRID') {
|
||||
if(isset($httpData->TYPE) && $httpData->TYPE == 'GRID') {
|
||||
$aProcessGridFields = Array();
|
||||
if (isset($_POST['GRID_UID'])) {
|
||||
if (isset($httpData->GRID_UID)) {
|
||||
global $G_FORM;
|
||||
list($gridName, $gridId) = explode('-', $_POST['GRID_UID']);
|
||||
list($gridName, $gridId) = explode('-', $httpData->GRID_UID);
|
||||
|
||||
// $G_FORM = new Form($_POST['PRO_UID'] . '/' . $gridId, PATH_DYNAFORM, SYS_LANG, false);
|
||||
//$gridFields = $G_FORM->getVars(false);
|
||||
$gridFields = getGridDynafields($_POST['PRO_UID'], $gridId);
|
||||
$gridFields = $this->_getGridDynafields($httpData->PRO_UID, $gridId);
|
||||
|
||||
foreach ($gridFields as $gfield) {
|
||||
$aProcessGridFields[] = array(
|
||||
@@ -75,7 +122,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$gridFields = getGridFields($aFields['PRO_UID']);
|
||||
$gridFields = $this->_getGridFields($aFields['PRO_UID']);
|
||||
|
||||
foreach ($gridFields as $gfield) {
|
||||
$aProcessGridFields[] = array(
|
||||
@@ -88,8 +135,7 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
} else {
|
||||
$aProcessFields = Array();
|
||||
//$dynFields = getDynaformsVars($aFields['PRO_UID'], false);
|
||||
$dynFields = getDynafields($aFields['PRO_UID']);
|
||||
$dynFields = $this->_getDynafields($aFields['PRO_UID']);
|
||||
|
||||
foreach ($dynFields as $dfield) {
|
||||
$aProcessFields[] = array(
|
||||
@@ -103,6 +149,9 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* save pm table
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
@@ -253,10 +302,14 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* delete pm table
|
||||
* @param string $httpData->rows
|
||||
*/
|
||||
public function delete($httpData)
|
||||
{
|
||||
G::LoadClass('reportTables');
|
||||
$rows = G::json_decode($_REQUEST['rows']);
|
||||
$rows = G::json_decode($httpData->rows);
|
||||
$rp = new reportTables();
|
||||
$at = new AdditionalTables();
|
||||
|
||||
@@ -277,7 +330,13 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getData($httpData)
|
||||
/**
|
||||
* get pm tables data
|
||||
* @param string $httpData->id
|
||||
* @param string $httpData->start
|
||||
* @param string $httpData->limit
|
||||
*/
|
||||
public function dataView($httpData)
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
|
||||
@@ -285,17 +344,100 @@ class pmTablesProxy extends HttpProxyController
|
||||
$co = new Configurations();
|
||||
$config = $co->getConfiguration('additionalTablesData', 'pageSize','',$_SESSION['USER_LOGGED']);
|
||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$start = isset($httpData->start) ? $httpData->start : 0;
|
||||
$limit = isset($httpData->limit) ? $httpData->limit : $limit_size;
|
||||
|
||||
$oAdditionalTables = new AdditionalTables();
|
||||
$table = $oAdditionalTables->load($httpData->id, true);
|
||||
$result = $oAdditionalTables->getAllData($httpData->id, $start, $limit);
|
||||
|
||||
$keys = array();
|
||||
foreach ($table['FIELDS'] as $field) {
|
||||
if ($field['FLD_KEY'] == '1') {
|
||||
$keys[] = $field['FLD_NAME'];
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($result['rows'] as $i => $row) {
|
||||
$indexes = array();
|
||||
foreach ($keys as $key) {
|
||||
$indexes[] = $row[$key];
|
||||
}
|
||||
|
||||
$result['rows'][$i]['__index__'] = implode('-', $indexes);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* create pm tables record
|
||||
* @param string $httpData->id
|
||||
* @param string $httpData->start
|
||||
* @param string $httpData->limit
|
||||
*/
|
||||
public function dataCreate($httpData)
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
$oAdditionalTables = new AdditionalTables();
|
||||
$table = $oAdditionalTables->load($httpData->id, true);
|
||||
$className = $table['ADD_TAB_CLASS_NAME'];
|
||||
$sClassPeerName = $className . 'Peer';
|
||||
|
||||
// protected functions
|
||||
$rows = G::json_decode($httpData->rows);
|
||||
if (is_array($rows)) {
|
||||
|
||||
}
|
||||
else { //then is object
|
||||
|
||||
}
|
||||
print_R($row);
|
||||
//$sClassPeerName::retrieveByPk();
|
||||
}
|
||||
|
||||
/**
|
||||
* update pm tables record
|
||||
* @param string $httpData->id
|
||||
* @param string $httpData->start
|
||||
* @param string $httpData->limit
|
||||
*/
|
||||
public function dataUpdate($httpData)
|
||||
{
|
||||
require_once 'classes/model/AdditionalTables.php';
|
||||
$oAdditionalTables = new AdditionalTables();
|
||||
$table = $oAdditionalTables->load($httpData->id, true);
|
||||
$className = $table['ADD_TAB_CLASS_NAME'];
|
||||
$slassPeerName = $className . 'Peer';
|
||||
|
||||
$rows = G::json_decode($httpData->rows);
|
||||
print_R($rows);
|
||||
if (is_array($rows)) {
|
||||
|
||||
}
|
||||
else { //then is object
|
||||
$keys = explode('-', $rows->__index__);
|
||||
foreach ($keys as $key) {
|
||||
$params .= is_numeric($key) ? $key : "'$key'";
|
||||
}
|
||||
|
||||
$obj = null;
|
||||
var_dump('$obj = $classPeerName::retrieveByPk('.implode(',', $params).')');
|
||||
eval('$obj = $classPeerName::retrieveByPk('.implode(',', $params).')');
|
||||
var_dump($obj);
|
||||
}
|
||||
|
||||
//$sClassPeerName::retrieveByPk();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* - protected functions (non callable from controller outside) -
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get report table default columns
|
||||
* @param $type
|
||||
*/
|
||||
protected function _getReportTableDefaultColumns($type='NORMAL')
|
||||
{
|
||||
$defaultColumns = array();
|
||||
@@ -346,27 +488,13 @@ class pmTablesProxy extends HttpProxyController
|
||||
|
||||
return $defaultColumns;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///
|
||||
/**
|
||||
* Translates a string with underscores into camel case (e.g. first_name -> firstName)
|
||||
* @param string $str String in underscore format
|
||||
* @param bool $capitalise_first_char If true, capitalise the first char in $str
|
||||
* @return string $str translated into camel caps
|
||||
/**
|
||||
* Get all dynaform fields from a process (without grid fields)
|
||||
* @param $proUid
|
||||
* @param $type [values:xmlform/grid]
|
||||
*/
|
||||
function to_camel_case($str, $capitalise_first_char = true) {
|
||||
if($capitalise_first_char) {
|
||||
$str[0] = strtoupper($str[0]);
|
||||
}
|
||||
$func = create_function('$c', 'return strtoupper($c[1]);');
|
||||
return preg_replace_callback('/_([a-z])/', $func, $str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getDynafields($proUid, $type = 'xmlform')
|
||||
function _getDynafields($proUid, $type = 'xmlform')
|
||||
{
|
||||
require_once 'classes/model/Dynaform.php';
|
||||
$fields = array();
|
||||
@@ -409,7 +537,12 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function getGridDynafields($proUid, $gridId)
|
||||
/**
|
||||
* Get all dynaform grid fields from a process
|
||||
* @param $proUid
|
||||
* @param $gridId
|
||||
*/
|
||||
function _getGridDynafields($proUid, $gridId)
|
||||
{
|
||||
$fields = array();
|
||||
$fieldsNames = array();
|
||||
@@ -437,7 +570,11 @@ class pmTablesProxy extends HttpProxyController
|
||||
return $fields;
|
||||
}
|
||||
|
||||
function getGridFields($proUid)
|
||||
/**
|
||||
* Get all dynaform fields inside all grids from a process
|
||||
* @param $proUid
|
||||
*/
|
||||
function _getGridFields($proUid)
|
||||
{
|
||||
$aFields = array();
|
||||
$aFieldsNames = array();
|
||||
@@ -464,49 +601,6 @@ class pmTablesProxy extends HttpProxyController
|
||||
}
|
||||
return $aFields;
|
||||
}
|
||||
|
||||
function getAllFields($filepath, $includeTypes=array(), $excludeTypes=array())
|
||||
{
|
||||
$G_FORM = new Form($filepath, PATH_DYNAFORM, SYS_LANG);
|
||||
$fields = array();
|
||||
$fieldsNames = array();
|
||||
$labelFieldsTypeList = array('dropdown', 'checkbox', 'radiogroup', 'yesno');
|
||||
|
||||
if ($G_FORM->type == 'xmlform' || $G_FORM->type == '') {
|
||||
|
||||
foreach($G_FORM->fields as $fieldName => $fieldNode) {
|
||||
if (!in_array($fieldNode->type, $excludeTypes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count($includeTypes) > 0) {
|
||||
if (in_array($fieldNode->type, $includeTypes) && !in_array($fieldName, $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||
$fieldsNames[] = $fieldName;
|
||||
|
||||
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||
$fieldsNames[] = $fieldName;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!in_array($fieldName, $fieldsNames)) {
|
||||
|
||||
$fields[] = array('name' => $fieldName, 'type' => $fieldNode->type, 'label'=> $fieldNode->label);
|
||||
$fieldsNames[] = $fieldName;
|
||||
|
||||
if (in_array($fieldNode->type, $labelFieldsTypeList) && !in_array($fieldName.'_label', $fieldsNames)) {
|
||||
$fields[] = array('name' => $fieldName . '_label', 'type' => $fieldNode->type, 'label'=>$fieldNode->label . '_label');
|
||||
$fieldsNames[] = $fieldName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Handle PMtables Data
|
||||
* @author Erik A. O. <erik@colosa.com>
|
||||
*/
|
||||
|
||||
var newButton;
|
||||
var editButton;
|
||||
@@ -43,7 +47,7 @@ Ext.onReady(function(){
|
||||
|
||||
backButton = new Ext.Action({
|
||||
text: _('ID_BACK'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_arrow_redo',
|
||||
icon: '/images/back-icon.png',
|
||||
handler: BackPMList
|
||||
});
|
||||
|
||||
@@ -54,6 +58,15 @@ Ext.onReady(function(){
|
||||
//This loop loads columns and fields to store and column model
|
||||
_columns = new Array();
|
||||
_fields = new Array();
|
||||
_idProperty = '__index__';
|
||||
|
||||
//default generated id
|
||||
_columns.push({
|
||||
id: _idProperty,
|
||||
hidden: true
|
||||
});
|
||||
|
||||
_fields.push({name: _idProperty});
|
||||
|
||||
if (tableDef.FIELDS.length !== 0) {
|
||||
for (i in tableDef.FIELDS) {
|
||||
@@ -61,10 +74,18 @@ Ext.onReady(function(){
|
||||
id: tableDef.FIELDS[i].FLD_NAME,
|
||||
header: tableDef.FIELDS[i].FLD_DESCRIPTION,
|
||||
dataIndex: tableDef.FIELDS[i].FLD_NAME,
|
||||
width: 40
|
||||
width: 40,
|
||||
editor:{
|
||||
xtype: 'textfield',
|
||||
allowBlank: true
|
||||
}
|
||||
});
|
||||
|
||||
_fields.push({name: tableDef.FIELDS[i].FLD_NAME});
|
||||
|
||||
if(_idProperty == '' && tableDef.FIELDS[i].FLD_KEY) {
|
||||
_idProperty = tableDef.FIELDS[i].FLD_NAME;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,17 +111,49 @@ Ext.onReady(function(){
|
||||
// }
|
||||
// });
|
||||
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url: '../pmTablesProxy/getData?id=' + tableDef.ADD_TAB_UID
|
||||
}),
|
||||
reader : new Ext.data.JsonReader({
|
||||
root: 'rows',
|
||||
totalProperty: 'count',
|
||||
fields : _fields
|
||||
})
|
||||
//row editor for table columns grid
|
||||
editor = new Ext.ux.grid.RowEditor({
|
||||
saveText: _("ID_UPDATE")
|
||||
});
|
||||
|
||||
var proxy = new Ext.data.HttpProxy({
|
||||
//url: '../pmTablesProxy/getData?id=' + tableDef.ADD_TAB_UID
|
||||
api: {
|
||||
read : '../pmTablesProxy/dataView?id=' + tableDef.ADD_TAB_UID,
|
||||
create : '../pmTablesProxy/dataCreate?id=' + tableDef.ADD_TAB_UID,
|
||||
update : '../pmTablesProxy/dataUpdate?id=' + tableDef.ADD_TAB_UID,
|
||||
destroy: '../pmTablesProxy/dataDestroy?id=' + tableDef.ADD_TAB_UID
|
||||
},
|
||||
baseParams : {id: tableDef.ADD_TAB_UID},
|
||||
})
|
||||
|
||||
// The new DataWriter component.
|
||||
var writer = new Ext.data.JsonWriter({
|
||||
encode: true,
|
||||
writeAllFields: false
|
||||
});
|
||||
|
||||
var reader = new Ext.data.JsonReader({
|
||||
root : 'rows',
|
||||
idProperty : 'id',
|
||||
fields : _fields,
|
||||
idProperty : _idProperty,
|
||||
totalProperty: 'count'
|
||||
})
|
||||
|
||||
store = new Ext.data.GroupingStore({
|
||||
proxy : proxy,
|
||||
reader : reader,
|
||||
writer : writer, // <-- plug a DataWriter into the store just as you would a Reader
|
||||
autoSave: true // <-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
|
||||
});
|
||||
|
||||
// load the store immeditately
|
||||
//store.load();
|
||||
|
||||
//store.on('update', store._update, store);
|
||||
|
||||
|
||||
cmodel = new Ext.grid.ColumnModel({
|
||||
defaults: {
|
||||
width: 50,
|
||||
@@ -163,11 +216,12 @@ Ext.onReady(function(){
|
||||
},
|
||||
store: store,
|
||||
cm: cmodel,
|
||||
plugins: [editor],
|
||||
//sm: smodel,
|
||||
tbar:[newButton,'-',editButton, deleteButton,'-',importButton,{xtype: 'tbfill' }, backButton],
|
||||
bbar: bbarpaging,
|
||||
listeners: {
|
||||
rowdblclick: EditPMTableRow,
|
||||
//rowdblclick: EditPMTableRow,
|
||||
render: function(){
|
||||
this.loadMask = new Ext.LoadMask(this.body, {msg:_('ID_LOADING_GRID')});
|
||||
}
|
||||
@@ -261,7 +315,8 @@ ImportPMTableCSV = function(){
|
||||
|
||||
//Load PM Table List
|
||||
BackPMList = function(){
|
||||
location.href = 'additionalTablesList';
|
||||
//location.href = 'additionalTablesList';
|
||||
history.back();
|
||||
};
|
||||
|
||||
//Gets UIDs from a array of rows
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Report tables Edit
|
||||
* PM tables Edit
|
||||
* @author Erik A. O. <erik@colosa.com>
|
||||
*/
|
||||
|
||||
@@ -25,7 +25,7 @@ Ext.onReady(function(){
|
||||
// store for available fields grid
|
||||
storeA = new Ext.data.GroupingStore( {
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url: '../pmTablesProxy/availableFieldsReportTables'
|
||||
url: '../pmTablesProxy/getDynafields'
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root: 'processFields',
|
||||
@@ -100,8 +100,20 @@ Ext.onReady(function(){
|
||||
listeners:{
|
||||
selectionchange: function(sm){
|
||||
switch(sm.getCount()){
|
||||
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||
default: Ext.getCmp('removeButton').enable(); break;
|
||||
case 0:
|
||||
//Ext.getCmp('removeButton').disable();
|
||||
Ext.getCmp('editColumn').disable();
|
||||
Ext.getCmp('removeColumn').disable();
|
||||
break;
|
||||
case 1:
|
||||
Ext.getCmp('editColumn').enable();
|
||||
Ext.getCmp('removeColumn').enable();
|
||||
break;
|
||||
default:
|
||||
//Ext.getCmp('removeButton').enable();
|
||||
Ext.getCmp('editColumn').disable();
|
||||
Ext.getCmp('removeColumn').enable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,9 +302,21 @@ Ext.onReady(function(){
|
||||
plugins: [editor, checkColumn],
|
||||
tbar: [
|
||||
{
|
||||
icon: '/images/addcolumn.jpg',
|
||||
text: _("ID_ADD_COLUMN"),
|
||||
icon: '/images/add-row-after.png',
|
||||
text: _("ID_ADD_FIELD"),
|
||||
handler: addColumn
|
||||
}, {
|
||||
id: 'editColumn',
|
||||
icon: '/images/edit-row.png',
|
||||
text: _("ID_EDIT_FIELD"),
|
||||
disabled: true,
|
||||
handler: editColumn
|
||||
}, {
|
||||
id: 'removeColumn',
|
||||
icon: '/images/delete-row.png',
|
||||
text: _("ID_REMOVE_FIELD"),
|
||||
disabled: true,
|
||||
handler: removeColumn
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
@@ -524,7 +548,7 @@ Ext.onReady(function(){
|
||||
region : 'north',
|
||||
labelWidth : 120,
|
||||
labelAlign :'right',
|
||||
title : 'New Report Table',
|
||||
title : 'New PM Table',
|
||||
bodyStyle :'padding:10px',
|
||||
frame : true,
|
||||
height : 120,
|
||||
@@ -541,16 +565,18 @@ Ext.onReady(function(){
|
||||
|
||||
southPanel = new Ext.FormPanel({
|
||||
region: 'south',
|
||||
buttons:[ {
|
||||
buttons:[
|
||||
{
|
||||
text: TABLE === false ? _("ID_CREATE") : _("ID_UPDATE"),
|
||||
handler: createReportTable
|
||||
}, {
|
||||
text:_("ID_CANCEL"),
|
||||
handler: function() {
|
||||
proParam = PRO_UID !== false ? '?PRO_UID='+PRO_UID : '';
|
||||
//location.href = '../pmTables' + proParam; //history.back();
|
||||
location.href = '../pmTables' + proParam; //history.back();
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
var viewport = new Ext.Viewport({
|
||||
@@ -608,8 +634,13 @@ function createReportTable()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (row.data['field_type'] == '') {
|
||||
PMExt.error(_('ID_ERROR'), 'Set a field type for <b>'+row.data['field_name']+'</b> please.');
|
||||
return false;
|
||||
}
|
||||
|
||||
// validate field size for varchar & int column types
|
||||
if(row.data['field_type'] == 'VARCHAR' || row.data['field_type'] == 'INT') {
|
||||
if ((row.data['field_type'] == 'VARCHAR' || row.data['field_type'] == 'INT') && row.data['field_size'] == '') {
|
||||
PMExt.error(_('ID_ERROR'), 'Set a field size for '+row.data['field_name']+' ('+row.data['field_type']+') please.');
|
||||
return false;
|
||||
}
|
||||
@@ -678,6 +709,24 @@ function addColumn() {
|
||||
editor.startEditing(length);
|
||||
}
|
||||
|
||||
function editColumn()
|
||||
{
|
||||
var row = Ext.getCmp('assignedGrid').getSelectionModel().getSelected();
|
||||
var selIndex = store.indexOfId(row.id);
|
||||
editor.stopEditing();
|
||||
assignedGrid.getView().refresh();
|
||||
assignedGrid.getSelectionModel().selectRow(selIndex);
|
||||
editor.startEditing(selIndex);
|
||||
}
|
||||
|
||||
function removeColumn()
|
||||
{
|
||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_REMOVE_FIELD'), function(){
|
||||
var records = Ext.getCmp('assignedGrid').getSelectionModel().getSelections();
|
||||
Ext.each(records, Ext.getCmp('assignedGrid').store.remove, Ext.getCmp('assignedGrid').store);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
////ASSIGNBUTON FUNCTIONALITY
|
||||
AssignFieldsAction = function(){
|
||||
|
||||
@@ -25,7 +25,7 @@ Ext.onReady(function(){
|
||||
// store for available fields grid
|
||||
storeA = new Ext.data.GroupingStore( {
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url: '../pmTablesProxy/availableFieldsReportTables'
|
||||
url: '../pmTablesProxy/getDynafields'
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root: 'processFields',
|
||||
@@ -100,8 +100,21 @@ Ext.onReady(function(){
|
||||
listeners:{
|
||||
selectionchange: function(sm){
|
||||
switch(sm.getCount()){
|
||||
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||
default: Ext.getCmp('removeButton').enable(); break;
|
||||
case 0:
|
||||
Ext.getCmp('removeButton').disable();
|
||||
Ext.getCmp('removeColumn').disable();
|
||||
break;
|
||||
case 1:
|
||||
var record = Ext.getCmp('assignedGrid').getSelectionModel().getSelected();
|
||||
|
||||
if (record.data.field_dyn == '' && record.data.field_name != 'APP_UID' && record.data.field_name != 'APP_NUMBER' && record.data.field_name != 'ROW') {
|
||||
Ext.getCmp('removeColumn').enable();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Ext.getCmp('removeButton').enable();
|
||||
Ext.getCmp('removeColumn').disable();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -273,11 +286,19 @@ Ext.onReady(function(){
|
||||
sm : sm,
|
||||
store : store,
|
||||
plugins : [editor, checkColumn],
|
||||
tbar : [{
|
||||
icon: '/images/addcolumn.jpg',
|
||||
text: _("ID_ADD_CUSTOM_COLUMN"),
|
||||
tbar : [
|
||||
{
|
||||
icon: '/images/add-row-after.png',
|
||||
text: _("ID_ADD_FIELD"),
|
||||
handler: addColumn
|
||||
}],
|
||||
}, {
|
||||
id: 'removeColumn',
|
||||
icon: '/images/delete-row.png',
|
||||
text: _("ID_REMOVE_FIELD"),
|
||||
disabled: true,
|
||||
handler: removeColumn
|
||||
}
|
||||
],
|
||||
listeners: {
|
||||
render: function(grid) {
|
||||
var ddrow = new Ext.dd.DropTarget(grid.getView().mainBody, {
|
||||
@@ -780,7 +801,7 @@ function createReportTable()
|
||||
}
|
||||
|
||||
// validate field size for varchar & int column types
|
||||
if(row.data['field_type'] == 'VARCHAR' || row.data['field_type'] == 'INT') {
|
||||
if ((row.data['field_type'] == 'VARCHAR' || row.data['field_type'] == 'INT') && row.data['field_size'] == '') {
|
||||
PMExt.error(_('ID_ERROR'), 'Set a field size for '+row.data['field_name']+' ('+row.data['field_type']+') please.');
|
||||
return false;
|
||||
}
|
||||
@@ -792,11 +813,6 @@ function createReportTable()
|
||||
columns.push(row.data);
|
||||
}
|
||||
|
||||
if (!hasSomePrimaryKey) {
|
||||
PMExt.error(_('ID_ERROR'), 'You need set one column at least as Primary Key.');
|
||||
return;
|
||||
}
|
||||
|
||||
Ext.Ajax.request({
|
||||
url: '../pmTablesProxy/save',
|
||||
params: {
|
||||
@@ -850,6 +866,14 @@ function addColumn()
|
||||
editor.startEditing(length);
|
||||
}
|
||||
|
||||
function removeColumn()
|
||||
{
|
||||
PMExt.confirm(_('ID_CONFIRM'), _('ID_CONFIRM_REMOVE_FIELD'), function(){
|
||||
var records = Ext.getCmp('assignedGrid').getSelectionModel().getSelections();
|
||||
Ext.each(records, Ext.getCmp('assignedGrid').store.remove, Ext.getCmp('assignedGrid').store);
|
||||
});
|
||||
}
|
||||
|
||||
////ASSIGNBUTON FUNCTIONALITY
|
||||
AssignFieldsAction = function(){
|
||||
records = Ext.getCmp('availableGrid').getSelectionModel().getSelections();
|
||||
@@ -955,7 +979,7 @@ loadFieldNormal = function(){
|
||||
Ext.getCmp('availableGrid').store.removeAll();
|
||||
Ext.getCmp('availableGrid').store.load({
|
||||
params: {
|
||||
action: "availableFieldsReportTables",
|
||||
action: "getDynafields",
|
||||
PRO_UID: PRO_UID !== false ? PRO_UID : Ext.getCmp('PROCESS').getValue()
|
||||
}
|
||||
});
|
||||
@@ -968,7 +992,7 @@ loadFieldsGrids = function(){
|
||||
|
||||
available.store.load({
|
||||
params: {
|
||||
action: "availableFieldsReportTables",
|
||||
action: "getDynafields",
|
||||
PRO_UID: PRO_UID !== false ? PRO_UID : Ext.getCmp('PROCESS').getValue(),
|
||||
TYPE: 'GRID',
|
||||
GRID_UID: Ext.getCmp('REP_TAB_GRID').getValue()
|
||||
|
||||
@@ -36,11 +36,7 @@ Ext.onReady(function(){
|
||||
|
||||
pageSize = parseInt(CONFIG.pageSize);
|
||||
|
||||
newButton = new Ext.Action({
|
||||
text: _('ID_NEW'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||
|
||||
menu: [
|
||||
var newMenuOptions = [
|
||||
{
|
||||
text: 'New Table',
|
||||
handler: newPMTable
|
||||
@@ -48,19 +44,32 @@ Ext.onReady(function(){
|
||||
text: 'New Report Table',
|
||||
handler: NewReportTable
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
if (PRO_UID !== false) {
|
||||
newMenuOptions.push({
|
||||
text: 'New Report Table (Old Version)',
|
||||
handler: NewReportTableOld
|
||||
});
|
||||
}
|
||||
|
||||
newButton = new Ext.Action({
|
||||
text: _('ID_NEW'),
|
||||
icon: '/images/add-table.png',
|
||||
|
||||
menu: newMenuOptions
|
||||
});
|
||||
|
||||
editButton = new Ext.Action({
|
||||
text: _('ID_EDIT'),
|
||||
icon: '/images/icon-edit.png',
|
||||
icon: '/images/edit-table.png',
|
||||
handler: EditPMTable,
|
||||
disabled: true
|
||||
});
|
||||
|
||||
deleteButton = new Ext.Action({
|
||||
text: _('ID_DELETE'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||
icon: '/images/delete-table.png',
|
||||
handler: DeletePMTable,
|
||||
disabled: true
|
||||
});
|
||||
@@ -149,9 +158,10 @@ Ext.onReady(function(){
|
||||
comboPageSize.setValue(pageSize);
|
||||
|
||||
|
||||
|
||||
store = new Ext.data.GroupingStore( {
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url: 'pmTablesProxy/getList'
|
||||
url: 'pmTablesProxy/getList' + (PRO_UID? '?pro_uid='+PRO_UID: '')
|
||||
}),
|
||||
reader : new Ext.data.JsonReader( {
|
||||
root: 'rows',
|
||||
@@ -315,14 +325,19 @@ DoNothing = function(){};
|
||||
|
||||
//Load New PM Table Forms
|
||||
NewReportTable = function(){
|
||||
//location.href = 'additionalTablesNew';
|
||||
|
||||
if(PRO_UID !== false)
|
||||
location.href = 'pmTables/edit?PRO_UID='+PRO_UID+'&tableType=report';
|
||||
else
|
||||
location.href = 'pmTables/edit?tableType=report';
|
||||
};
|
||||
|
||||
NewReportTableOld = function(){
|
||||
//location.href = 'reportTables/edit?PRO_UID='+PRO_UID+'&tableType=report';
|
||||
//parent.reportTables2();
|
||||
//parent.Pm.data.render.buildingBlocks.injector('reportTables2');
|
||||
location.href = 'reportTables/reportTables_Edit?PRO_UID='+PRO_UID;
|
||||
};
|
||||
|
||||
newPMTable = function(){
|
||||
location.href = 'pmTables/edit?tableType=table';
|
||||
};
|
||||
@@ -336,7 +351,7 @@ EditPMTable = function(){
|
||||
location.href = 'pmTables/edit?id='+row.data.ADD_TAB_UID+'&tableType=' + tableType + proParam;
|
||||
}
|
||||
else { //edit old report table
|
||||
location.href = '../reportTables/reportTables_Edit?REP_TAB_UID='+row.data.ADD_TAB_UID
|
||||
location.href = 'reportTables/reportTables_Edit?REP_TAB_UID='+row.data.ADD_TAB_UID
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
BIN
workflow/public_html/images/add-row-after.png
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
workflow/public_html/images/add-table.png
Normal file
|
After Width: | Height: | Size: 606 B |
BIN
workflow/public_html/images/back-icon.png
Normal file
|
After Width: | Height: | Size: 997 B |
BIN
workflow/public_html/images/delete-row.png
Normal file
|
After Width: | Height: | Size: 371 B |
BIN
workflow/public_html/images/delete-table.png
Normal file
|
After Width: | Height: | Size: 612 B |
BIN
workflow/public_html/images/edit-row.png
Normal file
|
After Width: | Height: | Size: 726 B |
BIN
workflow/public_html/images/edit-table.png
Normal file
|
After Width: | Height: | Size: 700 B |