1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 08:06:59 +02:00

Improve message for saving by AJAX

This commit is contained in:
Jakub Vrana
2013-12-19 12:44:15 -08:00
parent e71e4ccb4c
commit abbacd4377
4 changed files with 5 additions and 4 deletions

View File

@@ -177,7 +177,7 @@ if ($fields) {
echo "<input type='submit' value='" . lang('Save') . "'>\n"; echo "<input type='submit' value='" . lang('Save') . "'>\n";
if (!isset($_GET["select"])) { if (!isset($_GET["select"])) {
echo "<input type='submit' name='insert' value='" . ($update echo "<input type='submit' name='insert' value='" . ($update
? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Loading') . '", this)' ? lang('Save and continue edit') . "' onclick='return !ajaxForm(this.form, \"" . lang('Saving') . '...", this)'
: lang('Save and insert next') : lang('Save and insert next')
) . "' title='Ctrl+Shift+Enter'>\n"; ) . "' title='Ctrl+Shift+Enter'>\n";
} }

View File

@@ -262,6 +262,7 @@ $translations = array(
'Edit' => 'Upravit', 'Edit' => 'Upravit',
'Insert' => 'Vložit', 'Insert' => 'Vložit',
'Save' => 'Uložit', 'Save' => 'Uložit',
'Saving' => 'Ukládá se',
'Save and continue edit' => 'Uložit a pokračovat v editaci', 'Save and continue edit' => 'Uložit a pokračovat v editaci',
'Save and insert next' => 'Uložit a vložit další', 'Save and insert next' => 'Uložit a vložit další',
'Selected' => 'Označené', 'Selected' => 'Označené',

View File

@@ -457,7 +457,7 @@ if (!$columns && support("table")) {
); );
} }
echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit echo (($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit
? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '\');">' . lang('Load more data') . '</a>' ? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '...\');">' . lang('Load more data') . '</a>'
: '' : ''
); );
} else { } else {

View File

@@ -525,7 +525,7 @@ function ajaxForm(form, message, button) {
} }
data = data.join('&'); data = data.join('&');
setHtml('message', message); setHtml('message', '<div class="message">' + message + '</div>');
var url = form.action; var url = form.action;
if (!/post/i.test(form.method)) { if (!/post/i.test(form.method)) {
url = url.replace(/\?.*/, '') + '?' + data; url = url.replace(/\?.*/, '') + '?' + data;
@@ -615,8 +615,8 @@ function selectClick(td, event, text, warning) {
/** Load and display next page in select /** Load and display next page in select
* @param HTMLLinkElement * @param HTMLLinkElement
* @param string
* @param number * @param number
* @param string
* @return boolean * @return boolean
*/ */
function selectLoadMore(a, limit, loading) { function selectLoadMore(a, limit, loading) {