Patch #2981165 Optionally disable the Type column
This commit is contained in:

committed by
Marc Delisle

parent
3ca82375d5
commit
6e68e2d149
@@ -59,6 +59,8 @@ $Id$
|
|||||||
- [core] Provide way for vendors to easily change paths to config files.
|
- [core] Provide way for vendors to easily change paths to config files.
|
||||||
+ patch #2979922, rfe #2804874 [interface] Add inline query editing, thanks to Muhammd Adnan.
|
+ patch #2979922, rfe #2804874 [interface] Add inline query editing, thanks to Muhammd Adnan.
|
||||||
- bug #2966752 [setup] Allow to configure changes tracking in setup script.
|
- bug #2966752 [setup] Allow to configure changes tracking in setup script.
|
||||||
|
+ patch #2981165 [edit] Optionally disable the Type column,
|
||||||
|
thanks to Brian Douglass - bhdouglass
|
||||||
|
|
||||||
3.3.2.0 (not yet released)
|
3.3.2.0 (not yet released)
|
||||||
- patch #2969449 [core] Name for MERGE engine varies depending on the
|
- patch #2969449 [core] Name for MERGE engine varies depending on the
|
||||||
|
@@ -1552,6 +1552,12 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
|
|||||||
toggle this setting from the interface.
|
toggle this setting from the interface.
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
<dt id="cfg_ShowFieldTypesInDataEditView">$cfg['ShowFieldTypesInDataEditView'] boolean</dt>
|
||||||
|
<dd>Defines whether or not type fields should be initially
|
||||||
|
displayed in edit/insert mode. The user can
|
||||||
|
toggle this setting from the interface.
|
||||||
|
</dd>
|
||||||
|
|
||||||
<dt id="cfg_CharEditing">$cfg['CharEditing'] string</dt>
|
<dt id="cfg_CharEditing">$cfg['CharEditing'] string</dt>
|
||||||
<dd>Defines which type of editing controls should be used for CHAR and
|
<dd>Defines which type of editing controls should be used for CHAR and
|
||||||
VARCHAR fields. Possible values are:
|
VARCHAR fields. Possible values are:
|
||||||
|
@@ -919,6 +919,13 @@ $cfg['ProtectBinary'] = 'blob';
|
|||||||
*/
|
*/
|
||||||
$cfg['ShowFunctionFields'] = true;
|
$cfg['ShowFunctionFields'] = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the type fields in edit/insert mode
|
||||||
|
*
|
||||||
|
* @global boolean $cfg['ShowFieldTypesInDataEditView']
|
||||||
|
*/
|
||||||
|
$cfg['ShowFieldTypesInDataEditView'] = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Which editor should be used for CHAR/VARCHAR fields:
|
* Which editor should be used for CHAR/VARCHAR fields:
|
||||||
* input - allows limiting of input length
|
* input - allows limiting of input length
|
||||||
|
@@ -41,6 +41,9 @@ if (isset($_REQUEST['sql_query'])) {
|
|||||||
if (isset($_REQUEST['ShowFunctionFields'])) {
|
if (isset($_REQUEST['ShowFunctionFields'])) {
|
||||||
$cfg['ShowFunctionFields'] = $_REQUEST['ShowFunctionFields'];
|
$cfg['ShowFunctionFields'] = $_REQUEST['ShowFunctionFields'];
|
||||||
}
|
}
|
||||||
|
if (isset($_REQUEST['ShowFieldTypesInDataEditView'])) {
|
||||||
|
$cfg['ShowFieldTypesInDataEditView'] = $_REQUEST['ShowFieldTypesInDataEditView'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* load relation data, foreign keys
|
* load relation data, foreign keys
|
||||||
@@ -268,10 +271,18 @@ if (! empty($sql_query)) {
|
|||||||
$url_params['sql_query'] = $sql_query;
|
$url_params['sql_query'] = $sql_query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $cfg['ShowFunctionFields'] || ! $cfg['ShowFieldTypesInDataEditView']) {
|
||||||
|
echo $strShow;
|
||||||
|
}
|
||||||
if (! $cfg['ShowFunctionFields']) {
|
if (! $cfg['ShowFunctionFields']) {
|
||||||
$this_url_params = array_merge($url_params,
|
$this_url_params = array_merge($url_params,
|
||||||
array('ShowFunctionFields' => 1, 'goto' => 'sql.php'));
|
array('ShowFunctionFields' => 1, 'ShowFieldTypesInDataEditView' => $cfg['ShowFieldTypesInDataEditView'], 'goto' => 'sql.php'));
|
||||||
echo $strShow . ' : <a href="tbl_change.php' . PMA_generate_common_url($this_url_params) . '">' . $strFunction . '</a>' . "\n";
|
echo ' : <a href="tbl_change.php' . PMA_generate_common_url($this_url_params) . '">' . $strFunction . '</a>' . "\n";
|
||||||
|
}
|
||||||
|
if (! $cfg['ShowFieldTypesInDataEditView']) {
|
||||||
|
$this_other_url_params = array_merge($url_params,
|
||||||
|
array('ShowFieldTypesInDataEditView' => 1, 'ShowFunctionFields' => $cfg['ShowFunctionFields'], 'goto' => 'sql.php'));
|
||||||
|
echo ' : <a href="tbl_change.php' . PMA_generate_common_url($this_other_url_params) . '">' . $strType . '</a>' . "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($rows as $row_id => $vrow) {
|
foreach ($rows as $row_id => $vrow) {
|
||||||
@@ -293,11 +304,17 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $strField; ?></th>
|
<th><?php echo $strField; ?></th>
|
||||||
<th><?php echo $strType; ?></th>
|
|
||||||
<?php
|
<?php
|
||||||
|
if ($cfg['ShowFieldTypesInDataEditView']) {
|
||||||
|
$this_url_params = array_merge($url_params,
|
||||||
|
array('ShowFieldTypesInDataEditView' => 0, 'ShowFunctionFields' => $cfg['ShowFunctionFields'], 'goto' => 'sql.php'));
|
||||||
|
echo ' <th><a href="tbl_change.php' . PMA_generate_common_url($this_url_params) . '" title="' . $strHide . '">' . $strType . '</a></th>' . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ($cfg['ShowFunctionFields']) {
|
if ($cfg['ShowFunctionFields']) {
|
||||||
$this_url_params = array_merge($url_params,
|
$this_url_params = array_merge($url_params,
|
||||||
array('ShowFunctionFields' => 0, 'goto' => 'sql.php'));
|
array('ShowFunctionFields' => 0, 'ShowFieldTypesInDataEditView' => $cfg['ShowFieldTypesInDataEditView'], 'goto' => 'sql.php'));
|
||||||
echo ' <th><a href="tbl_change.php' . PMA_generate_common_url($this_url_params) . '" title="' . $strHide . '">' . $strFunction . '</a></th>' . "\n";
|
echo ' <th><a href="tbl_change.php' . PMA_generate_common_url($this_url_params) . '" title="' . $strHide . '">' . $strFunction . '</a></th>' . "\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@@ -418,11 +435,12 @@ foreach ($rows as $row_id => $vrow) {
|
|||||||
<?php echo $field['Field_title']; ?>
|
<?php echo $field['Field_title']; ?>
|
||||||
<input type="hidden" name="fields_name<?php echo $field_name_appendix; ?>" value="<?php echo $field['Field_html']; ?>"/>
|
<input type="hidden" name="fields_name<?php echo $field_name_appendix; ?>" value="<?php echo $field['Field_html']; ?>"/>
|
||||||
</td>
|
</td>
|
||||||
|
<?php if ($cfg['ShowFieldTypesInDataEditView']) { ?>
|
||||||
<td align="center"<?php echo $field['wrap']; ?>>
|
<td align="center"<?php echo $field['wrap']; ?>>
|
||||||
<?php echo $field['pma_type']; ?>
|
<?php echo $field['pma_type']; ?>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php } //End if
|
||||||
|
|
||||||
// Prepares the field value
|
// Prepares the field value
|
||||||
$real_null_value = FALSE;
|
$real_null_value = FALSE;
|
||||||
|
Reference in New Issue
Block a user