concaveit/media

There is no license information available for the latest version (dev-main) of this package.

A simple package for laravel media gallery for admin panel

dev-main 2022-10-05 21:07 UTC

This package is auto-updated.

Last update: 2024-06-06 00:44:34 UTC


README

Add bellow codes to master.blade.php in before body tag ends--

<script> jQuery(document).on('click','.initConcaveMedia',function(){ var inputName,inputType,imageWidth,imageHeight; inputName = jQuery(this).attr('data-input-name'); inputType = jQuery(this).attr('data-input-type'); imageWidth = jQuery(this).attr('data-image-width'); imageHeight = jQuery(this).attr('data-image-height'); imageResize = jQuery(this).attr('data-resize'); fileLocation = jQuery(this).attr('data-file-location'); jQuery(this).addClass('triggeredButton'); jQuery.ajax({ url: "{{route('concave.gallery')}}", type: "get", data: {inputName:inputName,inputType:inputType,imageWidth:imageWidth,imageHeight:imageHeight,imageResize:imageResize,fileLocation:fileLocation} , success: function (response) { jQuery('body').prepend(response); }, error: function(jqXHR, textStatus, errorThrown) { console.log(textStatus, errorThrown); } }); }) </script>
@include('concaveit_media::includes/styles')
<script> jQuery(document).on('click','.selected_image_remove',function(){ var removeItem = jQuery(this).attr('data-file-url'); jQuery(this).closest('span').remove(); jQuery('input[value="'+removeItem+'"]').remove(); }); </script>