Changeset 2680 for trunk/admin
- Timestamp:
- Oct 7, 2008, 9:18:55 PM (16 years ago)
- Location:
- trunk/admin/template/goto
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/template/goto/element_set_global.tpl
r2678 r2680 5 5 {literal} 6 6 <script type="text/javascript"> 7 pwg_initialization_datepicker(" select[name=date_creation_day]", "select[name=date_creation_month]", "input[name=date_creation_year]", "input[name=date_creation_linked_date]");7 pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); 8 8 </script> 9 9 {/literal} … … 146 146 <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label> 147 147 <label><input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}</label> 148 <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">148 <select id="date_creation_day" name="date_creation_day"> 149 149 <option value="0">--</option> 150 150 {section name=day start=1 loop=32} … … 152 152 {/section} 153 153 </select> 154 <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">154 <select id="date_creation_month" name="date_creation_month"> 155 155 {html_options options=$month_list selected=$DATE_CREATION_MONTH} 156 156 </select> 157 <input onchange="document.getElementById('date_creation_action_set').checked = true;"157 <input id="date_creation_year" 158 158 name="date_creation_year" 159 159 type="text" … … 161 161 maxlength="4" 162 162 value="{$DATE_CREATION_YEAR}" /> 163 <input name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"/>163 <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"/> 164 164 </td> 165 165 </tr> -
trunk/admin/template/goto/element_set_unit.tpl
r2674 r2680 55 55 <label><input type="radio" name="date_creation_action-{$element.ID}" value="set" id="date_creation_action_set-{$element.ID}" /> {'set to'|@translate}</label> 56 56 57 <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_day-{$element.ID}">57 <select id="date_creation_day-{$element.ID}" name="date_creation_day-{$element.ID}"> 58 58 <option value="0">--</option> 59 59 {section name=day start=1 loop=32} … … 61 61 {/section} 62 62 </select> 63 <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_month-{$element.ID}">63 <select id="date_creation_month-{$element.ID}" name="date_creation_month-{$element.ID}"> 64 64 {html_options options=$month_list selected=$element.DATE_CREATION_MONTH} 65 65 </select> 66 <input onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;"66 <input id="date_creation_year-{$element.ID}" 67 67 name="date_creation_year-{$element.ID}" 68 68 type="text" … … 70 70 maxlength="4" 71 71 value="{$element.DATE_CREATION_YEAR}" /> 72 <input name="date_creation_linked_date-{$element.ID}" type="hidden" size="10" disabled="disabled"/>72 <input id="date_creation_linked_date-{$element.ID}" name="date_creation_linked_date-{$element.ID}" type="hidden" size="10" disabled="disabled"/> 73 73 <script type="text/javascript"> 74 pwg_initialization_datepicker(" select[name=date_creation_day-{$element.ID}]", "select[name=date_creation_month-{$element.ID}]", "input[name=date_creation_year-{$element.ID}]", "input[name=date_creation_linked_date-{$element.ID}]");74 pwg_initialization_datepicker("#date_creation_day-{$element.ID}", "#date_creation_month-{$element.ID}", "#date_creation_year-{$element.ID}", "#date_creation_linked_date-{$element.ID}", "#date_creation_action_set-{$element.ID}"); 75 75 </script> 76 76 </td> -
trunk/admin/template/goto/history.tpl
r2632 r2680 5 5 {literal} 6 6 <script type="text/javascript"> 7 pwg_initialization_datepicker(" select[name=start_day]", "select[name=start_month]", "input[name=start_year]", "input[name=start_linked_date]", null, "input[name=end_linked_date]");8 pwg_initialization_datepicker(" select[name=end_day]", "select[name=end_month]", "input[name=end_year]", "input[name=end_linked_date]", "input[name=start_linked_date]", null);7 pwg_initialization_datepicker("#start_day", "#start_month", "#start_year", "#start_linked_date", null, null, "#end_linked_date"); 8 pwg_initialization_datepicker("#end_day", "#end_month", "#end_year", "#end_linked_date", null, "#start_linked_date", null); 9 9 </script> 10 10 {/literal} … … 20 20 <li><label>{'search_date_from'|@translate}</label></li> 21 21 <li> 22 <select name="start_day">22 <select id="start_day" name="start_day"> 23 23 <option value="0">--</option> 24 24 {section name=day start=1 loop=32} … … 26 26 {/section} 27 27 </select> 28 <select name="start_month">28 <select id="start_month" name="start_month"> 29 29 {html_options options=$month_list selected=$START_MONTH_SELECTED} 30 30 </select> 31 <input name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" >32 <input name="start_linked_date" type="hidden" size="10" disabled="disabled"/>31 <input id="start_year" name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" > 32 <input id="start_linked_date" name="start_linked_date" type="hidden" size="10" disabled="disabled"/> 33 33 </li> 34 34 </ul> … … 36 36 <li><label>{'search_date_to'|@translate}</label></li> 37 37 <li> 38 <select name="end_day">38 <select id="end_day" name="end_day"> 39 39 <option value="0">--</option> 40 40 {section name=day start=1 loop=32} … … 42 42 {/section} 43 43 </select> 44 <select name="end_month">44 <select id="end_month" name="end_month"> 45 45 {html_options options=$month_list selected=$END_MONTH_SELECTED} 46 46 </select> 47 <input name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" >48 <input name="end_linked_date" type="hidden" size="10" disabled="disabled"/>47 <input id="end_year" name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" > 48 <input id="end_linked_date" name="end_linked_date" type="hidden" size="10" disabled="disabled"/> 49 49 </li> 50 50 </ul> -
trunk/admin/template/goto/include/datepicker.inc.tpl
r2676 r2680 21 21 // day, month, year: selectors of visible date controls 22 22 // linked_date: selector of hidden linked dates control 23 // checked_on_change: selector of control to change "checked" attribut 23 24 // min_linked_date: selector of hidden linked date control witch give min value 24 25 // max_linked_date: selector of hidden linked date control witch give max value 25 function pwg_initialization_datepicker(day, month, year, linked_date, min_linked_date, max_linked_date)26 function pwg_initialization_datepicker(day, month, year, linked_date, checked_on_change, min_linked_date, max_linked_date) 26 27 { 28 // Action on change date value 29 function pwg_on_date_change() 30 { 31 pwg_check_date(); 32 if (checked_on_change != null) 33 { 34 $(checked_on_change).attr("checked", "true"); 35 } 36 } 37 27 38 // Prevent selection of invalid dates through the select controls 28 39 function pwg_check_date() … … 104 115 $(day).val(array_date[2]); 105 116 } 106 pwg_ check_date();117 pwg_on_date_change(); 107 118 }, 108 119 showOn: "both", … … 118 129 function () 119 130 { 120 pwg_ check_date();131 pwg_on_date_change(); 121 132 }); 122 133 123 134 // In order to desable element of list 135 // In order to init linked input 124 136 pwg_check_date(); 125 137 }); -
trunk/admin/template/goto/picture_modify.tpl
r2674 r2680 6 6 {literal} 7 7 <script type="text/javascript"> 8 pwg_initialization_datepicker(" select[name=date_creation_day]", "select[name=date_creation_month]", "input[name=date_creation_year]", "input[name=date_creation_linked_date]");8 pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set"); 9 9 </script> 10 10 {/literal} … … 97 97 <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label> 98 98 <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate} 99 <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">99 <select id="date_creation_day" name="date_creation_day"> 100 100 <option value="0">--</option> 101 101 {section name=day start=1 loop=32} … … 103 103 {/section} 104 104 </select> 105 <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">105 <select id="date_creation_month" name="date_creation_month"> 106 106 {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE} 107 107 </select> 108 <input onmousedown="document.getElementById('date_creation_action_set').checked = true;"108 <input id="date_creation_year" 109 109 name="date_creation_year" 110 110 type="text" … … 112 112 maxlength="4" 113 113 value="{$DATE_CREATION_YEAR_VALUE}" /> 114 <input name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"/>114 <input id="date_creation_linked_date" name="date_creation_linked_date" type="hidden" size="10" disabled="disabled"/> 115 115 </td> 116 116 </tr>
Note: See TracChangeset
for help on using the changeset viewer.