From a21a18cf562925e256aa780024bc3674001ffcd3 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 4 Dec 2013 00:09:59 +0530 Subject: [PATCH 1/3] Scroll to view only when the item is not in view --- js/navigation.js | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/js/navigation.js b/js/navigation.js index 7b75628310..d7c3819895 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -294,14 +294,22 @@ function expandTreeNode($expandElem, callback) * Auto-scrolls the newly chosen database * * @param object $element The element to set to view - * @param object $container The container srollable element * */ -function scrollToView($element, $container) { - var pushToOffset = $element.offset().top - $container.offset().top + $container.scrollTop(); - $('#pma_navigation_tree_content').stop().animate({ - scrollTop: pushToOffset - }); +function scrollToView($element) { + var $container = $('#pma_navigation_tree_content'); + var elemTop = $element.offset().top - $container.offset().top; + var textHeight = 20; + var scrollPadding = 20; // extra padding from top of bottom when scrolling to view + if (elemTop < 0) { + $container.stop().animate({ + scrollTop: elemTop + $container.scrollTop() - scrollPadding + }); + } else if (elemTop + textHeight > $container.height()) { + $container.stop().animate({ + scrollTop: elemTop + textHeight - $container.height() + $container.scrollTop() + scrollPadding + }); + } } /** @@ -400,10 +408,10 @@ function PMA_showCurrentNavigation() if ($tableContainer.length > 0) { var $expander = $tableContainer.children('div:first').children('a.expander'); expandTreeNode($expander, function () { - scrollToView($dbItem, $('#pma_navigation_tree_content')); + scrollToView($dbItem); }); } else { - scrollToView($dbItem, $('#pma_navigation_tree_content')); + scrollToView($dbItem); } } } @@ -473,6 +481,9 @@ function PMA_showCurrentNavigation() } else { // no containers, highlight the item var $tableOrView = findLoadedItem($container, table, null, true); + if ($tableOrView){ + scrollToView($tableOrView); + } } } @@ -489,6 +500,9 @@ function PMA_showCurrentNavigation() $tableContainer.children('div.list_container'), table, 'table', true ); + if ($table) { + scrollToView($table); + } } else if ($viewContainer.length > 0) { highlightView($viewContainer, table); } @@ -519,12 +533,18 @@ function PMA_showCurrentNavigation() $viewContainer.children('div.list_container'), view, 'view', true ); + if ($view) { + scrollToView($view); + } }); } else { var $view = findLoadedItem( $viewContainer.children('div.list_container'), view, 'view', true ); + if ($view) { + scrollToView($view); + } } } } From eee6c9f6c0b9cc31ecde0a8f3d024ba2ebf13c5b Mon Sep 17 00:00:00 2001 From: Giovanni Sora Date: Wed, 4 Dec 2013 14:16:45 +0100 Subject: [PATCH 2/3] Translated using Weblate (Interlingua) Currently translated at 37.1% (1020 of 2742) --- po/ia.po | 100 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 48 deletions(-) diff --git a/po/ia.po b/po/ia.po index f12d93db7a..5fd13e21a6 100644 --- a/po/ia.po +++ b/po/ia.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1.0-rc1\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-11-25 16:19-0500\n" -"PO-Revision-Date: 2013-12-04 13:55+0200\n" +"PO-Revision-Date: 2013-12-04 14:16+0200\n" "Last-Translator: Giovanni Sora \n" "Language-Team: Interlingua " "\n" @@ -4974,7 +4974,7 @@ msgstr "Personalisa le modo de modificar" #: libraries/config/messages.inc.php:166 msgid "Export defaults" -msgstr "Exporta le predefinites" +msgstr "Exporta le valores predefinite" #: libraries/config/messages.inc.php:167 msgid "Customize default export options" @@ -4999,64 +4999,64 @@ msgstr "Importa valores predefinite" #: libraries/config/messages.inc.php:173 msgid "Customize default common import options" -msgstr "" +msgstr "Personalisa le optiones de importar commun predefinite" #: libraries/config/messages.inc.php:174 msgid "Import / export" -msgstr "" +msgstr "Importa / exporta" #: libraries/config/messages.inc.php:175 msgid "Set import and export directories and compression options" -msgstr "" +msgstr "Fixa le optiones de compression e le dossiers de importar e exportar" #: libraries/config/messages.inc.php:176 msgid "LaTeX" -msgstr "" +msgstr "LaTeX" #: libraries/config/messages.inc.php:179 msgid "Databases display options" -msgstr "" +msgstr "Optiones pro monstrar base de datos" #: libraries/config/messages.inc.php:180 setup/frames/menu.inc.php:21 msgid "Navigation panel" -msgstr "" +msgstr "Pannello de navigation" #: libraries/config/messages.inc.php:181 msgid "Customize appearance of the navigation panel" -msgstr "" +msgstr "Personalisa apparentia del pannello de navigation" #: libraries/config/messages.inc.php:182 libraries/select_server.lib.php:44 #: setup/frames/index.inc.php:141 msgid "Servers" -msgstr "" +msgstr "Servitores" #: libraries/config/messages.inc.php:183 msgid "Servers display options" -msgstr "" +msgstr "Optiones pro monstrar servitores" #: libraries/config/messages.inc.php:185 msgid "Tables display options" -msgstr "" +msgstr "Optiones pro monstrar tabellas" #: libraries/config/messages.inc.php:186 setup/frames/menu.inc.php:23 msgid "Main panel" -msgstr "" +msgstr "Pannello principal" #: libraries/config/messages.inc.php:187 msgid "Microsoft Office" -msgstr "" +msgstr "Microsoft Office" #: libraries/config/messages.inc.php:191 msgid "Other core settings" -msgstr "" +msgstr "Altere preferentias principal" #: libraries/config/messages.inc.php:192 msgid "Settings that didn't fit anywhere else" -msgstr "" +msgstr "Altere preferentias que on non pote poner in altere loco" #: libraries/config/messages.inc.php:193 msgid "Page titles" -msgstr "" +msgstr "Titulos de pagina" #: libraries/config/messages.inc.php:194 msgid "" @@ -5067,37 +5067,39 @@ msgstr "" #: libraries/config/messages.inc.php:195 #: libraries/navigation/NavigationHeader.class.php:216 msgid "Query window" -msgstr "" +msgstr "Fenestra de query" #: libraries/config/messages.inc.php:196 msgid "Customize query window options" -msgstr "" +msgstr "Personalisa le optiones de fenestra de query" #: libraries/config/messages.inc.php:197 msgid "Security" -msgstr "" +msgstr "Securitate" #: libraries/config/messages.inc.php:198 msgid "" "Please note that phpMyAdmin is just a user interface and its features do not " "limit MySQL" msgstr "" +"Pro favor tu nota que phpMyAdmin es solo un interfacie e su characteristicas " +"non limita MySQL" #: libraries/config/messages.inc.php:199 msgid "Basic settings" -msgstr "" +msgstr "Preferentias basic" #: libraries/config/messages.inc.php:200 msgid "Authentication" -msgstr "" +msgstr "Authentication" #: libraries/config/messages.inc.php:201 msgid "Authentication settings" -msgstr "" +msgstr "Preferentias de authentication" #: libraries/config/messages.inc.php:202 msgid "Server configuration" -msgstr "" +msgstr "Configuration del servitor" #: libraries/config/messages.inc.php:203 msgid "" @@ -5107,11 +5109,11 @@ msgstr "" #: libraries/config/messages.inc.php:204 msgid "Enter server connection parameters" -msgstr "" +msgstr "Inserta parametros de connexion del servitor" #: libraries/config/messages.inc.php:205 msgid "Configuration storage" -msgstr "" +msgstr "Immagazinage de configuration" #: libraries/config/messages.inc.php:206 msgid "" @@ -5122,7 +5124,7 @@ msgstr "" #: libraries/config/messages.inc.php:207 msgid "Changes tracking" -msgstr "" +msgstr "Traciamento de modificationes" #: libraries/config/messages.inc.php:208 msgid "" @@ -5132,40 +5134,40 @@ msgstr "" #: libraries/config/messages.inc.php:209 msgid "Customize export options" -msgstr "" +msgstr "Personalisa optiones de exportar" #: libraries/config/messages.inc.php:211 msgid "Customize import defaults" -msgstr "" +msgstr "Personalisa optiones predefinite de importar" #: libraries/config/messages.inc.php:212 msgid "Customize navigation panel" -msgstr "" +msgstr "Personalisa pannello de navigation" #: libraries/config/messages.inc.php:213 msgid "Customize main panel" -msgstr "" +msgstr "Personalisa pannello principal" #: libraries/config/messages.inc.php:214 libraries/config/messages.inc.php:219 #: setup/frames/menu.inc.php:19 msgid "SQL queries" -msgstr "" +msgstr "Queries de SQL" #: libraries/config/messages.inc.php:216 msgid "SQL Query box" -msgstr "" +msgstr "Quadro de Query de SQL" #: libraries/config/messages.inc.php:217 msgid "Customize links shown in SQL Query boxes" -msgstr "" +msgstr "Personalisa ligamines monstrate in le quadros de Query de SQL" #: libraries/config/messages.inc.php:220 msgid "SQL queries settings" -msgstr "" +msgstr "Preferentias de queries de SQL" #: libraries/config/messages.inc.php:221 msgid "SQL Validator" -msgstr "" +msgstr "Validator de SQL" #: libraries/config/messages.inc.php:222 msgid "" @@ -5177,55 +5179,57 @@ msgstr "" #: libraries/config/messages.inc.php:223 msgid "Startup" -msgstr "" +msgstr "Initiar" #: libraries/config/messages.inc.php:224 msgid "Customize startup page" -msgstr "" +msgstr "Personalisa le pagina de initiar" #: libraries/config/messages.inc.php:225 msgid "Database structure" -msgstr "" +msgstr "Structura de base de datos" #: libraries/config/messages.inc.php:226 msgid "Choose which details to show in the database structure (list of tables)" msgstr "" +"Selige qual detalios monstrar in le structura de base de datos (lista de " +"tabellas)" #: libraries/config/messages.inc.php:227 msgid "Table structure" -msgstr "" +msgstr "Structura de tabella" #: libraries/config/messages.inc.php:228 msgid "Settings for the table structure (list of columns)" -msgstr "" +msgstr "Preferentias del structura de tabella (lista de columnas)" #: libraries/config/messages.inc.php:229 msgid "Tabs" -msgstr "" +msgstr "Schedas" #: libraries/config/messages.inc.php:230 msgid "Choose how you want tabs to work" -msgstr "" +msgstr "Selige como tu vole que le schedas functiona" #: libraries/config/messages.inc.php:231 msgid "Text fields" -msgstr "" +msgstr "Campos de texto" #: libraries/config/messages.inc.php:232 msgid "Customize text input fields" -msgstr "" +msgstr "Personalisa le campos de ingresso de texto" #: libraries/config/messages.inc.php:233 msgid "Texy! text" -msgstr "" +msgstr "Texy! texto" #: libraries/config/messages.inc.php:235 msgid "Warnings" -msgstr "" +msgstr "Avisos" #: libraries/config/messages.inc.php:236 msgid "Disable some of the warnings shown by phpMyAdmin" -msgstr "" +msgstr "Dishabilita alcun avisos monstrate per phpMyAdmin" #: libraries/config/messages.inc.php:237 msgid "" From 9b40496c0b5f77dbc8daf673a7f2ec4e28bc3cc8 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 5 Dec 2013 07:08:17 +0530 Subject: [PATCH 3/3] Force scroll to top for databases --- js/navigation.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/navigation.js b/js/navigation.js index d7c3819895..bb46edddf8 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -294,14 +294,15 @@ function expandTreeNode($expandElem, callback) * Auto-scrolls the newly chosen database * * @param object $element The element to set to view + * @param boolean $forceToTop Whether to force scroll to top * */ -function scrollToView($element) { +function scrollToView($element, $forceToTop) { var $container = $('#pma_navigation_tree_content'); var elemTop = $element.offset().top - $container.offset().top; var textHeight = 20; var scrollPadding = 20; // extra padding from top of bottom when scrolling to view - if (elemTop < 0) { + if (elemTop < 0 || $forceToTop) { $container.stop().animate({ scrollTop: elemTop + $container.scrollTop() - scrollPadding }); @@ -408,10 +409,10 @@ function PMA_showCurrentNavigation() if ($tableContainer.length > 0) { var $expander = $tableContainer.children('div:first').children('a.expander'); expandTreeNode($expander, function () { - scrollToView($dbItem); + scrollToView($dbItem, true); }); } else { - scrollToView($dbItem); + scrollToView($dbItem, true); } } } @@ -482,7 +483,7 @@ function PMA_showCurrentNavigation() // no containers, highlight the item var $tableOrView = findLoadedItem($container, table, null, true); if ($tableOrView){ - scrollToView($tableOrView); + scrollToView($tableOrView, false); } } } @@ -501,7 +502,7 @@ function PMA_showCurrentNavigation() table, 'table', true ); if ($table) { - scrollToView($table); + scrollToView($table, false); } } else if ($viewContainer.length > 0) { highlightView($viewContainer, table); @@ -534,7 +535,7 @@ function PMA_showCurrentNavigation() view, 'view', true ); if ($view) { - scrollToView($view); + scrollToView($view, false); } }); } else { @@ -543,7 +544,7 @@ function PMA_showCurrentNavigation() view, 'view', true ); if ($view) { - scrollToView($view); + scrollToView($view, false); } } }