[open-ils-commits] r15067 - in trunk/Open-ILS/web: js/dojo/openils/widget js/ui/default/conify/global/action_trigger templates/default/conify/global/action_trigger (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 3 10:40:18 EST 2009
Author: erickson
Date: 2009-12-03 10:40:16 -0500 (Thu, 03 Dec 2009)
New Revision: 15067
Modified:
trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
trunk/Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js
trunk/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2
Log:
add some default event def granularities. when an override widget is defined, still try to set the value of the widget based on the object being edited
Modified: trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-12-03 15:02:09 UTC (rev 15066)
+++ trunk/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js 2009-12-03 15:40:16 UTC (rev 15067)
@@ -128,10 +128,14 @@
build : function(onload) {
+ if(this.widgetValue == null)
+ this.widgetValue = (this.fmObject) ? this.fmObject[this.idlField.name]() : null;
+
if(this.widget) {
// core widget provided for us, attach and move on
if(this.parentNode) // may already be in the "right" place
this.parentNode.appendChild(this.widget.domNode);
+ this._widgetLoaded();
return;
}
@@ -139,8 +143,6 @@
this.parentNode = dojo.create('div');
this.onload = onload;
- if(this.widgetValue == null)
- this.widgetValue = (this.fmObject) ? this.fmObject[this.idlField.name]() : null;
if(this.readOnly) {
dojo.require('dijit.layout.ContentPane');
Modified: trunk/Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js 2009-12-03 15:02:09 UTC (rev 15066)
+++ trunk/Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js 2009-12-03 15:40:16 UTC (rev 15067)
@@ -14,6 +14,8 @@
var eventDef = null;
function loadEventDef() {
+ eventDefGranularity.attr('value', null);
+ edGrid.overrideEditWidgets.granularity = eventDefGranularity;
edGrid.loadAll({order_by:{atevdef : 'hook'}});
openils.widget.Textarea.width = '600px';
openils.widget.Textarea.height = '600px';
Modified: trunk/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2 2009-12-03 15:02:09 UTC (rev 15066)
+++ trunk/Open-ILS/web/templates/default/conify/global/action_trigger/event_definition.tt2 2009-12-03 15:40:16 UTC (rev 15067)
@@ -3,7 +3,17 @@
<script src='[% ctx.media_prefix %]/js/ui/default/conify/global/action_trigger/event_definition.js'> </script>
<script>openils.Util.addOnLoad(loadEventDef)</script>
+<div class='hidden'>
+ <select dojoType='dijit.form.ComboBox' jsId='eventDefGranularity'>
+ <option value='hourly'>Hourly</option>
+ <option value='daily'>Daily</option>
+ <option value='weekly'>Weekly</option>
+ <option value='monthly'>Monthly</option>
+ <option value='yearly'>Yearly</option>
+ </select>
+</div>
+
<div dojoType="dijit.layout.TabContainer" style='height:100%;' jsId='eventDefTabs'>
<div dojoType="dijit.layout.ContentPane" title='Event Definitions' id='tab-atevdef'>
More information about the open-ils-commits
mailing list