Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

article_images_edit.htm 3.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <div class="item-from-flex">
  2. <div class="item-flex-l">
  3. <div class="item-tit">图片集:</div>
  4. <div class="item-con tab-pane arc-pane">
  5. <div class="images_upload_main" id="tab_imgupload">
  6. <div class="sort-list">
  7. {volist name="$imgupload_list" id="vo"}
  8. <div class="images_upload">
  9. <div class="images_upload_item">
  10. <input type="hidden" name="imgupload[]" value="{$vo.image_url}"/>
  11. <a class="img-upload" href="{$vo.image_url}" title="拖动修改排序" target="_blank">
  12. <img src="{$vo.image_url|default='__STATIC__/admin/images/add-button.jpg'}" />
  13. </a>
  14. <a href="javascript:void(0)" class="delete" onclick="imagesModelClearPic(this, '{$vo.image_url}')"></a>
  15. </div>
  16. <textarea rows="5" cols="60" name="imgintro[]" style="height: 20px; width: 70px;" placeholder="图片注释">{$vo.intro}</textarea>
  17. </div>
  18. {/volist}
  19. </div>
  20. </div>
  21. <div id="imagesModelPicTpl" style="display: none;">
  22. <div class="images_upload">
  23. <div class="images_upload_item">
  24. <input type="hidden" name="imgupload[]" value=""/>
  25. <a class="img-upload" href="javascript:void(0);" title="拖动修改排序">
  26. <img src="__STATIC__/admin/images/add-button.jpg" />
  27. </a>
  28. <a href="javascript:void(0)" class="delete"></a>
  29. </div>
  30. <textarea rows="5" cols="60" name="imgintro[]" style="height: 20px; width: 70px;" placeholder="图片注释"></textarea>
  31. </div>
  32. </div>
  33. <div class="images_upload_main" id="tab_imgupload">
  34. <a href="javascript:void(0);" class="img-upload" title="拖动修改排序" onClick="GetUploadify(100, '', 'allimg', 'imagesModelCallBack', '', '上传图片集', 1);">
  35. <div class="y-line"></div>
  36. <div class="x-line"></div>
  37. </a>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <script type="text/javascript">
  43. function imagesModelCallBack(paths) {
  44. var last_div = $("#imagesModelPicTpl").html();
  45. for (var i = 0; i < paths.length; i++) {
  46. $(".images_upload:eq(0)").before(last_div);
  47. $(".images_upload:eq(0)").find('input').val(paths[i]);
  48. $(".images_upload:eq(0)").find('a:eq(0)').attr('href', paths[i]).attr('target', "_blank");
  49. $(".images_upload:eq(0)").find('img').attr('src', paths[i]);
  50. $(".images_upload:eq(0)").find('a:eq(1)').attr('onclick', "imagesModelClearPic(this, '"+paths[i]+"')");
  51. }
  52. }
  53. // 上传之后删除组图input
  54. function imagesModelClearPic(obj, path) {
  55. // 删除数据库记录
  56. $.ajax({
  57. url : eyou_basefile + "?m=user&c=UsersRelease&a=del_channelimgs&_ajax=1",
  58. data: {filename: path},
  59. type: 'POST',
  60. success: function() {
  61. $(obj).parent().parent().remove();
  62. }
  63. });
  64. }
  65. </script>