Skip to content

Commit 3cdc664

Browse files
committed
Use single quotes and LFs, add semicolons
1 parent c57e101 commit 3cdc664

File tree

5 files changed

+36
-36
lines changed

5 files changed

+36
-36
lines changed

web/templates/admin/add_dns.js.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
$(document).ready(function(){
88
$('.add-ns-button').click(function(){
9-
var n = $("input[name^=v_ns]").length;
9+
var n = $('input[name^=v_ns]').length;
1010
if(n < 8){
1111
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
1212
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
@@ -25,11 +25,11 @@
2525
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
2626
})
2727
$('.add-ns').show()
28-
})
28+
});
2929

3030
$('input[name^=v_ns]').each(function(i, ns){
3131
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
32-
})
32+
});
3333

3434
});
3535
</script>
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
<script>
2-
$(document).ready(function(){
3-
$('.add-ns-button').click(function(){
4-
var n = $("input[name^=v_ns]").length;
5-
if(n < 8){
6-
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
7-
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
8-
t.find('span').show();
9-
$('tr.add-ns').before(t);
10-
}
11-
if( n == 7 ) {
12-
$('.add-ns').hide();
13-
}
14-
});
15-
16-
$('.remove-ns').click(function(){
17-
$(this).parents('tr')[0].remove();
18-
$('input[name^=v_ns]').each(function(i, ns){
19-
$(ns).attr({name: 'v_ns'+(i+1)});
20-
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
21-
})
22-
$('.add-ns').show();
23-
});
24-
25-
$('input[name^=v_ns]').each(function(i, ns){
26-
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
27-
});
28-
});
29-
</script>
30-
<script src="/js/pages/add.package.js"></script>
1+
<script>
2+
$(document).ready(function(){
3+
$('.add-ns-button').click(function(){
4+
var n = $('input[name^=v_ns]').length;
5+
if(n < 8){
6+
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
7+
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
8+
t.find('span').show();
9+
$('tr.add-ns').before(t);
10+
}
11+
if( n == 7 ) {
12+
$('.add-ns').hide();
13+
}
14+
});
15+
16+
$('.remove-ns').click(function(){
17+
$(this).parents('tr')[0].remove();
18+
$('input[name^=v_ns]').each(function(i, ns){
19+
$(ns).attr({name: 'v_ns'+(i+1)});
20+
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
21+
});
22+
$('.add-ns').show();
23+
});
24+
25+
$('input[name^=v_ns]').each(function(i, ns){
26+
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
27+
});
28+
});
29+
</script>
30+
<script src="/js/pages/add.package.js"></script>

web/templates/admin/edit_package.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
$(document).ready(function(){
33
$('.add-ns-button').click(function(){
4-
var n = $("input[name^=v_ns]").length;
4+
var n = $('input[name^=v_ns]').length;
55
if(n < 8){
66
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
77
t.find('input').attr({value:'', name:'v_ns'+(n+1)});

web/templates/admin/edit_user.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
$(document).ready(function(){
1414
$('.add-ns-button').click(function(){
15-
var n = $("input[name^=v_ns]").length;
15+
var n = $('input[name^=v_ns]').length;
1616
if(n < 8){
1717
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
1818
t.find('input').attr({value:'', name:'v_ns'+(n+1)});

web/templates/user/edit_user.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
$(document).ready(function(){
1414
$('.add-ns-button').click(function(){
15-
var n = $("input[name^=v_ns]").length;
15+
var n = $('input[name^=v_ns]').length;
1616
if(n < 8){
1717
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
1818
t.find('input').attr({value:'', name:'v_ns'+(n+1)});

0 commit comments

Comments
 (0)