mirror of https://github.com/gophish/gophish
Added no-sort options to tables
Added a no-sort class to column headers where sorting doesn’t make sense. Still have the attachments table in the templates page to do, there was something strange happening.pull/87/head
parent
2ff2cbd1ca
commit
b9fd654f8a
|
@ -95,7 +95,11 @@ $(document).ready(function(){
|
|||
$("#loading").hide()
|
||||
if (campaigns.length > 0){
|
||||
$("#campaignTable").show()
|
||||
campaignTable = $("#campaignTable").DataTable();
|
||||
campaignTable = $("#campaignTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
});
|
||||
$.each(campaigns, function(i, campaign){
|
||||
label = labels[campaign.status] || "label-default";
|
||||
campaignTable.row.add([
|
||||
|
@ -131,7 +135,11 @@ $(document).ready(function(){
|
|||
return false;
|
||||
})
|
||||
// Create the group typeahead objects
|
||||
groupTable = $("#groupTable").DataTable()
|
||||
groupTable = $("#groupTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
})
|
||||
group_bh = new Bloodhound({
|
||||
datumTokenizer: function(g) { return Bloodhound.tokenizers.whitespace(g.name) },
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
|
|
@ -33,7 +33,11 @@ $(document).ready(function(){
|
|||
showLabel: false
|
||||
}
|
||||
var average = 0
|
||||
campaignTable = $("#campaignTable").DataTable();
|
||||
campaignTable = $("#campaignTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
});
|
||||
$.each(campaigns, function(i, campaign){
|
||||
var campaign_date = moment(campaign.created_date).format('MMMM Do YYYY h:mm:ss a')
|
||||
var label = labels[campaign.status] || "label-default";
|
||||
|
|
|
@ -92,7 +92,11 @@ function load(){
|
|||
$("#loading").hide()
|
||||
if (pages.length > 0){
|
||||
$("#pagesTable").show()
|
||||
pagesTable = $("#pagesTable").DataTable();
|
||||
pagesTable = $("#pagesTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
});
|
||||
pagesTable.clear()
|
||||
$.each(pages, function(i, page){
|
||||
pagesTable.row.add([
|
||||
|
|
|
@ -178,7 +178,11 @@ function load(){
|
|||
$("#loading").hide()
|
||||
if (templates.length > 0){
|
||||
$("#templateTable").show()
|
||||
templateTable = $("#templateTable").DataTable();
|
||||
templateTable = $("#templateTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
});
|
||||
templateTable.clear()
|
||||
$.each(templates, function(i, template){
|
||||
templateTable.row.add([
|
||||
|
|
|
@ -53,8 +53,9 @@ function dismiss(){
|
|||
|
||||
function edit(idx){
|
||||
targets = $("#targetsTable").dataTable({
|
||||
destroy: true,// Destroy any other instantiated table - http://datatables.net/manual/tech-notes/3#destroy
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: -1 }
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
})
|
||||
$("#modalSubmit").unbind('click').click(function(){save(idx)})
|
||||
|
@ -123,7 +124,11 @@ function load(){
|
|||
groups = gs
|
||||
$("#emptyMessage").hide()
|
||||
$("#groupTable").show()
|
||||
groupTable = $("#groupTable").DataTable();
|
||||
groupTable = $("#groupTable").DataTable({
|
||||
columnDefs: [
|
||||
{ orderable: false, targets: "no-sort" }
|
||||
]
|
||||
});
|
||||
groupTable.clear();
|
||||
$.each(groups, function(i, group){
|
||||
var targets = ""
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<th>Name</th>
|
||||
<th>Created Date</th>
|
||||
<th>Status</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2 no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -113,7 +113,7 @@
|
|||
<table id="groupTable" class="table table-hover table-striped table-condensed">
|
||||
<thead>
|
||||
<th>Group Name</th>
|
||||
<th></th>
|
||||
<th class="no-sort"></th>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<th>Name</th>
|
||||
<th>Created Date</th>
|
||||
<th>Status</th>
|
||||
<th class="col-md-2 col-sm-2"></th>
|
||||
<th class="col-md-2 col-sm-2 no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Last Modified Date</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2 no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Modified Date</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2 no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<th>Name</th>
|
||||
<th>Members</th>
|
||||
<th>Modified Date</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2 no-sort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<th>Last Name</th>
|
||||
<th>Email</th>
|
||||
<th>Position</th>
|
||||
<th></th>
|
||||
<th class="no-sort"></th>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in New Issue