concaveit/media

此包的最新版本(dev-main)没有可用的许可证信息。

为 Laravel 媒体画廊的后台面板提供的一个简单包

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

This package is auto-updated.

Last update: 2024-09-06 01:22:05 UTC


README

将以下代码添加到 master.blade.php 中 body 标签结束之前--

<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>