Merged in marcoAntonioNina/processmaker/BUG-14636 (pull request #777)
BUG-14636 New Functionality - To allow set index in tables IMPROVEMENT
This commit is contained in:
@@ -302,7 +302,7 @@ class PmTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// define the Index attribute if it is defined
|
// define the Index attribute if it is defined
|
||||||
if ($column->field_index) {
|
if (isset($column->field_index) && $column->field_index) {
|
||||||
$columnNode->setAttribute( 'index', "true" );
|
$columnNode->setAttribute( 'index', "true" );
|
||||||
$indexColumnNode = $this->dom->createElement( 'index-column' );
|
$indexColumnNode = $this->dom->createElement( 'index-column' );
|
||||||
$indexColumnNode->setAttribute( 'name', $column->field_name );
|
$indexColumnNode->setAttribute( 'name', $column->field_name );
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ class pmTablesProxy extends HttpProxyController
|
|||||||
'FLD_NULL' => $column->field_null ? 1 : 0,
|
'FLD_NULL' => $column->field_null ? 1 : 0,
|
||||||
'FLD_AUTO_INCREMENT' => $column->field_autoincrement ? 1 : 0,
|
'FLD_AUTO_INCREMENT' => $column->field_autoincrement ? 1 : 0,
|
||||||
'FLD_KEY' => $column->field_key ? 1 : 0,
|
'FLD_KEY' => $column->field_key ? 1 : 0,
|
||||||
'FLD_TABLE_INDEX' => $column->field_index ? 1 : 0,
|
'FLD_TABLE_INDEX' => (isset($column->field_index) && $column->field_index) ? 1 : 0,
|
||||||
'FLD_FOREIGN_KEY' => 0,
|
'FLD_FOREIGN_KEY' => 0,
|
||||||
'FLD_FOREIGN_KEY_TABLE' => '',
|
'FLD_FOREIGN_KEY_TABLE' => '',
|
||||||
'FLD_DYN_NAME' => $column->field_dyn,
|
'FLD_DYN_NAME' => $column->field_dyn,
|
||||||
|
|||||||
@@ -1152,6 +1152,12 @@ function createReportTable()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (row.data['field_index']) {
|
||||||
|
hasSomeIndex = true;
|
||||||
|
} else {
|
||||||
|
hasSomeIndex = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (row.data['field_key']) {
|
if (row.data['field_key']) {
|
||||||
hasSomePrimaryKey = true;
|
hasSomePrimaryKey = true;
|
||||||
}
|
}
|
||||||
@@ -1246,7 +1252,7 @@ function editorFieldsEnableDisable(fieldTypeValue, fieldIndex, fieldInc, sizeEdi
|
|||||||
var swI = 1;
|
var swI = 1;
|
||||||
|
|
||||||
//Date
|
//Date
|
||||||
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIME") {
|
if (fieldTypeValue == "DATE" || fieldTypeValue == "DATETIME" || fieldTypeValue == "TIME" || fieldTypeValue == "TEXT") {
|
||||||
swSize = 0; //Disable
|
swSize = 0; //Disable
|
||||||
swPK = 0;
|
swPK = 0;
|
||||||
swAI = 0;
|
swAI = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user