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

(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/_responsive.scss (-8 / +53 lines)
Lines 150-161 Link Here
150
        }
150
        }
151
    }
151
    }
152
152
153
    #toolbar .resort {
153
    .toolbar {
154
        @include border-radius-all( 5px );
154
        .resort {
155
        font-size: 14px;
155
            @include border-radius-all( 5px );
156
        margin: .5em 0;
156
            font-size: 14px;
157
        max-width: 100%;
157
            max-width: 100%;
158
        padding: 4px 6px;
158
            padding: 4px 6px;
159
        }
160
161
        .pagination {
162
            li {
163
                a {
164
                    font-size: 105%;
165
                    padding: .3em .7em;
166
                }
167
            }
168
        }
159
    }
169
    }
160
170
161
    .mastheadsearch {
171
    .mastheadsearch {
Lines 359-365 Link Here
359
    }
369
    }
360
370
361
    .breadcrumb,
371
    .breadcrumb,
362
    #top-pages,
363
    .menu-collapse {
372
    .menu-collapse {
364
        display: none;
373
        display: none;
365
    }
374
    }
Lines 453-458 Link Here
453
            }
462
            }
454
        }
463
        }
455
    }
464
    }
465
466
    .toolbar {
467
        select {
468
            width: 220px;
469
        }
470
    }
456
}
471
}
457
472
458
@media only screen and ( min-width: 768px ) {
473
@media only screen and ( min-width: 768px ) {
Lines 477-488 Link Here
477
    }
492
    }
478
493
479
    #didyoumean {
494
    #didyoumean {
480
        margin: 0;
495
        margin: .5em 0;
481
    }
496
    }
482
497
483
    .searchsuggestion {
498
    .searchsuggestion {
484
        white-space: nowrap;
499
        white-space: nowrap;
485
    }
500
    }
501
502
    .pagination {
503
        li {
504
            &.page-num {
505
                display: inline;
506
            }
507
        }
508
    }
486
}
509
}
487
510
488
@media only screen and ( min-width: 768px ) and ( max-width: 984px ) {
511
@media only screen and ( min-width: 768px ) and ( max-width: 984px ) {
Lines 498-503 Link Here
498
        width: 53%;
521
        width: 53%;
499
    }
522
    }
500
523
524
    .pagination {
525
        li {
526
            &.page-first,
527
            &.page-last {
528
                display: inline;
529
            }
530
531
            &.page-first {
532
                a {
533
                    border-left: 1px solid #DDD;
534
                }
535
            }
536
537
            &.page-prev,
538
            &.page-next {
539
                a {
540
                    border-left: 0;
541
                    border-radius: 0;
542
                }
543
            }
544
        }
545
    }
