tweak to item attribute editor to support hiding of fields with cat_custom.css
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 4 Aug 2010 19:56:26 +0000 (19:56 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 4 Aug 2010 19:56:26 +0000 (19:56 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17078 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/cat/copy_editor.js
Open-ILS/xul/staff_client/server/cat/copy_editor.xul
Open-ILS/xul/staff_client/server/skin/cat.css
Open-ILS/xul/staff_client/server/skin/global.css

index 560389f..5a1e780 100644 (file)
@@ -1057,8 +1057,8 @@ g.render = function() {
                 }
                 if (typeof g.changed[fn] != 'undefined') groupbox.setAttribute('class','copy_editor_field_changed');
                 caption = document.createElement('caption'); groupbox.appendChild(caption);
-                caption.setAttribute('label',fn); caption.setAttribute('id','caption_'+fn);
-                vbox = document.createElement('vbox'); groupbox.appendChild(vbox);
+                caption.setAttribute('label',fn); 
+                vbox = document.createElement('vbox'); groupbox.appendChild(vbox); // main display widget goes here
                 grid = util.widgets.make_grid( [ { 'flex' : 1 }, {}, {} ] ); vbox.appendChild(grid);
                 grid.setAttribute('flex','1');
                 rows = grid.lastChild;
@@ -1085,10 +1085,11 @@ g.render = function() {
                     }
                     label2.appendChild( document.createTextNode(copy_count) );
                 }
-                var hbox = document.createElement('hbox'); 
-                hbox.setAttribute('id',fn);
+                groupbox.setAttribute('id','groupbox_'+fn); // this id is meant to be referenced by cat_custom.css for hiding fields
+                var hbox = document.createElement('hbox'); // main input controls go here
+                hbox.setAttribute('id',fn); // this id gets used to color areas green, etc.
                 groupbox.appendChild(hbox);
-                var hbox2 = document.createElement('hbox');
+                var hbox2 = document.createElement('hbox'); // cancel/apply buttons go here
                 groupbox.appendChild(hbox2);
 
                 /**************************************************************************************/
index 4117fda..c58a9ef 100644 (file)
@@ -6,6 +6,7 @@
 <!-- STYLESHEETS -->
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
+<?xml-stylesheet href="/xul/server/skin/cat.css" type="text/css"?>
 
 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
 <!-- LOCALIZATION -->
index ab922f2..13aedb2 100644 (file)
@@ -4,3 +4,6 @@
 @namespace html url("http://www.w3.org/TR/REC-html40"); 
 
 .has_copies { color: black; background-color: lightgreen; font-weight: bold; }
+
+.copy_editor_field_changed { background: lightgreen; }
+
index 519cc60..88361de 100644 (file)
@@ -111,8 +111,6 @@ iframe { background: #CDCED3 url("chrome://browser/skin/icons/box-background.png
 
 listitem { border-bottom: solid thin black; }
 
-.copy_editor_field_changed { background: lightgreen; }
-
 /*
  * disable Edit Hold Range and Edit Hold Focus by default; should probably be using perms/settings for this
  */