diff --git a/ChangeLog b/ChangeLog index aab69c2ab..1ab9d8992 100755 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,10 @@ $Source$ * querywindow.php3, tbl_query_box.php3, config.inc.php3, header.inc.php3, index.php3, libraries/config_import.lib.php3: Added (optional) DB-based SQL-history with purging on login, made querywindow tabbed, improved Querywindow-compatibility. + * tbl_properties.inc.php3, config.inc.php, librarires/config_import.lib.php3: + Experimental: Added $cfg['DefaultPropDisplay']. Enables vertical display + (optional, default off) of the columns. I didn't like to have to scroll in horizontal + directions, so with this mode you can see about 6 columns at once on a single screen. 2003-02-26 Garvin Hicking * lang/german-*: better grammar. ;) diff --git a/config.inc.php3 b/config.inc.php3 index 5640cacba..ccf57de01 100755 --- a/config.inc.php3 +++ b/config.inc.php3 @@ -374,6 +374,10 @@ $cfg['ModifyDeleteAtRight'] = FALSE; // show edit/delete links on right s // (or at the bottom with vertical browse) $cfg['DefaultDisplay'] = 'horizontal'; // default display direction // (horizontal|vertical|horizontalflipped) +$cfg['DefaultPropDisplay'] = 'horizontal'; // default display direction for altering/ + // creating columns (tbl_properties) + // (horizontal|vertical) + $cfg['HeaderFlipType'] = 'css'; // table-header rotation via faking or css? (css|fake) $cfg['ShowBrowseComments'] = TRUE; // shows stored relation-comments in 'browse' mode. $cfg['ShowPropertyComments']= TRUE; // shows stored relation-comments in 'table property' mode. diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index d2c600f31..46f13e72a 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -657,6 +657,9 @@ if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) { $cfg['DefaultDisplay'] = 'horizontal'; } } + if (!isset($cfg['DefaultPropDisplay'])) { + $cfg['DefaultPropDisplay'] = 'horizontal'; + } if (!isset($cfg['RepeatCells'])) { if (isset($cfgRepeatCells)) { diff --git a/tbl_properties.inc.php3 b/tbl_properties.inc.php3 index 6c67442ff..226691df0 100755 --- a/tbl_properties.inc.php3 +++ b/tbl_properties.inc.php3 @@ -27,18 +27,18 @@ else if ($action == 'tbl_addfield.php3') { } echo "\n"; $is_backup = ($action != 'tbl_create.php3' && $action != 'tbl_addfield.php3'); -?> - - - - - - - - - -' . PMA_showMySQLDocu('Reference', 'Column_types') . ''; +$header_cells[] = $strLengthSet; +$header_cells[] = $strAttr; +$header_cells[] = $strNull; +$header_cells[] = $strDefault . '**'; +$header_cells[] = $strExtra; + require('./libraries/relation.lib.php3'); require('./libraries/transformations.lib.php3'); $cfgRelation = PMA_getRelationsParam(); @@ -49,15 +49,15 @@ $available_mime = array(); if ($cfgRelation['commwork']) { $comments_map = PMA_getComments($db, $table); - echo ''; + $header_cells[] = $strComments; if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) { $mime_map = PMA_getMIME($db, $table); $available_mime = PMA_getAvailableMIMEtypes(); - echo ''; - echo ''; - echo ''; + $header_cells[] = $strMIME_MIMEtype; + $header_cells[] = $strMIME_transformation; + $header_cells[] = $strMIME_transformation_options . '***'; } } @@ -67,39 +67,28 @@ if ($cfgRelation['commwork']) { // key fields, as tbl_addfield does. if (!$is_backup) { - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; + $header_cells[] = $strPrimary; + $header_cells[] = $strIndex; + $header_cells[] = $strUnique; + $header_cells[] = '---'; + $header_cells[] = $strIdxFulltext; } -?> - - - - - - - - - '; + if (isset($row) && !isset($row['Default']) && !empty($row['Null'])) { $row['Default'] = 'NULL'; } - echo "\n"; - ?> - - - '; + + $content_cells[$i][6] = ''; + // garvin: comments if ($cfgRelation['commwork']) { - ?> - - '; } // garvin: MIME-types if ($cfgRelation['mimework'] && $cfg['BrowseMIME'] && $cfgRelation['commwork']) { - ?> - + $content_cells[$i][8] = ' + } + + $content_cells[$i][8] .= ''; - - ' . "\n"; + $content_cells[$i][9] .= ' ' . "\n"; + if (is_array($available_mime['transformation'])) { + @reset($available_mime['transformation']); + while(list($mimekey, $transform) = each($available_mime['transformation'])) { + $checked = (isset($row) && isset($row['Field']) && isset($mime_map[$row['Field']]['transformation']) && ($mime_map[$row['Field']]['transformation'] == $available_mime['transformation_file'][$mimekey]) ? 'selected ' : ''); + $content_cells[$i][9] .= '' . "\n"; + } + } + + $content_cells[$i][9] .= ''; + + $content_cells[$i][10] = ''; } // lem9: See my other comment about removing this 'if'. @@ -322,42 +272,78 @@ for ($i = 0 ; $i < $num_fields; $i++) { } else { $checked_fulltext = ''; } - echo "\n"; - ?> - - - - - '; + $content_cells[$i][12] = "\n" . ''; + $content_cells[$i][13] = "\n" . ''; + $content_cells[$i][14] = "\n" . ''; + if (PMA_MYSQL_INT_VERSION >= 32323) { - echo "\n"; - ?> - - '; } // end if (PMA_MYSQL_INT_VERSION >= 32323) - echo "\n"; } // end if ($action ==...) - echo "\n"; - ?> - - +
' . PMA_showMySQLDocu('Reference', 'Column_types'); ?>**' . $strComments . '' . $strMIME_MIMEtype . '' . $strMIME_transformation . '' . $strMIME_transformation_options . '***$strPrimary$strIndex$strUnique---$strIdxFulltext
- - - ' . "\n"; + } else { + $content_cells[$i][0] = ''; } - echo "\n"; - ?> - " class="textfield" /> - - ' . "\n"; + if (empty($row['Type'])) { $row['Type'] = ''; $type = ''; @@ -131,31 +120,25 @@ for ($i = 0 ; $i < $num_fields; $i++) { } // end if else for ($j = 0; $j < count($cfg['ColumnTypes']); $j++) { - echo ' ' . "\n"; + $content_cells[$i][1] .= '>' . $cfg['ColumnTypes'][$j] . '' . "\n"; } // end for - ?> - - - '; + if ($is_backup) { - echo "\n"; - ?> - - '; + } else { + $content_cells[$i][2] = ''; } - echo "\n"; - ?> - " class="textfield" /> - - ' . "\n"; + if (eregi('^(set|enum)$', $type)) { $binary = 0; $unsigned = 0; @@ -176,122 +159,89 @@ for ($i = 0 ; $i < $num_fields; $i++) { $strAttribute = 'UNSIGNED ZEROFILL'; } for ($j = 0;$j < count($cfg['AttributeTypes']); $j++) { - echo ' ' . "\n"; + $content_cells[$i][3] .= '>' . $cfg['AttributeTypes'][$j] . '' . "\n"; } - ?> - - - '; + if (!isset($row) || empty($row['Null'])) { - echo "\n"; - ?> - - - not null' . "\n"; + $content_cells[$i][4] .= ' ' . "\n"; } else { - echo "\n"; - ?> - - - null' . "\n"; + $content_cells[$i][4] .= ' ' . "\n"; } - echo "\n"; - ?> - - - - - - " class="textfield" /> - - - - - - - - - - - - /> - - /> - - /> - - /> - - /> -
+ + + + + +' . "\n"; + + $bgcolor = ($i % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; + + while(list($content_row_nr, $content_row_val) = @each($content_row)) { +?> + +' . "\n"; +} ?>

- + +' . "\n"; +?> + + + + ' . "\n"; + $i++; +} +?> +
+
+= 32300) { echo "\n"; ?>