501
}
546
}
502
547
503
@media only screen and ( max-width: 1040px ) {
548
@media only screen and ( max-width: 1040px ) {
(-)a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss (-1 / +17 lines)
Lines 716-721 input[type="text"]:focus { Link Here
716
#toolbar.toolbar {
716
#toolbar.toolbar {
717
    background-color: #f0f3f3;
717
    background-color: #f0f3f3;
718
    border: 1px solid #f0f3f3;
718
    border: 1px solid #f0f3f3;
719
719
    &.clearfix {
720
    &.clearfix {
720
        background-color: #f0f3f3;
721
        background-color: #f0f3f3;
721
    }
722
    }
Lines 1357-1363 div { Link Here
1357
#selections-toolbar,
1358
#selections-toolbar,
1358
.selections-toolbar {
1359
.selections-toolbar {
1359
    background: linear-gradient( #B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100% );
1360
    background: linear-gradient( #B2B2B2 0%, #E0E0E0 14%, #E8E8E8 100% );
1360
    margin: 0 0 1em;
1361
    margin: 0;
1361
    padding-left: 10px;
1362
    padding-left: 10px;
1362
    padding-top: .5em;
1363
    padding-top: .5em;
1363
}
1364
}
Lines 1538-1543 div { Link Here
1538
}
1539
}
1539
1540
1540
/* pagination */
1541
/* pagination */
1542
1543
.pagination {
1544
    display: inline-block;
1545
    margin: 10px 0 0 10px;
1546
}
1547
1548
.pagination {
1549
    li {
1550
        &.page-first,
1551
        &.page-last {
1552
            display: none;
1553
        }
1554
    }
1555
}
1556
1541
.results-pagination {
1557
.results-pagination {
1542
    background-color: #F3F3F3;
1558
    background-color: #F3F3F3;
1543
    display: none;
1559
    display: none;
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc (-6 / +6 lines)
Lines 3-21 Link Here
3
     [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate | html %] of [% total | html %] results loaded, refine your search to view other records</h6>[% END %]
3
     [% IF hits_to_paginate < total %]<h6>[% hits_to_paginate | html %] of [% total | html %] results loaded, refine your search to view other records</h6>[% END %]
4
        <ul>
4
        <ul>
5
            [% IF ( previous_page_offset.defined ) %]
5
            [% IF ( previous_page_offset.defined ) %]
6
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">First</a></li>
6
                <li class="page-first"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]"><i class="fa fa-fw fa-angle-double-left"></i>  First</a></li>
7
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% previous_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">&laquo; Previous</a></li>
7
                <li class="page-prev"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% previous_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]"> <i class="fa fa-fw fa-angle-left"></i>  Previous</a></li>
8
            [% END %]
8
            [% END %]
9
            [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
9
            [% FOREACH PAGE_NUMBER IN PAGE_NUMBERS %]
10
                [% IF ( PAGE_NUMBER.highlight ) %]
10
                [% IF ( PAGE_NUMBER.highlight ) %]
11
                    <li class="active"><a href="#">[% PAGE_NUMBER.pg | html %]</a></li>
11
                    <li class="active"><a clas="page-num current" href="#">[% PAGE_NUMBER.pg | html %]</a></li>
12
                [% ELSE %]
12
                [% ELSE %]
13
                    <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% PAGE_NUMBER.offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">[% PAGE_NUMBER.pg | html %]</a></li>
13
                    <li class="page-num"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% PAGE_NUMBER.offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">[% PAGE_NUMBER.pg | html %]</a></li>
14
                [% END %]
14
                [% END %]
15
            [% END %]
15
            [% END %]
16
            [% IF ( next_page_offset ) %]
16
            [% IF ( next_page_offset ) %]
17
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% next_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">Next &raquo;</a></li>
17
                <li class="page-next"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% next_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">Next <i class="fa fa-fw fa-angle-double-right"></i></a></li>
18
                <li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% last_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">Last</a></li>
18
                <li class="page-last"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&amp;offset=[% last_page_offset | uri %][% IF ( sort_by ) %]&amp;sort_by=[% sort_by | uri %][% END %]">Last <i class="fa fa-fw fa-angle-double-right"></i></a></li>
19
            [% END %]
19
            [% END %]
20
        </ul>
20
        </ul>
21
    </div>
21
    </div>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt (-43 / +52 lines)
Lines 119-126 Link Here
119
                        <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring |uri %]">suggestions</a></div>
119
                        <div id="didyoumean">Not what you expected? Check for <a href="/cgi-bin/koha/svc/suggestion?render=standalone&amp;q=[% querystring |uri %]">suggestions</a></div>
120
                    [% END %]
120
                    [% END %]
121
121
122
                    <div id="top-pages">[% INCLUDE 'page-numbers.inc' %]</div>
123
124
                    [% IF ( koha_spsuggest ) %]
122
                    [% IF ( koha_spsuggest ) %]
125
                        Did you mean:
123
                        Did you mean:
126
                        <ul style="list-style: none;">
124
                        <ul style="list-style: none;">
Lines 159-206 Link Here
159
                                    [% END %]
157
                                    [% END %]
160
                                [% END # IF /searchdesc %]
158
                                [% END # IF /searchdesc %]
161
159
162
                                <div id="toolbar" class="toolbar clearfix">
160
                                <div id="floating">
163
                                    [% IF ( OpacHighlightedWords ) %]
161
                                    <div id="toolbar" class="toolbar clearfix">
164
                                        <div class="highlight_controls noprint">
162
                                        <div id="top-pages" class="pull-left">[% INCLUDE 'page-numbers.inc' %]</div>
165
                                            <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
163
                                        [% UNLESS tag %]
166
                                            <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
164
                                            <div class="sort_by pull-right">
167
                                        </div>
165
                                                <select id="sort_by" class="resort" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select>
168
                                    [% END %]
166
                                                <input type="submit" class="btn btn-small clearfix" id="sortsubmit" value="Go" />
169
                                    [% UNLESS tag %]
167
                                            </div>
170
                                        <div class="sort_by pull-right">
168
                                        [% END %]
171
                                            <select id="sort_by" class="resort" name="sort_by"> [% INCLUDE 'resort_form.inc' %] </select>
169
                                    </div> <!-- / #toolbar -->
172
                                            <input type="submit" class="btn btn-small clearfix" id="sortsubmit" value="Go" />
170
173
                                        </div>
171
                                    <div id="selections-toolbar" class="toolbar noprint">
174
                                    [% END %]
172
                                        [% IF ( OpacHighlightedWords ) %]
175
                                </div> <!-- / #toolbar -->
173
                                            <div class="highlight_controls noprint">
176
174
                                                <a href="#" class="highlight_toggle" id="highlight_toggle_off">Unhighlight</a>
177
                                <div id="selections-toolbar" class="toolbar noprint">
175
                                                <a href="#" class="highlight_toggle" id="highlight_toggle_on">Highlight</a>
178
                                    <!-- checkall, clearall are now needed for placehold -->
176
                                            </div>
179
                                    <span class="checkall"></span>
177
                                            <span class="sep">|</span>
180
                                    <span class="clearall"></span> <span class="sep">|</span>
178
                                        [% END %]
179
                                        <!-- checkall, clearall are now needed for placehold -->
180
                                        <span class="checkall"></span>
181
                                        <span class="clearall"></span> <span class="sep">|</span>
182
183
                                            <span class="links">
184
                                                [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
185
                                                    <span class="addto"></span>
186
                                                [% END %]
187
                                                <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span>
181
188
182
                                        <span class="links">
189
                                                [% IF ( TagsInputEnabled && loggedinusername ) %]
183
                                            [% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %]
190
                                                    <span id="tagsel_span">
184
                                                <span class="addto"></span>
191
                                                        <input id="tagsel_tag" class="disabled" type="submit" value="Tag"/>
185
                                            [% END %]
192
                                                    </span>
186
                                            <span id="placehold"><!-- input class="submit" type="submit" value="Place Hold"/ --></span>
193
                                                    <div id="tagsel_form" style="display:none">
187
194
                                                        <label for="tagsel_new">New tag:</label>
188
                                            [% IF ( TagsInputEnabled && loggedinusername ) %]
195
                                                        <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
189
                                                <span id="tagsel_span">
196
                                                        <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="Add" type="submit" value="Add" />
190
                                                    <input id="tagsel_tag" class="disabled" type="submit" value="Tag"/>
197
                                                        <a href="#" id="tagsel_cancel">(done)</a>
191
                                                </span>
198
                                                    </div>
192
                                                <div id="tagsel_form" style="display:none">
199
                                                    <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
193
                                                    <label for="tagsel_new">New tag:</label>
200
                                                        Tag status here.
194
                                                    <input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" />
201
                                                    </div>
195
                                                    <input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-small" title="Add" type="submit" value="Add" />
202
                                                [% END %]
196
                                                    <a href="#" id="tagsel_cancel">(done)</a>
203
                                            </span> <!-- / .links -->
197
                                                </div>
204
                                    </div> <!-- / #selections-toolbar -->
198
                                                <div id="tagsel_status" class="tagsel_tatus" style="display:none;">
205
                                </div> <!-- /#floating -->
199
                                                    Tag status here.
200
                                                </div>
201
                                            [% END %]
202
                                        </span> <!-- / .links -->
203
                                </div> <!-- / #selections-toolbar -->
204
206
205
                                <!-- TABLE RESULTS START -->
207
                                <!-- TABLE RESULTS START -->
206
                                <table class="table table-striped">
208
                                <table class="table table-striped">
Lines 627-632 Link Here
627
[% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
629
[% IF ( RecordedBooksEnabled ) %][% Asset.js("js/recordedbooks.js") | $raw %][% END %]
628
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
630
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
629
[% Asset.js("js/authtoresults.js") | $raw %]
631
[% Asset.js("js/authtoresults.js") | $raw %]
632
[% Asset.js("lib/hc-sticky.js") | $raw %]
630
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
633
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") | $raw %]
631
[% END %]<script>
634
[% END %]<script>
632
//<![CDATA[
635
//<![CDATA[
Lines 1040-1045 $("input.newtag").on('keydown', function(e){ Link Here
1040
    if (e.keyCode == 13) { e.preventDefault(); }
1043
    if (e.keyCode == 13) { e.preventDefault(); }
1041
});
1044
});
1042
1045
1046
    Sticky = $("#floating");
1047
    Sticky.hcSticky({
1048
        stickTo: ".searchresults",
1049
        stickyClass: "floating"
1050
    });
1051
1043
});
1052
});
1044
//]]>
1053
//]]>
1045
</script>
1054
</script>
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/script.js (-2 lines)
Lines 1-7 Link Here
1
enquire.register("screen and (max-width:608px)", {
1
enquire.register("screen and (max-width:608px)", {
2
    match : function() {
2
    match : function() {
3
        $("#masthead_search").insertAfter("#select_library");
3
        $("#masthead_search").insertAfter("#select_library");
4
        $(".sort_by").removeClass("pull-right");
5
        if($("body.scrollto").length > 0){
4
        if($("body.scrollto").length > 0){
6
            $("body.scrollto").animate({
5
            $("body.scrollto").animate({
7
                scrollTop: $(".maincontent").offset().top
6
                scrollTop: $(".maincontent").offset().top
Lines 9-15 enquire.register("screen and (max-width:608px)", { Link Here
9
        }
8
        }
10
    },
9
    },
11
    unmatch : function() {
10
    unmatch : function() {
12
        $(".sort_by").addClass("pull-right");
13
    }
11
    }
14
});
12
});
15
13
(-)a/koha-tmpl/opac-tmpl/lib/hc-sticky.js (-1 / +11 lines)
Line 0 Link Here
0
- 
1
/*!
2
 * HC-Sticky
3
 * =========
4
 * Version: 2.2.3
5
 * Author: Some Web Media
6
 * Author URL: http://somewebmedia.com
7
 * Plugin URL: https://github.com/somewebmedia/hc-sticky
8
 * Description: Cross-browser plugin that makes any element on your page visible while you scroll
9
 * License: MIT
10
 */
11
!function(t,e){"use strict";if("object"==typeof module&&"object"==typeof module.exports){if(!t.document)throw new Error("HC-Sticky requires a browser to run.");module.exports=e(t)}else"function"==typeof define&&define.amd?define("hcSticky",[],e(t)):e(t)}("undefined"!=typeof window?window:this,function(U){"use strict";var Y={top:0,bottom:0,bottomEnd:0,innerTop:0,innerSticker:null,stickyClass:"sticky",stickTo:null,followScroll:!0,responsive:null,mobileFirst:!1,onStart:null,onStop:null,onBeforeResize:null,onResize:null,resizeDebounce:100,disable:!1,queries:null,queryFlow:"down"},$=function(t,e,o){console.log("%c! HC Sticky:%c "+t+"%c "+o+" is now deprecated and will be removed. Use%c "+e+"%c instead.","color: red","color: darkviolet","color: black","color: darkviolet","color: black")},Q=U.document,X=function(n,f){var o=this;if("string"==typeof n&&(n=Q.querySelector(n)),!n)return!1;f.queries&&$("queries","responsive","option"),f.queryFlow&&$("queryFlow","mobileFirst","option");var p={},d=X.Helpers,s=n.parentNode;"static"===d.getStyle(s,"position")&&(s.style.position="relative");var u=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.isEmptyObject(t)&&!d.isEmptyObject(p)||(p=Object.assign({},Y,p,t))},t=function(){return p.disable},e=function(){var t,e=p.responsive||p.queries;if(e){var o=U.innerWidth;if(t=f,(p=Object.assign({},Y,t||{})).mobileFirst)for(var i in e)i<=o&&!d.isEmptyObject(e[i])&&u(e[i]);else{var n=[];for(var s in e){var r={};r[s]=e[s],n.push(r)}for(var l=n.length-1;0<=l;l--){var a=n[l],c=Object.keys(a)[0];o<=c&&!d.isEmptyObject(a[c])&&u(a[c])}}}},r={css:{},position:null,stick:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};d.hasClass(n,p.stickyClass)||(!1===l.isAttached&&l.attach(),r.position="fixed",n.style.position="fixed",n.style.left=l.offsetLeft+"px",n.style.width=l.width,void 0===t.bottom?n.style.bottom="auto":n.style.bottom=t.bottom+"px",void 0===t.top?n.style.top="auto":n.style.top=t.top+"px",n.classList?n.classList.add(p.stickyClass):n.className+=" "+p.stickyClass,p.onStart&&p.onStart.call(n,Object.assign({},p)))},release:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(t.stop=t.stop||!1,!0===t.stop||"fixed"===r.position||null===r.position||!(void 0===t.top&&void 0===t.bottom||void 0!==t.top&&(parseInt(d.getStyle(n,"top"))||0)===t.top||void 0!==t.bottom&&(parseInt(d.getStyle(n,"bottom"))||0)===t.bottom)){!0===t.stop?!0===l.isAttached&&l.detach():!1===l.isAttached&&l.attach();var e=t.position||r.css.position;r.position=e,n.style.position=e,n.style.left=!0===t.stop?r.css.left:l.positionLeft+"px",n.style.width="absolute"!==e?r.css.width:l.width,void 0===t.bottom?n.style.bottom=!0===t.stop?"":"auto":n.style.bottom=t.bottom+"px",void 0===t.top?n.style.top=!0===t.stop?"":"auto":n.style.top=t.top+"px",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp("(^|\\b)"+p.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),p.onStop&&p.onStop.call(n,Object.assign({},p))}}},l={el:Q.createElement("div"),offsetLeft:null,positionLeft:null,width:null,isAttached:!1,init:function(){for(var t in l.el.className="sticky-spacer",r.css)l.el.style[t]=r.css[t];l.el.style["z-index"]="-1";var e=d.getStyle(n);l.offsetLeft=d.offset(n).left-(parseInt(e.marginLeft)||0),l.positionLeft=d.position(n).left,l.width=d.getStyle(n,"width")},attach:function(){s.insertBefore(l.el,n),l.isAttached=!0},detach:function(){l.el=s.removeChild(l.el),l.isAttached=!1}},a=void 0,c=void 0,g=void 0,m=void 0,h=void 0,v=void 0,y=void 0,b=void 0,S=void 0,w=void 0,k=void 0,E=void 0,x=void 0,L=void 0,T=void 0,j=void 0,O=void 0,C=void 0,i=function(){var t,e,o,i;r.css=(t=n,e=d.getCascadedStyle(t),o=d.getStyle(t),i={height:t.offsetHeight+"px",left:e.left,right:e.right,top:e.top,bottom:e.bottom,position:o.position,display:o.display,verticalAlign:o.verticalAlign,boxSizing:o.boxSizing,marginLeft:e.marginLeft,marginRight:e.marginRight,marginTop:e.marginTop,marginBottom:e.marginBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight},e.float&&(i.float=e.float||"none"),e.cssFloat&&(i.cssFloat=e.cssFloat||"none"),o.MozBoxSizing&&(i.MozBoxSizing=o.MozBoxSizing),i.width="auto"!==e.width?e.width:"border-box"===i.boxSizing||"border-box"===i.MozBoxSizing?t.offsetWidth+"px":o.width,i),l.init(),a=!(!p.stickTo||!("document"===p.stickTo||p.stickTo.nodeType&&9===p.stickTo.nodeType||"object"==typeof p.stickTo&&p.stickTo instanceof("undefined"!=typeof HTMLDocument?HTMLDocument:Document))),c=p.stickTo?a?Q:"string"==typeof p.stickTo?Q.querySelector(p.stickTo):p.stickTo:s,T=(C=function(){var t=n.offsetHeight+(parseInt(r.css.marginTop)||0)+(parseInt(r.css.marginBottom)||0),e=(T||0)-t;return-1<=e&&e<=1?T:t})(),m=(O=function(){return a?Math.max(Q.documentElement.clientHeight,Q.body.scrollHeight,Q.documentElement.scrollHeight,Q.body.offsetHeight,Q.documentElement.offsetHeight):c.offsetHeight})(),h=a?0:d.offset(c).top,v=p.stickTo?a?0:d.offset(s).top:h,y=U.innerHeight,j=n.offsetTop-(parseInt(r.css.marginTop)||0),g=p.innerSticker?"string"==typeof p.innerSticker?Q.querySelector(p.innerSticker):p.innerSticker:null,b=isNaN(p.top)&&-1<p.top.indexOf("%")?parseFloat(p.top)/100*y:p.top,S=isNaN(p.bottom)&&-1<p.bottom.indexOf("%")?parseFloat(p.bottom)/100*y:p.bottom,w=g?g.offsetTop:p.innerTop?p.innerTop:0,k=isNaN(p.bottomEnd)&&-1<p.bottomEnd.indexOf("%")?parseFloat(p.bottomEnd)/100*y:p.bottomEnd,E=h-b+w+j},z=U.pageYOffset||Q.documentElement.scrollTop,N=0,H=void 0,R=function(){T=C(),m=O(),x=h+m-b-k,L=y<T;var t=U.pageYOffset||Q.documentElement.scrollTop,e=d.offset(n).top,o=e-t,i=void 0;H=t<z?"up":"down",N=t-z,E<(z=t)?x+b+(L?S:0)-(p.followScroll&&L?0:b)<=t+T-w-(y-(E-w)<T-w&&p.followScroll&&0<(i=T-y-w)?i:0)?r.release({position:"absolute",bottom:v+s.offsetHeight-x-b}):L&&p.followScroll?"down"===H?o+T+S<=y+.9?r.stick({bottom:S}):"fixed"===r.position&&r.release({position:"absolute",top:e-b-E-N+w}):Math.ceil(o+w)<0&&"fixed"===r.position?r.release({position:"absolute",top:e-b-E+w-N}):t+b-w<=e&&r.stick({top:b-w}):r.stick({top:b-w}):r.release({stop:!0})},A=!1,B=!1,I=function(){A&&(d.event.unbind(U,"scroll",R),A=!1)},q=function(){null!==n.offsetParent&&"none"!==d.getStyle(n,"display")?(i(),m<=T?I():(R(),A||(d.event.bind(U,"scroll",R),A=!0))):I()},F=function(){n.style.position="",n.style.left="",n.style.top="",n.style.bottom="",n.style.width="",n.classList?n.classList.remove(p.stickyClass):n.className=n.className.replace(new RegExp("(^|\\b)"+p.stickyClass.split(" ").join("|")+"(\\b|$)","gi")," "),r.css={},!(r.position=null)===l.isAttached&&l.detach()},M=function(){F(),e(),t()?I():q()},D=function(){p.onBeforeResize&&p.onBeforeResize.call(n,Object.assign({},p)),M(),p.onResize&&p.onResize.call(n,Object.assign({},p))},P=p.resizeDebounce?d.debounce(D,p.resizeDebounce):D,W=function(){B&&(d.event.unbind(U,"resize",P),B=!1),I()},V=function(){B||(d.event.bind(U,"resize",P),B=!0),e(),t()?I():q()};this.options=function(t){return t?p[t]:Object.assign({},p)},this.refresh=M,this.update=function(t){u(t),f=Object.assign({},f,t||{}),M()},this.attach=V,this.detach=W,this.destroy=function(){W(),F()},this.triggerMethod=function(t,e){"function"==typeof o[t]&&o[t](e)},this.reinit=function(){$("reinit","refresh","method"),M()},u(f),V(),d.event.bind(U,"load",M)};if(void 0!==U.jQuery){var i=U.jQuery,n="hcSticky";i.fn.extend({hcSticky:function(e,o){return this.length?"options"===e?i.data(this.get(0),n).options():this.each(function(){var t=i.data(this,n);t?t.triggerMethod(e,o):(t=new X(this,e),i.data(this,n,t))}):this}})}return U.hcSticky=U.hcSticky||X,X}),function(c){"use strict";var t=c.hcSticky,f=c.document;"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var o=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=n[s])}return o},writable:!0,configurable:!0}),Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,o;if(null==this)throw new TypeError("this is null or not defined");var i=Object(this),n=i.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(1<arguments.length&&(e=arguments[1]),o=0;o<n;){var s;o in i&&(s=i[o],t.call(e,s,o,i)),o++}});var e=function(){var t=f.documentElement,e=function(){};function i(t){var e=c.event;return e.target=e.target||e.srcElement||t,e}t.addEventListener?e=function(t,e,o){t.addEventListener(e,o,!1)}:t.attachEvent&&(e=function(e,t,o){e[t+o]=o.handleEvent?function(){var t=i(e);o.handleEvent.call(o,t)}:function(){var t=i(e);o.call(e,t)},e.attachEvent("on"+t,e[t+o])});var o=function(){};return t.removeEventListener?o=function(t,e,o){t.removeEventListener(e,o,!1)}:t.detachEvent&&(o=function(e,o,i){e.detachEvent("on"+o,e[o+i]);try{delete e[o+i]}catch(t){e[o+i]=void 0}}),{bind:e,unbind:o}}(),r=function(t,e){return c.getComputedStyle?e?f.defaultView.getComputedStyle(t,null).getPropertyValue(e):f.defaultView.getComputedStyle(t,null):t.currentStyle?e?t.currentStyle[e.replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]:t.currentStyle:void 0},l=function(t){var e=t.getBoundingClientRect(),o=c.pageYOffset||f.documentElement.scrollTop,i=c.pageXOffset||f.documentElement.scrollLeft;return{top:e.top+o,left:e.left+i}};t.Helpers={isEmptyObject:function(t){for(var e in t)return!1;return!0},debounce:function(i,n,s){var r=void 0;return function(){var t=this,e=arguments,o=s&&!r;clearTimeout(r),r=setTimeout(function(){r=null,s||i.apply(t,e)},n),o&&i.apply(t,e)}},hasClass:function(t,e){return t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},offset:l,position:function(t){var e=t.offsetParent,o=l(e),i=l(t),n=r(e),s=r(t);return o.top+=parseInt(n.borderTopWidth)||0,o.left+=parseInt(n.borderLeftWidth)||0,{top:i.top-o.top-(parseInt(s.marginTop)||0),left:i.left-o.left-(parseInt(s.marginLeft)||0)}},getStyle:r,getCascadedStyle:function(t){var e=t.cloneNode(!0);e.style.display="none",Array.prototype.slice.call(e.querySelectorAll('input[type="radio"]')).forEach(function(t){t.removeAttribute("name")}),t.parentNode.insertBefore(e,t.nextSibling);var o=void 0;e.currentStyle?o=e.currentStyle:c.getComputedStyle&&(o=f.defaultView.getComputedStyle(e,null));var i={};for(var n in o)!isNaN(n)||"string"!=typeof o[n]&&"number"!=typeof o[n]||(i[n]=o[n]);if(Object.keys(i).length<3)for(var s in i={},o)isNaN(s)||(i[o[s].replace(/-\w/g,function(t){return t.toUpperCase().replace("-","")})]=o.getPropertyValue(o[s]));if(i.margin||"auto"!==i.marginLeft?i.margin||i.marginLeft!==i.marginRight||i.marginLeft!==i.marginTop||i.marginLeft!==i.marginBottom||(i.margin=i.marginLeft):i.margin="auto",!i.margin&&"0px"===i.marginLeft&&"0px"===i.marginRight){var r=t.offsetLeft-t.parentNode.offsetLeft,l=r-(parseInt(i.left)||0)-(parseInt(i.right)||0),a=t.parentNode.offsetWidth-t.offsetWidth-r-(parseInt(i.right)||0)+(parseInt(i.left)||0)-l;0!==a&&1!==a||(i.margin="auto")}return e.parentNode.removeChild(e),e=null,i},event:e}}(window);

Return to bug 5287