Upgrading jquery and jquery tabs plugin. Removing some unused plugin files.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Owen Leonard 2008-02-29 14:10:36 -06:00 committed by Joshua Ferraro
parent 9a27fc520c
commit 5d42e5e991
14 changed files with 658 additions and 333 deletions

View File

@ -559,62 +559,10 @@ em {
font-weight : bold;
}
#catalogue_detail_biblio p {
#catalogue_detail_biblio p, #catalogue_detail_biblio ul {
padding-bottom: .6em;
}
.toptabs {
margin-top : 1em;
}
.toptabs .tabs-nav a, .toptabs .tabs-nav span.a {
top: 0;
}
.toptabs .tabs-nav li {
margin-right : .5em;
}
.toptabs .tabs-nav li a, .toptabs .tabs-nav li span.a {
background-color : #F3F3F3;
border-top : 1px solid #E8E8E8;
border-left : 1px solid #E8E8E8;
border-right : 1px solid #E8E8E8;
border-bottom : 0;
text-align : center;
text-decoration : none;
}
.toptabs .tabs-nav li.tabs-selected {
background-color : #FFF;
}
.toptabs .tabs-nav li.tabs-selected a, .toptabs .tabs-nav li.tabs-selected span.a {
background-color : #FFF;
border-top : 1px solid #E8E8E8;
border-left : 1px solid #E8E8E8;
border-right : 1px solid #E8E8E8;
border-bottom : 1px solid #FFF;
margin-bottom : -5px;
padding-bottom : 5px;
text-align : center;
}
.toptabs.numbered .tabs-nav li {
min-width : 3em;
}
.toptabs .tabs-container {
border : 1px solid #E8E8E8;
padding : 1em;
}
.tabs-container {
border-top: 0;
padding : inherit;
background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
}
#basket {
display : inline;
}
@ -1447,4 +1395,29 @@ div#menu li.active a:hover {
padding: 0;
position: relative;
width: 100px;
}
ul.ui-tabs-nav li {
margin-right : .5em;
}
ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a {
background-color : #F3F3F3;
border-top : 1px solid #E8E8E8;
border-left : 1px solid #E8E8E8;
border-right : 1px solid #E8E8E8;
border-bottom : 0;
padding : .2em 1em;
text-align : center;
text-decoration : none;
}
ul.ui-tabs-nav li.ui-tabs-selected a, ul.ui-tabs-nav li.ui-tabs-selected span.a {
background-color : #FFF;
border-top : 1px solid #E8E8E8;
border-left : 1px solid #E8E8E8;
border-right : 1px solid #E8E8E8;
border-bottom : 1px solid #FFF;
margin-bottom : -5px;
text-align : center;
}

View File

@ -1,5 +1,7 @@
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="shortcut icon" href="<!-- TMPL_VAR NAME="themelang" -->/includes/favicon.ico" type="image/x-icon" />
<!-- TMPL_IF name="RSS" --><link rel="alternate" type="application/rss+xml" title="Koha - RSS" href="<!-- TMPL_VAR name="site_url"-->/opac-rss.pl?q=<!-- TMPL_VAR name="searchdesc"-->" /><!-- /TMPL_IF -->
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/yui/button.css" />
@ -16,13 +18,9 @@
<!-- TMPL_IF name="opacstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="opacstylesheet" -->" /><!-- TMPL_ELSE -->
<!-- TMPL_IF name="opaccolorstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/<!-- TMPL_VAR NAME="opaccolorstylesheet" -->" /><!-- /TMPL_IF -->
<!-- TMPL_IF name="opaclayoutstylesheet" --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/<!-- TMPL_VAR NAME="opaclayoutstylesheet" -->" /><!-- TMPL_ELSE --><link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/css/opac.css" /><!-- /TMPL_IF --><!-- /TMPL_IF -->
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.tabs.css" />
<!-- Additional IE/Win specific style sheet (Conditional Comments) -->
<!--[if lte IE 7]>
<link rel="stylesheet" href="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.tabs-ie.css" type="text/css" media="projection, screen">
<![endif]-->
<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/ui.tabs.css" />
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/jquery.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tabs.pack.js"></script>
<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/ui.tabs.js"></script>
<!-- TMPL_IF NAME="AmazonContent" --><script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/amazonimages.js"></script><!-- /TMPL_IF -->
<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/script.js"></script>
<script type="text/javascript" language="javascript" src="<!-- TMPL_VAR NAME="themelang" -->/js/basket.js"></script>

File diff suppressed because one or more lines are too long

View File

