From 0614260544ddd02eb127a5c326890c00ea9b4a1b Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 4 Oct 2012 00:17:17 -0700 Subject: [PATCH] Edit values by Ctrl+click instead of double click --- adminer/lang/ar.inc.php | 1 - adminer/lang/bn.inc.php | 1 - adminer/lang/ca.inc.php | 2 +- adminer/lang/cs.inc.php | 2 +- adminer/lang/de.inc.php | 2 +- adminer/lang/es.inc.php | 2 +- adminer/lang/et.inc.php | 2 +- adminer/lang/fa.inc.php | 1 - adminer/lang/fr.inc.php | 2 +- adminer/lang/hu.inc.php | 1 - adminer/lang/id.inc.php | 1 - adminer/lang/it.inc.php | 2 +- adminer/lang/ja.inc.php | 1 - adminer/lang/lt.inc.php | 1 - adminer/lang/nl.inc.php | 2 +- adminer/lang/pl.inc.php | 2 +- adminer/lang/pt.inc.php | 2 +- adminer/lang/ro.inc.php | 2 +- adminer/lang/ru.inc.php | 2 +- adminer/lang/sk.inc.php | 2 +- adminer/lang/sl.inc.php | 2 +- adminer/lang/sr.inc.php | 2 +- adminer/lang/ta.inc.php | 1 - adminer/lang/tr.inc.php | 1 - adminer/lang/uk.inc.php | 2 +- adminer/lang/xx.inc.php | 2 +- adminer/lang/zh-tw.inc.php | 1 - adminer/lang/zh.inc.php | 1 - adminer/select.inc.php | 6 +++--- adminer/static/functions.js | 4 ++-- changes.txt | 1 + 31 files changed, 23 insertions(+), 33 deletions(-) diff --git a/adminer/lang/ar.inc.php b/adminer/lang/ar.inc.php index 5eae467a..34128722 100644 --- a/adminer/lang/ar.inc.php +++ b/adminer/lang/ar.inc.php @@ -243,7 +243,6 @@ $translations = array( 'Alter type' => 'تعديل نوع', 'Type has been dropped.' => 'تم حذف النوع.', 'Type has been created.' => 'تم إنشاء النوع.', - 'Double click on a value to modify it.' => 'أنقر نقرا مزدوجا على قيمة لتعديلها.', 'Use edit link to modify this value.' => 'إستعمل الرابط "تعديل" لتعديل هذه القيمة.', 'last' => 'الأخيرة', 'From server' => 'من الخادم', diff --git a/adminer/lang/bn.inc.php b/adminer/lang/bn.inc.php index 83c9212a..e42462f8 100644 --- a/adminer/lang/bn.inc.php +++ b/adminer/lang/bn.inc.php @@ -244,7 +244,6 @@ $translations = array( 'Alter type' => 'টাইপ পরিবর্তন করো', 'Type has been dropped.' => 'টাইপ মুছে ফেলা হয়েছে।', 'Type has been created.' => 'টাইপ তৈরি করা হয়েছে।', - 'Double click on a value to modify it.' => 'কোন মানকে পরিবর্তন করতে এতে ডবল ক্লিক করো।', 'Use edit link to modify this value.' => 'এই মান পরিবর্তনের জন্য সম্পাদনা লিঙ্ক ব্যবহার করো।', 'last' => 'সর্বশেষ', 'From server' => 'সার্ভার থেকে', diff --git a/adminer/lang/ca.inc.php b/adminer/lang/ca.inc.php index 603c4686..1883737a 100644 --- a/adminer/lang/ca.inc.php +++ b/adminer/lang/ca.inc.php @@ -233,7 +233,7 @@ $translations = array( 'Geometry' => 'Geometria', 'Databases have been dropped.' => 'S\'han suprimit les bases de dades.', 'File exists.' => 'El fitxer ja existeix.', - 'Double click on a value to modify it.' => 'Fes un doble clic a un valor per modificar-lo.', + 'Ctrl+click on a value to modify it.' => 'Fes un Ctrl+clic a un valor per modificar-lo.', 'Use edit link to modify this value.' => 'Utilitza l\'enllaç d\'edició per modificar aquest valor.', 'Alter schema' => 'Modifica l\'esquema', 'Create schema' => 'Crea un esquema', diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php index ec1f3a4d..9a41ceea 100644 --- a/adminer/lang/cs.inc.php +++ b/adminer/lang/cs.inc.php @@ -243,7 +243,7 @@ $translations = array( '%d row(s) have been imported.' => array('Byl importován %d záznam.', 'Byly importovány %d záznamy.', 'Bylo importováno %d záznamů.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Dvojklikněte na políčko, které chcete změnit.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+klikněte na políčko, které chcete změnit.', 'Use edit link to modify this value.' => 'Ke změně této hodnoty použijte odkaz upravit.', // %s can contain auto-increment value diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php index 3d205317..2e216b1d 100644 --- a/adminer/lang/de.inc.php +++ b/adminer/lang/de.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Typ ändern', 'Type has been dropped.' => 'Typ gelöscht.', 'Type has been created.' => 'Typ erstellt.', - 'Double click on a value to modify it.' => 'Doppelklick zum Bearbeiten des Wertes.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+klick zum Bearbeiten des Wertes.', 'Use edit link to modify this value.' => 'Benutzen Sie den Link zum editieren dieses Wertes.', 'last' => 'letzte', 'From server' => 'Im Server', diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php index c432f324..c48ed126 100644 --- a/adminer/lang/es.inc.php +++ b/adminer/lang/es.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Modificar tipo', 'Type has been dropped.' => 'Tipo eliminado.', 'Type has been created.' => 'Tipo creado.', - 'Double click on a value to modify it.' => 'Doble-clic sobre el valor para editarlo.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+clic sobre el valor para editarlo.', 'Use edit link to modify this value.' => 'Utilice el enlace de modificar para realizar los cambios.', 'last' => 'último', 'From server' => 'Desde servidor', diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php index eaca6809..3481c3fb 100644 --- a/adminer/lang/et.inc.php +++ b/adminer/lang/et.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Muuda tüüpi', 'Type has been dropped.' => 'Tüüp on edukalt kustutatud.', 'Type has been created.' => 'Tüüp on edukalt loodud.', - 'Double click on a value to modify it.' => 'Väärtuse muutmiseks topelt-kliki sellel.', + 'Ctrl+click on a value to modify it.' => 'Väärtuse muutmiseks Ctrl+kliki sellel.', 'Use edit link to modify this value.' => 'Väärtuse muutmiseks kasuta muutmislinki.', 'last' => 'viimane', 'From server' => 'Serverist', diff --git a/adminer/lang/fa.inc.php b/adminer/lang/fa.inc.php index 73ac30b8..b0dc8da4 100644 --- a/adminer/lang/fa.inc.php +++ b/adminer/lang/fa.inc.php @@ -239,7 +239,6 @@ $translations = array( '%d row(s) have been imported.' => array('%d سطر وارد شد', '%d سطر وارد شد'), // in-place editing in select - 'Double click on a value to modify it.' => 'روی مقدار دوبار کلیک کنید تا آنرا ویرایش کنید', 'Use edit link to modify this value.' => 'از لینک ویرایش برای ویرایش این مقدار استفاده کنید', // %s can contain auto-increment value diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php index 2d5cad10..0a64b829 100644 --- a/adminer/lang/fr.inc.php +++ b/adminer/lang/fr.inc.php @@ -243,7 +243,7 @@ $translations = array( 'Alter type' => 'Modifier le type', 'Type has been dropped.' => 'Le type a été supprimé.', 'Type has been created.' => 'Le type a été créé.', - 'Double click on a value to modify it.' => 'Double-cliquez sur une valeur pour la modifier.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+cliquez sur une valeur pour la modifier.', 'Use edit link to modify this value.' => 'Utilisez le lien "modifier" pour modifier cette valeur.', 'last' => 'dernière', 'From server' => 'Depuis le serveur', diff --git a/adminer/lang/hu.inc.php b/adminer/lang/hu.inc.php index 6aee97a3..241e889b 100644 --- a/adminer/lang/hu.inc.php +++ b/adminer/lang/hu.inc.php @@ -233,7 +233,6 @@ $translations = array( 'Geometry' => 'Geometria', 'Databases have been dropped.' => 'Adatbázis eldobva.', 'File exists.' => 'A fájl létezik.', - 'Double click on a value to modify it.' => 'Kattints kétszer az értékre a szerkesztéshez.', 'Use edit link to modify this value.' => 'Használd a szerkesztés hivatkozást ezen érték módosításához.', 'Alter schema' => 'Séma módosítása', 'Create schema' => 'Séma létrehozása', diff --git a/adminer/lang/id.inc.php b/adminer/lang/id.inc.php index 05c4e326..82b6cc34 100644 --- a/adminer/lang/id.inc.php +++ b/adminer/lang/id.inc.php @@ -241,7 +241,6 @@ $translations = array( '%d row(s) have been imported.' => '%d baris berhasil diimpor.', // in-place editing in select - 'Double click on a value to modify it.' => 'Klik ganda suatu nilai untuk mengubahnya.', 'Use edit link to modify this value.' => 'Gunakan tautan edit untuk mengubah nilai ini.', // %s can contain auto-increment value diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php index e8a2a6af..ef1aae19 100644 --- a/adminer/lang/it.inc.php +++ b/adminer/lang/it.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Modifica tipo definito dall\'utente', 'Type has been dropped.' => 'Tipo definito dall\'utente eliminato.', 'Type has been created.' => 'Tipo definito dall\'utente creato.', - 'Double click on a value to modify it.' => 'Fai doppio click su un valore per modificarlo.', + 'Ctrl+click on a value to modify it.' => 'Fai Ctrl+click su un valore per modificarlo.', 'Use edit link to modify this value.' => 'Usa il link modifica per modificare questo valore.', 'last' => 'ultima', 'From server' => 'Dal server', diff --git a/adminer/lang/ja.inc.php b/adminer/lang/ja.inc.php index 6b204fee..46330687 100644 --- a/adminer/lang/ja.inc.php +++ b/adminer/lang/ja.inc.php @@ -245,7 +245,6 @@ $translations = array( 'Alter type' => 'ユーザー定義型変更', 'Type has been dropped.' => 'ユーザー定義型を削除しました', 'Type has been created.' => 'ユーザー定義型を追加しました', - 'Double click on a value to modify it.' => 'ダブルクリックして編集', 'Use edit link to modify this value.' => 'リンクを編集する', 'last' => '最終', 'From server' => 'サーバーから実行', diff --git a/adminer/lang/lt.inc.php b/adminer/lang/lt.inc.php index b4288217..e608c055 100644 --- a/adminer/lang/lt.inc.php +++ b/adminer/lang/lt.inc.php @@ -239,7 +239,6 @@ $translations = array( '%d row(s) have been imported.' => array('%d įrašas įkelta.', '%d įrašai įkelti.', '%d įrašų įkelta.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Du kartus spragtelėkite pelyte norėdami redaguoti.', 'Use edit link to modify this value.' => 'Norėdami redaguoti reikšmę naudokite redagavimo nuorodą.', // %s can contain auto-increment value diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php index 20442dc3..2c9fb1a4 100644 --- a/adminer/lang/nl.inc.php +++ b/adminer/lang/nl.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Type wijzigen', 'Type has been dropped.' => 'Type verwijderd.', 'Type has been created.' => 'Type aangemaakt.', - 'Double click on a value to modify it.' => 'Dubbelklik op een waarde om deze te bewerken.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+klik op een waarde om deze te bewerken.', 'Use edit link to modify this value.' => 'Gebruik de link "bewerk" om deze waarde te wijzigen.', 'last' => 'laatste', 'From server' => 'Van server', diff --git a/adminer/lang/pl.inc.php b/adminer/lang/pl.inc.php index 2fbae4ce..0ee58a2c 100644 --- a/adminer/lang/pl.inc.php +++ b/adminer/lang/pl.inc.php @@ -240,7 +240,7 @@ $translations = array( '%d row(s) have been imported.' => array('%d rekord został zaimportowany.', '%d rekordy zostały zaimportowane.', '%d rekordów zostało zaimportowanych.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Kliknij podwójnie wartość, aby ją edytować.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+kliknij wartość, aby ją edytować.', 'Use edit link to modify this value.' => 'Użyj linku edycji aby zmienić tę wartość.', // %s can contain auto-increment value diff --git a/adminer/lang/pt.inc.php b/adminer/lang/pt.inc.php index 0bb641e5..103733a5 100644 --- a/adminer/lang/pt.inc.php +++ b/adminer/lang/pt.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Modificar tipo', 'Type has been dropped.' => 'Tipo eliminado.', 'Type has been created.' => 'Tipo criado.', - 'Double click on a value to modify it.' => 'Clique duas vezes sobre o valor para edita-lo.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+clique vezes sobre o valor para edita-lo.', 'Use edit link to modify this value.' => 'Utilize o link modificar para alterar.', 'last' => 'último', 'From server' => 'Desde servidor', diff --git a/adminer/lang/ro.inc.php b/adminer/lang/ro.inc.php index c721c437..c2b2e049 100644 --- a/adminer/lang/ro.inc.php +++ b/adminer/lang/ro.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Modifică tip', 'Type has been dropped.' => 'Tiipul a fost șters.', 'Type has been created.' => 'Crează tip nou.', - 'Double click on a value to modify it.' => 'Dublu click pe o valoare pentru a o modifica.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+click pe o valoare pentru a o modifica.', 'Use edit link to modify this value.' => 'Valoare poate fi modificată cu ajutorul butonului «modifică».', 'last' => 'ultima', 'From server' => 'De pe server', diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php index e595fc82..5d21bdc1 100644 --- a/adminer/lang/ru.inc.php +++ b/adminer/lang/ru.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Alter type' => 'Изменить тип', 'Type has been dropped.' => 'Тип удален.', 'Type has been created.' => 'Создан новый тип.', - 'Double click on a value to modify it.' => 'Кликни два раза по значению, чтобы его изменить.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+кликни по значению, чтобы его изменить.', 'Use edit link to modify this value.' => 'Изменить это значение можно с помощью ссылки «изменить».', 'last' => 'последняя', 'From server' => 'С сервера', diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php index c8ca8360..87360ac9 100644 --- a/adminer/lang/sk.inc.php +++ b/adminer/lang/sk.inc.php @@ -244,7 +244,7 @@ $translations = array( 'Type has been dropped.' => 'Typ bol odstránený.', 'Type has been created.' => 'Typ bol vytvorený.', 'Alter type' => 'Pozmeniť typ', - 'Double click on a value to modify it.' => 'Dvojkliknite na políčko, ktoré chcete zmeniť.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+kliknite na políčko, ktoré chcete zmeniť.', 'Use edit link to modify this value.' => 'Pre zmenu tejto hodnoty použite odkaz upraviť.', 'last' => 'posledný', 'From server' => 'Zo serveru', diff --git a/adminer/lang/sl.inc.php b/adminer/lang/sl.inc.php index 4ea8d783..266bb2fd 100644 --- a/adminer/lang/sl.inc.php +++ b/adminer/lang/sl.inc.php @@ -235,7 +235,7 @@ $translations = array( '%d row(s) have been imported.' => array('Uvožena je %d vrstica.', 'Uvoženi sta %d vrstici.', 'Uvožene so %d vrstice.', 'Uvoženih je %d vrstic.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Dvojni klik na vrednost za urejanje.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+klik na vrednost za urejanje.', 'Use edit link to modify this value.' => 'Uporabite urejanje povezave za spreminjanje te vrednosti.', // %s can contain auto-increment value diff --git a/adminer/lang/sr.inc.php b/adminer/lang/sr.inc.php index a589a5c9..3ee265f7 100644 --- a/adminer/lang/sr.inc.php +++ b/adminer/lang/sr.inc.php @@ -243,7 +243,7 @@ $translations = array( '%d row(s) have been imported.' => array('%d ред је увежен.', '%d реда су увежена.', '%d редова је увежено.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Дупли клик на вредност за измену.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+клик на вредност за измену.', 'Use edit link to modify this value.' => 'Користи везу за измену ове вредности.', // %s can contain auto-increment value diff --git a/adminer/lang/ta.inc.php b/adminer/lang/ta.inc.php index 522505fb..b62a0beb 100644 --- a/adminer/lang/ta.inc.php +++ b/adminer/lang/ta.inc.php @@ -234,7 +234,6 @@ $translations = array( 'Schema has been dropped.' => 'அமைப்புமுறை நீக்க‌ப்ப‌ட்ட‌து.', 'Schema has been created.' => 'அமைப்புமுறை உருவாக்க‌ப்ப‌ட்ட‌து.', 'Schema has been altered.' => 'அமைப்புமுறை மாற்ற‌ப்ப‌ட்ட‌து.', - 'Double click on a value to modify it.' => 'ம‌திப்பினை மாற்ற அத‌ன் மீது இருமுறை சொடுக்க‌வும் (Double click).', 'Use edit link to modify this value.' => 'இந்த‌ ம‌திப்பினை மாற்ற‌, தொகுப்பு இணைப்பினை உப‌யோகிக்க‌வும்.', 'last' => 'க‌டைசி', 'Sequence has been dropped.' => 'வ‌ரிசைமுறை நீக்க‌ப்ப‌ட்ட‌து.', diff --git a/adminer/lang/tr.inc.php b/adminer/lang/tr.inc.php index 6a3c9690..1516dcd9 100644 --- a/adminer/lang/tr.inc.php +++ b/adminer/lang/tr.inc.php @@ -235,7 +235,6 @@ $translations = array( '%d row(s) have been imported.' => array('%d sıra ithal edildi.', '%d kadar sıra ithal edildi.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Değerin üzerine çift tıklayın ve değiştirin.', 'Use edit link to modify this value.' => 'Değeri değiştirmek için düzenleme bağlantısını kullanın.', // %s can contain auto-increment value diff --git a/adminer/lang/uk.inc.php b/adminer/lang/uk.inc.php index 0585fdf6..e55827c0 100644 --- a/adminer/lang/uk.inc.php +++ b/adminer/lang/uk.inc.php @@ -240,7 +240,7 @@ $translations = array( '%d row(s) have been imported.' => array('%d рядок було імпортовано.', '%d рядки було імпортовано.', '%d рядків було імпортовано.'), // in-place editing in select - 'Double click on a value to modify it.' => 'Двічі клікніть на значенні щоб змінити його.', + 'Ctrl+click on a value to modify it.' => 'Ctrl+клікніть на значенні щоб змінити його.', 'Use edit link to modify this value.' => 'Використовуйте посилання щоб змінити це значення.', // %s can contain auto-increment value diff --git a/adminer/lang/xx.inc.php b/adminer/lang/xx.inc.php index eefb9991..b699106e 100644 --- a/adminer/lang/xx.inc.php +++ b/adminer/lang/xx.inc.php @@ -241,7 +241,7 @@ $translations = array( '%d row(s) have been imported.' => array('xx', 'xx'), // in-place editing in select - 'Double click on a value to modify it.' => 'xx', + 'Ctrl+click on a value to modify it.' => 'xx', 'Use edit link to modify this value.' => 'xx', // %s can contain auto-increment value diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php index 6e6938e7..31d111ce 100644 --- a/adminer/lang/zh-tw.inc.php +++ b/adminer/lang/zh-tw.inc.php @@ -244,7 +244,6 @@ $translations = array( 'Alter type' => '更改類型', 'Type has been dropped.' => '已刪除類型。', 'Type has been created.' => '已建立類型。', - 'Double click on a value to modify it.' => '雙擊以進行修改。', 'Use edit link to modify this value.' => '使用編輯連結來修改。', 'last' => '最後一頁', 'From server' => '從伺服器', diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php index 04d83ba7..75e30257 100644 --- a/adminer/lang/zh.inc.php +++ b/adminer/lang/zh.inc.php @@ -244,7 +244,6 @@ $translations = array( 'Alter type' => '更改类型', 'Type has been dropped.' => '已丢弃类型。', 'Type has been created.' => '已创建类型。', - 'Double click on a value to modify it.' => '在值上双击类修改它。', 'Use edit link to modify this value.' => '使用编辑链接来修改该值。', 'last' => '最后', 'From server' => '来自服务器', diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 0bc81953..706c1fab 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -141,7 +141,7 @@ if ($_POST && !$error) { //! display edit page in case of an error } elseif (!$_POST["import"]) { // modify if (!$_POST["val"]) { - $error = lang('Double click on a value to modify it.'); + $error = lang('Ctrl+click on a value to modify it.'); } else { $result = true; $affected = 0; @@ -403,7 +403,7 @@ if (!$columns) { $text = ereg('text|lob', $field["type"]); echo (($_GET["modify"] && $editable) || $value !== null ? "" . ($text ? "" : "") - : "" . $adminer->selectVal($val, $link, $field) + : "" . $adminer->selectVal($val, $link, $field) ); } } @@ -452,7 +452,7 @@ if (!$columns) { if ($adminer->selectCommandPrint()) { ?>
-> +> diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 7dd950d9..2694518e 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -412,8 +412,8 @@ function ajaxSetHtml(url) { * @param MouseEvent * @param number display textarea instead of input, 2 - load long text */ -function selectDblClick(td, event, text) { - if (/input|textarea/i.test(td.firstChild.tagName)) { +function selectClick(td, event, text) { + if (!event.ctrlKey || /input|textarea/i.test(td.firstChild.tagName)) { return; } var original = td.innerHTML; diff --git a/changes.txt b/changes.txt index d51c8a01..c4415023 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,5 @@ Adminer 3.6.2-dev: +Edit values by Ctrl+click instead of double click Shorten values in varchar fields Display table default values on wide screens Fix switching language on first load