Add columns into the tree for tables and views.
authorxzilla <xzilla>
Thu, 29 Jun 2006 18:22:33 +0000 (18:22 +0000)
committerxzilla <xzilla>
Thu, 29 Jun 2006 18:22:33 +0000 (18:22 +0000)
tables.php
tblproperties.php
viewproperties.php
views.php

index 05b2f2b2f50075bfa271fc7bbb0b1e6cf2f18326..b7314b8bf709726ca4828e5d5302edf059fa6ad8 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tables.php,v 1.79 2006/06/23 00:57:37 xzilla Exp $
+        * $Id: tables.php,v 1.80 2006/06/29 18:22:33 xzilla Exp $
         */
 
        // Include application functions
                        'action' => url('redirect.php',
                                                        $reqvars,
                                                        array('table' => field('relname'))
-                                               )
+                                               ),
+                       'branch' => url('tblproperties.php',
+                                                       $reqvars,
+                                                       array (
+                                                               'action' => 'tree',
+                                                               'table' => field('relname')
+                                                       )
+                                               )       
                );
                
                $misc->printTreeXML($tables, $attrs);
index 205e6cae008e6dfc18b6909a0230895b13ae7ac0..bba9e9439d6f09cccd8601d3612e14b61af4ae36 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * List tables in a database
         *
-        * $Id: tblproperties.php,v 1.69 2006/06/17 12:57:36 xzilla Exp $
+        * $Id: tblproperties.php,v 1.70 2006/06/29 18:22:34 xzilla Exp $
         */
 
        // Include application functions
                
        }
 
+       function doTree() {
+               global $misc, $data;
+
+               $columns = $data->getTableAttributes($_REQUEST['table']);
+               $reqvars = $misc->getRequestVars('table');
+
+               $attrs = array (
+                       'text'   => field('attname'),
+                       'icon'   => 'Column',
+                       'toolTip'=> field('comment')
+               );
+
+               $misc->printTreeXML($columns, $attrs);
+
+               exit;
+       }
+
+       if ($action == 'tree') doTree();
+
        /**
         * Show default list of columns in the table
         */
index 3f76efe32fd6200fccb9596338c536bd5019d017..2b23bcf22dfa37e7e1ba222579aa6a13e017548f 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * List views in a database
         *
-        * $Id: viewproperties.php,v 1.19 2006/06/23 00:31:44 xzilla Exp $
+        * $Id: viewproperties.php,v 1.20 2006/06/29 18:22:34 xzilla Exp $
         */
 
        // Include application functions
                                echo "<p>{$lang['strinvalidparam']}</p>\n";
                }
        }
-       
+
+       function doTree () {
+               global $misc, $data;
+
+               $columns = $data->getTableAttributes($_REQUEST['view']);
+               $reqvars = $misc->getRequestVars('view');
+
+               $attrs = array (
+                       'text'   => field('attname'),
+                       'icon'   => 'Column',
+                       'toolTip'=> field('comment')
+               );
+
+               $misc->printTreeXML($columns, $attrs);
+
+               exit;
+       }
+
+       if ($action == 'tree') doTree();
+
        /**
         * Show view definition and virtual columns
         */
index 74412a6b8e706edcc9c573affa00388565cb3f98..cfb9c4d7f4a332d88054473e326f624c593e0cbc 100644 (file)
--- a/views.php
+++ b/views.php
@@ -3,7 +3,7 @@
        /**
         * Manage views in a database
         *
-        * $Id: views.php,v 1.57 2006/06/23 00:57:37 xzilla Exp $
+        * $Id: views.php,v 1.58 2006/06/29 18:22:34 xzilla Exp $
         */
 
        // Include application functions
                        'action' => url('redirect.php',
                                                        $reqvars,
                                                        array('view' => field('relname'))
+                                               ),
+                       'branch' => url('viewproperties.php',
+                                                       $reqvars,
+                                                       array (
+                                                               'action' => 'tree',
+                                                               'view' => field('relname')
+                                                       )
                                                )
                );