@ -1,115 +0,0 @@
div.cmDiv
{
border: 1px solid black;
background-color: #eee;
}
.clickMenu
{
margin: 0;
padding: 0;
cursor: default;
}
.clickMenu, .clickMenu ul
{
list-style: none;
}
.clickMenu ul
{
margin: 0;
padding: 2px;
border: 1px solid black;
background-color: #eee;
min-width: 100px; /* ie doesnt know this :/ */
//float: left;/*ie again*/
//width: 100%;/*and again*/
}
.clickMenu div.outerbox
{
display: none;
min-width: 106px; /* firefox produces animation-flickering when the box is bigger than this :/ */
}
.clickMenu div.inner
{
//top: 20px; /* for ie */
left: 0;
margin: 0;
}
.clickMenu div.inner div.outerbox
{
margin: 0;
left: 98px;
//left: 90px; /* for ie */
top: -3px;
}
.clickMenu li
{
position: relative;
padding: 0 20px 0 2px;
/*white-space: nowrap; does not really work in ie */
}
.clickMenu li.main
{
float: left;
padding: 0 10px;
background-color: #eee;
//height: 20px; /* for ie */
}
.clickMenu li.main li
{
z-index: 2;
min-width: 78px;
}
.clickMenu li.hover
{
z-index: 1 !important; /* the hover z-index has to be below the normal one the hovering items may be drawn over a submenu */
background-color: #aaa;
}
.clickMenu img.liArrow
{
position: absolute;
right: 5px;
top: 0.41em;
}
.clickMenu a
{
text-decoration: none;
color: black;
cursor: default;
}
/* thats for the shadowbox */
html>body div.outerbox
{
padding: 0 5px 5px 0;
}
html>body div.shadowbox1
{
position: absolute;
right: 0;
bottom: 5px;
width: 5px;
height: 100%;
background: url(myshadow.png) no-repeat right top;
}
html>body div.shadowbox2
{
position: absolute;
bottom: 0;
right: 5px;
height: 5px;
width: 100%;
background: url(myshadow.png) left bottom;
}
html>body div.shadowbox3
{
position: absolute;
bottom: 0;
right: 0;
height: 5px;
width: 5px;
background: url(myshadow.png) no-repeat right bottom;
}
html>body .innerbox
{
margin: 0;
display: inherit;
}

View File

