Bug 2266: Could not uncollapse a tag if you turn on advancedMARCeditor - Revised.
authorGarry Collum <gcollum@gmail.com>
Thu, 28 May 2009 01:48:12 +0000 (21:48 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:18:59 +0000 (23:18 +0200)
Added javascript and if/else logic to the addbiblio.tmpl and a corresponding anchor tag in CSS.
If advancedMARCeditor is on, the user now clicks on the tag number to expand the marc fields.
If advancedMARCeditor is off, no functionality has changed.  The user clicks on the marc tag's title to expand the marc fields.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl

index 6e0a58c..54a4a5c 100644 (file)
@@ -76,6 +76,14 @@ div.subfield_line label {
        padding : .1em .3em .1em 0;
 }
 
+a.tagnum {
+       font-size : 110%;
+       font-weight : bold;
+       color : #000;
+       padding : .1em .3em .1em 0;
+       text-decoration : none;
+}
+
 .subfield {
        color : #00698a;
        float: left;
index 0a3c92f..8da3204 100644 (file)
@@ -642,7 +642,11 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ?
        <div class="tag" id="tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
         <div class="tag_title" id="div_indicator_tag_<!-- TMPL_VAR name="tag"-->_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->">
             <!-- TMPL_UNLESS name="hide_marc" -->
-                <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
+               <!-- TMPL_IF NAME="advancedMARCEditor" -->
+               <a href="#" tabindex="1" class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib"--> - Click to Expand this Tag" onclick="ExpandField('tag_<!-- TMPL_VAR NAME="tag"-->_<!-- TMPL_VAR NAME='index' --><!-- TMPL_VAR NAME="random" -->'); return false;"><!-- TMPL_VAR NAME="tag" --></a>
+               <!-- TMPL_ELSE -->
+                       <span class="tagnum" title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></span>
+               <!-- /TMPL_IF -->
                 <!-- TMPL_IF NAME="fixedfield" -->
                        <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator1_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="1" maxlength="1" value="<!-- TMPL_VAR NAME="indicator1" -->" />
                        <input tabindex="1" class="indicator flat" type="text" style="display:none;" name="tag_<!-- TMPL_VAR NAME="tag" -->_indicator2_<!-- TMPL_VAR NAME='index'--><!-- TMPL_VAR name="random" -->" size="1" maxlength="1" value="<!-- TMPL_VAR NAME="indicator2" -->" />