From 3366fcc187b89d1288caa2308dfaaf44424b8f23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 19 Apr 2010 14:15:21 +0200 Subject: [PATCH] Replace rest of custom messages handling in PMD. --- js/messages.php | 4 ++++ pmd/scripts/move.js | 8 ++++---- pmd_general.php | 7 +------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/js/messages.php b/js/messages.php index 0845226d7..e3013781e 100644 --- a/js/messages.php +++ b/js/messages.php @@ -59,6 +59,10 @@ $js_messages['strErrorRelationAdded'] = $GLOBALS['strErrorRelationAdded']; $js_messages['strErrorRelationExists'] = $GLOBALS['strErrorRelationExists']; $js_messages['strErrorSaveTable'] = $GLOBALS['strErrorSaveTable']; $js_messages['strGeneralRelationFeat:strDisabled'] = $GLOBALS['strGeneralRelationFeat'] . ': ' . $GLOBALS['strDisabled']; +$js_messages['strSelectReferencedKey'] = $GLOBALS['strSelectReferencedKey']; +$js_messages['strSelectForeignKey'] = $GLOBALS['strSelectForeignKey']; +$js_messages['strPleaseSelectPrimaryOrUniqueKey'] = $GLOBALS['strPleaseSelectPrimaryOrUniqueKey']; +$js_messages['strChangeDisplay'] = $GLOBALS['strChangeDisplay']; echo "var PMA_messages = new Array();\n"; foreach ($js_messages as $name => $js_message) { diff --git a/pmd/scripts/move.js b/pmd/scripts/move.js index 35d6239e8..a68f4746a 100644 --- a/pmd/scripts/move.js +++ b/pmd/scripts/move.js @@ -484,7 +484,7 @@ function Start_relation() if (!ON_relation) { document.getElementById('foreign_relation').style.display = ''; ON_relation = 1; - document.getElementById('hint').innerHTML = LangSelectReferencedKey; + document.getElementById('hint').innerHTML = PMA_messages['strSelectReferencedKey']; document.getElementById('hint').style.visibility = "visible"; document.getElementById('rel_button').className = 'M_butt_Selected_down'; } else { @@ -502,7 +502,7 @@ function Click_field(T, f, PK) // table field if (!click_field) { //.style.display=='none' .style.visibility = "hidden" if (!PK) { - alert(LangPleaseSelectPrimaryOrUniqueKey); + alert(PMA_messages['strPleaseSelectPrimaryOrUniqueKey']); return;// 0; }//PK if (j_tabs[db + '.' + T] != '1') { @@ -510,7 +510,7 @@ function Click_field(T, f, PK) // table field } click_field = 1; link_relation = "T1=" + T + "&F1=" + f; - document.getElementById('hint').innerHTML = LangSelectForeignKey; + document.getElementById('hint').innerHTML = PMA_messages['strSelectForeignKey']; } else { Start_relation(); // hidden hint... if (j_tabs[db + '.' + T] != '1' || !PK) { @@ -906,7 +906,7 @@ function Start_display_field() } if (!ON_display_field) { ON_display_field = 1; - document.getElementById('hint').innerHTML = LangChangeDisplay; + document.getElementById('hint').innerHTML = PMA_messages['strChangeDisplay']; document.getElementById('hint').style.visibility = "visible"; document.getElementById('display_field_button').className = 'M_butt_Selected_down';//'#FFEE99';gray #AAAAAA diff --git a/pmd_general.php b/pmd_general.php index a93931c57..deff13909 100644 --- a/pmd_general.php +++ b/pmd_general.php @@ -34,12 +34,7 @@ $hidden = "hidden"; echo ' var server = "' . PMA_escapeJsString($server) . '"; var db = "' . PMA_escapeJsString($db) . '"; - var token = "' . PMA_escapeJsString($token) . '"; - var LangSelectReferencedKey = "' . PMA_escapeJsString($strSelectReferencedKey) . '"; - var LangSelectForeignKey = "' . PMA_escapeJsString($strSelectForeignKey) . '"; - var LangPleaseSelectPrimaryOrUniqueKey = "' . PMA_escapeJsString($strPleaseSelectPrimaryOrUniqueKey) . '"; - var LangIEnotSupport = "' . PMA_escapeJsString($strIEUnsupported) . '"; - var LangChangeDisplay = "' . PMA_escapeJsString($strChangeDisplay) . '";'; + var token = "' . PMA_escapeJsString($token) . '";'; ?> // ]]>