form_ghost_template.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div id="bx-uploader-file-{storage_object}-{file_id}" class="bx-uploader-ghost flex items-start mt-2">
  2. <div class="bx-uploader-ghost-cnt">
  3. <input type="hidden" name="__name__[]" value="{file_id}" />
  4. <div class="bx-base-general-icon-wrapper">
  5. <img src="{file_icon}" class="bx-base-general-icon rounded bx-base-general-icon-{file_id}" />
  6. </div>
  7. <span class="bx-base-general-uploader-ghost">
  8. <span id="bx-base-general-intert-to-post-link-{file_id}" class="inline-block" style="display:none;">
  9. <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" title="<bx_text:_sys_txt_form_entry_input_picture_insert />" onclick="bx_base_general_insert_to_post('{file_id}', '{file_url}', '__editor_id__');"><i class="sys-icon plus"></i></a>
  10. </span>
  11. <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" title="<bx_text:_sys_txt_form_entry_input_picture_delete />" onclick="bx_base_general_delete_ghost('{file_id}', '{file_url}', '{file_icon}', ['__editor_id__'], {js_instance_name});"><i class="sys-icon times"></i></a>
  12. <a class="bx-btn bx-btn-small mr-2" href="javascript:void(0);" title="<bx_text:_sys_txt_form_entry_input_picture_copy />" onclick="bx_copy_to_clipboard('{file_url}');"><i class="sys-icon copy"></i></a>
  13. </span>
  14. </div>
  15. <bx_if:set_thumb>
  16. <span class="bx-base-general-use-as-thumb inline-block">
  17. <input type="checkbox" name="__name_thumb__[]" value="{file_id}" onclick="bx_base_general_select_thumb(this)" id="__name_thumb__-{file_id}" />
  18. <label for="__name_thumb__-{file_id}">__txt_pict_use_as_thumb__</label>
  19. </span>
  20. </bx_if:set_thumb>
  21. </div>
  22. <script>
  23. $('#bx-base-general-intert-to-post-link-{file_id}').show();
  24. $('#bx-uploader-file-{storage_object}-{file_id} .bx-base-general-use-as-thumb input[value="__thumb_id__"]').attr('checked', true);
  25. // disable images drag&drop, because resized images address can be reset after some time
  26. $(".bx-base-general-icon-{file_id}").bind('dragstart', function(){
  27. return false;
  28. });
  29. // select first image as a thumb by default
  30. if (!__content_id__ && 1 == $('input[name="__name_thumb__[]"]').length)
  31. $('input[name="__name_thumb__[]"]').attr('checked', true);
  32. </script>