myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1689800 - /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
Date Wed, 08 Jul 2015 07:23:27 GMT
Author: lofwyr
Date: Wed Jul  8 07:23:26 2015
New Revision: 1689800

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

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

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=1689800&r1=1689799&r2=1689800&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
Wed Jul  8 07:23:26 2015
@@ -217,14 +217,22 @@ jQuery(document).ready(function () {
 
   // fixing fixed header/footer: content should not scroll behind the footer
   // XXX Is there a CSS solution?
+  // TODO: this might be reevaluated after a "resize"
 
   var header = jQuery(".navbar-fixed-top");
-  var footer = jQuery(".navbar-fixed-bottom");
-  var content = footer.prev();
+  header.each(function () {
+    var content = header.next();
+    content.css({
+      marginTop: (parseInt(content.css("margin-top").replace("px", "")) + header.outerHeight(true))
+ "px"
+    });
+  });
 
-  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"
+  var footer = jQuery(".navbar-fixed-bottom");
+  footer.each(function () {
+    var content = footer.prev();
+    content.css({
+      marginBottom: (parseInt(content.css("margin-bottom").replace("px", "")) + footer.outerHeight(true))
+ "px"
+    });
   });
 
 });



Mime
View raw message