responsive product images
This commit is contained in:
parent
297b539154
commit
c80a2f4388
|
|
@ -28,10 +28,10 @@ class ProductReviewDataGrid
|
|||
|
||||
return DataGrid::make([
|
||||
'name' => 'Review',
|
||||
'table' => 'product_reviews',
|
||||
'select' => 'id',
|
||||
'table' => 'product_reviews as pr',
|
||||
'select' => 'pr.id',
|
||||
'perpage' => 10,
|
||||
'aliased' => false, //use this with false as default and true in case of joins
|
||||
'aliased' => true, //use this with false as default and true in case of joins
|
||||
|
||||
'massoperations' =>[
|
||||
[
|
||||
|
|
@ -57,6 +57,13 @@ class ProductReviewDataGrid
|
|||
],
|
||||
|
||||
'join' => [
|
||||
[
|
||||
'join' => 'leftjoin',
|
||||
'table' => 'products_grid as pt',
|
||||
'primaryKey' => 'pr.product_id',
|
||||
'condition' => '=',
|
||||
'secondaryKey' => 'pt.product_id',
|
||||
]
|
||||
],
|
||||
|
||||
//use aliasing on secodary columns if join is performed
|
||||
|
|
@ -64,25 +71,33 @@ class ProductReviewDataGrid
|
|||
'columns' => [
|
||||
|
||||
[
|
||||
'name' => 'id',
|
||||
'name' => 'pr.id',
|
||||
'alias' => 'reviewId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'title',
|
||||
'name' => 'pr.title',
|
||||
'alias' => 'titleName',
|
||||
'type' => 'string',
|
||||
'label' => 'Title',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'comment',
|
||||
'name' => 'pr.comment',
|
||||
'alias' => 'productComment',
|
||||
'type' => 'string',
|
||||
'label' => 'Comment',
|
||||
'sortable' => true,
|
||||
], [
|
||||
'name' => 'status',
|
||||
],
|
||||
[
|
||||
'name' => 'pt.name',
|
||||
'alias' => 'productName',
|
||||
'type' => 'string',
|
||||
'label' => 'Product Name',
|
||||
'sortable' => true,
|
||||
],
|
||||
[
|
||||
'name' => 'pr.status',
|
||||
'alias' => 'reviewStatus',
|
||||
'type' => 'number',
|
||||
'label' => 'Status',
|
||||
|
|
@ -99,27 +114,27 @@ class ProductReviewDataGrid
|
|||
//don't use aliasing in case of filters
|
||||
'filterable' => [
|
||||
[
|
||||
'column' => 'id',
|
||||
'column' => 'pr.id',
|
||||
'alias' => 'reviewId',
|
||||
'type' => 'number',
|
||||
'label' => 'ID',
|
||||
], [
|
||||
'column' => 'title',
|
||||
'column' => 'pr.title',
|
||||
'alias' => 'titleName',
|
||||
'type' => 'string',
|
||||
'label' => 'Title',
|
||||
], [
|
||||
'column' => 'rating',
|
||||
'alias' => 'productRating',
|
||||
'type' => 'number',
|
||||
'label' => 'Rating',
|
||||
], [
|
||||
'column' => 'comment',
|
||||
'column' => 'pr.comment',
|
||||
'alias' => 'productComment',
|
||||
'type' => 'string',
|
||||
'label' => 'Comment',
|
||||
], [
|
||||
'column' => 'status',
|
||||
'column' => 'pt.name',
|
||||
'alias' => 'productName',
|
||||
'type' => 'string',
|
||||
'label' => 'Product Name',
|
||||
],[
|
||||
'column' => 'pr.status',
|
||||
'alias' => 'reviewStatus',
|
||||
'type' => 'string',
|
||||
'label' => 'Status',
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=55f8798e657b22f380c9",
|
||||
"/css/shop.css": "/css/shop.css?id=4def3ab1fb731fea6751"
|
||||
}
|
||||
"/js/shop.js": "/js/shop.js",
|
||||
"/css/shop.css": "/css/shop.css"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1713,7 +1713,7 @@ section.product-detail {
|
|||
margin-bottom: 15px;
|
||||
font-weight: 600;
|
||||
color: #FC6868;
|
||||
|
||||
|
||||
&.active {
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
|
@ -1833,6 +1833,15 @@ section.product-detail {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 510px) {
|
||||
section.product-detail div.layouter form {
|
||||
.details {
|
||||
margin-top: -90px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//product pages responsive css end here
|
||||
|
||||
//rating and reviews of product pages
|
||||
|
|
@ -2086,7 +2095,9 @@ section.cart {
|
|||
width: 90px;
|
||||
}
|
||||
.item-details .misc {
|
||||
margin-left: -105px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2349,6 +2360,7 @@ section.cart {
|
|||
|
||||
ul.checkout-steps{
|
||||
border-bottom: none;
|
||||
padding-bottom: 0px;
|
||||
|
||||
span {
|
||||
display: none;
|
||||
|
|
@ -2364,6 +2376,8 @@ section.cart {
|
|||
}
|
||||
|
||||
.step-content {
|
||||
padding-top: 0px;
|
||||
|
||||
.control-group .control {
|
||||
width:100%;
|
||||
}
|
||||
|
|
@ -3187,22 +3201,17 @@ section.review {
|
|||
|
||||
// css for loader
|
||||
.cp-spinner {
|
||||
margin-left: 19%;
|
||||
margin-top: 13%;
|
||||
position: absolute;
|
||||
margin-bottom: 20%;
|
||||
left: 26%;
|
||||
margin-top: calc(20% - 80px);
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 720px) {
|
||||
.cp-spinner {
|
||||
margin-left: 42.5%;
|
||||
margin-top: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.cp-spinner {
|
||||
margin-top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -24px;
|
||||
top: 50%;
|
||||
margin-top: -24px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,44 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = function() {
|
||||
|
||||
var thumbList = document.getElementsByClassName('thumb-list')[0];
|
||||
var thumbFrame = document.getElementsByClassName('thumb-frame');
|
||||
var productHeroImage = document.getElementsByClassName('product-hero-image')[0];
|
||||
|
||||
if(thumbList && productHeroImage){
|
||||
|
||||
for(let i=0 ; i < thumbFrame.length ; i++){
|
||||
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
|
||||
}
|
||||
|
||||
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.height = productHeroImage.offsetHeight + "px";
|
||||
}
|
||||
|
||||
window.onresize = function() {
|
||||
if(thumbList && productHeroImage){
|
||||
|
||||
for(let i=0 ; i < thumbFrame.length ; i++){
|
||||
thumbFrame[i].style.height = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbFrame[i].style.width = (productHeroImage.offsetHeight/4)+ "px";
|
||||
}
|
||||
|
||||
thumbList.style.width = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.minWidth = (productHeroImage.offsetHeight/4) + "px";
|
||||
thumbList.style.height = productHeroImage.offsetHeight + "px";
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@endpush
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
const { mix } = require("laravel-mix");
|
||||
require("laravel-mix-merge-manifest");
|
||||
|
||||
var publicPath = 'publishable/assets';
|
||||
// var publicPath = "../../../public/themes/default/assets";
|
||||
// var publicPath = 'publishable/assets';
|
||||
var publicPath = "../../../public/themes/default/assets";
|
||||
|
||||
mix.setPublicPath(publicPath).mergeManifest();
|
||||
mix.disableNotifications();
|
||||
|
|
|
|||
Loading…
Reference in New Issue