暫無描述
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 9.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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="bodystyle" style="min-width:auto;">
  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 class="page" style="min-width:auto;">
  14. <div class="fixed-bar">
  15. <div class="item-title"><a class="back_xin" href="javascript:history.back();" title="返回"><i class="iconfont e-fanhui"></i></a>
  16. <div class="subject">
  17. <h3>编辑广告</h3>
  18. <h5></h5>
  19. </div>
  20. <ul class="tab-base nc-row">
  21. <li><a href="javascript:void(0);" data-index='1' class="tab current"><span>常规选项</span></a></li>
  22. <li><a href="javascript:void(0);" data-index='2' class="tab"><span>高级选项</span></a></li>
  23. </ul>
  24. </div>
  25. </div>
  26. <form class="form-horizontal" id="post_form" action="{:U('Other/edit')}" method="post">
  27. <div class="ncap-form-default tab_div_1">
  28. <dl class="row">
  29. <dt class="tit">
  30. <label for="title"><em>*</em>广告名称</label>
  31. </dt>
  32. <dd class="opt">
  33. <input type="text" name="title" value="{$field.title}" id="title" class="input-txt">
  34. <span class="err"></span>
  35. <p class="notic"></p>
  36. </dd>
  37. </dl>
  38. <dl class="row">
  39. <dt class="tit">
  40. <label for="title"><em>*</em>广告位置</label>
  41. </dt>
  42. <dd class="opt">
  43. <select name="pid" id="pid">
  44. <option value="0">--请选择--</option>
  45. {volist name="ad_position" id="vo"}
  46. <option value="{$vo.id}" {eq name="vo.id" value="$field.pid"}selected{/eq}>{$vo.title}&nbsp;({$vo.width}*{$vo.height})</option>
  47. {/volist}
  48. </select>
  49. <span class="err"></span>
  50. <p class="notic">请先新增广告位置,再进行广告发布</p>
  51. </dd>
  52. </dl>
  53. <dl class="row">
  54. <dt class="tit" colspan="2">
  55. <label>广告类型</label>
  56. </dt>
  57. <dd class="opt">
  58. <div id="gcategory">
  59. <select name="media_type" class="input-sm" class="form-control">
  60. {volist name="ad_media_type" id="vo"}
  61. <option value="{$key}" {eq name="field.media_type" value="$key"}selected{/eq}>{$vo}</option>
  62. {/volist}
  63. </select>
  64. </div>
  65. </dd>
  66. </dl>
  67. <dl class="row">
  68. <dt class="tit">
  69. <label>广告链接</label>
  70. </dt>
  71. <dd class="opt">
  72. <input type="text" name="links" value="{$field.links}" class="input-txt">
  73. <span class="err"></span>
  74. <p class="notic"></p>
  75. </dd>
  76. </dl>
  77. <dl class="row">
  78. <dt class="tit">
  79. <label>广告图片</label>
  80. </dt>
  81. <dd class="opt">
  82. <div class="input-file-show div_litpic_local" {neq name="$field.is_remote" value="0"}style="display: none;"{/neq}>
  83. <span class="show">
  84. <a id="img_a" target="_blank" class="nyroModal" rel="gal" href="{$field.litpic_local|default='javascript:void(0);'}" target="_blank">
  85. <i id="img_i" class="fa fa-picture-o" {notempty name="$field.litpic_local"}onmouseover="layer_tips=layer.tips('<img src={$field.litpic_local} class=\'layer_tips_img\'>',this,{tips: [1, '#fff']});"{/notempty} onmouseout="layer.close(layer_tips);"></i>
  86. </a>
  87. </span>
  88. <span class="type-file-box">
  89. <input type="text" id="litpic_local" name="litpic_local" value="{$field.litpic_local|default=''}" class="type-file-text" autocomplete="off">
  90. <input type="button" name="button" id="button1" value="选择上传..." class="type-file-button">
  91. <input class="type-file-file" onClick="GetUploadify(1,'','allimg','img_call_back')" size="30" hidefocus="true" nc_type="change_site_logo"
  92. title="点击前方预览图可查看大图,点击按钮选择文件并提交表单后上传生效">
  93. </span>
  94. </div>
  95. <input type="text" id="litpic_remote" name="litpic_remote" value="{$field.litpic_remote|default=''}" placeholder="http://" class="input-txt" {neq name="$field.is_remote" value="1"}style="display: none;"{/neq}>
  96. &nbsp;
  97. <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>
  98. <span class="err"></span>
  99. <p class="notic">请填写图片链接,或上传图片格式文件,具体像素大小视网站模板而定</p>
  100. </dd>
  101. </dl>
  102. </div>
  103. <!-- 常规信息 -->
  104. <!-- 高级参数 -->
  105. <div class="ncap-form-default tab_div_2" style="display:none;">
  106. <!-- <dl class="row">
  107. <dt class="tit">
  108. <label for="author">排序</label>
  109. </dt>
  110. <dd class="opt">
  111. <input type="text" name="sort_order" value="{$field.sort_order}" id="sort_order" class="input-txt">
  112. <span class="err"></span>
  113. <p class="notic">越小越靠前</p>
  114. </dd>
  115. </dl> -->
  116. <dl class="row">
  117. <dt class="tit">
  118. <label>新窗口打开</label>
  119. </dt>
  120. <dd class="opt">
  121. <div class="onoff">
  122. <label for="target1" class="cb-enable {if condition='$field.target eq 1'}selected{/if}">是</label>
  123. <label for="target0" class="cb-disable {if condition='$field.target eq 0'}selected{/if}">否</label>
  124. <input id="target1" name="target" value="1" type="radio" {if condition="$field.target eq 1"} checked="checked"{/if}>
  125. <input id="target0" name="target" value="0" type="radio" {if condition="$field.target eq 0"} checked="checked"{/if}>
  126. </div>
  127. <p class="notic"></p>
  128. </dd>
  129. </dl>
  130. <dl class="row">
  131. <dt class="tit">
  132. <label>备注信息</label>
  133. </dt>
  134. <dd class="opt">
  135. <textarea class="span12 ckeditor" id="post_content" name="intro" title="">{$field.intro}</textarea>
  136. <span class="err"></span>
  137. <p class="notic"></p>
  138. </dd>
  139. </dl>
  140. </div>
  141. <!-- 高级参数 -->
  142. <div class="ncap-form-default">
  143. <div class="bot">
  144. <input type="hidden" name="id" value="{$field.id}">
  145. <a href="JavaScript:void(0);" onclick="check_submit();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  146. </div>
  147. </div>
  148. </form>
  149. </div>
  150. <script type="text/javascript">
  151. $(function () {
  152. //选项卡切换列表
  153. $('.tab-base').find('.tab').click(function(){
  154. $('.tab-base').find('.tab').each(function(){
  155. $(this).removeClass('current');
  156. });
  157. $(this).addClass('current');
  158. var tab_index = $(this).data('index');
  159. $(".tab_div_1, .tab_div_2").hide();
  160. $(".tab_div_"+tab_index).show();
  161. });
  162. });
  163. var url="{:U('Ueditor/index',array('savepath'=>'allimg'))}";
  164. var ue = UE.getEditor('post_content',{
  165. serverUrl :url,
  166. zIndex: 999,
  167. initialFrameWidth: "100%", //初化宽度
  168. initialFrameHeight: 500, //初化高度
  169. focus: false, //初始化时,是否让编辑器获得焦点true或false
  170. maximumWords: 99999,
  171. removeFormatAttributes: 'class,style,lang,width,height,align,hspace,valign',//允许的最大字符数 'fullscreen',
  172. pasteplain:false, //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
  173. autoHeightEnabled: false,
  174. toolbars: ueditor_toolbars
  175. });
  176. // 判断输入框是否为空
  177. function check_submit(){
  178. if($('input[name=title]').val() == ''){
  179. layer.msg('广告名称不能为空!', {icon: 2,time: 1000});
  180. return false;
  181. }
  182. if($('#pid').val() == 0){
  183. layer.msg('请选择位置!', {icon: 2,time: 1000});
  184. return false;
  185. }
  186. layer_loading('正在处理');
  187. $('#post_form').submit();
  188. }
  189. function img_call_back(fileurl_tmp)
  190. {
  191. $("#litpic_local").val(fileurl_tmp);
  192. $("#img_a").attr('href', fileurl_tmp);
  193. $("#img_i").attr('onmouseover', "layer_tips=layer.tips('<img src="+fileurl_tmp+" class=\\'layer_tips_img\\'>',this,{tips: [1, '#fff']});");
  194. }
  195. </script>
  196. {include file="public/footer" /}