mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 10:58:37 -06:00
Fix bug on "select" link in bind export in prefix page
This commit is contained in:
parent
5282eee5ce
commit
03a65f11a6
@ -121,7 +121,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body">
|
<table class="table table-hover panel-body">
|
||||||
<tr>
|
<tr>
|
||||||
<td><p style="text-overflow: scroll;"><pre id="bind_export">{{ bind_export }}</pre></p></td>
|
<td><pre id="bind_export" style="overflow: auto; word-wrap: normal; white-space: pre;">{{ bind_export }}</pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -162,7 +162,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body">
|
<table class="table table-hover panel-body">
|
||||||
<tr>
|
<tr>
|
||||||
<td><p style="text-overflow: scroll;"><pre id="bind_export">{{ bind_export }}</pre></p></td>
|
<td><pre id="bind_export" style="overflow: auto; word-wrap: normal; white-space: pre;">{{ bind_export }}</pre></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<strong class="text-md-left">BIND Reverse Exports</strong>
|
<strong class="text-md-left">{{ bind_export_count }} BIND Reverse Exports</strong>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-hover panel-body">
|
<table class="table table-hover panel-body">
|
||||||
{% for z in bind_export %}
|
{% for z in bind_export %}
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<a class="pull-right" id="bind_export_select_{{ z.num }}" href="#">Select</a>
|
<a class="pull-right" id="bind_export_select_{{ z.num }}" href="#">Select</a>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr><td>
|
<tr><td>
|
||||||
<p style="text-overflow: scroll;"><pre id="bind_export_{{ z.num }}">{{ z.content }}</pre></p>
|
<pre id="bind_export_{{ z.num }}" style="word-wrap: normal; white-space: pre;">{{ z.content }}</pre>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
@ -138,15 +138,19 @@
|
|||||||
<script>
|
<script>
|
||||||
for(var i=0;i<{{ bind_export_count }};i++) {
|
for(var i=0;i<{{ bind_export_count }};i++) {
|
||||||
$('#bind_export_select_'+i).click(function(e){
|
$('#bind_export_select_'+i).click(function(e){
|
||||||
|
var i_str = $(this).attr('id');
|
||||||
|
i_str = i_str.substr(i_str.lastIndexOf('_')+1);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if(document.selection) {
|
if(document.selection) {
|
||||||
var range = document.body.createTextRange();
|
var range = document.body.createTextRange();
|
||||||
range.moveToElementText(document.getElementById('bind_export_'+i));
|
var id='bind_export_'+i_str;
|
||||||
|
range.moveToElementText(document.getElementById(id));
|
||||||
range.select();
|
range.select();
|
||||||
}
|
}
|
||||||
else if(window.getSelection) {
|
else if(window.getSelection) {
|
||||||
var range = document.createRange();
|
var range = document.createRange();
|
||||||
range.selectNode(document.getElementById('bind_export'+i));
|
var id='bind_export_'+i_str;
|
||||||
|
range.selectNode(document.getElementById(id));
|
||||||
window.getSelection().addRange(range);
|
window.getSelection().addRange(range);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user