diff --git a/plugins/email-table.php b/plugins/email-table.php index ef2f2760..9be0d30a 100644 --- a/plugins/email-table.php +++ b/plugins/email-table.php @@ -28,12 +28,19 @@ class AdminerEmailTable { function selectEmailPrint($emailFields, $columns) { if ($emailFields) { print_fieldset("email", ('E-mail')); - echo "
\n"; + echo "
\n"; + echo script("qsl('div').onkeydown = partial(bodyKeydown, 'email');"); echo "

" . ('From') . ": \n"; echo ('Subject') . ": \n"; - echo "

" . ('Attachments') . ": "; + echo "

" . ('Attachments') . ": "; + echo script("qsl('input').onchange = function () { + this.onchange = function () { }; + var el = this.cloneNode(true); + el.value = ''; + this.parentNode.appendChild(el); +};"); echo "

" . (count($emailFields) == 1 ? '' : html_select("email_field", $emailFields)); - echo "\n"; + echo "" . confirm(); echo "

\n"; echo "
\n"; return true; diff --git a/plugins/slugify.php b/plugins/slugify.php index a390dcc5..fa7d9f56 100644 --- a/plugins/slugify.php +++ b/plugins/slugify.php @@ -34,7 +34,16 @@ class AdminerSlugify { } $slug = $slugify[$field["field"]]; if ($slug !== null) { - return ""; + return "" + . script("qsl('input').onchange = function () { + var find = '$this->from'; + var repl = '$this->to'; + this.form['fields[$slug]'].value = this.value.toLowerCase() + .replace(new RegExp('[' + find + ']', 'g'), function (str) { return repl[find.indexOf(str)]; }) + .replace(/[^a-z0-9_]+/g, '-') + .replace(/^-|-\$/g, '') + .substr(0, $field[length]); +};"); } } } diff --git a/plugins/tables-filter.php b/plugins/tables-filter.php index 37cb9b19..773d4d96 100644 --- a/plugins/tables-filter.php +++ b/plugins/tables-filter.php @@ -8,9 +8,10 @@ */ class AdminerTablesFilter { function tablesPrint($tables) { ?> -

-