From 570e7cdae87e47a3ff931d58aaacd5cd9df400d3 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Sun, 1 Apr 2012 16:28:43 +0200 Subject: [PATCH 1/3] Fixed spacing for inline edit link --- libraries/common.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index fb51325fd4..4519f30540 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1334,11 +1334,11 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view // document.write conflicts with jQuery, hence used $().append() echo ""; } From 00b897ba34b6a948ba2187586eeae678c7b34d8a Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Sun, 1 Apr 2012 19:15:02 +0200 Subject: [PATCH 2/3] Allow js_includes wrapped in IE-conditional comments --- libraries/core.lib.php | 26 +++++++++++++++++++++----- libraries/header_scripts.inc.php | 6 +++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/libraries/core.lib.php b/libraries/core.lib.php index a714f995e9..f39e52e7de 100644 --- a/libraries/core.lib.php +++ b/libraries/core.lib.php @@ -723,16 +723,32 @@ function PMA_linkURL($url) * Returns HTML code to include javascript file. * * @param string $url Location of javascript, relative to js/ folder. + * @param optional string $ie_conditional true - wrap with IE conditional comment + * 'lt 9' etc. - wrap for specific IE version * * @return string HTML code for javascript inclusion. */ -function PMA_includeJS($url) +function PMA_includeJS($url, $ie_conditional = false) { - if (strpos($url, '?') === false) { - return '' . "\n"; - } else { - return '' . "\n"; + $include = ''; + if ($ie_conditional !== false) { + if ($ie_conditional === true) { + $include .= '' . "\n"; + } + return $include; } /** diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php index c8a68ac1cb..de2c25913f 100644 --- a/libraries/header_scripts.inc.php +++ b/libraries/header_scripts.inc.php @@ -53,7 +53,11 @@ $GLOBALS['js_include'][] = 'get_image.js.php?theme=' . urlencode($_SESSION['PMA_ // avoid loading twice a js file $GLOBALS['js_include'] = array_unique($GLOBALS['js_include']); foreach ($GLOBALS['js_include'] as $js_script_file) { - echo PMA_includeJS($js_script_file); + $ie_conditional = false; + if (is_array($js_script_file)) { + list($js_script_file, $ie_conditional) = $js_script_file; + } + echo PMA_includeJS($js_script_file, $ie_conditional); } // Below javascript Updates the title of the frameset if possible ?> From 5b09d0f06650c2059e4148d1122be4a0c39d7bda Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Sun, 1 Apr 2012 20:14:50 +0200 Subject: [PATCH 3/3] Cleanup HTML5 validity issues --- db_qbe.php | 4 ++-- db_tracking.php | 2 +- js/import.js | 1 + js/rte/common.js | 2 +- libraries/Index.class.php | 4 ++-- libraries/common.lib.php | 25 +++++++++++++++++-------- libraries/display_import.lib.php | 6 ++---- libraries/display_tbl.lib.php | 2 +- libraries/rte/rte_list.lib.php | 16 ++++++++++++++++ prefs_manage.php | 16 ++++++++-------- tbl_select.php | 6 +----- tbl_structure.php | 6 +++--- themes/original/css/theme_right.css.php | 11 ++++++++++- themes/pmahomme/css/theme_right.css.php | 11 ++++++++++- 14 files changed, 75 insertions(+), 37 deletions(-) diff --git a/db_qbe.php b/db_qbe.php index de8bbe31e2..767933fd9f 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -369,7 +369,7 @@ for ($y = 0; $y <= $row; $y++) { - +
: @@ -451,7 +451,7 @@ for ($y = 0; $y <= $row; $y++) {
- +
: diff --git a/db_tracking.php b/db_tracking.php index 76c24fb713..765e39bb1f 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -185,7 +185,7 @@ if (isset($my_tables)) { - + diff --git a/js/import.js b/js/import.js index 98e34fafe1..f1ab31bfe0 100644 --- a/js/import.js +++ b/js/import.js @@ -81,4 +81,5 @@ $(document).ready(function() { $("#scroll_to_options_msg").hide(); $(".format_specific_options").css({ "border": 0, "margin": 0, "padding": 0 }); $(".format_specific_options h3").remove(); + //$("form[name=import] *").unwrap(); }); diff --git a/js/rte/common.js b/js/rte/common.js index a1a553cdea..859d6e1efc 100644 --- a/js/rte/common.js +++ b/js/rte/common.js @@ -334,7 +334,7 @@ $(document).ready(function () { var $table = $curr_row.parent(); // Check how many rows will be left after we remove // the one that the user has requested us to remove - if ($table.find('tr').length === 2) { + if ($table.find('tr').length === 3) { // If there are two rows left, it means that they are // the header of the table and the rows that we are // about to remove, so after the removal there will be diff --git a/libraries/Index.class.php b/libraries/Index.class.php index 76f4742601..750d52c51f 100644 --- a/libraries/Index.class.php +++ b/libraries/Index.class.php @@ -473,9 +473,9 @@ class PMA_Index if (! $print_mode) { $this_params = $GLOBALS['url_params']; $this_params['index'] = $index->getName(); - $r .= '\n"; $retval .= " \n"; $retval .= " \n"; $retval .= " \n"; - $retval .= "
' . ' ' . "\n"; + echo '
' . "\n"; if ($message instanceof PMA_Message) { if (isset($GLOBALS['special_message'])) { @@ -2790,21 +2790,24 @@ function PMA_toggleButton($action, $select_name, $options, $callback) $retval .= "
\n"; $retval .= " \n"; + $retval .= str_replace(' ', ' ', $options[1]['label']) . "\n"; + $retval .= "
\n"; $retval .= "
 
\n"; $retval .= " $link_off\n"; $retval .= "
"; - $retval .= str_replace(' ', ' ', $options[0]['label']) . "
\n"; + $retval .= str_replace(' ', ' ', $options[0]['label']) . "\n"; $retval .= " \n"; + $retval .= "
\n"; + $retval .= "
\n"; $retval .= " $callback\n"; $retval .= " {$GLOBALS['text_dir']}\n"; $retval .= " \n"; @@ -3316,7 +3319,13 @@ function PMA_ajaxResponse($message, $success = true, $extra_data = array()) */ function PMA_browseUploadFile($max_upload_size) { - echo ''; + if ($GLOBALS['is_upload'] && !empty($GLOBALS['cfg']['UploadDir'])) { + echo '