--- /dev/null
+/* Source: http://www.webspeaks.in/2011/07/new-gmail-like-floating-toolbar-jquery.html
+ Revision: http://jsfiddle.net/pasmalin/AyjeZ/
+*/
+(function($){
+ $.fn.fixFloat = function(options){
+
+ var defaults = {
+ enabled: true
+ };
+ var options = $.extend(defaults, options);
+
+ var offsetTop; /**Distance of the element from the top of window**/
+ var s; /**Scrolled distance from the top of window through which we have moved**/
+ var fixMe = true;
+ var repositionMe = true;
+
+ var tbh = $(this);
+ var originalOffset = tbh.position().top; /**Get the actual distance of the element from the top mychange:change to position better work**/
+
+ if (tbh.css('position')!='absolute') {
+ var tbhBis = $("<div></div>");
+ tbhBis.css({"display":tbh.css("display"),"visibility":"hidden"});
+ tbhBis.width(tbh.outerWidth(true));
+ tbhBis.height(tbh.outerHeight(true));
+ tbh.after(tbhBis);
+ tbh.width(tbh.width());
+ tbh.css({'position':'absolute'});
+ }
+
+ if(options.enabled){
+ $(window).scroll(function(){
+ var offsetTop = tbh.offset().top; /**Get the current distance of the element from the top **/
+ var s = parseInt($(window).scrollTop(), 10); /**Get the from the top of wondow through which we have scrolled**/
+ var fixMe = true;
+ if(s > offsetTop){
+ fixMe = true;
+ }else{
+ fixMe = false;
+ }
+
+ if(s < originalOffset){
+ repositionMe = true;
+ }else{
+ repositionMe = false;
+ }
+
+ if(fixMe){
+ var cssObj = {
+ 'position' : 'fixed',
+ 'top' : '0px',
+ 'z-index' : '1000'
+ }
+ tbh.css(cssObj);
+ tbh.addClass("floating");
+ }
+ if(repositionMe){
+ var cssObj = {
+ 'position' : 'absolute',
+ 'top' : originalOffset,
+ 'z-index' : '1'
+ }
+ tbh.css(cssObj);
+ tbh.removeClass("floating");
+ }
+ });
+ }
+ };
+})(jQuery);
\ No newline at end of file
}
/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
+
.floating {
-webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
}
+div#toolbar.floating,
+#searchheader.floating {
+ border-radius: 0;
+ margin-top: 0;
+}
+
.inline {
display : inline;
}
+++ /dev/null
-/* Source: http://www.webspeaks.in/2011/07/new-gmail-like-floating-toolbar-jquery.html
- Revision: http://jsfiddle.net/pasmalin/AyjeZ/
-*/
-(function($){
- $.fn.fixFloat = function(options){
-
- var defaults = {
- enabled: true
- };
- var options = $.extend(defaults, options);
-
- var offsetTop; /**Distance of the element from the top of window**/
- var s; /**Scrolled distance from the top of window through which we have moved**/
- var fixMe = true;
- var repositionMe = true;
-
- var tbh = $(this);
- var originalOffset = tbh.position().top; /**Get the actual distance of the element from the top mychange:change to position better work**/
-
- if (tbh.css('position')!='absolute') {
- var tbhBis = $("<div></div>");
- tbhBis.css({"display":tbh.css("display"),"visibility":"hidden"});
- tbhBis.width(tbh.outerWidth(true));
- tbhBis.height(tbh.outerHeight(true));
- tbh.after(tbhBis);
- tbh.width(tbh.width());
- tbh.css({'position':'absolute'});
- }
-
- if(options.enabled){
- $(window).scroll(function(){
- var offsetTop = tbh.offset().top; /**Get the current distance of the element from the top **/
- var s = parseInt($(window).scrollTop(), 10); /**Get the from the top of wondow through which we have scrolled**/
- var fixMe = true;
- if(s > offsetTop){
- fixMe = true;
- }else{
- fixMe = false;
- }
-
- if(s < originalOffset){
- repositionMe = true;
- }else{
- repositionMe = false;
- }
-
- if(fixMe){
- var cssObj = {
- 'position' : 'fixed',
- 'top' : '0px',
- 'z-index' : '1000'
- }
- tbh.css(cssObj);
- tbh.addClass("floating");
- }
- if(repositionMe){
- var cssObj = {
- 'position' : 'absolute',
- 'top' : originalOffset,
- 'z-index' : '1'
- }
- tbh.css(cssObj);
- tbh.removeClass("floating");
- }
- });
- }
- };
-})(jQuery);
\ No newline at end of file
[% IF ( bidi ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/right-to-left.css" />
[% END %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript">
//<![CDATA[
[% UNLESS ( searchfield ) %]$(document).ready(function(){
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Authorities › [% IF ( authid ) %]Modify authority #[% authid %] ([% authtypetext %])[% ELSE %]Adding authority ([% authtypetext %])[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
<script type="text/javascript">
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Cataloging › [% IF ( biblionumber ) %]Editing [% title |html %] (Record number [% biblionumber %])[% ELSE %]Add MARC record[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
<script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script>
[% INCLUDE 'browser-strings.inc' %]
<!--[if lt IE 9]>
[% INCLUDE 'doc-head-close.inc' %]
[% IF ( viewshelf ) %]
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
- <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
+ <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
[% END %]
<script type="text/javascript">
//<![CDATA[