Initial Commit
This commit is contained in:
370
resources/views/teamstore-layout/main.blade.php
Normal file
370
resources/views/teamstore-layout/main.blade.php
Normal file
@@ -0,0 +1,370 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear.">
|
||||
<meta name="keywords" content="custom uniforms, footwear, athletic equipment, sporting goods">
|
||||
<meta name="author" content="Frank John Begornia">
|
||||
<meta name="csrf_token" content="{{ csrf_token() }}" />
|
||||
<meta name="company_url" content="{{ $store_array[0]->StoreUrl }}" />
|
||||
|
||||
<meta property="og:url" content="http://uniformnetwork.com/crew/" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="CREW Uniform Customizer" />
|
||||
<meta property="og:description" content="Custom Uniforms offered in a variety colors to match your team. Browse through our baseball, fastpitch, softball, lacrosse, football, volleyball and basketball gear." />
|
||||
<meta property="og:image" content="{{asset('public/images/fb-share-logo.png')}}" />
|
||||
|
||||
<!-- favicons
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{asset('public/favicons/apple-touch-icon.png')}}">
|
||||
<link rel="icon" type="image/png" href="{{asset('public/favicons/favicon-32x32.png')}}" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="{{asset('public/favicons/favicon-16x16.png')}}" sizes="16x16">
|
||||
<link rel="manifest" href="{{asset('public/favicons/manifest.json')}}">
|
||||
<link rel="mask-icon" href="{{asset('public/favicons/safari-pinned-tab.svg')}}" color="#5bbad5">
|
||||
<meta name="theme-color" content="#ffffff">-->
|
||||
<!-- end favicons -->
|
||||
<title>{{ $store_array[0]->StoreName }} Team Store</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="{{asset('public/assets/css/bootstrap.min.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
|
||||
<link href="{{asset('public/assets/css/ie10-viewport-bug-workaround.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template -->
|
||||
<link href="{{asset('public/assets/css/style.css')}}" rel="stylesheet">
|
||||
|
||||
<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
|
||||
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
|
||||
<script src="{{asset('public/assets/js/ie-emulation-modes-warning.js')}}"></script>
|
||||
|
||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
|
||||
|
||||
<![endif]-->
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Social Media Share button
|
||||
<script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property=599bc5cf6d61950012975405&product=sticky-share-buttons"></script>-->
|
||||
|
||||
<link href="{{asset('/public/designer/css/build.css')}}" rel="stylesheet">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@include('layout.navbar')
|
||||
<!-- Example row of columns -->
|
||||
@yield('content')
|
||||
|
||||
|
||||
<!-- Bootstrap core JavaScript ================================================= !-->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
|
||||
<script src="{{asset('public/assets/js/bootstrap.min.js')}}"></script>
|
||||
<!-- <script>window.jQuery || document.write('<script src="{{asset('public/assets/js/vendor/jquery.min.js')}}"><\/script>')</script> -->
|
||||
<!-- <script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script> -->
|
||||
<script src="{{asset('public/assets/js/jquery.validate.js')}}"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> -->
|
||||
<!-- <script src="{{asset('public/assets/js/crew-designer.js')}}"></script> -->
|
||||
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
myCart();
|
||||
$('.inputName').keyup(function() {
|
||||
this.value = this.value.toLocaleUpperCase();
|
||||
});
|
||||
$('.btn-number').click(function(e){
|
||||
e.preventDefault();
|
||||
|
||||
fieldName = $(this).attr('data-field');
|
||||
type = $(this).attr('data-type');
|
||||
var input = $("input[name='"+fieldName+"']");
|
||||
var currentVal = parseInt(input.val());
|
||||
if (!isNaN(currentVal)) {
|
||||
if(type == 'minus') {
|
||||
|
||||
if(currentVal > input.attr('min')) {
|
||||
input.val(currentVal - 1).change();
|
||||
}
|
||||
if(parseInt(input.val()) == input.attr('min')) {
|
||||
$(this).attr('disabled', true);
|
||||
}
|
||||
|
||||
} else if(type == 'plus') {
|
||||
|
||||
if(currentVal < input.attr('max')) {
|
||||
input.val(currentVal + 1).change();
|
||||
}
|
||||
if(parseInt(input.val()) == input.attr('max')) {
|
||||
$(this).attr('disabled', true);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
input.val(0);
|
||||
}
|
||||
});
|
||||
|
||||
$('.input-number').focusin(function(){
|
||||
$(this).data('oldValue', $(this).val());
|
||||
});
|
||||
|
||||
$('.input-number').change(function() {
|
||||
|
||||
minValue = parseInt($(this).attr('min'));
|
||||
maxValue = parseInt($(this).attr('max'));
|
||||
valueCurrent = parseInt($(this).val());
|
||||
|
||||
name = $(this).attr('name');
|
||||
if(valueCurrent >= minValue) {
|
||||
$(".btn-number[data-type='minus'][data-field='"+name+"']").removeAttr('disabled')
|
||||
} else {
|
||||
alert('Sorry, the minimum value was reached');
|
||||
$(this).val($(this).data('oldValue'));
|
||||
}
|
||||
if(valueCurrent <= maxValue) {
|
||||
$(".btn-number[data-type='plus'][data-field='"+name+"']").removeAttr('disabled')
|
||||
} else {
|
||||
alert('Sorry, the maximum value was reached');
|
||||
$(this).val($(this).data('oldValue'));
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
$(".input-number").keydown(function (e) {
|
||||
// Allow: backspace, delete, tab, escape, enter and .
|
||||
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 190]) !== -1 ||
|
||||
// Allow: Ctrl+A
|
||||
(e.keyCode == 65 && e.ctrlKey === true) ||
|
||||
// Allow: home, end, left, right
|
||||
(e.keyCode >= 35 && e.keyCode <= 39)) {
|
||||
// let it happen, don't do anything
|
||||
return;
|
||||
}
|
||||
// Ensure that it is a number and stop the keypress
|
||||
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('.multi-item-carousel .item').each(function(){
|
||||
var next = $(this).next();
|
||||
if (!next.length) {
|
||||
next = $(this).siblings(':first');
|
||||
}
|
||||
|
||||
next.children(':first-child').clone().appendTo($(this));
|
||||
|
||||
|
||||
for (var i=0; i<2; i++){
|
||||
|
||||
next=next.next();
|
||||
|
||||
if (!next.length){
|
||||
next=$(this).siblings(':first');
|
||||
}
|
||||
next.children(':first-child').clone().appendTo($(this));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$('#jersey_chk').click(function(){
|
||||
|
||||
var product_price = $('#product_price').val();
|
||||
var getPriceHold = $('#price_holder').val();
|
||||
var getHalf = getPriceHold / 2;
|
||||
|
||||
if($(this).is(':checked')){
|
||||
$('.td-hide').css('display', '');
|
||||
$('.th-hide').css('display', '');
|
||||
|
||||
$('#product_price').val(Number(product_price) + Number(getHalf));
|
||||
$('#display-product-price').html('$ ' + $('#product_price').val());
|
||||
// console.log($('#product_price').val() - getHalf);
|
||||
}else{
|
||||
$('.cls-uniformName').val('');
|
||||
$('.td-hide').css('display', 'none');
|
||||
$('.th-hide').css('display', 'none');
|
||||
|
||||
$('#product_price').val(Number(product_price) - Number(getHalf));
|
||||
$('#display-product-price').html('$ ' + $('#product_price').val());
|
||||
// console.log($('#product_price').val() + getHalf);
|
||||
}
|
||||
// console.log($(this).is(':checked'));
|
||||
});
|
||||
|
||||
$('#shorts_chk').click(function(){
|
||||
|
||||
var product_price = $('#product_price').val();
|
||||
var getPriceHold = $('#price_holder').val();
|
||||
var getHalf = getPriceHold / 2;
|
||||
|
||||
if($(this).is(':checked')){
|
||||
$('#product_price').val(Number(product_price) + Number(getHalf));
|
||||
$('#display-product-price').html('$ ' + $('#product_price').val());
|
||||
}else{
|
||||
|
||||
$('#product_price').val(Number(product_price) - Number(getHalf));
|
||||
$('#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');
|
||||
});
|
||||
|
||||
$(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();
|
||||
});
|
||||
|
||||
$("#frm-order-list").validate({
|
||||
|
||||
rules: {
|
||||
|
||||
'order_jersey_size[]': {
|
||||
required: true
|
||||
},
|
||||
'order_shorts_size[]': {
|
||||
required: true
|
||||
},
|
||||
'order_number[]': {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
messages: {},
|
||||
errorPlacement: function(error, element) {
|
||||
var placement = $(element).data('error');
|
||||
if (placement) {
|
||||
$(placement).html(error);
|
||||
}
|
||||
},
|
||||
|
||||
success: function(error, element) {
|
||||
var placement = $(element).data('error');
|
||||
if (placement) {
|
||||
$(placement).html('');
|
||||
}
|
||||
},
|
||||
submitHandler: submitOrderListForm
|
||||
});
|
||||
|
||||
function submitOrderListForm(){
|
||||
var data = $("#frm-order-list").serializeArray();
|
||||
|
||||
$.ajax({
|
||||
type : 'POST',
|
||||
url : "{{ url('teamstore/q/add-to-cart') }}",
|
||||
data : data,
|
||||
dataType: 'json',
|
||||
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){
|
||||
|
||||
if(response.success){
|
||||
window.location = "{{ url('cart') }}";
|
||||
}else{
|
||||
alert(response.message);
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
$(document).on('button click', '#addNewRow', 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') }}",
|
||||
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 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(){
|
||||
$.ajax({ //create an ajax request to load_page.php
|
||||
|
||||
type: "GET",
|
||||
url: "{{url('cartcount')}}",
|
||||
dataType: "html",
|
||||
success: function(response){
|
||||
$("#my-cart-count").html(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user