BootStrap MultiSelect ToolTip删除逗号

时间:2018-08-27 23:13:48

标签: asp.net-mvc twitter-bootstrap-3 bootstrap-multiselect

是否可以从引导程序的多选工具提示中删除逗号?

要删除工具提示,我们只需添加, buttonTitle: function() {}

但是我找不到任何有关如何编辑工具提示的示例。

这是多选工具提示代码:

          $(function ()
                {
                    $("#@(Model.Name)").multiselect({
                        includeSelectAllOption: true
                        //, selectAllValue: "[All]"
                        , selectAllText: "(Select All)"
                        , enableFiltering: true
                        , enableCaseInsensitiveFiltering: true
                        , onDropdownShown: function (event) {
                            this.$select.parent().find("button.multiselect-clear-filter").click();
                            this.$select.parent().find("input[type='text'].multiselect-search").focus();    
                        }
                        , nonSelectedText: "  "
                        , onInitialized: function () {
                            $("#@(Model.Name)InitialLoading").hide();
                            $(".@(Model.ItemName)").hide();
                        }
                        , onChange: function () {
                            ListChangeHandler($("select[id=@Model.Name]"));
                            CheckSelection($("select[id=@Model.Name]"),"@(Model.ItemName)");
                        }
                        , onSelectAll: function () {
                            ListChangeHandler($("select[id=@Model.Name]"));
                            $(".@(Model.ItemName)").hide();
                        }
                        , onDeselectAll: function () {
                            ClearWholeList($("select[id=@Model.Name]"));
                            ListChangeHandler($("select[id=@Model.Name]"));
                            $(".@(Model.ItemName)").show();
                        }
                        , buttonTitle: function() {} //tooltip title
                        @*@(!string.IsNullOrEmpty(Model.ChangeHandler) ? ", onChange: " + Model.ChangeHandler + ", onSelectAll: " + Model.ChangeHandler + ", onDeselectAll: " + Model.ChangeHandler : "")*@
                    });


                    LoadListBox("@(!string.IsNullOrEmpty(Model.CascadedFromName) ? Model.Name : "")");

                })

1 个答案:

答案 0 :(得分:0)

得到答案,这是buttonTitle函数:

,buttonTitle: function(options, select) {
    var labels = [];
    options.each(function () {
        labels.push($(this).text());
    });
    return labels.join('');
}