mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Merge branch 'datatablessavestate' into 'master'
Add DataTables stateSave feature See merge request allianceauth/allianceauth!1374
This commit is contained in:
commit
2ef3da916b
@ -193,6 +193,8 @@
|
|||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
{ "sortable": false, "targets": [1] },
|
{ "sortable": false, "targets": [1] },
|
||||||
],
|
],
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
$('#table-members').DataTable({
|
$('#table-members').DataTable({
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
@ -200,6 +202,8 @@
|
|||||||
{ "sortable": false, "targets": [0, 2] },
|
{ "sortable": false, "targets": [0, 2] },
|
||||||
],
|
],
|
||||||
"order": [[ 1, "asc" ]],
|
"order": [[ 1, "asc" ]],
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
$('#table-unregistered').DataTable({
|
$('#table-unregistered').DataTable({
|
||||||
"columnDefs": [
|
"columnDefs": [
|
||||||
@ -207,6 +211,8 @@
|
|||||||
{ "sortable": false, "targets": [0, 2] },
|
{ "sortable": false, "targets": [0, 2] },
|
||||||
],
|
],
|
||||||
"order": [[ 1, "asc" ]],
|
"order": [[ 1, "asc" ]],
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -43,6 +43,9 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block extra_script %}
|
{% block extra_script %}
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#table-search').DataTable();
|
$('#table-search').DataTable({
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
|
});
|
||||||
});
|
});
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -127,6 +127,8 @@
|
|||||||
],
|
],
|
||||||
bootstrap: true
|
bootstrap: true
|
||||||
},
|
},
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -104,7 +104,9 @@
|
|||||||
"sortable": false,
|
"sortable": false,
|
||||||
"targets": [2]
|
"targets": [2]
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -73,6 +73,8 @@
|
|||||||
],
|
],
|
||||||
bootstrap: true
|
bootstrap: true
|
||||||
},
|
},
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0,
|
||||||
drawCallback: function ( settings ) {
|
drawCallback: function ( settings ) {
|
||||||
let api = this.api();
|
let api = this.api();
|
||||||
let rows = api.rows( {page:'current'} ).nodes();
|
let rows = api.rows( {page:'current'} ).nodes();
|
||||||
|
@ -106,8 +106,10 @@
|
|||||||
idx: 1
|
idx: 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
bootstrap: true
|
bootstrap: true,
|
||||||
},
|
},
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0,
|
||||||
drawCallback: function ( settings ) {
|
drawCallback: function ( settings ) {
|
||||||
let api = this.api();
|
let api = this.api();
|
||||||
let rows = api.rows( {page:'current'} ).nodes();
|
let rows = api.rows( {page:'current'} ).nodes();
|
||||||
|
@ -267,7 +267,9 @@ ESC to cancel{% endblocktrans %}"id="blah"></i></th>
|
|||||||
"targets": [4, 5],
|
"targets": [4, 5],
|
||||||
"type": "num"
|
"type": "num"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"stateSave": true,
|
||||||
|
"stateDuration": 0
|
||||||
});
|
});
|
||||||
|
|
||||||
// tooltip
|
// tooltip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user