<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="edit_adposition.aspx.cs" Inherits="wjdhcms_SAAS.module.ad.edit_adposition" %>


<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>内容</title>
    <!-- start: CSS file-->
    <!-- Vendor CSS-->
    <link href="../static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="../static/vendor/skycons/css/skycons.css" rel="stylesheet" />
    <link href="../static/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
    <!-- Plugins CSS-->
    <link href="../static/plugins/bootkit/css/bootkit.css" rel="stylesheet" />
    <!-- Page CSS -->   
    <link href="../static/css/style.css" rel="stylesheet" />
    <link href="../static/css/add-ons.min.css" rel="stylesheet" />

    <!-- end: CSS file--> 
    <!-- Head Libs -->
    <script src="../static/plugins/modernizr/js/modernizr.js"></script>
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="../static/js/html5shiv.min.js"></script>
      <script src="../static/js/respond.min.js"></script>
    <![endif]-->
    




</head>

<body class="mainbody">
  <div class="container-fluid">
    <div class="row">
      <div class="col-lg-12">
        <div class="panel wizard-type1" id="wizard2">

          <form id="form" data-toggle="formcache">
                <div class="panel-heading bk-bg-primary">
                  <ul class="steps">
                      <li><a href="#tab11" data-toggle="tab"><span class="badge badge-info"><i class="fa fa-file-text"></i></span>基本信息</a></li>
                    </ul>
                    <div class="progress thin progress-striped active">
                      <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
                      </div>
                    </div>
                </div>
                <div class="panel-body">
                  <form class="form">
                    <div class="tab-content">
                      <div class="tab-pane" id="tab11">
                        <div class="row">
                          <div class="col-sm-12">
                            <div class="form-horizontal">

                              <div class="form-group">
                                <label class="col-md-1 control-label" for="title">广告位名称</label>
                                <div class="col-md-4">
                                  <input type="text" name="title" id="title" class="form-control" data-no-empty="true" value="">
                                </div>
                                <div class="col-md-2">
                                  <span class="help-block text-right">*广告位名称，不可为空</span>
                                </div>
                              </div>

                            </div>
                          </div>
                        </div>
                      </div>
                      
                    </div>
                    <div class="navbar-fixed-bottom" style="padding: 0 25px;">
                      <div class="actions"> 
                          <input type="hidden" name="pid" id="pid" class="form-control"  value="">              
                        <input type="button" class="btn btn-info" id="submit" value="提交保存" />
                      </div>
                    </div>
                  </form>
                </div>
                </form>
              </div>
      </div>
    </div>
  </div>

    <!-- start: JavaScript-->
    
    <!-- Vendor JS-->       
    <script src="../static/vendor/js/jquery-2.1.1.min.js"></script>
    <script src="../static/vendor/js/jquery-migrate-1.2.1.min.js"></script>
    <script src="../static/vendor/bootstrap/js/bootstrap.min.js"></script>
    
    <!-- Plugins JS-->
    <script src="../static/plugins/wizard/js/jquery.bootstrap.wizard.min.js"></script>

    
    <!-- Pages JS -->
    <script src="../static/js/pages/form-wizard.js"></script>
    <script src="../static/js/ajax.js"></script>
    
    <!-- end: JavaScript-->
    <script type="text/javascript">
        $(function () {
            if ($.getUrlParam('action') == 'edit') {
                var url = "../../api/ad.ashx?action=getpedit&pid=" + $.getUrlParam('pid');
                get_json(url, function (data, waiting) {
                    for (var attr in data.data) {
                        $('[name="' + attr + '"]').val(data.data[attr])
                    }
                });
            } else {
                $('body').fadeIn(function () {
                    bootstrapWizard();
                })
            }


            $('#submit').on("click", function () {
                noEmpty(function () {
                    var json = $('#form').serializeArray();
                    var a = JSON.stringify(json);
                    console.log(a)
                    send_json('../../api/ad.ashx?action=p' + $.getUrlParam('action') + '', json, function () {
                        window.location.href = document.referrer
                    });
                })

            });
        })
    </script>
</body>
</html>