You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2015/07/02 14:47:59 UTC

svn commit: r1688815 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard: script/tobago-layout.js style/tobago.css

Author: lofwyr
Date: Thu Jul  2 12:47:58 2015
New Revision: 1688815

URL: http://svn.apache.org/r1688815
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap
- scrolling space for header and footer vs. content
- add CSS for submenu

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js?rev=1688815&r1=1688814&r2=1688815&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-layout.js Thu Jul  2 12:47:58 2015
@@ -213,4 +213,18 @@ jQuery(document).ready(function () {
     layoutFlex(container, false);
   });
 
+  //////////////////////////////////////////////
+
+  // fixing fixed header/footer: content should not scroll behind the footer
+  // XXX Is there a CSS solution?
+
+  var header = jQuery(".navbar-fixed-top");
+  var footer = jQuery(".navbar-fixed-bottom");
+  var content = footer.prev();
+
+  content.css({
+    marginTop: (parseInt(content.css("margin-top").replace("px", "")) + header.outerHeight(true)) + "px",
+    marginBottom: (parseInt(content.css("margin-bottom").replace("px", "")) + footer.outerHeight(true)) + "px"
+  });
+
 });

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1688815&r1=1688814&r2=1688815&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Thu Jul  2 12:47:58 2015
@@ -63,6 +63,10 @@
   box-shadow: 0 0 5px 5px rgba(200,200,200,0.5);
 }
 
+.navbar-fixed-bottom {
+  margin-top: 10px;
+}
+
 /* gridLayout -------------------------------------------------------------- */
 
 .tobago-gridLayout {
@@ -101,13 +105,74 @@ table.tobago-gridLayout > tbody > tr:fir
   margin-bottom: 0;
 }
 
-/* page ----------------------------------------------------------- */
+/* nav ----------------------------------------------------------- */
+
+/* styles for drop down menu with deeper level */
+.dropdown-submenu {
+  position: relative;
+}
 
-body > form > .navbar-fixed-top + * {
-  margin-top: 40px; /* height of the .navbar-fixed-top, todo: use "less" variable */
-  margin-top: 50px; /* XXX */
+/* no bottom border in navtabs, if panel-body under it */
+.nav-tabs {
+  border-bottom-width: 0;
 }
 
+.nav-tabs > li.active > a {
+  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
+  background-repeat: repeat-x;
+  border-bottom: #dddddd;
+}
+
+.nav-tabs > li.active > a:hover {
+  border-bottom: #dddddd;
+}
+
+.dropdown-submenu > .dropdown-menu {
+  top: 0;
+  left: 100%;
+  margin-top: -6px;
+  margin-left: -1px;
+  -webkit-border-radius: 0 6px 6px 6px;
+  -moz-border-radius: 0 6px 6px 6px;
+  border-radius: 0 6px 6px 6px;
+}
+
+.dropdown-submenu:hover > .dropdown-menu {
+  display: block;
+}
+
+.dropdown-submenu > a:after {
+  display: block;
+  content: " ";
+  float: right;
+  width: 0;
+  height: 0;
+  border-color: transparent;
+  border-style: solid;
+  border-width: 5px 0 5px 5px;
+  border-left-color: #cccccc;
+  margin-top: 5px;
+  margin-right: -10px;
+}
+
+.dropdown-submenu:hover > a:after {
+  border-left-color: #ffffff;
+}
+
+.dropdown-submenu.pull-left {
+  float: none;
+}
+
+.dropdown-submenu.pull-left > .dropdown-menu {
+  left: -100%;
+  margin-left: 10px;
+  -webkit-border-radius: 6px 0 6px 6px;
+  -moz-border-radius: 6px 0 6px 6px;
+  border-radius: 6px 0 6px 6px;
+}
+
+/* page ----------------------------------------------------------- */
+
 .tobago-page-overlay {
   display: table;
   position: absolute;