]> git.joonet.de Git - adminer.git/commitdiff
Remove unnecessary onload event
authorJakub Vrana <jakub@vrana.cz>
Tue, 13 Sep 2011 00:24:22 +0000 (02:24 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 13 Sep 2011 00:24:22 +0000 (02:24 +0200)
plugins/edit-calendar.php
plugins/wymeditor.php

index 7b7430e9c3fbea65303522e1c6dc066ab618e980..47818c21f3b22ade351e7eb17dbcc8f6da166d99 100644 (file)
@@ -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>";
                }
        }
        
index 06dc02d205d3bb276db81d608247ad4a5e21b0f5..61ae50296749996e7707abe925b5389c64a35fc5 100644 (file)
@@ -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>";
                }
        }