@ -1 +0,0 @@
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(8($){7 E={1e:8(){$(5).1D(\'>a\').X(8(){3(5.1L){1K.24=5.1L}})},1k:\'\',1x:2u,1t:10};$.1f.L=8(f){7 g=K;7 h=(($.13.1n)?4:2);7 k=$.1y({},E,f);7 l=8(a,b){3(a.F&&!a.J){Y(a.F)}R 3(a.F){9}3(a.J){a.F=1M(8(){$(A(z(a,\'U\'),\'W\')).S(\'1d\',s).S(\'1p\',u).S(\'1b\',k.1e);$(a).1H();a.J=K;a.F=N},b)}};7 m=8(b,c){3(b.F){Y(b.F)}3(!b.J){b.F=1M(8(){3(!C(b.H,\'I\')){9}$(A(z(b,\'U\'),\'W\')).1d(s).1p(u).1b(k.1e);3(!C(b.H,\'1E\')){$(b).17(\'1C\',b.H.1o-h)}b.J=V;$(b).20();3($.13.1n){7 a=$(z(b,\'U\')).18();3(a<1w){a=1w}$(b).17(\'18\',a)}b.F=N},c)}};7 o=8(e){7 p=(e.2o=="1d"?e.2m:e.1N)||e.1P;2h(p&&p!=5){2f{p=p.H}2c(e){p=5}}3(p==5){9 K}9 V};7 q=8(e){7 a=A(5.H,\'W\');7 b=1u 1v("(^|\\\\s)I(\\\\s|$)");P(7 i=0;i<a.1s;i++){3(b.1r(a[i].1q)){$(a[i]).Q(\'I\')}}$(5).O(\'I\');3(g){t(5,k.1t)}};7 s=8(e){3(!o(e)){9 K}3(e.T!=5){3(!D(5,e.T)){9}}t(5,k.1x)};7 t=8(a,b){7 c=z(a,\'M\');7 n=a.H.1c;P(;n;n=n.19){3(n.15==1&&n.11.14()==\'W\'){7 d=z(n,\'M\');3(d&&d.F&&!d.J){Y(d.F);d.F=N}}}7 e=a.H;P(;e;e=e.H){3(e.15==1&&e.11.14()==\'M\'){3(e.F){Y(e.F);e.F=N;$(e.H).O(\'I\')}}}$(a).O(\'I\');3(c&&c.J){3(c.F){Y(c.F);c.F=N}R{9}}$(a.H.1I(\'M\')).X(8(){3(5!=c&&5.J){l(5,b);$(5.H).Q(\'I\')}});3(c){m(c,b)}};7 u=8(e){3(!o(e)){9 K}3(e.T!=5){3(!D(5,e.T)){9}}7 a=z(5,\'M\');3(!a){$(5).Q(\'I\')}R{3(!a.J){$(5).Q(\'I\')}}};7 v=8(e){7 a=z(5,\'M\');7 b=e.1P||e.1N;7 p;3(!g){$(5).Q(\'I\')}R 3(!a&&b){p=B(e.T,\'U\',\'L\');3(p.1a(b)){$(5).Q(\'I\')}}R 3(b){p=B(e.T,\'U\',\'L\');3(!a.J&&(p.1a(b))){$(5).Q(\'I\')}}};7 w=8(){7 a=z(5,\'M\');3(a&&a.J){y();$(5).O(\'I\')}R{t(5,k.1t);g=V;$(1J).1G(\'1F\',x)}9 K};7 x=8(e){7 a=K;7 b=B(e.T,\'U\',\'L\');3(b){$(b.1I(\'M\')).X(8(){3(5.J){a=V}})}3(!a){y()}};7 y=8(){$(\'1i.L G.12\').X(8(){3(5.F){Y(5.F);5.F=N}3(5.J){$(5).1H();5.J=K}});$(\'1i.L 1m\').Q(\'I\');$(\'1i.L>1m 1m\').S(\'1d\',s).S(\'1p\',u).S(\'1b\',k.1e);$(1J).S(\'1F\',x);g=K};7 z=8(a,b){3(!a){9 N}7 n=a.1c;P(;n;n=n.19){3(n.15==1&&n.11.14()==b){9 n}}9 N};7 A=8(a,b){3(!a){9[]}7 r=[];7 n=a.1c;P(;n;n=n.19){3(n.15==1&&n.11.14()==b){r[r.1s]=n}}9 r};7 B=8(a,b,c){7 d=a.H;7 e=1u 1v("(^|\\\\s)"+c+"(\\\\s|$)");P(;d;d=d.H){3(d.15==1&&d.11.14()==b&&e.1r(d.1q)){9 d}}9 N};7 C=8(a,b){7 c=1u 1v("(^|\\\\s)"+b+"(\\\\s|$)");3(c.1r(a.1q)){9 V}9 K};7 D=8(a,b){7 n=a.1c;P(;n;n=n.19){3(n==b){9 V}}9 K};9 5.X(8(){3(1K.1g&&1g.1l&&!1g.1l.1a){1g.1l.1a=8(a){9!!(5.23(a)&16)}}3(!C(5,\'L\')){$(5).O(\'L\')}$(\'1i\',5).1B();3($.13.1n&&(!$.13.1V||22($.13.1V)<=6)){3($.1f.1A){$(\'G.12\',5).1A()}R{$(\'G.12\',5).21(\'<1Z 1z="1Y:1X;1h:1j;2t:0;1C:0;z-2r:-1;2q:2p();\'+\'18:1W(5.H.1o);1U:1W(5.H.1T)"/>\')}}$(5).1G(\'2n\',8(){y()});7 b=A(5,\'W\');P(7 j=0;j<b.1s;j++){3(z(z(z(b[j],\'M\'),\'U\'),\'W\')){$(b[j]).1b(w)}}$(b).I(q,v).O(\'1E\').1D(\'>G\').O(\'1R\');3(k.1k){$(\'G.1R G.12\',5).1Q(\'<2l 2i="\'+k.1k+\'" Z="2g" />\')}$(5).1O(\'<G Z="2e"></G>\').2d(\'<G 1z="2j: 2k; 2b: 2a;"></G>\')})};$.1f.L.29=8(o){$.1y(E,o)}})(1S);(8($){$.1f.1B=8(){9 5.X(8(){7 a=$(\'<G Z="12"></G>\').28(0);3($(5).17(\'1h\')==\'1j\'){$(a).17({1h:\'27\',18:5.1o,1U:5.1T})}R{$(a).17(\'1h\',\'1j\')}$(5).O(\'26\').1O(a).1Q(\'<G Z="2s"></G><G Z="25"></G><G Z="2v"></G>\')})}})(1S);',62,156,'|||if||this||var|function|return||||||||||||||||||||||||||||||||timer|div|parentNode|hover|isVisible|false|clickMenu|DIV|null|addClass|for|removeClass|else|unbind|target|UL|true|LI|each|clearTimeout|class||nodeName|outerbox|browser|toUpperCase|nodeType||css|width|nextSibling|contains|click|firstChild|mouseover|onClick|fn|Node|position|ul|absolute|arrowSrc|prototype|li|msie|offsetWidth|mouseout|className|test|length|mainDelay|new|RegExp|100|subDelay|extend|style|bgiframe|shadowBox|left|find|main|mousedown|bind|hide|getElementsByTagName|document|window|href|setTimeout|toElement|wrap|relatedTarget|before|inner|jQuery|offsetHeight|height|version|expression|block|display|iframe|show|append|parseInt|compareDocumentPosition|location|shadowbox2|innerBox|relative|get|setDefaults|hidden|visibility|catch|after|cmDiv|try|liArrow|while|src|clear|both|img|fromElement|closemenu|type|mask|filter|index|shadowbox1|top|300|shadowbox3'.split('|'),0,{}))

View File

@ -1,20 +0,0 @@
/*
Tabs - additional IE specific bug fixes
Recommended usage (Conditional Comments):
<!--[if lte IE 7]>
<link rel="stylesheet" href="tabs_ie.css" type="text/css" media="projection, screen" />
<![endif]-->
*/
.tabs-nav { /* auto clear */
display: inline-block;
}
.tabs-nav .tabs-disabled {
position: relative; /* fixes opacity */
filter: alpha(opacity=40);
}
.tabs-nav .tabs-disabled a span {
_height: 19px; /* for some reason the height is 1px to less with opacity... */
min-height: 19px; /* ...in both IE 6 and 7 */
}

View File

@ -1,92 +0,0 @@
/* Caution! Ensure accessibility in print and other media types... */
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
.tabs-hide {
display: none;
}
}
/* Hide useless elements in print layouts... */
@media print {
.tabs-nav {
display: none;
}
}
/* Skin */
.tabs-nav {
margin: 0;
padding: 0 0 0 4px;
}
.tabs-nav li {
list-style : none;
}
.tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
}
.tabs-nav li {
float: left;
margin: 0 0 0 1px;
min-width: 84px; /* be nice to Opera */
}
.tabs-nav a, .tabs-nav a span {
display: block;
padding: .2em .5em .25em .5em;
}
.tabs-nav a {
position: relative;
top: 1px;
/*z-index: 2;*/
white-space: nowrap; /* required in IE 6 */
}
.tabs-nav .tabs-selected a {
background-color : #FFFFCC;
border-top: 1px solid #FFFFCC;
border-right: 1px solid #FF9900;
border-bottom: 1px solid #FF9900;
border-left: 1px solid #FFCC66;
font-weight : bold;
text-align : center;
text-decoration : none;
top : -1px;
}
.tabs-nav .tabs-selected a:hover {
color : #0000CC;
}
.tabs-nav .tabs-selected a, .tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active {
outline: 0; /* prevent dotted border in Firefox */
}
.tabs-nav a span {
width: 64px; /* IE 6 treats width as min-width */
min-width: 64px;
height: 18px; /* IE 6 treats height as min-height */
min-height: 18px;
padding-top: 6px;
padding-right: 0;
}
*>.tabs-nav a span { /* hide from IE 6 */
width: auto;
height: auto;
}
.tabs-nav .tabs-selected a span {
padding-top: 7px;
}
.tabs-nav .tabs-selected a:link, .tabs-nav .tabs-selected a:visited, .tabs-nav .tabs-disabled a:link, .tabs-nav .tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
cursor: text;
}
.tabs-nav a:hover, .tabs-nav a:focus, .tabs-nav a:active { /* @ Opera, we need to be explicit again here now... */
cursor: pointer;
}
.tabs-nav .tabs-disabled {
opacity: .4;
}
.tabs-container {
background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -0,0 +1,80 @@
/* Caution! Ensure accessibility in print and other media types... */
@media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */
.ui-tabs-hide {
display: none;
}
}
/* Hide useless elements in print layouts... */
@media print {
.ui-tabs-nav {
display: none;
}
}
/* Skin */
.ui-tabs-nav, .ui-tabs-panel {
}
.ui-tabs-nav {
list-style: none;
}
.ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */
display: block;
clear: both;
content: " ";
}
.ui-tabs-nav li {
float: left;
list-style-type : none;
}
.ui-tabs-nav a, .ui-tabs-nav a span {
float: left; /* fixes dir=ltr problem and other quirks IE */
}
.ui-tabs-nav a {
margin: 0; /* position: relative makes opacity fail for disabled tab in IE */
white-space: nowrap; /* @ IE 6 */
outline: 0; /* @ Firefox, prevent dotted border after click */
}
.ui-tabs-nav a:link, .ui-tabs-nav a:visited {
}
.ui-tabs-nav .ui-tabs-selected a {
}
.ui-tabs-nav a span {
padding-top: 1px;
padding-right: 0;
height: 20px;
line-height: 20px;
}
.ui-tabs-nav .ui-tabs-selected a span {
padding-top: 0;
height: 20px;
line-height: 20px;
}
.ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited,
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */
cursor: text;
}
.ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active,
.ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */
cursor: pointer;
}
.ui-tabs-disabled {
opacity: .4;
filter: alpha(opacity=40);
}
.ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited {
color: #000;
}
.ui-tabs-panel {
border: 1px solid #E8E8E8;
padding : 1em;
background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */
}
/* Additional IE specific bug fixes... */
* html .ui-tabs-nav { /* auto clear @ IE 6 & IE 7 Quirks Mode */
display: inline-block;
}
*:first-child+html .ui-tabs-nav { /* auto clear @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */
display: inline-block;
}

