<link rel="stylesheet" href="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css">
<script src="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script src="<?php echo base_url();?>public/js/vendor/smalot_bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<style>
    .fixed-table-toolbar {
        display: none;
    }

    .fileinput-button {
        position: relative;
        top: -5px;
    }

    .fileinput-button input{
        position:absolute;
        top: 0px;
        opacity: 0;
        -ms-filter: 'alpha(opacity=0)';
    }
</style>
<div id="msg-tip">

</div>
<div class="content_wrapper">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <section>
                        <div class="container-fluid">
                            <button type="button" class="btn btn-danger" onclick="spineMd5()">刷新spine动画MD5</button>
                            <button style="margin:5px;" class="btn btn-primary" onclick="refreshCardMd5()" role="button">刷新卡片MD5</button>
                            <button type="button" style="margin:5px;" class="btn btn-primary" onclick="refreshActivityMd5()" role="button">刷新活动图片MD5配置</button>
                            <button type="button" style="margin:5px;" class="btn btn-primary" onclick="refreshResImageMd5()" role="button">刷新Res图片MD5配置</button>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
<!--        <div class="row">-->
<!--            <div class="col-sm-12">-->
<!--                <aside>-->
<!--                    <section>-->
<!--                        <div class="container-fluid">-->
<!--                            <aside>-->
<!--                                <form class="form-horizontal" role="form" method="post" enctype="multipart/form-data"  id="configForm" action="#" style="margin-top: 20px">-->
<!--                                    <header><i class="fa fa-fw fa-file"></i>热更新</header>-->
<!--                                    <section>-->
<!--                                        <div class="container-fluid">-->
<!--                                            <div class="row">-->
<!--                                                <div class="col-sm-12">-->
<!--                                                    <button type="button" class="btn btn-success" id="submitBtn">提交</button>-->
<!--                                                </div>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                        <div class="container-fluid">-->
<!--                                                <div class="row" style="border: 1px solid #CCC;margin:10px 5px;padding: 5px 0;">-->
<!--                                                    <div class="form-group" >-->
<!--                                                        <label class="col-sm-1 control-label">安卓版本*: </label>-->
<!--                                                        <div class="col-sm-1">-->
<!--                                                            <input type="text" class="form-control" name="android[version]" value="--><?php //echo $hotupdate['android']['version'];?><!--">-->
<!--                                                        </div>-->
<!--                                                        <label class="col-sm-1 control-label">安卓强更*: </label>-->
<!--                                                        <div class="col-sm-1">-->
<!--                                                            <input type="text" class="form-control" name="android[isForce]" value="--><?php //echo $hotupdate['android']['isForce'];?><!--">-->
<!--                                                        </div>-->
<!--                                                        <label class="col-sm-1 control-label">苹果版本*: </label>-->
<!--                                                        <div class="col-sm-1">-->
<!--                                                            <input type="text" class="form-control"  name="ios[version]" value="--><?php //echo $hotupdate['ios']['version'];?><!--">-->
<!--                                                        </div>-->
<!--                                                        <label class="col-sm-1 control-label">苹果强更*: </label>-->
<!--                                                        <div class="col-sm-1">-->
<!--                                                            <input type="text" class="form-control"  name="ios[isForce]" value="--><?php //echo $hotupdate['ios']['isForce'];?><!--">-->
<!--                                                        </div>-->
<!--                                                    </div>-->
<!--                                                </div>-->
<!--                                        </div>-->
<!--                                    </section>-->
<!--                                </form>-->
<!--                            </aside>-->
<!--                        </div>-->
<!--                    </section>-->
<!--                </aside>-->
<!--            </div>-->
<!--        </div>-->
    </div>
</div>

<script type="text/javascript">
    function spineMd5() {
        var msg = "您真的确定要刷新spine动画MD5吗？\n\n请确认！";
        if (confirm(msg)==true){
            $.post('Debug/spineMd5',{

            },function (data) {
                window.location.reload();
            });
        }
    }
    function refreshCardMd5(){
        if( confirm('确认刷新卡片配图Md5配置吗?') ) {
            $.post('/card/refreshCardMd5', {
                id: 1
            }, function (data) {
                alert("刷新成功")
            });
        }
    }
    function refreshActivityMd5(){
        if( confirm('确认刷新活动图片Md5配置吗?') ) {
            $.post('/activity/refreshActivityMd5', {
                id: 1
            }, function (data) {
                alert("刷新成功")
            });
        }
    }
    function refreshResImageMd5(){
        if(confirm('确认刷新活动图片Md5配置吗?')) {
            $.post('/debug/refreshResImageMd5', {
                id: 1
            }, function (data) {
                alert("刷新成功")
            });
        }
    }
    // $('#submitBtn').click(function () {
    //     var data = new FormData(document.getElementById("configForm"));
    //     $.ajax({
    //         url: rootPath + 'debug/hotupdate',
    //         type: 'POST',
    //         data: data,
    //         dataType: 'json',
    //         contentType: false, //必须
    //         processData: false, //必须
    //         success: function (data) {
    //             alert(data.msg);
    //             window.location.reload();
    //         },
    //         error: function (msg) {
    //             alert(data.msg);
    //         }
    //     });
    // });
</script>