Refactor makegrid.js
This commit is contained in:
parent
e65fc63e71
commit
ba5598a190
3066
js/makegrid.js
3066
js/makegrid.js
File diff suppressed because it is too large
Load Diff
11
js/sql.js
11
js/sql.js
@ -94,16 +94,7 @@ $(document).ready(function() {
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#sqlqueryresults").live('makegrid', function() {
|
||||
$('#table_results').makegrid();
|
||||
})
|
||||
|
||||
/**
|
||||
* Attach the {@link refreshgrid} function to a custom event, which will be
|
||||
* triggered manually everytime the table of results is manipulated
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#sqlqueryresults").live('refreshgrid', function() {
|
||||
$('#table_results').refreshgrid();
|
||||
PMA_makegrid($('#table_results')[0]);
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
13
sql.php
13
sql.php
@ -166,14 +166,19 @@ if (isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) {
|
||||
*/
|
||||
if (isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) {
|
||||
$pmatable = new PMA_Table($table, $db);
|
||||
$retval = false;
|
||||
|
||||
// set column order
|
||||
$col_order = explode(',', $_REQUEST['col_order']);
|
||||
$retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER, $col_order, $_REQUEST['table_create_time']);
|
||||
if (isset($_REQUEST['col_order'])) {
|
||||
$col_order = explode(',', $_REQUEST['col_order']);
|
||||
$retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER, $col_order, $_REQUEST['table_create_time']);
|
||||
}
|
||||
|
||||
// set column visibility
|
||||
$col_visib = explode(',', $_REQUEST['col_visib']);
|
||||
$retval &= $pmatable->setUiProp(PMA_Table::PROP_COLUMN_VISIB, $col_visib, $_REQUEST['table_create_time']);
|
||||
if (isset($_REQUEST['col_visib'])) {
|
||||
$col_visib = explode(',', $_REQUEST['col_visib']);
|
||||
$retval &= $pmatable->setUiProp(PMA_Table::PROP_COLUMN_VISIB, $col_visib, $_REQUEST['table_create_time']);
|
||||
}
|
||||
|
||||
PMA_ajaxResponse(NULL, ($retval == true));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user