default to empty ccvm grid; added crad selector attr and crad/ccvm required attrs...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Mar 2011 16:03:14 +0000 (16:03 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Mar 2011 16:03:14 +0000 (16:03 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19611 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/examples/fm_IDL.xml
Open-ILS/web/templates/default/conify/global/config/coded_value_map.tt2

index 49d8a04..4b83156 100644 (file)
@@ -573,8 +573,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
        <class id="crad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::record_attr_definition" oils_persist:tablename="config.record_attr_definition" reporter:label="SVF Record Attribute Defintion" oils_persist:field_safe="true">
                <fields oils_persist:primary="name">
-                       <field reporter:label="Name" name="name" reporter:datatype="id"/>
-                       <field reporter:label="Label" name="label" reporter:datatype="text"/>
+                       <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
+                       <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
                        <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
                        <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
                        <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
@@ -626,10 +626,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
        <class id="ccvm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::coded_value_map" oils_persist:tablename="config.coded_value_map" reporter:label="SVF Record Attribute Coded Value Map" oils_persist:field_safe="true">
                <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
-                       <field reporter:label="ID" name="id" reporter:datatype="id"/>
-                       <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"/>
-                       <field reporter:label="Code" name="code" reporter:datatype="text"/>
-                       <field reporter:label="Value" name="value" reporter:datatype="text"/>
+                       <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
+                       <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
+                       <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
+                       <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
                        <field reporter:label="Description" name="description" reporter:datatype="text"/>
                </fields>
                <links>
index 269a3be..592e539 100644 (file)
@@ -31,7 +31,6 @@
     dojo.require('openils.widget.AutoGrid');
     dojo.require('openils.widget.AutoFieldWidget');
 
-    var firstRun = true;
     openils.Util.addOnLoad(
         function() {
 
                         function(newVal) {
                             ccvmGrid.resetStore();
                             ccvmGrid.loadAll({order_by : {ccvm : 'code'}}, {ctype : newVal});
+                            ccvmGrid.overrideWidgetArgs.ctype = {dijitArgs : {value : newVal}};
+                            // ^-- why is this not working?
                         }
                     );
-                    // start with something arbitrary that has some data
-                    w.attr('value', 'audience'); 
                 }
             );
+
+            // hide the progress indicator since we're not loading any data up front
+            dojo.style(ccvmGrid.loadProgressIndicator, 'visibility', 'hidden');
         }
     );