首页 > 代码库 > 2016/12/20bootstrap-table toolbar响应合并

2016/12/20bootstrap-table toolbar响应合并

@using Mobizone.Framework.fastJSON;
@model Mobizone.Framework.Model.GridViewConfig

@*<div class="row wrapper border-bottom white-bg page-heading ng-scope">
    <div class="navbar-fixed-top">
        <div class="ibox-title ibox-title-heading navbar-wrapperpp">
            <h5 class="title">门店信息新增列表</h5>
        </div>
    </div>
</div>*@
<div class="wrapper wrapper-content fadeInRight config-form">
    <div class="row">
        <div class="col-sm-12" role="main">
            <input type="hidden" name="hiddenUrl" value="" />@*弹出框*@
            <div class="ibox">
                <input type="hidden" name="QueryOrderBy" value="" />
                <div class="ibox-content noBorderTop" ng-controller="gridExtend">
                    <h5 class="title"></h5>
                    <hr />
                    <div class="bootstrap-table">
                        <div class="fixed-table-toolbar">
                            <div class="bars pull-left">
                                <div id="toolbar" class="btn-group marginBtm" >
                                    @foreach (var item in Model.ButtonList)
                                    {
                                        <button  ladda="loading.@item.Name" data-style="zoom-in"  data-spinner-color="#ff0000" id="@item.Name" name="@item.Name" type="button" class="@item.Class t_toolbar"  title="@item.Text">
                                            <span class="ladda-label @item.SpanClass"></span>@item.Text
                                        </button>
                                    }
                                    @*<div class="dropdown db-click">
                                        <button id="car_view" name="car_view" class="btn btn-default ladda-button show_toolbar" title="展开" data-toggle="dropdown">
                                            <span class="glyphicon glyphicon-tasks"></span>展开
                                            <span class="ladda-spinner"></span>
                                        </button>
                                        <div class="dropdown-menu ul-dropdown">
                                        </div>
                                    </div>*@
                                </div>
                               
                            </div>
                            
                        </div>
                    </div>
                    <div class="">
                        <boostrop-table for="@Model.GridViewName"
                                       id="@Model.GridViewBase.GridViewId" 
                                       idfield="@Model.GridViewBase.IdField"
                                       gridpickerFiled="@Model.GridViewBase.GridPickerSelectField"
                                       tableconfig="@JSON.ToJSON(new {gridViewBase=Model.GridViewBase, columns=Model.ColumnList},new JSONParameters() { ShowReadOnlyProperties=true})" 
                                        callback="view.directive_ajax_loadingBack(data)"
                                        enable="true">
                        </boostrop-table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@*<script type="text/javascript">
    $(document).ready(function () {
        var to_hei = $(#toolbar).height()

        if (to_hei > 37) {
            var f = 0;
            $("#toolbar").find("button[ladda]").each(function ()
            {
                var last_hei = $(#toolbar).height()
                if (last_hei > 36) {
                    $(".ul-dropdown").prepend($("#toolbar>button[ladda]:last").clone());
                    $("#toolbar>button[ladda]:last").remove()
                }
                //else {
                //    $(".ul-dropdown").prepend($("#toolbar>button[ladda]:last").clone());
                //    $("#toolbar>button[ladda]:last").remove()
                //}
            })
        }
    });
</script>*@
@*<script type="text/javascript">
    $(document).ready(function () {
        var to_hei = $(#toolbar).height()
        var aa = 194 + $("#toolbar").width() + 280
        var bb = $(".columns").width()
        var cc = $("#toolbar").width()
        var dd = $(document).width()
        if (dd > 768) {
            var aa = 194 + $("#toolbar").width() + 280
            
        if (aa > dd) {
            //debugger;
            var f = 0;
            $(".db-click").css({display: block})
            $("#toolbar").find("button[ladda]").each(function ()
            {
                var last_hei = $(#toolbar).height()
                var lastaa = 194 + $("#toolbar").width() + 271
                if (dd < lastaa) {
                    $(".ul-dropdown").prepend($("#toolbar>button[ladda]:last").clone());
                    $("#toolbar>button[ladda]:last").remove()
                }
                //else {
                //    $(".ul-dropdown").prepend($("#toolbar>button[ladda]:last").clone());
                //    $("#toolbar>button[ladda]:last").remove()
                //}
            })
        }
        } else {
            var aa = 194 + $("#toolbar").width() + 100
            if (aa > dd) {
                //debugger;

                $(".db-click").css({ display: block })
                $("#toolbar").find("button[ladda]").each(function () {
                    var last_hei = $(#toolbar).height()
                    var lastaa = 194 + $("#toolbar").width() + 100
                    if (dd < lastaa) {
                        $(".ul-dropdown").prepend($("#toolbar>button[ladda]:last").clone());
                        $("#toolbar>button[ladda]:last").remove()
                    }

                })
            }
        }
    });
</script>*@

 

2016/12/20bootstrap-table toolbar响应合并