Kaynağa Gözat

Fix cookie path bug with sidebar colapse, change styles

Gabriel Badano 4 yıl önce
ebeveyn
işleme
acd31445e7
2 değiştirilmiş dosya ile 81 ekleme ve 92 silme
  1. 75 89
      assets/css/startmin.css
  2. 6 3
      assets/js/startmin.js

+ 75 - 89
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;
@@ -19,7 +14,7 @@ body {
     background-color: #fff;
 }
 
-@media (min-width: 768px) {
+@media(min-width:768px) {
     #page-wrapper {
         position: inherit;
         margin-left: 250px;
@@ -57,13 +52,13 @@ body {
     min-height: 50px;
 }
 
-.navbar-top-links > li > a {
-    color: #999;
+.navbar-top-links>li>a {
+    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 {
+.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;
 }
 
@@ -132,13 +127,13 @@ body {
     content: "\f104";
 }
 
-.sidebar .active > a > .fa.arrow:before {
+.sidebar .active>a>.fa.arrow:before {
     content: "\f107";
 }
 
 .sidebar .nav-second-level li,
 .sidebar .nav-third-level li {
-    border-bottom: 0 !important;
+    border-bottom: 0!important;
 }
 
 .sidebar .nav-second-level li a {
@@ -149,7 +144,7 @@ body {
     padding-left: 52px;
 }
 
-@media (min-width: 768px) {
+@media(min-width:768px) {
     .sidebar {
         z-index: 1;
         position: absolute;
@@ -275,7 +270,7 @@ table.dataTable thead .sorting:after {
     content: "\f0dc";
     float: right;
     font-family: fontawesome;
-    color: rgba(50, 50, 50, .5);
+    color: rgba(50,50,50,.5);
 }
 
 .btn-circle {
@@ -310,7 +305,7 @@ table.dataTable thead .sorting:after {
     padding-top: 10px;
     padding-bottom: 10px;
     border: 1px solid #ddd;
-    background-color: #eee !important;
+    background-color: #eee!important;
 }
 
 .show-grid {
@@ -381,7 +376,6 @@ table.dataTable thead .sorting:after {
     padding-top: 20px;
     padding-bottom: 20px;
 }
-
 .hero-widget .icon {
     display: block;
     font-size: 96px;
@@ -389,7 +383,6 @@ table.dataTable thead .sorting:after {
     margin-bottom: 10px;
     text-align: center;
 }
-
 .hero-widget .value {
     display: block;
     height: 64px;
@@ -397,37 +390,27 @@ table.dataTable thead .sorting:after {
     line-height: 64px;
     font-style: normal;
 }
-
-.hero-widget label {
-    font-size: 17px;
-}
-
-.hero-widget .options {
-    margin-top: 10px;
-}
+.hero-widget label { font-size: 17px; }
+.hero-widget .options { margin-top: 10px; }
 
 /* Tabbed Panels */
-.panel.tabbed-panel .panel-heading {
+.panel.tabbed-panel .panel-heading{
     padding-top: 5px;
     padding-right: 5px;
     padding-bottom: 0;
 }
-
-.panel.tabbed-panel .panel-heading .panel-title {
+.panel.tabbed-panel .panel-heading .panel-title{
     padding: 9px 0;
     font-size: 1em;
     line-height: 1em;
 }
-
-.panel.tabbed-panel .nav-tabs {
+.panel.tabbed-panel .nav-tabs{
     border-bottom: none;
 }
-
-.panel.tabbed-panel .nav-tabs > li > a {
+.panel.tabbed-panel .nav-tabs > li > a{
     line-height: 1em;
 }
-
-.panel.tabbed-panel .nav-justified {
+.panel.tabbed-panel .nav-justified{
     margin-bottom: -1px;
 }
 
@@ -436,7 +419,6 @@ table.dataTable thead .sorting:after {
 .tabbed-panel.panel-default .nav-tabs > li > a:focus {
     color: #777;
 }
-
 .tabbed-panel.panel-default .nav-tabs > .open > a,
 .tabbed-panel.panel-default .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-default .nav-tabs > .open > a:focus,
@@ -446,7 +428,6 @@ table.dataTable thead .sorting:after {
     background-color: #ddd;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-default .nav-tabs > li.active > a,
 .tabbed-panel.panel-default .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-default .nav-tabs > li.active > a:focus {
@@ -455,21 +436,17 @@ table.dataTable thead .sorting:after {
     border-color: #ddd;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #f5f5f5;
     border-color: #ddd;
 }
-
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #777;
 }
-
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #ddd;
 }
-
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-default .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
@@ -482,7 +459,6 @@ table.dataTable thead .sorting:after {
 .tabbed-panel.panel-primary .nav-tabs > li > a:focus {
     color: #fff;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > .open > a,
 .tabbed-panel.panel-primary .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-primary .nav-tabs > .open > a:focus,
@@ -492,7 +468,6 @@ table.dataTable thead .sorting:after {
     background-color: #3071a9;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > li.active > a,
 .tabbed-panel.panel-primary .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-primary .nav-tabs > li.active > a:focus {
@@ -501,33 +476,29 @@ table.dataTable thead .sorting:after {
     border-color: #428bca;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #428bca;
     border-color: #3071a9;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #fff;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #3071a9;
 }
-
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-primary .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
     background-color: #4a9fe9;
 }
 
+
 .tabbed-panel.panel-success .nav-tabs > li > a,
 .tabbed-panel.panel-success .nav-tabs > li > a:hover,
 .tabbed-panel.panel-success .nav-tabs > li > a:focus {
     color: #3c763d;
 }
-
 .tabbed-panel.panel-success .nav-tabs > .open > a,
 .tabbed-panel.panel-success .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-success .nav-tabs > .open > a:focus,
@@ -537,7 +508,6 @@ table.dataTable thead .sorting:after {
     background-color: #d6e9c6;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-success .nav-tabs > li.active > a,
 .tabbed-panel.panel-success .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-success .nav-tabs > li.active > a:focus {
@@ -546,21 +516,17 @@ table.dataTable thead .sorting:after {
     border-color: #d6e9c6;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #dff0d8;
     border-color: #d6e9c6;
 }
-
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #3c763d;
 }
-
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #d6e9c6;
 }
-
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-success .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
@@ -573,7 +539,6 @@ table.dataTable thead .sorting:after {
 .tabbed-panel.panel-info .nav-tabs > li > a:focus {
     color: #31708f;
 }
-
 .tabbed-panel.panel-info .nav-tabs > .open > a,
 .tabbed-panel.panel-info .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-info .nav-tabs > .open > a:focus,
@@ -583,7 +548,6 @@ table.dataTable thead .sorting:after {
     background-color: #bce8f1;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-info .nav-tabs > li.active > a,
 .tabbed-panel.panel-info .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-info .nav-tabs > li.active > a:focus {
@@ -592,21 +556,17 @@ table.dataTable thead .sorting:after {
     border-color: #bce8f1;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #d9edf7;
     border-color: #bce8f1;
 }
-
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #31708f;
 }
-
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #bce8f1;
 }
-
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-info .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
@@ -619,7 +579,6 @@ table.dataTable thead .sorting:after {
 .tabbed-panel.panel-warning .nav-tabs > li > a:focus {
     color: #8a6d3b;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > .open > a,
 .tabbed-panel.panel-warning .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-warning .nav-tabs > .open > a:focus,
@@ -629,7 +588,6 @@ table.dataTable thead .sorting:after {
     background-color: #faebcc;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > li.active > a,
 .tabbed-panel.panel-warning .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-warning .nav-tabs > li.active > a:focus {
@@ -638,21 +596,17 @@ table.dataTable thead .sorting:after {
     border-color: #faebcc;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #fcf8e3;
     border-color: #faebcc;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #8a6d3b;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #faebcc;
 }
-
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-warning .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
@@ -665,7 +619,6 @@ table.dataTable thead .sorting:after {
 .tabbed-panel.panel-danger .nav-tabs > li > a:focus {
     color: #a94442;
 }
-
 .tabbed-panel.panel-danger .nav-tabs > .open > a,
 .tabbed-panel.panel-danger .nav-tabs > .open > a:hover,
 .tabbed-panel.panel-danger .nav-tabs > .open > a:focus,
@@ -675,7 +628,6 @@ table.dataTable thead .sorting:after {
     background-color: #ebccd1;
     border-color: transparent;
 }
-
 .tabbed-panel.panel-danger .nav-tabs > li.active > a,
 .tabbed-panel.panel-danger .nav-tabs > li.active > a:hover,
 .tabbed-panel.panel-danger .nav-tabs > li.active > a:focus {
@@ -684,21 +636,17 @@ table.dataTable thead .sorting:after {
     border-color: #ebccd1;
     border-bottom-color: transparent;
 }
-
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu {
     background-color: #f2dede; /* bg color */
     border-color: #ebccd1; /* border color */
 }
-
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > li > a {
     color: #a94442; /* normal text color */
 }
-
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > li > a:hover,
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > li > a:focus {
     background-color: #ebccd1; /* hover bg color */
 }
-
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > .active > a,
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > .active > a:hover,
 .tabbed-panel.panel-danger .nav-tabs > li.dropdown .dropdown-menu > .active > a:focus {
@@ -706,6 +654,9 @@ table.dataTable thead .sorting:after {
     background-color: #a94442; /* active bg color */
 }
 
+
+
+
 .navbar-top-links li span.title {
     padding: 3px 20px;
     display: block;
@@ -738,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;
+.btn-primary.active, .btn-primary.focus, .btn-primary:active, .btn-primary:focus, .btn-primary:hover, .open>.dropdown-toggle.btn-primary {
+    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 {
@@ -804,7 +757,7 @@ select:focus {
     display: inline;
 }
 
-@media (max-width: 768px) {
+@media(max-width:768px) {
 
     .contracted .sidebar {
         width: 100%;
@@ -846,14 +799,47 @@ select:focus {
     padding: 20px 15px 0;
 }
 
-.modal .acciones {
-    padding: 15px 0 0;
-    border-top: solid 1px #e6e6e6;
-    margin: 7px 0 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;
 }
 
-.dropdown-menu {
-    max-height: 50vh;
-    overflow-y: auto;
-    top: calc(100% - 2px);
+.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=/";
     }
 
 });