mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-17 03:51:06 +01:00
Fix impostazione ricerca tabella in sessione
This commit is contained in:
parent
9351ddf79d
commit
203b26a087
@ -156,9 +156,9 @@ function searchFieldName(field) {
|
|||||||
*
|
*
|
||||||
* @param {int} module_id
|
* @param {int} module_id
|
||||||
* @param {string} field
|
* @param {string} field
|
||||||
* @param {mixed} value
|
* @param {string} value
|
||||||
*/
|
*/
|
||||||
function searchTable(module_id, field, value) {
|
function setTableSearch(module_id, field, value) {
|
||||||
session_set('module_' + module_id + ',' + 'search_' + searchFieldName(field), value, 0);
|
session_set('module_' + module_id + ',' + 'search_' + searchFieldName(field), value, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,6 +272,7 @@ function getDatatablesButtons(table) {
|
|||||||
|
|
||||||
function initComplete(settings) {
|
function initComplete(settings) {
|
||||||
const api = this.api();
|
const api = this.api();
|
||||||
|
const $this = $(this);
|
||||||
const search = getTableSearch();
|
const search = getTableSearch();
|
||||||
|
|
||||||
api.columns('.search').every(function () {
|
api.columns('.search').every(function () {
|
||||||
@ -305,7 +306,7 @@ function initComplete(settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function start_search(module_id, field, search_value) {
|
function start_search(module_id, field, search_value) {
|
||||||
searchTable(module_id, field, search_value);
|
setTableSearch(module_id, field, search_value);
|
||||||
column.search(search_value).draw();
|
column.search(search_value).draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user