Skip to content
This repository was archived by the owner on Sep 28, 2019. It is now read-only.

Commit 781a050

Browse files
committed
updated product image card
1 parent 9397d74 commit 781a050

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

resources/views/product/card/images.blade.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<?php $class = ($image->is_main_image == 1) ? "active" : ""; ?>
1010
<div class="image-preview">
1111
<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) }}"/>
1315
<input type="hidden" name="image[{{ $image->id }}][path]" value="{{ $image->path->relativePath }}"/>
1416
@if($image->is_main_image)
1517
<input type="hidden" class="is_main_image_hidden_field"
@@ -109,7 +111,7 @@ class="btn is_main_image_button {{ $class }} selected-icon"
109111
110112
111113
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');
113115
var data = {_token: token, path: path};
114116
jQuery.ajax({
115117
url: '{{ URL::to("/admin/product-image/delete")}}',

0 commit comments

Comments
 (0)