Commit dd377e0e authored by Ketan's avatar Ketan

commit files latest

parent 35eac5b1
......@@ -16,9 +16,8 @@ $_config = $this->helper('Sm\Shop4u\Helper\Data');
$zoom_enable = $_config->getProductDetail('use_zoom_image');
$zoom_width = $_config->getProductDetail('zoom_width');
$thumbstyle = "vertical";
//$thumbstyle = $_config->getProductDetail('thumbs_style');
$thumbstyle = 'vertical';
$loop = $_config->getProductDetail('image_loop');
$keyboard = $_config->getProductDetail('image_keyboard');
$bigNav = $_config->getProductDetail('image_navigation');
......@@ -29,9 +28,8 @@ $thumbs_nav = $_config->getProductDetail('thumbs_navigation');
$breakpoints = $_config->getProductDetail('breakpoints_width');
?>
?>
......@@ -70,6 +68,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
], function ($) {
'use strict';
setTimeout(function () {
jQuery('span:contains("Canvas Images")').parent().next().children().attr('readonly','readonly');
jQuery('.image-upload-custom<?php echo $optionKey; ?>').click(function () {
jQuery('#imgupload<?php echo $optionKey; ?>').trigger('click');
});
......@@ -82,6 +82,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
}, 1500);
});
function imageHolder<?php echo $optionKey; ?>(status, message, imageUrl) {
if (status) {
require([
......@@ -90,6 +91,12 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
if (jQuery('#imgupload<?php echo $optionKey; ?>').length) {
jQuery('.image-upload-custom<?php echo $optionKey; ?>').html("");
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'))) {
<?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 data-role="loader" class="loading-mask">
<div class="loader">
......@@ -137,7 +198,7 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
{
"[data-gallery-role=gallery-placeholder]": {
"mage/gallery/gallery": {
"mixins":["magnifier/magnify"],
<?php /* ?> "mixins":["magnifier/magnify"],
"magnifierOpts": {
<?php if ($zoom_enable) { ?>
"enabled": true,
......@@ -154,7 +215,8 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
"width": <?php echo $zoom_width; ?>,
"mode": "outside"
},
"data": <?php /* @escapeNotVerified */
<?php */ ?>
"data": <?php /* @escapeNotVerified */
echo $block->getGalleryImagesJson(); ?>,
"options": {
<?php if ($thumbstyle == 'horizontal' || $thumbstyle == 'vertical') { ?>
......@@ -282,3 +344,4 @@ if (!empty($product->getCustomAttribute('image_canvas_area'))) {
}
</script>
.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.
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