Skip to content
Snippets Groups Projects
Commit bc3e15ae authored by Tim Fechner's avatar Tim Fechner Committed by Tim Fechner
Browse files

Move sortable javascriot to base.js

parent 427635c9
Branches
No related tags found
No related merge requests found
$(function() {
$('.title-wrapper').click(function() { $('.title-wrapper').click(function() {
window.location = $(this).data('root'); window.location = $(this).data('root');
}); });
// some little helpers
$.tablesorter.themes.bootstrap = {
header: 'bootstrap-header',
iconSortNone: 'fa fa-sort',
iconSortAsc: 'fa fa-sort-asc',
iconSortDesc: 'fa fa-sort-desc',
};
$('table.sortable').tablesorter({
theme: 'bootstrap',
headerTemplate: '{content} {icon}',
sortList: [[0,0]],
widgets: ['uitheme'],
});
});
$(".title-wrapper").click(function(){window.location=$(this).data("root")}); $(function(){$(".title-wrapper").click(function(){window.location=$(this).data("root")}),$.tablesorter.themes.bootstrap={header:"bootstrap-header",iconSortNone:"fa fa-sort",iconSortAsc:"fa fa-sort-asc",iconSortDesc:"fa fa-sort-desc"},$("table.sortable").tablesorter({theme:"bootstrap",headerTemplate:"{content} {icon}",sortList:[[0,0]],widgets:["uitheme"]})});
\ No newline at end of file \ No newline at end of file
...@@ -6,18 +6,6 @@ ...@@ -6,18 +6,6 @@
{% block post-script %} {% block post-script %}
<script> <script>
$(function() { $(function() {
$.tablesorter.themes.bootstrap = {
header: 'bootstrap-header',
iconSortNone: 'fa fa-sort',
iconSortAsc: 'fa fa-sort-asc',
iconSortDesc: 'fa fa-sort-desc',
};
$("#domain-table").tablesorter({
theme: "bootstrap",
headerTemplate: '{content} {icon}',
sortList: [[0,0]],
widgets: ["uitheme"],
});
$("#domain-table").filterTable({ $("#domain-table").filterTable({
inputSelector: '#domain-table-filter', inputSelector: '#domain-table-filter',
}); });
...@@ -38,7 +26,7 @@ ...@@ -38,7 +26,7 @@
</div> </div>
</div> </div>
<table id="domain-table" class="table table-striped table-hover"> <table id="domain-table" class="table table-striped table-hover sortable">
<thead> <thead>
<tr> <tr>
<th>Domain name (fqdn)</th> <th>Domain name (fqdn)</th>
......
...@@ -14,18 +14,6 @@ ...@@ -14,18 +14,6 @@
toggleSystemUsers(); toggleSystemUsers();
$('#toggleSystemUsers').click(toggleSystemUsers); $('#toggleSystemUsers').click(toggleSystemUsers);
$.tablesorter.themes.bootstrap = {
header: 'bootstrap-header',
iconSortNone: 'fa fa-sort',
iconSortAsc: 'fa fa-sort-asc',
iconSortDesc: 'fa fa-sort-desc',
};
$('#usertable, #partitiontable').tablesorter({
theme: 'bootstrap',
headerTemplate: '{content} {icon}',
sortList: [[0,0]],
widgets: ['uitheme'],
});
$('#packagetable').tablesorter({ $('#packagetable').tablesorter({
theme: 'bootstrap', theme: 'bootstrap',
headerTemplate: '{content} {icon}', headerTemplate: '{content} {icon}',
...@@ -147,7 +135,7 @@ ...@@ -147,7 +135,7 @@
<i>Hier sollen in Zukunft mehr Informationen wie bspw. SSL Cert checks usw. angezeigt werden ...</i> <i>Hier sollen in Zukunft mehr Informationen wie bspw. SSL Cert checks usw. angezeigt werden ...</i>
</div> </div>
<div role="tabpanel" class="tab-pane fade" id="networks"> <div role="tabpanel" class="tab-pane fade" id="networks">
<table class="table"> <table class="table sortable">
<thead> <thead>
<tr> <tr>
<th>Interface</th> <th>Interface</th>
...@@ -221,7 +209,7 @@ ...@@ -221,7 +209,7 @@
</div> </div>
<div role="tabpanel" class="tab-pane fade" id="users"> <div role="tabpanel" class="tab-pane fade" id="users">
<button id="toggleSystemUsers" type="button" class="btn btn-default margin-bottom-wrapper" data-toggle="button" aria-pressed="false" autocomplete="off">Toggle system users</button> <button id="toggleSystemUsers" type="button" class="btn btn-default margin-bottom-wrapper" data-toggle="button" aria-pressed="false" autocomplete="off">Toggle system users</button>
<table id="usertable" class="table table-hover"> <table id="usertable" class="table table-hover sortable">
<thead> <thead>
<tr> <tr>
<th>Id</th> <th>Id</th>
...@@ -243,7 +231,7 @@ ...@@ -243,7 +231,7 @@
</table> </table>
</div> </div>
<div role="tabpanel" class="tab-pane fade" id="partitions"> <div role="tabpanel" class="tab-pane fade" id="partitions">
<table id="partitiontable" class="table table-hover"> <table class="table table-hover sortable">
<thead> <thead>
<tr> <tr>
<th>Device</th> <th>Device</th>
......
...@@ -7,18 +7,6 @@ ...@@ -7,18 +7,6 @@
{% block post-script %} {% block post-script %}
<script> <script>
$(function() { $(function() {
$.tablesorter.themes.bootstrap = {
header: 'bootstrap-header',
iconSortNone: 'fa fa-sort',
iconSortAsc: 'fa fa-sort-asc',
iconSortDesc: 'fa fa-sort-desc',
};
$("#minion-table").tablesorter({
theme: "bootstrap",
headerTemplate: '{content} {icon}',
sortList: [[0,0]],
widgets: ["uitheme"],
});
$("#minion-table").filterTable({ $("#minion-table").filterTable({
inputSelector: '#minion-table-filter', inputSelector: '#minion-table-filter',
}); });
...@@ -39,7 +27,7 @@ ...@@ -39,7 +27,7 @@
</div> </div>
</div> </div>
<table id="minion-table" class="table table-striped table-hover"> <table id="minion-table" class="table table-striped table-hover sortable">
<thead> <thead>
<tr> <tr>
<th>Minion ID</th> <th>Minion ID</th>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment