|
@@ -346,48 +346,39 @@
|
|
|
<div class="hide-element" id="previewImages">
|
|
|
<div class="media col-12">
|
|
|
|
|
|
-
|
|
|
- @foreach($product->uploads as $upload_photo)
|
|
|
-{{-- {{dd($upload_photo)}}--}}
|
|
|
-{{-- @if( $upload_photo->type=='featured_image')--}}
|
|
|
-
|
|
|
-{{-- {{dd($upload_photo->type)}}--}}
|
|
|
- <div class="media-left ">
|
|
|
- <a href="" role="button" class="btn btn-danger pull-right" id="delete">
|
|
|
- <i class="icon fa fa-close"></i>
|
|
|
- </a>
|
|
|
- <img class="media-object img-thumbnail" src="{{\Illuminate\Support\Facades\Storage::disk('product')->url($upload_photo->path)}}"
|
|
|
- alt="" id="0" title="" data-toggle="modal"
|
|
|
- data-target="#individualImagePreview"
|
|
|
- style="width: 250px; height: 150px;" >
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="media-body">
|
|
|
- <p>
|
|
|
- <label for="featureDescription">توضیحات: </label>
|
|
|
- <input type="text" class="form-control" value="{{$upload_photo->descriptionImg}}" name="featureDescription">
|
|
|
- </p>
|
|
|
- <p>
|
|
|
- <label for="featureCaption">عنوان: </label>
|
|
|
- <input type="text" class="form-control" value="{{$upload_photo->caption}}" name="featureCaption">
|
|
|
- </p>
|
|
|
- </div>
|
|
|
-{{-- @endif--}}
|
|
|
- @endforeach
|
|
|
+ <div class="media-left ">
|
|
|
+ <a class="btn btn-sm btn-danger btn_photo"
|
|
|
+ href="{{route('uploads.destroyFile', $product->featured_image->id)}}">
|
|
|
+ <i class="icon fa fa-close"></i>
|
|
|
+ </a>
|
|
|
+ <img class="media-object img-thumbnail" src="{{\Illuminate\Support\Facades\Storage::disk('product')->url($product->featured_image->path)}}"
|
|
|
+ alt="" id="0" title="" data-toggle="modal"
|
|
|
+ data-target="#individualImagePreview"
|
|
|
+ style="width: 250px; height: 150px;" >
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="media-body">
|
|
|
+ <p>
|
|
|
+ <label for="featureDescription">توضیحات: </label>
|
|
|
+ <input type="text" class="form-control" value="{{$product->featured_image->descriptionImg}}" name="featureDescription">
|
|
|
+ </p>
|
|
|
+ <p>
|
|
|
+ <label for="featureCaption">عنوان: </label>
|
|
|
+ <input type="text" class="form-control" value="{{$product->featured_image->caption}}" name="featureCaption">
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
</div>
|
|
|
|
|
|
- </div>
|
|
|
@error('featured_image')
|
|
|
<span class="invalid-feedback" role="alert">
|
|
|
<strong>{{ $message }}</strong>
|
|
|
</span>
|
|
|
-
|
|
|
@enderror
|
|
|
</div>
|
|
|
+
|
|
|
<div class="form-group photo">
|
|
|
<label for="title">{{ __('product.photo') }}</label>
|
|
|
<i class="required"> *</i>
|
|
@@ -402,7 +393,7 @@
|
|
|
@enderror
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
- @foreach($product->uploads as $upload_photo)
|
|
|
+ @foreach($product->gallery_images as $upload_photo)
|
|
|
<div class="col-md-2">
|
|
|
<a class="btn btn-sm btn-danger btn_photo"
|
|
|
href="{{route('uploads.destroyFile', $upload_photo->id)}}">
|
|
@@ -574,10 +565,14 @@
|
|
|
});
|
|
|
//Delete features Image
|
|
|
$(document).ready(function(){
|
|
|
- $('#previewImages').on('click', '#delete', function(e){
|
|
|
+ $('#delete').click(function(e){
|
|
|
e.preventDefault();
|
|
|
- $(this).closest(".media").remove();
|
|
|
+ $(this).closest(".media").html('').hide();
|
|
|
});
|
|
|
+ /*$('#previewImages').on('click', '#delete', function(e){
|
|
|
+ e.preventDefault();
|
|
|
+ $(this).closest(".media").remove();
|
|
|
+ });*/
|
|
|
});
|
|
|
//namespace variable to determine whether to continue or not
|
|
|
var proceed = false;
|