View File

@ -0,0 +1,517 @@
/*
* Tabs 3 - New Wave Tabs
*
* Copyright (c) 2007 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI/Tabs
*/
(function($) {
// if the UI scope is not availalable, add it
$.ui = $.ui || {};
// tabs API methods
$.fn.tabs = function() {
var method = typeof arguments[0] == 'string' && arguments[0];
var args = method && Array.prototype.slice.call(arguments, 1) || arguments;
return this.each(function() {
if (method) {
var tabs = $.data(this, 'ui-tabs');
tabs[method].apply(tabs, args);
} else
new $.ui.tabs(this, args[0] || {});
});
};
// tabs class
$.ui.tabs = function(el, options) {
var self = this;
this.element = el;
this.options = $.extend({
// basic setup
selected: 0,
unselect: options.selected === null,
event: 'click',
disabled: [],
cookie: null, // pass options object as expected by cookie plugin: { expires: 7, path: '/', domain: 'jquery.com', secure: true }
// TODO bookmarkable: $.ajaxHistory ? true : false,
// Ajax
spinner: 'Loading&#8230;',
cache: false,
idPrefix: 'ui-tabs-',
ajaxOptions: {},
// animations
fx: null, /* e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } */
// templates
tabTemplate: '<li><a href="#{href}"><span>#{label}</span></a></li>',
panelTemplate: '<div></div>',
// CSS classes
navClass: 'ui-tabs-nav',
selectedClass: 'ui-tabs-selected',
unselectClass: 'ui-tabs-unselect',
disabledClass: 'ui-tabs-disabled',
panelClass: 'ui-tabs-panel',
hideClass: 'ui-tabs-hide',
loadingClass: 'ui-tabs-loading'
}, options);
this.options.event += '.ui-tabs'; // namespace event
this.options.cookie = $.cookie && $.cookie.constructor == Function && this.options.cookie;
$(el).bind('setData.ui-tabs', function(event, key, value) {
self.options[key] = value;
this.tabify();
}).bind('getData.ui-tabs', function(event, key) {
return self.options[key];
});
// save instance for later
$.data(el, 'ui-tabs', this);
// create tabs
this.tabify(true);
};
// instance methods
$.extend($.ui.tabs.prototype, {
tabId: function(a) {
return a.title && a.title.replace(/\s/g, '_').replace(/[^A-Za-z0-9\-_:\.]/g, '')
|| this.options.idPrefix + $.data(a);
},
ui: function(tab, panel) {
return {
instance: this,
options: this.options,
tab: tab,
panel: panel
};
},
tabify: function(init) {
this.$lis = $('li:has(a[href])', this.element);
this.$tabs = this.$lis.map(function() { return $('a', this)[0]; });
this.$panels = $([]);
var self = this, o = this.options;
this.$tabs.each(function(i, a) {
// inline tab
if (a.hash && a.hash.replace('#', '')) // Safari 2 reports '#' for an empty hash
self.$panels = self.$panels.add(a.hash);
// remote tab
else if ($(a).attr('href') != '#') { // prevent loading the page itself if href is just "#"
$.data(a, 'href.ui-tabs', a.href); // required for restore on destroy
$.data(a, 'load.ui-tabs', a.href); // mutable
var id = self.tabId(a);
a.href = '#' + id;
var $panel = $('#' + id);
if (!$panel.length) {
$panel = $(o.panelTemplate).attr('id', id).addClass(o.panelClass)
.insertAfter( self.$panels[i - 1] || self.element );
$panel.data('destroy.ui-tabs', true);
}
self.$panels = self.$panels.add( $panel );
}
// invalid tab href
else
o.disabled.push(i + 1);
});
if (init) {
// attach necessary classes for styling if not present
$(this.element).hasClass(o.navClass) || $(this.element).addClass(o.navClass);
this.$panels.each(function() {
var $this = $(this);
$this.hasClass(o.panelClass) || $this.addClass(o.panelClass);
});
// disabled tabs
for (var i = 0, index; index = o.disabled[i]; i++)
this.disable(index);
// Try to retrieve selected tab:
// 1. from fragment identifier in url if present
// 2. from cookie
// 3. from selected class attribute on <li>
// 4. otherwise use given "selected" option
// 5. check if tab is disabled
this.$tabs.each(function(i, a) {
if (location.hash) {
if (a.hash == location.hash) {
o.selected = i;
// prevent page scroll to fragment
//if (($.browser.msie || $.browser.opera) && !o.remote) {
if ($.browser.msie || $.browser.opera) {
var $toShow = $(location.hash), toShowId = $toShow.attr('id');
$toShow.attr('id', '');
setTimeout(function() {
$toShow.attr('id', toShowId); // restore id
}, 500);
}
scrollTo(0, 0);
return false; // break
}
} else if (o.cookie) {
var index = parseInt($.cookie('ui-tabs' + $.data(self.element)),10);
if (index && self.$tabs[index]) {
o.selected = index;
return false; // break
}
} else if ( self.$lis.eq(i).hasClass(o.selectedClass) ) {
o.selected = i;
return false; // break
}
});
var n = this.$lis.length;
while (this.$lis.eq(o.selected).hasClass(o.disabledClass) && n) {
o.selected = ++o.selected < this.$lis.length ? o.selected : 0;
n--;
}
if (!n) // all tabs disabled, set option unselect to true
o.unselect = true;
// highlight selected tab
this.$panels.addClass(o.hideClass);
this.$lis.removeClass(o.selectedClass);
if (!o.unselect) {
this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before
this.$lis.eq(o.selected).addClass(o.selectedClass);
}
// load if remote tab
var href = !o.unselect && $.data(this.$tabs[o.selected], 'load.ui-tabs');
if (href)
this.load(o.selected, href);
// disable click if event is configured to something else
if (!(/^click/).test(o.event))
this.$tabs.bind('click', function(e) { e.preventDefault(); });
}
var hideFx, showFx, baseFx = { 'min-width': 0, duration: 1 }, baseDuration = 'normal';
if (o.fx && o.fx.constructor == Array)
hideFx = o.fx[0] || baseFx, showFx = o.fx[1] || baseFx;
else
hideFx = showFx = o.fx || baseFx;
// reset some styles to maintain print style sheets etc.
var resetCSS = { display: '', overflow: '', height: '' };
if (!$.browser.msie) // not in IE to prevent ClearType font issue
resetCSS.opacity = '';
// Hide a tab, animation prevents browser scrolling to fragment,
// $show is optional.
function hideTab(clicked, $hide, $show) {
$hide.animate(hideFx, hideFx.duration || baseDuration, function() { //
$hide.addClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
if ($.browser.msie && hideFx.opacity)
$hide[0].style.filter = '';
if ($show)
showTab(clicked, $show, $hide);
});
}
// Show a tab, animation prevents browser scrolling to fragment,
// $hide is optional.
function showTab(clicked, $show, $hide) {
if (showFx === baseFx)
$show.css('display', 'block'); // prevent occasionally occuring flicker in Firefox cause by gap between showing and hiding the tab panels
$show.animate(showFx, showFx.duration || baseDuration, function() {
$show.removeClass(o.hideClass).css(resetCSS); // maintain flexible height and accessibility in print etc.
if ($.browser.msie && showFx.opacity)
$show[0].style.filter = '';
// callback
$(self.element).triggerHandler("show.ui-tabs", [self.ui(clicked, $show[0])]);
});
}
// switch a tab
function switchTab(clicked, $li, $hide, $show) {
/*if (o.bookmarkable && trueClick) { // add to history only if true click occured, not a triggered click
$.ajaxHistory.update(clicked.hash);
}*/
$li.addClass(o.selectedClass)
.siblings().removeClass(o.selectedClass);
hideTab(clicked, $hide, $show);
}
// attach tab event handler, unbind to avoid duplicates from former tabifying...
this.$tabs.unbind(o.event).bind(o.event, function() {
//var trueClick = e.clientX; // add to history only if true click occured, not a triggered click
var $li = $(this).parents('li:eq(0)'),
$hide = self.$panels.filter(':visible'),
$show = $(this.hash);
// If tab is already selected and not unselectable or tab disabled or click callback returns false stop here.
// Check if click handler returns false last so that it is not executed for a disabled tab!
if (($li.hasClass(o.selectedClass) && !o.unselect) || $li.hasClass(o.disabledClass)
|| $(self.element).triggerHandler("select.ui-tabs", [self.ui(this, $show[0])]) === false) {
this.blur();
return false;
}
self.options.selected = self.$tabs.index(this);
// if tab may be closed
if (o.unselect) {
if ($li.hasClass(o.selectedClass)) {
self.options.selected = null;
$li.removeClass(o.selectedClass);
self.$panels.stop();
hideTab(this, $hide);
this.blur();
return false;
} else if (!$hide.length) {
self.$panels.stop();
var a = this;
self.load(self.$tabs.index(this), function() {
$li.addClass(o.selectedClass).addClass(o.unselectClass);
showTab(a, $show);
});
this.blur();
return false;
}
}
if (o.cookie)
$.cookie('ui-tabs' + $.data(self.element), self.options.selected, o.cookie);
// stop possibly running animations
self.$panels.stop();
// show new tab
if ($show.length) {
// prevent scrollbar scrolling to 0 and than back in IE7, happens only if bookmarking/history is enabled
/*if ($.browser.msie && o.bookmarkable) {
var showId = this.hash.replace('#', '');
$show.attr('id', '');
setTimeout(function() {
$show.attr('id', showId); // restore id
}, 0);
}*/
var a = this;
self.load(self.$tabs.index(this), function() {
switchTab(a, $li, $hide, $show);
});
// Set scrollbar to saved position - need to use timeout with 0 to prevent browser scroll to target of hash
/*var scrollX = window.pageXOffset || document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft || 0;
var scrollY = window.pageYOffset || document.documentElement && document.documentElement.scrollTop || document.body.scrollTop || 0;
setTimeout(function() {
scrollTo(scrollX, scrollY);
}, 0);*/
} else
throw 'jQuery UI Tabs: Mismatching fragment identifier.';
// Prevent IE from keeping other link focussed when using the back button
// and remove dotted border from clicked link. This is controlled in modern
// browsers via CSS, also blur removes focus from address bar in Firefox
// which can become a usability and annoying problem with tabsRotate.
if ($.browser.msie)
this.blur();
//return o.bookmarkable && !!trueClick; // convert trueClick == undefined to Boolean required in IE
return false;
});
},
add: function(url, label, index) {
if (url && label) {
index = index || this.$tabs.length; // append by default
var o = this.options;
var $li = $(o.tabTemplate.replace(/#\{href\}/, url).replace(/#\{label\}/, label));
$li.data('destroy.ui-tabs', true);
var id = url.indexOf('#') == 0 ? url.replace('#', '') : this.tabId( $('a:first-child', $li)[0] );
// try to find an existing element before creating a new one
var $panel = $('#' + id);
if (!$panel.length) {
$panel = $(o.panelTemplate).attr('id', id)
.addClass(o.panelClass).addClass(o.hideClass);
$panel.data('destroy.ui-tabs', true);
}
if (index >= this.$lis.length) {
$li.appendTo(this.element);
$panel.appendTo(this.element.parentNode);
} else {
$li.insertBefore(this.$lis[index]);
$panel.insertBefore(this.$panels[index]);
}
this.tabify();
if (this.$tabs.length == 1) {
$li.addClass(o.selectedClass);
$panel.removeClass(o.hideClass);
var href = $.data(this.$tabs[0], 'load.ui-tabs');
if (href)
this.load(index, href);
}
// callback
$(this.element).triggerHandler("add.ui-tabs",
[this.ui(this.$tabs[index], this.$panels[index])]
);
} else
throw 'jQuery UI Tabs: Not enough arguments to add tab.';
},
remove: function(index) {
if (index && index.constructor == Number) {
var o = this.options, $li = this.$lis.eq(index).remove(),
$panel = this.$panels.eq(index).remove();
// If selected tab was removed focus tab to the right or
// tab to the left if last tab was removed.
if ($li.hasClass(o.selectedClass) && this.$tabs.length > 1)
this.click(index + (index < this.$tabs.length ? 1 : -1));
this.tabify();
// callback
$(this.element).triggerHandler("remove.ui-tabs",
[this.ui($li.find('a')[0], $panel[0])]
);
}
},
enable: function(index) {
var self = this, o = this.options, $li = this.$lis.eq(index);
$li.removeClass(o.disabledClass);
if ($.browser.safari) { // fix disappearing tab (that used opacity indicating disabling) after enabling in Safari 2...
$li.css('display', 'inline-block');
setTimeout(function() {
$li.css('display', 'block');
}, 0);
}
o.disabled = $.map(this.$lis.filter('.' + o.disabledClass),
function(n, i) { return self.$lis.index(n); } );
// callback
$(this.element).triggerHandler("enable.ui-tabs",
[this.ui(this.$tabs[index], this.$panels[index])]
);
},
disable: function(index) {
var self = this, o = this.options;
this.$lis.eq(index).addClass(o.disabledClass);
o.disabled = $.map(this.$lis.filter('.' + o.disabledClass),
function(n, i) { return self.$lis.index(n); } );
// callback
$(this.element).triggerHandler("disable.ui-tabs",
[this.ui(this.$tabs[index], this.$panels[index])]
);
},
select: function(index) {
if (typeof index == 'string')
index = this.$tabs.index( this.$tabs.filter('[href$=' + index + ']')[0] );
this.$tabs.eq(index).trigger(this.options.event);
},
load: function(index, callback) { // callback is for internal usage only
var self = this, o = this.options,
$a = this.$tabs.eq(index), a = $a[0];
var url = $a.data('load.ui-tabs');
// no remote - just finish with callback
if (!url) {
typeof callback == 'function' && callback();
return;
}
// load remote from here on
if (o.spinner) {
var $span = $('span', a), label = $span.html();
$span.html('<em>' + o.spinner + '</em>');
}
var finish = function() {
self.$tabs.filter('.' + o.loadingClass).each(function() {
$(this).removeClass(o.loadingClass);
if (o.spinner)
$('span', this).html(label);
});
self.xhr = null;
};
var ajaxOptions = $.extend({}, o.ajaxOptions, {
url: url,
success: function(r, s) {
$(a.hash).html(r);
finish();
// This callback is required because the switch has to take
// place after loading has completed.
typeof callback == 'function' && callback();
if (o.cache)
$.removeData(a, 'load.ui-tabs'); // if loaded once do not load them again
// callback
$(self.element).triggerHandler("load.ui-tabs",
[self.ui(self.$tabs[index], self.$panels[index])]
);
o.ajaxOptions.success && o.ajaxOptions.success(r, s);
}
});
if (this.xhr) {
// terminate pending requests from other tabs and restore tab label
this.xhr.abort();
finish();
}
$a.addClass(o.loadingClass);
setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
self.xhr = $.ajax(ajaxOptions);
}, 0);
},
url: function(index, url) {
this.$tabs.eq(index).data('load.ui-tabs', url);
},
destroy: function() {
var o = this.options;
$(this.element).unbind('.ui-tabs')
.removeClass(o.navClass).removeData('ui-tabs');
this.$tabs.each(function() {
var href = $.data(this, 'href.ui-tabs');
if (href)
this.href = href;
$(this).unbind('.ui-tabs')
.removeData('href.ui-tabs').removeData('load.ui-tabs');
});
this.$lis.add(this.$panels).each(function() {
if ($.data(this, 'destroy.ui-tabs'))
$(this).remove();
else
$(this).removeClass([o.selectedClass, o.unselectClass,
o.disabledClass, o.panelClass, o.hideClass].join(' '));
});
}
});
})(jQuery);

