Merge branch 'recent' into aris

This commit is contained in:
Aris Feryanto 2011-05-27 19:09:30 +07:00
commit c40fed887e
8 changed files with 107 additions and 112 deletions

View File

@ -1069,7 +1069,7 @@ ALTER TABLE `pma_column_comments`
Without configuring the storage, you can still access the recently used tables,
but it will disappear after you logout.<br/><br/>
To allow the usage of this functionality:
To allow the usage of this functionality persistently:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>

View File

@ -1,3 +1,4 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Functions used in configuration forms and on user preferences pages
*/
@ -14,9 +15,9 @@ var PMA_messages = {};
* @param {Element} field
*/
function getFieldType(field) {
field = $(field);
var tagName = field.attr('tagName');
if (tagName == 'INPUT') {
field = $(field);
var tagName = field.prop('tagName');
if (tagName == 'INPUT') {
return field.attr('type');
} else if (tagName == 'SELECT') {
return 'select';
@ -40,7 +41,7 @@ function getFieldType(field) {
* @param {String|Boolean} [value]
*/
function setFieldValue(field, field_type, value) {
field = $(field);
field = $(field);
switch (field_type) {
case 'text':
field.attr('value', (value != undefined ? value : field.attr('defaultValue')));
@ -50,14 +51,14 @@ function setFieldValue(field, field_type, value) {
break;
case 'select':
var options = field.attr('options');
var i, imax = options.length;
var i, imax = options.length;
if (value == undefined) {
for (i = 0; i < imax; i++) {
options[i].selected = options[i].defaultSelected;
options[i].selected = options[i].defaultSelected;
}
} else {
for (i = 0; i < imax; i++) {
options[i].selected = (value.indexOf(options[i].value) != -1);
options[i].selected = (value.indexOf(options[i].value) != -1);
}
}
break;
@ -78,14 +79,14 @@ function setFieldValue(field, field_type, value) {
* @type Boolean|String|String[]
*/
function getFieldValue(field, field_type) {
field = $(field);
field = $(field);
switch (field_type) {
case 'text':
return field.attr('value');
return field.prop('value');
case 'checkbox':
return field.attr('checked');
return field.prop('checked');
case 'select':
var options = field.attr('options');
var options = field.prop('options');
var i, imax = options.length, items = [];
for (i = 0; i < imax; i++) {
if (options[i].selected) {
@ -354,7 +355,7 @@ function displayErrors(error_list) {
* @param {Object} errors
*/
function validate_fieldset(fieldset, isKeyUp, errors) {
fieldset = $(fieldset);
fieldset = $(fieldset);
if (fieldset.length && typeof validators._fieldset[fieldset.attr('id')] != 'undefined') {
var fieldset_errors = validators._fieldset[fieldset.attr('id')].apply(fieldset[0], [isKeyUp]);
for (var field_id in fieldset_errors) {
@ -377,8 +378,8 @@ function validate_fieldset(fieldset, isKeyUp, errors) {
* @param {Object} errors
*/
function validate_field(field, isKeyUp, errors) {
field = $(field);
var field_id = field.attr('id');
field = $(field);
var field_id = field.attr('id');
errors[field_id] = [];
var functions = getFieldValidators(field_id, isKeyUp);
for (var i = 0; i < functions.length; i++) {
@ -389,7 +390,7 @@ function validate_field(field, isKeyUp, errors) {
var result = functions[i][0].apply(field[0], args);
if (result !== true) {
if (typeof result == 'string') {
result = [result];
result = [result];
}
$.merge(errors[field_id], result);
}
@ -403,7 +404,7 @@ function validate_field(field, isKeyUp, errors) {
* @param {boolean} isKeyUp
*/
function validate_field_and_fieldset(field, isKeyUp) {
field = $(field);
field = $(field);
var errors = {};
validate_field(field, isKeyUp, errors);
validate_fieldset(field.closest('fieldset'), isKeyUp, errors);
@ -416,7 +417,7 @@ function validate_field_and_fieldset(field, isKeyUp) {
* @param {Element} field
*/
function markField(field) {
field = $(field);
field = $(field);
var type = getFieldType(field);
var isDefault = checkFieldDefault(field, type);
@ -439,7 +440,7 @@ function setRestoreDefaultBtn(field, display) {
$(function() {
// register validators and mark custom values
var elements = $('input[id], select[id], textarea[id]');
var elements = $('input[id], select[id], textarea[id]');
$('input[id], select[id], textarea[id]').each(function(){
markField(this);
var el = $(this);
@ -450,35 +451,35 @@ $(function() {
var tagName = el.attr('tagName');
// text fields can be validated after each change
if (tagName == 'INPUT' && el.attr('type') == 'text') {
el.keyup(function() {
el.keyup(function() {
validate_field_and_fieldset(el, true);
markField(el);
});
}
// disable textarea spellcheck
if (tagName == 'TEXTAREA') {
el.attr('spellcheck', false);
el.attr('spellcheck', false);
}
});
// check whether we've refreshed a page and browser remembered modified
// form values
var check_page_refresh = $('#check_page_refresh');
if (check_page_refresh.length == 0 || check_page_refresh.val() == '1') {
// run all field validators
var errors = {};
for (var i = 0; i < elements.length; i++) {
validate_field(elements[i], false, errors);
}
// run all fieldset validators
$('fieldset').each(function(){
validate_fieldset(this, false, errors);
});
// check whether we've refreshed a page and browser remembered modified
// form values
var check_page_refresh = $('#check_page_refresh');
if (check_page_refresh.length == 0 || check_page_refresh.val() == '1') {
// run all field validators
var errors = {};
for (var i = 0; i < elements.length; i++) {
validate_field(elements[i], false, errors);
}
// run all fieldset validators
$('fieldset').each(function(){
validate_fieldset(this, false, errors);
});
displayErrors(errors);
} else if (check_page_refresh) {
check_page_refresh.val('1');
}
displayErrors(errors);
} else if (check_page_refresh) {
check_page_refresh.val('1');
}
});
//

View File

@ -14,7 +14,7 @@ require_once './libraries/Message.class.php';
*
* @package phpMyAdmin
*/
class RecentTable
class PMA_RecentTable
{
/**
* Defines the internal PMA table which contains recent tables.
@ -33,9 +33,9 @@ class RecentTable
public $tables;
/**
* RecentTable instance.
* PMA_RecentTable instance.
*
* @var RecentTable
* @var PMA_RecentTable
*/
private static $_instance;
@ -56,12 +56,12 @@ class RecentTable
/**
* Returns class instance.
*
* @return RecentTable
* @return PMA_RecentTable
*/
public static function getInstance()
{
if (is_null(self::$_instance)) {
self::$_instance = new RecentTable();
self::$_instance = new PMA_RecentTable();
}
return self::$_instance;
}

View File

@ -19,7 +19,7 @@ require_once './libraries/RecentTable.class.php';
* @param string $table The table name
*/
function PMA_addRecentTable($db, $table) {
$tmp_result = RecentTable::getInstance()->add($db, $table);
$tmp_result = PMA_RecentTable::getInstance()->add($db, $table);
if ($tmp_result === true) {
echo '<span class="hide" id="update_recent_tables"></span>';
} else {

View File

@ -60,7 +60,7 @@ require_once './libraries/RecentTable.class.php';
* Check if it is an ajax request to reload the recent tables list.
*/
if ($GLOBALS['is_ajax_request'] && $_REQUEST['recent_table']) {
PMA_ajaxResponse('', true, array('options' => RecentTable::getInstance()->getHtmlSelectOption()) );
PMA_ajaxResponse('', true, array('options' => PMA_RecentTable::getInstance()->getHtmlSelectOption()) );
}
// keep the offset of the db list in session before closing it
@ -193,7 +193,7 @@ require './libraries/navigation_header.inc.php';
// display recently used tables
if ($GLOBALS['cfg']['LeftRecentTable'] > 0) {
echo '<div id="recentTableList">';
echo RecentTable::getInstance()->getHtmlSelect();
echo PMA_RecentTable::getInstance()->getHtmlSelect();
echo '</div>';
}

View File

@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2011-05-18 07:46-0400\n"
"PO-Revision-Date: 2011-05-19 08:30+0200\n"
"PO-Revision-Date: 2011-05-25 12:05+0200\n"
"Last-Translator: <stoyanster@gmail.com>\n"
"Language-Team: bulgarian <bg@li.org>\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: bg\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.5\n"
@ -1763,7 +1763,7 @@ msgstr "Грешно име/парола. Достъп отказан."
#: libraries/auth/swekey/swekey.auth.lib.php:118
#, php-format
msgid "File %s does not contain any key id"
msgstr ""
msgstr "Файлът %s не съдържа идентификатор на ключ"
#: libraries/auth/swekey/swekey.auth.lib.php:157
#: libraries/auth/swekey/swekey.auth.lib.php:180
@ -2034,7 +2034,7 @@ msgstr ""
#: libraries/common.lib.php:1334 libraries/common.lib.php:1350
msgid "Profiling"
msgstr ""
msgstr "Профилиране"
#: libraries/common.lib.php:1355 libraries/tbl_triggers.lib.php:27
#: server_processlist.php:70
@ -2157,7 +2157,7 @@ msgstr "Разглеждане на компютъра:"
#: libraries/common.lib.php:2979
#, php-format
msgid "Select from the web server upload directory <b>%s</b>:"
msgstr ""
msgstr "Избор от директорията за качване <b>%s</b>:"
#: libraries/common.lib.php:2991 libraries/sql_query_form.lib.php:501
#: tbl_change.php:962
@ -2221,21 +2221,21 @@ msgstr "разширени INSERT-и"
#: libraries/config.values.php:121
msgid "both of the above"
msgstr ""
msgstr "и двете по-горе"
#: libraries/config.values.php:122
msgid "neither of the above"
msgstr ""
msgstr "никое от горните"
#: libraries/config/FormDisplay.class.php:83
#: libraries/config/validate.lib.php:422
msgid "Not a positive number"
msgstr ""
msgstr "Не е положително число"
#: libraries/config/FormDisplay.class.php:84
#: libraries/config/validate.lib.php:435
msgid "Not a non-negative number"
msgstr ""
msgstr "Не е неотрицателно число"
#: libraries/config/FormDisplay.class.php:85
#: libraries/config/validate.lib.php:409
@ -2295,7 +2295,7 @@ msgstr "най-много %s"
#: libraries/config/FormDisplay.tpl.php:173
msgid "This setting is disabled, it will not be applied to your configuration"
msgstr ""
msgstr "Тази настройка е изключена, тя няма да влияе на конфигурацията"
#: libraries/config/FormDisplay.tpl.php:173 libraries/relation.lib.php:89
#: libraries/relation.lib.php:96 pmd_relation_new.php:68
@ -2310,11 +2310,11 @@ msgstr "Стойност: %s"
#: libraries/config/FormDisplay.tpl.php:253
#: libraries/config/messages.inc.php:350
msgid "Restore default value"
msgstr ""
msgstr "Стойност по подразбиране"
#: libraries/config/FormDisplay.tpl.php:269
msgid "Allow users to customize this value"
msgstr ""
msgstr "Позволение на потребители да променят стойността"
#: libraries/config/FormDisplay.tpl.php:333
#: libraries/schema/User_Schema.class.php:470 prefs_manage.php:320
@ -2324,7 +2324,7 @@ msgstr "Изчистване"
#: libraries/config/messages.inc.php:17
msgid "Improves efficiency of screen refresh"
msgstr ""
msgstr "Подобрява ефективността при презареждане на екрана"
#: libraries/config/messages.inc.php:18
msgid "Enable Ajax"
@ -2352,7 +2352,7 @@ msgstr ""
#: libraries/config/messages.inc.php:23
msgid "Show &quot;Drop database&quot; link to normal users"
msgstr ""
msgstr "Показване връзката &quot;Изтриване БД&quot; на обикновени потребители"
#: libraries/config/messages.inc.php:24
msgid ""
@ -2362,11 +2362,11 @@ msgstr ""
#: libraries/config/messages.inc.php:25
msgid "Blowfish secret"
msgstr ""
msgstr "Тайна Blowfish фраза"
#: libraries/config/messages.inc.php:26
msgid "Highlight selected rows"
msgstr ""
msgstr "Изпъкване избрани редове"
#: libraries/config/messages.inc.php:27
msgid "Row marker"
@ -2374,7 +2374,7 @@ msgstr "Маркер на ред"
#: libraries/config/messages.inc.php:28
msgid "Highlight row pointed by the mouse cursor"
msgstr ""
msgstr "Изпъкване редовете, посочени с мишка"
#: libraries/config/messages.inc.php:29
msgid "Highlight pointer"
@ -2399,27 +2399,27 @@ msgstr ""
#: libraries/config/messages.inc.php:33
msgid "CHAR columns editing"
msgstr ""
msgstr "Редакция на CHAR колони"
#: libraries/config/messages.inc.php:34
msgid "Number of columns for CHAR/VARCHAR textareas"
msgstr ""
msgstr "Брой колони за CHAR/VARCHAR текстови полета"
#: libraries/config/messages.inc.php:35
msgid "CHAR textarea columns"
msgstr ""
msgstr "Колони за CHAR текство поле"
#: libraries/config/messages.inc.php:36
msgid "Number of rows for CHAR/VARCHAR textareas"
msgstr ""
msgstr "Брой редове за CHAR/VARCHAR текстови полета"
#: libraries/config/messages.inc.php:37
msgid "CHAR textarea rows"
msgstr ""
msgstr "Редове за CHAR текство поле"
#: libraries/config/messages.inc.php:38
msgid "Check config file permissions"
msgstr ""
msgstr "Проверка на правата върху конфигурационния файл"
#: libraries/config/messages.inc.php:39
msgid ""
@ -4381,10 +4381,9 @@ msgstr "MySQL 4.0 съвместимо"
#: libraries/display_create_database.lib.php:21
#: libraries/display_create_database.lib.php:39
#, fuzzy
#| msgid "Create new database"
msgid "Create database"
msgstr "Създаване нова БД"
msgstr "Създаване БД"
#: libraries/display_create_database.lib.php:33
msgid "Create"

View File

@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2011-05-18 07:46-0400\n"
"PO-Revision-Date: 2011-04-05 14:27+0200\n"
"Last-Translator: <rebeluca@gmail.com>\n"
"PO-Revision-Date: 2011-05-25 22:43+0200\n"
"Last-Translator: Rouslan Placella <rouslan@placella.com>\n"
"Language-Team: italian <it@li.org>\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: it\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.5\n"
@ -709,22 +709,19 @@ msgid "Analyze table"
msgstr "Analizza tabella"
#: db_structure.php:521
#, fuzzy
#| msgid "Go to table"
msgid "Add prefix to table"
msgstr "Vai alla tabella"
msgstr "Aggiungi prefisso alla tabella"
#: db_structure.php:523 libraries/mult_submits.inc.php:246
#, fuzzy
#| msgid "Replace table data with file"
msgid "Replace table prefix"
msgstr "Sostituisci i dati della tabella col file"
msgstr "Sostituisci il prefisso della tabella"
#: db_structure.php:525 libraries/mult_submits.inc.php:246
#, fuzzy
#| msgid "Replace table data with file"
msgid "Copy table with prefix"
msgstr "Sostituisci i dati della tabella col file"
msgstr "Copia tabella col prefisso"
#: db_structure.php:574 libraries/schema/User_Schema.class.php:387
msgid "Data Dictionary"
@ -977,16 +974,14 @@ msgid "You are about to DESTROY a complete database!"
msgstr "Si sta per DISTRUGGERE COMPLETAMENTE un intero database!"
#: js/messages.php:32
#, fuzzy
#| msgid "You are about to DESTROY a complete database!"
msgid "You are about to DESTROY a complete table!"
msgstr "Si sta per DISTRUGGERE COMPLETAMENTE un intero database!"
msgstr "Si sta per DISTRUGGERE COMPLETAMENTE un intera tabella!"
#: js/messages.php:33
#, fuzzy
#| msgid "You are about to DESTROY a complete database!"
msgid "You are about to TRUNCATE a complete table!"
msgstr "Si sta per DISTRUGGERE COMPLETAMENTE un intero database!"
msgstr "Si sta per DISTRUGGERE COMPLETAMENTE il contenuto della tabella!"
#: js/messages.php:34
msgid "Dropping Event"
@ -1124,33 +1119,31 @@ msgid "Searching"
msgstr "Ricerca in corso"
#: js/messages.php:84
#, fuzzy
#| msgid "Hide search criteria"
msgid "Hide search results"
msgstr "Nascondi criteri di ricerca"
msgstr "Nascondi i risultati della ricerca"
#: js/messages.php:85
#, fuzzy
#| msgid "Show search criteria"
msgid "Show search results"
msgstr "Mostra criteri di ricerca"
msgstr "Mostra i risultati della ricerca"
#: js/messages.php:86
#, fuzzy
#| msgid "Browse"
msgid "Browsing"
msgstr "Mostra"
msgstr "Navigazione"
#: js/messages.php:87
#, fuzzy
#| msgid "Deleting %s"
msgid "Deleting"
msgstr "Cancellazione in corso di %s"
msgstr "Cancellazione"
#: js/messages.php:90
msgid ""
"Note: If the file contains multiple tables, they will be combined into one"
msgstr ""
"Nota: Se il file contiene piú di una tabella, i dati saranno combinati in un "
"unica tabella"
#: js/messages.php:93
msgid "Hide query box"
@ -1220,6 +1213,8 @@ msgid ""
"You haven't saved the changes in the layout. They will be lost if you don't "
"save them.Do you want to continue?"
msgstr ""
"Non hai salvato i cambiamenti della disposizione. Questi cambiamenti saranno "
"persi se non li salvi. Vuoi procedere?"
#: js/messages.php:115
msgid "Add an option for column "
@ -1256,10 +1251,9 @@ msgid ", latest stable version:"
msgstr ", versione stabile piú recente:"
#: js/messages.php:129
#, fuzzy
#| msgid "Jump to database"
msgid "up to date"
msgstr "Vai al database"
msgstr "aggiornata"
#. l10n: Display text for calendar close link
#: js/messages.php:147
@ -4642,7 +4636,6 @@ msgstr "Compatibile con MySQL 4.0"
#: libraries/display_create_database.lib.php:21
#: libraries/display_create_database.lib.php:39
#, fuzzy
#| msgid "Create new database"
msgid "Create database"
msgstr "Crea un nuovo database"
@ -5976,14 +5969,13 @@ msgid "Convert to Kana"
msgstr "Converti a Kana"
#: libraries/mult_submits.inc.php:249
#, fuzzy
#| msgid "Fr"
msgid "From"
msgstr "Ve"
msgstr "Da"
#: libraries/mult_submits.inc.php:252
msgid "To"
msgstr ""
msgstr "A"
#: libraries/mult_submits.inc.php:257 libraries/mult_submits.inc.php:271
#: libraries/sql_query_form.lib.php:440
@ -5992,13 +5984,12 @@ msgstr "Invia"
#: libraries/mult_submits.inc.php:263
msgid "Add table prefix"
msgstr ""
msgstr "Aggiungi un prefisso alla tabella"
#: libraries/mult_submits.inc.php:266
#, fuzzy
#| msgid "Add index"
msgid "Add prefix"
msgstr "Aggiungi indice"
msgstr "Aggiungi prefisso"
#: libraries/mult_submits.inc.php:477 tbl_replace.php:331
msgid "No change"
@ -8056,10 +8047,10 @@ msgid "Unable to change master"
msgstr "Impossibile modificare il master"
#: server_replication.php:72
#, fuzzy, php-format
#, php-format
#| msgid "Master server changed succesfully to %s"
msgid "Master server changed successfully to %s"
msgstr "Il server master modificato a %s con successo"
msgstr "Il server master modificato con successo a %s"
#: server_replication.php:180
msgid "This server is configured as master in a replication process."
@ -9228,16 +9219,18 @@ msgid "Insecure connection"
msgstr "Connessione non sicura"
#: setup/frames/index.inc.php:92
#, fuzzy
#| msgid "Configuration storage"
msgid "Configuration saved."
msgstr "Configurazione di memorizzazione"
msgstr "Configurazione salvata."
#: setup/frames/index.inc.php:93
msgid ""
"Configuration saved to file config/config.inc.php in phpMyAdmin top level "
"directory, copy it to top level one and delete directory config to use it."
msgstr ""
"Configurazione salvata nel file config/config.inc.php nella cartella "
"principale di phpMyAdmin, copialo alla cartella principale a rimuovi la "
"cartella config per utilizzarlo."
#: setup/frames/index.inc.php:100 setup/frames/menu.inc.php:15
msgid "Overview"
@ -10102,22 +10095,21 @@ msgid "Version %s snapshot (SQL code)"
msgstr "Versione %s del snapshot (codice SQL)"
#: tbl_tracking.php:382
#, fuzzy
#| msgid "Track these data definition statements:"
msgid "Tracking data definition successfully deleted"
msgstr "Monitora le istuzioni delle definizioni dei dati:"
msgstr "Le definizioni dei dati di monitoraggio eliminati con successo"
#: tbl_tracking.php:384 tbl_tracking.php:401
#, fuzzy
#| msgid "Gather errors"
msgid "Query error"
msgstr "Accumula gli errori"
msgstr "Errore della query"
#: tbl_tracking.php:399
#, fuzzy
#| msgid "Track these data manipulation statements:"
msgid "Tracking data manipulation successfully deleted"
msgstr "Monitora le istuzioni delle manipulazioni dei dati:"
msgstr "Le manipolazioni dei dati di monitoraggio eliminati con successo"
#: tbl_tracking.php:411
msgid "Tracking statements"
@ -10135,10 +10127,9 @@ msgid "Delete tracking data row from report"
msgstr "Cancella dati di tracciamento per questa tabella"
#: tbl_tracking.php:443
#, fuzzy
#| msgid "No databases"
msgid "No data"
msgstr "Nessun database"
msgstr "Nessun dato"
#: tbl_tracking.php:453 tbl_tracking.php:510
msgid "Date"

View File

@ -197,7 +197,11 @@ if ($databases_count > 0) {
$odd_row = true;
foreach ($databases as $current) {
echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n";
$tr_class = $odd_row ? 'odd' : 'even';
if ($current['SCHEMA_NAME'] == 'mysql' || $current['SCHEMA_NAME'] == 'information_schema') {
$tr_class .= ' noclick';
}
echo '<tr class="' . $tr_class . '">' . "\n";
$odd_row = ! $odd_row;
list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, (isset($checkall) ? $checkall : ''), $url_query, $column_order, $replication_types, $replication_info);