123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <{include file="get_kindeditor.html"}>
- <style>
- .set-nav {
- margin: 0 auto;
- }
- .set-nav-hr {
- background-color: #ddd;
- height: 1px;
- position: relative;
- }
- .form-group label {
- font-weight: 600;
- }
- .checkbox-inline, .radio-inline {
- font-weight: 400!important;
- }
- .rowlabel {
- font-weight: 300!important;
- }
- .music_play_hide {
- display:none;
- }
- </style>
- <div id="activity_container">
- <form id="activity_form">
- <div class="activity_center">
- <{include file="./admin/activity/common_nav.html"}>
- <input name="events_id" type="hidden" value="<{$eventData.id}>">
- <div class="panel panel-default">
- <div class="panel-heading"><h3 class="panel-title" id="panel-title">添加投放渠道</h3></div>
- <div class="panel-body">
- <div class="form-group">
- <label class="control-label rowlabel">渠道名称:</label> <small class="text-danger"><24个字</small>
-
- <input class="form-control" type="text" value="" name="str_name" id="str_name"/>
- <{if $platFormIds}>
- <br>
- <label class="control-label rowlabel">选择列表:</label> <small class="text-danger">选择投放渠道所在列表</small><br>
- <{foreach from=$platFormData item=form key=index}>
- <{if $platFormIds[$index]}>
- <label class="checkbox-inline">
- <input type="checkbox" value="<{$index}>" name="platform_ids"><{$form.name}>
- </label>
- <{/if}>
- <{/foreach}>
- <{/if}>
-
-
- </div>
- </div>
-
- </div>
- <a href="javaScript:;" class="button button-3d button-primary button-rounded " style="width:150px;" id="add_delivery_channels">
- <i class="fa fa-refresh fa-spin add_button" style="display:none;"></i> 添加 </a>
- </div>
- <{include file="./admin/activity/common_right.html"}>
- <div style="clear:both;"></div>
- </form>
- </div>
- <script>
- KISSY.use('node, io, event', function (S, Node, IO, Event) {
- var $ = S.all;
- var ing = false;
- $("#add_delivery_channels").on('click', function () {
- $('.add_button').show();
- var post_data = {};
- post_data.events_id = $("input[name=events_id]").val();
- post_data.str_name = $('input[name=str_name]').val();
-
- if(post_data.str_name==null){
- $('.add_button').hide();
- alert('请填写渠道名称');return ;
- }
-
- post_data.platform_ids_str="";
- $("[type='checkbox'][name='platform_ids']:checked").each(function(){
- post_data.platform_ids_str+=$(this).val()+"|";
- });
-
-
- if(post_data.platform_ids_str==''){
- $('.add_button').hide();
- alert('请勾选所属列表');return ;
- }
-
- $(this).hide();
-
- new IO({
- type: "post"
- , url: VG.conf.root_domain+'/?c=Admin_Activity_DeliveryChannels&a=ReqAddDeliveryChannels'
- , data: post_data
- , success: function (data) {
- if (data.ok) { //ok
- location = VG.conf.root_domain+'?c=Admin_Activity_DeliveryChannels&a=PageList&events_id='+post_data.events_id;
- } else {
- alert('操作失败,原因:'+data.msg);
- }
- return false;
- }
- , error: function (NULL, textStatus) {
- alert("请求服务器失败,原因:"+textStatus);
- }
- , dataType: "json"
- });
-
-
- });
-
-
-
- });
- </script>
- <{include file="./admin/bottom.html"}>
|