From 554c1df307b47516dc0249fc75bdec2ad5c5e5a1 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 9 Oct 2011 06:45:32 -0400 Subject: [PATCH 1/4] Increase the size of the Create table dialog, based on the frame size --- js/functions.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/js/functions.js b/js/functions.js index b8db5151ef..9d14eec696 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1491,6 +1491,12 @@ function PMA_createTableDialog( div, url , target) button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();} var $msgbox = PMA_ajaxShowMessage(); + /* + * Use a little less than the current value, otherwise there is some + * overlap; 16 is a value found by experimenting + */ + var current_width = $(top.frame_content).width() - 16; + var current_height = $(top.frame_content).height() - 16; $.get( target , url , function(data) { //in the case of an error, show the error message returned. @@ -1511,8 +1517,8 @@ function PMA_createTableDialog( div, url , target) .append(data) .dialog({ title: PMA_messages['strCreateTable'], - height: 600, - width: 900, + height: current_height, + width: current_width, open: PMA_verifyTypeOfAllColumns, buttons : button_options }); // end dialog options From 8945a2a614cd4d62a462da339b3e8dd099f3115e Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 9 Oct 2011 07:42:10 -0400 Subject: [PATCH 2/4] Convert footnotes to tooltips in Create table dialog - works when called from main panel - from navi panel, this commit fixed a js error but the tooltips do not appear yet --- js/functions.js | 1 + navigation.php | 1 + 2 files changed, 2 insertions(+) diff --git a/js/functions.js b/js/functions.js index 9d14eec696..0ed1a2263e 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1523,6 +1523,7 @@ function PMA_createTableDialog( div, url , target) buttons : button_options }); // end dialog options } + PMA_convertFootnotesToTooltips($(div)); PMA_ajaxRemoveMessage($msgbox); }) // end $.get() diff --git a/navigation.php b/navigation.php index 300bdb592d..126b00d208 100644 --- a/navigation.php +++ b/navigation.php @@ -107,6 +107,7 @@ require_once './libraries/header_http.inc.php'; Date: Sun, 9 Oct 2011 15:27:55 -0400 Subject: [PATCH 3/4] Need to call PMA_createTableDialog() in the context of frame_content, in order for the qtip tooltips to work --- js/navigation.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/navigation.js b/js/navigation.js index 724d9f9d9b..af5146acd8 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -229,8 +229,12 @@ $(document).ready(function(){ var div = parent.frame_content.$('
'); var target = "tbl_create.php"; - /*Calling to the createTableDialog function*/ - PMA_createTableDialog(div , url , target); + /* + * Calling to the createTableDialog function + * (needs to be done in the context of frame_content in order + * for the qtip tooltips to work) + * */ + parent.frame_content.PMA_createTableDialog(div , url , target); });//end of create new table });//end of document get ready From c0120649fb23f4c26981f60f2b8aafff5859cdba Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 9 Oct 2011 15:41:42 -0400 Subject: [PATCH 4/4] - Refer to window.document - No need for variables here Thanks to Piotr for the tips --- js/functions.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/functions.js b/js/functions.js index 0ed1a2263e..f9a249488c 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1491,12 +1491,6 @@ function PMA_createTableDialog( div, url , target) button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();} var $msgbox = PMA_ajaxShowMessage(); - /* - * Use a little less than the current value, otherwise there is some - * overlap; 16 is a value found by experimenting - */ - var current_width = $(top.frame_content).width() - 16; - var current_height = $(top.frame_content).height() - 16; $.get( target , url , function(data) { //in the case of an error, show the error message returned. @@ -1517,8 +1511,12 @@ function PMA_createTableDialog( div, url , target) .append(data) .dialog({ title: PMA_messages['strCreateTable'], - height: current_height, - width: current_width, + /* + * Use a little less than the current value, otherwise there is i + * some overlap; 16 is a value found by experimenting + */ + height: $(window.document).height() - 16, + width: $(window.document).width() - 16, open: PMA_verifyTypeOfAllColumns, buttons : button_options }); // end dialog options