更改下拉框控件
This commit is contained in:
parent
1749f74cbd
commit
3dffd04718
|
@ -102,6 +102,8 @@
|
|||
<ItemGroup>
|
||||
<Content Include="Content\css\admin.css" />
|
||||
<Content Include="Content\css\blue.css" />
|
||||
<Content Include="Content\css\bootstrap-select.css" />
|
||||
<Content Include="Content\css\bootstrap-select.min.css" />
|
||||
<Content Include="Content\css\fa.css" />
|
||||
<Content Include="Content\css\font-awesome.css" />
|
||||
<Content Include="Content\css\bootstrap-table.css" />
|
||||
|
@ -118,6 +120,10 @@
|
|||
<Content Include="Content\css\tasks.css" />
|
||||
<Content Include="Content\images\bg.jpg" />
|
||||
<Content Include="Content\images\lock-bg.jpg" />
|
||||
<Content Include="Content\js\bootstrap-select.js" />
|
||||
<Content Include="Content\js\bootstrap-select.min.js" />
|
||||
<Content Include="Content\js\defaults-zh_CN.js" />
|
||||
<Content Include="Content\js\defaults-zh_CN.min.js" />
|
||||
<Content Include="Content\js\jquery.nestable.js" />
|
||||
<Content Include="Content\css\site-responsive.css" />
|
||||
<Content Include="Content\fonts\fontawesome-webfont.svg" />
|
||||
|
@ -182,6 +188,8 @@
|
|||
<Content Include="Content\fonts\fontawesome-webfont.woff2" />
|
||||
<Content Include="Content\fonts\FontAwesome.otf" />
|
||||
<Content Include="Content\css\fa.responsive.css" />
|
||||
<Content Include="Content\css\bootstrap-select.css.map" />
|
||||
<Content Include="Content\js\bootstrap-select.js.map" />
|
||||
<None Include="Scripts\_references.js" />
|
||||
<Content Include="Content\js\framework.js" />
|
||||
<Content Include="Scripts\well.js" />
|
||||
|
|
|
@ -0,0 +1,293 @@
|
|||
/*!
|
||||
* Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2016 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
select.bs-select-hidden,
|
||||
select.selectpicker {
|
||||
display: none !important;
|
||||
}
|
||||
.bootstrap-select {
|
||||
width: 220px \0;
|
||||
/*IE9 and below*/
|
||||
}
|
||||
.bootstrap-select > .dropdown-toggle {
|
||||
width: 100%;
|
||||
padding-right: 25px;
|
||||
z-index: 1;
|
||||
}
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
|
||||
.bootstrap-select > .dropdown-toggle.bs-placeholder:active {
|
||||
color: #999;
|
||||
}
|
||||
.bootstrap-select > select {
|
||||
position: absolute !important;
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
display: block !important;
|
||||
width: 0.5px !important;
|
||||
height: 100% !important;
|
||||
padding: 0 !important;
|
||||
opacity: 0 !important;
|
||||
border: none;
|
||||
}
|
||||
.bootstrap-select > select.mobile-device {
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
z-index: 2;
|
||||
}
|
||||
.has-error .bootstrap-select .dropdown-toggle,
|
||||
.error .bootstrap-select .dropdown-toggle {
|
||||
border-color: #b94a48;
|
||||
}
|
||||
.bootstrap-select.fit-width {
|
||||
width: auto !important;
|
||||
}
|
||||
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
|
||||
width: 220px;
|
||||
}
|
||||
.bootstrap-select .dropdown-toggle:focus {
|
||||
outline: thin dotted #333333 !important;
|
||||
outline: 5px auto -webkit-focus-ring-color !important;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
.bootstrap-select.form-control {
|
||||
margin-bottom: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
.bootstrap-select.form-control:not([class*="col-"]) {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.form-control.input-group-btn {
|
||||
z-index: auto;
|
||||
}
|
||||
.bootstrap-select.form-control.input-group-btn:not(:first-child):not(:last-child) > .btn {
|
||||
border-radius: 0;
|
||||
}
|
||||
.bootstrap-select.btn-group:not(.input-group-btn),
|
||||
.bootstrap-select.btn-group[class*="col-"] {
|
||||
float: none;
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
}
|
||||
.bootstrap-select.btn-group.dropdown-menu-right,
|
||||
.bootstrap-select.btn-group[class*="col-"].dropdown-menu-right,
|
||||
.row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
|
||||
float: right;
|
||||
}
|
||||
.form-inline .bootstrap-select.btn-group,
|
||||
.form-horizontal .bootstrap-select.btn-group,
|
||||
.form-group .bootstrap-select.btn-group {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.form-group-lg .bootstrap-select.btn-group.form-control,
|
||||
.form-group-sm .bootstrap-select.btn-group.form-control {
|
||||
padding: 0;
|
||||
}
|
||||
.form-inline .bootstrap-select.btn-group .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.btn-group.disabled,
|
||||
.bootstrap-select.btn-group > .disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bootstrap-select.btn-group.disabled:focus,
|
||||
.bootstrap-select.btn-group > .disabled:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
.bootstrap-select.btn-group.bs-container {
|
||||
position: absolute;
|
||||
height: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.bootstrap-select.btn-group.bs-container .dropdown-menu {
|
||||
z-index: 1060;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-toggle .filter-option {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-toggle .caret {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
margin-top: -2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu {
|
||||
min-width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu.inner {
|
||||
position: static;
|
||||
float: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li {
|
||||
position: relative;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li.active small {
|
||||
color: #fff;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li.disabled a {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li a {
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li a.opt {
|
||||
position: relative;
|
||||
padding-left: 2.25em;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li a span.check-mark {
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li a span.text {
|
||||
display: inline-block;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li small {
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu .notify {
|
||||
position: absolute;
|
||||
bottom: 5px;
|
||||
width: 96%;
|
||||
margin: 0 2%;
|
||||
min-height: 26px;
|
||||
padding: 3px 5px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #e3e3e3;
|
||||
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
|
||||
pointer-events: none;
|
||||
opacity: 0.9;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bootstrap-select.btn-group .no-results {
|
||||
padding: 3px;
|
||||
background: #f5f5f5;
|
||||
margin: 0 5px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
|
||||
position: static;
|
||||
}
|
||||
.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
|
||||
position: static;
|
||||
top: auto;
|
||||
margin-top: -1px;
|
||||
}
|
||||
.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a span.check-mark {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
right: 15px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
|
||||
margin-right: 34px;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
|
||||
z-index: 1061;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow .dropdown-toggle:before {
|
||||
content: '';
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid rgba(204, 204, 204, 0.2);
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 9px;
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow .dropdown-toggle:after {
|
||||
content: '';
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid white;
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 10px;
|
||||
display: none;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
|
||||
bottom: auto;
|
||||
top: -3px;
|
||||
border-top: 7px solid rgba(204, 204, 204, 0.2);
|
||||
border-bottom: 0;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
|
||||
bottom: auto;
|
||||
top: -3px;
|
||||
border-top: 6px solid white;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before {
|
||||
right: 12px;
|
||||
left: auto;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after {
|
||||
right: 13px;
|
||||
left: auto;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before,
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after {
|
||||
display: block;
|
||||
}
|
||||
.bs-searchbox,
|
||||
.bs-actionsbox,
|
||||
.bs-donebutton {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.bs-actionsbox {
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bs-actionsbox .btn-group button {
|
||||
width: 50%;
|
||||
}
|
||||
.bs-donebutton {
|
||||
float: left;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bs-donebutton .btn-group button {
|
||||
width: 100%;
|
||||
}
|
||||
.bs-searchbox + .bs-actionsbox {
|
||||
padding: 0 8px 4px;
|
||||
}
|
||||
.bs-searchbox .form-control {
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
float: none;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-select.css.map */
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -168,6 +168,8 @@ $(function () {
|
|||
return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/.test(value);
|
||||
}, "请填写正确的IP地址");
|
||||
}
|
||||
// select
|
||||
$('select').selectpicker();
|
||||
|
||||
// tool tips
|
||||
$('.tooltips').tooltip();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,35 @@
|
|||
/*!
|
||||
* Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2016 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module unless amdModuleId is set
|
||||
define(["jquery"], function (a0) {
|
||||
return (factory(a0));
|
||||
});
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require("jquery"));
|
||||
} else {
|
||||
factory(jQuery);
|
||||
}
|
||||
}(this, function (jQuery) {
|
||||
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: '没有选中任何项',
|
||||
noneResultsText: '没有找到匹配项',
|
||||
countSelectedText: '选中{1}中的{0}项',
|
||||
maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
|
||||
|
||||
}));
|
|
@ -0,0 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2016 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){!function(a){a.fn.selectpicker.defaults={noneSelectedText:"没有选中任何项",noneResultsText:"没有找到匹配项",countSelectedText:"选中{1}中的{0}项",maxOptionsText:["超出限制 (最多选择{n}项)","组选择超出限制(最多选择{n}组)"],multipleSeparator:", "}}(a)});
|
|
@ -10,7 +10,9 @@
|
|||
DataEntity.prototype = {
|
||||
load: function (value) {
|
||||
for (name in this.options.map) {
|
||||
$("#" + this.options.map[name]).val(value[name]);
|
||||
var ctl = $("#" + this.options.map[name]);
|
||||
if (ctl.hasClass('selectpicker')) ctl.selectpicker('val', value[name]);
|
||||
else ctl.val(value[name]);
|
||||
}
|
||||
},
|
||||
reset: function () {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
$('table').smartTable({
|
||||
url: '../api/Menus', //请求后台的URL(*)
|
||||
sortName: 'Order',
|
||||
queryParams: function (params) { return $.extend(params, { parentName: $('#txt_parent_menus_name').val(), name: $("#txt_menus_name").val(), category: $('#txt_menus_category').val() }); }, //传递参数(*)
|
||||
queryParams: function (params) { return $.extend(params, { parentName: $('#txt_parent_menus_name').val(), name: $("#txt_menus_name").val(), category: $('#sel_menus_category').val() }); }, //传递参数(*)
|
||||
columns: [{ checkbox: true },
|
||||
{ title: "Id", field: "ID", events: bsa.idEvents(), formatter: BootstrapAdmin.idFormatter },
|
||||
{ title: "父级菜单", field: "ParentName", sortable: true },
|
||||
|
|
Binary file not shown.
|
@ -20,31 +20,23 @@
|
|||
}
|
||||
@section query {
|
||||
<form class="form-inline" role="form">
|
||||
<div class="form-group col-lg-3">
|
||||
<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-4">
|
||||
<label class="control-label" for="txt_parent_menus_name">父级菜单</label>
|
||||
<input type="text" class="form-control" id="txt_parent_menus_name" />
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<div class="form-group col-xs-12 col-sm-6 col-md-4 col-lg-4">
|
||||
<label class="control-label" for="txt_menus_name">菜单名称</label>
|
||||
<input type="text" class="form-control" id="txt_menus_name" />
|
||||
</div>
|
||||
<div class="form-group col-lg-3">
|
||||
<label class="control-label" for="txt_menus_category">菜单类别</label>
|
||||
<input type="text" class="form-control hide" id="txt_menus_category" />
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">全部</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">下拉按钮</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#" data-val="">全部</a></li>
|
||||
<li><a href="#" data-val="0">系统菜单</a></li>
|
||||
<li><a href="#" data-val="1">外部菜单</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="form-group col-xs-12 col-sm-6 col-md-3 col-lg-3">
|
||||
<label class="control-label" for="sel_menus_category">菜单类别</label>
|
||||
<select class="selectpicker form-control" data-width="auto" id="sel_menus_category">
|
||||
<option value="">全部</option>
|
||||
<option value="0">系统菜单</option>
|
||||
<option value="1">外部菜单</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group col-lg-1">
|
||||
<div class="form-group col-xs-12 col-sm-6 col-md-1 col-lg-1">
|
||||
<button type="button" id="btn_query" class="btn btn-primary"><span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -99,20 +91,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group col-lg-6">
|
||||
<label class="control-label" for="category">类别</label>
|
||||
<!-- Split button -->
|
||||
<input type="text" class="form-control hide" id="category" name="category" value="1" />
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default">外部菜单</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
<span class="sr-only">下拉按钮</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="#" data-val="0">系统菜单</a></li>
|
||||
<li><a href="#" data-val="1">外部菜单</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<label class="control-label" for="category">菜单类别</label>
|
||||
<select class="selectpicker form-control" data-width="auto" id="category">
|
||||
<option value="">全部</option>
|
||||
<option value="0">系统菜单</option>
|
||||
<option value="1">外部菜单</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
}
|
||||
@section css {
|
||||
<link href="~/Content/css/font-awesome.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/sweetalert.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/site.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/admin.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/site-responsive.css" rel="stylesheet" />
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
Layout = "~/Views/Shared/_Admin.cshtml";
|
||||
}
|
||||
@section css {
|
||||
<link href="~/Content/css/bootstrap-table.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/sweetalert.css" rel="stylesheet" />
|
||||
<link href="~/Content/css/bootstrap-select.css" rel="stylesheet" />
|
||||
@RenderSection("css", false)
|
||||
}
|
||||
@section header {
|
||||
|
@ -17,6 +20,8 @@
|
|||
<script src="~/content/js/bootstrap-table-zh-CN.js"></script>
|
||||
<script src="~/content/js/jquery.validate.js"></script>
|
||||
<script src="~/content/js/messages_zh.js"></script>
|
||||
<script src="~/Content/js/bootstrap-select.js"></script>
|
||||
<script src="~/Content/js/defaults-zh_CN.js"></script>
|
||||
@RenderSection("Javascript", false)
|
||||
}
|
||||
@section modal {
|
||||
|
|
Loading…
Reference in New Issue