This repository was archived by the owner on Sep 28, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
resources/views/product/card Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 9
9
<?php $class = ($image -> is_main_image == 1 ) ? " active" : " " ; ? >
10
10
<div class =" image-preview" >
11
11
<div class =" actual-image-thumbnail" >
12
- <img class =" img-thumbnail img-tag img-responsive" src =" {{ ($image -> path -> smallUrl ) } }" />
12
+ <img class =" img-thumbnail img-tag img-responsive"
13
+ data-path =" {{ $image -> path -> relativePath } }"
14
+ src =" {{ ($image -> path -> smallUrl ) } }" />
13
15
<input type =" hidden" name =" image[{{ $image -> id } } ][path]" value =" {{ $image -> path -> relativePath } }" />
14
16
@if ($image -> is_main_image )
15
17
<input type =" hidden" class =" is_main_image_hidden_field"
@@ -109,7 +111,7 @@ class="btn is_main_image_button {{ $class }} selected-icon"
109
111
110
112
111
113
var token = jQuery (' .product-image-element' ).attr (' data-token' );
112
- var path = jQuery (e .target ).parents (' .image-preview:first' ).find (' .img-tag' ).attr (' src ' );
114
+ var path = jQuery (e .target ).parents (' .image-preview:first' ).find (' .img-tag' ).attr (' data-path ' );
113
115
var data = {_token: token, path: path};
114
116
jQuery .ajax ({
115
117
url: ' {{ URL:: to (" /admin/product-image/delete" ) } }' ,
You can’t perform that action at this time.
0 commit comments