Remove unnecessary onload event
This commit is contained in:
parent
0e0b79b815
commit
6b3e3c2532
|
@ -36,11 +36,11 @@ class AdminerEditCalendar {
|
|||
if (ereg("date|time", $field["type"])) {
|
||||
$dateFormat = "changeYear: true, dateFormat: 'yy-mm-dd'"; //! yy-mm-dd regional
|
||||
$timeFormat = "showSecond: true, timeFormat: 'hh:mm:ss'";
|
||||
return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery(function () { jQuery('#fields-" . js_escape($field["field"]) . "')."
|
||||
return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery('#fields-" . js_escape($field["field"]) . "')."
|
||||
. ($field["type"] == "time" ? "timepicker({ $timeFormat })"
|
||||
: (ereg("time", $field["type"]) ? "datetimepicker({ $dateFormat, $timeFormat })"
|
||||
: "datepicker({ $dateFormat })"
|
||||
)) . "; });</script>";
|
||||
)) . ";</script>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,9 +55,7 @@ class AdminerWymeditor {
|
|||
$lang = ($lang == "zh" || $lang == "zh-tw" ? "zh_cn" : $lang);
|
||||
}
|
||||
return "<textarea$attrs id='fields-" . h($field["field"]) . "' rows='12' cols='50'>" . h($value) . "</textarea><script type='text/javascript'>
|
||||
jQuery(function () {
|
||||
jQuery('textarea[name*=\"_html\"]').wymeditor({ updateSelector: '#form [type=\"submit\"]', lang: '$lang'" . ($this->options ? ", $this->options" : "") . " });
|
||||
});
|
||||
jQuery('#fields-" . js_escape($field["field"]) . "').wymeditor({ updateSelector: '#form [type=\"submit\"]', lang: '$lang'" . ($this->options ? ", $this->options" : "") . " });
|
||||
</script>";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue