Replace rest of custom messages handling in PMD.

This commit is contained in:
Michal Čihař
2010-04-19 14:15:21 +02:00
parent d5da2590b5
commit 3366fcc187
3 changed files with 9 additions and 10 deletions

View File

@@ -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) {

View File

@@ -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

View File

@@ -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) . '";';
?>
// ]]>