[open-ils-commits] r9173 - in branches/dojo-admin/Open-ILS/web/conify: global/actor js/fieldmapper

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 1 08:35:13 EDT 2008


Author: miker
Date: 2008-04-01 07:59:05 -0400 (Tue, 01 Apr 2008)
New Revision: 9173

Modified:
   branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.html
   branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.js
   branches/dojo-admin/Open-ILS/web/conify/js/fieldmapper/dojoData.js
Log:
now org_unit is happy

Modified: branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.html
===================================================================
--- branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.html	2008-04-01 06:25:45 UTC (rev 9172)
+++ branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.html	2008-04-01 11:59:05 UTC (rev 9173)
@@ -60,7 +60,7 @@
 		
 					pCRUD.request({
 						method : 'open-ils.permacrud.search.aou.atomic',
-						timeout : 10,
+						timeout : 15,
 						params : [ ses, { id : { "!=" : null } }, { order_by : { aou : 'shortname' } } ],
 						onerror : function (r) { throw 'Problem fetching org units';},
 						oncomplete : function (r) {
@@ -104,7 +104,7 @@
                     pCRUD.request({
                         method : 'open-ils.permacrud.search.aout.atomic',
                         timeout : 10,
-                        params : [ ses, { id : { "!=" : null } }, { order_by : { aout : 'name' } } ],
+                        params : [ ses, { id : { "!=" : null } }, { order_by : { aout : 'depth' } } ],
                         onerror : function (r) { status_update('Problem fetching types') },
                         oncomplete : function (r) {
                             window._ou_type_list = r.recv().content();
@@ -113,6 +113,22 @@
                         }
                     }).send();
 
+					highlighter.ou_tree = {};
+					highlighter.editor_pane = {};
+					highlighter.hoo_pane = {};
+					highlighter.addresses_pane = {};
+
+					highlighter.ou_tree.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'ou_tree', duration : 500 } );
+					highlighter.ou_tree.red = dojox.fx.highlight( { color : '#FF2018', node : 'ou_tree', duration : 500 } );
+
+					highlighter.editor_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'editor_pane', duration : 500 } );
+					highlighter.editor_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'editor_pane', duration : 500 } );
+
+					highlighter.hoo_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'hoo_pane', duration : 500 } );
+					highlighter.hoo_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'hoo_pane', duration : 500 } );
+
+					highlighter.addresses_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'addresses_pane', duration : 500 } );
+					highlighter.addresses_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'addresses_pane', duration : 500 } );
 				</script>
 				<div
 				  id="ou_tree"
@@ -186,21 +202,7 @@
 				<div id="right_tabpane" dojoType="dijit.layout.TabContainer">
 	
 					<div id="editor_pane" dojoType="dijit.layout.ContentPane" title="Main Settings">
-						<script type="dojo/method">
-							highlighter.ou_tree = {};
-							highlighter.editor_pane = {};
-							highlighter.hoo_pane = {};
-							highlighter.addresses_pane = {};
-							highlighter.ou_tree.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'ou_tree', duration : 500 } );
-							highlighter.ou_tree.red = dojox.fx.highlight( { color : '#FF2018', node : 'ou_tree', duration : 500 } );
-							highlighter.editor_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'editor_pane', duration : 500 } );
-							highlighter.editor_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'editor_pane', duration : 500 } );
-							highlighter.hoo_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'hoo_pane', duration : 500 } );
-							highlighter.hoo_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'hoo_pane', duration : 500 } );
-							highlighter.addresses_pane.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'addresses_pane', duration : 500 } );
-							highlighter.addresses_pane.red = dojox.fx.highlight( { color : '#FF2018', node : 'addresses_pane', duration : 500 } );
-						</script>
-	
+
 						<table class="tundra" style="margin:10px;">
 							<tr>
 								<th>Org Unit Name</th>
