Update RWD for dashboard and OrbitBar

This commit is contained in:
manson 2014-07-17 18:38:08 +08:00
parent 8ab1a5f753
commit 747f794a18
3 changed files with 18 additions and 9 deletions

View File

@ -295,14 +295,16 @@
/* Responsive */ /* Responsive */
@media (max-width: 480px) { @media (max-width: 630px) {
#orbit-bar .navbar-inner .nav { #orbit-bar .navbar-inner .nav {
margin-right: 0; margin-right: 0;
} }
#orbit-bar #orbit-user span, #orbit-bar #orbit-user span{
#orbit-bar #search {
display: none; display: none;
} }
#orbit-bar #search input[type="text"] {
width: 80px;
}
#orbit-bar #orbit-language [class^="flag-"], #orbit-bar #orbit-language [class^="flag-"],
#orbit-bar #orbit-language [class*=" flag-"] { #orbit-bar #orbit-language [class*=" flag-"] {
margin: -8px; margin: -8px;
@ -315,3 +317,9 @@
margin-left: -175px; margin-left: -175px;
} }
} }
@media (max-width: 430px) {
#orbit-bar #search{
display: none;
}
}

View File

@ -12,10 +12,6 @@
<div id="disk_usage" class="usages pull-right span4" style=""></div> <div id="disk_usage" class="usages pull-right span4" style=""></div>
</div> </div>
</div> </div>
<style type="text/css">
.usages{
}
</style>
<script type="text/javascript"> <script type="text/javascript">
var Gages = { 'CPU':{ var Gages = { 'CPU':{
'JustGage': null, 'JustGage': null,
@ -55,7 +51,12 @@ $(function () {
}); });
function initialize_usage(){ function initialize_usage(){
var h = parseInt($('#server_loading').width()/3*0.75); var h
if(window.outerWidth > 768) {
h = parseInt($('#server_loading').width()/3*0.75);
} else {
h = parseInt($('#server_loading').width()*0.3);
}
$.each($(".usages"),function(){$(this).height(h);}); $.each($(".usages"),function(){$(this).height(h);});
$.each(Gages,function(id,Gage){ $.each(Gages,function(id,Gage){

View File

@ -6,7 +6,7 @@
</h2> </h2>
</div> </div>
<div class="box-content"> <div class="box-content">
<div id="month_traffic" style="min-width: 310px; margin: 0 auto"> <div id="month_traffic" style="margin: 0 auto">
<%= line_chart get_month_traffic, :height => "200px", :name => 'Visit', <%= line_chart get_month_traffic, :height => "200px", :name => 'Visit',
:library => { :library => {
legend: 'none', legend: 'none',