From e1c0ab8f58c3d4a18efc8aaa29d701c10d9b0d47 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Aug 2011 13:25:45 -0400 Subject: [PATCH] Fix for Bug 6674 - Collapse display of patron address by default Content-Type: text/plain; charset="utf-8" This patch takes the feature implemented in the original patch for Bug 5436 and reimplements it in a slightly more abstracted way. The JavaScript can now be applied to any pair of elements like this: a block with class "collapsed" followed by a link with class "togglecollapse." In the circ-menu include, both the address info block and the link to show/hide it have unique ids ("contact" and "showcontact" respectively) so that IntranetUserCSS can be used to force them to show: #contact { display : block; } #showcontact { display : none; } --- .../intranet-tmpl/prog/en/css/staff-global.css | 33 +++++++++++++++++++- .../intranet-tmpl/prog/en/includes/circ-menu.inc | 14 +++++--- koha-tmpl/intranet-tmpl/prog/en/js/staff-global.js | 11 ++++++ .../intranet-tmpl/prog/img/more-right-arrow.gif | Bin 0 -> 81 bytes 4 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/img/more-right-arrow.gif diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index 3c5d257..635c8e7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -483,7 +483,7 @@ div.patroninfo ul { border-right : 1px solid #000; border-bottom : 0; border-top : 0; - padding : 0; + padding : .5em 0; margin : 0; } @@ -495,6 +495,19 @@ div.patroninfo ul li, div.patronviews ul li { list-style-type : none; } +#patronimage { + border-right : 1px solid #000; +} + +#patronimage img { + max-width : 140px; + margin: .3em 0 .3em .3em; + padding: .2em; + border: 1px solid #CCCCCC; + width:auto !important; + width:130px; +} + div.patronviews { border-right : 1px solid #000; border-top : 1px solid #000; @@ -1953,6 +1966,24 @@ ul.budget_hierarchy li:last-child:after { ul.budget_hierarchy li:first-child:after { content: ""; } +.collapse { + display : none; +} +.togglecollapse { + border-right : 1px solid #000; + font-size: 85%; + display: block; + padding: .2em .2em .2em 15px; + margin: 0; + cursor: pointer; +} +.toggleclosed { + background: #eee url(../../img/more-right-arrow.gif) 0 50% no-repeat; +} +.toggleopen { + background: #eee url(../../img/more-up-arrow.gif) 0 50% no-repeat; +} + .holdcount { font-size : 105%; line-height : 200%; } .holdcount a { border : 1px solid #a4bedd; background-color : #e4ecf5; font-weight : bold; -moz-border-radius: 4px; padding : .1em .4em; text-decoration : none; } .holdcount a:hover { background-color : #ebeff7; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 129bd66..947427c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -4,14 +4,14 @@ - +