]> git.joonet.de Git - adminer.git/commitdiff
Don't use AJAX links and forms
authorJakub Vrana <jakub@vrana.cz>
Mon, 16 Apr 2012 05:18:03 +0000 (22:18 -0700)
committerJakub Vrana <jakub@vrana.cz>
Mon, 16 Apr 2012 05:22:47 +0000 (22:22 -0700)
37 files changed:
adminer/file.inc.php
adminer/foreign.inc.php
adminer/include/design.inc.php
adminer/include/functions.inc.php
adminer/lang/ar.inc.php
adminer/lang/ca.inc.php
adminer/lang/cs.inc.php
adminer/lang/de.inc.php
adminer/lang/es.inc.php
adminer/lang/et.inc.php
adminer/lang/fa.inc.php
adminer/lang/fr.inc.php
adminer/lang/hu.inc.php
adminer/lang/it.inc.php
adminer/lang/ja.inc.php
adminer/lang/lt.inc.php
adminer/lang/nl.inc.php
adminer/lang/pl.inc.php
adminer/lang/ro.inc.php
adminer/lang/ru.inc.php
adminer/lang/sk.inc.php
adminer/lang/ta.inc.php
adminer/lang/uk.inc.php
adminer/lang/xx.inc.php
adminer/lang/zh-tw.inc.php
adminer/lang/zh.inc.php
adminer/select.inc.php
adminer/static/default.css
adminer/static/editing.js
adminer/static/functions.js
adminer/static/loader.gif [deleted file]
changes.txt
compile.php
designs/haeckel/adminer.css
designs/konya/adminer.css
designs/pokorny/adminer.css
editor/static/editing.js

index 202c0c9cf13f28a18669c6231712a5cef50254f2..d2ab6db602825b87ed357da73f8b28f283cf8b08 100644 (file)
@@ -18,7 +18,6 @@ if ($_GET["file"] == "favicon.ico") {
                case "up.gif": echo base64_decode("compile_file('../adminer/static/up.gif', 'base64_encode');"); break;
                case "down.gif": echo base64_decode("compile_file('../adminer/static/down.gif', 'base64_encode');"); break;
                case "arrow.gif": echo base64_decode("compile_file('../adminer/static/arrow.gif', 'base64_encode');"); break;
-               case "loader.gif": echo base64_decode("compile_file('../adminer/static/loader.gif', 'base64_encode');"); break;
        }
 }
 exit;
