Explorar o código

Fix cookie path bug for sidebar colapse and change styles

Gabriel Badano %!s(int64=4) %!d(string=hai) anos
pai
achega
b6914dd813
Modificáronse 2 ficheiros con 64 adicións e 19 borrados
  1. 58 16
      assets/css/startmin.css
  2. 6 3
      assets/js/startmin.js

+ 58 - 16
assets/css/startmin.css

@@ -1,8 +1,3 @@
-/*!
- * Start Bootstrap - SB Admin 2 Bootstrap Admin Theme (http://startbootstrap.com)
- * Code licensed under the Apache License v2.0.
- * For details, see http://www.apache.org/licenses/LICENSE-2.0.
- */
 
 body {
     background-color: #f8f8f8;
@@ -58,12 +53,12 @@ body {
 }
 
 .navbar-top-links>li>a {
-    color: #999;
+    color: #d6d6d6;
 }
 
 .navbar-top-links>li>a:hover, .navbar-top-links>li>a:focus, .navbar-top-links>.open>a, .navbar-top-links>.open>a:hover, .navbar-top-links>.open>a:focus {
     color: #fff;
-    background-color: #222;
+    background-color: inherit;
 }
 
 .navbar-top-links .dropdown-menu li {
@@ -75,7 +70,7 @@ body {
 }
 
 .navbar-top-links .dropdown-menu li a {
-    padding: 3px 20px;
+    padding: 3px 14px;
     min-height: 0;
 }
 
@@ -694,31 +689,33 @@ table.dataTable thead .sorting:after {
 }
 
 a {
-    color: #337ab7;
+    color: #0B62A4;
 }
 
 a:hover, a:focus {
-    color: #337ab7;
+    color: #0B62A4;
 }
 
 .btn-primary {
-    background-color: #337ab7;
-    border-color: #337ab7;
+    background-color: #0B62A4;
+    border-color: #0B62A4;
 }
 
 .btn-primary.active, .btn-primary.focus, .btn-primary:active, .btn-primary:focus, .btn-primary:hover, .open>.dropdown-toggle.btn-primary {
-    background-color: #337ab7;
-    border-color: #337ab7;
+    background-color: #0B62A4;
+    border-color: #0B62A4;
 }
 
 input[type="text"]:focus,
 input[type="password"]:focus,
 select:focus {
-    border: 1px solid #337ab7 !important;
+    border: 1px solid #0B62A4 !important;
 }
 
 .navbar-inverse {
-    box-shadow: 0 0 7px #ccc;
+    box-shadow: 12px 6px 12px rgba(0,0,0,.175);
+    background-color: #0B62A4;
+    border-color: #0B62A4;
 }
 
 .navbar-inverse .navbar-toggle .icon-bar {
@@ -801,3 +798,48 @@ select:focus {
 .navbar-brand {
     padding: 20px 15px 0;
 }
+
+.navbar-inverse .navbar-brand {
+    color: #d6d6d6;
+}
+
+tfoot td {
+    font-weight: bold;
+    background: #eee;
+}
+
+#periodo {
+    background: #fff;
+    color: #1d3b4a;
+    padding: 8px 10px;
+    line-height: 18px;
+    border-radius: 4px;
+    border: 1px solid #ddd;
+    border-width: 1px 1px 3px !important;
+    float: right;
+    cursor: pointer;
+}
+
+#periodo i {
+    color: #0B62A4;
+    margin-right: 5px;
+}
+
+.chart svg {
+    width: 100%;
+}
+
+.daterangepicker {
+    box-shadow: 0 6px 12px rgba(0,0,0,.175);
+}
+
+.dropdown-menu .divider {
+    margin: 5px 0;
+}
+
+.navbar-right .dropdown-menu {
+    right: 5px;
+    margin: 1px 0 0;
+    border-radius: 0 0 4px 4px;
+    border: none;
+}

+ 6 - 3
assets/js/startmin.js

@@ -26,11 +26,14 @@ $(function() {
     }
 
     function setCookie(name, value, path) {
-        if (path == null)
-            path = _webApp_site ;
+        if (path == null) {
+            var arr = _webApp_site.replace('http://', '').replace('https://', '').split('/');
+            arr.splice(0);
+            path = '/' + arr.join('/') + (arr.length > 0 ? '/' : '');
+        }
         var d           = new Date();
         d.setTime(d.getTime() + (365 * 24 * 60 * 60 * 1000));
-        document.cookie = name + "=" + value + "; expires=" + d.toUTCString() + "; path=" + path;
+        document.cookie = name + "=" + value + "; expires=" + d.toUTCString() + "; path=/";
     }
 
 });