浏览代码

Fix height styles and resize event.

Gabriel Badano 4 年之前
父节点
当前提交
cbb7e2d36f
共有 3 个文件被更改,包括 24 次插入21 次删除
  1. 6 2
      assets/css/startmin.css
  2. 17 17
      assets/js/startmin.js
  3. 1 2
      protected/views/_includes/menu.php

+ 6 - 2
assets/css/startmin.css

@@ -10,7 +10,7 @@ body {
 #page-wrapper {
     padding-top: 50px;
     padding-bottom: 30px;
-    min-height: 568px;
+    min-height: 100vh;
     background-color: #fff;
 }
 
@@ -18,7 +18,7 @@ body {
     #page-wrapper {
         position: inherit;
         margin-left: 250px;
-        padding: 50px 15px 30px;
+        padding: 50px 15px 15px;
         border-left: 1px solid #e7e7e7;
     }
 }
@@ -843,3 +843,7 @@ tfoot td {
     border-radius: 0 0 4px 4px;
     border: none;
 }
+
+.ui-jqgrid.ui-jqgrid-bootstrap tr.jqgfirstrow > td, .ui-jqgrid.ui-jqgrid-bootstrap tr.jqgrow > td, .ui-jqgrid.ui-jqgrid-bootstrap tr.jqgroup > td, .ui-jqgrid.ui-jqgrid-bootstrap tr.jqfoot > td {
+    padding: .3em;
+}

+ 17 - 17
assets/js/startmin.js

@@ -42,23 +42,23 @@ $(function() {
 //collapses the sidebar on window resize.
 // Sets the min-height of #page-wrapper to window size
 $(function() {
-    $(window).bind("load resize", function() {
-        topOffset = 50;
-        width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
-        if (width < 768) {
-            $('div.navbar-collapse').addClass('collapse');
-            topOffset = 100; // 2-row-menu
-        } else {
-            $('div.navbar-collapse').removeClass('collapse');
-        }
-
-        height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
-        height = height - topOffset;
-        if (height < 1) height = 1;
-        if (height > topOffset) {
-            $("#page-wrapper").css("min-height", (height) + "px");
-        }
-    });
+    // $(window).bind("load resize", function() {
+    //     topOffset = 50;
+    //     width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
+    //     if (width < 768) {
+    //         $('div.navbar-collapse').addClass('collapse');
+    //         topOffset = 100; // 2-row-menu
+    //     } else {
+    //         $('div.navbar-collapse').removeClass('collapse');
+    //     }
+    //
+    //     height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1;
+    //     height = height - topOffset;
+    //     if (height < 1) height = 1;
+    //     if (height > topOffset) {
+    //         $("#page-wrapper").css("min-height", (height) + "px");
+    //     }
+    // });
 
     var url = window.location;
     var element = $('ul.nav a').filter(function() {

+ 1 - 2
protected/views/_includes/menu.php

@@ -37,7 +37,6 @@ $cuenta = $this->webApp()->getCuenta();
                 <i class="fa fa-user fa-fw"></i> <?php echo $this->webApp()->getUsuarioNombre();?> <b class="caret"></b>
             </a>
             <ul class="dropdown-menu dropdown-user">
-                <li class="divider"></li>
                 <li><a href="usuario/miperfil"><i class="fa fa-user fa-fw"></i> Mi perfil</a></li>
                 <li class="divider"></li>
                 <li><a href="site/logout"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a></li>
@@ -55,7 +54,7 @@ $cuenta = $this->webApp()->getCuenta();
 
                 <?php if ($this->webApp()->getRole() == webApp::ROLE_ADMIN) { ?>
                     <li>
-                        <a href="<?php echo $this->webApp()->getSite();?>usuario"><i class="fa fa-users fa-fw"></i> <span>Usuarios</span></a>
+                        <a href="usuario"><i class="fa fa-users fa-fw"></i> <span>Usuarios</span></a>
                     </li>
                 <?php } ?>