暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

article_images_add.htm 2.5KB

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