diff --git a/css/base.css b/css/base.css index b4161be..333dd5c 100644 --- a/css/base.css +++ b/css/base.css @@ -155,8 +155,7 @@ tr.jtable-data-row td { white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; } -tr.jtable-data-row td.ttl, tr.jtable-data-row td.priority, -.jtable-input input.ttl, .jtable-input input.priority { +tr.jtable-data-row td.ttl, .jtable-input input.ttl { text-align: right; } tr.jtable-data-row td.content { diff --git a/includes/config.inc.php-dist b/includes/config.inc.php-dist index 390787d..6a4e3fd 100644 --- a/includes/config.inc.php-dist +++ b/includes/config.inc.php-dist @@ -39,8 +39,7 @@ $templates[] = array( array( 'name' => '', 'type' => 'MX', - 'content' => 'mx2.tuxis.nl', - 'priority' => '200') + 'content' => '200 mx2.tuxis.nl') ) ); */ @@ -51,4 +50,3 @@ $defaults['defaulttype'] = 'Master'; # Choose between 'Native $defaults['primaryns'] = 'unconfigured.primaryns'; # The value of the first NS-record $defaults['secondaryns'] = 'unconfigured.secondaryns'; # The value of the second NS-record $defaults['ttl'] = 3600; # Default TTL for records -$defaults['priority'] = 0; # Default for priority in records diff --git a/index.php b/index.php index 909dc3c..669509e 100644 --- a/index.php +++ b/index.php @@ -189,13 +189,7 @@ function displayExportIcon(zone) { function displayContent(fieldName) { return function(data) { - var value = data.record[fieldName]; - switch (fieldName) { - case 'priority': - value = (value === 0) ? '' : value; - break; - } - return $('').text(value); + return $('').text(data.record[fieldName]); } } @@ -320,12 +314,6 @@ $(document).ready(function () { display: displayContent('type'), listClass: 'type' }, - priority: { - title: 'Prio', - width: '1%', - display: displayContent('priority'), - listClass: 'priority' - }, content: { title: 'Content', width: '30%', @@ -554,15 +542,6 @@ $(document).ready(function () { inputClass: 'type', listClass: 'type' }, - priority: { - title: 'Prio', - width: '1%', - create: true, - display: displayContent('priority'), - defaultValue: '', - inputClass: 'priority', - listClass: 'priority' - }, content: { title: 'Content', width: '30%', diff --git a/zones.php b/zones.php index c64f008..83cc135 100644 --- a/zones.php +++ b/zones.php @@ -143,7 +143,6 @@ function make_record($zone, $input) { } $ttl = (int) ((isset($input['ttl']) && $input['ttl']) ? $input['ttl'] : $defaults['ttl']); - $priority = (int) ((isset($input['priority']) && $input['priority']) ? $input['priority'] : $defaults['priority']); $type = isset($input['type']) ? $input['type'] : ''; $disabled = (bool) (isset($input['disabled']) && $input['disabled']); @@ -172,7 +171,6 @@ function make_record($zone, $input) { 'type' => $type, 'name' => $name, 'ttl' => $ttl, - 'priority' => $priority, 'content' => $content); } @@ -242,7 +240,6 @@ function decode_record_id($id) { || !isset($record['name']) || !isset($record['type']) || !isset($record['ttl']) - || !isset($record['priority']) || !isset($record['content']) || !isset($record['disabled'])) { jtable_respond(null, 'error', "Invalid record id"); @@ -267,7 +264,6 @@ function get_records_except($zone, $exclude) { $found = true; } elseif ($record['content'] != $exclude['content'] or $record['ttl'] != $exclude['ttl'] - or $record['priority'] != $exclude['priority'] or $record['disabled'] != $exclude['disabled']) { array_push($records, $record); } else { @@ -320,7 +316,6 @@ function rrtype_compare($a, $b) { function record_compare($a, $b) { if ($cmp = compareName($a['name'], $b['name'])) return $cmp; if ($cmp = rrtype_compare($a['type'], $b['type'])) return $cmp; - if ($cmp = ($a['priority'] - $b['priority'])) return $cmp; if ($cmp = strnatcasecmp($a['content'], $b['content'])) return $cmp; return 0; }