LP#1205072 A/T granularity UI sane default, honors case
authorBill Erickson <berickxx@gmail.com>
Wed, 26 Nov 2014 19:31:41 +0000 (14:31 -0500)
committerDan Wells <dbw2@calvin.edu>
Mon, 2 Mar 2015 21:54:43 +0000 (16:54 -0500)
Present A/T granularity options as untranslated, lower-case strings to
match the crontab examples.  Also, honor alternate case variations for
granularity values so that "Daily" and "daily" are both seprate, valid
options.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/templates/conify/global/action_trigger/event_definition.tt2
Open-ILS/web/js/ui/default/conify/global/action_trigger/event_definition.js

index 43dfaf8..64e61c5 100644 (file)
@@ -5,11 +5,13 @@
 
 <div class='hidden'>
     <select dojoType='dijit.form.ComboBox' jsId='eventDefGranularity'>
-        <option value='hourly'>[% l('Hourly') %]</option>
-        <option value='daily'>[% l('Daily') %]</option>
-        <option value='weekly'>[% l('Weekly') %]</option>
-        <option value='monthly'>[% l('Monthly') %]</option>
-        <option value='yearly'>[% l('Yearly') %]</option>
+        <!-- Option strings are intentionally 
+             un-translated since they are codes, not labels.  -->
+        <option>hourly</option>
+        <option>daily</option>
+        <option>weekly</option>
+        <option>monthly</option>
+        <option>yearly</option>
     </select>
 </div>
 
index 51b7da9..1100da4 100644 (file)
@@ -15,6 +15,7 @@ var eventDef = null;
 
 function loadEventDef() { 
     eventDefGranularity.attr('value', null);
+    eventDefGranularity.ignoreCase = false;
     edGrid.overrideEditWidgets.granularity = eventDefGranularity;
     edGrid.overrideEditWidgets.granularity.shove = {"create": ""};
     edGrid.loadAll({order_by:{atevdef : 'name, owner, hook, reactor, delay'}});