From 98e71f8805faef9787731c861543f07ff5529bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 12:50:28 +0200 Subject: [PATCH 01/16] First attempt to integrate designer into rest For now works only in pmahomme and needs lot of cleanups and fixes --- pmd_general.php | 30 +- themes/pmahomme/css/theme_right.css.php | 541 ++++++++++++++++++++++++ 2 files changed, 552 insertions(+), 19 deletions(-) diff --git a/pmd_general.php b/pmd_general.php index d270cbdd6b..45b6955d30 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -8,6 +8,8 @@ * */ require_once './libraries/pmd_common.php'; +require './libraries/db_common.inc.php'; +require './libraries/db_info.inc.php'; $tab_column = get_tab_info(); $script_tabs = get_script_tabs(); @@ -17,17 +19,6 @@ $tables_pk_or_unique_keys = get_pk_or_unique_keys(); $tables_all_keys = get_all_keys(); $hidden = "hidden"; -?> - - - - - - - - Designer - $GLOBALS['lang']); if (isset($GLOBALS['db'])) { $params['db'] = $GLOBALS['db']; @@ -125,10 +116,6 @@ echo $script_tabs . $script_contr . $script_display_field; title="" /> -
- -
-
@@ -166,8 +153,8 @@ for ($i = 0; $i < $name_cnt; $i++) { echo 'checked="checked"'; } ?> /> - ');"> @@ -185,6 +172,11 @@ for ($i = 0; $i < $name_cnt; $i++) {
+ +
+ +
+ ]" type="hidden" id="t_v__" /> -px; top: px; @@ -332,7 +324,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { } ?> -
+
Load...
Date: Fri, 19 Aug 2011 12:55:19 +0200 Subject: [PATCH 02/16] Move PMD help to documentation --- Documentation.html | 8 ++++++++ pmd_general.php | 2 +- pmd_help.php | 27 --------------------------- 3 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 pmd_help.php diff --git a/Documentation.html b/Documentation.html index 758a2bc90f..d7c76e16a4 100644 --- a/Documentation.html +++ b/Documentation.html @@ -4409,6 +4409,14 @@ chmod o+rwx tmp +

+ 6.30 How do I create a relation in designer?

+ +

To select relation, click :

+ +

+

The display column is shown in pink. To set/unset a column as the display column, click the "Choose column to display" icon, then click on the appropriate column name.

+

phpMyAdmin project

diff --git a/pmd_general.php b/pmd_general.php index 45b6955d30..3613f1f37d 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -79,7 +79,7 @@ echo $script_tabs . $script_contr . $script_display_field; /> - - - - -Designer - - - -' . __('To select relation, click :') . '
'; - echo '

'; - echo '

' . __('The display column is shown in pink. To set/unset a column as the display column, click the "Choose column to display" icon, then click on the appropriate column name.') . '

'; -?> - - From e443bdbd5a1618c3aad6040c6c71d9b365491ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 12:59:46 +0200 Subject: [PATCH 03/16] Remove explicit font definitions --- themes/pmahomme/css/theme_right.css.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index fc04961034..0a4784553c 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -3046,8 +3046,6 @@ canvas.pmd * { color: #000000; border-collapse: collapse; border: 1px solid #AAAAAA; - font-family: Tahoma, sans-serif; - font-size: 10px; z-index: 1; -moz-user-select: none; } @@ -3109,8 +3107,6 @@ canvas.pmd * { .pmd_Tabs { cursor: default; - font-family: Tahoma, sans-serif; - font-size: 10px; color: #0055bb; white-space: nowrap; text-decoration: none; @@ -3125,8 +3121,6 @@ canvas.pmd * { .pmd_Tabs2 { cursor: default; - font-family: Tahoma, sans-serif; - font-size: 10px; color: #0055bb; background: #FFEE99; text-indent: 3px; @@ -3138,10 +3132,7 @@ canvas.pmd * { } .owner { - font-family: Tahoma, sans-serif; - font-size: 9px; font-weight: normal; -/* background-color: #ffffff;*/ color: #888888; } @@ -3209,7 +3200,6 @@ canvas.pmd * { .butt { border: #4477aa solid 1px; - font-size: 11px; font-weight: bold; height: 19px; width: 70px; @@ -3219,7 +3209,6 @@ canvas.pmd * { } .L_butt2_1 { - font-size: 12px; padding: 1px; text-decoration: none; background-color: #ffffff; @@ -3229,7 +3218,6 @@ canvas.pmd * { } .L_butt2_2 { - font-size: 12px; padding: 0; border: #0099CC solid 1px; background: #FFEE99; @@ -3404,11 +3392,8 @@ a.trigger{ position: fixed; text-decoration: none; top: 60px; right: 0; -font-size: 16px; -font-family: verdana, helvetica, arial, sans-serif; color:#fff; padding: 10px 40px 10px 15px; -font-weight: 700; background:#333333 url(images/plus.png) 85% 55% no-repeat; border:1px solid #444444; display: block; @@ -3418,11 +3403,8 @@ a.trigger:hover{ position: fixed; text-decoration: none; top: 60px; right: 0; -font-size: 16px; -font-family: verdana, helvetica, arial, sans-serif; color:#080808; padding: 10px 40px 10px 15px; -font-weight: 700; background:#fff696 url(images/plus.png) 85% 55% no-repeat; border:1px solid #999; display: block; @@ -3442,7 +3424,6 @@ h2.tiger{ background-repeat: repeat-x; padding: 1px; font-weight: bold; - font-size:14px; padding: 50 20 50 20px; margin: 0 0 5px 0; width: 250px; @@ -3543,8 +3524,6 @@ h2.active { color:black; font-weight:bold; padding-left: 2px; - font-family:"Times New Roman", Times, serif; - font-size:16px; text-align:left; } From 19dd8f292885ca6adc284b6c0977cb3ccfff20d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:04:08 +0200 Subject: [PATCH 04/16] Make canvas aligned with tables --- pmd_general.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmd_general.php b/pmd_general.php index 3613f1f37d..bfb98187bf 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -117,6 +117,9 @@ echo $script_tabs . $script_contr . $script_display_field;
+
+ +
-
- -
Date: Fri, 19 Aug 2011 13:10:33 +0200 Subject: [PATCH 05/16] Fix js to match changes --- js/pmd/move.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/js/pmd/move.js b/js/pmd/move.js index eb2b246476..f5456a5bbc 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -159,8 +159,8 @@ function MouseMove(e) } if (ON_relation || ON_display_field) { - document.getElementById('hint').style.left = (Glob_X + 20) + 'px'; - document.getElementById('hint').style.top = (Glob_Y + 20) + 'px'; + document.getElementById('pmd_hint').style.left = (Glob_X + 20) + 'px'; + document.getElementById('pmd_hint').style.top = (Glob_Y + 20) + 'px'; } if (layer_menu_cur_click) { @@ -225,7 +225,7 @@ function Main() Canvas_pos(); Small_tab_refresh(); Re_load(); - id_hint = document.getElementById('hint'); + id_hint = document.getElementById('pmd_hint'); if (isIE) { General_scroll(); } @@ -535,12 +535,12 @@ function Start_relation() if (!ON_relation) { document.getElementById('foreign_relation').style.display = ''; ON_relation = 1; - document.getElementById('hint').innerHTML = PMA_messages['strSelectReferencedKey']; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strSelectReferencedKey']; + document.getElementById('pmd_hint').style.visibility = "visible"; document.getElementById('rel_button').className = 'M_butt_Selected_down'; } else { - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.visibility = "hidden"; document.getElementById('rel_button').className = 'M_butt'; click_field = 0; ON_relation = 0; @@ -561,7 +561,7 @@ function Click_field(T, f, PK) // table field } click_field = 1; link_relation = "T1=" + T + "&F1=" + f; - document.getElementById('hint').innerHTML = PMA_messages['strSelectForeignKey']; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strSelectForeignKey']; } else { Start_relation(); // hidden hint... if (j_tabs[db + '.' + T] != '1' || !PK) { @@ -596,8 +596,8 @@ function Click_field(T, f, PK) // table field display_field[T] = f; } ON_display_field = 0; - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.visibility = "hidden"; document.getElementById('display_field_button').className = 'M_butt'; makeRequest('pmd_display_field.php', 'T=' + T + '&F=' + f + '&server=' + server + '&db=' + db + '&token=' + token); } @@ -955,16 +955,16 @@ function Start_display_field() } if (!ON_display_field) { ON_display_field = 1; - document.getElementById('hint').innerHTML = PMA_messages['strChangeDisplay']; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = PMA_messages['strChangeDisplay']; + document.getElementById('pmd_hint').style.visibility = "visible"; document.getElementById('display_field_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA if (isIE) { // correct for IE document.getElementById('display_field_button').className = 'M_butt_Selected_down_IE'; } } else { - document.getElementById('hint').innerHTML = ""; - document.getElementById('hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').innerHTML = ""; + document.getElementById('pmd_hint').style.visibility = "hidden"; document.getElementById('display_field_button').className = 'M_butt'; ON_display_field = 0; } @@ -1136,8 +1136,8 @@ function add_object() var init = history_array.length; if (rel.value != '--') { if (document.getElementById('Query').value == "") { - document.getElementById('hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; + document.getElementById('pmd_hint').style.visibility = "visible"; return; } var p = document.getElementById('Query'); @@ -1168,8 +1168,8 @@ function add_object() } if (document.getElementById('h_rel_opt').value != '--') { if (document.getElementById('having').value == "") { - document.getElementById('hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; + document.getElementById('pmd_hint').style.visibility = "visible"; return; } var p = document.getElementById('having'); @@ -1186,8 +1186,8 @@ function add_object() document.getElementById('orderby').checked = false; //make orderby } - document.getElementById('hint').innerHTML = sum + "object created" ; - document.getElementById('hint').style.visibility = "visible"; + document.getElementById('pmd_hint').innerHTML = sum + "object created" ; + document.getElementById('pmd_hint').style.visibility = "visible"; //output sum new objects created var existingDiv = document.getElementById('ab'); existingDiv.innerHTML = display(init,history_array.length); From 12237ed84ff6549c6dbc1bc4640b320fd6184304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:10:49 +0200 Subject: [PATCH 06/16] Remove no longer used Help funciton --- js/pmd/move.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/js/pmd/move.js b/js/pmd/move.js index f5456a5bbc..6f302936f0 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -868,11 +868,6 @@ function No_have_constr(id_this) } } -function Help() -{ - var WinHelp = window.open("pmd_help.php", "wind1", "top=200,left=400,width=300,height=200,resizable=yes,scrollbars=yes,menubar=no"); -} - function PDF_save() { // var WinPDF = From 9a0593ab2b76889665ceefa75214b37fc506bf8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:18:05 +0200 Subject: [PATCH 07/16] Fix expanding logic --- pmd_general.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pmd_general.php b/pmd_general.php index bfb98187bf..3cf33df50f 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -238,7 +238,10 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {

> + > Date: Fri, 19 Aug 2011 13:18:51 +0200 Subject: [PATCH 08/16] Fix typo --- pmd_general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd_general.php b/pmd_general.php index 3cf33df50f..89a6d5c73c 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -239,7 +239,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { > Date: Fri, 19 Aug 2011 13:22:10 +0200 Subject: [PATCH 09/16] Get rid of useless variable --- pmd_general.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pmd_general.php b/pmd_general.php index 89a6d5c73c..cf440941fe 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -17,7 +17,6 @@ $script_contr = get_script_contr(); $tab_pos = get_tab_pos(); $tables_pk_or_unique_keys = get_pk_or_unique_keys(); $tables_all_keys = get_all_keys(); -$hidden = "hidden"; $params = array('lang' => $GLOBALS['lang']); if (isset($GLOBALS['db'])) { @@ -120,7 +119,7 @@ echo $script_tabs . $script_contr . $script_display_field;
-
@@ -432,7 +431,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -554,7 +553,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -602,7 +601,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -678,7 +677,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- @@ -732,7 +731,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- From fd13e7ad67215df22983942163cfff80712637a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:25:08 +0200 Subject: [PATCH 10/16] Use display = none instead of visibility to avoid off screen invisible elements --- js/pmd/move.js | 30 +++++++++++++++--------------- pmd_general.php | 30 +++++++++++++++--------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/js/pmd/move.js b/js/pmd/move.js index 6f302936f0..e41b107360 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -113,7 +113,7 @@ function MouseDown(e) dx = offsetx - parseInt(cur_click.style.left); dy = offsety - parseInt(cur_click.style.top); //alert(" dx = " + dx + " dy = " +dy); - document.getElementById("canvas").style.visibility = 'hidden'; + document.getElementById("canvas").style.display = 'none'; /* var left = parseInt(cur_click.style.left); var top = parseInt(cur_click.style.top); @@ -173,7 +173,7 @@ function MouseMove(e) function MouseUp(e) { if (cur_click != null) { - document.getElementById("canvas").style.visibility = 'visible'; + document.getElementById("canvas").style.display = 'inline-block'; Re_load(); cur_click.style.zIndex = 1; cur_click = null; @@ -605,7 +605,7 @@ function Click_field(T, f, PK) // table field function New_relation() { - document.getElementById('layer_new_relation').style.visibility = 'hidden'; + document.getElementById('layer_new_relation').style.display = 'none'; link_relation += '&server=' + server + '&db=' + db + '&token=' + token + '&die_save_pos=0'; link_relation += '&on_delete=' + document.getElementById('on_delete').value + '&on_update=' + document.getElementById('on_update').value; link_relation += Get_url_pos(); @@ -776,14 +776,14 @@ function Canvas_click(id) document.getElementById('layer_upd_relation').style.left = left + 'px'; var top = Glob_Y - document.getElementById('layer_upd_relation').offsetHeight - 10; document.getElementById('layer_upd_relation').style.top = top + 'px'; - document.getElementById('layer_upd_relation').style.visibility = 'visible'; + document.getElementById('layer_upd_relation').style.display = 'block'; link_relation = 'T1=' + Key0 + '&F1=' + Key1 + '&T2=' + Key2 + '&F2=' + Key3 + '&K=' + Key; } } function Upd_relation() { - document.getElementById('layer_upd_relation').style.visibility = 'hidden'; + document.getElementById('layer_upd_relation').style.display = 'none'; link_relation += '&server=' + server + '&db=' + db + '&token=' + token + '&die_save_pos=0'; link_relation += Get_url_pos(); makeRequest('pmd_relation_upd.php', link_relation); @@ -792,9 +792,9 @@ function Upd_relation() function VisibleTab(id, t_n) { if (id.checked) { - document.getElementById(t_n).style.visibility = 'visible'; + document.getElementById(t_n).style.display = 'block'; } else { - document.getElementById(t_n).style.visibility = 'hidden'; + document.getElementById(t_n).style.display = 'none'; } Re_load(); } @@ -813,10 +813,10 @@ function Hide_tab_all(id_this) // max/min all tables if (E.elements[i].type == "checkbox" && E.elements[i].id.substring(0, 10) == 'check_vis_') { if (id_this.alt == 'v') { E.elements[i].checked = true; - document.getElementById(E.elements[i].value).style.visibility = 'visible'; + document.getElementById(E.elements[i].value).style.display = 'block'; } else { E.elements[i].checked = false; - document.getElementById(E.elements[i].value).style.visibility = 'hidden'; + document.getElementById(E.elements[i].value).style.display = 'none'; } } } @@ -859,10 +859,10 @@ function No_have_constr(id_this) if (!in_array_k(E.elements[i].value, a)) if (id_this.alt == 'v') { E.elements[i].checked = true; - document.getElementById(E.elements[i].value).style.visibility = 'visible'; + document.getElementById(E.elements[i].value).style.display = 'block'; } else { E.elements[i].checked = false; - document.getElementById(E.elements[i].value).style.visibility = 'hidden'; + document.getElementById(E.elements[i].value).style.display = 'none'; } } } @@ -879,7 +879,7 @@ function General_scroll() { /* if (!document.getElementById('show_relation_olways').checked) { - document.getElementById("canvas").style.visibility = 'hidden'; + document.getElementById("canvas").style.display = 'none'; clearTimeout(timeoutID); timeoutID = setTimeout(General_scroll_end, 500); } @@ -908,7 +908,7 @@ function General_scroll_end() document.getElementById('layer_menu').style.left = document.body.scrollLeft; document.getElementById('layer_menu').style.top = document.body.scrollTop + document.getElementById('top_menu').offsetHeight; } - document.getElementById("canvas").style.visibility = 'visible'; + document.getElementById("canvas").style.display = 'block'; } */ @@ -916,7 +916,7 @@ function Show_left_menu(id_this) // max/min all tables { if (id_this.alt == "v") { document.getElementById("layer_menu").style.top = document.getElementById('top_menu').offsetHeight + 'px'; - document.getElementById("layer_menu").style.visibility = 'visible'; + document.getElementById("layer_menu").style.display = 'block'; id_this.alt = ">"; id_this.src = "pmd/images/uparrow2_m.png"; if (isIE) { @@ -924,7 +924,7 @@ function Show_left_menu(id_this) // max/min all tables } } else { document.getElementById("layer_menu").style.top = -1000 + 'px'; //fast scroll - document.getElementById("layer_menu").style.visibility = 'hidden'; + document.getElementById("layer_menu").style.display = 'none'; id_this.alt = "v"; id_this.src = "pmd/images/downarrow2_m.png"; } diff --git a/pmd_general.php b/pmd_general.php index cf440941fe..cf8d842d69 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -119,7 +119,7 @@ echo $script_tabs . $script_contr . $script_display_field;
-
@@ -380,7 +380,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="New_relation()" /> + onclick="document.getElementById('layer_new_relation').style.display = 'none';" /> @@ -396,7 +396,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -417,7 +417,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { onclick="Upd_relation()" value="" /> + onclick="document.getElementById('layer_upd_relation').style.display = 'none'; Re_load();" />
@@ -431,7 +431,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -553,7 +553,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -585,7 +585,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Rename')" /> + onclick="document.getElementById('query_rename_to').style.display = 'none';" /> @@ -601,7 +601,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -661,7 +661,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Having')" /> + onclick="document.getElementById('query_having').style.display = 'none';" /> @@ -677,7 +677,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -715,7 +715,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Aggregate')" /> + onclick="document.getElementById('query_Aggregate').style.display = 'none';" /> @@ -731,7 +731,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { - @@ -778,7 +778,7 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) { value="" onclick="edit('Where')" /> + onclick="document.getElementById('query_where').style.display = 'none';" /> From 1fa197752bea2661a25431c9d2d3eccaa72aedef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:35:13 +0200 Subject: [PATCH 11/16] Fixed displaying of table menu --- js/pmd/move.js | 5 ++++- themes/pmahomme/css/theme_right.css.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/pmd/move.js b/js/pmd/move.js index e41b107360..49be35c3be 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -915,7 +915,10 @@ function General_scroll_end() function Show_left_menu(id_this) // max/min all tables { if (id_this.alt == "v") { - document.getElementById("layer_menu").style.top = document.getElementById('top_menu').offsetHeight + 'px'; + var pos = $("#top_menu").offset(); + var height = $("#top_menu").height(); + document.getElementById("layer_menu").style.top = (pos.top + height) + 'px'; + document.getElementById("layer_menu").style.left = pos.left + 'px'; document.getElementById("layer_menu").style.display = 'block'; id_this.alt = ">"; id_this.src = "pmd/images/uparrow2_m.png"; diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 0a4784553c..ae1867711a 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -3325,9 +3325,9 @@ a.M_butt:hover { } #layer_menu { - clear: both; - float: left; z-index: 1000; + position: absolute; + left: 0; background-color: #EAEEF0; border: #999999 solid 1px; } From d77ee8191650ab47e5ddeffd4c81e51969da0aac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:41:44 +0200 Subject: [PATCH 12/16] Fix syntax errors --- themes/pmahomme/css/theme_right.css.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index ae1867711a..16b73db467 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -3520,7 +3520,7 @@ h2.active { left-padding:8px; margin:0; border-bottom:4px solid #3CF; - background-color: #D0DCE0; //#09c; + background-color: #D0DCE0; color:black; font-weight:bold; padding-left: 2px; @@ -3528,7 +3528,7 @@ h2.active { } #tblfooter { - background-color: D3DCE3; + background-color: #D3DCE3; float: right; padding-top:10px; color: black; From aaf92da021e9ce68d91d023e407aa85a2378be96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:42:24 +0200 Subject: [PATCH 13/16] Fix indentation --- themes/pmahomme/css/theme_right.css.php | 62 ++++++++++++------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 16b73db467..646a4e0f35 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -3375,49 +3375,49 @@ a.M_butt:hover { } .panel { -position: fixed; -top: 50px; -right: 0; -display: none; -background: #FFF; -border:1px solid #F5F5F5; -width: 350 px; -height: auto; -padding: 30px 170px 30px 30px; -color:#FFF; -z-index:99; + position: fixed; + top: 50px; + right: 0; + display: none; + background: #FFF; + border:1px solid #F5F5F5; + width: 350 px; + height: auto; + padding: 30px 170px 30px 30px; + color:#FFF; + z-index:99; } a.trigger{ -position: fixed; -text-decoration: none; -top: 60px; right: 0; -color:#fff; -padding: 10px 40px 10px 15px; -background:#333333 url(images/plus.png) 85% 55% no-repeat; -border:1px solid #444444; -display: block; + position: fixed; + text-decoration: none; + top: 60px; right: 0; + color:#fff; + padding: 10px 40px 10px 15px; + background:#333333 url(images/plus.png) 85% 55% no-repeat; + border:1px solid #444444; + display: block; } a.trigger:hover{ -position: fixed; -text-decoration: none; -top: 60px; right: 0; -color:#080808; -padding: 10px 40px 10px 15px; -background:#fff696 url(images/plus.png) 85% 55% no-repeat; -border:1px solid #999; -display: block; + position: fixed; + text-decoration: none; + top: 60px; right: 0; + color:#080808; + padding: 10px 40px 10px 15px; + background:#fff696 url(images/plus.png) 85% 55% no-repeat; + border:1px solid #999; + display: block; } a.active.trigger { -background:#222222 url(images/minus.png) 85% 55% no-repeat; -z-index:999; + background:#222222 url(images/minus.png) 85% 55% no-repeat; + z-index:999; } a.active.trigger:hover { -background:#fff696 url(images/minus.png) 85% 55% no-repeat; -z-index:999; + background:#fff696 url(images/minus.png) 85% 55% no-repeat; + z-index:999; } h2.tiger{ From 8214176078993523ff967538d9a4130fc68b637d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:42:33 +0200 Subject: [PATCH 14/16] Remove tabs --- themes/pmahomme/css/theme_right.css.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 646a4e0f35..6109d89129 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -1462,7 +1462,7 @@ div#queryAnalyzerDialog div.CodeMirror-scroll { } div#queryAnalyzerDialog div#queryProfiling { - height: 250px; + height: 250px; } div#queryAnalyzerDialog td.explain { @@ -1470,9 +1470,9 @@ div#queryAnalyzerDialog td.explain { } div#queryAnalyzerDialog table.queryNums { - display: none; - border:0; - text-align:left; + display: none; + border:0; + text-align:left; } .smallIndent { From 86dad703868c01089cfdceaaf3cc0a7e0bbdf10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:45:02 +0200 Subject: [PATCH 15/16] Fix some display issues --- js/pmd/move.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/js/pmd/move.js b/js/pmd/move.js index 49be35c3be..6c3f56e832 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -536,11 +536,11 @@ function Start_relation() document.getElementById('foreign_relation').style.display = ''; ON_relation = 1; document.getElementById('pmd_hint').innerHTML = PMA_messages['strSelectReferencedKey']; - document.getElementById('pmd_hint').style.visibility = "visible"; + document.getElementById('pmd_hint').style.display = 'block'; document.getElementById('rel_button').className = 'M_butt_Selected_down'; } else { document.getElementById('pmd_hint').innerHTML = ""; - document.getElementById('pmd_hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('rel_button').className = 'M_butt'; click_field = 0; ON_relation = 0; @@ -551,7 +551,7 @@ function Click_field(T, f, PK) // table field { if (ON_relation) { if (!click_field) { - //.style.display=='none' .style.visibility = "hidden" + //.style.display=='none' .style.display = 'none' if (!PK) { alert(PMA_messages['strPleaseSelectPrimaryOrUniqueKey']); return;// 0; @@ -571,7 +571,7 @@ function Click_field(T, f, PK) // table field document.getElementById('layer_new_relation').style.left = left + 'px'; var top = Glob_Y - document.getElementById('layer_new_relation').offsetHeight + 40; document.getElementById('layer_new_relation').style.top = top + 'px'; - document.getElementById('layer_new_relation').style.visibility = "visible"; + document.getElementById('layer_new_relation').style.display = 'block'; link_relation += '&T2=' + T + '&F2=' + f; } } @@ -597,7 +597,7 @@ function Click_field(T, f, PK) // table field } ON_display_field = 0; document.getElementById('pmd_hint').innerHTML = ""; - document.getElementById('pmd_hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('display_field_button').className = 'M_butt'; makeRequest('pmd_display_field.php', 'T=' + T + '&F=' + f + '&server=' + server + '&db=' + db + '&token=' + token); } @@ -954,7 +954,7 @@ function Start_display_field() if (!ON_display_field) { ON_display_field = 1; document.getElementById('pmd_hint').innerHTML = PMA_messages['strChangeDisplay']; - document.getElementById('pmd_hint').style.visibility = "visible"; + document.getElementById('pmd_hint').style.display = 'block'; document.getElementById('display_field_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA if (isIE) { // correct for IE @@ -962,7 +962,7 @@ function Start_display_field() } } else { document.getElementById('pmd_hint').innerHTML = ""; - document.getElementById('pmd_hint').style.visibility = "hidden"; + document.getElementById('pmd_hint').style.display = 'none'; document.getElementById('display_field_button').className = 'M_butt'; ON_display_field = 0; } @@ -1019,7 +1019,7 @@ function Click_option(id_this,column_name,table_name) document.getElementById(id_this).style.left = left + 'px'; // var top = Glob_Y - document.getElementById(id_this).offsetHeight - 10; document.getElementById(id_this).style.top = (screen.height / 4) + 'px'; - document.getElementById(id_this).style.visibility = "visible"; + document.getElementById(id_this).style.display = 'block'; document.getElementById('option_col_name').innerHTML = '' + PMA_messages['strAddOption'] +'"' +column_name+ '"'; col_name = column_name; tab_name = table_name; @@ -1027,7 +1027,7 @@ function Click_option(id_this,column_name,table_name) function Close_option() { - document.getElementById('pmd_optionse').style.visibility = "hidden"; + document.getElementById('pmd_optionse').style.display = 'none'; } function Select_all(id_this,owner) @@ -1135,7 +1135,7 @@ function add_object() if (rel.value != '--') { if (document.getElementById('Query').value == "") { document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('pmd_hint').style.visibility = "visible"; + document.getElementById('pmd_hint').style.display = 'block'; return; } var p = document.getElementById('Query'); @@ -1167,7 +1167,7 @@ function add_object() if (document.getElementById('h_rel_opt').value != '--') { if (document.getElementById('having').value == "") { document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; - document.getElementById('pmd_hint').style.visibility = "visible"; + document.getElementById('pmd_hint').style.display = 'block'; return; } var p = document.getElementById('having'); @@ -1185,7 +1185,7 @@ function add_object() //make orderby } document.getElementById('pmd_hint').innerHTML = sum + "object created" ; - document.getElementById('pmd_hint').style.visibility = "visible"; + document.getElementById('pmd_hint').style.display = 'block'; //output sum new objects created var existingDiv = document.getElementById('ab'); existingDiv.innerHTML = display(init,history_array.length); From d7e400416eda7ea663631ab19d8b1b59fbb1cd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Fri, 19 Aug 2011 13:49:05 +0200 Subject: [PATCH 16/16] Fix displaying of hint --- themes/pmahomme/css/theme_right.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php index 6109d89129..4fc6f43cba 100644 --- a/themes/pmahomme/css/theme_right.css.php +++ b/themes/pmahomme/css/theme_right.css.php @@ -3096,7 +3096,7 @@ canvas.pmd * { top: 50px; z-index: 3; border: #00CC66 solid 1px; - visibility: hidden; + display: none; } .scroll_tab {