Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F324292
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Nov 25, 9:22 AM
Size
6 KB
Mime Type
text/x-diff
Expires
Wed, Nov 27, 9:22 AM (1 d, 18 h)
Engine
blob
Format
Raw Data
Handle
156135
Attached To
rWEBDNS WebDNS (edet4)
View Options
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index f5e476b..be4f24f 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -1,72 +1,76 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery.min
//= require jquery_ujs
//= require bootstrap.min
//= require typeahead.bundle.min
//= require_tree .
$(function() {
// Show priority on MX/SRV record only
$('#record_type').change(function() {
if ($(this).val() == 'MX') { // MX, default priority 10
$('#record_prio.autohide').parents('div.form-group').removeClass('hidden');
+ $('#record_prio.autodisable').prop('disabled', false);
+
$('#record_prio').val('10');
} else if ($(this).val() == 'SRV') { // SRV
$('#record_prio').val('');
$('#record_prio.autohide').parents('div.form-group').removeClass('hidden');
+ $('#record_prio.autodisable').prop('disabled', false);
} else {
$('#record_prio').val('');
$('#record_prio.autohide').parents('div.form-group').addClass('hidden');
+ $('#record_prio.autodisable').prop('disabled', true);
}
});
// Show master only on SLAVE domains
$('#domain_type').change(function() {
if ($(this).val() == 'SLAVE') {
$('#domain_master').parents('div.form-group').removeClass('hidden');
} else {
$('#domain_master').parents('div.form-group').addClass('hidden');
}
});
// Disable DNSSEC options
$('#domain_dnssec').change(function() {
if ($(this).val()== 'true') {
$("#dnssec_fieldset").prop('disabled', false)
} else {
$("#dnssec_fieldset").prop('disabled', true);
}
});
var searchMembersGroup = $('#js-search-member').data('group');
var searchMembers = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('email'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
identify: function(obj) { return obj.id; },
remote: {
url: '/groups/' + searchMembersGroup + '/search_member.json?q=%QUERY',
wildcard: '%QUERY'
}
});
$('#js-search-member').typeahead({
hint: true,
minLength: 2
}, {
name: 'members',
display: 'email',
source: searchMembers
});
});
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index a84ddbb..5f3a3a9 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -1,30 +1,40 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require bootstrap.min
*= require_tree .
*= require_self
*/
/* Make sure navbar does not overlay body */
body {
padding-top: 70px;
}
/* Reset bootstrap's help cursor on control links */
table a abbr[title] {
cursor: pointer;
}
.tab-pane table {
margin-top: 20px;
}
+
+#inline-record-form #record_ttl {
+ width: 80px;
+}
+#inline-record-form #record_prio {
+ width: 80px;
+}
+#inline-record-form #record_content {
+ width: 300px;
+}
diff --git a/app/views/domains/show.html.erb b/app/views/domains/show.html.erb
index e6819a3..836dc87 100644
--- a/app/views/domains/show.html.erb
+++ b/app/views/domains/show.html.erb
@@ -1,54 +1,48 @@
<% content_for :more_breadcrumbs do %>
<li>
<%= link_to_edit edit_domain_path(@domain) %>
</li>
<% end if admin? %>
+<%= render 'records/inline_form' %>
+
<table class="table table-striped table-hover">
<thead>
<tr>
<th colspan="6">Records</th>
<th colspan="3"><%= 'Controls' if !@domain.slave? %></th>
</tr>
</thead>
<tbody>
<% Record.smart_order(@domain.records).each do |record| %>
<tr class="<%= record.disabled? ? 'warning' : '' %>">
<td><%= record.name %></td>
<td><%= record.ttl %></td>
<td>IN</td>
<td><%= record.type %></td>
<td><%= record.supports_prio? ? record.prio : '' %></td>
<td><%= record.content %></td>
<% if record.classless_delegation? %>
<td/>
<td/>
<td><%= link_to_destroy [@domain, record], method: :delete, data: { confirm: 'Are you sure?' } %></td>
<% elsif can_edit?(record) %>
<td>
<% if record.disabled? %>
<%= link_to_enable enable_domain_record_path(@domain, record), method: :put %>
<% else %>
<%= link_to_disable disable_domain_record_path(@domain, record), method: :put %>
<% end %>
</td>
<td><%= link_to_edit edit_domain_record_path(@domain, record) %></td>
<td><%= link_to_destroy [@domain, record], method: :delete, data: { confirm: 'Are you sure?' } %></td>
<% else %>
<td/>
<td/>
<td/>
<% end %>
</tr>
<% end %>
</tbody>
</table>
-
-<p>
- <%= link_to 'Add Record', '#new_record', class: 'btn btn-primary', onclick: '$("#new_record_wrapper").toggleClass("hidden");' %>
-</p>
-
-<div class="jumbotron hidden" id="new_record_wrapper">
- <%= render 'records/form' %>
-</div>
Event Timeline
Log In to Comment