فهرست منبع

Fix height style css and resize event. Add base href

Gabriel Badano 4 سال پیش
والد
کامیت
07ddb86487
4فایلهای تغییر یافته به همراه28 افزوده شده و 23 حذف شده
  1. 6 2
      assets/css/startmin.css
  2. 17 17
      assets/js/startmin.js
  3. 2 0
      protected/views/_includes/head.php
  4. 3 4
      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() {

+ 2 - 0
protected/views/_includes/head.php

@@ -3,6 +3,8 @@
 <meta http-equiv="X-UA-Compatible" content="IE=edge">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 
+<base href="<?php echo $this->webApp()->getSite();?>">
+
 <link rel="shortcut icon" href="<?php echo $this->webApp()->getUrlAssets();?>images/favicon.ico" type="image/x-icon">
 <link rel="icon" href="<?php echo $this->webApp()->getUrlAssets();?>images/favicon.ico" type="image/x-icon">
 

+ 3 - 4
protected/views/_includes/menu.php

@@ -22,10 +22,9 @@
                 <i class="fa fa-user fa-fw"></i> <?php echo $this->webApp()->getUsuario();?> <b class="caret"></b>
             </a>
             <ul class="dropdown-menu dropdown-user">
+                <li><a href="usuario/miperfil"><i class="fa fa-user fa-fw"></i> Mi perfil</a></li>
                 <li class="divider"></li>
-                <li><a href="<?php echo $this->webApp()->getSite();?>usuario/miperfil"><i class="fa fa-user fa-fw"></i> Mi perfil</a></li>
-                <li class="divider"></li>
-                <li><a href="<?php echo $this->webApp()->getSite();?>site/logout"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a></li>
+                <li><a href="site/logout"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a></li>
             </ul>
         </li>
     </ul>
@@ -37,7 +36,7 @@
             <ul class="nav" id="side-menu">
 
                 <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>
 
                 <li>