mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Use single quotes and LFs, add semicolons
This commit is contained in:
parent
c57e10156e
commit
3cdc664122
5 changed files with 36 additions and 36 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.add-ns-button').click(function(){
|
$('.add-ns-button').click(function(){
|
||||||
var n = $("input[name^=v_ns]").length;
|
var n = $('input[name^=v_ns]').length;
|
||||||
if(n < 8){
|
if(n < 8){
|
||||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||||
|
@ -25,11 +25,11 @@
|
||||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||||
})
|
})
|
||||||
$('.add-ns').show()
|
$('.add-ns').show()
|
||||||
})
|
});
|
||||||
|
|
||||||
$('input[name^=v_ns]').each(function(i, ns){
|
$('input[name^=v_ns]').each(function(i, ns){
|
||||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||||
})
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.add-ns-button').click(function(){
|
$('.add-ns-button').click(function(){
|
||||||
var n = $("input[name^=v_ns]").length;
|
var n = $('input[name^=v_ns]').length;
|
||||||
if(n < 8){
|
if(n < 8){
|
||||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||||
t.find('span').show();
|
t.find('span').show();
|
||||||
$('tr.add-ns').before(t);
|
$('tr.add-ns').before(t);
|
||||||
}
|
}
|
||||||
if( n == 7 ) {
|
if( n == 7 ) {
|
||||||
$('.add-ns').hide();
|
$('.add-ns').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.remove-ns').click(function(){
|
$('.remove-ns').click(function(){
|
||||||
$(this).parents('tr')[0].remove();
|
$(this).parents('tr')[0].remove();
|
||||||
$('input[name^=v_ns]').each(function(i, ns){
|
$('input[name^=v_ns]').each(function(i, ns){
|
||||||
$(ns).attr({name: 'v_ns'+(i+1)});
|
$(ns).attr({name: 'v_ns'+(i+1)});
|
||||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||||
})
|
});
|
||||||
$('.add-ns').show();
|
$('.add-ns').show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('input[name^=v_ns]').each(function(i, ns){
|
$('input[name^=v_ns]').each(function(i, ns){
|
||||||
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
i < 2 ? $(ns).parent().find('span').hide() : $(ns).parent().find('span').show();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="/js/pages/add.package.js"></script>
|
<script src="/js/pages/add.package.js"></script>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.add-ns-button').click(function(){
|
$('.add-ns-button').click(function(){
|
||||||
var n = $("input[name^=v_ns]").length;
|
var n = $('input[name^=v_ns]').length;
|
||||||
if(n < 8){
|
if(n < 8){
|
||||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.add-ns-button').click(function(){
|
$('.add-ns-button').click(function(){
|
||||||
var n = $("input[name^=v_ns]").length;
|
var n = $('input[name^=v_ns]').length;
|
||||||
if(n < 8){
|
if(n < 8){
|
||||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('.add-ns-button').click(function(){
|
$('.add-ns-button').click(function(){
|
||||||
var n = $("input[name^=v_ns]").length;
|
var n = $('input[name^=v_ns]').length;
|
||||||
if(n < 8){
|
if(n < 8){
|
||||||
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
var t = $($('input[name=v_ns1]').parents('tr')[0]).clone(true, true);
|
||||||
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
t.find('input').attr({value:'', name:'v_ns'+(n+1)});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue