replace Checkin Effective Date textbox with datepicker for popup-calendar
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Sep 2009 17:30:03 +0000 (17:30 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Sep 2009 17:30:03 +0000 (17:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14052 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/circ/checkin.js
Open-ILS/xul/staff_client/server/circ/checkin_overlay.xul

index 4a84d66..d1f487b 100644 (file)
@@ -183,15 +183,15 @@ circ.checkin.prototype = {
                                                ['render'],
                                                function(e) {
                                                        return function() {
-                                                               obj.controller.view.checkin_effective_date_textbox.value =
+                                                               obj.controller.view.checkin_effective_datepicker.value =
                                                                        util.date.formatted_date(new Date(),'%F');
                                                        };
                                                }
                                        ],
-                                       'checkin_effective_date_textbox' : [
+                                       'checkin_effective_datepicker' : [
                                                ['change'],
                                                function(ev) {
-                                                       if (ev.target.nodeName == 'textbox') {
+                                                       if (ev.target.nodeName == 'datepicker') {
                                                                try {
                                                                        var flag = false;
                                                                        var darray = ev.target.value.split('-');
@@ -296,7 +296,7 @@ circ.checkin.prototype = {
                        if (barcode) {
                                if ( obj.test_barcode(barcode) ) { /* good */ } else { /* bad */ return; }
                        }
-                       var backdate = obj.controller.view.checkin_effective_date_textbox.value;
+                       var backdate = obj.controller.view.checkin_effective_datepicker.value;
                        var auto_print = document.getElementById('checkin_auto');
                        if (auto_print) auto_print = auto_print.checked;
                        JSAN.use('circ.util');
index 743faae..8cd3527 100644 (file)
@@ -72,8 +72,8 @@
        <vbox>
                <hbox>
                        <hbox id="checkin_effective_date_hbox">
-                               <label id="checkin_effective_date_label" value="&staff.circ.checkin_overlay.effective_date.label;" control="checkin_effective_date_textbox" accesskey="&staff.circ.checkin_overlay.effective_date.accesskey;"/>
-                               <textbox id="checkin_effective_date_textbox" context="clipboard"/>
+                               <label id="checkin_effective_date_label" value="&staff.circ.checkin_overlay.effective_date.label;" control="checkin_effective_datepicker" accesskey="&staff.circ.checkin_overlay.effective_date.accesskey;"/>
+                               <datepicker id="checkin_effective_datepicker" type="popup" context="clipboard"/>
                        </hbox>
                        <menubar>
                        <menu label="&staff.circ.checkin_overlay.actions.label;" accesskey="&staff.circ.checkin_overlay.actions.accesskey;">