[open-ils-commits] r17234 - trunk/Open-ILS/xul/staff_client/server/cat (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Aug 17 18:06:18 EDT 2010


Author: dbs
Date: 2010-08-17 18:06:12 -0400 (Tue, 17 Aug 2010)
New Revision: 17234

Modified:
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.css
   trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
Log:
Move to CSS-based styling of validated vs. unvalidated fields

This sets the stage for differentiating between validated fields that
match authority records, and validated fields with a controlling $0
subfield that match an authority record. This also gives sites a bit
of an easier entry point to customize their MARC editor - say, for example,
to support accessibility requirements if red vs. black doesn't satisfy
the needs of those who are colour-blind.


Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.css
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.css	2010-08-17 20:52:19 UTC (rev 17233)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.css	2010-08-17 22:06:12 UTC (rev 17234)
@@ -104,3 +104,6 @@
 }
 
 grid[name="-none-"] * label { color: black; }
+
+.marcValidated { color: black; }
+.marcUnvalidated { color: red; }

Modified: trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-08-17 20:52:19 UTC (rev 17233)
+++ trunk/Open-ILS/xul/staff_client/server/cat/marcedit.js	2010-08-17 22:06:12 UTC (rev 17234)
@@ -2250,10 +2250,12 @@
         // XXX If adt, etc should be validated separately from vxz, etc then move this up into the above for loop
         for (var j = 0; j < subfields.length; j++) {
             var sf = subfields[j];
-               if (!found) {
-                sf.childNodes[2].inputField.style.color = 'red';
+            if (!found) {
+                dojo.removeClass(sf.childNodes[2], 'marcValidated');
+                dojo.addClass(sf.childNodes[2], 'marcUnvalidated');
             } else {
-                sf.childNodes[2].inputField.style.color = 'black';
+                dojo.removeClass(sf.childNodes[2], 'marcUnvalidated');
+                dojo.addClass(sf.childNodes[2], 'marcValidated');
             }
         }
     }



More information about the open-ils-commits mailing list