bug #2780356 [calendar] Null checkbox not unchecked when date is chosen
This commit is contained in:
@@ -62,6 +62,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
||||
- patch #2739001 [export] XML does not allow spaces in element names,
|
||||
thanks to Derek Schaefer - drummingds1
|
||||
- bug #2780722 [import] Incorrect maximum file size
|
||||
- bug #2780356 [calendar] Null checkbox not unchecked when date is chosen
|
||||
|
||||
3.1.4.0 (2009-04-25)
|
||||
+ patch #1808339 [doc] Apache SSLOptions and StdEnvVars FAQ,
|
||||
|
@@ -90,13 +90,17 @@ var clock_set = 0;
|
||||
*
|
||||
* @param string calendar.php parameters
|
||||
* @param string form name
|
||||
* @param string field name
|
||||
* @param string id of field name
|
||||
* @param string edit type - date/timestamp
|
||||
* @param string id of the corresponding checkbox for NULL
|
||||
*/
|
||||
function openCalendar(params, form, field, type) {
|
||||
function openCalendar(params, form, field, type, fieldNull) {
|
||||
window.open("./calendar.php?" + params, "calendar", "width=400,height=200,status=yes");
|
||||
dateField = eval("document." + form + "." + field);
|
||||
dateType = type;
|
||||
if (fieldNull != '') {
|
||||
dateFieldNull = eval("document." + form + "." + fieldNull);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -345,5 +349,8 @@ function returnDate(d) {
|
||||
}
|
||||
|
||||
window.opener.dateField.value = txt;
|
||||
if (typeof(window.opener.dateFieldNull) != 'undefined') {
|
||||
window.opener.dateFieldNull.checked = false;
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
|
@@ -1051,11 +1051,13 @@ foreach ($rows as $row_id => $vrow) {
|
||||
<?php
|
||||
}
|
||||
if ($field['pma_type'] == 'date' || $field['pma_type'] == 'datetime' || substr($field['pma_type'], 0, 9) == 'timestamp') {
|
||||
// the _3 suffix points to the date field
|
||||
// the _2 suffix points to the corresponding NULL checkbox
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write('<a title="<?php echo $strCalendar;?>"');
|
||||
document.write(' href="javascript:openCalendar(\'<?php echo PMA_generate_common_url();?>\', \'insertForm\', \'field_<?php echo ($idindex); ?>_3\', \'<?php echo (substr($field['pma_type'], 0, 9) == 'timestamp') ? 'datetime' : substr($field['pma_type'], 0, 9); ?>\')">');
|
||||
document.write(' href="javascript:openCalendar(\'<?php echo PMA_generate_common_url();?>\', \'insertForm\', \'field_<?php echo ($idindex); ?>_3\', \'<?php echo (substr($field['pma_type'], 0, 9) == 'timestamp') ? 'datetime' : substr($field['pma_type'], 0, 9); ?>\', \'field_<?php echo ($idindex); ?>_2\')">');
|
||||
document.write('<img class="calendar"');
|
||||
document.write(' src="<?php echo $pmaThemeImage; ?>b_calendar.png"');
|
||||
document.write(' alt="<?php echo $strCalendar; ?>"/></a>');
|
||||
|
@@ -233,7 +233,7 @@ while (list($operator) = each($GLOBALS['cfg']['UnaryOperators'])) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
document.write('<a title="<?php echo $strCalendar;?>" href="javascript:openCalendar(\'<?php echo PMA_generate_common_url();?>\', \'insertForm\', \'field_<?php echo ($i); ?>\', \'<?php echo (substr($type, 0, 9) == 'timestamp') ? 'datetime' : substr($type, 0, 9); ?>\')"><img class="calendar" src="<?php echo $pmaThemeImage; ?>b_calendar.png" alt="<?php echo $strCalendar; ?>"/></a>');
|
||||
document.write('<a title="<?php echo $strCalendar;?>" href="javascript:openCalendar(\'<?php echo PMA_generate_common_url();?>\', \'insertForm\', \'field_<?php echo ($i); ?>\', \'<?php echo (substr($type, 0, 9) == 'timestamp') ? 'datetime' : substr($type, 0, 9); ?>\', \'\')"><img class="calendar" src="<?php echo $pmaThemeImage; ?>b_calendar.png" alt="<?php echo $strCalendar; ?>"/></a>');
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
|
Reference in New Issue
Block a user