media-library.blade.php 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. <!--- media-library --->
  2. <div class="modal fade modal-cyan {{ $popupOption['ModalClassName'] }}" id="modal-media-library" aria-hidden="true" data-backdrop="static" style="z-index: 1051; overflow: auto;">
  3. <div class="modal-dialog m-auto pt-4">
  4. <div class="modal-content">
  5. <div class="modal-header bg-primary">
  6. <h4 class="modal-title text-white" id="myModalLabel">{{ $popupOption['Caption'] }}</h4>
  7. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fas fa-times"></i></button>
  8. </div>
  9. <div class="modal-body p-2" style="background-color: #f5f5f5;">
  10. @include($popupOption['BladeRoute'], [
  11. $popupOption['ParameterType'] => $popupOption['Parameter']
  12. ])
  13. <div class="px-2 text-right d-flex justify-content-end">
  14. <button type="button" class="btn btn-sm btn-primary" onclick="choose_media()">미디어 선택</button>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. @once
  21. <script>
  22. async function choose_media() {
  23. const file_url_list = await PopupForm1FormBMediaForm.get_pluck_file_url(await ListMedia1Form.get_selected_data())
  24. let html = '';
  25. file_url_list.forEach(file_url => {
  26. html += `<img src="${file_url}">`
  27. });
  28. $('#modal-memo').find('.fr-view').append(html)
  29. $('#modal-media-library.show').modal('hide')
  30. }
  31. </script>
  32. @endonce