index b9d91480d17f91c2bd3568804ea2514dd2a45de0..081b65104cb25c1fbee917967d64d49e1808e7a3 100644 (file)
@@ -51,7 +51,7 @@ foreach (table_status() as $name => $table_status) {
 <p>
 <?php if ($row["db"] == "" && $row["ns"] == "") { ?>
 <?php echo lang('Target table'); ?>:
-<?php echo html_select("table", $referencable, $row["table"], "this.form['change-js'].value = '1'; if (!ajaxForm(this.form)) this.form.submit();"); ?>
+<?php echo html_select("table", $referencable, $row["table"], "this.form['change-js'].value = '1'; this.form.submit();"); ?>
 <input type="hidden" name="change-js" value="">
 <noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
 <table cellspacing="0">
index 7240bb8c552eae519f4a5b35e81bd723914d5031..1eb5200002a26d24c7319f356625662909e727d0 100644 (file)
@@ -16,10 +16,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "", $
        }
        $title_all = $title . ($title2 != "" ? ": " . h($title2) : "");
        $title_page = strip_tags($title_all . (SERVER != "" && SERVER != "localhost" ? h(" - " . SERVER) : "") . " - " . $adminer->name());
-       if (is_ajax()) {
-               header("X-AJAX-Title: " . rawurlencode($title_page));
-       } else {
-               ?>
+       ?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <html lang="<?php echo $LANG; ?>" dir="<?php echo lang('ltr'); ?>">
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -27,10 +24,6 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "", $
 <meta name="robots" content="noindex">
 <title><?php echo $title_page; ?></title>
 <link rel="stylesheet" type="text/css" href="../adminer/static/default.css">
-<script type="text/javascript">
-var areYouSure = '<?php echo lang('Resend POST data?'); ?>';
-var noResponse = '<?php echo lang('No response from server.'); ?>';
-</script>
 <script type="text/javascript" src="../adminer/static/functions.js"></script>
 <script type="text/javascript" src="static/editing.js"></script>
 <?php if ($adminer->head()) { ?>
@@ -41,15 +34,13 @@ var noResponse = '<?php echo lang('No response from server.'); ?>';
 <?php } ?>
 <?php echo $head; ?>
 
-<body class="<?php echo lang('ltr'); ?> nojs"<?php echo ($_POST ? "" : " onclick=\"return bodyClick(event, '" . h(js_escape(DB) . "', '" . js_escape($_GET["ns"])) . "');\""); // avoid re-post confirmation after refreshing the next page in Google Chrome ?> onkeydown="bodyKeydown(event);" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion();"); ?>">
+<body class="<?php echo lang('ltr'); ?> nojs" onkeydown="bodyKeydown(event);" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion();"); ?>">
 <script type="text/javascript">
 document.body.className = document.body.className.replace(/ nojs/, ' js');
 </script>
 
-<div id="loader"><img src="../adminer/static/loader.gif" alt=""></div>
 <div id="content">
 <?php
-       }
        if (isset($breadcrumb)) {
                $link = substr(preg_replace('~(username|db|ns)=[^&]*&~', '', ME), 0, -1);
                echo '<p id="breadcrumb"><a href="' . h($link ? $link : ".") . '">' . $drivers[DRIVER] . '</a> &raquo; ';
@@ -100,8 +91,7 @@ document.body.className = document.body.className.replace(/ nojs/, ' js');
 */
 function page_footer($missing = "") {
        global $adminer;
-       if (!is_ajax()) {
-               ?>
+       ?>
 </div>
 
 <?php switch_lang(); ?>
@@ -109,5 +99,4 @@ function page_footer($missing = "") {
 <?php $adminer->navigation($missing); ?>
 </div>
 <?php
-       }
 }
index 2d5d897bc71594d877bbd7a5bb1faba1fe1a592f..17fb05bc1ed447923e55b1eda4e03cfb8182ba49 100644 (file)
@@ -452,7 +452,7 @@ function redirect($location, $message = null) {
                if ($location == "") {
                        $location = ".";
                }
-               header((is_ajax() ? "X-AJAX-Redirect" : "Location") . ": $location");
+               header("Location: $location");
                exit;
        }
 }
index 85908484a4450adc5881e356eb9005bc235a73ee..5eae467a81a5c2d7b828ba95a7d9505ba2d80e48 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'نسخ',
        'Permanent link' => 'وصلة دائمة',
        'Edit all' => 'تعديل الكل',
-       'Resend POST data?' => 'هل تود إعادة إرسال بيانات POST ؟',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 9e1becf9f5ec1e9a44c244c5c1b4d4cb90fe3e30..603c46868dfb6f4a7f4b2f50c1e7aa3a7c563edf 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Còpia',
        'Permanent link' => 'Enllaç permanent',
        'Edit all' => 'Edita-ho tot',
-       'Resend POST data?' => 'Torna a enviar les dades POST?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index f903913f67e3a6085aea43f8bdf29eeb175f7b33..b9f6e9562d8db36e61890616d4d44da66a5f6592 100644 (file)
@@ -278,10 +278,6 @@ $translations = array(
        'Geometry' => 'Geometrie',
        'Relations' => 'Vztahy',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'Znovu odeslat POST data?',
-       'No response from server.' => 'Server neodpověděl.',
-       
        'Editor' => 'Editor',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => '$6.$4.$1',
index c1b06e9da6af021e83ec1e2c89162b8ddb499e12..3d205317b9c23b7e7e7ea23b1b6e14620c163435 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Kopieren',
        'Permanent link' => 'Dauerhafter Link',
        'Edit all' => 'Alle ändern',
-       'Resend POST data?' => 'POST data noch einmal senden ?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 47a8e600379289dd88ee2dd3feba0c3bb5aad6c6..20391407b7f49bee63df91028c8ce300fb8f555a 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Copiar',
        'Permanent link' => 'Enlace permanente',
        'Edit all' => 'Editar todos',
-       'Resend POST data?' => 'Volver a enviar POST data?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 9c06a4bc1a5f0448d59e039eea202bf19ff9e9a2..eaca6809d0b463c21ceb4f482cc8c9f122ba4ac3 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Kopeeri',
        'Permanent link' => 'Püsilink',
        'Edit all' => 'Muuda kõiki',
-       'Resend POST data?' => 'Saada POST andmed uuesti?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index f406c60e97ec85254f371d0d1a1cea85d4d5a457..73ac30b8cc857dc10f26e8688381343186d8c433 100644 (file)
@@ -277,9 +277,6 @@ $translations = array(
        'Geometry' => 'هندسه',
        'Relations' => 'رابطه ها',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'ارسال مجدد داده ها؟',
-       
        'Editor' => 'ویرایشگر',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => '$1-$3-$5',
index 625525ad2d78446e1d77c42037a476e44470dd95..2d5cad106454e34b756d5fcfc531a64f77faf5f1 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Copier',
        'Permanent link' => 'Lien permanent',
        'Edit all' => 'Tout modifier',
-       'Resend POST data?' => 'Renvoyer les données POST ?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 1c8ee2f71b61014b0511ac46c6cc9b0d467a49c5..6aee97a3f44245722331d4a0a65e0df441c06d10 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Másolás',
        'Permanent link' => 'Hivatkozás',
        'Edit all' => 'Összes szerkesztése',
-       'Resend POST data?' => 'Újraküldi a POST adatokat?',
        'HH:MM:SS' => 'óó:pp:mm',
 );
index 50b76c184f8927e02c24be26fe87d2f6ba2e14b7..e8a2a6afd4a13c531665e2747a7bd0c79b4f67e1 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Copia',
        'Permanent link' => 'Link permanente',
        'Edit all' => 'Modifica tutto',
-       'Resend POST data?' => 'Reinvio i dati POST?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 68cbf1264622933bc7c5e07e75b4dc2dc0ad0da4..6b204fee3570e72e3cdb75cfadd7b790fee1442f 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'コピー',
        'Permanent link' => 'パーマネントリンク',
        'Edit all' => 'すべて編集',
-       'Resend POST data?' => '再送信しますか?',
        'HH:MM:SS' => '時:分:秒',
 );
index e054a663c8871150d0a7e21cde1384dc52e85c68..b42882177a85dfa53081c9faf912e2491b4f65d5 100644 (file)
@@ -277,9 +277,6 @@ $translations = array(
        'Geometry' => 'Geometrija',
        'Relations' => 'Ryšiai',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'Persiųsti POST duomenis?',
-       
        'Editor' => 'Redaktorius',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => '$1-$3-$5',
index 84b1323f295b44ef34a664dab601ad1a3def948f..20442dc38e2049eb87ea7fa87989538d6c2eef44 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Kopieren',
        'Permanent link' => 'Permanente link',
        'Edit all' => 'Alles bewerken',
-       'Resend POST data?' => 'POST data opnieuw verzenden',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index da94896eba72e4b3c7a97a91566cb317278f5765..2fbae4ce8b49761102c6dbcae014e56616ef0164 100644 (file)
@@ -278,10 +278,6 @@ $translations = array(
        'Geometry' => 'Geometria',
        'Relations' => 'Relacje',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'Wysłać dane ponownie?',
-       'No response from server.' => 'Brak odpowiedzi od serwera.',
-       
        'Editor' => 'Edytor',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => '$6.$4.$1',
index 2ab23519e98811811f142a2a094bb68a35c23ea7..c721c437476e7fad12bd115b381ec7b3b4f36139 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Copiază',
        'Permanent link' => 'Adresă permanentă',
        'Edit all' => 'Editează tot',
-       'Resend POST data?' => 'Retrimite datele POST?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 217ef0f0186ec286434144635591fffe02ac7d7e..e595fc82aa9c04d1b476b5579b801e059b16de1f 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Копировать',
        'Permanent link' => 'Постоянная ссылка',
        'Edit all' => 'Редактировать всё',
-       'Resend POST data?' => 'Еще раз послать данные POST запроса?',
        'HH:MM:SS' => 'ЧЧ:ММ:СС',
 );
index 24ed427112a41b545f8f7c4a07ae490c20bebbc7..c8ca8360d5a6daee73e35cf2118d784a06b4b02a 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'Kopírovať',
        'Permanent link' => 'Permanentný odkaz',
        'Edit all' => 'Upraviť všetko',
-       'Resend POST data?' => 'Znovu poslať POST data?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index ed4752ea38202520c9ed2e01e74593a7db8e8e0a..522505fb6fa6bf2570c62fe9984253569219053b 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => 'நகல்',
        'Permanent link' => 'நிரந்தர இணைப்பு',
        'Edit all' => 'அனைத்தையும் தொகு',
-       'Resend POST data?' => 'POST data வை மீண்டும் அனுப்பவா?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index c99303192e0e604f19aad3dd44fbd47c3b368b34..0585fdf63b8439cd120b7d5f5dcfacbe6b045e94 100644 (file)
@@ -278,10 +278,6 @@ $translations = array(
        'Geometry' => 'Геометрія',
        'Relations' => 'Зв\'язки',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'Ще раз надіслати POST-запит?',
-       'No response from server.' => 'Нема відповіді від сервера.',
-       
        'Editor' => 'Редактор',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => '$5.$3.$1',
index cacdc136f2d4713b5eae76645dff3cc46aef6320..15b795a76e9ceecc05f3293dde849dcbef6ab3da 100644 (file)
@@ -278,10 +278,6 @@ $translations = array(
        'Geometry' => 'xx',
        'Relations' => 'xx',
        
-       // reload confirmation in AJAX
-       'Resend POST data?' => 'xx',
-       'No response from server.' => 'xx',
-       
        'Editor' => 'xx',
        // date format in Editor: $1 yyyy, $2 yy, $3 mm, $4 m, $5 dd, $6 d
        '$1-$3-$5' => 'xx',
index 0f4b8379256a852c3cd402d14050c2a6056a8743..6e6938e7db4a49fb5d99cd11080fb0d717f69e9d 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => '複製',
        'Permanent link' => '永久鏈接',
        'Edit all' => '編輯全部',
-       'Resend POST data?' => '重新發送表單資料?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index ff75d22f55a86911d5bc7a04513d174bcbecd0db..04d83ba727655c239004c57e28aa1c1b4945eda8 100644 (file)
@@ -268,6 +268,5 @@ $translations = array(
        'Copy' => '复制',
        'Permanent link' => '固定链接',
        'Edit all' => '编辑全部',
-       'Resend POST data?' => '重新发送 POST 数据?',
        'HH:MM:SS' => 'HH:MM:SS',
 );
index 5854783fabaa8061152a74a11752e1b5da7b5f95..ca020e16e9a2727ea3e836b9f396b0b03160d461 100644 (file)
@@ -377,7 +377,7 @@ if (!$columns) {
                                $found_rows = found_rows($table_status, $where);
                                if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
                                        // slow with big tables
-                                       ob_flush(); //! doesn't work with AJAX
+                                       ob_flush();
                                        flush();
                                        $found_rows = $connection->result("SELECT COUNT(*) FROM " . table($TABLE) . ($where ? " WHERE " . implode(" AND ", $where) : ""));
                                } else {
index a5c6f6965aad4d765d98ca69af5f2ce1ef2d667d..cd42bae0582d24925cdf59b6bce08421039b3f1b 100644 (file)
@@ -20,8 +20,6 @@ code { background: #eee; }
 tbody tr:hover td, tbody tr:hover th { background: #eee; }
 pre { margin: 1em 0 0; }
 input[type=image] { vertical-align: middle; }
-.loading, .loading input { cursor: progress; }
-.loading #loader { display: inline; }
 .version { color: #777; font-size: 67%; }
 .js .hidden, .nojs .jsonly { display: none; }
 .nowrap td, .nowrap th, td.nowrap { white-space: pre; }
@@ -49,7 +47,6 @@ input[type=image] { vertical-align: middle; }
 #content { margin: 2em 0 0 21em; padding: 10px 20px 20px 0; }
 #lang { position: absolute; top: 0; left: 0; line-height: 1.8em; padding: .3em 1em; }
 #breadcrumb { white-space: nowrap; position: absolute; top: 0; left: 21em; background: #eee; height: 2em; line-height: 1.8em; padding: 0 1em; margin: 0 0 0 -18px; }
-#loader { display: none; position: fixed; top: 2px; right: 2px; z-index: 1; }
 #h1 { color: #777; text-decoration: none; font-style: italic; }
 #version { font-size: 67%; color: red; }
 #schema { margin-left: 60px; position: relative; -moz-user-select: none; -webkit-user-select: none; }
index 49e7c422c9e5f136fbf48538b30c99470d70645a..c9a51cf2542a19acc286b9260e52865c5a5d6f92 100644 (file)
@@ -6,9 +6,6 @@ var jushRoot = '../externals/jush/'; // global variable to allow simple customiz
 * @param string first three characters of database system version
 */
 function bodyLoad(version) {
-       if (history.state !== undefined) { // copied from editor/static/editing.js
-               onpopstate(history);
-       }
        if (jushRoot) {
                var script = document.createElement('script');
                script.src = jushRoot + 'jush.js';
index b0210f548cd52153da3a430a28d585caee33cfdd..455b4989ba7d807df785849c8774d78d8d02ae0c 100644 (file)
@@ -157,9 +157,7 @@ function nodePosition(el) {
 function pageClick(href, page, event) {
        if (!isNaN(page) && page) {
                href += (page != 1 ? '&page=' + (page - 1) : '');
-               if (!ajaxSend(href)) {
-                       location.href = href;
-               }
+               location.href = href;
        }
 }
 
@@ -187,16 +185,6 @@ function selectAddRow(field) {
 
 
 
-/** Abort AJAX request
-* @uses ajaxRequest
-*/
-function ajaxAbort() {
-       ajaxRequest.onreadystatechange = null;
-       if (ajaxRequest.abort) {
-               ajaxRequest.abort();
-       }
-}
-
 
 
 /** Send form by Ctrl+Enter on <select> and <textarea>
@@ -206,22 +194,12 @@ function ajaxAbort() {
 */
 function bodyKeydown(event, button) {
        var target = event.target || event.srcElement;
-       if (event.keyCode == 27 && !event.shiftKey && !event.ctrlKey && !event.altKey && !event.metaKey) { // 27 - Esc
-               ajaxAbort();
-               document.body.className = document.body.className.replace(/ loading/g, '');
-               onblur = function () { };
-               if (originalFavicon) {
-                       replaceFavicon(originalFavicon);
-               }
-       }
        if (event.ctrlKey && (event.keyCode == 13 || event.keyCode == 10) && !event.altKey && !event.metaKey && /select|textarea|input/i.test(target.tagName)) { // 13|10 - Enter, shiftKey allowed
                target.blur();
-               if (!ajaxForm(target.form, (button ? button + '=1' : ''))) {
-                       if (button) {
-                               target.form[button].click();
-                       } else {
-                               target.form.submit();
-                       }
+               if (button) {
+                       target.form[button].click();
+               } else {
+                       target.form.submit();
                }
                return false;
        }
@@ -307,132 +285,6 @@ function ajaxSetHtml(url) {
        });
 }
 
-var originalFavicon;
-
-/** Replace favicon
-* @param string
-*/
-function replaceFavicon(href) {
-       var favicon = document.getElementById('favicon');
-       if (favicon) {
-               favicon.href = href;
-               favicon.parentNode.appendChild(favicon); // to replace the icon in Firefox
-       }
-}
-
-var ajaxRequest = {};
-
-/** Safely load content to #content
-* @param string
-* @param [string]
-* @param [boolean]
-* @param [boolean]
-* @return XMLHttpRequest or false in case of an error
-* @uses ajaxRequest
-*/
-function ajaxSend(url, data, popState, noscroll) {
-       if (!history.pushState) {
-               return false;
-       }
-       ajaxAbort();
-       onblur = function () {
-               if (!originalFavicon) {
-                       originalFavicon = (document.getElementById('favicon') || {}).href;
-               }
-               replaceFavicon(document.getElementById('loader').firstChild.src);
-       };
-       document.body.className += ' loading';
-       ajaxRequest = ajax(url, function (request) {
-               var title = request.getResponseHeader('X-AJAX-Title');
-               if (title) {
-                       document.title = decodeURIComponent(title);
-               }
-               var redirect = request.getResponseHeader('X-AJAX-Redirect');
-               if (redirect) {
-                       return ajaxSend(redirect, '', popState);
-               }
-               onblur = function () { };
-               if (originalFavicon) {
-                       replaceFavicon(originalFavicon);
-               }
-               if (!popState) {
-                       if (data || url != location.href) {
-                               history.pushState(data, '', url); //! remember window position
-                       }
-               }
-               if (!noscroll && !/&order/.test(url)) {
-                       scrollTo(0, 0);
-               }
-               setHtml('content', (request.status ? request.responseText : '<p class="error">' + noResponse));
-               document.body.className = document.body.className.replace(/ loading/g, '');
-               var content = document.getElementById('content');
-               var scripts = content.getElementsByTagName('script');
-               var length = scripts.length; // required to avoid infinite loop
-               for (var i=0; i < length; i++) {
-                       var script = document.createElement('script');
-                       script.text = scripts[i].text;
-                       content.appendChild(script);
-               }
-               
-               var as = document.getElementById('menu').getElementsByTagName('a');
-               var href = location.href.replace(/(&(sql=|dump=|(select|table)=[^&]*)).*/, '$1');
-               for (var i=0; i < as.length; i++) {
-                       as[i].className = (href == as[i].href ? 'active' : '');
-               }
-               var dump = document.getElementById('dump');
-               if (dump) {
-                       var match = /&(select|table)=([^&]+)/.exec(href);
-                       dump.href = dump.href.replace(/[^=]+$/, '') + (match ? match[2] : '');
-               }
-               //! modify Change database hidden fields
-               
-               if (window.jush) {
-                       jush.highlight_tag('code', 0);
-               }
-       }, data);
-       return ajaxRequest;
-}
-
-/** Revive page from history
-* @param PopStateEvent|history
-* @uses ajaxRequest
-*/
-onpopstate = function (event) {
-       if ((ajaxRequest.send || event.state) && !/#/.test(location.href)) {
-               ajaxSend(location.href, (event.state && confirm(areYouSure) ? event.state : ''), 1); // 1 - disable pushState
-       } else {
-               ajaxRequest.send = true; // to enable AJAX for next call of this function
-       }
-};
-
-/** Send form by AJAX GET
-* @param HTMLFormElement
-* @param [string]
-* @param [boolean]
-* @return XMLHttpRequest or false in case of an error
-*/
-function ajaxForm(form, data, noscroll) {
-       if ((/&(database|scheme|create|view|sql|user|dump|call)=/.test(location.href) && !/\./.test(data)) || (form.onsubmit && form.onsubmit() === false)) { // . - type="image"
-               return false;
-       }
-       var params = [ ];
-       for (var i=0; i < form.elements.length; i++) {
-               var el = form.elements[i];
-               if (/file/i.test(el.type) && el.value) {
-                       return false;
-               } else if (el.name && (!/checkbox|radio|submit|file/i.test(el.type) || el.checked)) {
-                       params.push(encodeURIComponent(el.name) + '=' + encodeURIComponent(/select/i.test(el.tagName) ? selectValue(el) : el.value));
-               }
-       }
-       if (data) {
-               params.push(data);
-       }
-       if (form.method == 'post') {
-               return ajaxSend((/\?/.test(form.action) ? form.action : location.href), params.join('&'), false, noscroll); // ? - always part of Adminer URL
-       }
-       return ajaxSend((form.action || location.href).replace(/\?.*/, '') + '?' + params.join('&'), '', false, noscroll);
-}
-
 
 
 /** Display edit field
@@ -499,38 +351,6 @@ function selectDblClick(td, event, text) {
 
 
 
-/** Load link by AJAX
-* @param MouseEvent
-* @param string
-* @param string
-* @return boolean
-*/
-function bodyClick(event, db, ns) {
-       if (event.button || event.shiftKey || event.altKey || event.metaKey) {
-               return;
-       }
-       if (event.getPreventDefault ? event.getPreventDefault() : event.returnValue === false || event.defaultPrevented) {
-               return false;
-       }
-       var el = event.target || event.srcElement;
-       if (/^a$/i.test(el.parentNode.tagName)) {
-               el = el.parentNode;
-       }
-       if (/^a$/i.test(el.tagName) && !/:|#|&download=/i.test(el.getAttribute('href')) && /[&?]username=/.test(el.href) && !event.ctrlKey) {
-               var match = /&db=([^&]*)/.exec(el.href);
-               var match2 = /&ns=([^&]*)/.exec(el.href);
-               return !(db == (match ? decodeURIComponent(match[1]) : '') && ns == (match2 ? decodeURIComponent(match2[1]) : '') && ajaxSend(el.href));
-       }
-       if (/^input$/i.test(el.tagName) && /image|submit/.test(el.type)) {
-               if (event.ctrlKey) {
-                       el.form.target = '_blank';
-               } else {
-                       return !ajaxForm(el.form, (el.name ? encodeURIComponent(el.name) + (el.type == 'image' ? '.x' : '') + '=1' : ''), el.type == 'image');
-               }
-       }
-       return true;
-}
-
 /** Stop event propagation
 * @param Event
 */
diff --git a/adminer/static/loader.gif b/adminer/static/loader.gif
deleted file mode 100644 (file)
index d0bce15..0000000
Binary files a/adminer/static/loader.gif and /dev/null differ
index 75d81c99538055ae954a0d5f65a5019f0a94bae8..4e71f397945c28f902ba402da659e84e37159679 100644 (file)
@@ -3,6 +3,7 @@ Print current time next to executed SQL queries
 Highlight code in textarea by CodeMirror
 Link to original table in EXPLAIN of SELECT * FROM table t
 Replace JSMin by better JavaScript minifier
+Don't use AJAX links and forms
 Ukrainian translation
 
 Adminer 3.3.4 (released 2012-03-07):
index cc3ccac41618ad3c7d43491986be3489bbdd5aa2..f7f62dc4019bb8401db497f5ef1817f93717c8f1 100644 (file)
@@ -262,7 +262,7 @@ foreach (array("adminer", "editor") as $project) {
        $file = str_replace('<script type="text/javascript" src="static/editing.js"></script>' . "\n", "", $file);
        $file = preg_replace_callback("~compile_file\\('([^']+)', '([^']+)'\\);~", 'compile_file', $file); // integrate static files
        $replace = 'h(preg_replace("~\\\\\\\\?.*~", "", ME)) . "?file=\\1&amp;version=' . $VERSION;
-       $file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico|loader\\.gif)~', '<?php echo ' . $replace . '"; ?>', $file);
+       $file = preg_replace('~\\.\\./adminer/static/(default\\.css|functions\\.js|favicon\\.ico)~', '<?php echo ' . $replace . '"; ?>', $file);
        $file = preg_replace('~\\.\\./adminer/static/([^\'"]*)~', '" . ' . $replace, $file);
        $file = str_replace("'../externals/jush/'", "location.protocol + '//www.adminer.org/static/'", $file);
        $file = str_replace('"../externals/CodeMirror2"', '($_SERVER["HTTPS"] ? "https" : "http") . "://www.adminer.org/static/CodeMirror2"', $file);
index 8d2ff0d1991f3cb752492de841ec23dd7514e314..1186f64c558674d69ffb111653aced7cd3404aa7 100644 (file)
@@ -141,4 +141,3 @@ fieldset, legend, table, .error, .message {-moz-border-radius: 5px; -khtml-borde
 #breadcrumb, #lang, #menu {-moz-border-radius-bottomright: 5px; -khtml-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;}\r
 #breadcrumb, #lang {-moz-border-radius-bottomleft: 5px; -khtml-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;}\r
 #menu {-moz-border-radius-topright: 5px; -khtml-border-top-right-radius: 5px; -webkit-border-top-right-radius: 5px; border-bottom-top-radius: 5px;}\r
-#loader {margin-left: 35px;}\r
index ca46c69c211807e20e6ec0d41f551bfc3e4e87f7..4887f36ef1a02aeeca13010bbd5ee092f1b282e4 100644 (file)
@@ -123,4 +123,3 @@ fieldset, legend, h2, table, .error, .message {-moz-border-radius: 5px; -khtml-b
 #breadcrumb, #lang, #menu {-moz-border-radius-bottomright: 5px; -khtml-border-bottom-right-radius: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;}\r
 #breadcrumb {-moz-border-radius-bottomleft: 5px; -khtml-border-bottom-left-radius: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;}\r
 #menu {-moz-border-radius-topright: 5px; -khtml-border-top-right-radius: 5px; -webkit-border-top-right-radius: 5px; border-bottom-top-radius: 5px;}\r
-#loader {margin-left: 35px;}
\ No newline at end of file
index 88be68b1cee3dae9fac95a22dfabc1347bf93452..d89a3888116c107924ddf98a06705de0e5298d68 100644 (file)
@@ -288,8 +288,3 @@ fieldset {
 p {\r
     margin: 0.8em 0 0 0\r
 }\r
-#loader {\r
-    position: fixed;\r
-    top: 0;\r
-    left: 16em;\r
-}
\ No newline at end of file
index e12c44f534bf272d5b6afa71b8606266fd652742..75f425c38205e63e45890e551410bee06c681106 100644 (file)
@@ -1,9 +1,6 @@
 // Editor specific functions
 
 function bodyLoad(version) {
-       if (history.state !== undefined) {
-               onpopstate(history);
-       }
 }
 
 function whisperClick(event, field) {