The branch, master has been updated via 938e807173a997b4ce69095d7189262cd3b8273a (commit) via 33627e953385e67cdf531ce1a560df2cfd00fc5e (commit) via 788fb45a1d6c70d52e8b627023bf01de34a22a4d (commit) via d00cf18325c07a0e23265eb83ab51b0fc3c567af (commit) via 7c3dfb454c3d0788e26e08415970577e720954c0 (commit) via 1c333e0a0828381d6afbed50a0d2c0f0e3a3433b (commit) via 379b0723bb4de8d9dee45863ee2a6f051dc36ac4 (commit) via 2111910a0777c432571e5ad8399ab26e7fd1c0b6 (commit) via f2ff3c3dc0aea2e7711d8490a8c7316d819e6e1b (commit) via 4e19ef1cbf42decb8ef5e4ea6041915af24239cb (commit) from 63c162d615db9d4275b287aed7bd9471ab0e6b8e (commit)
- Log ----------------------------------------------------------------- commit 938e807173a997b4ce69095d7189262cd3b8273a Merge: 33627e953385e67cdf531ce1a560df2cfd00fc5e 63c162d615db9d4275b287aed7bd9471ab0e6b8e Author: Marc Delisle marc@infomarc.info Date: Thu Jul 21 09:19:46 2011 -0400
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 33627e953385e67cdf531ce1a560df2cfd00fc5e Merge: 2ece3cda3dbc7b9e8c0fb4696cc2281997936b11 788fb45a1d6c70d52e8b627023bf01de34a22a4d Author: Marc Delisle marc@infomarc.info Date: Thu Jul 21 09:18:44 2011 -0400
Merge commit '788fb45a1d6c70d52e8b627023bf01de34a22a4d'
commit 788fb45a1d6c70d52e8b627023bf01de34a22a4d Merge: d00cf18325c07a0e23265eb83ab51b0fc3c567af 167d10385d610ec235d791d9b76da7bfdb008363 Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Thu Jul 21 10:01:58 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit d00cf18325c07a0e23265eb83ab51b0fc3c567af Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Thu Jul 21 10:01:21 2011 +0530
Fixed bugs in convert foot notes to tooltips logic
commit 7c3dfb454c3d0788e26e08415970577e720954c0 Merge: 1c333e0a0828381d6afbed50a0d2c0f0e3a3433b 964664525cd657ba52e82dd47c4314143ccd2516 Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Tue Jul 19 23:00:12 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 1c333e0a0828381d6afbed50a0d2c0f0e3a3433b Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Tue Jul 19 22:59:22 2011 +0530
Fixed iid dulplication issue in footnote convertion using classes
commit 379b0723bb4de8d9dee45863ee2a6f051dc36ac4 Merge: 2111910a0777c432571e5ad8399ab26e7fd1c0b6 8a2d7fbc22bdc58aa4f4bb488b724c1bab6a3c52 Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Sun Jul 17 07:18:30 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 2111910a0777c432571e5ad8399ab26e7fd1c0b6 Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Sun Jul 17 07:18:07 2011 +0530
Fixed bugs in modified initTooltips function in functions.js file
commit f2ff3c3dc0aea2e7711d8490a8c7316d819e6e1b Merge: 4e19ef1cbf42decb8ef5e4ea6041915af24239cb 10fa6c5e255f3b631c7d64950baa5005236e45e3 Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Sat Jul 16 20:42:32 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 4e19ef1cbf42decb8ef5e4ea6041915af24239cb Author: Thilanka Kaushalya lgtkaushalya@gmail.com Date: Sat Jul 16 20:36:31 2011 +0530
MOdified init tooltips function
-----------------------------------------------------------------------
Summary of changes: js/db_structure.js | 9 +++++- js/functions.js | 58 ++++++++++++++++++++++++++++++++++------------ libraries/common.lib.php | 7 +---- 3 files changed, 51 insertions(+), 23 deletions(-)
diff --git a/js/db_structure.js b/js/db_structure.js index b1c2ff0..1f2d0e6 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -63,9 +63,12 @@ $(document).ready(function() { currrent_insert_table = $(this); var $url = $(this).attr("href"); if ($url.substring(0, 15) == "tbl_change.php?") { - $url = $url.substring(15); + $url = $url.substring(15); }
+ if ($("#insert_table_dialog").length > 0) { + $("#insert_table_dialog").remove(); + } var $div = $('<div id="insert_table_dialog"></div>'); var target = "tbl_change.php";
@@ -110,10 +113,12 @@ $(document).ready(function() { $dialog.find("#topmenucontainer").hide(); //Adding the datetime pikers for the dialog $dialog.find('.datefield, .datetimefield').each(function () { - PMA_addDatepicker($(this)); + PMA_addDatepicker($(this)); }); $(".insertRowTable").addClass("ajax"); $("#buttonYes").addClass("ajax"); + $div = $("#insert_table_dialog"); + PMA_convertFootnotesToTooltips($div); } PMA_ajaxRemoveMessage($msgbox); }) // end $.get() diff --git a/js/functions.js b/js/functions.js index 7f0c90f..5dac084 100644 --- a/js/functions.js +++ b/js/functions.js @@ -2242,7 +2242,9 @@ function displayMoreTableOpts() { }
} -$(document).ready(initTooltips); +$(document).ready(function(){ + PMA_convertFootnotesToTooltips(); +});
/** * Ensures indexes names are valid according to their type and, for a primary @@ -2278,27 +2280,53 @@ function checkIndexName(form_id) return true; } // end of the 'checkIndexName()' function
- -/* Displays tooltips */ -function initTooltips() { +/** + * function to convert the footnotes to tooltips + * + * @param jquery-Object $div a div jquery object which crries the domain + * for searching footnootes. If we ommit this + * parameter the function searches the footnotes + * in the whole body + **/ +function PMA_convertFootnotesToTooltips($div) { // Hide the footnotes from the footer (which are displayed for // JavaScript-disabled browsers) since the tooltip is sufficient - $(".footnotes").hide(); - $(".footnotes span").each(function() { + + if ($div == undefined || ! $div instanceof jQuery || $div.length == 0) { + $div = $("#serverinfo").parent(); + } + + $footnotes = $div.find(".footnotes"); + + $footnotes.hide(); + $footnotes.find('span').each(function() { $(this).children("sup").remove(); }); // The border and padding must be removed otherwise a thin yellow box remains visible - $(".footnotes").css("border", "none"); - $(".footnotes").css("padding", "0px"); + $footnotes.css("border", "none"); + $footnotes.css("padding", "0px");
// Replace the superscripts with the help icon - $("sup[class='footnotemarker']").hide(); - $("img[class='footnotemarker']").show(); - - $("img[class='footnotemarker']").each(function() { - var span_id = $(this).attr("id"); - span_id = span_id.split("_")[1]; - var tooltip_text = $(".footnotes span[id='footnote_" + span_id + "']").html(); + $div.find("sup.footnotemarker").hide(); + $div.find("img.footnotemarker").show(); + + $div.find("img.footnotemarker").each(function() { + var img_class = $(this).attr("class"); + /** img contains two classes, as example "footnotemarker footnote_1_1". + * We spit it by second classs and take it for the id of span + */ + img_class = img_class.split(" "); + for (i = 0; i < img_class.length; i++) { + if (img_class[i].split("_")[0] == "footnote") { + var span_id = img_class[i].split("_")[1]; + } + } + /** + * Now we get the #id of the span with span_id variable. As an example if we + * initially get the img class as "footnotemarker footnote_2_3", now we get + * #2 as the span_id. Using that we can find footnote_2 in footnotes. + * */ + var tooltip_text = $footnotes.find("span[id='footnote_" + span_id + "']").html(); $(this).qtip({ content: tooltip_text, show: { delay: 0 }, diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 9e27e6c..cb85c10 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -459,18 +459,13 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice') $GLOBALS['footnotes'] = array(); } $nr = count($GLOBALS['footnotes']) + 1; - // this is the first instance of this message - $instance = 1; $GLOBALS['footnotes'][$key] = array( 'note' => $message, 'type' => $type, 'nr' => $nr, - 'instance' => $instance ); } else { $nr = $GLOBALS['footnotes'][$key]['nr']; - // another instance of this message (to ensure ids are unique) - $instance = ++$GLOBALS['footnotes'][$key]['instance']; }
if ($bbcode) { @@ -479,7 +474,7 @@ function PMA_showHint($message, $bbcode = false, $type = 'notice')
// footnotemarker used in js/tooltip.js return '<sup class="footnotemarker">' . $nr . '</sup>' . - '<img class="footnotemarker" id="footnote_' . $nr . '_' . $instance . '" src="' . + '<img class="footnotemarker footnote_' . $nr . '" src="' . $GLOBALS['pmaThemeImage'] . 'b_help.png" alt="" />'; }
hooks/post-receive