View | Details | Raw Unified | Return to bug 7135
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css (+5 lines)
Lines 144-147 a.tagnum { Link Here
144
144
145
.yui-gf .yui-u {
145
.yui-gf .yui-u {
146
	width: 79.2%;
146
	width: 79.2%;
147
}
148
/* Class to be added to toolbar when it starts being fixed at the top of the screen*/
149
.floating {
150
	-webkit-box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
151
	box-shadow: 0px 3px 2px 0px rgba(0, 0, 0, .5);
147
}
152
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/lib/jquery/plugins/jquery.fixFloat.js (+67 lines)
Line 0 Link Here
1
/* Source: http://www.webspeaks.in/2011/07/new-gmail-like-floating-toolbar-jquery.html
2
   Revision: http://jsfiddle.net/pasmalin/AyjeZ/
3
*/
4
(function($){
5
  $.fn.fixFloat = function(options){
6
7
    var defaults = {
8
      enabled: true
9
    };
10
    var options = $.extend(defaults, options);
11
12
    var offsetTop;    /**Distance of the element from the top of window**/
13
    var s;        /**Scrolled distance from the top of window through which we have moved**/
14
    var fixMe = true;
15
    var repositionMe = true;
16
17
    var tbh = $(this);
18
    var originalOffset = tbh.position().top;  /**Get the actual distance of the element from the top mychange:change to position better work**/
19
20
    if (tbh.css('position')!='absolute') {
21
      var tbhBis = $("<div></div>");
22
      tbhBis.css({"display":tbh.css("display"),"visibility":"hidden"});
23
      tbhBis.width(tbh.outerWidth(true));
24
      tbhBis.height(tbh.outerHeight(true));
25
      tbh.after(tbhBis);
26
      tbh.width(tbh.width());
27
      tbh.css({'position':'absolute'});
28
    }
29
      tbh.css({'z-index':1000});
30
31
    if(options.enabled){
32
      $(window).scroll(function(){
33
        var offsetTop = tbh.offset().top;  /**Get the current distance of the element from the top **/
34
        var s = parseInt($(window).scrollTop(), 10);  /**Get the from the top of wondow through which we have scrolled**/
35
        var fixMe = true;
36
        if(s > offsetTop){
37
          fixMe = true;
38
        }else{
39
          fixMe = false;
40
        }
41
42
        if(s < originalOffset){
43
          repositionMe = true;
44
        }else{
45
          repositionMe = false;
46
        }
47
48
        if(fixMe){
49
          var cssObj = {
50
            'position' : 'fixed',
51
            'top' : '0px'
52
          }
53
          tbh.css(cssObj);
54
          tbh.addClass("floating");
55
        }
56
        if(repositionMe){
57
          var cssObj = {
58
            'position' : 'absolute',
59
            'top' : originalOffset
60
          }
61
          tbh.css(cssObj);
62
          tbh.removeClass("floating");
63
        }
64
      });
65
    }
66
  };
67
})(jQuery);
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt (-1 / +2 lines)
Lines 2-7 Link Here
2
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</title>
2
<title>Koha &rsaquo; Cataloging &rsaquo; [% IF ( biblionumber ) %]Editing [% title |html %] (Record Number [% biblionumber %])[% ELSE %]Add MARC Record[% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script>
4
<script type="text/javascript" src="[% themelang %]/lib/yui/plugins/bubbling-min.js"></script>
5
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
5
<script type="text/javascript">
6
<script type="text/javascript">
6
//<![CDATA[
7
//<![CDATA[
7
8
Lines 709-714 function unHideSubfield(index,labelindex) { // FIXME :: is it used ? Link Here
709
	// prepare DOM for YUI Toolbar
710
	// prepare DOM for YUI Toolbar
710
711
711
	 $(document).ready(function() {
712
	 $(document).ready(function() {
713
        $('#toolbar').fixFloat();
712
		$("#z3950searchc").empty();
714
		$("#z3950searchc").empty();
713
        $("#savebutton").empty();
715
        $("#savebutton").empty();
714
	    yuiToolbar();
716
	    yuiToolbar();
715
- 

Return to bug 7135