Order: network list is now sorted
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<?php if($me->is("Admin")): ?>
|
||||
<div class="col-2">
|
||||
<label class="form-label" for="filter_addresstype">Rolle</label>
|
||||
<select name="filter[addresstype][]" id="filter_addresstype" class="select2 form-control select2-multiple" multiple="multiple">
|
||||
<select name="filter[addresstype][]" id="filter_addresstype" class="form-control" multiple="multiple">
|
||||
<option value="systemowner" <?=(in_array("systemowner", $filter["addresstype"])) ? "selected='selected'" : ""?>><?=__("systemowner")?></option>
|
||||
<option value="netowner" <?=(in_array("netowner", $filter["addresstype"])) ? "selected='selected'" : "netowner"?>><?=__("netowner")?></option>
|
||||
<option value="salespartner" <?=(in_array("salespartner", $filter["addresstype"])) ? "selected='selected'" : "salespartner"?>><?=__("salespartner")?></option>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<div class="col-1">
|
||||
<label class="form-label" for="filter_network_id">Netzgebiet</label>
|
||||
<select name="filter[network_id]" id="filter_network_id" class="form-control">
|
||||
<option></option>
|
||||
<?php foreach($mynetworks as $fnet): ?>
|
||||
<option value="<?=$fnet->id?>" <?=($filter['network_id'] == $fnet->id) ? "selected='selected'" : ""?>><?=$fnet->name?></option>
|
||||
<?php endforeach; ?>
|
||||
@@ -978,6 +977,19 @@
|
||||
});
|
||||
});
|
||||
|
||||
$('#filter_network_id').select2({sorter: function(data) {
|
||||
return data.sort(function (a, b) {
|
||||
if (a.text > b.text) {
|
||||
return 1;
|
||||
}
|
||||
if (a.text < b.text) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var order;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/order=(\d+)/);
|
||||
|
||||
Reference in New Issue
Block a user