diff --git a/db_structure.php b/db_structure.php index 9424391ee0..4b36a556af 100644 --- a/db_structure.php +++ b/db_structure.php @@ -453,7 +453,7 @@ foreach ($tables as $keyname => $each_table) { ?>" id="row_tbl_"> - /> @@ -675,13 +675,8 @@ $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db); ?> <?php echo __('With selected:'); ?> - - -/ - - + + / 0) { + $checkall.prop({checked: true, indeterminate: true}); + } + else { + $checkall.prop({checked: false, indeterminate: false}); + } +}); +$("input#checkall").live("change", function() { + var is_checked = $(this).is(":checked"); + $(this.form).find(checkboxes_sel).prop("checked", is_checked) + .parents("tr").toggleClass("marked", is_checked); +}); + /** * Toggles row colors of a set of 'tr' elements starting from a given element * diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index 4e86431c1b..2d0fb66dd4 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -4220,34 +4220,8 @@ class PMA_DisplayResults 'sql_query' => $this->_sql_query, 'goto' => $this->_goto, ); - $uncheckall_url = 'sql.php' . PMA_generate_common_url($_url_params); - $_url_params['checkall'] = '1'; - $checkall_url = 'sql.php' . PMA_generate_common_url($_url_params); - if ($_SESSION['tmp_user_values']['disp_direction'] == self::DISP_DIR_VERTICAL) { - - $checkall_params['onclick'] - = 'if (setCheckboxes(\'resultsForm\', true)) return false;'; - $uncheckall_params['onclick'] - = 'if (setCheckboxes(\'resultsForm\', false)) return false;'; - - } else { - - $checkall_params['onclick'] - = 'if (markAllRows(\'resultsForm\')) return false;'; - $uncheckall_params['onclick'] - = 'if (unMarkAllRows(\'resultsForm\')) return false;'; - - } - - $checkall_link = PMA_linkOrButton( - $checkall_url, __('Check All'), $checkall_params, false - ); - - $uncheckall_link = PMA_linkOrButton( - $uncheckall_url, __('Uncheck All'), $uncheckall_params, false - ); if ($_SESSION['tmp_user_values']['disp_direction'] != self::DISP_DIR_VERTICAL) { @@ -4257,10 +4231,9 @@ class PMA_DisplayResults . ' alt="' . __('With selected:') . '" />'; } - $links_html .= $checkall_link . "\n" - . ' / ' . "\n" - . $uncheckall_link . "\n" - . '' . __('With selected:') . '' . "\n"; + $links_html .= ' ' + . ' ' + . '' . __('With selected:') . '' . "\n"; $links_html .= PMA_getButtonOrImage( 'submit_mult', 'mult_submit', 'submit_mult_change', @@ -4496,13 +4469,13 @@ class PMA_DisplayResults * @param string $transform_options transformation parameters * @param string $default_function default transformation function * @param object $meta the meta-information about this field - * @param array $url_params parameters that should go to the + * @param array $url_params parameters that should go to the * download link * * @return mixed string or float - * + * * @access private - * + * * @see _getDataCellForBlobColumns(), _getDataCellForGeometryColumns(), * _getDataCellForNonNumericAndNonBlobColumns(), * _getSortedColumnMessage() @@ -4581,12 +4554,12 @@ class PMA_DisplayResults * @param bool $is_field_truncated whether the field is truncated * * @return string formatted data - * + * * @access private - * + * * @see _getDataCellForNumericColumns(), _getDataCellForGeometryColumns(), * _getDataCellForNonNumericAndNonBlobColumns(), - * + * */ private function _getRowData( $class, $condition_field, $analyzed_sql, $meta, $map, $data, @@ -4754,9 +4727,9 @@ class PMA_DisplayResults * @param string $class css classes for the td element * * @return string the generated HTML - * + * * @access private - * + * * @see _getTableBody(), _getCheckboxAndLinks() */ private function _getCheckboxForMultiRowSubmissions( @@ -4777,7 +4750,7 @@ class PMA_DisplayResults . ' diff --git a/libraries/build_html_for_db.lib.php b/libraries/build_html_for_db.lib.php index 12aa55d07f..12a163173c 100644 --- a/libraries/build_html_for_db.lib.php +++ b/libraries/build_html_for_db.lib.php @@ -79,7 +79,7 @@ function PMA_buildHtmlForDb( $out = ''; if ($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) { $out .= ''; - $out .= ' 0) { if ($is_superuser || $cfg['AllowUserDropDatabase']) { $common_url_query = PMA_generate_common_url(array('sort_by' => $sort_by, 'sort_order' => $sort_order, 'dbstats' => $dbstats)); echo '' . __('With selected:') . '' . "\n" - . '' . "\n" - . ' ' . __('Check All') . ' / ' . "\n" - . '' . "\n" - . ' ' . __('Uncheck All') . '' . "\n" - . '' . __('With selected:') . '' . "\n"; + . ' ' + . ' ' + . '' . __('With selected:') . '' . "\n"; echo PMA_getButtonOrImage('drop_selected_dbs', 'mult_submit' . ($cfg['AjaxEnable'] ? ' ajax' : ''), 'drop_selected_dbs', __('Drop'), 'b_deltbl.png'); } diff --git a/server_privileges.php b/server_privileges.php index 4b302af73e..74cce6e2d4 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1879,7 +1879,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs foreach ($user as $host) { $index_checkbox++; echo ' ' . "\n" - . ' ' . "\n" - .'' - . __('Check All') . '' . "\n" - .'/' . "\n" - .'' - . __('Uncheck All') . '' . "\n" - .'' . __('With selected:') . '' . "\n"; + .' ' + .' ' + .'' . __('With selected:') . '' . "\n"; echo PMA_getButtonOrImage( 'submit_mult', 'mult_submit', 'submit_mult_export', diff --git a/tbl_structure.php b/tbl_structure.php index 8ccc21782d..7ffb4b4782 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -334,7 +334,7 @@ foreach ($fields as $row) { ?> - /> + /> @@ -559,15 +559,10 @@ $checkall_url = 'tbl_structure.php?' . PMA_generate_common_url($db, $table); <?php echo __('With selected:'); ?> - - -/ - - + + - +