Commit 0af02764 authored by Pradyuman Mishra's avatar Pradyuman Mishra

Merge branch 'develop' of http://silos.incaendo.com/hanumant/coconva2118 into develop

parents 08d040b0 3b8e7747
...@@ -16,9 +16,8 @@ $_config = $this->helper('Sm\Shop4u\Helper\Data'); ...@@ -16,9 +16,8 @@ $_config = $this->helper('Sm\Shop4u\Helper\Data');
$zoom_enable = $_config->getProductDetail('use_zoom_image'); $zoom_enable = $_config->getProductDetail('use_zoom_image');
$zoom_width = $_config->getProductDetail('zoom_width'); $zoom_width = $_config->getProductDetail('zoom_width');
$thumbstyle = "vertical";
//$thumbstyle = $_config->getProductDetail('thumbs_style'); //$thumbstyle = $_config->getProductDetail('thumbs_style');
$thumbstyle = 'vertical';
$loop = $_config->getProductDetail('image_loop'); $loop = $_config->getProductDetail('image_loop');
$keyboard = $_config->getProductDetail('image_keyboard'); $keyboard = $_config->getProductDetail('image_keyboard');
$bigNav = $_config->getProductDetail('image_navigation'); $bigNav = $_config->getProductDetail('image_navigation');
...@@ -29,9 +28,8 @@ $thumbs_nav = $_config->getProductDetail('thumbs_navigation'); ...@@ -29,9 +28,8 @@ $thumbs_nav = $_config->getProductDetail('thumbs_navigation');
$breakpoints = $_config->getProductDetail('breakpoints_width'); $breakpoints = $_config->getProductDetail('breakpoints_width');
?>
?>
...@@ -70,6 +68,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -70,6 +68,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
], function ($) { ], function ($) {
'use strict'; 'use strict';
setTimeout(function () { setTimeout(function () {
jQuery('span:contains("Canvas Images")').parent().next().children().attr('readonly','readonly');
jQuery('.image-upload-custom<?php echo $optionKey; ?>').click(function () { jQuery('.image-upload-custom<?php echo $optionKey; ?>').click(function () {
jQuery('#imgupload<?php echo $optionKey; ?>').trigger('click'); jQuery('#imgupload<?php echo $optionKey; ?>').trigger('click');
}); });
...@@ -82,6 +82,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -82,6 +82,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
}, 1500); }, 1500);
}); });
function imageHolder<?php echo $optionKey; ?>(status, message, imageUrl) { function imageHolder<?php echo $optionKey; ?>(status, message, imageUrl) {
if (status) { if (status) {
require([ require([
...@@ -90,6 +91,12 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -90,6 +91,12 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
if (jQuery('#imgupload<?php echo $optionKey; ?>').length) { if (jQuery('#imgupload<?php echo $optionKey; ?>').length) {
jQuery('.image-upload-custom<?php echo $optionKey; ?>').html(""); jQuery('.image-upload-custom<?php echo $optionKey; ?>').html("");
jQuery('.image-upload-custom<?php echo $optionKey; ?>').append("<img src='" + imageUrl + "' style='width:1000%; height:100%'>"); jQuery('.image-upload-custom<?php echo $optionKey; ?>').append("<img src='" + imageUrl + "' style='width:1000%; height:100%'>");
var imgSpl = imageUrl.split('/');
jQuery('span:contains("Canvas Images")').parent().next().children().val((jQuery('span:contains("Canvas Images")').parent().next().children().val()+','+imgSpl[imgSpl.length - 1]).replace(/^,|,$/g,''));
jQuery('span:contains("Canvas Images")').parent().next().children().attr('readonly','readonly');
} }
}); });
} }
...@@ -105,6 +112,60 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -105,6 +112,60 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
<?php /*
<div style="width: 120px;height: 300px;position: absolute;border: 2px solid red;z-index: 99999;margin: auto;margin-left: 106px;">
<form action="/shop4u/index/index" method="post" target="my_iframe" enctype="multipart/form-data">
<input type="file" name="file" id="imgupload" style="display:none"/>
<div class='image-upload-custom' style="width: 120px;height: 300px;border: 3px solid gray;"></div>
</form>
<iframe name="my_iframe" src="" style="display: none"></iframe>
<script>
require([
'jquery',
], function ($) {
'use strict';
setTimeout(function () {
jQuery('.image-upload-custom').click(function () {
jQuery('#imgupload').trigger('click');
});
jQuery('#imgupload').change(function() {
if (jQuery(this).val() != '') {
jQuery(this).parents('form').submit();
}
});
}, 1500);
});
function imageHolder(status, message, imageUrl) {
if (status) {
require([
'jquery',
], function ($) {
if (jQuery('#imgupload').length) {
jQuery('.image-upload-custom').append("<img src='" + imageUrl + "' style='width:1000%; height:100%'>");
}
});
}
}
</script>
</div>
*/ ?>
<div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder"> <div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder">
<div data-role="loader" class="loading-mask"> <div data-role="loader" class="loading-mask">
<div class="loader"> <div class="loader">
...@@ -137,7 +198,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -137,7 +198,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
{ {
"[data-gallery-role=gallery-placeholder]": { "[data-gallery-role=gallery-placeholder]": {
"mage/gallery/gallery": { "mage/gallery/gallery": {
"mixins":["magnifier/magnify"], <?php /* ?> "mixins":["magnifier/magnify"],
"magnifierOpts": { "magnifierOpts": {
<?php if ($zoom_enable) { ?> <?php if ($zoom_enable) { ?>
"enabled": true, "enabled": true,
...@@ -154,7 +215,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -154,7 +215,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
"width": <?php echo $zoom_width; ?>, "width": <?php echo $zoom_width; ?>,
"mode": "outside" "mode": "outside"
}, },
"data": <?php /* @escapeNotVerified */ <?php */ ?>
"data": <?php /* @escapeNotVerified */
echo $block->getGalleryImagesJson(); ?>, echo $block->getGalleryImagesJson(); ?>,
"options": { "options": {
<?php if ($thumbstyle == 'horizontal' || $thumbstyle == 'vertical') { ?> <?php if ($thumbstyle == 'horizontal' || $thumbstyle == 'vertical') { ?>
...@@ -282,3 +344,4 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) { ...@@ -282,3 +344,4 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
} }
</script> </script>
This diff is collapsed.
This diff is collapsed.
.darkroom-container{position:relative}.darkroom-image-container{top:0;left:0}.darkroom-toolbar{display:block;position:absolute;top:-45px;left:0;background:#444;height:40px;min-width:40px;z-index:99;border-radius:2px;white-space:nowrap;padding:0 5px}.darkroom-toolbar:before{content:"";position:absolute;bottom:-7px;left:20px;width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #444}.darkroom-button-group{display:inline-block;margin:0;padding:0}.darkroom-button-group:last-child{border-right:none}.darkroom-button{box-sizing:border-box;background:transparent;border:none;outline:none;padding:2px 0 0 0;width:40px;height:40px}.darkroom-button:hover{cursor:pointer;background:#555}.darkroom-button:active{cursor:pointer;background:#333}.darkroom-button:disabled .darkroom-icon{fill:#666}.darkroom-button:disabled:hover{cursor:default;background:transparent}.darkroom-button.darkroom-button-active .darkroom-icon{fill:#33b5e5}.darkroom-button.darkroom-button-hidden{display:none}.darkroom-button.darkroom-button-success .darkroom-icon{fill:#99cc00}.darkroom-button.darkroom-button-warning .darkroom-icon{fill:#FFBB33}.darkroom-button.darkroom-button-danger .darkroom-icon{fill:#FF4444}.darkroom-icon{width:24px;height:24px;fill:#fff}
.select-areas-overlay {
background-color: #000;
overflow: hidden;
position: absolute;
}
.blurred {
filter: url("/filters.svg#blur3px");
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-o-filter: blur(3px);
filter: blur(3px);
}
.select-areas-outline {
background: #fff url('outline.gif');
overflow: hidden;
}
.select-areas-resize-handler {
background-color: #000;
border: 1px #fff solid;
height: 8px;
width: 8px;
overflow: hidden;
}
.select-areas-delete-area {
background: url('bt-delete.png');
cursor: pointer;
height: 16px;
width: 16px;
}
.delete-area {
position: absolute;
cursor: pointer;
padding: 5px;
}
.select-areas-overlay {
background: none;
}
.select-areas-outline {
background: none;
visibility: hidden;
}
.select-areas-outline {
visibility: hidden;
}
.select-areas-background-area {
background: none !important;
margin: -1px 0 0 -1px;
border: 2px solid green;
}
.blurred {
filter: none;
-webkit-filter: none;
-moz-filter: none;
-o-filter: none;
}
This diff is collapsed.
This diff is collapsed.
...@@ -30,11 +30,23 @@ var config = { ...@@ -30,11 +30,23 @@ var config = {
'popupWindow': 'mage/popup-window', 'popupWindow': 'mage/popup-window',
'validation': 'mage/validation/validation', 'validation': 'mage/validation/validation',
'welcome': 'Magento_Theme/js/view/welcome', 'welcome': 'Magento_Theme/js/view/welcome',
'breadcrumbs': 'Magento_Theme/js/view/breadcrumbs' 'breadcrumbs': 'Magento_Theme/js/view/breadcrumbs',
// 'selectareas': 'jquery/selectareas'
} }
}, },
paths: { paths: {
'jquery/ui': 'jquery/jquery-ui' 'jquery/ui': 'jquery/jquery-ui',
'selectareas': 'jquery/selectareas',
'Croppie': 'jquery/croppie'
},
shim: {
'selectareas': {
deps: ['jquery']
},
'Croppie': {
deps: ['jquery']
}
}, },
deps: [ deps: [
'jquery/jquery.mobile.custom', 'jquery/jquery.mobile.custom',
...@@ -890,42 +902,42 @@ var config = { ...@@ -890,42 +902,42 @@ var config = {
require.config(config); require.config(config);
})(); })();
(function() { (function() {
var config = { var config = {
map: { map: {
'*': { '*': {
customModal: 'Sm_CartQuickPro/js/custom-modal', customModal: 'Sm_CartQuickPro/js/custom-modal',
quickView: 'Sm_CartQuickPro/js/custom-quickview', quickView: 'Sm_CartQuickPro/js/custom-quickview',
ajaxCart: 'Sm_CartQuickPro/js/custom-addtocart', ajaxCart: 'Sm_CartQuickPro/js/custom-addtocart',
addToCart: 'Sm_CartQuickPro/js/custom-msrp', addToCart: 'Sm_CartQuickPro/js/custom-msrp',
sidebar: 'Sm_CartQuickPro/js/custom-sidebar', sidebar: 'Sm_CartQuickPro/js/custom-sidebar',
compareItems: 'Sm_CartQuickPro/js/custom-compare', compareItems: 'Sm_CartQuickPro/js/custom-compare',
wishlist: 'Sm_CartQuickPro/js/custom-wishlist' wishlist: 'Sm_CartQuickPro/js/custom-wishlist'
} }
}, },
deps: [ deps: [
'Magento_Catalog/js/catalog-add-to-cart', 'Magento_Catalog/js/catalog-add-to-cart',
'Magento_Msrp/js/msrp' 'Magento_Msrp/js/msrp'
] ]
}; };
require.config(config); require.config(config);
})(); })();
(function() { (function() {
var config = { var config = {
map: { map: {
'*': { '*': {
jquerybootstrap: "Sm_Shop4u/js/bootstrap/bootstrap.min", jquerybootstrap: "Sm_Shop4u/js/bootstrap/bootstrap.min",
owlcarousel: "Sm_Shop4u/js/owl.carousel", owlcarousel: "Sm_Shop4u/js/owl.carousel",
jqueryfancyboxpack: "Sm_Shop4u/js/jquery.fancybox.pack", jqueryfancyboxpack: "Sm_Shop4u/js/jquery.fancybox.pack",
fancybuttons: "Sm_Shop4u/js/helpers/jquery.fancybox-buttons", fancybuttons: "Sm_Shop4u/js/helpers/jquery.fancybox-buttons",
fancymedia: "Sm_Shop4u/js/helpers/jquery.fancybox-media", fancymedia: "Sm_Shop4u/js/helpers/jquery.fancybox-media",
fancythumbs: "Sm_Shop4u/js/helpers/jquery.fancybox-thumbs", fancythumbs: "Sm_Shop4u/js/helpers/jquery.fancybox-thumbs",
jqueryunveil: "Sm_Shop4u/js/jquery.unveil", jqueryunveil: "Sm_Shop4u/js/jquery.unveil",
yttheme: "Sm_Shop4u/js/yttheme" yttheme: "Sm_Shop4u/js/yttheme"
} }
} }
}; };
require.config(config); require.config(config);
})(); })();
...@@ -950,4 +962,4 @@ require.config(config); ...@@ -950,4 +962,4 @@ require.config(config);
})(require); })(require);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment