修复BUG:超小屏时Glyphicon两列不对齐

This commit is contained in:
Argo-Lenovo 2016-11-21 00:33:07 +08:00
parent abfe7039b6
commit 37bf8042cb
8 changed files with 73 additions and 74 deletions

View File

@ -35,10 +35,6 @@
margin: 20px auto;
}
.fb-timeliner {
display: none;
}
.icon-body {
margin-right: 0 !important;
}

View File

@ -1,4 +1,9 @@
.modal-body #fa-top {
body {
font-family: 'Open Sans', sans-serif;
font-size: 13px;
}
.modal-body #fa-top {
float: left;
margin-top: -15px;
}

View File

@ -1,4 +1,10 @@
@media (max-width: 360px) {
@media (max-width: 768px) {
.fb-timeliner {
display: none;
}
}
@media (max-width: 360px) {
.icon-content .modal-footer span {
display: none;
}

View File

@ -123,7 +123,8 @@
}
});
$iconList.find('ul li').addClass('col-md-3 col-sm-4 col-sm-6');
$iconList.find('ul li').addClass('col-md-3 col-sm-4 col-xs-6');
$iconList.find('div').addClass('col-xs-6');
$iconList.on('click', 'div.fa-hover a, ul li', function () {
$pickIcon.attr('class', $(this).find('i, span:first').attr('class'));
return false;

View File

@ -1,12 +1,13 @@
$(function () {
$('.fontawesome-icon-list a').click(function () {
var $iconList = $('#iconTab').find('div.fontawesome-icon-list');
$iconList.on('click', 'a', function () {
window.console.log($(this).children('i').attr('class'));
return false;
});
$('.fontawesome-icon-list ul li').click(function () {
$iconList.on('click', 'ul li', function () {
window.console.log($(this).children('span:first').attr('class'));
});
$('.fontawesome-icon-list ul li').addClass('col-md-3 col-sm-4');
$iconList.find('ul li').addClass('col-md-3 col-sm-4 col-xs-6');
$iconList.find('div').addClass('col-xs-6');
});

View File

@ -4,24 +4,14 @@
}
@section css {
<link href="~/Content/css/fa.css" rel="stylesheet" />
<link href="~/Content/css/fa.responsive.css" rel="stylesheet" />
<link href="~/Content/css/font-awesome.css" rel="stylesheet" />
}
@section javascript {
<script src="~/Scripts/icon.js"></script>
}
<section class="container">
<section>
<div class="row">
<div class="col-lg-12">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#Fontawesome" data-toggle="tab">Fontawesome 图标</a></li>
<li role="presentation"><a href="#Glyphicons" data-toggle="tab">Glyphicons 图标</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="Fontawesome">@Html.Partial("AwesomeIcon")</div>
<div role="tabpanel" class="tab-pane" id="Glyphicons">@Html.Partial("Glyphicons")</div>
</div>
</div>
<div class="panel-body" data-spy="scroll" data-target=".fb-timeliner">
@Html.Partial("IconView")
</div>
</section>
</section>

View File

@ -115,6 +115,19 @@
}
@section customModal {
@Html.Partial("RoleConfig")
<div id="dialogIcon" class="modal-content icon-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myIconModalLabel">请选择图标</h4>
</div>
<div class="modal-body" data-spy="scroll" data-target=".fb-timeliner">
@Html.Partial("IconView")
</div>
<div class="modal-footer">
<span>被选择的图标:</span><i id="pickIcon"></i>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="btnSubmitIcon">保存</button>
</div>
</div>
@Html.Partial("MenuTree", Model.Navigations.Union(Model.Menus))
}

View File

@ -1,10 +1,4 @@
<div id="dialogIcon" class="modal-content icon-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title" id="myIconModalLabel">请选择图标</h4>
</div>
<div class="modal-body" data-spy="scroll" data-target=".fb-timeliner">
<i id="fa-top"></i>
<i id="fa-top"></i>
<div class="icon-body">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#Fontawesome" data-toggle="tab">Fontawesome 图标</a></li>
@ -40,10 +34,3 @@
</ul>
</div>
<i id="fa-bottom"></i>
</div>
<div class="modal-footer">
<span>被选择的图标:</span><i id="pickIcon"></i>
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="btnSubmitIcon">保存</button>
</div>
</div>