@@ -437,38 +439,38 @@
 						<table class="tundra" style="margin:10px;">
 							<tr><th/><th>Open time</th><th>Close time</th></tr>
 							<tr><th>Monday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_0_open" onChange="current_ou_hoo.dow_0_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_0_close" onChange="current_ou_hoo.dow_0_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_0_open" onChange="current_ou_hoo.dow_0_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_0_close" onChange="current_ou_hoo.dow_0_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_0_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_0_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Tuesday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_1_open" onChange="current_ou_hoo.dow_1_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_1_close" onChange="current_ou_hoo.dow_1_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_1_open" onChange="current_ou_hoo.dow_1_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_1_close" onChange="current_ou_hoo.dow_1_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_1_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_1_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Wednesday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_2_open" onChange="current_ou_hoo.dow_2_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_2_close" onChange="current_ou_hoo.dow_2_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_2_open" onChange="current_ou_hoo.dow_2_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_2_close" onChange="current_ou_hoo.dow_2_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_2_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_2_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Thursday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_3_open" onChange="current_ou_hoo.dow_3_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_3_close" onChange="current_ou_hoo.dow_3_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_3_open" onChange="current_ou_hoo.dow_3_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_3_close" onChange="current_ou_hoo.dow_3_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_3_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_3_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Friday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_4_open" onChange="current_ou_hoo.dow_4_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_4_close" onChange="current_ou_hoo.dow_4_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_4_open" onChange="current_ou_hoo.dow_4_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_4_close" onChange="current_ou_hoo.dow_4_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_4_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_4_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Saturday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_5_open" onChange="current_ou_hoo.dow_5_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_5_close" onChange="current_ou_hoo.dow_5_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_5_open" onChange="current_ou_hoo.dow_5_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_5_close" onChange="current_ou_hoo.dow_5_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_5_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_5_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 							<tr><th>Sunday</th>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_6_open" onChange="current_ou_hoo.dow_6_open( this.getDisplayedValue() );"/></td>
-								<td><span dojoType="dijit.form.TimeTextBox" jsId="dow_6_close" onChange="current_ou_hoo.dow_6_close( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_6_open" onChange="current_ou_hoo.dow_6_open( this.getDisplayedValue() );"/></td>
+								<td><span dojoType="dijit.form.TimeTextBox" style="width:8em;" jsId="dow_6_close" onChange="current_ou_hoo.dow_6_close( this.getDisplayedValue() );"/></td>
 								<td><span dojoType="dijit.form.Button" label="Closed" onClick="dow_6_open.setValue( new Date('Tue Mar 25 2008 00:00:00') ); dow_6_close.setValue( new Date('Tue Mar 25 2008 00:00:00') );"/></td>
 							</tr>
 						</table>

Modified: branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.js
===================================================================
--- branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.js	2008-04-01 06:25:45 UTC (rev 9172)
+++ branches/dojo-admin/Open-ILS/web/conify/global/actor/org_unit.js	2008-04-01 11:59:05 UTC (rev 9173)
@@ -29,7 +29,7 @@
 var highlighter = {};
 
 function status_update (markup) {
-	if (parent.status_update) parent.status_update( markup );
+	if (parent !== window && parent.status_update) parent.status_update( markup );
 }
 
 function save_org () {

Modified: branches/dojo-admin/Open-ILS/web/conify/js/fieldmapper/dojoData.js
===================================================================
--- branches/dojo-admin/Open-ILS/web/conify/js/fieldmapper/dojoData.js	2008-04-01 06:25:45 UTC (rev 9172)
+++ branches/dojo-admin/Open-ILS/web/conify/js/fieldmapper/dojoData.js	2008-04-01 11:59:05 UTC (rev 9173)
@@ -22,6 +22,7 @@
 	function _toStoreData (list, label, params) {
 
 		if (!params) params = {};
+		if (!list) list = {};
 
 		// a sane default
 		if (!params.identifier) params.identifier = 'id';



More information about the open-ils-commits mailing list