diff --git a/.vscode/ftp-kr.sync.cache.json b/.vscode/ftp-kr.sync.cache.json index be83a4e..9ee4f93 100644 --- a/.vscode/ftp-kr.sync.cache.json +++ b/.vscode/ftp-kr.sync.cache.json @@ -198,19 +198,19 @@ "style.css": { "type": "-", "size": 18298, - "lmtime": 1734279688786, + "lmtime": 1734346488819, "modified": false }, "style.css.map": { "type": "-", "size": 32824, - "lmtime": 1734279688786, + "lmtime": 1734346488819, "modified": false }, "style.scss": { "type": "-", "size": 22746, - "lmtime": 1734279688647, + "lmtime": 1734346488372, "modified": false } }, diff --git a/libraries/grid/ajax.php b/libraries/grid/ajax.php index e7ea125..16bb3da 100644 --- a/libraries/grid/ajax.php +++ b/libraries/grid/ajax.php @@ -1,4 +1,5 @@ saveElement( $values ) ) { if ( $values[ $grid -> id ] ) @@ -19,8 +20,8 @@ if ( $_POST['a'] == 'gsave' ) else $msg = 'Nowy element został dodany.'; } - - $response = array( + + $response = array( 'status' => 'ok', 'output' => $grid -> drawResults(), 'msg' => $msg @@ -37,10 +38,10 @@ if ( $_POST['a'] == 'gedit' ) { $grid = $_SESSION[ 'g' . $_POST[ 'gtable' ] ]; if ( is_a( $grid, 'grid' ) ) - { - $response = array( + { + $response = array( 'status' => 'ok', - 'output' => $grid -> drawEdit( (int)$_POST[ 'gedit' ] ) + 'output' => $grid -> drawEdit( (int)$_POST[ 'gedit' ] ) ); } else @@ -61,14 +62,14 @@ if ( $_POST['a'] == 'gdraw' ) $grid -> hide_column( $_POST['column'], $_POST['hidden'] ); $grid -> hidden_columns[ $_POST['column'] ] = filter_var( $_POST['hidden'], FILTER_VALIDATE_BOOLEAN ); } - + /* zmiana liczby wyświetlanych elementów */ if ( $_POST['glimit'] ) { $grid -> limit = $_POST['glimit']; $grid -> save_limit( $_POST['glimit'] ); } - + /* usuwanie wielu elementów */ if ( $_POST['gdelete_multi'] ) { @@ -76,14 +77,14 @@ if ( $_POST['a'] == 'gdraw' ) $grid -> delete( $id ); $msg = 'Wybrane elementy zostały usunięte.'; } - + /* usuwanie */ if ( $_POST['gdelete'] ) { if ( $grid -> delete( $_POST['gdelete'] ) ) $msg = 'Wybrany element został usunięty.'; } - + /* wyszukiwanie */ if ( $_POST['gsearch_column'] ) { @@ -97,7 +98,7 @@ if ( $_POST['a'] == 'gdraw' ) $grid -> save_filters(); $grid -> set_cp( 1 ); } - + /* sortowanie */ if ( $_POST[ 'gsort_column' ] ) { @@ -107,15 +108,15 @@ if ( $_POST['a'] == 'gdraw' ) $grid -> order = [ 'column' => $_POST[ 'gsort_column' ], 'type' => 'ASC' ]; $grid -> save_order(); } - + /* zmiana strony */ if ( $_POST[ 'gpage'] ) $grid -> set_cp( $_POST[ 'gpage'] ); - - $response = array( + + $response = array( 'status' => 'ok', 'msg' => $msg, - 'output' => $grid -> drawResults() + 'output' => $grid -> drawResults() ); } else