CloudFlare DNS: fix search (custom filter), search icon left of box

This commit is contained in:
master3395
2026-02-16 15:14:00 +01:00
parent c403bfb0c8
commit f592e1552e
3 changed files with 25 additions and 6 deletions

View File

@@ -1163,6 +1163,15 @@ app.controller('addModifyDNSRecordsCloudFlare', function ($scope, $http, $window
return list;
};
$scope.dnsSearchFilter = '';
$scope.matchDnsSearch = function (record) {
var q = ($scope.dnsSearchFilter || '').toLowerCase().trim();
if (!q) return true;
var name = (record.name || '').toLowerCase();
var type = (record.type || '').toLowerCase();
var content = (record.content || '').toLowerCase();
var priority = String(record.priority != null ? record.priority : '');
return name.indexOf(q) !== -1 || type.indexOf(q) !== -1 || content.indexOf(q) !== -1 || priority.indexOf(q) !== -1;
};
$scope.sortColumn = 'name';
$scope.sortReverse = false;
$scope.setSort = function (col) {