crewsportswear update as of 3_18_19
This commit is contained in:
@@ -112,6 +112,14 @@
|
||||
}
|
||||
});
|
||||
|
||||
$('#myCarousel').on('slid.bs.carousel', function (e) {
|
||||
var id = $('.item.active').data('slide-number');
|
||||
// $('#carousel-text').html($('#slide-content-'+id).html());
|
||||
// console.log(id)
|
||||
$('.a_thumbnail').removeClass('active');
|
||||
$('#carousel-selector-'+id).addClass('active');
|
||||
});
|
||||
|
||||
$('.input-number').focusin(function(){
|
||||
$(this).data('oldValue', $(this).val());
|
||||
});
|
||||
@@ -227,20 +235,28 @@
|
||||
$(this).val($(this).val().toUpperCase());
|
||||
});
|
||||
|
||||
$('.image-thumbnails').click(function(){
|
||||
// console.log($(this))
|
||||
// console.log($(this).attr('src'))
|
||||
$('#main-thumbnail').attr('src', $(this).attr('src'));
|
||||
// $('.image-thumbnails').click(function(){
|
||||
// // console.log($(this))
|
||||
// // console.log($(this).attr('src'))
|
||||
// $('#main-thumbnail').attr('src', $(this).attr('src'));
|
||||
|
||||
// $('.a_thumbnail').removeClass('active');
|
||||
// $(this).parent().addClass('active');
|
||||
// });
|
||||
|
||||
$('[id^=carousel-selector-]').click( function(){
|
||||
var id = this.id.substr(this.id.lastIndexOf("-") + 1);
|
||||
var id = parseInt(id);
|
||||
$('#myCarousel').carousel(id);
|
||||
$('.a_thumbnail').removeClass('active');
|
||||
$(this).parent().addClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
|
||||
$(document).on('button click', '.removeRow', function(){
|
||||
var str = $(this).closest('tr').attr('class');
|
||||
var trCount = $('#tableRow tbody').children('tr').length;
|
||||
|
||||
if(trCount == 2){
|
||||
var str = $(this).closest('tr').attr('class');
|
||||
var trCount = $('#tableRow tbody').children('tr').length;
|
||||
|
||||
if(trCount == 2){
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -250,6 +266,40 @@
|
||||
}
|
||||
$('.'+str).remove();
|
||||
});
|
||||
|
||||
$(document).on('button click', '.removeRow-name-and-number', function(){
|
||||
var str = $(this).closest('tr').attr('class');
|
||||
var trCount = $('#tableRow tbody').children('tr').length;
|
||||
|
||||
if(trCount == 2){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(trCount == 3){
|
||||
$('#addnew-btn-tbl-row').remove();
|
||||
$('.tr-remove-btn').html('<button type="button" id="addNewRow_name_and_number" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
|
||||
}
|
||||
$('.'+str).remove();
|
||||
});
|
||||
|
||||
|
||||
$(document).on('button click', '.removeRow-name-number-size', function(){
|
||||
var str = $(this).closest('tr').attr('class');
|
||||
var trCount = $('#tableRow tbody').children('tr').length;
|
||||
|
||||
if(trCount == 2){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(trCount == 3){
|
||||
$('#addnew-btn-tbl-row').remove();
|
||||
$('.tr-remove-btn').html('<button type="button" id="addNewRow_name_number_size" class="btn btn-success btn-sm btn-roster-action" data-toggle="tooltip" title="Add Another"><i class="fa fa-plus" aria-hidden="true"></i></button>');
|
||||
}
|
||||
$('.'+str).remove();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$("#frm-order-list").validate({
|
||||
|
||||
@@ -352,6 +402,88 @@
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('button click', '#addNewRow_name_and_number', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
// console.log(TemplateCode)
|
||||
var orderCounterValue = $('#orderCounterValue').val();
|
||||
var numi = document.getElementById('orderCounterValue');
|
||||
var num = (document.getElementById('orderCounterValue').value -1) + 2;
|
||||
numi.value = num;
|
||||
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
type: "POST",
|
||||
url: "{{ url('/designer/a/add-new-row-name-and-number') }}",
|
||||
data:{
|
||||
|
||||
itemCount : num,
|
||||
tempCode : TemplateCode
|
||||
},
|
||||
|
||||
dataType: "html", //expect html to be returned
|
||||
beforeSend:function(xhr){
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
|
||||
},
|
||||
success: function(response){
|
||||
var className = "row" + (num - 1);
|
||||
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-name-and-number btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
|
||||
$('#addnew-btn-tbl-row').remove();
|
||||
$('#tableRow tbody').append(response);
|
||||
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
|
||||
$('.inputName').keyup(function() {
|
||||
this.value = this.value.toLocaleUpperCase();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(document).on('button click', '#addNewRow_name_number_size', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
// console.log(TemplateCode)
|
||||
var orderCounterValue = $('#orderCounterValue').val();
|
||||
var numi = document.getElementById('orderCounterValue');
|
||||
var num = (document.getElementById('orderCounterValue').value -1) + 2;
|
||||
numi.value = num;
|
||||
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
type: "POST",
|
||||
url: "{{ url('/designer/a/add-new-row-name-number-size') }}",
|
||||
data:{
|
||||
|
||||
itemCount : num,
|
||||
tempCode : TemplateCode
|
||||
},
|
||||
|
||||
dataType: "html", //expect html to be returned
|
||||
beforeSend:function(xhr){
|
||||
var token = $('meta[name="csrf_token"]').attr('content');
|
||||
|
||||
if (token) {
|
||||
return xhr.setRequestHeader('X-CSRF-TOKEN', token);
|
||||
}
|
||||
xhr.setRequestHeader( 'X-Requested-With', 'XMLHttpRequest');
|
||||
},
|
||||
success: function(response){
|
||||
var className = "row" + (num - 1);
|
||||
$('.tr-remove-btn').html('<button type="button" class="btn btn-danger btn-sm removeRow-name-number-size btn-roster-action" data-toggle="tooltip" title="Remove"><i class="fa fa-remove" aria-hidden="true"></i></button>');
|
||||
$('#addnew-btn-tbl-row').remove();
|
||||
$('#tableRow tbody').append(response);
|
||||
$('#orderListPanel').scrollTop($('#orderListPanel')[0].scrollHeight);
|
||||
$('.inputName').keyup(function() {
|
||||
this.value = this.value.toLocaleUpperCase();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}); //end document ready
|
||||
|
||||
function myCart(){
|
||||
|
||||
Reference in New Issue
Block a user