Nessuna descrizione
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.

edit.htm 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. {include file="public/layout" /}
  2. {eq name="$editor.editor_select" value="1"}
  3. {load href="__PUBLIC__/plugins/Ueditor/ueditor.config.js" /}
  4. {load href="__PUBLIC__/plugins/Ueditor/ueditor.all.min.js" /}
  5. {load href="__PUBLIC__/plugins/Ueditor/lang/zh-cn/zh-cn.js" /}
  6. {else/}
  7. {load href="__PUBLIC__/plugins/ckeditor/ckeditor.js" /}
  8. {/eq}
  9. <body class="bodysy-w">
  10. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
  11. <div id="append_parent"></div>
  12. <div id="ajaxwaitid"></div>
  13. <div id="geduan_div" class="h10"></div>
  14. <div id="page_div" class="page min-hg-c mb-20" style="min-width:auto;box-shadow:none;">
  15. <div class="fixed-bar">
  16. <div class="item-title">
  17. {include file="public/callback_page_1" /}<!-- 返回箭头 -->
  18. <a class="back_sz" href="javascript:void(0);" data-href="{:url('Images/help')}" onclick="openHelpframe(this, '设置与帮助', '500px', '100%', 'r');" title="设置与帮助"><i class="iconfont e-shezhi-tongyong"></i></a>
  19. <div class="subject">
  20. <h3>编辑文档</h3>
  21. <h5></h5>
  22. </div>
  23. <ul class="tab-base nc-row">
  24. <li><a href="javascript:void(0);" data-index='1' class="tab current"><span>基础内容</span></a></li>
  25. <li><a href="javascript:void(0);" data-index='2' class="tab"><span>SEO优化</span></a></li>
  26. <li><a href="javascript:void(0);" data-index='3' class="tab"><span>更多设置</span></a></li>
  27. <!-- #weapp_demontrate_li# -->
  28. <!-- #weapp_li# -->
  29. </ul>
  30. </div>
  31. </div>
  32. <form class="form-horizontal" id="post_form" action="{:url('Images/edit')}" method="post">
  33. <!-- 常规信息 -->
  34. <div class="ncap-form-default tab_div_1">
  35. <dl class="row">
  36. <dt class="tit">
  37. <label for="title"><em>*</em>文档标题</label>
  38. </dt>
  39. <dd class="opt">
  40. <input type="text" name="title" value="{$field.title}" id="title" class="input-txt" maxlength="200" {eq name="$channelRow.is_repeat_title" value="0"} oninput="check_title_repeat(this,'{$field.aid}');" {/eq}>
  41. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  42. 副标题:<input type="text" name="subtitle" value="{$field.subtitle}" id="subtitle" class="w200">
  43. <span class="err"></span>
  44. </dd>
  45. </dl>
  46. <dl class="row">
  47. <dt class="tit">
  48. <label for="title"><em>*</em>栏目分类</label>
  49. </dt>
  50. <dd class="opt">
  51. <input type="hidden" name="attr[typeid]" id="attr_typeid" value="{$field.typeid}">
  52. <select name="typeid" id="typeid">
  53. {$arctype_html}
  54. </select>
  55. <span class="err"></span>
  56. <p class="notic">谨慎切换,自定义字段的内容会随着栏目切换而清空,在保存之前不受影响!</p>
  57. </dd>
  58. </dl>
  59. {notempty name='$global.web_stypeid_open'}
  60. <dl class="row">
  61. <dt class="tit">
  62. <label for="stypeid">副栏目分类</label>
  63. </dt>
  64. <dd class="opt">
  65. <input type="hidden" name="stypeid" id="stypeid" value="{$field.stypeid}" class="input-txt" onkeyup="this.value=this.value.replace(/[^\d\,]/g,'');" onpaste="this.value=this.value.replace(/[^\d\,]/g,'');" placeholder="">
  66. &nbsp;<a href="javascript:void(0);" data-channel="{$channeltype}" onclick="select_stypeid(this);" class="ncap-btn ncap-btn-green">选择副栏目</a>
  67. <span class="err"></span>
  68. <p class="notic">支持同频道模型的栏目</p>
  69. <div id="stypeid_txt" class="pt5">
  70. {volist name='$stypeid_arr' id='vo'}{gt name='$key' value='0'}&nbsp;&nbsp;|&nbsp;&nbsp;{/gt}<span>{$vo.typename}</span>{/volist}
  71. </div>
  72. </dd>
  73. </dl>
  74. {/notempty}
  75. <dl class="row">
  76. <dt class="tit">
  77. <label>文档属性</label>
  78. </dt>
  79. <dd class="opt">
  80. {volist name="archives_flags" id="vo"}
  81. <input type="hidden" name="attr[{$vo.flag_fieldname}]" {if $field[$vo.flag_fieldname] == 1}value="1"{else/}value="0"{/if}>
  82. <label><input type="checkbox" name="{$vo.flag_fieldname}" value="1" {if $field[$vo.flag_fieldname] == 1}checked{/if}>{$vo.flag_name}<!-- [{$vo.flag_attr}] --></label>&nbsp;
  83. {/volist}
  84. <span class="err"></span>
  85. <p class="notic">如需管理,请点击右上角设置与帮助按钮</p>
  86. </dd>
  87. </dl>
  88. <dl class="row {if condition="$field.is_jump != 1"}none{/if} dl_jump">
  89. <dt class="tit">
  90. <label>跳转网址</label>
  91. </dt>
  92. <dd class="opt">
  93. <input type="text" value="{$field.jumplinks}" name="jumplinks" id="jumplinks" class="input-txt" placeholder="http://">
  94. <span class="err"></span>
  95. <p class="notic">请输入完整的URL网址(包含http或https),设置后访问该条信息将直接跳转到设置的网址</p>
  96. </dd>
  97. </dl>
  98. <dl class="row" style="z-index:2;">
  99. <dt class="tit">
  100. <label>文档标签</label>
  101. </dt>
  102. <dd class="opt">
  103. <input type="text" value="{$field.tags}" name="tags" id="tags" class="input-txt" placeholder="多个标签之间以逗号隔开" autocomplete="off" oninput="get_common_tagindex_input(this);" onfocus="$('#often_tags').hide();" onkeyup="this.value=this.value.replace(/[\,]/g,',');" onpaste="this.value=this.value.replace(/[\,]/g,',')">&nbsp;
  104. <a href="javascript:void(0);" onclick="get_common_tagindex(this);">显示常用标签</a>&nbsp;<img id="tag_loading" src="__STATIC__/common/images/loading.gif" style="display: none;" />
  105. <div class="often_tags" id="often_tags" data-opt="edit" style="display: none;"></div>
  106. <div class="often_tags" id="often_tags_input" style="display: none;"></div>
  107. <input type="hidden" id="tags_click_count">
  108. </dd>
  109. </dl>
  110. <dl class="row {empty name="$global.web_citysite_open"} none {/empty} ">
  111. <dt class="tit">
  112. <label for="title">所属区域</label>
  113. </dt>
  114. <dd class="opt">
  115. <select name="province_id" id="province_id" onchange="set_city_list(0);">
  116. <option value="0">全国</option>
  117. {volist name=':get_site_province_list()' id='vo'}
  118. <option value="{$vo.id}" {eq name="$field.province_id" value="$vo.id" } selected {/eq} >{$vo.name}</option>
  119. {/volist}
  120. </select>
  121. <select name="city_id" id="city_id" class="none ml5" onchange="set_area_list(0);">
  122. <option value="">--请选择--</option>
  123. </select>
  124. <select name="area_id" id="area_id" class="none ml5">
  125. <option value="">--请选择--</option>
  126. </select>
  127. <span class="err"></span>
  128. </dd>
  129. </dl>
  130. <dl class="row">
  131. <dt class="tit">
  132. <label>封面图片</label>
  133. </dt>
  134. <dd class="opt">
  135. <div class="input-file-show div_litpic_local" {neq name="$field.is_remote" value="0"}style="display: none;"{/neq}>
  136. <span class="show">
  137. <a id="img_a" target="_blank" class="nyroModal" rel="gal" href="{$field.litpic_local|default='javascript:void(0);'}">
  138. <i id="img_i" class="fa fa-picture-o" {notempty name="$field.litpic_local"}onmouseover="layer_tips=layer.tips('<img src={$field.litpic_local|default=''} class=\'layer_tips_img\'>',this,{tips: [1, '#fff']});"{/notempty} onmouseout="layer.close(layer_tips);"></i>
  139. </a>
  140. </span>
  141. <span class="type-file-box">
  142. <input type="text" id="litpic_local" name="litpic_local" value="{$field.litpic_local|default=''}" class="type-file-text" autocomplete="off">
  143. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  144. <input class="type-file-file" onClick="GetUploadify(1,'','allimg','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo"
  145. title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  146. </span>
  147. </div>
  148. <input type="text" id="litpic_remote" name="litpic_remote" value="{$field.litpic_remote|default=''}" placeholder="http://" class="input-txt" onKeyup="keyupRemote(this, 'litpic');" {neq name="$field.is_remote" value="1"}style="display: none;"{/neq}>
  149. &nbsp;
  150. <label><input type="checkbox" name="is_remote" id="is_remote" value="1" {eq name="$field.is_remote" value="1"}checked="checked"{/eq} onClick="clickRemote(this, 'litpic');">远程图片</label>
  151. <span class="err"></span>
  152. <p class="notic">当没有手动上传图片时候,会自动提取相册的第一张图片作为封面</p>
  153. </dd>
  154. </dl>
  155. <dl class="row <!-- #weapp_diy911873092_images_none# -->">
  156. <dt class="tit">
  157. <label>图片集</label>
  158. </dt>
  159. <dd class="opt">
  160. <div class="tab-pane pics" id="tab_imgupload">
  161. <!-- <a href="javascript:void(0);" onClick="GetUploadify(30,'','allimg','imgupload_call_back');" class="imgupload">
  162. <i class="fa fa-photo"></i>上传图片
  163. </a> -->
  164. <table class="table table-bordered">
  165. <tbody>
  166. <tr>
  167. <td >
  168. <div class="sort-list-img">
  169. {volist name="imgupload_list" id="vo" key="k"}
  170. <div class="images_upload images_upload_html">
  171. <div class="images_upload_box">
  172. <input type="hidden" name="imgupload[]" value="{$vo['image_url']}">
  173. <a href="{$vo['image_url']}" onclick="" class="upimg" target="_blank" title="拖动修改排序">
  174. <img data-original="{$vo['image_url']}">
  175. </a>
  176. <a href="javascript:void(0)" onclick="ClearPicArr2(this,'{$vo['image_url']}')" class="delect" title="删除"></a>
  177. </div>
  178. <textarea rows="5" cols="60" name="imgintro[]" placeholder="图片注释" title="标签调用:{literal}{$field.intro}{/literal}">{$vo.intro}</textarea>
  179. </div>
  180. {/volist}
  181. <div class="images_upload"></div>
  182. </div>
  183. <a href="javascript:void(0);" onClick="GetUploadify(30,'','allimg','imgupload_call_back');" class="img-upload mb15" title="点击上传">
  184. <div class="y-line"></div>
  185. <div class="x-line"></div>
  186. </a>
  187. </td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. </div>
  192. <!-- 上传图片显示的样板 start -->
  193. <div class="images_upload_tpl none">
  194. <div class="images_upload images_upload_html">
  195. <div class="images_upload_box">
  196. <input type="hidden" name="imgupload[]" value="" />
  197. <a href="javascript:void(0);" onClick="" class="upimg" title="拖动修改排序">
  198. <img src="__STATIC__/admin/images/add-button.jpg"/>
  199. </a>
  200. <a href="javascript:void(0)" class="delect" title="删除">&nbsp;&nbsp;</a>
  201. </div>
  202. <textarea rows="5" cols="60" name="imgintro[]" placeholder="图片注释" title="标签调用:{literal}{$field.intro}{/literal}"></textarea>
  203. </div>
  204. </div>
  205. <!-- 上传图片显示的样板 end -->
  206. </dd>
  207. </dl>
  208. {include file="archives/get_field_addonextitem" /}
  209. </div>
  210. <!-- 常规信息 -->
  211. <!-- SEO参数 -->
  212. <div class="ncap-form-default tab_div_2" style="display:none;">
  213. <dl class="row">
  214. <dt class="tit">
  215. <label for="seo_title">SEO标题</label>
  216. </dt>
  217. <dd class="opt">
  218. <input type="text" value="{$field.seo_title}" name="seo_title" id="seo_title" class="input-txt">
  219. <span class="err"></span>
  220. <p class="notic">一般不超过80个字符,为空时系统自动构成,可以到 <a href="{:url('Seo/index', array('inc_type'=>'seo'))}">SEO设置 - SEO基础</a> 中设置构成规则。</p>
  221. </dd>
  222. </dl>
  223. <dl class="row">
  224. <dt class="tit">
  225. <label>SEO关键词</label>
  226. </dt>
  227. <dd class="opt">
  228. <textarea rows="5" cols="60" id="seo_keywords" name="seo_keywords" style="height:20px;">{$field.seo_keywords}</textarea>
  229. <span class="err"></span>
  230. <p class="notic">一般不超过100个字符,多个关键词请用英文逗号(,)隔开,建议3到5个关键词。</p>
  231. </dd>
  232. </dl>
  233. <dl class="row">
  234. <dt class="tit">
  235. <label>SEO描述</label>
  236. </dt>
  237. <dd class="opt">
  238. <textarea rows="5" cols="60" id="seo_description" name="seo_description" style="height:54px;" class="keywordsTextarea" onkeyup="monitorInputStr();" onkeypress="monitorInputStr();">{$field.seo_description}</textarea>
  239. <span class="err"></span>
  240. <p class="notic">一般不超过100个字符,不填写时系统自动提取正文的前100个字符</p>
  241. <p class="notic2 {empty name='$field.seo_description'}none{/empty}" id="beenWritten">你已输入<span id="beenWrittenStr">0</span>个字符</p>
  242. <p><label><input type="checkbox" name="basic_update_seo_description" value="1" {if condition="!empty($global['basic_update_seo_description'])"} checked="checked" {/if}>勾选后SEO描述将随正文内容更新</label></p>
  243. </dd>
  244. </dl>
  245. </div>
  246. <!-- SEO参数 -->
  247. <!-- 其他参数 -->
  248. <div class="ncap-form-default tab_div_3" style="display:none;">
  249. <dl class="row">
  250. <dt class="tit">
  251. <label for="author">作者</label>
  252. </dt>
  253. <dd class="opt">
  254. <input type="hidden" value="{$field.users_id}" name="users_id" class="input-txt">
  255. <input type="text" value="{$field.author}" name="author" id="author" class="input-txt">
  256. <span class="err"></span>
  257. <p class="notic">设置作者默认名称(将同步至管理员笔名)</p>
  258. </dd>
  259. </dl>
  260. <dl class="row dl_origin">
  261. <dt class="tit">
  262. <label>来源</label>
  263. </dt>
  264. <dd class="opt origin-hot">
  265. <input type="text" value="{$field.origin}" name="origin" id="origin" class="input-txt" onclick="searchOrigin(this);" autocomplete="off">
  266. <div class="origin-hot-list" style="display: none;" id="search_keywords_list_origin"></div>
  267. <textarea id="system_originlist_str" style="display: none;">{$system_originlist_str}</textarea>
  268. <span class="setting" onclick="set_originlist();">设置</span>
  269. <span class="err"></span>
  270. <p class="notic">为空时默认“网络”</p>
  271. </dd>
  272. </dl>
  273. <dl class="row">
  274. <dt class="tit">
  275. <label>点击数</label>
  276. </dt>
  277. <dd class="opt">
  278. <input type="text" value="{$field.click}" name="click" id="click" class="input-txt">
  279. <span class="err"></span>
  280. </dd>
  281. </dl>
  282. <dl class="row">
  283. <dt class="tit">
  284. <label>阅读权限</label>
  285. </dt>
  286. <dd class="opt">
  287. <input type="hidden" value="{$field.arcrank}" name="old_arcrank" class="input-txt">
  288. <select name="arcrank" id="arcrank" {if $field.arcrank < 0 && $admin_info.role_id > 0 && $auth_role_info.check_oneself < 1} disabled="disabled" {/if}>
  289. {volist name="arcrank_list" id="vo"}
  290. <option value="{$vo.rank}" {eq name="$vo.rank" value="$field.arcrank"}selected{/eq}>{$vo.name}</option>
  291. {/volist}
  292. </select>
  293. <span class="err"></span>
  294. </dd>
  295. </dl>
  296. <!-- #weapp_UsersGroup_content_users_id={$field.users_id}#--><!-- #weapp_UsersGroup_content# -->
  297. <dl class="row">
  298. <dt class="tit">
  299. <label for="articleForm">发布时间</label>
  300. </dt>
  301. <dd class="opt">
  302. <input type="text" class="input-txt" id="add_time" name="add_time" value="{$field.add_time|date='Y-m-d H:i:s',###}" autocomplete="off">
  303. <span class="add-on input-group-addon">
  304. <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
  305. </span>
  306. <span class="err"></span>
  307. </dd>
  308. </dl>
  309. <dl class="row">
  310. <dt class="tit">
  311. <label for="tempview">文档模板</label>
  312. </dt>
  313. <dd class="opt">
  314. <select name="tempview" id="tempview">
  315. {volist name='$templateList' id='vo'}
  316. <option value="{$vo}" {eq name='$vo' value='$tempview'}selected{/eq}>{$vo}</option>
  317. {/volist}
  318. </select>
  319. <input type="hidden" name="type_tempview" value="{$tempview}" />
  320. <span class="err"></span>
  321. </dd>
  322. </dl>
  323. <dl class="row {notin name='$seo_pseudo' value='2,3'}no-grey{/notin}">
  324. <dt class="tit">
  325. <label>自定义文件名</label>
  326. </dt>
  327. <dd class="opt">
  328. <input type="text" {notin name='$seo_pseudo' value='2,3'}readonly="readonly" title="动态模式下不支持自定义文档url"{/notin} value="{$field.htmlfilename}" name="htmlfilename" id="htmlfilename" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w\-]/g,'-');" onpaste="this.value=this.value.replace(/[^\u4E00-\u9FA5\w\-]/g,'-');" class="input-txt {notin name='$seo_pseudo' value='2,3'}no-drop{/notin}">.html
  329. <span class="err"></span>
  330. <p class="notic">自定义文件名可由字母、数字、下划线(_)、连接符(-)等符号组成,除此之外其他字符将自动转为连接符(-)</p>
  331. </dd>
  332. </dl>
  333. </div>
  334. <!-- 其他参数 -->
  335. <!-- #weapp_demontrate_div# -->
  336. <!-- #weapp_div# -->
  337. <div class="ncap-form-default">
  338. <div class="bot2">
  339. <input type="hidden" name="gourl" value="{$gourl|default=''}">
  340. <input type="hidden" name="aid" value="{$field.aid|default='0'}">
  341. <input type="hidden" name="editor_addonFieldExt" id="editor_addonFieldExt" value="">
  342. <a href="JavaScript:void(0);" onclick="check_submit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  343. {include file="public/callback_page_2" /}<!-- 返回按钮 -->
  344. </div>
  345. </div>
  346. </form>
  347. </div>
  348. <script type="text/javascript">
  349. layui.use('laydate', function() {
  350. var laydate = layui.laydate;
  351. laydate.render({
  352. elem: '#add_time'
  353. ,type: 'datetime'
  354. });
  355. })
  356. $(function () {
  357. try {
  358. var web_citysite_open = {$global['web_citysite_open']|default=0};
  359. if (web_citysite_open > 0) {
  360. var province_id = {$field.province_id|default=0};
  361. var city_id = {$field.city_id|default=0};
  362. var area_id = {$field.area_id|default=0};
  363. if (province_id > 0) {
  364. set_city_list(city_id);
  365. }
  366. if (city_id > 0) {
  367. set_area_list(area_id);
  368. }
  369. }
  370. }catch(e){}
  371. //选项卡切换列表
  372. $('.tab-base').find('.tab').click(function(){
  373. $('.tab-base').find('.tab').each(function(){
  374. $(this).removeClass('current');
  375. });
  376. $(this).addClass('current');
  377. var tab_index = $(this).data('index');
  378. $(".tab_div_1, .tab_div_2, .tab_div_3, .tab_div_4").hide();
  379. $(".tab_div_"+tab_index).show();
  380. layer.closeAll();
  381. });
  382. $('input[name=is_jump]').click(function(){
  383. if ($(this).is(':checked')) {
  384. $('.dl_jump').show();
  385. } else {
  386. $('.dl_jump').hide();
  387. }
  388. });
  389. var dftypeid = {$field.typeid|default='0'};
  390. $('#typeid').change(function(){
  391. var current_channel = $(this).find('option:selected').data('current_channel');
  392. if (0 < $(this).val() && {$channeltype} != current_channel) {
  393. showErrorMsg('请选择对应模型的栏目!');
  394. $(this).val(dftypeid);
  395. } else if ({$channeltype} == current_channel) {
  396. layer.closeAll();
  397. }
  398. var aid = $("input[name=aid]").val();
  399. GetAddonextitem(1, $(this).val(), {$channeltype}, aid, true);
  400. });
  401. $(document).click(function(){
  402. $('#often_tags').hide();
  403. $('#often_tags_input').hide();
  404. event.stopPropagation();
  405. });
  406. $('#often_tags').click(function(){
  407. $('#often_tags').show();
  408. event.stopPropagation();
  409. });
  410. });
  411. // 判断输入框是否为空
  412. function check_submit(){
  413. if($.trim($('input[name=title]').val()) == ''){
  414. $($('.tab-base').find('.tab')[0]).trigger('click');
  415. showErrorMsg('标题不能为空!');
  416. $('input[name=title]').focus();
  417. return false;
  418. }
  419. if ($('#typeid').val() == 0) {
  420. $($('.tab-base').find('.tab')[0]).trigger('click');
  421. showErrorMsg('请选择栏目…!');
  422. $('#typeid').focus();
  423. return false;
  424. }
  425. var htmlfilename = $.trim($('input[name=htmlfilename]').val());
  426. if (htmlfilename != '') {
  427. var exp = /^\d{1,}$/;
  428. if (exp.test(htmlfilename)) {
  429. showErrorAlert('自定义文件名不能纯数字,会与文档ID冲突!');
  430. $('input[name=htmlfilename]').focus();
  431. return false;
  432. }
  433. }
  434. layer_loading('正在处理');
  435. if(!ajax_check_htmlfilename())
  436. {
  437. layer.closeAll();
  438. showErrorMsg('同栏目下,自定义文件名已存在!');
  439. $('input[name=htmlfilename]').focus();
  440. return false;
  441. }
  442. setTimeout(function (){
  443. editor_auto_210607();
  444. $('#post_form').submit();
  445. }, 1);
  446. }
  447. function img_call_back(fileurl_tmp)
  448. {
  449. $("#litpic_local").val(fileurl_tmp);
  450. $("#img_a").attr('href', fileurl_tmp);
  451. $("#img_i").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
  452. $("input[name=is_litpic]").attr('checked', true); // 自动勾选属性[图片]
  453. }
  454. // 上传图集相册回调函数
  455. function imgupload_call_back(paths){
  456. var last_div = $(".images_upload_tpl").html();
  457. for (var i=0;i<paths.length ;i++ )
  458. {
  459. if ($(".sort-list-img .images_upload_html").length > 0) {
  460. $(".sort-list-img .images_upload_html:last").after(last_div); // 插入一个 新图片
  461. } else {
  462. $(".sort-list-img .images_upload:last").before(last_div); // 插入一个 新图片
  463. }
  464. $(".sort-list-img .images_upload_html:last").find('a:eq(0)').attr('href',paths[i]).attr('onclick','').attr('target', "_blank");// 修改他的链接地址
  465. $(".sort-list-img .images_upload_html:last").find('img').attr('src',paths[i]);// 修改他的图片路径
  466. $(".sort-list-img .images_upload_html:last").find('a:eq(1)').attr('onclick',"ClearPicArr2(this,'"+paths[i]+"')").text('');
  467. $(".sort-list-img .images_upload_html:last").find('input').val(paths[i]); // 设置隐藏域 要提交的值
  468. }
  469. }
  470. /*
  471. * 上传之后删除组图input
  472. * @access public
  473. * @val string 删除的图片input
  474. */
  475. function ClearPicArr2(obj,path)
  476. {
  477. var aid = "{$field.aid|default='0'}";
  478. // 删除数据库记录
  479. $.ajax({
  480. type:'POST',
  481. url:"{:url('Images/del_imgupload', ['_ajax'=>1])}",
  482. data:{filename:path,aid:aid},
  483. success:function(){
  484. $(obj).parent().parent().remove(); // 删除完服务器的, 再删除 html上的图片
  485. $.ajax({
  486. type:'POST',
  487. url:"{:url('Uploadimgnew/delupload', ['_ajax'=>1])}",
  488. data:{action:"del", filename:path},
  489. success:function(){}
  490. });
  491. }
  492. });
  493. }
  494. /** 以下 图集相册的拖动排序相关 js*/
  495. $( ".sort-list-img" ).sortable({
  496. start: function( event, ui) {
  497. }
  498. ,stop: function( event, ui ) {
  499. }
  500. });
  501. //因为他们要拖动,所以尽量设置他们的文字不能选择。
  502. // $( ".sort-list-img" ).disableSelection();
  503. </script>
  504. <script>
  505. try{
  506. var mt20_1649209614 = sessionStorage.getItem("mt20_1649209614");
  507. if (mt20_1649209614 == 1){
  508. $("#geduan_div").removeClass("h10");
  509. }else{
  510. $("#geduan_div").addClass("h10");
  511. }
  512. }catch(e){}
  513. </script>
  514. {include file="public/footer" /}