Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
b1735dcecd
@ -453,7 +453,7 @@ foreach ($tables as $keyname => $each_table) {
|
||||
?>"
|
||||
id="row_tbl_<?php echo $i; ?>">
|
||||
<td class="center">
|
||||
<input type="checkbox" name="selected_tbl[]"
|
||||
<input type="checkbox" name="selected_tbl[]" class="checkall"
|
||||
value="<?php echo htmlspecialchars($each_table['TABLE_NAME']); ?>"
|
||||
id="checkbox_tbl_<?php echo $i; ?>"<?php echo $checked; ?> /></td>
|
||||
<th><?php echo $browse_table_label; ?>
|
||||
@ -675,13 +675,8 @@ $checkall_url = 'db_structure.php?' . PMA_generate_common_url($db);
|
||||
?>
|
||||
<img class="selectallarrow" src="<?php echo $pmaThemeImage .'arrow_'.$text_dir.'.png'; ?>"
|
||||
width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
|
||||
<a href="<?php echo $checkall_url; ?>&checkall=1"
|
||||
onclick="if (markAllRows('tablesForm')) return false;">
|
||||
<?php echo __('Check All'); ?></a>
|
||||
/
|
||||
<a href="<?php echo $checkall_url; ?>"
|
||||
onclick="if (unMarkAllRows('tablesForm')) return false;">
|
||||
<?php echo __('Uncheck All'); ?></a>
|
||||
<input type="checkbox" id="checkall" title="<?php echo __('Check All'); ?>" />
|
||||
<label for="checkall"><?php echo __('Check All'); ?></label>
|
||||
<?php if ($overhead_check != '') { ?>
|
||||
/
|
||||
<a href="#" onclick="unMarkAllRows('tablesForm');
|
||||
|
||||
@ -558,7 +558,7 @@ $(function() {
|
||||
var checked = $checkbox.prop('checked');
|
||||
if (!$(e.target).is(':checkbox, label')) {
|
||||
checked = !checked;
|
||||
$checkbox.prop('checked', checked);
|
||||
$checkbox.prop('checked', checked).trigger('change');
|
||||
}
|
||||
if (checked) {
|
||||
$tr.addClass('marked');
|
||||
@ -593,7 +593,8 @@ $(function() {
|
||||
.slice(start, end + 1)
|
||||
.removeClass('marked')
|
||||
.find(':checkbox')
|
||||
.prop('checked', false);
|
||||
.prop('checked', false)
|
||||
.trigger('change');
|
||||
}
|
||||
|
||||
// handle new shift click
|
||||
@ -609,7 +610,8 @@ $(function() {
|
||||
.slice(start, end + 1)
|
||||
.addClass('marked')
|
||||
.find(':checkbox')
|
||||
.prop('checked', true);
|
||||
.prop('checked', true)
|
||||
.trigger('change');
|
||||
|
||||
// remember the last shift clicked row
|
||||
last_shift_clicked_row = curr_row;
|
||||
@ -617,7 +619,7 @@ $(function() {
|
||||
});
|
||||
|
||||
addDateTimePicker();
|
||||
|
||||
|
||||
/**
|
||||
* Add attribute to text boxes for iOS devices (based on bugID: 3508912)
|
||||
*/
|
||||
@ -669,6 +671,7 @@ function markAllRows(container_id)
|
||||
{
|
||||
|
||||
$("#" + container_id).find("input:checkbox:enabled").prop('checked', true)
|
||||
.trigger("change")
|
||||
.parents("tr").addClass("marked");
|
||||
return true;
|
||||
}
|
||||
@ -683,6 +686,7 @@ function unMarkAllRows(container_id)
|
||||
{
|
||||
|
||||
$("#" + container_id).find("input:checkbox:enabled").prop('checked', false)
|
||||
.trigger("change")
|
||||
.parents("tr").removeClass("marked");
|
||||
return true;
|
||||
}
|
||||
@ -1879,7 +1883,7 @@ function PMA_createProfilingChartJqplot(target, data)
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
showDataLabels: true
|
||||
showDataLabels: true
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
@ -3782,6 +3786,33 @@ $(document).ready(function () {
|
||||
}); // end $.live()
|
||||
});
|
||||
|
||||
/**
|
||||
* Watches checkboxes in a form to set the checkall box accordingly
|
||||
*/
|
||||
var checkboxes_sel = "input.checkall:checkbox:enabled";
|
||||
$(checkboxes_sel).live("change", function () {
|
||||
var $form = $(this.form);
|
||||
// total number of checkboxes in current form
|
||||
var total_boxes = $form.find(checkboxes_sel).length;
|
||||
// number of checkboxes checked in current form
|
||||
var checked_boxes = $form.find(checkboxes_sel + ":checked").length;
|
||||
var $checkall = $form.find("input#checkall");
|
||||
if (total_boxes == checked_boxes) {
|
||||
$checkall.prop({checked: true, indeterminate: false});
|
||||
}
|
||||
else if (checked_boxes > 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
|
||||
*
|
||||
|
||||
@ -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"
|
||||
. '<i>' . __('With selected:') . '</i>' . "\n";
|
||||
$links_html .= '<input type="checkbox" id="checkall" title="' . __('Check All') . '" /> '
|
||||
. '<label for="checkall">' . __('Check All') . '</label> '
|
||||
. '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\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
|
||||
. '<input type="checkbox" id="id_rows_to_delete'
|
||||
. $row_no . $id_suffix
|
||||
. '" name="rows_to_delete[' . $row_no . ']"'
|
||||
. ' class="multi_checkbox"'
|
||||
. ' class="multi_checkbox checkall"'
|
||||
. ' value="' . $where_clause_html . '" '
|
||||
. (isset($GLOBALS['checkall'])
|
||||
? 'checked="checked"'
|
||||
@ -4803,9 +4776,9 @@ class PMA_DisplayResults
|
||||
* @param string $where_clause_html url encoded where clause
|
||||
*
|
||||
* @return string the generated HTML
|
||||
*
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
*
|
||||
* @see _getTableBody(), _getCheckboxAndLinks()
|
||||
*/
|
||||
private function _getEditLink(
|
||||
@ -4843,9 +4816,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 _getCopyLink(
|
||||
@ -4888,9 +4861,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 _getDeleteLink($del_url, $del_str, $js_conf, $class)
|
||||
@ -4937,9 +4910,9 @@ class PMA_DisplayResults
|
||||
* @param string $js_conf text for the JS confirmation
|
||||
*
|
||||
* @return string the generated HTML
|
||||
*
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
*
|
||||
* @see _getPlacedLinks()
|
||||
*/
|
||||
private function _getCheckboxAndLinks(
|
||||
@ -4995,6 +4968,6 @@ class PMA_DisplayResults
|
||||
return $ret;
|
||||
|
||||
} // end of the '_getCheckboxAndLinks()' function
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -79,7 +79,7 @@ function PMA_buildHtmlForDb(
|
||||
$out = '';
|
||||
if ($is_superuser || $GLOBALS['cfg']['AllowUserDropDatabase']) {
|
||||
$out .= '<td class="tool">';
|
||||
$out .= '<input type="checkbox" name="selected_dbs[]" '
|
||||
$out .= '<input type="checkbox" name="selected_dbs[]" class="checkall" '
|
||||
. 'title="' . htmlspecialchars($current['SCHEMA_NAME']) . '" '
|
||||
. 'value="' . htmlspecialchars($current['SCHEMA_NAME']) . '" ';
|
||||
|
||||
|
||||
@ -292,11 +292,9 @@ if ($databases_count > 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 '<img class="selectallarrow" src="' . $pmaThemeImage . 'arrow_' . $text_dir . '.png" width="38" height="22" alt="' . __('With selected:') . '" />' . "\n"
|
||||
. '<a href="server_databases.php' . $common_url_query . '&checkall=1" onclick="if (markAllRows(\'tabledatabases\')) return false;">' . "\n"
|
||||
. ' ' . __('Check All') . '</a> / ' . "\n"
|
||||
. '<a href="server_databases.php' . $common_url_query . '" onclick="if (unMarkAllRows(\'tabledatabases\')) return false;">' . "\n"
|
||||
. ' ' . __('Uncheck All') . '</a>' . "\n"
|
||||
. '<i>' . __('With selected:') . '</i>' . "\n";
|
||||
. '<input type="checkbox" id="checkall" title="' . __('Check All') . '" /> '
|
||||
. '<label for="checkall">' . __('Check All') . '</label> '
|
||||
. '<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
|
||||
echo PMA_getButtonOrImage('drop_selected_dbs', 'mult_submit' . ($cfg['AjaxEnable'] ? ' ajax' : ''), 'drop_selected_dbs', __('Drop'), 'b_deltbl.png');
|
||||
}
|
||||
|
||||
|
||||
@ -1879,7 +1879,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
foreach ($user as $host) {
|
||||
$index_checkbox++;
|
||||
echo ' <tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n"
|
||||
. ' <td><input type="checkbox" name="selected_usr[]" id="checkbox_sel_users_'
|
||||
. ' <td><input type="checkbox" class="checkall" name="selected_usr[]" id="checkbox_sel_users_'
|
||||
. $index_checkbox . '" value="'
|
||||
. htmlspecialchars($host['User'] . '&#27;' . $host['Host'])
|
||||
. '"'
|
||||
@ -1928,14 +1928,9 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
.' src="' . $pmaThemeImage . 'arrow_' . $text_dir . '.png"'
|
||||
.' width="38" height="22"'
|
||||
.' alt="' . __('With selected:') . '" />' . "\n"
|
||||
.'<a href="server_privileges.php?' . $GLOBALS['url_query'] . '&checkall=1"'
|
||||
.' onclick="if (markAllRows(\'usersForm\')) return false;">'
|
||||
. __('Check All') . '</a>' . "\n"
|
||||
.'/' . "\n"
|
||||
.'<a href="server_privileges.php?' . $GLOBALS['url_query'] . '"'
|
||||
.' onclick="if (unMarkAllRows(\'usersForm\')) return false;">'
|
||||
. __('Uncheck All') . '</a>' . "\n"
|
||||
.'<i>' . __('With selected:') . '</i>' . "\n";
|
||||
.'<input type="checkbox" id="checkall" title="' . __('Check All') . '" /> '
|
||||
.'<label for="checkall">' . __('Check All') . '</label> '
|
||||
.'<i style="margin-left: 2em">' . __('With selected:') . '</i>' . "\n";
|
||||
|
||||
echo PMA_getButtonOrImage(
|
||||
'submit_mult', 'mult_submit', 'submit_mult_export',
|
||||
|
||||
@ -334,7 +334,7 @@ foreach ($fields as $row) {
|
||||
?>
|
||||
<tr class="<?php echo $odd_row ? 'odd': 'even'; $odd_row = !$odd_row; ?>">
|
||||
<td class="center">
|
||||
<input type="checkbox" name="selected_fld[]" value="<?php echo htmlspecialchars($row['Field']); ?>" id="checkbox_row_<?php echo $rownum; ?>" <?php echo $checked; ?> />
|
||||
<input type="checkbox" class="checkall" name="selected_fld[]" value="<?php echo htmlspecialchars($row['Field']); ?>" id="checkbox_row_<?php echo $rownum; ?>" <?php echo $checked; ?> />
|
||||
</td>
|
||||
<td class="right">
|
||||
<?php echo $rownum; ?>
|
||||
@ -559,15 +559,10 @@ $checkall_url = 'tbl_structure.php?' . PMA_generate_common_url($db, $table);
|
||||
|
||||
<img class="selectallarrow" src="<?php echo $pmaThemeImage . 'arrow_' . $text_dir . '.png'; ?>"
|
||||
width="38" height="22" alt="<?php echo __('With selected:'); ?>" />
|
||||
<a href="<?php echo $checkall_url; ?>&checkall=1"
|
||||
onclick="if (markAllRows('fieldsForm')) return false;">
|
||||
<?php echo __('Check All'); ?></a>
|
||||
/
|
||||
<a href="<?php echo $checkall_url; ?>"
|
||||
onclick="if (unMarkAllRows('fieldsForm')) return false;">
|
||||
<?php echo __('Uncheck All'); ?></a>
|
||||
<input type="checkbox" id="checkall" title="' . __('Check All') . '" />
|
||||
<label for="checkall"><?php echo __('Check All'); ?></label>
|
||||
|
||||
<i><?php echo __('With selected:'); ?></i>
|
||||
<i style="margin-left: 2em"><?php echo __('With selected:'); ?></i>
|
||||
|
||||
<?php
|
||||
echo PMA_getButtonOrImage(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user