View File

@ -3,15 +3,15 @@
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
var $tabs = $('#bibliodescriptions').tabs({
onClick: function(tab) {
if ( $(tab).is('.external') ) {
location.href = tab.href;
return false;
}
}
});
});
var $tabs = $('#bibliodescriptions > ul').tabs({
click: function(tab) {
if ( $(tab).attr("class") == 'external') {
location.href = tab.href;
return false;
}
}
});
});
//]]>
</script>
</head>
@ -83,10 +83,10 @@
<!-- TMPL_IF NAME="pages" --><p><span class="label">Physical details:</span> <!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></p><!-- /TMPL_IF -->
<!-- COinS / OpenURL -->
<!-- TMPL_IF NAME="ocoins_format" -->
<span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&rft.au=<!-- TMPL_VAR NAME="author" -->&rft.btitle=<!-- TMPL_VAR NAME="title" -->&rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&rft.tpages=<!-- TMPL_VAR NAME="size" -->&rft.isbn=<!-- TMPL_VAR NAME=isbn -->&rft.aucorp=&rft.place=<!-- TMPL_VAR NAME="place" -->&rft.pub=<!-- TMPL_VAR NAME="publisher" -->&rft.edition=<!-- TMPL_VAR NAME="edition" -->&rft.series=<!-- TMPL_VAR NAME="series" -->&rft.genre="></span><!-- /TMPL_IF -->
<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3A<!-- TMPL_VAR NAME="ocoins_format" -->&amp;rft.au=<!-- TMPL_VAR NAME="author" -->&amp;rft.btitle=<!-- TMPL_VAR NAME="title" -->&amp;rft.date=<!-- TMPL_VAR NAME="publicationyear" -->&amp;rft.tpages=<!-- TMPL_VAR NAME="size" -->&amp;rft.isbn=<!-- TMPL_VAR NAME=isbn -->&amp;rft.aucorp=&amp;rft.place=<!-- TMPL_VAR NAME="place" -->&amp;rft.pub=<!-- TMPL_VAR NAME="publisher" -->&amp;rft.edition=<!-- TMPL_VAR NAME="edition" -->&amp;rft.series=<!-- TMPL_VAR NAME="series" -->&amp;rft.genre="></span><!-- /TMPL_IF -->
<!-- TMPL_IF name="isbn" -->
<!-- unAPI <abbr/> tag -->
<p><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" --></abbr></a>
<p><span class="label">ISBN: </span><abbr class="unapi-id" title="koha:isbn:<!-- TMPL_VAR NAME="isbn" -->"><!-- TMPL_VAR NAME="isbn" --></abbr></p>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="issn" -->
<p><span class="label">ISSN:</span><!-- TMPL_VAR NAME="issn" --></p>
@ -140,6 +140,7 @@
</p>
<!-- TMPL_IF name="MARCURLS" -->
<p><span class="label">Online Resources:</span>
</p>
<ul> <!-- TMPL_LOOP name="MARCURLS" -->
<li><!-- TMPL_IF NAME="part" --><!-- TMPL_VAR NAME="part" -->
<br /><!-- /TMPL_IF -->
@ -147,7 +148,6 @@
<a href="<!-- TMPL_VAR NAME="MARCURL" -->"><!-- TMPL_VAR NAME="linktext" --></a>
<!-- TMPL_IF NAME="notes" --><ul><!-- TMPL_LOOP NAME="notes" --><li><!-- TMPL_VAR NAME="note" --></li><!-- /TMPL_LOOP --></ul><!-- /TMPL_IF --></li>
<!-- /TMPL_LOOP --></ul>
</p>
<!-- /TMPL_IF -->
</div>
</div>
@ -219,7 +219,7 @@
<li></li>
</ul>
<div id="holdings" class="tabs-container">
<div id="holdings">
<!-- TMPL_IF name="count" -->
<table>
<tr>
@ -272,7 +272,7 @@
<!-- /TMPL_IF -->
</div>
<div id="descriptions" class="tabs-container">
<div id="descriptions">
<!-- TMPL_IF NAME="AmazonContent" --><!-- TMPL_IF NAME="item_description" --><strong>Description (from Amazon.com):</strong><ul><li><!-- TMPL_VAR NAME="item_description" --></li></ul><!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF name="MARCNOTES" -->
<!-- TMPL_LOOP NAME="MARCNOTES" -->
@ -286,7 +286,7 @@
</div>
<!-- TMPL_IF name="subscriptionsnumber" -->
<div id="subscriptions" class="tabs-container">
<div id="subscriptions">
<h2>This is a serial subscription</h2>
<p> (There are <!-- TMPL_VAR name="subscriptionsnumber" --> subscriptions associated with this title).</p>
<!-- TMPL_LOOP Name="subscriptions" -->
@ -334,7 +334,7 @@
<!-- TMPL_IF NAME="reviewson" -->
<div id="comments" class="tabs-container">
<div id="comments">
<!-- TMPL_IF NAME="reviews" -->
<!--TMPL_LOOP NAME="reviews"-->
<h5>
@ -364,7 +364,7 @@
</div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="OPACFRBRizeEditions" --><div id="editions" class="tabs-container">
<!-- TMPL_IF NAME="OPACFRBRizeEditions" --><div id="editions">
<h2>Other Editions of this Work</h2>
<!-- TMPL_IF NAME="XISBNS" -->
@ -388,7 +388,7 @@
<!-- TMPL_IF NAME="AmazonContent" -->
<!-- Amazon Reviews -->
<div id="amazonreviews" class="tabs-container">
<div id="amazonreviews">
<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
<!-- TMPL_IF NAME="isbn" -->
@ -444,7 +444,6 @@ title="<!-- TMPL_VAR NAME="itype" -->" /><!-- /TMPL_IF -->
</div>
</div>
</div>
</div>
<!-- TMPL_IF NAME="OpacNav" --><div class="yui-b"><!--TMPL_INCLUDE NAME="navigation.inc" --></div><!-- /TMPL_IF -->

