mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 08:56:48 +01:00
Aggiunta scelta tempo di attesa ricerche in secondi e ricerca con invio
This commit is contained in:
parent
490aac16d6
commit
a4aa26f46e
@ -131,6 +131,8 @@ if (Auth::check()) {
|
||||
ckeditorToolbar: [
|
||||
["Undo","Redo","-","Cut","Copy","Paste","PasteText","PasteFromWord","-","Scayt", "-","Link","Unlink","-","Bold","Italic","Underline","Superscript","SpecialChar","HorizontalRule","-","NumberedList","BulletedList","Outdent","Indent","Blockquote","-","Styles","Format","Image","Table", "TextColor", "BGColor" ],
|
||||
],
|
||||
|
||||
tempo_attesa_ricerche: '.get_var('Tempo di attesa ricerche in secondi').',
|
||||
};
|
||||
</script>';
|
||||
}
|
||||
|
@ -534,6 +534,9 @@ function start_datatables() {
|
||||
});
|
||||
|
||||
var sum;
|
||||
var tempo;
|
||||
var tempo_attesa_ricerche = (globals.tempo_attesa_ricerche*1000);
|
||||
|
||||
var table = $this.DataTable({
|
||||
language: {
|
||||
url: globals.js + '/i18n/datatables/' + globals.locale + '.min.json'
|
||||
@ -626,6 +629,9 @@ function start_datatables() {
|
||||
$('<br><input type="text" style="width:100%" class="form-control" placeholder="' + globals.translations.filter + '..."><i class="deleteicon fa fa-times fa-2x hide"></i>')
|
||||
.appendTo(column.header())
|
||||
.on('keyup', function (e) {
|
||||
|
||||
clearInterval(tempo);
|
||||
|
||||
if (e.which != 9) {
|
||||
if (!$(this).val()) {
|
||||
if ($(this).parent().data("slow") != undefined) $("#slow").remove();
|
||||
@ -642,13 +648,25 @@ function start_datatables() {
|
||||
|
||||
idx1 = 'module_' + $this.data('idmodule'); //+ "-" + $this.data('idplugin');
|
||||
idx2 = 'search_' + $(this).parent().attr('id').replace('th_', '');
|
||||
|
||||
function start_search(search_value){
|
||||
session_set(idx1 + ',' + idx2, search_value, 0);
|
||||
column.search(search_value).draw();
|
||||
}
|
||||
|
||||
// Imposto delle sessioni per le ricerche del modulo e del campo specificatsi
|
||||
session_set(idx1 + ',' + idx2, $(this).val(), 0);
|
||||
|
||||
column.search(this.value).draw();
|
||||
// Imposto delle sessioni per le ricerche del modulo e del campo specificatsi
|
||||
if(e.keyCode == 13 || $(this).val()==''){
|
||||
start_search($(this).val());
|
||||
}else{
|
||||
tempo = window.setTimeout(start_search, tempo_attesa_ricerche, $(this).val());
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Disabilito l'ordinamento alla pressione del tasto invio sull'<input>
|
||||
$("thead input, .search").on('keypress', function (e) {
|
||||
stopTableSorting(e);
|
||||
});
|
||||
|
||||
// Disabilito l'ordinamento al click sull'<input>
|
||||
$("thead input, .deleteicon").click(function (e) {
|
||||
|
@ -298,3 +298,6 @@ ADD FOREIGN KEY (`id_module`) REFERENCES `zz_modules`(`id`) ON DELETE CASCADE;
|
||||
|
||||
-- Widget per attività senza nessun tecnico assegnato
|
||||
INSERT INTO `zz_widgets` (`id`, `name`, `type`, `id_module`, `location`, `class`, `query`, `bgcolor`, `icon`, `print_link`, `more_link`, `more_link_type`, `php_include`, `text`, `enabled`, `order`, `help`) VALUES (NULL, 'Attività da pianificare', 'stats', (SELECT id FROM zz_modules WHERE name = 'Dashboard'), 'controller_top', 'col-md-3', 'SELECT COUNT(id) AS dato FROM in_interventi WHERE id NOT IN (SELECT idintervento FROM in_interventi_tecnici) AND idstatointervento IN (SELECT idstatointervento FROM in_statiintervento WHERE completato = 0) ', '#6dab3c', 'fa fa-cogs', '', './modules/interventi/widgets/interventi.pianificazionedashboard.interventi.php', 'popup', '', 'Promemoria attività da pianificare', 1, '0', NULL);
|
||||
|
||||
-- Impostazione "Tempo di attesa ricerche"
|
||||
INSERT INTO `zz_settings` (`idimpostazione`, `nome`, `valore`, `tipo`, `editable`, `sezione`) VALUES (NULL, 'Tempo di attesa ricerche in secondi', '2', 'integer', '0', 'Generali');
|
||||
|
Loading…
x
Reference in New Issue
Block a user