[Koha-patches] [PATCH] Bug 2266: Could not uncollapse a tag if you turn on advancedMARCeditor - Revised.

Garry Collum gcollum at gmail.com
Thu May 28 03:48:12 CEST 2009


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.
---
 koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css  |   10 +++++++++-
 .../prog/en/modules/cataloguing/addbiblio.tmpl     |    6 +++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
index 6e0a58c..b3904ee 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
+++ b/koha-tmpl/intranet-tmpl/prog/en/css/addbiblio.css
@@ -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;
@@ -115,4 +123,4 @@ div.subfield_line label {
 }
 #cataloguing_additem_newitem .input_marceditor {
 	width : auto;
-}
\ No newline at end of file
+}
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
index 0a3c92f..8da3204 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl
@@ -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" -->" />
-- 
1.5.6.5




More information about the Koha-patches mailing list