View File

@ -6,9 +6,10 @@
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
$('#opac-user-views').tabs();
});
$(function() {
$('#opac-user-views > ul').tabs();
});
//]]>
</script>
</head>
@ -21,7 +22,7 @@
<div class="yui-b"><div class="yui-g">
<!-- TMPL_LOOP NAME="BORROWER_INFO" -->
<h2>Hello, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-logout.pl">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
<h2>Hello, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
<!-- TMPL_IF NAME="patronupdate" --><div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div><!-- /TMPL_IF -->
@ -56,9 +57,8 @@
<!-- FINES BOX -->
<!-- TMPL_IF NAME="amountoverfive" -->
<div id="opac-user-fines">
<div id="opac-user-fines"> <h3>Fines and Charges</h3>
<table>
<caption>Fines and Charges</caption>
<tr><th colspan="2">Amount</th></tr>
<tr>
<td>You currently owe fines and charges amounting to:</td>
@ -76,7 +76,7 @@
</table></div>
<!-- /TMPL_IF -->
<!-- TMPL_IF NAME"amountlessthanzero" -->
<!-- TMPL_IF NAME="amountlessthanzero" -->
<div id="opac-user-fines"> <h3>Credits</h3>
<table>
<tr><th colspan="2">Amount</th></tr>

View File

@ -43,4 +43,4 @@ my $biblionumber = $query->param('biblionumber');
if ($biblionumber and $borrowernumber) {
CancelReserve($biblionumber, '', $borrowernumber);
}
print $query->redirect("/cgi-bin/koha/opac-user.pl");
print $query->redirect("/cgi-bin/koha/opac-user.pl#opac-user-holds");