add currency for teamstore
This commit is contained in:
@@ -232,25 +232,10 @@
|
||||
$('#display-product-price').html('$ ' + $('#product_price').val());
|
||||
}
|
||||
});
|
||||
|
||||
// $(document).on('change', '#product_price', function() {
|
||||
// var product_price = $('#product_price').val();
|
||||
// $('#display-product-price').html('$ ' + product_price);
|
||||
// });
|
||||
|
||||
|
||||
$(document).on('input keyup', '.capitalizeText', function() {
|
||||
$(this).val($(this).val().toUpperCase());
|
||||
});
|
||||
|
||||
// $('.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);
|
||||
@@ -259,67 +244,6 @@
|
||||
$('.a_thumbnail').removeClass('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){
|
||||
return false;
|
||||
}
|
||||
|
||||
if(trCount == 3){
|
||||
$('#addnew-btn-tbl-row').remove();
|
||||
$('.tr-remove-btn').html('<button type="button" id="addNewRow" 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-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();
|
||||
});
|
||||
|
||||
$(document).on('button click', '.removeRow-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_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();
|
||||
});
|
||||
|
||||
$("#frm-order-list").validate({
|
||||
|
||||
@@ -383,6 +307,85 @@
|
||||
|
||||
}
|
||||
|
||||
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
$(document).on('button click', '.removeRow', 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" 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-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();
|
||||
});
|
||||
|
||||
$(document).on('button click', '.removeRow-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_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-gamer-field', 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_gamer_field" 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();
|
||||
});
|
||||
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end removing of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
|
||||
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
$(document).on('button click', '#addNewRow', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
// console.log(TemplateCode)
|
||||
@@ -463,7 +466,6 @@
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(document).on('button click', '#addNewRow_name_number_size', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
// console.log(TemplateCode)
|
||||
@@ -504,6 +506,48 @@
|
||||
|
||||
});
|
||||
|
||||
$(document).on('button click', '#addNewRow_gamer_field', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
var product_url = $('#product_url').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-gamer-field') }}",
|
||||
data:{
|
||||
|
||||
itemCount : num,
|
||||
tempCode : TemplateCode,
|
||||
product_url : product_url
|
||||
},
|
||||
|
||||
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-gamer-field 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_number', function(){
|
||||
var TemplateCode = $('#template_code').val();
|
||||
// console.log(TemplateCode)
|
||||
@@ -543,7 +587,8 @@
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ end adding of rows @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
}); //end document ready
|
||||
|
||||
function myCart(){
|
||||
|
||||
Reference in New Issue
Block a user