You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/09/05 13:10:44 UTC
svn commit: r1381144 - in
/incubator/bloodhound/trunk/bloodhound_theme/bhtheme: htdocs/bloodhound.css
htdocs/js/theme.js templates/bloodhound_theme.html
Author: gjm
Date: Wed Sep 5 11:10:43 2012
New Revision: 1381144
URL: http://svn.apache.org/viewvc?rev=1381144&view=rev
Log:
theme: change to use of affix plugin - towards #172
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css?rev=1381144&r1=1381143&r2=1381144&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/bloodhound.css Wed Sep 5 11:10:43 2012
@@ -405,6 +405,26 @@ input[type="submit"].btn.btn-micro {
margin-top: 2px !important;
}
+/* Revert some changes introduced in 2.1.0 */
+
+h6 {
+ color: #A4A4A4;
+ margin: 0px 0.5em;
+ text-transform: uppercase;
+}
+
+.breadcrumb {
+ background-color: #FBFBFB;
+ background-image: -moz-linear-gradient(center top , #FFFFFF, #F5F5F5);
+ background-repeat: repeat-x;
+ border: 1px solid #DDDDDD;
+ border-radius: 3px 3px 3px 3px;
+ box-shadow: 0 1px 0 #FFFFFF inset;
+ list-style: none outside none;
+ margin: 0 0 18px;
+ padding: 7px 14px;
+}
+
/* @end */
/* @group Bootstrap extensions */
@@ -420,21 +440,20 @@ input[type="submit"].btn.btn-micro {
/* @group Sticky Status */
-.stickyStatus {
- position: relative;
- top: 0px;
- z-index: 99;
+[class*="span"].stickyStatus {
+ margin-left: 0px;
}
-.stickyStatus .whitebox {
+.stickyStatus.affix {
background-color: #FFFFFF;
- position: absolute;
- z-index: -10;
+ border-bottom: 2px solid #A4A4A4;
+ margin-left: -20px;
+ padding-left: 1px;
+ position: fixed;
+ top: 0px;
+ z-index: 1024;
}
-.stickyEndMark {
- clear: both;
-}
/* @end */
/* @group Wiki Tables */
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js?rev=1381144&r1=1381143&r2=1381144&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/htdocs/js/theme.js Wed Sep 5 11:10:43 2012
@@ -106,49 +106,20 @@ $( function () {
})
// Event handlers for sticky panels , if any
-function stickyScroll(selector) {
-
- var docViewTop = $(window).scrollTop();
- var docViewBottom = docViewTop + $(window).height();
-
- var elemTop = $("header").offset().top;
- var elemBottom = elemTop + $("header").height();
-
- var sticky_panel = $(selector);
- if (docViewTop > elemBottom) {
- var dimensions = {
- 'height' : sticky_panel.attr('data-height'),
- 'width' : sticky_panel.attr('data-width')
- }
- sticky_panel.parent().css(dimensions);
- sticky_panel.css({
- 'height' : dimensions.height,
- 'position': 'fixed',
- 'width' : dimensions.width
- });
- sticky_panel.find(".whitebox").css({
- 'border-bottom': '2px solid #A4A4A4',
- 'height' : dimensions.height,
- 'width' : dimensions.width
- });
- }
- else {
- sticky_panel.parent().css({ 'height' : '' , 'width' : ''});
- sticky_panel.css({'height' : '', 'position' : '', 'width' : ''});
- sticky_panel.find(".whitebox").css({'border-bottom': ''});
- sticky_panel.attr({
- 'data-height' : '' + sticky_panel.height() + 'px',
- 'data-width' : '' + sticky_panel.width() + 'px',
- });
- }
-}
-
function setup_sticky_panel(selector) {
- $(window).scroll(function () { stickyScroll(selector) });
- var sticky_panel = $(selector);
- $(selector + ' .whitebox').css({
- 'height' : '' + sticky_panel.height() + 'px',
- 'width' : '' + sticky_panel.width() + 'px'
- });
+ var target = $(selector);
+ target.each(function() {
+ var $spy = $(this);
+ $spy.affix( { 'offset' : $spy.position().top } )
+ });
+ target.parent('.stickyBox').height(target.height());
+ target = null;
+ $(window).on('scroll.affix.data-api', function() {
+ affix_data = $(selector).data('affix');
+ if (affix_data && !affix_data.affixed) {
+ var target = $(selector);
+ target.parent('.stickyBox').height(target.height());
+ }
+ })
}
Modified: incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html?rev=1381144&r1=1381143&r2=1381144&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html (original)
+++ incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bloodhound_theme.html Wed Sep 5 11:10:43 2012
@@ -24,7 +24,9 @@
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:py="http://genshi.edgewall.org/"
py:strip="">
-
+
+ <link rel="stylesheet" href="${href.chrome('dashboard/css/bootstrap.css')}" type="text/css" />
+
<py:match path="head" once="true"><head>
<title py:with="title = list(select('title/text()'))" py:choose="">
<py:when test="title">${title}</py:when>
@@ -35,8 +37,6 @@
${Markup('<![endif]-->')}
${select("*[local-name() != 'title']")}
- <link rel="stylesheet" href="${href.chrome('dashboard/css/bootstrap.css')}" type="text/css" />
-
<script src="${href.chrome('theme/js/theme.js')}"
type="text/javascript"></script>
<script src="${href.chrome('dashboard/js/bootstrap-transition.js')}"
@@ -47,6 +47,8 @@
type="text/javascript"></script>
<script src="${href.chrome('dashboard/js/bootstrap-popover.js')}"
type="text/javascript"></script>
+ <script src="${href.chrome('dashboard/js/bootstrap-affix.js')}"
+ type="text/javascript"></script>
</head></py:match>