| 60 | | //Manage date entry section, but only if is defined |
| 61 | | if (dojo.byId(ambra.advsearch.Config.idPubDateOptions) != null) { |
| 62 | | var slct = dojo.byId(ambra.advsearch.Config.idPublishDate); |
| 63 | | var showDates = (slct.options[slct.selectedIndex].value == 'range'); |
| 64 | | dojo.byId(ambra.advsearch.Config.idPubDateOptions).style.display = showDates ? '' : 'none'; |
| 65 | | dojo.connect(dojo.byId(ambra.advsearch.Config.idPublishDate), "onchange", ambra.advsearch.onChangePublishDate); |
| 66 | | |
| 67 | | // date part comment cue event bindings... |
| 68 | | dojo.connect(dojo.byId('startDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); |
| 69 | | dojo.connect(dojo.byId('endDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); |
| 70 | | } |
| | 60 | // dates section... |
| | 61 | var slct = dojo.byId(ambra.advsearch.Config.idPublishDate); |
| | 62 | var showDates = (slct.options[slct.selectedIndex].value == 'range'); |
| | 63 | dojo.byId(ambra.advsearch.Config.idPubDateOptions).style.display = showDates ? '' : 'none'; |
| | 64 | dojo.connect(dojo.byId(ambra.advsearch.Config.idPublishDate), "onchange", ambra.advsearch.onChangePublishDate); |
| | 65 | |
| | 66 | // date part comment cue event bindings... |
| | 67 | dojo.connect(dojo.byId('startDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); |
| | 68 | dojo.connect(dojo.byId('endDateId'), "onfocus", ambra.advsearch.onFocusCommentCueInputHandler); |
| | 69 | |
| 91 | | //Prime the startDate and endDate pop-up calendars only if they are defined |
| 92 | | if (dojo.byId(ambra.advsearch.Config.idPubDateOptions) != null) { |
| 93 | | Calendar.setup({ |
| 94 | | inputField : "startDateId", // id of the input field |
| 95 | | ifFormat : "%Y-%m-%d", // format of the input field |
| 96 | | step : 1 // show all years in drop-down boxes (instead of every other year as default) |
| 97 | | }); |
| 98 | | Calendar.setup({ |
| 99 | | inputField : "endDateId", // id of the input field |
| 100 | | ifFormat : "%Y-%m-%d", // format of the input field |
| 101 | | step : 1 // show all years in drop-down boxes (instead of every other year as default) |
| 102 | | }); |
| 103 | | } |
| | 90 | // Prime the startDate and endDate pop-up calendars... |
| | 91 | Calendar.setup({ |
| | 92 | inputField : "startDateId", // id of the input field |
| | 93 | ifFormat : "%Y-%m-%d", // format of the input field |
| | 94 | step : 1 // show all years in drop-down boxes (instead of every other year as default) |
| | 95 | }); |
| | 96 | Calendar.setup({ |
| | 97 | inputField : "endDateId", // id of the input field |
| | 98 | ifFormat : "%Y-%m-%d", // format of the input field |
| | 99 | step : 1 // show all years in drop-down boxes (instead of every other year as default) |
| | 100 | }); |