From be0c110591bbc56236e3d39e35cab4abbf99b4a2 Mon Sep 17 00:00:00 2001 From: ayushchd Date: Fri, 12 Apr 2013 20:22:34 +0530 Subject: [PATCH 001/218] Merged checkIsHttps() into isHttps() --- libraries/Config.class.php | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/libraries/Config.class.php b/libraries/Config.class.php index dfb24e38d2..5aa98ac230 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -91,7 +91,7 @@ class PMA_Config // other settings, independent from config file, comes in $this->checkSystem(); - $this->checkIsHttps(); + $this->isHttps(); } /** @@ -1473,16 +1473,6 @@ class PMA_Config } } - /** - * check for https - * - * @return void - */ - function checkIsHttps() - { - $this->set('is_https', $this->isHttps()); - } - /** * Checks if protocol is https * @@ -1494,13 +1484,13 @@ class PMA_Config */ public function isHttps() { - static $is_https = null; - if (null !== $is_https) { - return $is_https; + if (null !== $this->get('is_https')) { + return $this->get('is_https'); } $url = parse_url($this->get('PmaAbsoluteUri')); + $is_https = null; if (isset($url['scheme']) && $url['scheme'] == 'https') { $is_https = true; @@ -1508,6 +1498,8 @@ class PMA_Config $is_https = false; } + $this->set('is_https', $is_https); + return $is_https; } From 563c1f86a448bbd7853f2b3d877e63037da2941a Mon Sep 17 00:00:00 2001 From: ayushchd Date: Fri, 12 Apr 2013 21:10:36 +0530 Subject: [PATCH 002/218] Added type checking before setting a config value Previously, 'auto' and true were being considered as equal in the checkOutputCompression method and 'null' and false were being considered as equal in the isHttps method which is wrong. This commit fixes that --- libraries/Config.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 5aa98ac230..f6f331db9a 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -1178,7 +1178,7 @@ class PMA_Config function set($setting, $value) { if (! isset($this->settings[$setting]) - || $this->settings[$setting] != $value + || $this->settings[$setting] !== $value ) { $this->settings[$setting] = $value; $this->set_mtime = time(); From 62c6910116610bad5cbf572c2a84ca24a3cd80c9 Mon Sep 17 00:00:00 2001 From: ayushchd Date: Fri, 12 Apr 2013 21:11:03 +0530 Subject: [PATCH 003/218] Fixed config tests for https detection and output compression --- test/classes/PMA_Config_test.php | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/test/classes/PMA_Config_test.php b/test/classes/PMA_Config_test.php index c73343e678..7a80765e13 100644 --- a/test/classes/PMA_Config_test.php +++ b/test/classes/PMA_Config_test.php @@ -72,7 +72,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase $this->object->set('PMA_USR_BROWSER_AGENT', 'MOZILLA'); $this->object->set('PMA_USR_BROWSER_VER', 5); $this->object->checkOutputCompression(); - $this->assertEquals('auto', $this->object->get("OBGzip")); + $this->assertTrue($this->object->get("OBGzip")); } /** @@ -549,11 +549,13 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase public function testIsHttps() { + $this->object->set('is_https', null); $this->object->set('PmaAbsoluteUri', 'http://some_host.com/phpMyAdmin'); $this->assertFalse($this->object->isHttps()); - + + $this->object->set('is_https', null); $this->object->set('PmaAbsoluteUri', 'https://some_host.com/phpMyAdmin'); - $this->assertFalse($this->object->isHttps()); + $this->assertTrue($this->object->isHttps()); } public function testDetectHttps() @@ -631,21 +633,6 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase } } - /** - * Should check for https detection - * - * @return void - * - * @todo Implement testCheckIsHttps(). - */ - public function testCheckIsHttps() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - /** * Test for getting cookie path * From f3b9b90d77481385b3fe8d0ddf1111c5fa3609ae Mon Sep 17 00:00:00 2001 From: adamgsoc2013 Date: Sat, 13 Apr 2013 01:48:11 +0800 Subject: [PATCH 004/218] add test case for Table Class 1. testSetAndGet --- test/classes/PMA_Table_test.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/classes/PMA_Table_test.php b/test/classes/PMA_Table_test.php index bf87b5b9cc..7eb9a1a379 100644 --- a/test/classes/PMA_Table_test.php +++ b/test/classes/PMA_Table_test.php @@ -70,6 +70,26 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase $this->assertEquals('table3', $table->getName()); } + /** + * Test Set & Get + * + * @return void + */ + public function testSetAndGet() + { + $table = new PMA_Table('table1', 'pma_test'); + $table->set("production","Phpmyadmin"); + $table->set("db","mysql"); + $this->assertEquals( + "Phpmyadmin", + $table->get("production") + ); + $this->assertEquals( + "mysql", + $table->get("db") + ); + } + /** * Test getting columns * From e221e51f176e8a2533f7ea418357e34c6e05d44d Mon Sep 17 00:00:00 2001 From: Dong-bum Kim Date: Fri, 12 Apr 2013 07:21:21 +0200 Subject: [PATCH 005/218] Translated using Weblate (Korean) Currently translated at 55.2% (1414 of 2562) --- po/ko.po | 160 +++++++++++++++++++++++++------------------------------ 1 file changed, 74 insertions(+), 86 deletions(-) diff --git a/po/ko.po b/po/ko.po index 06f58694cd..443bff6f50 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.4-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2012-10-16 14:37+0200\n" -"PO-Revision-Date: 2013-04-09 19:27+0200\n" -"Last-Translator: Yungu Kim \n" +"PO-Revision-Date: 2013-04-12 07:21+0200\n" +"Last-Translator: Dong-bum Kim \n" "Language-Team: Korean \n" "Language: ko\n" "MIME-Version: 1.0\n" @@ -5632,24 +5632,23 @@ msgid "" msgstr "" #: libraries/display_import.lib.php:129 -#, fuzzy #| msgid "Cannot log in to the MySQL server" msgid "Importing into the current server" -msgstr "MySQL 서버에 로그인할 수 없습니다" +msgstr "현재 서버로 가져오기" #: libraries/display_import.lib.php:131 -#, fuzzy, php-format +#, php-format msgid "Importing into the database \"%s\"" -msgstr "데이터베이스가 없습니다" +msgstr "\"%s\" 데이터베이스로 가져오기" #: libraries/display_import.lib.php:133 -#, fuzzy, php-format +#, php-format msgid "Importing into the table \"%s\"" -msgstr "데이터베이스가 없습니다" +msgstr "\"%s\" 테이블로 가져오기" #: libraries/display_import.lib.php:139 msgid "File to Import:" -msgstr "" +msgstr "가져올 파일:" #: libraries/display_import.lib.php:156 #, php-format @@ -5664,7 +5663,7 @@ msgstr "" #: libraries/display_import.lib.php:178 msgid "File uploads are not allowed on this server." -msgstr "" +msgstr "이 서버에서는 파일 업로드가 허용되지 않습니다." #: libraries/display_import.lib.php:208 #, fuzzy @@ -5739,7 +5738,7 @@ msgstr "" #: libraries/display_tbl.lib.php:548 msgid "Sort by key" -msgstr "" +msgstr "키로 정렬" #: libraries/display_tbl.lib.php:627 libraries/export/codegen.php:41 #: libraries/export/csv.php:34 libraries/export/excel.php:37 @@ -5772,7 +5771,7 @@ msgstr "Full Texts" #: libraries/display_tbl.lib.php:667 msgid "Relational key" -msgstr "" +msgstr "관계키" #: libraries/display_tbl.lib.php:668 msgid "Relational display column" @@ -5784,7 +5783,7 @@ msgstr "" #: libraries/display_tbl.lib.php:677 msgid "Show BLOB contents" -msgstr "" +msgstr "BLOB 내용 보기" #: libraries/display_tbl.lib.php:687 #, fuzzy @@ -5850,7 +5849,7 @@ msgstr "뷰 생성" #: libraries/display_tbl.lib.php:2808 msgid "Link not found" -msgstr "" +msgstr "링크를 찾을 수 없습니다." #: libraries/engines/bdb.lib.php:20 main.php:236 msgid "Version information" @@ -5880,7 +5879,7 @@ msgstr "" #: libraries/engines/innodb.lib.php:32 msgid "Buffer pool size" -msgstr "" +msgstr "버퍼풀 크기" #: libraries/engines/innodb.lib.php:33 msgid "" @@ -5890,15 +5889,15 @@ msgstr "" #: libraries/engines/innodb.lib.php:130 msgid "Buffer Pool" -msgstr "" +msgstr "버퍼풀" #: libraries/engines/innodb.lib.php:131 server_status.php:652 msgid "InnoDB Status" -msgstr "" +msgstr "InnoDB 상태" #: libraries/engines/innodb.lib.php:153 msgid "Buffer Pool Usage" -msgstr "" +msgstr "버퍼풀 사용량" #: libraries/engines/innodb.lib.php:161 msgid "pages" @@ -5935,11 +5934,11 @@ msgstr "" #: libraries/engines/innodb.lib.php:218 msgid "Read requests" -msgstr "" +msgstr "읽기 요청" #: libraries/engines/innodb.lib.php:224 msgid "Write requests" -msgstr "" +msgstr "쓰기 요청" #: libraries/engines/innodb.lib.php:230 msgid "Read misses" @@ -6099,9 +6098,8 @@ msgid "" msgstr "" #: libraries/engines/pbms.lib.php:96 libraries/engines/pbxt.lib.php:127 -#, fuzzy msgid "Related Links" -msgstr "테이블 작업" +msgstr "연관 링크" #: libraries/engines/pbms.lib.php:98 msgid "The PrimeBase Media Streaming Blog by Barry Leslie" @@ -6113,7 +6111,7 @@ msgstr "" #: libraries/engines/pbxt.lib.php:22 msgid "Index cache size" -msgstr "" +msgstr "인덱스 캐시 크기" #: libraries/engines/pbxt.lib.php:23 msgid "" @@ -6134,7 +6132,7 @@ msgstr "" #: libraries/engines/pbxt.lib.php:32 msgid "Log cache size" -msgstr "" +msgstr "로그 캐시 크기" #: libraries/engines/pbxt.lib.php:33 msgid "" @@ -6289,9 +6287,8 @@ msgstr "" #: libraries/export/htmlword.php:28 libraries/export/latex.php:70 #: libraries/export/odt.php:56 libraries/export/sql.php:222 #: libraries/export/texytext.php:26 libraries/export/xml.php:73 -#, fuzzy msgid "Data dump options" -msgstr "데이터베이스 사용량 통계" +msgstr "데이터 덤프 옵션" #: libraries/export/htmlword.php:121 libraries/export/odt.php:173 #: libraries/export/sql.php:1188 libraries/export/texytext.php:109 @@ -6318,7 +6315,7 @@ msgstr "@TABLE@ 테이블 구조" #: libraries/export/latex.php:48 libraries/export/odt.php:40 #: libraries/export/sql.php:142 msgid "Object creation options" -msgstr "" +msgstr "객체 생성 옵션" #: libraries/export/latex.php:52 libraries/export/latex.php:76 msgid "Table caption (continued)" @@ -6338,7 +6335,7 @@ msgstr "열(칼럼) 설명(코멘트) 출력하기" #: libraries/export/latex.php:63 libraries/export/odt.php:49 #: libraries/export/sql.php:63 msgid "Display MIME types" -msgstr "" +msgstr "MIME 타입 출력" #: libraries/export/latex.php:132 libraries/export/sql.php:482 #: libraries/export/xml.php:131 libraries/header_printview.inc.php:59 @@ -6379,10 +6376,9 @@ msgid "(Generates a report containing the data of a single table)" msgstr "" #: libraries/export/pdf.php:25 -#, fuzzy #| msgid "Import files" msgid "Report title:" -msgstr "파일 가져오기" +msgstr "보고서 제목:" #: libraries/export/php_array.php:18 msgid "PHP array" @@ -6489,7 +6485,7 @@ msgstr "" #: libraries/export/sql.php:342 libraries/export/xml.php:45 #, fuzzy msgid "Procedures" -msgstr "프로세스 목록" +msgstr "프로시져" #: libraries/export/sql.php:359 libraries/export/xml.php:40 #, fuzzy @@ -6537,7 +6533,7 @@ msgstr "" #: libraries/export/xml.php:62 msgid "Views" -msgstr "" +msgstr "뷰" #: libraries/export/xml.php:78 msgid "Export contents" @@ -6550,7 +6546,7 @@ msgstr "새 창으로 phpMyAdmin 열기" #: libraries/gis_visualization.lib.php:134 msgid "No data found for GIS visualization." -msgstr "" +msgstr "GIS 시각화를 위한 데이터를 찾을 수 없습니다." #: libraries/header_http.inc.php:15 libraries/header_meta_style.inc.php:15 msgid "GLOBALS overwrite attempt" @@ -6588,9 +6584,9 @@ msgid "Edit structure by following the \"Structure\" link" msgstr "" #: libraries/import.lib.php:1106 -#, fuzzy, php-format +#, php-format msgid "Go to database: %s" -msgstr "데이터베이스가 없습니다" +msgstr "데이터베이스 이동: %s" #: libraries/import.lib.php:1109 libraries/import.lib.php:1132 #, php-format @@ -6598,9 +6594,9 @@ msgid "Edit settings for %s" msgstr "" #: libraries/import.lib.php:1127 -#, fuzzy, php-format +#, php-format msgid "Go to table: %s" -msgstr "데이터베이스가 없습니다" +msgstr "테이블 이동: %s" #: libraries/import.lib.php:1130 #, fuzzy, php-format @@ -6611,7 +6607,7 @@ msgstr "구조만" #: libraries/import.lib.php:1136 #, php-format msgid "Go to view: %s" -msgstr "" +msgstr "뷰로 이동: %s" #: libraries/import/csv.php:38 libraries/import/ods.php:33 msgid "" @@ -6772,7 +6768,7 @@ msgstr "바이너리" #: libraries/mysql_charsets.lib.php:224 msgid "Bulgarian" -msgstr "" +msgstr "불가리아어" #: libraries/mysql_charsets.lib.php:228 libraries/mysql_charsets.lib.php:353 msgid "Simplified Chinese" @@ -6784,11 +6780,11 @@ msgstr "" #: libraries/mysql_charsets.lib.php:234 libraries/mysql_charsets.lib.php:420 msgid "case-insensitive" -msgstr "" +msgstr "대소문자 구분안함" #: libraries/mysql_charsets.lib.php:237 libraries/mysql_charsets.lib.php:422 msgid "case-sensitive" -msgstr "" +msgstr "대소문자 구분" #: libraries/mysql_charsets.lib.php:240 msgid "Croatian" @@ -6796,7 +6792,7 @@ msgstr "크로아티아어" #: libraries/mysql_charsets.lib.php:243 msgid "Czech" -msgstr "" +msgstr "체코어" #: libraries/mysql_charsets.lib.php:246 msgid "Danish" @@ -6804,7 +6800,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:249 msgid "English" -msgstr "" +msgstr "영어" #: libraries/mysql_charsets.lib.php:252 msgid "Esperanto" @@ -6816,7 +6812,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:258 libraries/mysql_charsets.lib.php:261 msgid "German" -msgstr "" +msgstr "독일어" #: libraries/mysql_charsets.lib.php:258 #, fuzzy @@ -6829,7 +6825,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:264 msgid "Hungarian" -msgstr "" +msgstr "헝가리어" #: libraries/mysql_charsets.lib.php:267 msgid "Icelandic" @@ -6837,7 +6833,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:270 libraries/mysql_charsets.lib.php:360 msgid "Japanese" -msgstr "" +msgstr "일본어" #: libraries/mysql_charsets.lib.php:273 msgid "Latvian" @@ -6849,19 +6845,19 @@ msgstr "" #: libraries/mysql_charsets.lib.php:279 libraries/mysql_charsets.lib.php:382 msgid "Korean" -msgstr "" +msgstr "한국어" #: libraries/mysql_charsets.lib.php:282 msgid "Persian" -msgstr "" +msgstr "페르시아어" #: libraries/mysql_charsets.lib.php:285 msgid "Polish" -msgstr "" +msgstr "폴란드어" #: libraries/mysql_charsets.lib.php:288 libraries/mysql_charsets.lib.php:336 msgid "West European" -msgstr "" +msgstr "서유럽어" #: libraries/mysql_charsets.lib.php:291 msgid "Romanian" @@ -6885,7 +6881,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:306 libraries/mysql_charsets.lib.php:403 msgid "Swedish" -msgstr "" +msgstr "스웨덴어" #: libraries/mysql_charsets.lib.php:309 libraries/mysql_charsets.lib.php:406 msgid "Thai" @@ -6893,15 +6889,15 @@ msgstr "" #: libraries/mysql_charsets.lib.php:312 libraries/mysql_charsets.lib.php:400 msgid "Turkish" -msgstr "" +msgstr "터키어" #: libraries/mysql_charsets.lib.php:315 libraries/mysql_charsets.lib.php:397 msgid "Ukrainian" -msgstr "" +msgstr "우크라이나어" #: libraries/mysql_charsets.lib.php:318 libraries/mysql_charsets.lib.php:327 msgid "Unicode" -msgstr "" +msgstr "유니코드" #: libraries/mysql_charsets.lib.php:318 libraries/mysql_charsets.lib.php:327 #: libraries/mysql_charsets.lib.php:336 libraries/mysql_charsets.lib.php:343 @@ -6915,7 +6911,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:348 msgid "Russian" -msgstr "" +msgstr "러시아어" #: libraries/mysql_charsets.lib.php:365 msgid "Baltic" @@ -6931,11 +6927,11 @@ msgstr "" #: libraries/mysql_charsets.lib.php:379 msgid "Arabic" -msgstr "" +msgstr "아라비아어" #: libraries/mysql_charsets.lib.php:385 msgid "Hebrew" -msgstr "" +msgstr "히브리어" #: libraries/mysql_charsets.lib.php:388 msgid "Georgian" @@ -6943,7 +6939,7 @@ msgstr "" #: libraries/mysql_charsets.lib.php:391 msgid "Greek" -msgstr "" +msgstr "그리스어" #: libraries/mysql_charsets.lib.php:394 msgid "Czech-Slovak" @@ -6969,7 +6965,7 @@ msgstr "" #: libraries/plugin_interface.lib.php:309 msgid "This format has no options" -msgstr "" +msgstr "이 형식은 옵션이 없습니다." #: libraries/relation.lib.php:76 msgid "not OK" @@ -7242,10 +7238,9 @@ msgstr "마지막" #: libraries/rte/rte_events.lib.php:482 libraries/rte/rte_routines.lib.php:940 #: libraries/rte/rte_triggers.lib.php:373 -#, fuzzy #| msgid "Description" msgid "Definition" -msgstr "설명" +msgstr "정의" #: libraries/rte/rte_events.lib.php:488 #, fuzzy @@ -7844,10 +7839,9 @@ msgid "Clear" msgstr "" #: libraries/sql_query_form.lib.php:265 -#, fuzzy #| msgid "Column names" msgid "Columns" -msgstr "열(칼럼) 이름" +msgstr "열(컬럼)" #: libraries/sql_query_form.lib.php:300 sql.php:973 sql.php:990 msgid "Bookmark this SQL query" @@ -8039,7 +8033,7 @@ msgstr "출력하려면 적어도 1개 이상의 열(칼럼)을 선택해야 합 #: libraries/tbl_properties.inc.php:663 server_engines.php:54 #: tbl_operations.php:374 msgid "Storage Engine" -msgstr "" +msgstr "스토리지 엔진" #: libraries/tbl_properties.inc.php:692 msgid "PARTITION definition" @@ -8462,7 +8456,7 @@ msgstr "" #: pmd_general.php:147 tbl_change.php:324 tbl_change.php:330 msgid "Hide" -msgstr "" +msgstr "숨기기" #: pmd_general.php:170 msgid "Number of tables" @@ -8649,7 +8643,7 @@ msgstr "" #: prefs_manage.php:306 msgid "Existing settings will be overwritten!" -msgstr "" +msgstr "기존 설정에 덮여쓰여집니다!" #: prefs_manage.php:321 msgid "You can reset all your settings and restore them to default values." @@ -8669,10 +8663,9 @@ msgid "%s table not found or not set in %s" msgstr "" #: schema_export.php:39 -#, fuzzy #| msgid "The \"%s\" table doesn't exist!" msgid "File doesn't exist" -msgstr "\"%s\" 테이블이 존재하지 않습니다!" +msgstr "파일이 존재하지 않습니다." #: server_binlog.php:87 msgid "Select binary log to view" @@ -8690,7 +8683,7 @@ msgstr "" #: server_binlog.php:158 server_binlog.php:160 server_status.php:1261 #: server_status.php:1263 msgid "Show Full Queries" -msgstr "" +msgstr "전체 쿼리 보기" #: server_binlog.php:180 msgid "Log name" @@ -9251,7 +9244,7 @@ msgstr "" #: server_replication.php:182 server_status.php:627 msgid "Show master status" -msgstr "" +msgstr "마스터 상태 보기" #: server_replication.php:185 msgid "Show connected slaves" @@ -9441,9 +9434,8 @@ msgid "Flush (close) all tables" msgstr "" #: server_status.php:619 -#, fuzzy msgid "Show open tables" -msgstr "테이블 보기" +msgstr "열려있는 테이블 보기" #: server_status.php:624 msgid "Show slave hosts" @@ -9463,15 +9455,15 @@ msgstr "런타임 정보" #: server_status.php:791 msgid "All status variables" -msgstr "" +msgstr "모든 상태 변수" #: server_status.php:792 msgid "Monitor" -msgstr "" +msgstr "사용 현황" #: server_status.php:793 msgid "Advisor" -msgstr "" +msgstr "시스템 분석 / 조언" #: server_status.php:803 server_status.php:829 #, fuzzy @@ -10970,10 +10962,9 @@ msgid "Y-Axis label:" msgstr "" #: tbl_chart.php:149 -#, fuzzy #| msgid "Value" msgid "Y Values" -msgstr "값" +msgstr "Y값" #: tbl_create.php:31 #, fuzzy, php-format @@ -11139,10 +11130,9 @@ msgid "Flush the table (FLUSH)" msgstr "테이블 갱신 (캐시 삭제)" #: tbl_operations.php:697 -#, fuzzy #| msgid "Dumping data for table" msgid "Delete data or table" -msgstr "테이블의 덤프 데이터" +msgstr "데이터나 테이블 삭제" #: tbl_operations.php:714 msgid "Empty the table (TRUNCATE)" @@ -11183,7 +11173,7 @@ msgstr "복구" #: tbl_operations.php:787 msgid "Remove partitioning" -msgstr "" +msgstr "파티셔닝 삭제" #: tbl_operations.php:813 msgid "Check referential integrity:" @@ -11645,9 +11635,8 @@ msgid "The slow query rate should be below 5%%, your value is %s%%." msgstr "" #: po/advisory_rules.php:20 -#, fuzzy msgid "Slow query rate" -msgstr "SQL 질의" +msgstr "속도저하 쿼리 비율" #: po/advisory_rules.php:21 msgid "" @@ -11681,7 +11670,7 @@ msgstr "" #: po/advisory_rules.php:28 #, php-format msgid "long_query_time is currently set to %ds." -msgstr "" +msgstr "long_query_time이 %d초로 설정되었습니다." #: po/advisory_rules.php:30 msgid "Slow query logging" @@ -11746,10 +11735,9 @@ msgid "You should upgrade, to a stable version of MySQL 5.5" msgstr "MySQL 5.5 안정 버전으로 업그레이드하시는 것을 권장합니다" #: po/advisory_rules.php:50 po/advisory_rules.php:55 po/advisory_rules.php:60 -#, fuzzy #| msgid "Description" msgid "Distribution" -msgstr "설명" +msgstr "배포" #: po/advisory_rules.php:51 msgid "Version is compiled from source, not a MySQL official binary." @@ -11772,7 +11760,7 @@ msgstr "" #: po/advisory_rules.php:57 msgid "Percona documentation is at http://www.percona.com/docs/wiki/" -msgstr "" +msgstr "Percona에 관한 문서는 http://www.percona.com/docs/wiki/ 에서 찾을 수 있습니다." #: po/advisory_rules.php:58 msgid "'percona' found in version_comment" From 637be71f0ce71a393079007c330cc53cf4fff858 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sat, 13 Apr 2013 17:23:35 +0530 Subject: [PATCH 006/218] Allow loading map tiles when HTTPS is not used --- libraries/Header.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/libraries/Header.class.php b/libraries/Header.class.php index c248bbe792..c7dd024eba 100644 --- a/libraries/Header.class.php +++ b/libraries/Header.class.php @@ -439,6 +439,9 @@ class PMA_Header */ public function sendHttpHeaders() { + $https = $GLOBALS['PMA_Config']->isHttps(); + $mapTilesUrls = ' *.tile.openstreetmap.org *.tile.opencyclemap.org'; + /** * Sends http headers */ @@ -447,7 +450,9 @@ class PMA_Header header( "X-Content-Security-Policy: allow 'self';" . "options inline-script eval-script;" - . "img-src 'self' data:; " + . "img-src 'self' data:" + . ($https ? "" : $mapTilesUrls) + . ";" ); if (PMA_USR_BROWSER_AGENT == 'SAFARI' && PMA_USR_BROWSER_VER < '6.0.0' @@ -455,13 +460,18 @@ class PMA_Header header( "X-WebKit-CSP: allow 'self';" . "options inline-script eval-script;" - . "img-src 'self' data:; " + . "img-src 'self' data:" + . ($https ? "" : $mapTilesUrls) + . ";" ); } else { header( "X-WebKit-CSP: default-src 'self';" . "script-src 'self' 'unsafe-inline' 'unsafe-eval';" - . "style-src 'self' 'unsafe-inline'" + . "style-src 'self' 'unsafe-inline';" + . "img-src 'self' data:" + . ($https ? "" : $mapTilesUrls) + . ";" ); } } From 1a459f357544e225830a8878fafe775ba297284c Mon Sep 17 00:00:00 2001 From: Kasun Chathuranga Date: Sat, 13 Apr 2013 23:19:49 +0530 Subject: [PATCH 007/218] Fix incorrect listing of records from to count --- ChangeLog | 1 + libraries/Util.class.php | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f24e73694..6f392f5ea7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -104,6 +104,7 @@ underscore - bug #3865 Using like operator on each backslash needs 4 backslash protection - bug #3860 Displayed git revision info is not set - bug #3871 Check referential integrity broken across databases +- bug #3683 Incorrect listing of records from to count 3.5.9.0 (not yet released) diff --git a/libraries/Util.class.php b/libraries/Util.class.php index fb994285be..f9048e9b25 100644 --- a/libraries/Util.class.php +++ b/libraries/Util.class.php @@ -3959,10 +3959,18 @@ class PMA_Util public static function analyzeLimitClause($limit_clause) { $start_and_length = explode(',', str_ireplace('LIMIT', '', $limit_clause)); - return array( - 'start' => trim($start_and_length[0]), - 'length' => trim($start_and_length[1]) - ); + $size = count($start_and_length); + if ($size == 1) { + return array( + 'start' => '0', + 'length' => trim($start_and_length[0]) + ); + } elseif ($size == 2) { + return array( + 'start' => trim($start_and_length[0]), + 'length' => trim($start_and_length[1]) + ); + } } /** From 01403a1ba6bce85a9b379cf37988b3b3c3fc3516 Mon Sep 17 00:00:00 2001 From: Ahmad Zulhilmi Idris Date: Fri, 12 Apr 2013 12:14:32 +0200 Subject: [PATCH 008/218] Translated using Weblate (Malay) Currently translated at 15.8% (406 of 2562) --- po/ms.po | 96 ++++++++++++++++++++++++++------------------------------ 1 file changed, 44 insertions(+), 52 deletions(-) diff --git a/po/ms.po b/po/ms.po index e9393345d7..5f0f8a2ea4 100644 --- a/po/ms.po +++ b/po/ms.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.4-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2012-10-16 14:37+0200\n" -"PO-Revision-Date: 2013-03-27 09:12+0200\n" +"PO-Revision-Date: 2013-04-12 12:14+0200\n" "Last-Translator: Ahmad Zulhilmi Idris \n" "Language-Team: Malay \n" "Language: ms\n" @@ -742,8 +742,9 @@ msgid "Data Dictionary" msgstr "Kamus Data" #: db_tracking.php:80 +#, fuzzy msgid "Tracked tables" -msgstr "" +msgstr "Jadual dikesan" #: db_tracking.php:85 libraries/config/messages.inc.php:504 #: libraries/export/htmlword.php:78 libraries/export/latex.php:156 @@ -760,16 +761,15 @@ msgstr "Pangkalan Data" #: db_tracking.php:87 msgid "Last version" -msgstr "" +msgstr "Versi terakhir" #: db_tracking.php:88 tbl_tracking.php:651 -#, fuzzy msgid "Created" -msgstr "Cipta" +msgstr "Dibina" #: db_tracking.php:89 tbl_tracking.php:652 msgid "Updated" -msgstr "" +msgstr "dikemaskini" #: db_tracking.php:90 js/messages.php:189 libraries/rte/rte_events.lib.php:397 #: libraries/rte/rte_list.lib.php:67 libraries/server_links.inc.php:51 @@ -786,44 +786,42 @@ msgid "Action" msgstr "Aksi" #: db_tracking.php:102 js/messages.php:34 +#, fuzzy msgid "Delete tracking data for this table" -msgstr "" +msgstr "Padam mengesan data untuk jadual ini" #: db_tracking.php:120 tbl_tracking.php:605 tbl_tracking.php:663 msgid "active" -msgstr "" +msgstr "aktif" #: db_tracking.php:122 tbl_tracking.php:607 tbl_tracking.php:665 msgid "not active" -msgstr "" +msgstr "tidak aktif" #: db_tracking.php:135 -#, fuzzy msgid "Versions" -msgstr "Operasi" +msgstr "Versi" #: db_tracking.php:136 tbl_tracking.php:415 tbl_tracking.php:683 msgid "Tracking report" -msgstr "" +msgstr "Laporan penjejak" #: db_tracking.php:137 tbl_tracking.php:235 tbl_tracking.php:685 -#, fuzzy msgid "Structure snapshot" -msgstr "Struktur sahaja" +msgstr "Paparan struktur" #: db_tracking.php:183 +#, fuzzy msgid "Untracked tables" -msgstr "" +msgstr "Jadual terlacak" #: db_tracking.php:201 tbl_structure.php:655 -#, fuzzy msgid "Track table" -msgstr "Periksa Jadual" +msgstr "Kesan jadual" #: db_tracking.php:227 -#, fuzzy msgid "Database Log" -msgstr "Pangkalan Data" +msgstr "Log Pangkalan Data" #: enum_editor.php:23 js/messages.php:272 #: libraries/rte/rte_routines.lib.php:707 @@ -851,7 +849,7 @@ msgstr "Tambah Pengguna Baru" #: enum_editor.php:99 gis_data_editor.php:317 msgid "Output" -msgstr "" +msgstr "Hasil" #: enum_editor.php:100 msgid "Copy and paste the joined values into the \"Length/Values\" field" @@ -861,127 +859,121 @@ msgstr "" #, fuzzy #| msgid "Bar type" msgid "Bad type!" -msgstr "Jenis Kueri" +msgstr "Jenis tidak sesuai!" #: export.php:77 msgid "Selected export type has to be saved in file!" -msgstr "" +msgstr "Pilihan jenis eksport haruslah disimpan di dalam fail!" #: export.php:106 -#, fuzzy msgid "Bad parameters!" -msgstr "Tukarnama jadual ke" +msgstr "Parameter tidak sesuai!" #: export.php:166 export.php:191 export.php:652 #, php-format msgid "Insufficient space to save the file %s." -msgstr "" +msgstr "Kekurangan ruang untuk menyimpan fail %s." #: export.php:307 #, php-format msgid "" "File %s already exists on server, change filename or check overwrite option." msgstr "" +"Fail %s telah wujud di pelayan, sila tukar nama fail atau menyemak pilihan " +"menulis semula." #: export.php:311 export.php:315 #, php-format msgid "The web server does not have permission to save the file %s." -msgstr "" +msgstr "Pelayan web tidak mempunyai kebenaran untuk menyipan fail %s." #: export.php:654 #, php-format msgid "Dump has been saved to file %s." -msgstr "" +msgstr "Longgokan telah disimpan ke fail %s." #: file_echo.php:21 -#, fuzzy #| msgid "Export" msgid "Invalid export type" -msgstr "Eksport" +msgstr "Jenis eksport tidak sah" #: gis_data_editor.php:84 #, php-format msgid "Value for the column \"%s\"" -msgstr "" +msgstr "Nilai pada kolum \"%s\"" #: gis_data_editor.php:113 tbl_gis_visualization.php:172 msgid "Use OpenStreetMaps as Base Layer" -msgstr "" +msgstr "Menggunakan OpenStreetMaps sebagai Base Layer" #: gis_data_editor.php:134 msgid "SRID" -msgstr "" +msgstr "SRID" #: gis_data_editor.php:151 js/messages.php:326 #: libraries/display_tbl.lib.php:693 msgid "Geometry" -msgstr "" +msgstr "Geometri" #: gis_data_editor.php:172 js/messages.php:322 msgid "Point" -msgstr "" +msgstr "Titik" #: gis_data_editor.php:173 gis_data_editor.php:197 gis_data_editor.php:245 #: gis_data_editor.php:297 js/messages.php:320 msgid "X" -msgstr "" +msgstr "X" #: gis_data_editor.php:175 gis_data_editor.php:199 gis_data_editor.php:247 #: gis_data_editor.php:299 js/messages.php:321 msgid "Y" -msgstr "" +msgstr "Y" #: gis_data_editor.php:195 gis_data_editor.php:243 gis_data_editor.php:295 #: js/messages.php:323 #, php-format msgid "Point %d" -msgstr "" +msgstr "Titik %d" #: gis_data_editor.php:204 gis_data_editor.php:250 gis_data_editor.php:302 #: js/messages.php:329 -#, fuzzy msgid "Add a point" -msgstr "Tambah medan baru" +msgstr "Tambah titik" #: gis_data_editor.php:220 js/messages.php:324 -#, fuzzy #| msgid "Lines terminated by" msgid "Linestring" -msgstr "Baris ditamatkan oleh" +msgstr "Rentetan talian" #: gis_data_editor.php:223 gis_data_editor.php:279 js/messages.php:328 msgid "Outer Ring" -msgstr "" +msgstr "Lingkaran Luar" #: gis_data_editor.php:225 gis_data_editor.php:281 js/messages.php:327 msgid "Inner Ring" -msgstr "" +msgstr "Lingkaran Dalaman" #: gis_data_editor.php:252 -#, fuzzy #| msgid "Add a new User" msgid "Add a linestring" -msgstr "Tambah Pengguna Baru" +msgstr "Tambah Rentetan Talian" #: gis_data_editor.php:252 gis_data_editor.php:304 js/messages.php:330 -#, fuzzy #| msgid "Add a new User" msgid "Add an inner ring" -msgstr "Tambah Pengguna Baru" +msgstr "Tambah lingkaran dalaman" #: gis_data_editor.php:266 js/messages.php:325 msgid "Polygon" -msgstr "" +msgstr "Poligon" #: gis_data_editor.php:306 js/messages.php:331 -#, fuzzy msgid "Add a polygon" -msgstr "Tambah medan baru" +msgstr "Tambah poligon baru" #: gis_data_editor.php:310 -#, fuzzy msgid "Add geometry" -msgstr "Tambah Pengguna Baru" +msgstr "Tambah geometri" #: gis_data_editor.php:318 msgid "" From 050d6d31aacaa62639a77921d47b06db0b51518c Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 14 Apr 2013 14:46:00 +0200 Subject: [PATCH 009/218] Fix bug #3874 [export] No preselected option when exporting table --- ChangeLog | 1 + libraries/display_export.lib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5f24e73694..7f21b59f07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -104,6 +104,7 @@ underscore - bug #3865 Using like operator on each backslash needs 4 backslash protection - bug #3860 Displayed git revision info is not set - bug #3871 Check referential integrity broken across databases +- bug #3874 [export] No preselected option when exporting table 3.5.9.0 (not yet released) diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index ae236dbe15..9e162a05e7 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -187,7 +187,7 @@ if (strlen($table) && ! isset($num_tables) && ! PMA_Table::isMerge($db, $table)) echo ''; echo '
  • '; echo ''; From 534fd022318e97a7340ea7f58a795ba2685b9b16 Mon Sep 17 00:00:00 2001 From: Julio Guerra Date: Sat, 13 Apr 2013 18:37:09 +0200 Subject: [PATCH 010/218] Translated using Weblate (Galician) Currently translated at 99.3% (2588 of 2605) --- po/gl.po | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/po/gl.po b/po/gl.po index e1432c0d65..b4d7dc9fdc 100644 --- a/po/gl.po +++ b/po/gl.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.0.0-rc1\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-04-03 10:24+0200\n" -"PO-Revision-Date: 2013-04-04 12:28+0200\n" -"Last-Translator: frandieguez \n" +"PO-Revision-Date: 2013-04-13 18:37+0200\n" +"Last-Translator: Julio Guerra \n" "Language-Team: Galician \n" "Language: gl\n" "MIME-Version: 1.0\n" @@ -738,10 +738,9 @@ msgid "Server" msgstr "Servidor" #: index.php:240 -#, fuzzy #| msgid "Server port" msgid "Server type" -msgstr "Porto do servidor" +msgstr "Tipo do servidor" #: index.php:244 libraries/plugins/export/ExportLatex.class.php:225 #: libraries/plugins/export/ExportSql.class.php:612 From f1513b26786e5be3fbe6db96c6fda67fe60021cb Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 14 Apr 2013 15:32:34 +0200 Subject: [PATCH 011/218] Fix bug #3873 Can't copy table to target database if table exists there --- ChangeLog | 1 + libraries/Table.class.php | 4 ++-- libraries/operations.lib.php | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7f21b59f07..39e9d01628 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,6 +105,7 @@ underscore - bug #3860 Displayed git revision info is not set - bug #3871 Check referential integrity broken across databases - bug #3874 [export] No preselected option when exporting table +- bug #3873 Can't copy table to target database if table exists there 3.5.9.0 (not yet released) diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 963f2958fc..a9f2c40ba7 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -840,8 +840,8 @@ class PMA_Table $sql_structure = PMA_SQP_formatHtml($parsed_sql, 'query_only'); // If table exists, and 'add drop table' is selected: Drop it! $drop_query = ''; - if (isset($GLOBALS['drop_if_exists']) - && $GLOBALS['drop_if_exists'] == 'true' + if (isset($_REQUEST['drop_if_exists']) + && $_REQUEST['drop_if_exists'] == 'true' ) { if (PMA_Table::isView($target_db, $target_table)) { $drop_query = 'DROP VIEW'; diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 5c45607488..737c3642ed 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -541,11 +541,11 @@ function PMA_handleTheViews($views, $move, $db) $_error = false; // temporarily force to add DROP IF EXIST to CREATE VIEW query, // to remove stand-in VIEW that was created earlier - // ( $GLOBALS['drop_if_exists'] is used in moveCopy() ) - if (isset($GLOBALS['drop_if_exists'])) { - $temp_drop_if_exists = $GLOBALS['drop_if_exists']; + // ( $_REQUEST['drop_if_exists'] is used in moveCopy() ) + if (isset($_REQUEST['drop_if_exists'])) { + $temp_drop_if_exists = $_REQUEST['drop_if_exists']; } - $GLOBALS['drop_if_exists'] = 'true'; + $_REQUEST['drop_if_exists'] = 'true'; foreach ($views as $view) { $copying_succeeded = PMA_Table::moveCopy( @@ -556,10 +556,10 @@ function PMA_handleTheViews($views, $move, $db) break; } } - unset($GLOBALS['drop_if_exists']); + unset($_REQUEST['drop_if_exists']); if (isset($temp_drop_if_exists)) { // restore previous value - $GLOBALS['drop_if_exists'] = $temp_drop_if_exists; + $_REQUEST['drop_if_exists'] = $temp_drop_if_exists; } return $_error; } From d392c6ff2632b42559a24cc42b715c8b47ad577a Mon Sep 17 00:00:00 2001 From: zz zz Date: Sun, 14 Apr 2013 15:17:59 +0200 Subject: [PATCH 012/218] Translated using Weblate (Simplified Chinese) Currently translated at 99.7% (2598 of 2605) --- po/zh_CN.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index 2f92eb4732..4aded883ec 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.0.0-rc1\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-04-03 10:24+0200\n" -"PO-Revision-Date: 2013-04-10 04:51+0200\n" -"Last-Translator: likyh \n" +"PO-Revision-Date: 2013-04-14 15:17+0200\n" +"Last-Translator: zz zz \n" "Language-Team: Simplified Chinese " "\n" "Language: zh_CN\n" @@ -6944,7 +6944,7 @@ msgstr "简体中文" #: libraries/mysql_charsets.lib.php:257 libraries/mysql_charsets.lib.php:400 msgid "Traditional Chinese" -msgstr "正体中文" +msgstr "繁体中文" #: libraries/mysql_charsets.lib.php:261 libraries/mysql_charsets.lib.php:447 msgid "case-insensitive" @@ -7895,7 +7895,7 @@ msgstr "MediaWiki 表" #, php-format #| msgid "Invalid format of CSV input on line %d." msgid "Invalid format of mediawiki input on line:
    %s." -msgstr "第 %s 行mediawiki输入格式有错。" +msgstr "第 %s 行mediawiki输入格式有错." #: libraries/plugins/import/ImportOds.class.php:88 msgid "Import percentages as proper decimals (ex. 12.00% to .12)" @@ -7952,7 +7952,7 @@ msgstr "XML" #: libraries/plugins/import/ShapeRecord.class.php:58 #, php-format msgid "Geometry type '%s' is not supported by MySQL." -msgstr "" +msgstr "不被MySQL支持的几何类型 '%s'." #: libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php:32 msgid "" @@ -9441,7 +9441,6 @@ msgid "Move columns" msgstr "移动字段" #: libraries/structure.lib.php:1426 -#, fuzzy msgid "Move the columns by dragging them up and down." msgstr "请通过拖拽来移动字段的位置。" @@ -9634,8 +9633,9 @@ msgid "As defined:" msgstr "定义:" #: libraries/tbl_columns_definition_form.inc.php:634 +#, fuzzy msgid "first" -msgstr "" +msgstr "第一" #: libraries/tbl_columns_definition_form.inc.php:644 #, php-format @@ -9706,7 +9706,6 @@ msgid "View in fullscreen" msgstr "全屏查看" #: pmd_general.php:90 -#, fuzzy msgid "Exit fullscreen" msgstr "退出全屏" @@ -10979,10 +10978,11 @@ msgstr "" "可能设置得太小了。缓存缺失率可以由 Key_reads/Key_read_requests 计算得出。" #: server_status_variables.php:609 +#, fuzzy msgid "" "Key cache miss calculated as rate of physical reads compared to read " "requests (calculated value)" -msgstr "" +msgstr "由物理读取数与读取请求数相比计算出的键缓存未命中率(计算值)" #: server_status_variables.php:613 msgid "The number of requests to write a key block to the cache." @@ -10995,7 +10995,7 @@ msgstr "将键块物理写入到磁盘的次数。" #: server_status_variables.php:619 msgid "" "Percentage of physical writes compared to write requests (calculated value)" -msgstr "" +msgstr "物理写入数与写入请求数的百分比比值(计算值)" #: server_status_variables.php:623 msgid "" From 1e1354faca3d8193a312cecfc5bb7d9ae250a70e Mon Sep 17 00:00:00 2001 From: "J.M" Date: Sun, 14 Apr 2013 15:41:46 +0200 Subject: [PATCH 013/218] Fix spacing in table operations, Alter table order box --- libraries/operations.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/operations.lib.php b/libraries/operations.lib.php index 737c3642ed..0e331c82bc 100644 --- a/libraries/operations.lib.php +++ b/libraries/operations.lib.php @@ -625,7 +625,7 @@ function PMA_getHtmlForOrderTheTable($columns) . 'value="' . htmlspecialchars($fieldname['Field']) . '">' . htmlspecialchars($fieldname['Field']) . '' . "\n"; } - $html_output .= ' ' . __('(singly)') + $html_output .= ' ' . __('(singly)') . ' ' . '' . "\n"; + $html .= '' + . "\n"; } -echo ''; -echo "\n"; +$html .= ''; +$html .= "\n"; // If the export method was not set, the default is quick if (isset($_GET['export_method'])) { @@ -77,30 +81,30 @@ if (isset($_GET['export_method'])) { $cfg['Export']['method'] = 'quick'; } // The export method (quick, custom or custom-no-form) -echo ''; if (isset($_GET['sql_query'])) { - echo '' . "\n"; } elseif (! empty($sql_query)) { - echo '' . "\n"; } -echo ''; if (isset($_GET['quick_or_custom'])) { $export_method = $_GET['quick_or_custom']; @@ -108,162 +112,163 @@ if (isset($_GET['quick_or_custom'])) { $export_method = $cfg['Export']['method']; } -echo '
    '; -echo '

    ' . __('Export Method:') . '

    '; -echo '
      '; -echo '
    • '; -echo ''; +$html .= '
        '; +$html .= '
      • '; +$html .= ''; -echo ''; -echo '
      • '; +$html .= ' />'; +$html .= ''; +$html .= ''; -echo '
      • '; -echo ''; -echo ''; -echo '
      • '; +$html .= ' />'; +$html .= ''; +$html .= ''; -echo '
      '; -echo '
    '; +$html .= ''; +$html .= ''; -echo '
    '; +$html .= '
    '; if ($export_type == 'server') { - echo '

    ' . __('Database(s):') . '

    '; + $html .= '

    ' . __('Database(s):') . '

    '; } else if ($export_type == 'database') { - echo '

    ' . __('Table(s):') . '

    '; + $html .= '

    ' . __('Table(s):') . '

    '; } if (! empty($multi_values)) { - echo $multi_values; + $html .= $multi_values; } -echo '
    '; +$html .= '
    '; if (strlen($table) && ! isset($num_tables) && ! PMA_Table::isMerge($db, $table)) { - echo '
    '; - echo '

    ' . __('Rows:') . '

    '; - echo '
      '; - echo '
    • '; - echo ''; + $html .= '
        '; + $html .= '
      • '; + $html .= ''; - echo ''; - echo '
          '; - echo '
        • '; - echo ''; - echo '' . __('Dump some row(s)') . ''; + $html .= '
            '; + $html .= '
          • '; + $html .= ''; + $html .= ''; - echo '
          • '; - echo '
          • '; - echo ''; - echo ''; + $html .= '
          • '; + $html .= '
          • '; + $html .= ''; + $html .= ''; - echo '
          • '; - echo '
          '; - echo '
        • '; - echo '
        • '; - echo ''; - echo ' '; - echo '
        • '; - echo '
        '; - echo '
    '; + $html .= '/>'; + $html .= ' '; + $html .= '
  • '; + $html .= ''; + $html .= ''; } if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { - echo '
    '; - echo '

    ' . __('Output:') . '

    '; - echo '
      '; - echo '
    • '; - echo ''; - echo ''; + $html .= '
    • '; + $html .= '
    • '; + $html .= ''; -echo '

      ' . __('Output:') . '

      '; -echo '
        '; -echo '
      • '; -echo ''; +$html .= '
          '; +$html .= '
        • '; +$html .= ''; -echo ''; -echo '
            '; +$html .= '/>'; +$html .= ''; +$html .= '
              '; if (isset($cfg['SaveDir']) && !empty($cfg['SaveDir'])) { - echo '
            • '; - echo ''; - echo '
            • '; + $html .= '%s'), htmlspecialchars(PMA_Util::userDir($cfg['SaveDir'])) ); - echo ''; - echo '
            • '; - echo '
            • '; - echo ''; - echo ''; - echo '
            • '; + $html .= ''; + $html .= ''; + $html .= '
            • '; + $html .= ''; -echo '
            • '; +$html .= ''; -echo 'getUserValue( 'pma_db_filename_template', $GLOBALS['cfg']['Export']['file_template_database'] ) ); } elseif ($export_type == 'table') { - echo htmlspecialchars( + $html .= htmlspecialchars( $GLOBALS['PMA_Config']->getUserValue( 'pma_table_filename_template', $GLOBALS['cfg']['Export']['file_template_table'] ) ); } else { - echo htmlspecialchars( + $html .= htmlspecialchars( $GLOBALS['PMA_Config']->getUserValue( 'pma_server_filename_template', $GLOBALS['cfg']['Export']['file_template_server'] @@ -320,36 +325,36 @@ if (isset($_GET['filename_template'])) { ); } } -echo '"'; -echo '/>'; -echo ''; -echo ''; -echo '
            • '; +$html .= '"'; +$html .= '/>'; +$html .= '
            '; -echo ''; -echo '
          • '; -echo ''; -echo '
          • '; -echo '
          '; -echo '
    '; +$html .= ''; +$html .= ''; -echo '
    '; -echo '

    ' . __('Format:') . '

    '; -echo PMA_pluginGetChoice('Export', 'what', $export_list, 'format'); -echo '
    '; +$html .= '
    '; +$html .= '

    ' . __('Format:') . '

    '; +$html .= PMA_pluginGetChoice('Export', 'what', $export_list, 'format'); +$html .= '
    '; -echo '
    '; -echo '

    ' . __('Format-specific options:') . '

    '; -echo '

    '; -echo __('Scroll down to fill in the options for the selected format and ignore the options for other formats.'); -echo '

    '; -echo PMA_pluginGetOptions('Export', $export_list); -echo '
    '; +$html .= '
    '; +$html .= '

    ' . __('Format-specific options:') . '

    '; +$html .= '

    '; +$html .= __('Scroll down to fill in the options for the selected format and ignore the options for other formats.'); +$html .= '

    '; +$html .= PMA_pluginGetOptions('Export', $export_list); +$html .= '
    '; if (function_exists('PMA_set_enc_form')) { // Encoding setting form appended by Y.Kawada // Japanese encoding setting - echo '
    '; - echo '

    ' . __('Encoding Conversion:') . '

    '; - echo PMA_set_enc_form(' '); - echo '
    '; + $html .= '
    '; + $html .= '

    ' . __('Encoding Conversion:') . '

    '; + $html .= PMA_set_enc_form(' '); + $html .= '
    '; } -echo '
    '; +$html .= '
    '; -echo PMA_Util::getExternalBug( +$html .= PMA_Util::getExternalBug( __('SQL compatibility mode'), 'mysql', '50027', '14515' ); -echo ''; -echo '
    '; -echo ''; +$html .= ''; +$html .= '
    '; +$html .= ''; + +$response = PMA_Response::getInstance(); +$response->addHTML($html); From 2ce7be77981309b0e7088d3e1a6a1f5054bd79c8 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Sun, 14 Apr 2013 23:38:30 +0530 Subject: [PATCH 018/218] HTTPS will not see OpenStreetMaps due to CSP. So do not show the checkbox also --- tbl_gis_visualization.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/tbl_gis_visualization.php b/tbl_gis_visualization.php index 136f6c06d9..f27241767d 100644 --- a/tbl_gis_visualization.php +++ b/tbl_gis_visualization.php @@ -149,17 +149,22 @@ foreach ($spatialCandidates as $spatialCandidate) { +isHttps()) { + ?> + /> + @@ -204,7 +209,11 @@ if ($svg_support) { From c9193d3c10394ffbc2df184243b5d8be256a3736 Mon Sep 17 00:00:00 2001 From: Rodrigo Souza Date: Fri, 12 Apr 2013 19:27:27 +0200 Subject: [PATCH 019/218] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (2562 of 2562) --- po/pt_BR.po | 1000 +++++++++++++++++++++++++-------------------------- 1 file changed, 499 insertions(+), 501 deletions(-) diff --git a/po/pt_BR.po b/po/pt_BR.po index e706d71ad8..3b8ecb809e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.0.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2012-10-16 14:37+0200\n" -"PO-Revision-Date: 2013-04-10 01:53+0200\n" +"PO-Revision-Date: 2013-04-12 19:27+0200\n" "Last-Translator: Rodrigo Souza \n" "Language-Team: Portuguese (Brazil) " "\n" @@ -276,24 +276,24 @@ msgstr "Banco de Dados %s copiado para %s" #: db_operations.php:412 msgid "Rename database to" -msgstr "Renomear Banco de Dados para" +msgstr "Renomear banco de dados para" #: db_operations.php:438 msgid "Remove database" -msgstr "Remover Banco de Dados" +msgstr "Remover banco de dados" #: db_operations.php:450 #, php-format msgid "Database %s has been dropped." -msgstr "Banco de Dados %s foi eliminado." +msgstr "O banco de dados %s foi eliminado." #: db_operations.php:455 msgid "Drop the database (DROP)" -msgstr "Apagar o Banco de Dados (DROP)" +msgstr "Apagar o banco de dados (DROP)" #: db_operations.php:484 msgid "Copy database to" -msgstr "Copiar Banco de Dados para" +msgstr "Copiar banco de dados para" #: db_operations.php:491 tbl_operations.php:554 tbl_tracking.php:424 msgid "Structure only" @@ -305,7 +305,7 @@ msgstr "Estrutura e dados" #: db_operations.php:493 tbl_operations.php:556 tbl_tracking.php:425 msgid "Data only" -msgstr "Dados apenas" +msgstr "Somente dados" #: db_operations.php:501 msgid "CREATE DATABASE before copying" @@ -329,7 +329,7 @@ msgstr "Adicionar restrições" #: db_operations.php:525 msgid "Switch to copied database" -msgstr "Mudar para o Banco de Dados copiado" +msgstr "Mudar para o banco de dados copiado" #: db_operations.php:548 libraries/Index.class.php:446 #: libraries/build_html_for_db.lib.php:20 libraries/db_structure.lib.php:48 @@ -596,17 +596,17 @@ msgstr "desconhecido" #: db_structure.php:315 tbl_operations.php:709 #, php-format msgid "Table %s has been emptied" -msgstr "Tabela %s foi esvaziada" +msgstr "A tabela %s foi esvaziada" #: db_structure.php:328 tbl_operations.php:728 #, php-format msgid "View %s has been dropped" -msgstr "Visão %s foi apagada" +msgstr "A view %s foi apagada" #: db_structure.php:328 tbl_operations.php:728 #, php-format msgid "Table %s has been dropped" -msgstr "Tabela %s foi eliminada" +msgstr "A tabela %s foi apagada" #: db_structure.php:338 tbl_create.php:283 msgid "Tracking is active." @@ -667,7 +667,7 @@ msgstr "Desmarcar todos" #: db_structure.php:583 msgid "Check tables having overhead" -msgstr "Verificar sobre-carga" +msgstr "Verificar tabelas com sobrecarga" #: db_structure.php:591 libraries/common.lib.php:3352 #: libraries/common.lib.php:3353 libraries/config/messages.inc.php:166 @@ -718,11 +718,11 @@ msgstr "Adicionar prefixo à tabela" #: db_structure.php:613 libraries/mult_submits.inc.php:251 msgid "Replace table prefix" -msgstr "Substituir prefixo da tabela" +msgstr "Substituir o prefixo de tabelas" #: db_structure.php:615 libraries/mult_submits.inc.php:251 msgid "Copy table with prefix" -msgstr "Copiar tabela com o prefixo" +msgstr "Copiar tabelas com prefixo" #: db_structure.php:652 libraries/schema/User_Schema.class.php:423 msgid "Data Dictionary" @@ -2646,8 +2646,8 @@ msgid "" "You probably did not create a configuration file. You might want to use the " "%1$ssetup script%2$s to create one." msgstr "" -"A provável razão para isso é que você não criou o arquivo de configuração. " -"Você deve usar o %1$ssetup script%2$s para criar um." +"Você provavelmente não criou o arquivo de configuração. Você deve usar o %" +"1$sscript de setup%2$s para criar um." #: libraries/auth/config.auth.lib.php:111 msgid "" @@ -2656,7 +2656,7 @@ msgid "" "configuration and make sure that they correspond to the information given by " "the administrator of the MySQL server." msgstr "" -"phpMyAdmin tentou se conectar no servidor MySQL e a conxão foi recusada. " +"O phpMyAdmin tentou se conectar ao servidor MySQL e a conxão foi recusada. " "Você deve checar o servidor, nome de usuário e senha no config.inc.php e se " "certificar que correspondam com as informações fornecidas pelo administrador " "do servidor MySQL." @@ -2667,7 +2667,7 @@ msgstr "Falha ao usar Blowfish de mcrypt!" #: libraries/auth/cookie.auth.lib.php:197 msgid "Log in" -msgstr "Autenticação" +msgstr "Entrar" #: libraries/auth/cookie.auth.lib.php:199 #: libraries/auth/cookie.auth.lib.php:201 @@ -2680,7 +2680,9 @@ msgstr "Documentação do phpMyAdmin" #: libraries/auth/cookie.auth.lib.php:211 #: libraries/auth/cookie.auth.lib.php:212 msgid "You can enter hostname/IP address and port separated by space." -msgstr "Você pode digitar a url/IP e a porta separados por um espaço." +msgstr "" +"Você pode digitar o nome do servidor/endereço IP e a porta separados por um " +"espaço." #: libraries/auth/cookie.auth.lib.php:211 msgid "Server:" @@ -2696,7 +2698,7 @@ msgstr "Senha:" #: libraries/auth/cookie.auth.lib.php:227 msgid "Server Choice" -msgstr "Seleção do Servidor" +msgstr "Seleção do servidor" #: libraries/auth/cookie.auth.lib.php:273 libraries/header.inc.php:87 msgid "Cookies must be enabled past this point." @@ -2720,7 +2722,7 @@ msgstr "Sem atividade por %s segundos ou mais, faça o login novamente" #: libraries/auth/cookie.auth.lib.php:584 #: libraries/auth/signon.auth.lib.php:243 msgid "Cannot log in to the MySQL server" -msgstr "Não foi possível se logar no servidor MySQL" +msgstr "Não foi possível fazer login no servidor MySQL" #: libraries/auth/http.auth.lib.php:69 msgid "Wrong username/password. Access denied." @@ -5497,19 +5499,20 @@ msgstr "" #: libraries/config/validate.lib.php:258 msgid "Empty signon session name while using signon authentication method" -msgstr "Nome da sessão signon vazio quando usaa o método de autenticação signon" +msgstr "" +"Nome da sessão de signon vazio quando usado o método de autenticação signon" #: libraries/config/validate.lib.php:262 msgid "Empty signon URL while using signon authentication method" -msgstr "URL signon vazia ao usar o método de autenticação signon" +msgstr "URL de signon vazia ao usar o método de autenticação signon" #: libraries/config/validate.lib.php:295 msgid "Empty phpMyAdmin control user while using pmadb" -msgstr "Controle de usuário phpMyAdmin vazio ao usar pmadb" +msgstr "Controle de usuário phpMyAdmin vazio ao usar o pmadb" #: libraries/config/validate.lib.php:299 msgid "Empty phpMyAdmin control user password while using pmadb" -msgstr "Controle de senha do usuário phpMyAdmin vazio ao usar pmadb" +msgstr "Controle de senha do usuário phpMyAdmin vazio ao usar o pmadb" #: libraries/config/validate.lib.php:385 #, php-format @@ -5520,7 +5523,7 @@ msgstr "Endereço de IP incorreto: %s" #, php-format msgid "The %s extension is missing. Please check your PHP configuration." msgstr "" -"A extensão %s não está presente. Por favor, verifique a configuração do PHP" +"A extensão %s não está presente. Por favor, verifique a configuração do PHP." #: libraries/core.lib.php:416 msgid "possible deep recursion attack" @@ -5597,7 +5600,8 @@ msgstr "" #: libraries/dbi/mysqli.dbi.lib.php:189 msgid "Connection for controluser as defined in your configuration failed." msgstr "" -"Conexão para controle do usuário como definido nas configurações falhou." +"A conexão para o controle do usuário, como definida nas configurações, " +"falhou." #: libraries/display_change_password.lib.php:29 main.php:94 #: user_password.php:105 user_password.php:123 @@ -5656,21 +5660,21 @@ msgstr "Número de colunas" #: libraries/display_export.lib.php:37 msgid "Could not load export plugins, please check your installation!" -msgstr "Não pode carregar exportação dos plugins, verifique sua instalação!" +msgstr "Não pôde carregar os plugins de exportação, verifique sua instalação!" #: libraries/display_export.lib.php:82 msgid "Exporting databases from the current server" -msgstr "Exportar bancos de dados do servidor atual" +msgstr "Exportando os bancos de dados do servidor atual" #: libraries/display_export.lib.php:84 #, php-format msgid "Exporting tables from \"%s\" database" -msgstr "Exportar tabelas do banco de dados \"%s\"" +msgstr "Exportando as tabelas do banco de dados \"%s\"" #: libraries/display_export.lib.php:86 #, php-format msgid "Exporting rows from \"%s\" table" -msgstr "Exportar linhas da tabela \"%s\"" +msgstr "Exportando as linhas da tabela \"%s\"" #: libraries/display_export.lib.php:92 msgid "Export Method:" @@ -5682,7 +5686,7 @@ msgstr "Rápida - mostrar apenas as opções mínimas" #: libraries/display_export.lib.php:124 msgid "Custom - display all possible options" -msgstr "Customizar - exibir todas as opções possíveis" +msgstr "Personalizada - exibir todas as opções possíveis" #: libraries/display_export.lib.php:132 msgid "Database(s):" @@ -5698,7 +5702,7 @@ msgstr "Registros:" #: libraries/display_export.lib.php:152 msgid "Dump some row(s)" -msgstr "Dumpar alguma(s) linha(s)" +msgstr "Fazer dump de alguma(s) linha(s)" #: libraries/display_export.lib.php:154 msgid "Number of rows:" @@ -5710,7 +5714,7 @@ msgstr "Começar na linha:" #: libraries/display_export.lib.php:168 msgid "Dump all rows" -msgstr "Dumpar todas as linhas" +msgstr "Fazer dump de todas as linhas" #: libraries/display_export.lib.php:176 libraries/display_export.lib.php:197 msgid "Output:" @@ -5719,7 +5723,7 @@ msgstr "Saída:" #: libraries/display_export.lib.php:183 libraries/display_export.lib.php:209 #, php-format msgid "Save on server in the directory %s" -msgstr "Salvar no do servidor, no diretório %s" +msgstr "Salvar em servidor no diretório %s" #: libraries/display_export.lib.php:201 msgid "Save output to a file" @@ -5789,7 +5793,7 @@ msgstr "Formato:" #: libraries/display_export.lib.php:333 msgid "Format-specific options:" -msgstr "Opções de formato especifico:" +msgstr "Opções específicas de formato:" #: libraries/display_export.lib.php:334 msgid "" @@ -5809,9 +5813,9 @@ msgid "" "this is a known bug in webkit based (Safari, Google Chrome, Arora etc.) " "browsers." msgstr "" -"O arquivo a ser carregado é provavelmente maior do que o tamanho máximo " -"permitido, ou este é um bug conhecido em alguns browsers (Safari, Google " -"Chrome, Arora etc.)." +"O arquivo a ser subido é provavelmente maior do que o tamanho máximo " +"permitido, ou este é um bug conhecido em alguns browsers webkit (Safari, " +"Google Chrome, Arora etc)." #: libraries/display_import.lib.php:76 msgid "The file is being processed, please be patient." @@ -5822,12 +5826,12 @@ msgid "" "Please be patient, the file is being uploaded. Details about the upload are " "not available." msgstr "" -"Por favor, tenha paciência, o arquivo esta sendo enviado. Detalhes sobre o " -"upload não estão disponíveis." +"Por favor aguarde, o arquivo está sendo subido. Detalhes sobre o upload não " +"estão disponíveis." #: libraries/display_import.lib.php:129 msgid "Importing into the current server" -msgstr "Importar para o servidor atual" +msgstr "Importando para o servidor atual" #: libraries/display_import.lib.php:131 #, php-format @@ -5841,7 +5845,7 @@ msgstr "Importando para a tabela \"%s\"" #: libraries/display_import.lib.php:139 msgid "File to Import:" -msgstr "Arquivo para importar:" +msgstr "Arquivo a importar:" #: libraries/display_import.lib.php:156 #, php-format @@ -5879,16 +5883,16 @@ msgid "" "files, however it can break transactions.)" msgstr "" "Permitir a interrupção da importação caso o script detecte que está perto do " -"tempo limite do PHP. (Isso pode ser um bom caminho para importar " -"arquivos grandes, entretanto isso pode interromper as transações.)" +"tempo limite do PHP. (Isso pode ser um bom jeito de importar arquivos " +"grandes, entretanto isso pode interromper as transações.)" #: libraries/display_import.lib.php:228 msgid "Number of rows to skip, starting from the first row:" -msgstr "Número de registros para pular, iniciando da primeira linha:" +msgstr "Número de registros a pular, a partir da primeira linha:" #: libraries/display_import.lib.php:250 msgid "Format-Specific Options:" -msgstr "Opções específicas do formato:" +msgstr "Opções específicas de formato:" #: libraries/display_select_lang.lib.php:46 #: libraries/display_select_lang.lib.php:47 setup/frames/index.inc.php:72 @@ -6059,31 +6063,31 @@ msgstr "Arquivos de dados" #: libraries/engines/innodb.lib.php:27 msgid "Autoextend increment" -msgstr "Incremento autoextendido" +msgstr "Incremento de auto-extensão" #: libraries/engines/innodb.lib.php:28 msgid "" "The increment size for extending the size of an autoextending tablespace " "when it becomes full." msgstr "" -"O tamanho do incremento para extender o tamanho de um tamanho de tabela " -"autoextendida quando ela começar à ficar cheia." +"O tamanho do incremento a usar na extensão de um tablespace auto-extensivo " +"quando ele ficar cheio." #: libraries/engines/innodb.lib.php:32 msgid "Buffer pool size" -msgstr "Tamanho do Buffer Pool" +msgstr "Tamanho da pool de buffer" #: libraries/engines/innodb.lib.php:33 msgid "" "The size of the memory buffer InnoDB uses to cache data and indexes of its " "tables." msgstr "" -"O tamanho do buffer de memória que o InnoDB usa para dados do cache e " -"índices nas suas tabelas." +"O tamanho da memória buffer que o InnoDB usa para cache de dados e índices " +"de suas tabelas." #: libraries/engines/innodb.lib.php:130 msgid "Buffer Pool" -msgstr "\"Buffer Pool\"" +msgstr "Pool de buffer" #: libraries/engines/innodb.lib.php:131 server_status.php:652 msgid "InnoDB Status" @@ -6091,7 +6095,7 @@ msgstr "Status do InnoDB" #: libraries/engines/innodb.lib.php:153 msgid "Buffer Pool Usage" -msgstr "Uso do Buffer Pool" +msgstr "Uso da pool de buffer" #: libraries/engines/innodb.lib.php:161 msgid "pages" @@ -6123,19 +6127,19 @@ msgstr "Páginas trancadas" #: libraries/engines/innodb.lib.php:214 msgid "Buffer Pool Activity" -msgstr "Atividade do Buffer Pool" +msgstr "Atividade da pool de buffer" #: libraries/engines/innodb.lib.php:218 msgid "Read requests" -msgstr "Leitura requisitada" +msgstr "Requests de leitura" #: libraries/engines/innodb.lib.php:224 msgid "Write requests" -msgstr "Escrita requisitada" +msgstr "Requests de escrita" #: libraries/engines/innodb.lib.php:230 msgid "Read misses" -msgstr "Leitura falhou" +msgstr "Falhas de leitura" #: libraries/engines/innodb.lib.php:236 msgid "Write waits" @@ -6143,11 +6147,11 @@ msgstr "Escrever as esperas" #: libraries/engines/innodb.lib.php:242 msgid "Read misses in %" -msgstr "Leitura falhou em %" +msgstr "Falhas de leitura em %" #: libraries/engines/innodb.lib.php:250 msgid "Write waits in %" -msgstr "Escrita esperada em %" +msgstr "Esperas de escrita em %" #: libraries/engines/myisam.lib.php:22 msgid "Data pointer size" @@ -6159,7 +6163,7 @@ msgid "" "tables when no MAX_ROWS option is specified." msgstr "" "O tamanho padrão do ponteiro em bytes, para ser usado por CREATE TABLE para " -"tabelas MyISAM quando a opção MAX_ROWS não é especificada." +"tabelas MyISAM quando a opção MAX_ROWS não estiver especificada." #: libraries/engines/myisam.lib.php:27 msgid "Automatic recovery mode" @@ -6170,8 +6174,9 @@ msgid "" "The mode for automatic recovery of crashed MyISAM tables, as set via the --" "myisam-recover server startup option." msgstr "" -"O modo para recuperação automática de tabelas MyISAM danificadas, como " -"configurado pela opção de inicialização do servidor --myisam-recover." +"O modo para recuperação automático de tabelas MyISAM danificadas, como " +"configurado pela opção de recuperação de início do servidor --myisam-" +"recover." #: libraries/engines/myisam.lib.php:31 msgid "Maximum size for temporary sort files" @@ -6197,9 +6202,9 @@ msgid "" "than using the key cache by the amount specified here, prefer the key cache " "method." msgstr "" -"Se os arquivos temporários usados para rápida criação de índices MyISAM " -"forem maiores do que usando a chave do cache pela quantidade especificada " -"aqui, prefira o método chave do cache." +"Se os arquivos temporários usados para criação rápida de índices MyISAM " +"forem maiores do que o tamanho do uso de cache de chaves especificado aqui, " +"prefira o método de cache de chaves." #: libraries/engines/myisam.lib.php:41 msgid "Repair threads" @@ -6210,8 +6215,8 @@ msgid "" "If this value is greater than 1, MyISAM table indexes are created in " "parallel (each index in its own thread) during the repair by sorting process." msgstr "" -"Se este valor for maior que 1, índices das tabelas MyISAM são criados em " -"paralelo (cada índice tem seu próprio processo) durante o Reparo pelo " +"Se este valor for maior que 1, os índices das tabelas MyISAM são criados em " +"paralelo (cada índice tem seu próprio processo) durante o reparo pelo " "processo de ordenação." #: libraries/engines/myisam.lib.php:46 @@ -6337,15 +6342,16 @@ msgstr "Página inicial do PrimeBase XT" #: libraries/engines/pbxt.lib.php:22 msgid "Index cache size" -msgstr "Tamanho do indice de cache" +msgstr "Tamanho do cache de índices" #: libraries/engines/pbxt.lib.php:23 msgid "" "This is the amount of memory allocated to the index cache. Default value is " "32MB. The memory allocated here is used only for caching index pages." msgstr "" -"Esta é a quantidade de memória alocada para o cache index. O valor padrão é " -"32MB. A memória alocada aqui é apenas usado para cache de páginas index." +"Esta é a quantidade de memória alocada para o cache de índices. O valor " +"padrão é 32MB. A memória alocada aqui é usada apenas para cache de páginas " +"de índice." #: libraries/engines/pbxt.lib.php:27 msgid "Record cache size" @@ -6359,20 +6365,20 @@ msgid "" msgstr "" "Esta é a quantidade de memória alocada para o cache de gravação usado no " "cache de dados de tabela. O valor padrão é 32MB. Esta memória será usada " -"para fazer cache de alterações para a manipulação de dados (.xtd) e arquivos " -"apontadores de linha (.xtr)." +"para fazer o cache das alterações na manipulação de dados (.xtd) e nos " +"arquivos apontadores de linha (.xtr)." #: libraries/engines/pbxt.lib.php:32 msgid "Log cache size" -msgstr "Tamanho do cache do log" +msgstr "Tamanho do cache de log" #: libraries/engines/pbxt.lib.php:33 msgid "" "The amount of memory allocated to the transaction log cache used to cache on " "transaction log data. The default is 16MB." msgstr "" -"Quantidade de memória alocada para o cache de log de transação usada para " -"manter cache no log da transação de dados. O valor padrão é 16MB." +"A quantidade de memória alocada para o cache de log de transações usado para " +"manter o cache de dados. O valor padrão é 16MB." #: libraries/engines/pbxt.lib.php:37 msgid "Log file threshold" @@ -6383,12 +6389,12 @@ msgid "" "The size of a transaction log before rollover, and a new log is created. The " "default value is 16MB." msgstr "" -"Tamanho do log de transação antes da mudança e o novo log criado. O valor " -"padrão é 16MB." +"Tamanho do log de transações antes de um rollover e dos novos logs a serem " +"criados. O valor padrão é 16MB." #: libraries/engines/pbxt.lib.php:42 msgid "Transaction buffer size" -msgstr "Tamanho do buffer de transação" +msgstr "Tamanho do buffer de transações" #: libraries/engines/pbxt.lib.php:43 msgid "" @@ -6407,12 +6413,12 @@ msgid "" "The amount of data written to the transaction log before a checkpoint is " "performed. The default value is 24MB." msgstr "" -"A quantidade dados escritos no log de transação antes que um ponto de " -"checagem é realizado. O valor padrão é 24MB." +"A quantidade dados escritos no log de transação antes que um checkpoint ser " +"realizado. O valor padrão é 24MB." #: libraries/engines/pbxt.lib.php:52 msgid "Data log threshold" -msgstr "Início do log de dados" +msgstr "Limite do log de dados" #: libraries/engines/pbxt.lib.php:53 msgid "" @@ -6421,22 +6427,22 @@ msgid "" "value of this variable can be increased to increase the total amount of data " "that can be stored in the database." msgstr "" -"Tamanho máximo do log de dados. O valor padrão é 64MB. PBXT pode criar no " +"O tamanho máximo do log de dados. O valor padrão é 64MB. PBXT pode criar no " "máximo 32000 logs da dados, que são usados por todas as tabelas. Então o " "valor desta variável pode ser incrementado para aumentar a quantidade total " "dos dados que podem ser armazenados no banco de dados." #: libraries/engines/pbxt.lib.php:57 msgid "Garbage threshold" -msgstr "Início do lixo" +msgstr "Limite de lixo" #: libraries/engines/pbxt.lib.php:58 msgid "" "The percentage of garbage in a data log file before it is compacted. This is " "a value between 1 and 99. The default is 50." msgstr "" -"O percentual de lixo em um arquivo de dados de log antes de compactá-lo. " -"Este valor está entre 1 e 99. O padrão é 50." +"O percentual de lixo em um arquivo de dados de log antes de ser compactado. " +"Este é um valor entre 1 e 99. O padrão é 50." #: libraries/engines/pbxt.lib.php:62 msgid "Log buffer size" @@ -6449,8 +6455,8 @@ msgid "" "required to write a data log." msgstr "" "Tamanho de buffer usado quando escreve dados no log. O padrão é 256MB. A " -"máquina aloca um buffer por thread, mas apenas se a thread requisitar " -"escrita de dados de log." +"máquina aloca um buffer por thread, mas apenas se for exigido da thread " +"escrever um log de dados." #: libraries/engines/pbxt.lib.php:67 msgid "Data file grow size" @@ -6470,7 +6476,7 @@ msgstr "Tamanho que um ponteiro de linha (.xtr) pode atingir." #: libraries/engines/pbxt.lib.php:77 msgid "Log file count" -msgstr "Soma de arquivos de log" +msgstr "Contagem de arquivos de log" #: libraries/engines/pbxt.lib.php:78 msgid "" @@ -6481,8 +6487,8 @@ msgid "" msgstr "" "Este é o número de arquivos de log de transação (pbxt/system/xlog*.xt) que o " "sistema irá manter. Se o número de logs exceder esse valor, os arquivos de " -"log antigos serão deletados, caso contrário eles serão renomeados e terão o " -"número maior seguinte." +"log antigos serão deletados, caso contrário eles serão renomeados com o " +"próximo número da contagem de logs." #: libraries/engines/pbxt.lib.php:125 #, php-format @@ -6490,12 +6496,12 @@ msgid "" "Documentation and further information about PBXT can be found on the " "%sPrimeBase XT Home Page%s." msgstr "" -"Documentação e mais informações sobre PBXT podem ser encontradas na %" -"sPrimeBase XT Home Page%s." +"Documentação e mais informações sobre PBXT podem ser encontradas na %sPágina " +"Inicial da PrimeBase XT%s." #: libraries/engines/pbxt.lib.php:129 msgid "The PrimeBase XT Blog by Paul McCullagh" -msgstr "O PrimeBase XT Blog por Paul McCullagh" +msgstr "O Blog da PrimeBase XT por Paul McCullagh" #: libraries/engines/pbxt.lib.php:130 msgid "The PrimeBase Media Streaming (PBMS) home page" @@ -6511,7 +6517,7 @@ msgstr "Colunas delimitadas por:" #: libraries/export/csv.php:26 libraries/import/csv.php:30 msgid "Columns escaped with:" -msgstr "Campos escapou com:" +msgstr "Campos divididos com:" #: libraries/export/csv.php:27 libraries/import/csv.php:31 msgid "Lines terminated with:" @@ -6535,17 +6541,17 @@ msgstr "Edição do Excel:" #: libraries/export/odt.php:56 libraries/export/sql.php:222 #: libraries/export/texytext.php:26 libraries/export/xml.php:73 msgid "Data dump options" -msgstr "Opções de exportação do Banco de Dados" +msgstr "Opções de dump de dados" #: libraries/export/htmlword.php:121 libraries/export/odt.php:173 #: libraries/export/sql.php:1188 libraries/export/texytext.php:109 msgid "Dumping data for table" -msgstr "Extraindo dados da tabela" +msgstr "Fazendo dump de dados para tabela" #: libraries/export/htmlword.php:195 libraries/export/odt.php:249 #: libraries/export/sql.php:1021 libraries/export/texytext.php:177 msgid "Table structure for table" -msgstr "Estrutura da tabela" +msgstr "Estrutura para tabela" #: libraries/export/latex.php:14 msgid "Content of table @TABLE@" @@ -6566,12 +6572,12 @@ msgstr "Opções de criação de objetos" #: libraries/export/latex.php:52 libraries/export/latex.php:76 msgid "Table caption (continued)" -msgstr "Legenda da tabela(continuação)" +msgstr "Legenda da tabela (continuação)" #: libraries/export/latex.php:57 libraries/export/odt.php:43 #: libraries/export/sql.php:56 msgid "Display foreign key relationships" -msgstr "Desabilitar verificação de chaves estrangeiras" +msgstr "Exibir relacionamentos de chave estrangeira" #: libraries/export/latex.php:60 libraries/export/odt.php:46 msgid "Display comments" @@ -6580,7 +6586,7 @@ msgstr "Exibir comentários" #: libraries/export/latex.php:63 libraries/export/odt.php:49 #: libraries/export/sql.php:63 msgid "Display MIME types" -msgstr "Mostrar os MIME-type" +msgstr "Exibir os tipos MIME" #: libraries/export/latex.php:132 libraries/export/sql.php:482 #: libraries/export/xml.php:131 libraries/header_printview.inc.php:59 @@ -6618,11 +6624,11 @@ msgstr "PDF" #: libraries/export/pdf.php:24 msgid "(Generates a report containing the data of a single table)" -msgstr "(Gerado um relatório contendo dados da tabela simples)" +msgstr "(Gera um relatório contendo dados de uma única tabela)" #: libraries/export/pdf.php:25 msgid "Report title:" -msgstr "Título do Relatório:" +msgstr "Título do relatório:" #: libraries/export/php_array.php:18 msgid "PHP array" @@ -6633,20 +6639,20 @@ msgid "" "Display comments (includes info such as export timestamp, PHP version, " "and server version)" msgstr "" -"Mostrar comentários (incluindo informação como data e hora de exportação, " +"Mostrar comentários (inclui informação como data e hora de exportação, " "versão do PHP e versão do servidor)" #: libraries/export/sql.php:45 msgid "Additional custom header comment (\\n splits lines):" -msgstr "Adicionar comentário pessoal no cabeçalho (\\n quebras de linha):" +msgstr "Comentário adicional personalizado de cabeçalho (\\n separa as linhas):" #: libraries/export/sql.php:50 msgid "" "Include a timestamp of when databases were created, last updated, and last " "checked" msgstr "" -"Inclua um timestamp de quando os bancos de dados foram criados, última " -"atualização e última verificação feita" +"Inclui a timestamp da data de criação, última atualização e última " +"verificação dos bancos de dados" #: libraries/export/sql.php:100 msgid "" @@ -6670,12 +6676,12 @@ msgid "" "Enclose table and column names with backquotes (Protects column and table " "names formed with special characters or keywords)" msgstr "" -"Envolver nomes de tabela e colunas com crase (Proteger nomes de colunas e " -"tabelas formados com caracteres especiais ou palavras chaves)" +"Envolver nomes de tabela e colunas com crase (Protege os nomes de colunas " +"e tabelas formados com caracteres especiais ou palavras chaves)" #: libraries/export/sql.php:231 msgid "Instead of INSERT statements, use:" -msgstr "Em vez de declarar INSERT, use:" +msgstr "Em vez de usar declarações INSERT, use:" #: libraries/export/sql.php:238 msgid "INSERT DELAYED statements" @@ -6687,11 +6693,11 @@ msgstr "declarações INSERT IGNORE" #: libraries/export/sql.php:255 msgid "Function to use when dumping data:" -msgstr "Função usada quando descarregar dados:" +msgstr "Função a usar para dump de dados:" #: libraries/export/sql.php:268 msgid "Syntax to use when inserting data:" -msgstr "Sintaxe usada quando inserindo dados:" +msgstr "Sintaxe a usar para inserimento de dados:" #: libraries/export/sql.php:274 msgid "" @@ -6699,9 +6705,9 @@ msgid "" "    Example: INSERT INTO tbl_name (col_A,col_B,col_C) VALUES " "(1,2,3)" msgstr "" -"incluir nomes de columas em cada declaração INSERT
      " -"    Exemplo: INSERT INTO tbl_name (col_A,col_B,col_C) " -"VALUES (1,2,3)" +"incluir nomes de columas em cada declaração INSERT
    " +"Exemplo: INSERT INTO tbl_name (col_A,col_B,col_C) VALUES " +"(1,2,3)" #: libraries/export/sql.php:275 msgid "" @@ -6709,32 +6715,31 @@ msgid "" "    Example: INSERT INTO tbl_name VALUES (1,2,3), (4,5,6), " "(7,8,9)" msgstr "" -"inserir múltiplas linhas em cada declaração INSERT
      " -"    Exemplo: INSERT INTO tbl_name VALUES (1,2,3), (4,5,6), " -"(7,8,9)" +"inserir múltiplas linhas em cada declaração INSERT
    " +"Exemplo: INSERT INTO tbl_name VALUES (1,2,3), (4,5,6), (7,8,9)" #: libraries/export/sql.php:276 msgid "" "both of the above
          Example: INSERT INTO " "tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)" msgstr "" -"acima referidos
          Exemplo: INSERT INTO " -"tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)" +"ambos acima
    Exemplo: INSERT INTO tbl_name (col_A,col_B) VALUES " +"(1,2,3), (4,5,6), (7,8,9)" #: libraries/export/sql.php:277 msgid "" "neither of the above
          Example: INSERT INTO " "tbl_name VALUES (1,2,3)" msgstr "" -"Nenhuma das opções acima
          Exemplo: INSERT " -"INTO tbl_name VALUES (1,2,3)" +"nenhuma das opções acima
    Exemplo: INSERT INTO tbl_name VALUES " +"(1,2,3)" #: libraries/export/sql.php:292 msgid "" "Dump binary columns in hexadecimal notation (for example, \"abc\" becomes " "0x616263)" msgstr "" -"Esvaziar colunas binárias em notação hexadecimal (por exemplo, \"abc\" " +"Fazer dump de colunas binárias em notação hexadecimal (por exemplo, \"abc\" " "seria 0x616263)" #: libraries/export/sql.php:301 @@ -6742,9 +6747,8 @@ msgid "" "Dump TIMESTAMP columns in UTC (enables TIMESTAMP columns to be dumped and " "reloaded between servers in different time zones)" msgstr "" -"Esvaziar colunas TIMESTAMP em UTC (habilitar colunas de TIMESTAMP para " -"serem esvaziadas e recarregadas entre servidores em zonas horárias " -"diferentes)" +"Fazer dump de campos TIMESTAMP em UTC (ativa o dump e recarregamento de " +"campos TIMESTAMP entre servidores em fusos horários diferentes)" #: libraries/export/sql.php:342 libraries/export/xml.php:45 msgid "Procedures" @@ -6756,27 +6760,27 @@ msgstr "Funções" #: libraries/export/sql.php:855 msgid "Constraints for dumped tables" -msgstr "Restrições para as tabelas dumpadas" +msgstr "Restrições para dumps de tabelas" #: libraries/export/sql.php:864 msgid "Constraints for table" -msgstr "Restrições para a tabela" +msgstr "Restrições para tabelas" #: libraries/export/sql.php:963 msgid "MIME TYPES FOR TABLE" -msgstr "MIME-TYPES PARA TABELA" +msgstr "TIPOS MIME PARA TABELAS" #: libraries/export/sql.php:975 msgid "RELATIONS FOR TABLE" -msgstr "RELAÇÕES PARA A TABELA" +msgstr "RELACIONAMENTOS PARA TABELAS" #: libraries/export/sql.php:1044 msgid "Structure for view" -msgstr "Estrutura para visualizar" +msgstr "Estrutura para view" #: libraries/export/sql.php:1053 msgid "Stand-in structure for view" -msgstr "Estrutura stand-in para visualizar" +msgstr "Estrutura stand-in para view" #: libraries/export/sql.php:1112 msgid "Error reading data:" @@ -6788,11 +6792,11 @@ msgstr "XML" #: libraries/export/xml.php:34 msgid "Object creation options (all are recommended)" -msgstr "Opções para criação de objetos (tudo recomendado)" +msgstr "Opções de criação de objetos (todas são recomendadas)" #: libraries/export/xml.php:62 msgid "Views" -msgstr "Visualizações" +msgstr "Views" #: libraries/export/xml.php:78 msgid "Export contents" @@ -6822,44 +6826,42 @@ msgstr "Gerado por" #: libraries/import.lib.php:157 libraries/rte/rte_routines.lib.php:1266 #: sql.php:726 tbl_change.php:188 tbl_get_field.php:34 msgid "MySQL returned an empty result set (i.e. zero rows)." -msgstr "MySQL retornou um conjunto vazio (ex. zero registros)." +msgstr "O MySQL retornou um conjunto vazio (ex. zero registros)." #: libraries/import.lib.php:1100 msgid "" "The following structures have either been created or altered. Here you can:" -msgstr "" -"As estruturas a seguir quer tenham sido criadas, ou alteradas. Aqui você " -"pode:" +msgstr "As estruturas a seguir foram criadas ou alteradas. Aqui você pode:" #: libraries/import.lib.php:1101 msgid "View a structure's contents by clicking on its name" -msgstr "Visualize o conteúdo da estrutura clicando neste nome" +msgstr "Visualizar o conteúdo da estrutura clicando em seu nome" #: libraries/import.lib.php:1102 msgid "" "Change any of its settings by clicking the corresponding \"Options\" link" msgstr "" -"Altere qualquer uma destas configurações clicando no link \"Opções\" " +"Alterar qualquer uma destas configurações clicando no link \"Opções\" " "correspondente" #: libraries/import.lib.php:1103 msgid "Edit structure by following the \"Structure\" link" -msgstr "Edite a estrutura seguindo o link \"Estrutura\"" +msgstr "Editar a estrutura seguindo o link \"Estrutura\"" #: libraries/import.lib.php:1106 #, php-format msgid "Go to database: %s" -msgstr "Ir para bando de dados: %s" +msgstr "Ir para o bando de dados: %s" #: libraries/import.lib.php:1109 libraries/import.lib.php:1132 #, php-format msgid "Edit settings for %s" -msgstr "Editar configurações para %s" +msgstr "Editar as configurações para %s" #: libraries/import.lib.php:1127 #, php-format msgid "Go to table: %s" -msgstr "Ir para tabela: %s" +msgstr "Ir para a tabela: %s" #: libraries/import.lib.php:1130 #, php-format @@ -6869,15 +6871,15 @@ msgstr "Estrutura do %s" #: libraries/import.lib.php:1136 #, php-format msgid "Go to view: %s" -msgstr "Vá para a visão: %s" +msgstr "Ir para a view: %s" #: libraries/import/csv.php:38 libraries/import/ods.php:33 msgid "" "The first line of the file contains the table column names (if this is " "unchecked, the first line will become part of the data)" msgstr "" -"A primeira linha do arquivo contem os nomes da colunas da tabela (se não " -"estiver checado, a primeira linha irá torna-se parte dos dados)" +"A primeira linha do arquivo contém os nomes das colunas da tabela (se " +"isso for desmarcado, a primeira linha se tornará parte dos dados)" #: libraries/import/csv.php:40 msgid "" @@ -6886,8 +6888,9 @@ msgid "" "separated by commas and not enclosed in quotations." msgstr "" "Se os dados em cada linha do arquivo não estiverem na mesma ordem que no " -"banco de dados, liste os nomes correspondestes da colunas aqui. Os nomes das " -"colunas devem estar separados por vírgulas e não deve conter aspas." +"banco de dados, liste os nomes correspondentes das colunas aqui. Os nomes " +"das colunas devem estar separados por vírgulas e não devem estar entre " +"aspas." #: libraries/import/csv.php:42 msgid "Column names: " @@ -6905,18 +6908,19 @@ msgid "" "Invalid column (%s) specified! Ensure that columns names are spelled " "correctly, separated by commas, and not enclosed in quotes." msgstr "" -"Coluna inválida (%s) especificada. Assegure-se que o nome desta coluna está " -"escrito corretamente, separado por vírgulas e entre aspas." +"Coluna inválida (%s) especificada! Certifique-se de que os nomes das colunas " +"estejam escritos corretamente, separados por vírgulas e que não estejam " +"entre aspas." #: libraries/import/csv.php:191 libraries/import/csv.php:451 #, php-format msgid "Invalid format of CSV input on line %d." -msgstr "Formato inválido na linha %d da entrada CSV." +msgstr "Formato inválido de input CSV na linha %d." #: libraries/import/csv.php:337 #, php-format msgid "Invalid column count in CSV input on line %d." -msgstr "Contador de campo inválido na linha %d da entrada CSV." +msgstr "Contador de colunas inválido no input CSV na linha %d." #: libraries/import/docsql.php:28 msgid "DocSQL" @@ -6938,11 +6942,12 @@ msgstr "Esse plugin não suporta importações comprimidas!" #: libraries/import/ods.php:35 msgid "Import percentages as proper decimals (ex. 12.00% to .12)" -msgstr "Importar percentuais com decimais adequados (ex. 12.00% to .12)" +msgstr "" +"Importar percentuagens como decimais apropriados (ex: 12% para 0.12)" #: libraries/import/ods.php:36 msgid "Import currencies (ex. $5.00 to 5.00)" -msgstr "Importar moedas (ex. R$5.00 para 5.00)" +msgstr "Importar moedas (ex: R$5,00 para 5,00)" #: libraries/import/ods.php:88 libraries/import/xml.php:83 #: libraries/import/xml.php:139 @@ -6955,7 +6960,7 @@ msgstr "" #: libraries/import/shp.php:19 msgid "ESRI Shape File" -msgstr "Arquivo em formato ESRI" +msgstr "Arquivo de formas ESRI" #: libraries/import/shp.php:280 #, php-format @@ -6977,7 +6982,7 @@ msgstr "Extensão Espacial MySQL não suporta o tipo ESRI \"%s\"." #: libraries/import/shp.php:376 msgid "The imported file does not contain any data" -msgstr "Os arquivos importados não contém dados válidos" +msgstr "O arquivo importado não contém nenhum dado" #: libraries/import/sql.php:33 msgid "SQL compatibility mode:" @@ -6995,11 +7000,11 @@ msgstr "Nenhuma" #. l10n: This is currently used only in Japanese locales #: libraries/kanji-encoding.lib.php:153 msgid "Convert to Kana" -msgstr "Converter para Kana" +msgstr "Converter para Katakana" #: libraries/mult_submits.inc.php:254 msgid "From" -msgstr "Do" +msgstr "De" #: libraries/mult_submits.inc.php:257 msgid "To" @@ -7008,11 +7013,11 @@ msgstr "Para" #: libraries/mult_submits.inc.php:262 libraries/mult_submits.inc.php:275 #: libraries/sql_query_form.lib.php:403 msgid "Submit" -msgstr "Submeter" +msgstr "Submit" #: libraries/mult_submits.inc.php:267 msgid "Add table prefix" -msgstr "Adicionar prefixo de tabela" +msgstr "Adicionar prefixo de tabelas" #: libraries/mult_submits.inc.php:270 msgid "Add prefix" @@ -7020,7 +7025,7 @@ msgstr "Adicionar índice" #: libraries/mult_submits.inc.php:483 tbl_replace.php:359 msgid "No change" -msgstr "Sem Mudança" +msgstr "Nenhuma alteração" #: libraries/mysql_charsets.lib.php:113 msgid "Charset" @@ -7033,7 +7038,7 @@ msgstr "Binário" #: libraries/mysql_charsets.lib.php:224 msgid "Bulgarian" -msgstr "Bulgaro" +msgstr "Búlgaro" #: libraries/mysql_charsets.lib.php:228 libraries/mysql_charsets.lib.php:353 msgid "Simplified Chinese" @@ -7085,7 +7090,7 @@ msgstr "dicionário" #: libraries/mysql_charsets.lib.php:261 msgid "phone book" -msgstr "Agenda de telefones" +msgstr "agenda de telefones" #: libraries/mysql_charsets.lib.php:264 msgid "Hungarian" @@ -7113,7 +7118,7 @@ msgstr "Coreano" #: libraries/mysql_charsets.lib.php:282 msgid "Persian" -msgstr "Pérsa" +msgstr "Persa" #: libraries/mysql_charsets.lib.php:285 msgid "Polish" @@ -7125,7 +7130,7 @@ msgstr "Oeste Europeu" #: libraries/mysql_charsets.lib.php:291 msgid "Romanian" -msgstr "Romêno" +msgstr "Romeno" #: libraries/mysql_charsets.lib.php:294 msgid "Slovak" @@ -7141,15 +7146,15 @@ msgstr "Espanhol" #: libraries/mysql_charsets.lib.php:303 msgid "Traditional Spanish" -msgstr "Espanhol Traditional" +msgstr "Espanhol Tradicional" #: libraries/mysql_charsets.lib.php:306 libraries/mysql_charsets.lib.php:403 msgid "Swedish" -msgstr "Suéco" +msgstr "Sueco" #: libraries/mysql_charsets.lib.php:309 libraries/mysql_charsets.lib.php:406 msgid "Thai" -msgstr "Thailandês" +msgstr "Tailandês" #: libraries/mysql_charsets.lib.php:312 libraries/mysql_charsets.lib.php:400 msgid "Turkish" @@ -7183,7 +7188,7 @@ msgstr "Báltico" #: libraries/mysql_charsets.lib.php:370 msgid "Armenian" -msgstr "Armêno" +msgstr "Armênio" #: libraries/mysql_charsets.lib.php:376 msgid "Cyrillic" @@ -7242,7 +7247,7 @@ msgstr "Habilitado" #: libraries/relation.lib.php:88 libraries/relation.lib.php:100 #: pmd_relation_new.php:66 msgid "General relation features" -msgstr "Funcionalidades de relações gerais" +msgstr "Funcionalidades gerais de relações" #: libraries/relation.lib.php:104 msgid "Display Features" @@ -7268,7 +7273,7 @@ msgstr "Consulte a documentação sobre como atualizar sua tabela Column_comment #: libraries/relation.lib.php:124 libraries/sql_query_form.lib.php:376 msgid "Bookmarked SQL query" -msgstr "Consulta SQL gravada" +msgstr "Consulta SQL marcada" #: libraries/relation.lib.php:128 querywindow.php:74 querywindow.php:169 msgid "SQL history" @@ -7280,7 +7285,7 @@ msgstr "Tabelas persistentes recentemente usadas" #: libraries/relation.lib.php:140 msgid "Persistent tables' UI preferences" -msgstr "Persistir tabelas de preferência de UI" +msgstr "Persistir tabelas de preferências de UI" #: libraries/relation.lib.php:148 msgid "User preferences" @@ -7317,7 +7322,7 @@ msgstr "" #: libraries/relation.lib.php:1130 msgid "no description" -msgstr "sem Descrição" +msgstr "sem descrição" #: libraries/replication_gui.lib.php:54 msgid "Slave configuration" @@ -7346,16 +7351,16 @@ msgstr "Nome do usuário" #: libraries/replication_gui.lib.php:107 msgid "Master status" -msgstr "Status principal" +msgstr "Status do master" #: libraries/replication_gui.lib.php:109 msgid "Slave status" -msgstr "Status dos secundários" +msgstr "Status do(s) slave(s)" #: libraries/replication_gui.lib.php:118 libraries/sql_query_form.lib.php:388 #: server_status.php:1488 server_variables.php:123 msgid "Variable" -msgstr "Variáveis" +msgstr "Variável" #: libraries/replication_gui.lib.php:119 #: libraries/rte/rte_routines.lib.php:1394 libraries/tbl_select.lib.php:87 @@ -7367,7 +7372,7 @@ msgstr "Valor" #: libraries/replication_gui.lib.php:178 server_binlog.php:183 msgid "Server ID" -msgstr "ID do Servidor" +msgstr "ID do servidor" #: libraries/replication_gui.lib.php:197 msgid "" @@ -7379,7 +7384,7 @@ msgstr "" #: libraries/replication_gui.lib.php:246 server_replication.php:192 msgid "Add slave replication user" -msgstr "Adicionar escravo de replicação de usuário" +msgstr "Adicionar usuário de replicação de escravo" #: libraries/replication_gui.lib.php:260 server_privileges.php:799 msgid "Any user" @@ -7394,7 +7399,7 @@ msgstr "Usar campo texto" #: libraries/replication_gui.lib.php:308 server_privileges.php:847 msgid "Any host" -msgstr "Qualquer servidor" +msgstr "Qualquer host" #: libraries/replication_gui.lib.php:312 server_privileges.php:851 msgid "Local" @@ -7402,11 +7407,11 @@ msgstr "Local" #: libraries/replication_gui.lib.php:318 server_privileges.php:856 msgid "This Host" -msgstr "Esse Servidor" +msgstr "Este host" #: libraries/replication_gui.lib.php:324 server_privileges.php:862 msgid "Use Host Table" -msgstr "Usar Tabela do Servidor" +msgstr "Usar tabela Host" #: libraries/replication_gui.lib.php:337 server_privileges.php:875 msgid "" @@ -7433,12 +7438,12 @@ msgstr "A seguinte consulta falhou: \"%s\"" #: libraries/rte/rte_events.lib.php:125 msgid "Sorry, we failed to restore the dropped event." -msgstr "Desculpe, mas falhamos ao restaurar o evento caído." +msgstr "Desculpe, mas falhamos em restaurar o evento eliminado." #: libraries/rte/rte_events.lib.php:128 libraries/rte/rte_routines.lib.php:278 #: libraries/rte/rte_triggers.lib.php:101 msgid "The backed up query was:" -msgstr "A consulta de backup foi:" +msgstr "A consulta armazenada em backup foi:" #: libraries/rte/rte_events.lib.php:134 #, php-format @@ -7448,13 +7453,13 @@ msgstr "O evento %1$s foi modificado." #: libraries/rte/rte_events.lib.php:150 #, php-format msgid "Event %1$s has been created." -msgstr "O evento %1$s foi criada." +msgstr "O evento %1$s foi criado." #: libraries/rte/rte_events.lib.php:158 libraries/rte/rte_routines.lib.php:309 #: libraries/rte/rte_triggers.lib.php:131 msgid "One or more errors have occured while processing your request:" msgstr "" -"Um ou mais erros ocorreram durante o processamento de sua requisição:" +"Um ou mais erros ocorreram durante o processamento do seu pedido:" #: libraries/rte/rte_events.lib.php:202 msgid "Edit event" @@ -7465,7 +7470,7 @@ msgstr "Editar evento" #: libraries/rte/rte_routines.lib.php:1335 #: libraries/rte/rte_triggers.lib.php:204 msgid "Error in processing request" -msgstr "Erro no processamento da requisição" +msgstr "Erro no processamento do request" #: libraries/rte/rte_events.lib.php:388 libraries/rte/rte_routines.lib.php:845 #: libraries/rte/rte_triggers.lib.php:319 @@ -7510,7 +7515,7 @@ msgstr "Definição" #: libraries/rte/rte_events.lib.php:488 msgid "On completion preserve" -msgstr "Após a conclusão manter" +msgstr "Guardar após a conclusão" #: libraries/rte/rte_events.lib.php:492 libraries/rte/rte_routines.lib.php:950 #: libraries/rte/rte_triggers.lib.php:379 @@ -7586,7 +7591,7 @@ msgstr "Tipo de rotina inválido: \"%s\"" #: libraries/rte/rte_routines.lib.php:275 msgid "Sorry, we failed to restore the dropped routine." -msgstr "Desculpa, mas falhamos ao restaurar a rotina." +msgstr "Desculpe, mas falhamos em restaurar a rotina eliminada." #: libraries/rte/rte_routines.lib.php:284 #, php-format @@ -7612,19 +7617,19 @@ msgstr "Parâmetros" #: libraries/rte/rte_routines.lib.php:876 msgid "Direction" -msgstr "Diração" +msgstr "Direção" #: libraries/rte/rte_routines.lib.php:879 libraries/tbl_properties.inc.php:98 msgid "Length/Values" -msgstr "Tamanho/Definir*" +msgstr "Tamanho/Valores" #: libraries/rte/rte_routines.lib.php:894 msgid "Add parameter" -msgstr "Adicionar índice" +msgstr "Adicionar parâmetro" #: libraries/rte/rte_routines.lib.php:898 msgid "Remove last parameter" -msgstr "Remover último índice" +msgstr "Remover último parâmetro" #: libraries/rte/rte_routines.lib.php:903 msgid "Return type" @@ -7709,42 +7714,42 @@ msgstr "Função" #: libraries/rte/rte_triggers.lib.php:98 msgid "Sorry, we failed to restore the dropped trigger." -msgstr "Desculpa, mas falhamos ao restaurar a rotina." +msgstr "Desculpe, mas falhamos em restaurar o gatilho eliminado." #: libraries/rte/rte_triggers.lib.php:107 #, php-format msgid "Trigger %1$s has been modified." -msgstr "A rotina %1$s foi modificada." +msgstr "O gatilho %1$s foi modificado." #: libraries/rte/rte_triggers.lib.php:123 #, php-format msgid "Trigger %1$s has been created." -msgstr "A rotina %1$s foi criada." +msgstr "O gatilho %1$s foi criado." #: libraries/rte/rte_triggers.lib.php:178 msgid "Edit trigger" -msgstr "Editar rotina" +msgstr "Editar gatilho" #: libraries/rte/rte_triggers.lib.php:322 msgid "Trigger name" -msgstr "Nome da rotina" +msgstr "Nome do gatilho" #: libraries/rte/rte_triggers.lib.php:345 msgctxt "Trigger action time" msgid "Time" -msgstr "Tempo" +msgstr "Momento de ação do gatilho" #: libraries/rte/rte_triggers.lib.php:424 msgid "You must provide a trigger name" -msgstr "Você deve informar o nome da trigger" +msgstr "Você deve informar o nome do gatilho" #: libraries/rte/rte_triggers.lib.php:429 msgid "You must provide a valid timing for the trigger" -msgstr "Você deve informar um tempo válido para a trigger" +msgstr "Você deve informar um tempo válido para o gatilho" #: libraries/rte/rte_triggers.lib.php:434 msgid "You must provide a valid event for the trigger" -msgstr "Você deve informar um evento válido para a trigger" +msgstr "Você deve informar um evento válido para o gatilho" #: libraries/rte/rte_triggers.lib.php:440 msgid "You must provide a valid table name" @@ -7752,11 +7757,11 @@ msgstr "Você precisa colocar um nome de tabela válido" #: libraries/rte/rte_triggers.lib.php:446 msgid "You must provide a trigger definition." -msgstr "Você deve informar uma definição para a trigger." +msgstr "Você deve informar uma definição para o gatilho." #: libraries/rte/rte_words.lib.php:18 msgid "Add routine" -msgstr "Adicionar índice" +msgstr "Adicionar rotina" #: libraries/rte/rte_words.lib.php:20 #, php-format @@ -7791,7 +7796,7 @@ msgstr "Exportação do gatilho %s" #: libraries/rte/rte_words.lib.php:33 msgid "trigger" -msgstr "Gatilho" +msgstr "gatilho" #: libraries/rte/rte_words.lib.php:34 msgid "You do not have the necessary privileges to create a trigger" @@ -7856,7 +7861,7 @@ msgstr "Configure as coordenadas para a tabela %s" #: libraries/schema/Visio_Relation_Schema.class.php:537 #, php-format msgid "Schema of the %s database - Page %s" -msgstr "Esquema do Banco de Dados \"%s\" - Página %s" +msgstr "Esquema do banco de dados \"%s\" - Página %s" #: libraries/schema/Export_Relation_Schema.class.php:200 msgid "This page does not contain any tables!" @@ -7893,11 +7898,11 @@ msgstr "Criar uma nova página" #: libraries/schema/User_Schema.class.php:122 msgid "Page name" -msgstr "Numero da página" +msgstr "Nome da página" #: libraries/schema/User_Schema.class.php:126 msgid "Automatic layout based on" -msgstr "Leiaute automático baseado em" +msgstr "Layout automático baseado em" #: libraries/schema/User_Schema.class.php:129 msgid "Internal relations" @@ -7909,7 +7914,7 @@ msgstr "CHAVE ESTRANGEIRA" #: libraries/schema/User_Schema.class.php:173 msgid "Please choose a page to edit" -msgstr "Escolha a página para editar" +msgstr "Favor escolher uma página para editar" #: libraries/schema/User_Schema.class.php:178 msgid "Select page" @@ -7917,7 +7922,7 @@ msgstr "Selecionar página" #: libraries/schema/User_Schema.class.php:244 msgid "Select Tables" -msgstr "Tabelas selecionadas" +msgstr "Selecionar tabelas" #: libraries/schema/User_Schema.class.php:382 msgid "Display relational schema" @@ -7925,7 +7930,7 @@ msgstr "Mostrar esquema relacional" #: libraries/schema/User_Schema.class.php:392 msgid "Select Export Relational Type" -msgstr "Selecione o Tipo de Exportação Relacional" +msgstr "Selecione o tipo de exportação relacional" #: libraries/schema/User_Schema.class.php:413 msgid "Show grid" @@ -7941,7 +7946,7 @@ msgstr "Mostrar dimensão das tabelas" #: libraries/schema/User_Schema.class.php:420 msgid "Display all tables with the same width" -msgstr "Mostrar todas as tabelas com o mesmo tamanho" +msgstr "Mostrar todas as tabelas com a mesma largura" #: libraries/schema/User_Schema.class.php:425 msgid "Only show keys" @@ -7968,12 +7973,12 @@ msgid "" "The current page has references to tables that no longer exist. Would you " "like to delete those references?" msgstr "" -"A Página atual contêm referências para uma tabela que não existe. Gostaria " -"de eliminar estas referências?" +"A página atual contêm referências para tabelas que não existem. Gostaria de " +"eliminar estas referências?" #: libraries/schema/User_Schema.class.php:507 msgid "Toggle scratchboard" -msgstr "mudar o estado do Scratchboard" +msgstr "Alternar o estado do Scratchboard" #. l10n: Text direction, use either ltr or rtl #: libraries/select_lang.lib.php:478 @@ -7988,7 +7993,7 @@ msgstr "Linguagem desconhecida: %1$s." #: libraries/select_server.lib.php:32 libraries/select_server.lib.php:37 msgid "Current Server" -msgstr "Servidor Atual" +msgstr "Servidor atual" #: libraries/server_links.inc.php:60 msgid "Users" @@ -8057,7 +8062,7 @@ msgstr "Rodar consulta(s) SQL no servidor %s" #: libraries/sql_query_form.lib.php:206 libraries/sql_query_form.lib.php:228 #, php-format msgid "Run SQL query/queries on database %s" -msgstr "Fazer consulta SQL no Banco de Dados %s" +msgstr "Rodar consulta(s) SQL no banco de dados %s" #: libraries/sql_query_form.lib.php:260 navigation.php:269 #: setup/frames/index.inc.php:233 @@ -8070,7 +8075,7 @@ msgstr "Colunas" #: libraries/sql_query_form.lib.php:300 sql.php:973 sql.php:990 msgid "Bookmark this SQL query" -msgstr "Gravar essa consulta SQL" +msgstr "Marcar essa consulta SQL" #: libraries/sql_query_form.lib.php:307 sql.php:984 msgid "Let every user access this bookmark" @@ -8090,7 +8095,7 @@ msgstr "Delimitadores" #: libraries/sql_query_form.lib.php:344 msgid "Show this query here again" -msgstr "Mostrar esta consulta SQL novamente" +msgstr "Mostrar esta consulta SQL aqui novamente" #: libraries/sql_query_form.lib.php:407 msgid "View only" @@ -8098,7 +8103,7 @@ msgstr "Apenas visualizar" #: libraries/sql_query_form.lib.php:455 tbl_change.php:907 msgid "web server upload directory" -msgstr "Servidor web subiu o diretório" +msgstr "diretório de upload do servidor web" #: libraries/sqlparser.lib.php:136 msgid "" @@ -8106,7 +8111,7 @@ msgid "" "below, if there is any, may also help you in diagnosing the problem" msgstr "" "Parece haver um erro na sua consulta SQL. A saída do servidor MySQL abaixo, " -"isto se existir alguma, também poderá ajudar a diagnosticar o problema" +"se houver alguma, também poderá ajudar a diagnosticar o problema" #: libraries/sqlparser.lib.php:175 msgid "" @@ -8120,40 +8125,40 @@ msgid "" "please reduce your SQL query input to the single query that causes problems, " "and submit a bug report with the data chunk in the CUT section below:" msgstr "" -"Talvez tenha encontrado um bug no analizador (parser) do SQL. Analise a sua " -"consulta SQL com atenção e verifique se as aspas estão corretas e não estão " -"desencontradas. Outra possibilidade de falha é o fato de estar tentando " -"subir um arquivo com saída binária de uma área de texto citada. Pode também " -"experimentar a sua consulta SQL no prompt de comandos do MySQL. A saída de " -"erro do MySQL, isto se existir alguma, também poderá ajudar a diagnosticar o " -"problema. Se continuar a ter problemas ou se o analisador (parser) falhar " -"onde a interface da linha de comandos tiver sucesso, reduza por favor a " -"entrada da consulta SQL até aquele que causou o problema, e envie o " -"relatório de bug com os dados do chunk da seção CORTE abaixo:" +"Você talvez tenha encontrado um bug no analizador (parser) do SQL. Analise a " +"sua consulta SQL com atenção e verifique se as aspas estão corretas e não " +"estão desencontradas. Outra possibilidade de falha é o fato de estar " +"tentando subir um arquivo com saída binária de uma área de texto entre " +"citações. Você também pode experimentar a sua consulta SQL no prompt de " +"comandos do MySQL. A saída de erro do MySQL, se houver alguma, também poderá " +"ajudar a diagnosticar o problema. Se continuar a ter problemas ou se o " +"analisador (parser) falhar mesmo a interface da linha de comandos tendo " +"sucesso, favor reduzir a consulta SQL até o pedaço que causou o problema, e " +"envie o relatório de bug com os dados do chunk da seção CUT abaixo:" #: libraries/sqlparser.lib.php:177 msgid "BEGIN CUT" -msgstr "INICIO CORTE" +msgstr "BEGIN CUT" #: libraries/sqlparser.lib.php:179 msgid "END CUT" -msgstr "FIM CORTE" +msgstr "END CUT" #: libraries/sqlparser.lib.php:181 msgid "BEGIN RAW" -msgstr "INICIO RAW" +msgstr "BEGIN RAW" #: libraries/sqlparser.lib.php:185 msgid "END RAW" -msgstr "FIM RAW" +msgstr "END RAW" #: libraries/sqlparser.lib.php:382 msgid "Automatically appended backtick to the end of query!" -msgstr "Automaticamente adicionado contra-apóstrofo ao fim da consulta!" +msgstr "Apóstrofo adicionado automaticamente ao fim da consulta!" #: libraries/sqlparser.lib.php:385 msgid "Unclosed quote" -msgstr "Aspas não fechada" +msgstr "Citação não fechada" #: libraries/sqlparser.lib.php:537 msgid "Invalid Identifer" @@ -8169,8 +8174,8 @@ msgid "" "The SQL validator could not be initialized. Please check if you have " "installed the necessary PHP extensions as described in the %sdocumentation%s." msgstr "" -"O Validador SQL não pode ser inicializado. Verifique se você instalou a " -"extensão necessária do php conforme está escrito na %sdocumentação%s." +"O Validador SQL não pôde ser inicializado. Verifique se você instalou a " +"extensão necessária do PHP conforme está escrito na %sdocumentação%s." #: libraries/tbl_links.inc.php:118 libraries/tbl_links.inc.php:119 msgid "Table seems to be empty!" @@ -8198,8 +8203,8 @@ msgid "" "For default values, please enter just a single value, without backslash " "escaping or quotes, using this format: a" msgstr "" -"Para valores padrão, digite um valor simples, sem barras de escape ou aspas, " -"use este formato: a" +"Para valores padrão, digite um único valor, sem barras invertidas de escape " +"ou citações, usando este formato: a" #: libraries/tbl_properties.inc.php:109 libraries/tbl_properties.inc.php:478 #: tbl_printview.php:281 tbl_structure.php:153 tbl_structure.php:158 @@ -8214,7 +8219,7 @@ msgid "" "transformations, click on %stransformation descriptions%s" msgstr "" "Para uma lista de opções de transformação disponíveis e suas transformações " -"MIME-type, clique em %sdescrição de transformações%s" +"de tipo de MIME, clique em %sdescrição de transformações%s" #: libraries/tbl_properties.inc.php:137 msgid "Transformation options" @@ -8234,7 +8239,7 @@ msgstr "" #: libraries/tbl_properties.inc.php:321 msgid "ENUM or SET data too long?" -msgstr "ENUM ou conjunto de dados muito grande?" +msgstr "Instruções ENUM ou SET grandes demais?" #: libraries/tbl_properties.inc.php:327 msgid "Get more editing space" @@ -8243,7 +8248,7 @@ msgstr "Consiga mais espaço de edição" #: libraries/tbl_properties.inc.php:351 msgctxt "for default" msgid "None" -msgstr "Nenhum, nada" +msgstr "Padrão: none" #: libraries/tbl_properties.inc.php:352 msgid "As defined:" @@ -8266,7 +8271,7 @@ msgstr "Adicionar campo(s) %s" #: libraries/tbl_properties.inc.php:575 tbl_structure.php:662 msgid "You have to add at least one column." -msgstr "Você deve adicionar pelo menos um campo." +msgstr "Você deve adicionar pelo menos uma coluna." #: libraries/tbl_properties.inc.php:663 server_engines.php:54 #: tbl_operations.php:374 @@ -8310,17 +8315,17 @@ msgstr "" "Mostrar um link para baixar os dados binários da coluna. Você pode usar a " "primeira opção para especificar o nome do arquivo, ou usar a segunda opção " "como o nome de uma coluna que contém o nome do arquivo. Se você usar a " -"segunda opção, você precisará primeiro de configurar a primeira opção para a " -"string vazia." +"segunda opção, você precisará configurar a primeira opção com uma string " +"vazia." #: libraries/transformations/application_octetstream__hex.inc.php:10 msgid "" "Displays hexadecimal representation of data. Optional first parameter " "specifies how often space will be added (defaults to 2 nibbles)." msgstr "" -"Exibir representação hexadecimal dos dados. Primeiro parâmetro opcional " -"especifica como frequentemente espaços serão adicionados (padrão para 2 " -"mordidelas)." +"Exibir representação hexadecimal dos dados. O primeiro parâmetro opcional " +"especifica quão frequentemente serão adicionados espaços (o padrão é 2 " +"pedaços)." #: libraries/transformations/image_jpeg__inline.inc.php:10 #: libraries/transformations/image_png__inline.inc.php:10 @@ -8328,12 +8333,12 @@ msgid "" "Displays a clickable thumbnail. The options are the maximum width and height " "in pixels. The original aspect ratio is preserved." msgstr "" -"Mostrar uma miniatura clicável; As opções são a largura e altura máxima em " -"pixels." +"Mostrar uma miniatura clicável. As opções são a largura e altura máxima em " +"pixels. A proporção original é preservada." #: libraries/transformations/image_jpeg__link.inc.php:10 msgid "Displays a link to download this image." -msgstr "Mostrar o link para esta imagem (ex.: blob download direto)." +msgstr "Mostrar um link para download desta imagem." #: libraries/transformations/text_plain__dateformat.inc.php:10 msgid "" @@ -8346,14 +8351,14 @@ msgid "" "documentation for PHP's strftime() function and for \"utc\" it is done using " "gmdate() function." msgstr "" -"Exibir um TIME, TIMESTAMP, DATETIME ou campo numérico timestamp unix " -"formatado como data. A primeira opção é o deslocamento (em horas) que irá " -"ser adicionado ao timestamp (Padrão: 0). Use a segunda opção para " -"especificar uma string de formatação date/time diferente. A terceira opção " -"determina se você deseja ver data local ou UTC (use a string \"local\" ou " -"\"utc\") para isso. De acordo com isso, o formato date terá valores diferentes " -"- para \"local\" veja a documentação do PHP para função strftime() e para " -"\"utc\" isso é feito usando a função gmdate()." +"Exibir uma coluna TIME, TIMESTAMP, DATETIME ou campo numérico UNIX como data " +"formatada. A primeira opção é o deslocamento (em horas) que irá ser " +"adicionado ao timestamp (Padrão: 0). Use a segunda opção para especificar " +"uma string de formatação date/time diferente. A terceira opção determina se " +"você deseja ver a data local ou UTC (use a string \"local\" ou \"utc\" para " +"isso). De acordo com isso, o formato de data terá valores diferentes - para " +"\"local\" veja a documentação do PHP para função strftime() e para \"utc\" isso " +"é feito usando a função gmdate()." #: libraries/transformations/text_plain__external.inc.php:10 msgid "" @@ -8384,7 +8389,7 @@ msgid "" "Displays the contents of the column as-is, without running it through " "htmlspecialchars(). That is, the column is assumed to contain valid HTML." msgstr "" -"Mostra o conteúdo da coluna como é, sem manipular através de " +"Mostra o conteúdo da coluna como ele é, sem manipular através de " "htmlspecialchars(). Isso é, a coluna assume conter somente HTML válido." #: libraries/transformations/text_plain__imagelink.inc.php:10 @@ -8393,9 +8398,9 @@ msgid "" "option is a URL prefix like \"http://www.example.com/\". The second and " "third options are the width and the height in pixels." msgstr "" -"Mostra uma imagem e um link, o campo contém um nome de arquivo. Primeira " -"opção é um prefixo de URL como \"http://www.exemplo.com/\". A segunda e " -"terceira opção são a largura e a altura em pixels." +"Mostra uma imagem e um link; o campo contém o nome do arquivo. A primeira " +"opção é um prefixo de URL como \"http://www.exemplo.com/\". A segunda e " +"terceira opções são a largura e a altura em pixels." #: libraries/transformations/text_plain__link.inc.php:10 msgid "" @@ -8412,12 +8417,12 @@ msgid "" "Converts an (IPv4) Internet network address into a string in Internet " "standard dotted format." msgstr "" -"Converte uma rede de Internet (IPv4) em uma string com formatada com " -"pontuação padrão da Internet." +"Converte uma rede de Internet (IPv4) em uma string formatada com pontuação " +"padrão de Internet." #: libraries/transformations/text_plain__sql.inc.php:10 msgid "Formats text as SQL query with syntax highlighting." -msgstr "Formatar texto como consulta SQL com síntaxe colorida." +msgstr "Formatar texto como consulta SQL com destaque de sintaxe." #: libraries/transformations/text_plain__substr.inc.php:10 msgid "" @@ -8439,7 +8444,7 @@ msgstr "Gerencie suas configurações" #: libraries/user_preferences.inc.php:50 prefs_manage.php:289 msgid "Configuration has been saved" -msgstr "Modificações foram salvas" +msgstr "A configuração foi salva" #: libraries/user_preferences.inc.php:71 #, php-format @@ -8447,9 +8452,8 @@ msgid "" "Your preferences will be saved for current session only. Storing them " "permanently requires %sphpMyAdmin configuration storage%s." msgstr "" -"Suas preferências serão salvas somente para a atual sessão. Armazená-las " -"permanentemente requer configuração no arquivo de configuração %sphpMyAdmin " -"%s." +"Suas preferências serão salvas somente para a sessão atual. Armazená-las " +"permanentemente requer %sarmazenamento de configurações do phpMyAdmin%s." #: libraries/user_preferences.lib.php:116 msgid "Could not save configuration" @@ -8656,7 +8660,7 @@ msgstr "" #: navigation.php:182 server_databases.php:284 server_synchronize.php:1294 msgid "No databases" -msgstr "Sem bases" +msgstr "Nenhum banco de dados" #: navigation.php:270 msgid "Filter tables by name" @@ -8693,7 +8697,7 @@ msgstr "Ajuda" #: pmd_general.php:87 msgid "Angular links" -msgstr "Links Angulares" +msgstr "Links angulares" #: pmd_general.php:87 msgid "Direct links" @@ -8705,7 +8709,7 @@ msgstr "Ajustar à grade" #: pmd_general.php:95 msgid "Small/Big All" -msgstr "Tudo Pequeno/Grande" +msgstr "Tudo pequeno/grande" #: pmd_general.php:98 msgid "Toggle small/big" @@ -8721,7 +8725,7 @@ msgstr "Importar/Exportar coordenadas para esquema PDF" #: pmd_general.php:110 msgid "Build Query" -msgstr "Construir uma consulta" +msgstr "Construir consulta" #: pmd_general.php:115 msgid "Move Menu" @@ -8733,7 +8737,7 @@ msgstr "Ocultar/Exibir tudo" #: pmd_general.php:130 msgid "Hide/Show Tables with no relation" -msgstr "Ocultar/Exibir Tabelas sem relacionamento" +msgstr "Ocultar/Exibir tabelas sem relacionamento" #: pmd_general.php:147 tbl_change.php:324 tbl_change.php:330 msgid "Hide" @@ -8741,7 +8745,7 @@ msgstr "Ocultar" #: pmd_general.php:170 msgid "Number of tables" -msgstr "Numero de tabelas" +msgstr "Número de tabelas" #: pmd_general.php:412 msgid "Delete relation" @@ -8763,7 +8767,7 @@ msgstr "sub-consulta" #: pmd_general.php:474 pmd_general.php:570 msgid "Rename to" -msgstr "Renomear para " +msgstr "Renomear para" #: pmd_general.php:476 pmd_general.php:575 msgid "New name" @@ -8787,7 +8791,7 @@ msgstr "Falha na criação da página" #: pmd_pdf.php:85 msgid "Page" -msgstr "página" +msgstr "Página" #: pmd_pdf.php:95 msgid "Import from selected page" @@ -8823,11 +8827,11 @@ msgstr "Erro: relacionamento não adicionado." #: pmd_relation_new.php:60 msgid "FOREIGN KEY relation added" -msgstr "Adicionado relacionamento FOREIGN KEY" +msgstr "Adicionado relacionamento de FOREIGN KEY" #: pmd_relation_new.php:82 msgid "Internal relation added" -msgstr "Adicionado relacionamento Interno" +msgstr "Adicionado relacionamento interno" #: pmd_relation_upd.php:58 msgid "Relation deleted" @@ -8847,11 +8851,11 @@ msgstr "As configurações não podem salvas, o formulário submetido contém er #: prefs_manage.php:78 msgid "Could not import configuration" -msgstr "Não foi possível importar configuração de: \"%1$s\"" +msgstr "Não foi possível importar a configuração" #: prefs_manage.php:110 msgid "Configuration contains incorrect data for some fields." -msgstr "Configuração contém dados incorretos para alguns campos." +msgstr "A configuração contém dados incorretos para alguns campos." #: prefs_manage.php:126 msgid "Do you want to import remaining settings?" @@ -8983,11 +8987,11 @@ msgstr "Estatísticas do Banco de Dados" #: server_databases.php:186 server_replication.php:179 #: server_replication.php:207 msgid "Master replication" -msgstr "Replicação mestre" +msgstr "Replicação de master" #: server_databases.php:188 server_replication.php:246 msgid "Slave replication" -msgstr "Replicação escrava" +msgstr "Replicação de slave" #: server_databases.php:275 server_databases.php:276 msgid "Enable Statistics" @@ -9003,11 +9007,11 @@ msgstr "" #: server_engines.php:45 msgid "Storage Engines" -msgstr "Motores de Armazenamento" +msgstr "Motores de armazenamento" #: server_export.php:20 msgid "View dump (schema) of databases" -msgstr "Ver dump (esquema) dos Bancos de Dados" +msgstr "Ver dump (esquema) dos bancos de dados" #: server_plugins.php:81 msgid "Modules" @@ -9047,7 +9051,7 @@ msgstr "desabilitado" #: server_privileges.php:34 server_privileges.php:369 msgid "Includes all privileges except GRANT." -msgstr "Incluir todos os privilégios, exceto GRANT." +msgstr "Incluir todos os privilégios exceto o GRANT." #: server_privileges.php:35 server_privileges.php:245 #: server_privileges.php:630 @@ -9057,17 +9061,17 @@ msgstr "Permitir alterar a estrutura das tabelas existentes." #: server_privileges.php:36 server_privileges.php:303 #: server_privileges.php:636 msgid "Allows altering and dropping stored routines." -msgstr "Permitir alterar e apagar stored routines." +msgstr "Permitir alterar e apagar rotinas armazenadas." #: server_privileges.php:37 server_privileges.php:213 #: server_privileges.php:629 msgid "Allows creating new databases and tables." -msgstr "Permitir criar novas tabelas e Banco de Dados." +msgstr "Permitir criar novos bancos de dados e tabelas." #: server_privileges.php:38 server_privileges.php:299 #: server_privileges.php:635 msgid "Allows creating stored routines." -msgstr "Permitir criar stored routines." +msgstr "Permitir criar rotinas armazenadas." #: server_privileges.php:39 server_privileges.php:629 msgid "Allows creating new tables." @@ -9087,7 +9091,7 @@ msgstr "Permitir criar, apagar e renomear contas dos usuários." #: server_privileges.php:286 server_privileges.php:641 #: server_privileges.php:645 msgid "Allows creating new views." -msgstr "Permitir criar novas visões." +msgstr "Permitir criar novas views." #: server_privileges.php:43 server_privileges.php:209 #: server_privileges.php:621 @@ -9097,7 +9101,7 @@ msgstr "Permitir apagar dados." #: server_privileges.php:44 server_privileges.php:217 #: server_privileges.php:632 msgid "Allows dropping databases and tables." -msgstr "Permitir eliminar Banco de Dados e tabelas." +msgstr "Permitir eliminar bancos de dados e tabelas." #: server_privileges.php:45 server_privileges.php:632 msgid "Allows dropping tables." @@ -9106,12 +9110,12 @@ msgstr "Permitir eliminar tabelas." #: server_privileges.php:46 server_privileges.php:277 #: server_privileges.php:649 msgid "Allows to set up events for the event scheduler" -msgstr "Permitir iniciar eventos no cronograma de eventos" +msgstr "Permitir definir eventos no agendador de eventos" #: server_privileges.php:47 server_privileges.php:311 #: server_privileges.php:637 msgid "Allows executing stored routines." -msgstr "Permitir executar stored routines." +msgstr "Permitir executar rotinas armazenadas." #: server_privileges.php:48 server_privileges.php:233 #: server_privileges.php:624 @@ -9157,7 +9161,7 @@ msgid "" "Limits the number of commands that change any table or database the user may " "execute per hour." msgstr "" -"Limitar o número de comandos que alteram Bancos de Dados ou tabelas que o " +"Limitar o número de comandos que alteram tabelas ou bancos de dados que o " "usuário pode executar por hora." #: server_privileges.php:56 server_privileges.php:734 @@ -9173,14 +9177,13 @@ msgstr "Permitir visualizar processos de todos os usuários" #: server_privileges.php:58 server_privileges.php:237 #: server_privileges.php:560 server_privileges.php:665 msgid "Has no effect in this MySQL version." -msgstr "Sem efeitos nesta versão do MySQL." +msgstr "Não tem nenhum efeito nessa versão do MySQL." #: server_privileges.php:59 server_privileges.php:221 #: server_privileges.php:660 msgid "Allows reloading server settings and flushing the server's caches." msgstr "" -"Permitir recarregar configurações do servidor e descarregar o cache do " -"servidor." +"Permitir recarregar configurações do servidor e limpar o cache do servidor." #: server_privileges.php:60 server_privileges.php:269 #: server_privileges.php:667 @@ -9190,17 +9193,17 @@ msgstr "Permitir que o usuário pergunte onde estão os escravos / mestres." #: server_privileges.php:61 server_privileges.php:265 #: server_privileges.php:668 msgid "Needed for the replication slaves." -msgstr "Precisar dos escravos de replicação." +msgstr "Necessário para a replicação dos slaves." #: server_privileges.php:62 server_privileges.php:197 #: server_privileges.php:545 server_privileges.php:618 msgid "Allows reading data." -msgstr "Permitir leitura dos dados." +msgstr "Permitir leitura de dados." #: server_privileges.php:63 server_privileges.php:249 #: server_privileges.php:662 msgid "Gives access to the complete list of databases." -msgstr "Permitir acesso completo à lista de Bancos de Dados." +msgstr "Dá acesso à lista completa de bancos de dados." #: server_privileges.php:64 server_privileges.php:290 #: server_privileges.php:295 server_privileges.php:634 @@ -9219,14 +9222,14 @@ msgid "" "required for most administrative operations like setting global variables or " "killing threads of other users." msgstr "" -"Permitir conectar, se o numero máximo de conexões for alcançado; Necessário " -"para muitas operações administrativas, como setar variáveis globais e matar " -"processos de outros usuários." +"Permitir conectar, mesmo que o número máximo de conexões seja alcançado; " +"necessário para a maioria das operações administrativas, como definir " +"variáveis globais e matar processos de outros usuários." #: server_privileges.php:67 server_privileges.php:281 #: server_privileges.php:650 msgid "Allows creating and dropping triggers" -msgstr "Permitir criar e e largar em cadeia" +msgstr "Permitir criar e apagar gatilhos" #: server_privileges.php:68 server_privileges.php:205 #: server_privileges.php:555 server_privileges.php:620 @@ -9240,17 +9243,17 @@ msgstr "Sem privilégios." #: server_privileges.php:405 server_privileges.php:406 msgctxt "None privileges" msgid "None" -msgstr "Nenhum" +msgstr "Nenhum privilégio" #: server_privileges.php:536 server_privileges.php:681 #: server_privileges.php:1896 server_privileges.php:1902 msgid "Table-specific privileges" -msgstr "Privilégios específicos da tabela" +msgstr "Privilégios específicos de tabela" #: server_privileges.php:537 server_privileges.php:689 #: server_privileges.php:1706 msgid "Note: MySQL privilege names are expressed in English" -msgstr "Nota: nomes de privilégios do MySQL são expressos em inglês" +msgstr "Nota: os nomes de privilégios do MySQL são expressos em inglês" #: server_privileges.php:614 msgid "Administration" @@ -9262,11 +9265,11 @@ msgstr "Privilégios globais" #: server_privileges.php:680 server_privileges.php:1896 msgid "Database-specific privileges" -msgstr "Privilégios específicos do Banco de Dados" +msgstr "Privilégios específicos de banco de dados" #: server_privileges.php:712 msgid "Resource limits" -msgstr "Limite dos recursos" +msgstr "Limites de recursos" #: server_privileges.php:713 msgid "Note: Setting these options to 0 (zero) removes the limit." @@ -9296,7 +9299,7 @@ msgstr "Você adicionou um novo usuário." #: server_privileges.php:1273 #, php-format msgid "You have updated the privileges for %s." -msgstr "Você mudou os priviléios para %s." +msgstr "Você mudou os privilégios para %s." #: server_privileges.php:1295 #, php-format @@ -9357,12 +9360,12 @@ msgstr "Remover os usuários selecionados" #: server_privileges.php:1783 msgid "Revoke all active privileges from the users and delete them afterwards." -msgstr "Revogar todos os privilégios ativos dos usuarios e depois apagar eles." +msgstr "Revogar todos os privilégios ativos dos usuários e depois apagar eles." #: server_privileges.php:1784 server_privileges.php:1785 #: server_privileges.php:1786 msgid "Drop the databases that have the same names as the users." -msgstr "Eliminar o Banco de Dados que possui o mesmo nome dos usuários." +msgstr "Eliminar os bancos de dados que possem o mesmo nome dos usuários." #: server_privileges.php:1807 #, php-format @@ -9374,8 +9377,8 @@ msgid "" msgstr "" "Nota: O phpMyAdmin recebe os privilégios dos usuário diretamente da tabela " "de privilégios do MySQL. O conteúdo destas tabelas pode divergir dos " -"privilégios que o servidor usa se alterações manuais forem feitas nele. " -"Neste caso, você deve usar %sRELOAD PRIVILEGES%s antes de continuar.." +"privilégios que o servidor usa se eles foram mudados manualmente. Neste " +"caso, você deve usar %sAtualizar privilégios%s antes de continuar." #: server_privileges.php:1860 msgid "The selected user was not found in the privilege table." @@ -9383,16 +9386,16 @@ msgstr "O usuário selecionado não foi encontrado na tabela de privilégios." #: server_privileges.php:1902 msgid "Column-specific privileges" -msgstr "Privilégios específicos da coluna" +msgstr "Privilégios específicos de coluna" #: server_privileges.php:2108 msgid "Add privileges on the following database" -msgstr "Adicionar privilégios nas seguintes Banco de Dados" +msgstr "Adicionar privilégios no seguinte banco de dados" #: server_privileges.php:2126 msgid "Wildcards % and _ should be escaped with a \\ to use them literally" msgstr "" -"Coringas _ e % precisam ser precedidos com uma \\ para serem usados " +"Coringas % e _ precisam ser precedidos com uma \\ para serem usados " "literalmente" #: server_privileges.php:2129 @@ -9430,7 +9433,7 @@ msgstr "" #: server_privileges.php:2217 msgid "Database for user" -msgstr "Banco de Dados para usuário" +msgstr "Banco de dados para usuário" #: server_privileges.php:2221 msgctxt "Create none database for user" @@ -9439,7 +9442,7 @@ msgstr "Nenhum" #: server_privileges.php:2222 msgid "Create database with same name and grant all privileges" -msgstr "Criar Banco de Dados com o mesmo nome e conceder todos os privilégios" +msgstr "Criar banco de dados com o mesmo nome e conceder todos os privilégios" #: server_privileges.php:2223 msgid "Grant all privileges on wildcard name (username\\_%)" @@ -9448,12 +9451,12 @@ msgstr "Conceder todos os privilégios no nome coringa (nome_do_usuário_%)" #: server_privileges.php:2227 #, php-format msgid "Grant all privileges on database "%s"" -msgstr "Conceder todos os privilégios no banco de dados "%s"" +msgstr "Conceder todos os privilégios no banco de dados '%s'" #: server_privileges.php:2252 #, php-format msgid "Users having access to "%s"" -msgstr "Usuários que têm acesso à "%s"" +msgstr "Usuários que têm acesso à '%s'" #: server_privileges.php:2361 msgid "global" @@ -9461,7 +9464,7 @@ msgstr "global" #: server_privileges.php:2363 msgid "database-specific" -msgstr "Específico do Banco de Dados" +msgstr "específico de banco de dados" #: server_privileges.php:2365 msgid "wildcard" @@ -9478,7 +9481,7 @@ msgstr "Erro desconhecido" #: server_replication.php:56 #, php-format msgid "Unable to connect to master %s." -msgstr "Não foi possível conectar ao %s mestre." +msgstr "Não foi possível conectar ao mestre %s." #: server_replication.php:63 msgid "" @@ -9506,7 +9509,7 @@ msgstr "Exibir status do mestre" #: server_replication.php:185 msgid "Show connected slaves" -msgstr "Mostrar escravas conectadas" +msgstr "Mostrar servidores slave conectados" #: server_replication.php:208 #, php-format @@ -9515,7 +9518,7 @@ msgid "" "like to configure it?" msgstr "" "Esse servidor não está configurado como mestre em um processo de replicação. " -"Deseja configurá-lo para tal?" +"Deseja configurá-lo assim?" #: server_replication.php:215 msgid "Master configuration" @@ -9530,10 +9533,10 @@ msgid "" "replicated. Please select the mode:" msgstr "" "Este servidor não está configurado como servidor mestre em um processo de " -"replicação. Você pode escolher por replicar todos os bancos de dados, e " -"ignorar alguns (útil, se você quiser replicar a maioria dos bancos de " -"dados), ou por ignorar todos os bancos de dados por padrão, replicando " -"somente bancos de dados especificados. Por favor selecione o modo:" +"replicação. Você pode escolher ou replicar todos os bancos de dados e " +"ignorar alguns (útil se você quiser replicar a maioria dos bancos de dados), " +"ou ignorar todos os bancos de dados por padrão e permitir somente certos " +"bancos de dados serem replicados. Favor selecionar o modo:" #: server_replication.php:219 msgid "Replicate all databases; Ignore:" @@ -9545,7 +9548,7 @@ msgstr "Ignorar todos bancos de dados; Replicar:" #: server_replication.php:223 msgid "Please select databases:" -msgstr "Por favor, selecione bancos de dados:" +msgstr "Favor selecionar os bancos de dados:" #: server_replication.php:226 msgid "" @@ -9562,7 +9565,7 @@ msgid "" "master" msgstr "" "Assim que tiver reiniciado o servidor MySQL, por favor clique no botão Ir. " -"Em seguida, você deveria ver uma mensagem informação você que este servidor " +"Em seguida, você deveria ver uma mensagem informando você que este servidor " "está configurado como master" #: server_replication.php:291 @@ -9577,12 +9580,12 @@ msgstr "Processo IO escravo não está em execução!" msgid "" "Server is configured as slave in a replication process. Would you like to:" msgstr "" -"Servidor está configurado como escravo em um processo de replicação. Você " +"O servidor está configurado como escravo em um processo de replicação. Você " "deseja:" #: server_replication.php:306 msgid "See slave status table" -msgstr "Ver status da tabela de escravo" +msgstr "Ver a tabela de status dos escravos" #: server_replication.php:309 msgid "Synchronize databases with master" @@ -9606,23 +9609,23 @@ msgstr "Reiniciar escravo" #: server_replication.php:326 msgid "Start SQL Thread only" -msgstr "Iniciar somente processo SQL" +msgstr "Somente iniciar o processo SQL" #: server_replication.php:328 msgid "Stop SQL Thread only" -msgstr "Parar processo SQL somente" +msgstr "Somente parar o processo SQL" #: server_replication.php:331 msgid "Start IO Thread only" -msgstr "Iniciar somente processo IO" +msgstr "Somente iniciar o processo IO" #: server_replication.php:333 msgid "Stop IO Thread only" -msgstr "Parar processo IO somente" +msgstr "Somente parar o processo IO" #: server_replication.php:338 msgid "Error management:" -msgstr "Administração de erro:" +msgstr "Administração de erros:" #: server_replication.php:340 msgid "Skipping errors might lead into unsynchronized master and slave!" @@ -9634,11 +9637,11 @@ msgstr "Pular erro atual" #: server_replication.php:343 msgid "Skip next" -msgstr "Pular próximos" +msgstr "Pular próximo" #: server_replication.php:346 msgid "errors." -msgstr "erro." +msgstr "erros." #: server_replication.php:361 #, php-format @@ -9652,14 +9655,14 @@ msgstr "" #: server_status.php:460 #, php-format msgid "Thread %s was successfully killed." -msgstr "Processo %s foi morto com sucesso." +msgstr "O processo %s foi finalizado com sucesso." #: server_status.php:462 #, php-format msgid "" "phpMyAdmin was unable to kill thread %s. It probably has already been closed." msgstr "" -"phpMyAdmin não foi capaz de matar o processo %s. É possível que ele já " +"O phpMyAdmin não foi capaz de matar o processo %s. É possível que ele já " "esteja fechado." #: server_status.php:594 @@ -9876,7 +9879,8 @@ msgid "" "reported by the MySQL server may be incorrect." msgstr "" "Em servidores ocupados, os contadores de byte podem sobrecarregar, então as " -"estatísticas como relatadas pelo servidor MySQL podem estar incorretas." +"estatísticas relatadas pelo servidor MySQL como estão podem estar " +"incorretas." #: server_status.php:1119 msgid "Received" @@ -9892,7 +9896,7 @@ msgstr "máx. de conexões concorrentes" #: server_status.php:1172 msgid "Failed attempts" -msgstr "Tentativas falharam" +msgstr "Tentativas falhadas" #: server_status.php:1186 msgid "Aborted" @@ -10019,8 +10023,8 @@ msgid "" "The number of requests to read a row based on a key. If this is high, it is " "a good indication that your queries and tables are properly indexed." msgstr "" -"O número de requisições para ler uma linha baseada em uma chave. Se isto for " -"alto, é uma boa indicação de que suas consultas e tabelas estejam " +"O número de requisições para ler uma linha baseada em uma chave. Se ele for " +"grande, é uma boa indicação de que suas consultas e tabelas estão " "corretamente indexadas." #: server_status.php:1332 @@ -10048,9 +10052,9 @@ msgid "" "probably have a lot of queries that require MySQL to scan whole tables or " "you have joins that don't use keys properly." msgstr "" -"O número de requisições pra ler uma linha baseada em uma posição fixa. Isto " -"é alto se você estiver fazendo muitas consultas que requerem a ordenação do " -"resultado. Você tem provavelmente muitas consultas que requerem que o MySQL " +"O número de requisições pra ler uma linha baseada em uma posição fixa. Ele é " +"grande se você estiver fazendo muitas consultas que requerem a ordenação do " +"resultado. Você provavelmente tem muitas consultas que requerem que o MySQL " "faça a varredura de tabelas inteiras ou você tem junções que não usam as " "chaves corretamente." @@ -10061,8 +10065,8 @@ msgid "" "tables are not properly indexed or that your queries are not written to take " "advantage of the indexes you have." msgstr "" -"O número de requisições para ler a linha seguinte no arquivo de dados. Isto " -"é alto se você estiver fazendo muitas varreduras da tabela. Geralmente isto " +"O número de requisições para ler a linha seguinte no arquivo de dados. Ele é " +"grande se você estiver fazendo muitas varreduras de tabela. Geralmente isto " "sugere que suas tabelas não estão corretamente indexadas ou que suas " "consultas não estão escritas para tomar vantagem dos índices que você têm." @@ -10103,8 +10107,8 @@ msgid "" "reason." msgstr "" "O número de páginas trancadas no buffer pool do InnoDB. Estas são páginas " -"que estão sendo lidas ou escritas atualmente ou aquela não pode ser nivelada " -"ou removido por alguma outra razão." +"que estão sendo lidas ou escritas atualmente ou que não podem ser niveladas " +"ou removidas por alguma outra razão." #: server_status.php:1344 msgid "" @@ -10115,7 +10119,7 @@ msgid "" msgstr "" "O número de páginas ocupadas porque foram alocados para rotinas " "administrativas tais como trancamento de linhas ou índice hash adaptável. " -"Este valor pode também ser calculado como Innodb_buffer_pool_pages_total - " +"Este valor também pode ser calculado como Innodb_buffer_pool_pages_total - " "Innodb_buffer_pool_pages_free - Innodb_buffer_pool_pages_data." #: server_status.php:1345 @@ -10127,8 +10131,8 @@ msgid "" "The number of \"random\" read-aheads InnoDB initiated. This happens when a " "query is to scan a large portion of a table but in random order." msgstr "" -"O número de ler-adiante \"aleatórios\" InnoDB iniciado. Isto acontece quando " -"uma consulta faz a varredura de uma parcela grande de uma tabela mas na " +"O número de read-aheads \"aleatórios\" InnoDB iniciados. Isto acontece quando " +"uma consulta faz a varredura de uma parcela grande de uma tabela mas em " "ordem aleatória." #: server_status.php:1347 @@ -10136,20 +10140,20 @@ msgid "" "The number of sequential read-aheads InnoDB initiated. This happens when " "InnoDB does a sequential full table scan." msgstr "" -"O número de ler-adiante sequenciais InnoDB iniciado. Isto acontece quando o " +"O número de read-aheads sequenciais InnoDB iniciados. Isto acontece quando o " "InnoDB faz uma varredura sequencial completa da tabela." #: server_status.php:1348 msgid "The number of logical read requests InnoDB has done." -msgstr "O número de requisições de leitura lógica InnoDB que foram feitas." +msgstr "O número de requisições de leitura lógica feitas pelo InnoDB." #: server_status.php:1349 msgid "" "The number of logical reads that InnoDB could not satisfy from buffer pool " "and had to do a single-page read." msgstr "" -"O número de leituras lógicas que o InnoDB não pode satisfer do buffer pool e " -"teria que fazer uma leitura de página simples." +"O número de leituras lógicas que o InnoDB não pôde satisfazer com buffer " +"pool e teve que fazer uma leitura de página simples." #: server_status.php:1350 msgid "" @@ -10159,11 +10163,12 @@ msgid "" "counter counts instances of these waits. If the buffer pool size was set " "properly, this value should be small." msgstr "" -"Normalmente, escreve para o buffer pool do InnoDB rodando em segundo plano. " -"Entretanto, se for necessário ler ou criar uma página e nenhuma página limpa " -"estiver disponível, é necessário esperar as páginas serem niveladas " -"primeiramente. Este contador conta instâncias dessas esperas. Se o tamanho " -"do buffer pool for ajustado corretamente, este valor deve ser pequeno." +"Normalmente, escritas para o buffer pool do InnoDB acontecem em segundo " +"plano. Entretanto, se for necessário ler ou criar uma página e nenhuma " +"página limpa estiver disponível, é necessário esperar as páginas serem " +"niveladas primeiro. Este contador conta instâncias dessas esperas. Se o " +"tamanho do buffer pool for ajustado corretamente, este valor deve ser " +"pequeno." #: server_status.php:1351 msgid "The number writes done to the InnoDB buffer pool." @@ -10171,7 +10176,7 @@ msgstr "O número de escritas feitas para o buffer pool do InnoDB." #: server_status.php:1352 msgid "The number of fsync() operations so far." -msgstr "O número de operações fsync() à fazer." +msgstr "O número de operações fsync() até agora." #: server_status.php:1353 msgid "The current number of pending fsync() operations." @@ -10187,39 +10192,37 @@ msgstr "O número atual de escritas pendentes." #: server_status.php:1356 msgid "The amount of data read so far, in bytes." -msgstr "O montante de leitura de dados à fazer, em bytes." +msgstr "A quantidade de dados lidos até agora, em bytes." #: server_status.php:1357 msgid "The total number of data reads." -msgstr "O número total de dados lidos." +msgstr "O número total de leituras de dados." #: server_status.php:1358 msgid "The total number of data writes." -msgstr "O número total de dados escritos." +msgstr "O número total de escritas de dados." #: server_status.php:1359 msgid "The amount of data written so far, in bytes." -msgstr "O montante de escrita de dados à fazer, em bytes." +msgstr "A quantidade de dados escritos até agora, em bytes." #: server_status.php:1360 msgid "The number of pages that have been written for doublewrite operations." msgstr "" -"O número de escritas doublewrite que foram executadas e o número de páginas " -"que foram escritas para esta finalidade." +"O número de páginas que foram escritas para operações doublewrite (dupla-" +"escrita)." #: server_status.php:1361 msgid "The number of doublewrite operations that have been performed." -msgstr "" -"O número de escritas doublewrite que foram executadas e o número de páginas " -"que foram escritas para esta finalidade." +msgstr "O número de operações doublewrite (dupla-escrita) que foi executado." #: server_status.php:1362 msgid "" "The number of waits we had because log buffer was too small and we had to " "wait for it to be flushed before continuing." msgstr "" -"O número de esperas geradas porque o buffer do log era muito pequeno e teve " -"que esperar que fosse nivelada antes de continuar." +"O número de esperas ocorridas porque o buffer de log era muito pequeno e " +"teve que esperar seu nivelamento antes de continuar." #: server_status.php:1363 msgid "The number of log write requests." @@ -10272,20 +10275,19 @@ msgstr "O número de linhas trancadas que estão esperando atualmente." #: server_status.php:1374 msgid "The average time to acquire a row lock, in milliseconds." -msgstr "O tempo médio para recuperar uma linha trancada, em milísegundo." +msgstr "O tempo médio para recuperar uma linha trancada, em milisegundos." #: server_status.php:1375 msgid "The total time spent in acquiring row locks, in milliseconds." -msgstr "O tempo total gasto para recuperar linhas trancadas, em milísegundo." +msgstr "O tempo total gasto para recuperar linhas trancadas, em milisegundos." #: server_status.php:1376 msgid "The maximum time to acquire a row lock, in milliseconds." -msgstr "O máximo de tempo para recuperar uma linha trancada, em milísegundo." +msgstr "O tempo máximo para recuperar uma linha trancada, em milisegundos." #: server_status.php:1377 msgid "The number of times a row lock had to be waited for." -msgstr "" -"O número de vezes que uma linhas trancada teve que esperar para ser escrita." +msgstr "O número de vezes que uma trava de linha teve que esperar." #: server_status.php:1378 msgid "The number of rows deleted from InnoDB tables." @@ -10308,16 +10310,16 @@ msgid "" "The number of key blocks in the key cache that have changed but haven't yet " "been flushed to disk. It used to be known as Not_flushed_key_blocks." msgstr "" -"O número de blocos chave no cache chave que mudaram mas não foram nivelados " -"ainda ao disco. Antes era chamado de Not_flushed_key_blocks." +"O número de blocos chave no key cache que mudaram mas que não foram " +"nivelados ainda para disco. Costumava ser chamado de Not_flushed_key_blocks." #: server_status.php:1383 msgid "" "The number of unused blocks in the key cache. You can use this value to " "determine how much of the key cache is in use." msgstr "" -"O número de blocos não usados no cache chave. Você pode usar este valor para " -"determinar quanto do cache chave está no uso." +"O número de blocos não usados no key cache. Você pode usar este valor para " +"determinar quanto do key cache está em uso." #: server_status.php:1384 msgid "" @@ -10325,9 +10327,8 @@ msgid "" "that indicates the maximum number of blocks that have ever been in use at " "one time." msgstr "" -"O número de blocos usados no cache chave. Este valor é uma marca d'água que " -"indica o número máximo de blocos que estiveram sempre em uso em algum " -"momento." +"O número de blocos usados no key cache. Este valor é uma marca d'água que " +"indica o número máximo de blocos que já estiveram em uso em algum momento." #: server_status.php:1385 msgid "The number of requests to read a key block from the cache." @@ -10340,8 +10341,8 @@ msgid "" "can be calculated as Key_reads/Key_read_requests." msgstr "" "O número de leituras físicas de um bloco chave do disco. Se Key_reads for " -"alto, então seu valor do key_buffer_size é provavelmente muito baixo. A taxa " -"de falta de cache pode ser calculada como Key_reads/Key_read_requests." +"alto, então seu valor do key_buffer_size provavelmente está muito baixo. A " +"taxa de falta de cache pode ser calculada como Key_reads/Key_read_requests." #: server_status.php:1387 msgid "The number of requests to write a key block to the cache." @@ -10357,17 +10358,17 @@ msgid "" "optimizer. Useful for comparing the cost of different query plans for the " "same query. The default value of 0 means that no query has been compiled yet." msgstr "" -"O custo total da última consulta compilada como computado pelo otimizador de " -"consultas. Útil para comparar o custo de diferentes planos de consulta para " -"a mesma consulta. O valor padrão 0 significa que nenhuma consulta foi " -"compilada ainda." +"O custo total da última consulta compilada conforme computada pelo " +"otimizador de consultas. Útil para comparar o custo de diferentes planos de " +"consulta para a mesma consulta. O valor padrão 0 significa que nenhuma " +"consulta foi compilada ainda." #: server_status.php:1390 msgid "" "The maximum number of connections that have been in use simultaneously since " "the server started." msgstr "" -"O número máximo de conexões que estavam em uso simultaneamente desde a " +"O número máximo de conexões que estiveram em uso simultaneamente desde a " "inicialização do servidor." #: server_status.php:1391 @@ -10380,8 +10381,8 @@ msgid "" "The number of tables that have been opened. If opened tables is big, your " "table cache value is probably too small." msgstr "" -"O número de tabelas que devem estar abertas. Se aberta, as tabelas são " -"grandes, o valor do cache de suas tabelas é provavelmente muito pequeno." +"O número de tabelas que foram abertas. Se este número for grande, o valor do " +"cache de tabelas provavelmente está muito pequeno." #: server_status.php:1393 msgid "The number of files that are open." @@ -10407,7 +10408,7 @@ msgstr "" #: server_status.php:1397 msgid "The amount of free memory for query cache." -msgstr "O montante de memória livre para a consulta do cache." +msgstr "O montante de memória livre para o cache de consultas." #: server_status.php:1398 msgid "The number of cache hits." @@ -10425,10 +10426,9 @@ msgid "" "decide which queries to remove from the cache." msgstr "" "O número de consultas que foram removidas do cache para liberar memória para " -"novas consultas. Essa informação pode ajudar você a ajustar o tamanho da " -"consulta do cache. A consulta do cache usa a estratégia do \"usado menos " -"recentemente\" (LRU - least recently used) para decidir qual consulta remover " -"do cache." +"novas consultas. Essa informação pode ajudar você a ajustar o tamanho do " +"cache de consultas. O cache de consultas usa a estratégia LRU (menos usadas " +"recentemente) para decidir quais consultas remover do cache." #: server_status.php:1401 msgid "" @@ -10444,24 +10444,24 @@ msgstr "O número de consultas registradas no cache." #: server_status.php:1403 msgid "The total number of blocks in the query cache." -msgstr "O número total de blocos na consulta do cache." +msgstr "O número total de blocos no cache de consultas." #: server_status.php:1404 msgid "The status of failsafe replication (not yet implemented)." -msgstr "O status da replicação à prova de falhas (não implementado)." +msgstr "O status da replicação à prova de falhas (não implementado ainda)." #: server_status.php:1405 msgid "" "The number of joins that do not use indexes. If this value is not 0, you " "should carefully check the indexes of your tables." msgstr "" -"O número de junções que não usaram índices. Se este valor não for 0, você " -"deve cuidadosamente verificar os índices de suas tabelas." +"O número de junções que não usam índices. Se este valor não for 0, você deve " +"verificar com cuidado os índices de suas tabelas." #: server_status.php:1406 msgid "The number of joins that used a range search on a reference table." msgstr "" -"O número de junções que usaram uma pesquisa de escala na tabela de " +"O número de junções que usaram uma pesquisa de escala em uma tabela de " "referência." #: server_status.php:1407 @@ -10469,17 +10469,17 @@ msgid "" "The number of joins without keys that check for key usage after each row. " "(If this is not 0, you should carefully check the indexes of your tables.)" msgstr "" -"O número de junções sem chaves que verificam para ver se há o uso da chave " -"após cada linha. (Se este não for 0, você deve cuidadosamente verificar os " -"índices de suas tabelas.)" +"O número de junções sem chaves que procuram por uso de chaves após cada " +"linha. (Se isto não for 0, você deve verificar com cuidado os índices de " +"suas tabelas.)" #: server_status.php:1408 msgid "" "The number of joins that used ranges on the first table. (It's normally not " "critical even if this is big.)" msgstr "" -"O número de junções que usaram escalas na primeira tabela. (Não é " -"normalmente crítico mesmo se este for grande.)" +"O número de junções que usaram escalas na primeira tabela. (Isso normalmente " +"não é crítico mesmo se for grande.)" #: server_status.php:1409 msgid "The number of joins that did a full scan of the first table." @@ -10496,12 +10496,12 @@ msgid "" "Total (since startup) number of times the replication slave SQL thread has " "retried transactions." msgstr "" -"Número total (desde o início) de vezes que o processo SQL escravo de " -"replicação teve que tentar transações." +"Número total (desde o início) de vezes que o processo de replicação SQL " +"escravo tentou refazer transações." #: server_status.php:1412 msgid "This is ON if this server is a slave that is connected to a master." -msgstr "Isto é ON se este servidor é um escravo conectado à um mestre." +msgstr "Isto é ON se este servidor é um escravo que está conectado a um mestre." #: server_status.php:1413 msgid "" @@ -10536,7 +10536,7 @@ msgstr "O número de linhas ordenadas." #: server_status.php:1418 msgid "The number of sorts that were done by scanning the table." -msgstr "O número de ordenações que foram feitas scaneando a tabela." +msgstr "O número de ordenações que foram feitas por leituras da tabela." #: server_status.php:1419 msgid "The number of times that a table lock was acquired immediately." @@ -10550,9 +10550,9 @@ msgid "" "tables or use replication." msgstr "" "O número de vezes que uma tabela trancada não foi recuperada imediatamente e " -"uma espera foi necessária. Se isso foi alto e você tem problemas de " -"performance, você precisa primeiramente otimizar suas consultas e então, ou " -"dividir sua tabela ou usar replicação." +"uma espera foi necessária. Se isso for alto e você tiver problemas de " +"performance, você precisa otimizar suas consultas primeiro e então, ou " +"dividir sua(s) tabela(s) ou usar replicação." #: server_status.php:1421 msgid "" @@ -10575,9 +10575,9 @@ msgid "" "doesn't give a notable performance improvement if you have a good thread " "implementation.)" msgstr "" -"O número de processos criadas para manipular conexões. Se Threads_created é " -"grande, você deveria aumentar o valor de thread_cache_size. (Normalmente " -"isso não da um aumento notável de performance se você tem uma boa " +"O número de processos criados para manipular conexões. Se Threads_created " +"for grande, você deve aumentar o valor do thread_cache_size. (Normalmente " +"isso não dá um aumento notável de performance se você tiver uma boa " "implementação de processos.)" #: server_status.php:1424 @@ -10594,7 +10594,7 @@ msgstr "Instruções/Configurações" #: server_status.php:1584 msgid "Done rearranging/editing charts" -msgstr "Concluiu reorganização/edição de graficos" +msgstr "Terminou a reorganização/edição de gráficos" #: server_status.php:1591 server_status.php:1662 msgid "Add chart" @@ -10627,7 +10627,7 @@ msgstr "" #: server_status.php:1619 msgid "Reset to default" -msgstr "Restaurar valor padrão" +msgstr "Resetar para o padrão" #: server_status.php:1623 msgid "Monitor Instructions" @@ -10644,7 +10644,7 @@ msgstr "" "O Monitor do phpMyAdmin pode auxiliá-lo na otimização da configuração do " "servidor e rastrear consultas com tempos intensos. Para este último, você " "precisará definir log_output na 'TABLE', e ter slow_query_log ou general_log " -"habilitado. Note, porém, que general_log produz muitos dados e aumentar a " +"habilitado. Note, porém, que general_log produz muitos dados e aumenta a " "carga do servidor em até 15%" #: server_status.php:1629 @@ -10654,9 +10654,9 @@ msgid "" "table is supported by MySQL 5.1.6 and onwards. You may still use the server " "charting features however." msgstr "" -"Infelizmente seu servidor de Banco de Dados não suporta gravação de logs " -"para tabela, o que é um requisito para análise de logs do banco de dados com " -"phpMyAdmin. Gravação de logs para tabela é suportado pelo MySQL 5.1.6 e " +"Infelizmente seu servidor de banco de dados não suporta gravação de logs em " +"tabela, o que é um requisito para análise de logs do banco de dados com " +"phpMyAdmin. A gravação de logs para tabela é suportada pelo MySQL 5.1.6 e " "posteriores. Apesar disso, você ainda pode utilizar as funcionalidades de " "gráficos no servidor." @@ -10671,9 +10671,9 @@ msgid "" "chart using the cog icon on each respective chart." msgstr "" "Seu navegador vai atualizar todos os gráficos exibidos em intervalo regular. " -"Você pode adicionar gráficos e alterar a taxe de atualização em " -"\"Configurações\", ou remover qualquer gráfico usando o ícone de roda dentada " -"em cada gráfico." +"Você pode adicionar gráficos e alterar a taxa de atualização em " +"\"Configurações\", ou remover qualquer gráfico usando o ícone da engrenagem em " +"cada gráfico." #: server_status.php:1646 msgid "" @@ -10690,7 +10690,7 @@ msgstr "" #: server_status.php:1653 msgid "Please note:" -msgstr "Por favor, note:" +msgstr "Favor perceber que:" #: server_status.php:1655 msgid "" @@ -10766,11 +10766,11 @@ msgstr "Somente obter os comandos SELECT, INSERT, UPDATE e DELETE" #: server_status.php:1738 msgid "Remove variable data in INSERT statements for better grouping" -msgstr "Remova dados de variável de comandos INSERT para melhor agrupamento" +msgstr "Remova dados de variável em comandos INSERT para melhor agrupamento" #: server_status.php:1743 msgid "Choose from which log you want the statistics to be generated from." -msgstr "Escolha de qual log você deseja que as estatísticas seja geradas." +msgstr "Escolha de qual log você deseja que as estatísticas sejam geradas." #: server_status.php:1745 msgid "Results are grouped by query text." @@ -10928,7 +10928,7 @@ msgstr "Download" #: setup/frames/form.inc.php:25 msgid "Incorrect formset, check $formsets array in setup/frames/form.inc.php" msgstr "" -"formset incorreto, verifique o vetor $formsets em setup/frames/form.inc.php" +"Formset incorreto, verifique o vetor $formsets em setup/frames/form.inc.php" #: setup/frames/index.inc.php:49 msgid "Cannot load or save configuration" @@ -11093,8 +11093,8 @@ msgid "" "You are using Git version, run [kbd]git pull[/kbd] :-)[br]The latest stable " "version is %s, released on %s." msgstr "" -"Se você estiver usando versão do Gir, execute [kbd]git pull[/kbd] :-)[br]A " -"versão estável mais nova é %s, lançada em %s." +"Você está usando o Git, execute [kbd]git pull[/kbd] :-)[br]A versão estável " +"mais nova é %s, lançada em %s." #: setup/lib/index.lib.php:186 msgid "No newer stable version is available" @@ -11108,12 +11108,12 @@ msgid "" "proxies list%s. However, IP-based protection may not be reliable if your IP " "belongs to an ISP where thousands of users, including you, are connected to." msgstr "" -"É aconselhável que esta %soption%s seja desabilitada pois ela permite que um " -"atacante logue-se em qualquer servidor MySQL utilizando força bruta. Se " -"você acha que ela é necessária, utilize %strusted proxies list%s. " -"Entretanto, proteções baseadas no protocolo IP podem não ser confiáveis se " -"seu endereço IP pertence a um ISP onde centenas de usuários, incluindo você, " -"estão conectados." +"Esta %sopção%s deveria ser desabilitada pois ela permite que invasores fazer " +"login por força bruta em qualquer servidor MySQL. Se você acha que ela é " +"necessária, use a %slista de proxies confiáveis%s. Entretanto, proteções " +"baseadas no protocolo IP podem não ser confiáveis se seu endereço IP " +"pertence a um ISP onde centenas de usuários, incluindo você, estão " +"conectados." #: setup/lib/index.lib.php:276 msgid "" @@ -11121,10 +11121,9 @@ msgid "" "so a key was automatically generated for you. It is used to encrypt cookies; " "you don't need to remember it." msgstr "" -"Você não tinha blowfish secret configurado e possui habilitada a " -"autenticação de cookies, então uma chave foi automaticamente gerada para " -"você. Ela é utilizada para encriptar cookies; você não precisa se lembrar " -"dela." +"Você não tinha um segredo blowfish configurado e habilitou a autenticação " +"por cookies, então uma chave foi gerada automaticamente para você. Ela é " +"usada para encriptar cookies; você não precisa se lembrar dela." #: setup/lib/index.lib.php:277 #, php-format @@ -11132,23 +11131,23 @@ msgid "" "%sBzip2 compression and decompression%s requires functions (%s) which are " "unavailable on this system." msgstr "" -"A compactação e descompactação%s %sBzip2 requerem funções (%s) que não estão " -"disponíveis neste sistema." +"A %scompactação e descompactação Bzip2%s requer funções (%s) que não estão " +"indisponíveis neste sistema." #: setup/lib/index.lib.php:279 msgid "" "This value should be double checked to ensure that this directory is neither " "world accessible nor readable or writable by other users on your server." msgstr "" -"Este valor deve ser verificado com atenção para garantir que este diretório " -"não seja acessado ou alterado por outros usuários no seu servidor." +"Este valor deve ser duplamente verificado para garantir que este diretório " +"não seja acessado globalmente ou alterado por outros usuários no seu " +"servidor." #: setup/lib/index.lib.php:280 #, php-format msgid "This %soption%s should be enabled if your web server supports it." msgstr "" -"É aconselhável que esta %sopção%s esteja habilitada se seu servidor web tem " -"suporte a ela." +"Esta %sopção%s deve ser habilitada se seu servidor web tem suporte a ela." #: setup/lib/index.lib.php:282 #, php-format @@ -11156,7 +11155,7 @@ msgid "" "%sGZip compression and decompression%s requires functions (%s) which are " "unavailable on this system." msgstr "" -"A compactação e descompactação%s %sGZip requerem funções (%s) que não estão " +"A %scompactação e descompactação GZip%s requer funções (%s) que não estão " "disponíveis neste sistema." #: setup/lib/index.lib.php:284 @@ -11166,10 +11165,9 @@ msgid "" "invalidation if %ssession.gc_maxlifetime%s is lower than its value " "(currently %d)." msgstr "" -"O Cookie de validação%s do %sLogin configurado com mais de 1440 segundos " -"pode causar invalidação de sessão aleatoriamente caso %" -"ssession.gc_maxlifetime%s seja menor que seu valor atual (Configuração atual " -"%d)." +"A %svalidação dos cookies de login%s com mais de 1440 segundos pode causar " +"invalidação aleatória de sessão caso a %ssession.gc_maxlifetime%s seja menor " +"que seu valor (atualmente %d)." #: setup/lib/index.lib.php:286 #, php-format @@ -11177,9 +11175,9 @@ msgid "" "%sLogin cookie validity%s should be set to 1800 seconds (30 minutes) at " "most. Values larger than 1800 may pose a security risk such as impersonation." msgstr "" -"É aconselhável que o cookie de validação%s do %sLogin seja configurado com, " -"no máximo, 1800 segundos (30 minutos). Valores maiores que 1800 podem causar " -"um risco de segurança como o roubo de identidade." +"Você deveria configurar a %svalidação dos cookies de login%s 1800 segundos " +"(30 minutos) no máximo. Valores maiores que 1800 podem causar um risco de " +"segurança como o roubo de identidade." #: setup/lib/index.lib.php:288 #, php-format @@ -11187,9 +11185,9 @@ msgid "" "If using cookie authentication and %sLogin cookie store%s is not 0, %sLogin " "cookie validity%s must be set to a value less or equal to it." msgstr "" -"Se estiver usando autenticação por cookies e o %sLogin cookie store%s não é " -"igual a 0, %sLogin cookie validity%s precisa ser configurado para um valor " -"menor ou igual a 0." +"Se estiver usando a autenticação por cookies e o %sarmazenamento dos cookies " +"de login%s não for de valor 0, a %svalidação dos cookies de login%s precisa " +"ser configurado para um valor menor ou igual a ele." #: setup/lib/index.lib.php:290 #, php-format @@ -11199,11 +11197,11 @@ msgid "" "protection may not be reliable if your IP belongs to an ISP where thousands " "of users, including you, are connected to." msgstr "" -"Se você acha que ela é necessária, utilize configurações adicionais de " -"segurança - configurações de %shost authentication%s e %strusted proxies " -"list%s. Entretanto, proteções baseadas no protocolo IP podem não ser " -"confiáveis se seu endereço IP pertence a um ISP onde centenas de usuários, " -"incluindo você, estão conectados." +"Se você achar necessário, utilize as configurações adicionais de segurança - " +"configurações de %sautenticação de host%s e %slista de proxies confiáveis%" +"s. Entretanto, proteções baseadas em IP podem não ser confiáveis se seu " +"endereço IP pertence a um ISP onde centenas de usuários, incluindo você, " +"estão conectados." #: setup/lib/index.lib.php:292 #, php-format @@ -11214,10 +11212,10 @@ msgid "" "phpMyAdmin panel. Set %sauthentication type%s to [kbd]cookie[/kbd] or [kbd]" "http[/kbd]." msgstr "" -"Você [kbd]configurou[/kbd] o tipo de autenticação e incluiu usuário e senha " -"para auto-login, o que não é uma opção desejável para live hosts. Qualquer " -"um que souber ou descobrir sua URL do phpMyAdmin pode ter acesso direto ao " -"painel de controle. Configure o %stipo de autenticaçãoe%s para " +"Você [kbd]configurou[/kbd] o tipo de autenticação e incluiu o usuário e " +"senha para auto-login, o que não é uma opção desejável para live hosts. " +"Qualquer um que souber ou descobrir sua URL do phpMyAdmin pode ter acesso " +"direto ao painel de controle. Configure o %stipo de autenticação%s para " "[kbd]cookie[/kbd] ou [kbd]http[/kbd]." #: setup/lib/index.lib.php:294 @@ -11226,7 +11224,7 @@ msgid "" "%sZip compression%s requires functions (%s) which are unavailable on this " "system." msgstr "" -"%sA compactação em Zip%s requer funções (%s) que não estão disponíveis neste " +"%sA compactação Zip%s requer funções (%s) que não estão disponíveis neste " "sistema." #: setup/lib/index.lib.php:296 @@ -11269,7 +11267,7 @@ msgstr "Visualizar valores estrangeiros" #: sql.php:214 #, php-format msgid "Using bookmark \"%s\" as default browse query." -msgstr "Usando marcador \"%s\" como padrão." +msgstr "Usando marcador \"%s\" como query padrão de navegação." #: sql.php:702 tbl_replace.php:415 #, php-format @@ -11291,11 +11289,11 @@ msgstr "SQL validado" #: sql.php:946 #, php-format msgid "Problems with indexes of table `%s`" -msgstr "Problemas com o índice da tabela `%s`" +msgstr "Problemas com os índices da tabela `%s`" #: sql.php:978 msgid "Label" -msgstr "Nome" +msgstr "Rótulo" #: tbl_addfield.php:185 tbl_alter.php:99 tbl_indexes.php:98 #, php-format @@ -11304,7 +11302,7 @@ msgstr "A tabela %1$s foi alterada com sucesso" #: tbl_change.php:699 msgid "Because of its length,
    this column might not be editable" -msgstr "Por causa da sua largura,
    esse campo pode não ser editável" +msgstr "Por causa da sua largura,
    esta coluna pode não ser editável" #: tbl_change.php:817 msgid "Remove BLOB Repository Reference" @@ -11336,11 +11334,11 @@ msgstr "e então" #: tbl_change.php:1046 msgid "Go back to previous page" -msgstr "Retornar" +msgstr "Ir para a página anterior" #: tbl_change.php:1047 msgid "Insert another new row" -msgstr "Inserir novo registro" +msgstr "Inserir um registro novo" #: tbl_change.php:1051 msgid "Go back to this page" @@ -11348,7 +11346,7 @@ msgstr "Voltar para esta página" #: tbl_change.php:1059 msgid "Edit next row" -msgstr "Editar próximo registro" +msgstr "Editar o próximo registro" #: tbl_change.php:1070 msgid "" @@ -11413,7 +11411,7 @@ msgstr "Rótulo do Eixo X:" #: tbl_chart.php:147 msgid "X Values" -msgstr "Valor X" +msgstr "Valores X" #: tbl_chart.php:148 msgid "Y-Axis label:" @@ -11435,7 +11433,7 @@ msgstr "A tabela %1$s foi criada." #: tbl_export.php:26 msgid "View dump (schema) of table" -msgstr "Ver o esquema da tabela" +msgstr "Ver o dump (esquema) da tabela" #: tbl_gis_visualization.php:112 msgid "Display GIS Visualization" @@ -11479,7 +11477,7 @@ msgstr "O nome da chave primária deve ser \"PRIMARY\"!" #: tbl_indexes.php:75 msgid "Can't rename index to PRIMARY!" -msgstr "Não foi possível renomear o índice para \"PRIMARY\"!" +msgstr "Não foi possível renomear o índice para PRIMARY!" #: tbl_indexes.php:91 msgid "No index parts defined!" @@ -11536,7 +11534,7 @@ msgstr "O Nome da Tabela está vazio!" #: tbl_operations.php:268 msgid "Alter table order by" -msgstr "Alterar tabela ordenada por" +msgstr "Alterar ordenação da tabela" #: tbl_operations.php:277 msgid "(singly)" @@ -11544,7 +11542,7 @@ msgstr "(singularmente)" #: tbl_operations.php:297 msgid "Move table to (database.table):" -msgstr "Mover tabela para (Banco de Dados.tabela):" +msgstr "Mover tabela para (banco de dados.tabela):" #: tbl_operations.php:355 msgid "Table options" @@ -11556,7 +11554,7 @@ msgstr "Renomear a tabela para" #: tbl_operations.php:537 msgid "Copy table to (database.table):" -msgstr "Copiar tabela para (Banco de Dados.tabela):" +msgstr "Copiar tabela para (banco de dados.tabela):" #: tbl_operations.php:584 msgid "Switch to copied table" @@ -11564,7 +11562,7 @@ msgstr "Mudar para a tabela copiada" #: tbl_operations.php:596 msgid "Table maintenance" -msgstr "Tabela de Manutenção" +msgstr "Manutenção de tabelas" #: tbl_operations.php:624 msgid "Defragment table" @@ -11573,7 +11571,7 @@ msgstr "Desfragmentar tabela" #: tbl_operations.php:680 #, php-format msgid "Table %s has been flushed" -msgstr "Tabela %s foi limpa" +msgstr "A tabela %s foi limpa" #: tbl_operations.php:688 msgid "Flush the table (FLUSH)" @@ -11606,7 +11604,7 @@ msgstr "Analizar" #: tbl_operations.php:770 msgid "Check" -msgstr "Checar" +msgstr "Verificar" #: tbl_operations.php:771 msgid "Optimize" @@ -11622,7 +11620,7 @@ msgstr "Reparar" #: tbl_operations.php:787 msgid "Remove partitioning" -msgstr "Remover partição" +msgstr "Remover particionamento" #: tbl_operations.php:813 msgid "Check referential integrity:" @@ -11654,7 +11652,7 @@ msgstr "dinâmico" #: tbl_printview.php:355 tbl_structure.php:894 msgid "Row length" -msgstr "Tamanho do registro" +msgstr "Comprimento do registro" #: tbl_printview.php:365 tbl_structure.php:902 msgid "Row size" @@ -11662,7 +11660,7 @@ msgstr "Tamanho do registro" #: tbl_printview.php:375 tbl_structure.php:910 msgid "Next autoindex" -msgstr "Próximo autoíndice" +msgstr "Próximo auto-índice" #: tbl_relation.php:271 #, php-format @@ -11732,12 +11730,12 @@ msgstr "Adicionar índice FULLTEXT" #: tbl_structure.php:369 tbl_tracking.php:295 msgctxt "None for default" msgid "None" -msgstr "Nenhum" +msgstr "Nenhum wrap (padrão: none)" #: tbl_structure.php:378 #, php-format msgid "Column %s has been dropped" -msgstr "Coluna %s foi eliminada" +msgstr "A coluna %s foi eliminada" #: tbl_structure.php:395 tbl_structure.php:492 #, php-format @@ -11787,7 +11785,7 @@ msgstr "Depois %s" #: tbl_structure.php:719 #, php-format msgid "Create an index on  %s columns" -msgstr "Criar um índice em  %s colunas" +msgstr "Criar um índice nas colunas %s" #: tbl_structure.php:865 msgid "partitioned" From 3f3bf8455613dffb0109c417163ee12854d69266 Mon Sep 17 00:00:00 2001 From: Yungu Kim Date: Sat, 13 Apr 2013 00:19:21 +0200 Subject: [PATCH 020/218] Translated using Weblate (Korean) Currently translated at 56.9% (1457 of 2562) --- po/ko.po | 99 ++++++++++++++++++++++++++------------------------------ 1 file changed, 46 insertions(+), 53 deletions(-) diff --git a/po/ko.po b/po/ko.po index 443bff6f50..3ce5302e0b 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,8 +4,8 @@ msgstr "" "Project-Id-Version: phpMyAdmin 3.5.4-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2012-10-16 14:37+0200\n" -"PO-Revision-Date: 2013-04-12 07:21+0200\n" -"Last-Translator: Dong-bum Kim \n" +"PO-Revision-Date: 2013-04-13 00:19+0200\n" +"Last-Translator: Yungu Kim \n" "Language-Team: Korean \n" "Language: ko\n" "MIME-Version: 1.0\n" @@ -1891,7 +1891,6 @@ msgid "Click reset zoom link to come back to original state." msgstr "원래 상태로 돌아오려면 줌 다시 설정 링크를 클릭합니다." #: js/messages.php:308 -#, fuzzy msgid "Click a data point to view and possibly edit the data row." msgstr "데이터 포인트(플롯 지점)를 클릭하면 행의 열람과 편집이 가능합니다." @@ -1912,9 +1911,8 @@ msgid "Query results" msgstr "쿼리 결과" #: js/messages.php:315 -#, fuzzy msgid "Data point content" -msgstr "테이블 설명" +msgstr "데이터 포인트 내용" #: js/messages.php:318 tbl_change.php:312 tbl_indexes.php:228 #: tbl_indexes.php:255 @@ -3256,7 +3254,7 @@ msgstr "" #: libraries/config/messages.inc.php:23 msgid "Show "Drop database" link to normal users" -msgstr "" +msgstr "일반 사용자에게 "데이터베이스 삭제(drop)" 링크를 제공" #: libraries/config/messages.inc.php:24 msgid "" @@ -4008,6 +4006,8 @@ msgid "" "This might be a good way to import large files, however it can break " "transactions." msgstr "" +"임포트 중 시간 제한에 근접할 것을 스크립트가 발견할 경우, 임포트를 중지하는 것을 허용합니다. 이는, 크기가 큰 파일을 임포트할 때 " +"유용합니다. 하지만, 트랜잭션이 끊어질 수 있습니다." #: libraries/config/messages.inc.php:240 msgid "Partial import: allow interrupt" @@ -4091,7 +4091,7 @@ msgstr "좌측 프레임에 로고 출력" #: libraries/config/messages.inc.php:271 msgid "Display logo" -msgstr "로보 출력" +msgstr "로고 출력" #: libraries/config/messages.inc.php:272 msgid "Display server choice at the top of the left frame" @@ -4254,7 +4254,7 @@ msgstr "" #: libraries/config/messages.inc.php:308 msgid "Maximum displayed SQL length" -msgstr "" +msgstr "최대한 표시될 SQL 길이" #: libraries/config/messages.inc.php:309 libraries/config/messages.inc.php:314 #: libraries/config/messages.inc.php:341 @@ -4358,7 +4358,7 @@ msgstr "" #: libraries/config/messages.inc.php:332 msgid "Persistent connections" -msgstr "" +msgstr "영속적인 연결" #: libraries/config/messages.inc.php:333 msgid "" @@ -4745,7 +4745,7 @@ msgstr "테이블 복구" #: libraries/config/messages.inc.php:420 msgid "SQL command to fetch available databases" -msgstr "" +msgstr "사용 가능한 데이터베이스를 조회하는 SQL 명령" #: libraries/config/messages.inc.php:421 msgid "SHOW DATABASES command" @@ -4820,7 +4820,7 @@ msgstr "" #: libraries/config/messages.inc.php:436 msgid "Add DROP DATABASE" -msgstr "" +msgstr "DROP DATABASE 추가" #: libraries/config/messages.inc.php:437 msgid "" @@ -5555,6 +5555,8 @@ msgid "" "formatting strings. Additionally the following transformations will happen: " "%3$s. Other text will be kept as is. See the %4$sFAQ%5$s for details." msgstr "" +"이 값은 %1$sstrftime%2$s에 의해 생성되었습니다. 따라서, 시간 포맷 문자열을 써서 변경할 수 있습니다. 또한, 다음과 같은 " +"변환도 일어납니다: %3$s. 그 외의 문자는 그대로 유지됩니다. 자세한 정보는 %4$sFAQ%5$s를 참고하세요." #: libraries/display_export.lib.php:270 msgid "use this for future exports" @@ -5916,9 +5918,8 @@ msgid "Pages containing data" msgstr "" #: libraries/engines/innodb.lib.php:188 -#, fuzzy msgid "Pages to be flushed" -msgstr "테이블 %s 을 닫았습니다(캐시 삭제)" +msgstr "플러시될 페이지 수" #: libraries/engines/innodb.lib.php:194 msgid "Busy pages" @@ -6121,7 +6122,7 @@ msgstr "" #: libraries/engines/pbxt.lib.php:27 msgid "Record cache size" -msgstr "" +msgstr "레코드 캐시 크기" #: libraries/engines/pbxt.lib.php:28 msgid "" @@ -6236,7 +6237,7 @@ msgstr "" msgid "" "Documentation and further information about PBXT can be found on the " "%sPrimeBase XT Home Page%s." -msgstr "" +msgstr "PBXT에 관한 문서나 추가 정보는 %sPrimeBase XT 홈페이지%s에 있습니다." #: libraries/engines/pbxt.lib.php:129 msgid "The PrimeBase XT Blog by Paul McCullagh" @@ -6509,9 +6510,8 @@ msgid "RELATIONS FOR TABLE" msgstr "" #: libraries/export/sql.php:1044 -#, fuzzy msgid "Structure for view" -msgstr "구조만" +msgstr "뷰 구조" #: libraries/export/sql.php:1053 msgid "Stand-in structure for view" @@ -6688,7 +6688,7 @@ msgstr "" #: libraries/import/shp.php:19 msgid "ESRI Shape File" -msgstr "" +msgstr "ESRI Shapefile" #: libraries/import/shp.php:280 #, php-format @@ -6708,7 +6708,7 @@ msgstr "" #: libraries/import/shp.php:376 msgid "The imported file does not contain any data" -msgstr "" +msgstr "입력한 파일에 아무 데이터도 없음" #: libraries/import/sql.php:33 msgid "SQL compatibility mode:" @@ -6731,14 +6731,13 @@ msgid "Convert to Kana" msgstr "" #: libraries/mult_submits.inc.php:254 -#, fuzzy #| msgid "Fr" msgid "From" -msgstr "금" +msgstr "From" #: libraries/mult_submits.inc.php:257 msgid "To" -msgstr "" +msgstr "To" #: libraries/mult_submits.inc.php:262 libraries/mult_submits.inc.php:275 #: libraries/sql_query_form.lib.php:403 @@ -7077,7 +7076,7 @@ msgstr "" #: libraries/replication_gui.lib.php:109 msgid "Slave status" -msgstr "" +msgstr "슬레이브 스테이터스" #: libraries/replication_gui.lib.php:118 libraries/sql_query_form.lib.php:388 #: server_status.php:1488 server_variables.php:123 @@ -7093,9 +7092,8 @@ msgid "Value" msgstr "값" #: libraries/replication_gui.lib.php:178 server_binlog.php:183 -#, fuzzy msgid "Server ID" -msgstr "서버" +msgstr "서버 아이디" #: libraries/replication_gui.lib.php:197 msgid "" @@ -7128,7 +7126,7 @@ msgstr "로컬" #: libraries/replication_gui.lib.php:318 server_privileges.php:856 msgid "This Host" -msgstr "" +msgstr "현재 호스트" #: libraries/replication_gui.lib.php:324 server_privileges.php:862 msgid "Use Host Table" @@ -7153,7 +7151,7 @@ msgstr "" #: libraries/rte/rte_triggers.lib.php:117 #, php-format msgid "The following query has failed: \"%s\"" -msgstr "" +msgstr "쿼리 실행 실패: \"%s\"" #: libraries/rte/rte_events.lib.php:125 msgid "Sorry, we failed to restore the dropped event." @@ -7197,7 +7195,7 @@ msgstr "프로세스 목록" #: libraries/rte/rte_events.lib.php:388 libraries/rte/rte_routines.lib.php:845 #: libraries/rte/rte_triggers.lib.php:319 msgid "Details" -msgstr "" +msgstr "자세한 내용" #: libraries/rte/rte_events.lib.php:391 #, fuzzy @@ -7397,7 +7395,7 @@ msgstr "" #: libraries/rte/rte_routines.lib.php:1027 msgid "You must provide a routine name" -msgstr "" +msgstr "루틴 이름이 필요함" #: libraries/rte/rte_routines.lib.php:1053 #, php-format @@ -7465,9 +7463,8 @@ msgid "Trigger %1$s has been created." msgstr "테이블 %s 을 제거했습니다." #: libraries/rte/rte_triggers.lib.php:178 -#, fuzzy msgid "Edit trigger" -msgstr "새 사용자 추가" +msgstr "트리거 수정" #: libraries/rte/rte_triggers.lib.php:322 #, fuzzy @@ -7624,7 +7621,7 @@ msgstr "\"%s\" 데이터베이스의 스킴(윤곽) - 페이지 %s" #: libraries/schema/Export_Relation_Schema.class.php:200 msgid "This page does not contain any tables!" -msgstr "" +msgstr "이 페이지에는 테이블이 없습니다!" #: libraries/schema/Export_Relation_Schema.class.php:228 msgid "SCHEMA ERROR: " @@ -7901,15 +7898,15 @@ msgstr "BEGIN CUT" #: libraries/sqlparser.lib.php:179 msgid "END CUT" -msgstr "" +msgstr "END CUT" #: libraries/sqlparser.lib.php:181 msgid "BEGIN RAW" -msgstr "" +msgstr "BEGIN RAW" #: libraries/sqlparser.lib.php:185 msgid "END RAW" -msgstr "" +msgstr "END RAW" #: libraries/sqlparser.lib.php:382 msgid "Automatically appended backtick to the end of query!" @@ -8389,7 +8386,7 @@ msgstr "데이터베이스를 선택하세요" #: pmd_general.php:64 msgid "Show/Hide left menu" -msgstr "" +msgstr "왼쪽 메뉴 보이기/숨기기" #: pmd_general.php:68 msgid "Save position" @@ -8413,7 +8410,7 @@ msgstr "" #: pmd_general.php:87 msgid "Direct links" -msgstr "" +msgstr "다이렉트 링크" #: pmd_general.php:91 msgid "Snap to grid" @@ -8464,7 +8461,7 @@ msgstr "" #: pmd_general.php:412 msgid "Delete relation" -msgstr "" +msgstr "관계(relation) 삭제" #: pmd_general.php:454 pmd_general.php:513 #, fuzzy @@ -8825,7 +8822,7 @@ msgstr "임시테이블 생성 허용." #: server_privileges.php:41 server_privileges.php:307 #: server_privileges.php:669 msgid "Allows creating, dropping and renaming user accounts." -msgstr "" +msgstr "사용자 계정을 생성, 삭제 및 계정명 변경하는 것을 허용." #: server_privileges.php:42 server_privileges.php:273 #: server_privileges.php:286 server_privileges.php:641 @@ -8993,7 +8990,7 @@ msgstr "주의: MySQL 권한 이름은 영어로 표기되어야 합니다." #: server_privileges.php:614 msgid "Administration" -msgstr "" +msgstr "관리" #: server_privileges.php:678 server_privileges.php:1705 msgid "Global privileges" @@ -9084,7 +9081,6 @@ msgid "Any" msgstr "누구나" #: server_privileges.php:1567 -#, fuzzy #| msgid "User overview" msgid "Users overview" msgstr "사용자 개요" @@ -9415,11 +9411,11 @@ msgstr "확장된 inserts" #: server_status.php:600 msgid "Key cache" -msgstr "" +msgstr "키 캐시" #: server_status.php:601 msgid "Joins" -msgstr "" +msgstr "조인 수" #: server_status.php:603 msgid "Sorting" @@ -10132,7 +10128,7 @@ msgstr "" #: server_status.php:1416 msgid "The number of sorts that were done with ranges." -msgstr "" +msgstr "지정된 범위에 완료된 정렬 수." #: server_status.php:1417 msgid "The number of sorted rows." @@ -10345,7 +10341,7 @@ msgstr "" #: server_status.php:1743 msgid "Choose from which log you want the statistics to be generated from." -msgstr "" +msgstr "통계가 생성될 로그를 선택하세요." #: server_status.php:1745 msgid "Results are grouped by query text." @@ -10747,7 +10743,7 @@ msgstr "" msgid "" "%sZip compression%s requires functions (%s) which are unavailable on this " "system." -msgstr "" +msgstr "%sZip 압축%s을 하기 위한 함수 %s가 현재 시스템에서 사용할 수 없습니다." #: setup/lib/index.lib.php:296 #, php-format @@ -10826,10 +10822,9 @@ msgid "Table %1$s has been altered successfully" msgstr "선택한 사용자들을 삭제했습니다." #: tbl_change.php:699 -#, fuzzy #| msgid "ause of its length,
    this field might not be editable " msgid "Because of its length,
    this column might not be editable" -msgstr "필드의 길이 때문에,
    이 필드를 편집할 수 없습니다 " +msgstr "컬럼의 길이 때문에,
    이 컬럼을 편집할 수 없을 수도 있습니다" #: tbl_change.php:817 msgid "Remove BLOB Repository Reference" @@ -11394,7 +11389,7 @@ msgstr "SQL 구문이 추출되었습니다. 덤프된 내용을 복사하거나 #: tbl_tracking.php:246 #, php-format msgid "Version %s snapshot (SQL code)" -msgstr "" +msgstr "버전 %s 스냅샷 (SQL 코드)" #: tbl_tracking.php:388 msgid "Tracking data definition successfully deleted" @@ -11508,9 +11503,8 @@ msgid "Do a \"query by example\" (wildcard: \"%\") for two different columns" msgstr "다음으로 질의를 만들기 (와일드카드: \"%\")" #: tbl_zoom_select.php:152 -#, fuzzy msgid "Additional search criteria" -msgstr "SQL 질의" +msgstr "추가적인 검색 조건" #: tbl_zoom_select.php:283 msgid "Use this column to label each point" @@ -12003,10 +11997,9 @@ msgid "Percentage of sorts that cause temporary tables" msgstr "정렬로 인해 임시 테이블을 사용하게 되는 비율" #: po/advisory_rules.php:111 po/advisory_rules.php:116 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Too many sorts are causing temporary tables." -msgstr "임시테이블 생성 허용." +msgstr "너무 많은 정렬로 인해 임시 테이블의 사용이 발생합니다." #: po/advisory_rules.php:112 po/advisory_rules.php:117 msgid "" From ee09f98f73f887f8ae9540c253686a77e5e0bc69 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 14 Apr 2013 19:21:35 -0400 Subject: [PATCH 021/218] Forgotten in refactoring --- libraries/sql_query_form.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 7a72ad4470..2478533cb6 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -289,7 +289,7 @@ function PMA_sqlQueryFormInsert( && strlen($field['Field']) && isset($field['Comment']) ) { - echo ' title="' . htmlspecialchars($field['Comment']) . '"'; + $html .= ' title="' . htmlspecialchars($field['Comment']) . '"'; } $html .= '>' . htmlspecialchars($field['Field']) . '' . "\n"; } From c4cb007570b60da33014670506389be862d5af7d Mon Sep 17 00:00:00 2001 From: Kasun Chathuranga Date: Mon, 15 Apr 2013 08:26:32 +0530 Subject: [PATCH 022/218] Fix bug 3875 Lost location hash and token on table add field --- tbl_addfield.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tbl_addfield.php b/tbl_addfield.php index 9d5e860917..3d5f08545a 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -10,6 +10,11 @@ */ require_once 'libraries/common.inc.php'; +$response = PMA_Response::getInstance(); +$header = $response->getHeader(); +$scripts = $header->getScripts(); +$scripts->addFile('tbl_structure.js'); + // Check parameters PMA_Util::checkParameters(array('db', 'table')); @@ -41,7 +46,7 @@ if (isset($_REQUEST['submit_num_fields'])) { } if (isset($_REQUEST['do_save_data'])) { - //avoid an incorrect calling of PMA_updateColumns() via + //avoid an incorrect calling of PMA_updateColumns() via //tbl_structure.php below unset($_REQUEST['do_save_data']); @@ -193,7 +198,6 @@ if (isset($_REQUEST['do_save_data'])) { $message->addParam($table); if ($GLOBALS['is_ajax_request'] == true) { - $response = PMA_Response::getInstance(); $response->addJSON('message', $message); $response->addJSON( 'sql_query', @@ -206,7 +210,6 @@ if (isset($_REQUEST['do_save_data'])) { $abort = true; include 'tbl_structure.php'; } else { - $response = PMA_Response::getInstance(); $error_message_html = PMA_Util::mysqlDie('', '', '', $err_url, false); $response->addHTML($error_message_html); if ($GLOBALS['is_ajax_request'] == true) { From 9c5c9ecc49deb68164acd2e572c84edbeff48140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 10:55:41 +0200 Subject: [PATCH 023/218] Ignore some more thing from coverage reports - coding style rules - user examples - admin scripts --- phpunit.xml.dist | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a768da8c23..53687f8d0c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -58,6 +58,12 @@ libraries/bfShapeFiles libraries/php-gettext libraries/php-gettext + + PMAStandard + + examples + + scripts From e07a89090551b841142707607b8cff130f4a7a6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 11:42:05 +0200 Subject: [PATCH 024/218] Explicitly set radix for parseInt --- js/functions.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/js/functions.js b/js/functions.js index 5c83300adf..ce3294146d 100644 --- a/js/functions.js +++ b/js/functions.js @@ -101,11 +101,11 @@ function parseVersionString (str) var state = str.split('-'); if (state.length >= 2) { if (state[1].substr(0, 2) == 'rc') { - add = - 20 - parseInt(state[1].substr(2)); + add = - 20 - parseInt(state[1].substr(2), 10); } else if (state[1].substr(0, 4) == 'beta') { - add = - 40 - parseInt(state[1].substr(4)); + add = - 40 - parseInt(state[1].substr(4), 10); } else if (state[1].substr(0, 5) == 'alpha') { - add = - 60 - parseInt(state[1].substr(5)); + add = - 60 - parseInt(state[1].substr(5), 10); } else if (state[1].substr(0, 3) == 'dev') { /* We don't handle dev, it's git snapshot */ add = 0; @@ -114,10 +114,10 @@ function parseVersionString (str) // Parse version var x = str.split('.'); // Use 0 for non existing parts - var maj = parseInt(x[0]) || 0; - var min = parseInt(x[1]) || 0; - var pat = parseInt(x[2]) || 0; - var hotfix = parseInt(x[3]) || 0; + var maj = parseInt(x[0], 10) || 0; + var min = parseInt(x[1], 10) || 0; + var pat = parseInt(x[2], 10) || 0; + var hotfix = parseInt(x[3], 10) || 0; return maj * 100000000 + min * 1000000 + pat * 10000 + hotfix * 100 + add; } @@ -467,7 +467,7 @@ function emptyFormElements(theForm, theFieldName) function checkFormElementInRange(theForm, theFieldName, message, min, max) { var theField = theForm.elements[theFieldName]; - var val = parseInt(theField.value); + var val = parseInt(theField.value, 10); if (typeof(min) == 'undefined') { min = 0; @@ -514,7 +514,7 @@ function checkTableEditForm(theForm, fieldsCnt) val = elm.val(); if (val == 'VARCHAR' || val == 'CHAR' || val == 'BIT' || val == 'VARBINARY' || val == 'BINARY') { elm2 = $("#field_" + i + "_3"); - val = parseInt(elm2.val()); + val = parseInt(elm2.val(), 10); elm3 = $("#field_" + i + "_1"); if (isNaN(val) && elm3.val() != "") { elm2.select(); @@ -902,8 +902,8 @@ function TableDragInit() { containment: "parent", drag: function (evt, ui) { var number = $this.data('number'); - $('#c_table_' + number + '_x').val(parseInt(ui.position.left)); - $('#c_table_' + number + '_y').val(parseInt(ui.position.top)); + $('#c_table_' + number + '_x').val(parseInt(ui.position.left, 10)); + $('#c_table_' + number + '_y').val(parseInt(ui.position.top, 10)); } }); }); @@ -1655,7 +1655,7 @@ $(function() { function PMA_showNoticeForEnum(selectElement) { var enum_notice_id = selectElement.attr("id").split("_")[1]; - enum_notice_id += "_" + (parseInt(selectElement.attr("id").split("_")[2]) + 1); + enum_notice_id += "_" + (parseInt(selectElement.attr("id").split("_")[2], 10) + 1); var selectedType = selectElement.val(); if (selectedType == "ENUM" || selectedType == "SET") { $("p#enum_notice_" + enum_notice_id).show(); @@ -1894,8 +1894,8 @@ function PMA_SQLPrettyPrint(string) jQuery.fn.PMA_confirm = function(question, url, callbackFn) { var confirmState = PMA_commonParams.get('confirm'); - // when the Confirm directive is set to false in config.inc.php - // and not changed in user prefs, confirmState is "" + // when the Confirm directive is set to false in config.inc.php + // and not changed in user prefs, confirmState is "" // when it's unticked in user prefs, confirmState is 1 if (confirmState === "" || confirmState === "1") { // user does not want to confirm @@ -2939,7 +2939,7 @@ $(function() { */ function PMA_getRowNumber(classlist) { - return parseInt(classlist.split(/\s+row_/)[1]); + return parseInt(classlist.split(/\s+row_/)[1], 10); } /** @@ -3526,7 +3526,7 @@ function PMA_tooltip($elements, item, myContent, additionalOptions) tooltipClass: "tooltip", track: true, show: false, - hide: false + hide: false }; $elements.tooltip($.extend(true, defaultOptions, additionalOptions)); From efb7a2ae58ff019b159981f4eeea078b30aa174e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 11:42:46 +0200 Subject: [PATCH 025/218] Define variable just once --- js/functions.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index ce3294146d..7f155ea3ab 100644 --- a/js/functions.js +++ b/js/functions.js @@ -136,11 +136,10 @@ function PMA_current_version(data) escapeHtml(data['version']), escapeHtml(data['date']) ); + var klass = 'notice'; if (Math.floor(latest / 10000) === Math.floor(current / 10000)) { /* Security update */ - var klass = 'error'; - } else { - var klass = 'notice'; + klass = 'error'; } $('#maincontainer').after('
    ' + message + '
    '); } From 5de58e20496e225e11ac3e6c656a41f8c3998dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 11:44:34 +0200 Subject: [PATCH 026/218] Use type cast safe comparison The values like true, '' or 0 could compare to lot of other stuff with type casting. --- js/functions.js | 98 ++++++++++++++++++++++++------------------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/js/functions.js b/js/functions.js index 7f155ea3ab..4f52c5f2c9 100644 --- a/js/functions.js +++ b/js/functions.js @@ -165,7 +165,7 @@ function PMA_display_git_revision() "ajax_request": true }, function (data) { - if (data.success == true) { + if (data.success === true) { $(data.message).insertAfter('#li_pma_version'); } } @@ -268,7 +268,7 @@ function confirmLink(theLink, theSqlQuery) { // Confirmation is not required in the configuration file // or browser is Opera (crappy js implementation) - if (PMA_messages['strDoYouReally'] == '' || typeof(window.opera) != 'undefined') { + if (PMA_messages['strDoYouReally'] === '' || typeof(window.opera) != 'undefined') { return true; } @@ -307,12 +307,12 @@ function confirmLink(theLink, theSqlQuery) function confirmQuery(theForm1, sqlQuery1) { // Confirmation is not required in the configuration file - if (PMA_messages['strDoYouReally'] == '') { + if (PMA_messages['strDoYouReally'] === '') { return true; } // "DROP DATABASE" statement isn't allowed - if (PMA_messages['strNoDropDatabases'] != '') { + if (PMA_messages['strNoDropDatabases'] !== '') { var drop_re = new RegExp('(^|;)\\s*DROP\\s+(IF EXISTS\\s+)?DATABASE\\s', 'i'); if (drop_re.test(sqlQuery1.value)) { alert(PMA_messages['strNoDropDatabases']); @@ -384,21 +384,21 @@ function checkSqlQuery(theForm) var space_re = new RegExp('\\s+'); if (typeof(theForm.elements['sql_file']) != 'undefined' && - theForm.elements['sql_file'].value.replace(space_re, '') != '') { + theForm.elements['sql_file'].value.replace(space_re, '') !== '') { return true; } if (typeof(theForm.elements['sql_localfile']) != 'undefined' && - theForm.elements['sql_localfile'].value.replace(space_re, '') != '') { + theForm.elements['sql_localfile'].value.replace(space_re, '') !== '') { return true; } if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined' && - (theForm.elements['id_bookmark'].value != null || theForm.elements['id_bookmark'].value != '') && - theForm.elements['id_bookmark'].selectedIndex != 0 + (theForm.elements['id_bookmark'].value != null || theForm.elements['id_bookmark'].value !== '') && + theForm.elements['id_bookmark'].selectedIndex !== 0 ) { return true; } // Checks for "DROP/DELETE/ALTER" statements - if (sqlQuery.value.replace(space_re, '') != '') { + if (sqlQuery.value.replace(space_re, '') !== '') { if (confirmQuery(theForm, sqlQuery)) { return true; } else { @@ -431,7 +431,7 @@ function emptyCheckTheField(theForm, theFieldName) { var theField = theForm.elements[theFieldName]; var space_re = new RegExp('\\s+'); - return (theField.value.replace(space_re, '') == '') ? 1 : 0; + return (theField.value.replace(space_re, '') === '') ? 1 : 0; } // end of the 'emptyCheckTheField()' function @@ -523,14 +523,14 @@ function checkTableEditForm(theForm, fieldsCnt) } } - if (atLeastOneField == 0) { + if (atLeastOneField === 0) { id = "field_" + i + "_1"; if (!emptyCheckTheField(theForm, id)) { atLeastOneField = 1; } } } - if (atLeastOneField == 0) { + if (atLeastOneField === 0) { var theField = theForm.elements["field_0_1"]; alert(PMA_messages['strFormEmpty']); theField.focus(); @@ -1361,7 +1361,7 @@ AJAX.registerOnload('functions.js', function() { new_content += "\n"; new_content += "\n"; var $editor_area = $('div#inline_editor'); - if ($editor_area.length == 0) { + if ($editor_area.length === 0) { $editor_area = $('
    '); $editor_area.insertBefore($inner_sql); } @@ -1438,7 +1438,7 @@ AJAX.registerOnload('functions.js', function() { }); if ($('#input_username')) { - if ($('#input_username').val() == '') { + if ($('#input_username').val() === '') { $('#input_username').focus(); } else { $('#input_password').focus(); @@ -1533,7 +1533,7 @@ function PMA_ajaxShowMessage(message, timeout) var dismissable = true; // Handle the case when a empty data.message is passed. // We don't want the empty message - if (message == '') { + if (message === '') { return true; } else if (! message) { // If the message is undefined, show the default @@ -1552,7 +1552,7 @@ function PMA_ajaxShowMessage(message, timeout) self_closing = false; } // Create a parent element for the AJAX messages, if necessary - if ($('#loading_parent').length == 0) { + if ($('#loading_parent').length === 0) { $('
    ') .prependTo("body"); } @@ -1903,7 +1903,7 @@ jQuery.fn.PMA_confirm = function(question, url, callbackFn) { return true; } } - if (PMA_messages['strDoYouReally'] == '') { + if (PMA_messages['strDoYouReally'] === '') { return true; } @@ -2027,7 +2027,7 @@ AJAX.registerOnload('functions.js', function() { PMA_prepareForAjaxRequest($form); //User wants to submit the form $.post($form.attr('action'), $form.serialize() + "&do_save_data=1", function(data) { - if (data.success == true) { + if (data.success === true) { $('#properties_message') .removeClass('error') .html(''); @@ -2043,7 +2043,7 @@ AJAX.registerOnload('functions.js', function() { */ var tables_table = $("#tablesForm").find("tbody").not("#tbl_summary_row"); // this is the first table created in this db - if (tables_table.length == 0) { + if (tables_table.length === 0) { PMA_commonActions.refreshMain( PMA_commonParams.get('opendb_url') ); @@ -2153,7 +2153,7 @@ AJAX.registerOnload('functions.js', function() { var $form = $(this); PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) { - if (data.success == true) { + if (data.success === true) { if ($form.find("input[name='switch_to_new']").prop('checked')) { PMA_commonParams.set( 'db', @@ -2187,7 +2187,7 @@ AJAX.registerOnload('functions.js', function() { var tbl = $form.find('input[name=new_name]').val(); PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize()+"&submit_move=1", function(data) { - if (data.success == true) { + if (data.success === true) { PMA_commonParams.set('db', db); PMA_commonParams.set('table', tbl); PMA_commonActions.refreshMain(false, function () { @@ -2214,7 +2214,7 @@ AJAX.registerOnload('functions.js', function() { PMA_prepareForAjaxRequest($form); var tbl = $tblNameField.val(); $.post($form.attr('action'), $form.serialize(), function(data) { - if (data.success == true) { + if (data.success === true) { PMA_commonParams.set('table', tbl); PMA_commonActions.refreshMain(false, function() { $('#page_content').html(data.message); @@ -2233,10 +2233,10 @@ AJAX.registerOnload('functions.js', function() { **/ $("#tbl_maintenance li a.maintain_action.ajax").live('click', function(event) { event.preventDefault(); - if ($("#sqlqueryresults").length != 0) { + if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); } - if ($("#result_query").length != 0) { + if ($("#result_query").length !== 0) { $("#result_query").remove(); } //variables which stores the common attributes @@ -2244,12 +2244,12 @@ AJAX.registerOnload('functions.js', function() { function scrollToTop() { $('html, body').animate({ scrollTop: 0 }); } - if (data.success == true && data.sql_query != undefined) { + if (data.success === true && data.sql_query != undefined) { PMA_ajaxShowMessage(data.message); $("
    ").prependTo("#page_content"); $("#sqlqueryresults").html(data.sql_query); scrollToTop(); - } else if (data.success == true) { + } else if (data.success === true) { var $temp_div = $("
    "); $temp_div.html(data.message); var $success = $temp_div.find("#result_query .success"); @@ -2335,7 +2335,7 @@ function PMA_checkPassword($the_form) var $password_repeat = $the_form.find('input[name=pma_pw2]'); var alert_msg = false; - if ($password.val() == '') { + if ($password.val() === '') { alert_msg = PMA_messages['strPasswordEmpty']; } else if ($password.val() != $password_repeat.val()) { alert_msg = PMA_messages['strPasswordNotSame']; @@ -2398,7 +2398,7 @@ AJAX.registerOnload('functions.js', function() { $the_form.append(''); $.post($the_form.attr('action'), $the_form.serialize() + '&change_pw='+ this_value, function(data) { - if (data.success == true) { + if (data.success === true) { $("#page_content").prepend(data.message); $("#change_password_dialog").hide().remove(); $("#edit_user_dialog").dialog("close").remove(); @@ -2588,7 +2588,7 @@ AJAX.registerOnload('functions.js', function() { var fields = ''; // If there are no values, maybe the user is about to make a // new list so we add a few for him/her to get started with. - if (values.length == 0) { + if (values.length === 0) { values.push('','','',''); } // Add the parsed values to the editor @@ -2717,7 +2717,7 @@ AJAX.registerOnload('functions.js', function() { */ function checkIndexName(form_id) { - if ($("#"+form_id).length == 0) { + if ($("#"+form_id).length === 0) { return false; } @@ -2767,7 +2767,7 @@ AJAX.registerOnload('functions.js', function() { }); // focus index size input on column picked $newrow.find('select').change(function() { - if ($(this).find("option:selected").val() == '') { + if ($(this).find("option:selected").val() === '') { return true; } $(this).closest("tr").find("input").focus(); @@ -2779,7 +2779,7 @@ AJAX.registerOnload('functions.js', function() { function indexEditorDialog(url, title, callback_success, callback_failure) { /*Remove the hidden dialogs if there are*/ - if ($('#edit_index_dialog').length != 0) { + if ($('#edit_index_dialog').length !== 0) { $('#edit_index_dialog').remove(); } var $div = $('
    '); @@ -2797,10 +2797,10 @@ function indexEditorDialog(url, title, callback_success, callback_failure) PMA_prepareForAjaxRequest($form); //User wants to submit the form $.post($form.attr('action'), $form.serialize()+"&do_save_data=1", function(data) { - if ($("#sqlqueryresults").length != 0) { + if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); } - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); if ($('#result_query').length) { $('#result_query').remove(); @@ -2826,7 +2826,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure) PMA_reloadNavigation(); } else { var $temp_div = $("
    ").append(data.error); - if ($temp_div.find(".error code").length != 0) { + if ($temp_div.find(".error code").length !== 0) { var $error = $temp_div.find(".error code").addClass("error"); } else { var $error = $temp_div; @@ -2878,7 +2878,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure) }); // focus index size input on column picked $div.find('table#index_columns select').change(function() { - if ($(this).find("option:selected").val() == '') { + if ($(this).find("option:selected").val() === '') { return true; } $(this).closest("tr").find("input").focus(); @@ -2903,7 +2903,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure) **/ function PMA_showHints($div) { - if ($div == undefined || ! $div instanceof jQuery || $div.length == 0) { + if ($div == undefined || ! $div instanceof jQuery || $div.length === 0) { $div = $("body"); } $div.find('.pma_hint').each(function () { @@ -3054,7 +3054,7 @@ var toggleButton = function ($obj) { var addClass = 'on'; } $.post(url, {'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msg); $container .removeClass(removeClass) @@ -3159,7 +3159,7 @@ AJAX.registerOnload('functions.js', function() { $('select.pageselector').live('change', function(event) { event.stopPropagation(); // Check where to load the new content - if ($(this).closest("#pma_navigation").length == 0) { + if ($(this).closest("#pma_navigation").length === 0) { // For the main page we don't need to do anything, $(this).closest("form").submit(); } else { @@ -3201,7 +3201,7 @@ AJAX.registerOnload('functions.js', function() { $.get( $('#update_recent_tables').attr('href'), function (data) { - if (data.success == true) { + if (data.success === true) { $('#recentTable').html(data.options); } } @@ -3278,14 +3278,14 @@ AJAX.registerTeardown('functions.js', function() { */ function PMA_slidingMessage(msg, $obj) { - if (msg == undefined || msg.length == 0) { + if (msg == undefined || msg.length === 0) { // Don't show an empty message return false; } - if ($obj == undefined || ! $obj instanceof jQuery || $obj.length == 0) { + if ($obj == undefined || ! $obj instanceof jQuery || $obj.length === 0) { // If the second argument was not supplied, // we might have to create a new DOM node. - if ($('#PMA_slidingMessage').length == 0) { + if ($('#PMA_slidingMessage').length === 0) { $('#page_content').prepend( '' @@ -3369,7 +3369,7 @@ AJAX.registerOnload('functions.js', function() { var $msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); // Table deleted successfully, refresh both the frames PMA_reloadNavigation(); @@ -3400,13 +3400,13 @@ AJAX.registerOnload('functions.js', function() { $(this).PMA_confirm(question, $(this).attr('href'), function(url) { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) { - if ($("#sqlqueryresults").length != 0) { + if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); } - if ($("#result_query").length != 0) { + if ($("#result_query").length !== 0) { $("#result_query").remove(); } - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); $("
    ").prependTo("#page_content"); $("#sqlqueryresults").html(data.sql_query); @@ -3664,7 +3664,7 @@ function PMA_createViewDialog($this) var $msg = PMA_ajaxShowMessage(); var syntaxHighlighter = null; $.get($this.attr('href') + '&ajax_request=1', function (data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msg); var buttonOptions = {}; buttonOptions[PMA_messages['strGo']] = function () { @@ -3715,7 +3715,7 @@ function PMA_createViewDialog($this) * Makes the breadcrumbs and the menu bar float at the top of the viewport */ $(function () { - if ($("#floating_menubar").length && $('#PMA_disable_floating_menubar').length == 0) { + if ($("#floating_menubar").length && $('#PMA_disable_floating_menubar').length === 0) { var left = $('html').attr('dir') == 'ltr' ? 'left' : 'right'; $("#floating_menubar") .css('margin-' + left, $('#pma_navigation').width() + $('#pma_navigation_resizer').width()) From 4f31f7fa1e6137204e502119d2890bca0d01d9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 11:47:24 +0200 Subject: [PATCH 027/218] Fix coding style --- test/classes/PMA_Table_test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/classes/PMA_Table_test.php b/test/classes/PMA_Table_test.php index 7eb9a1a379..5bf6553a45 100644 --- a/test/classes/PMA_Table_test.php +++ b/test/classes/PMA_Table_test.php @@ -78,8 +78,8 @@ class PMA_Table_Test extends PHPUnit_Framework_TestCase public function testSetAndGet() { $table = new PMA_Table('table1', 'pma_test'); - $table->set("production","Phpmyadmin"); - $table->set("db","mysql"); + $table->set('production', 'Phpmyadmin'); + $table->set('db', 'mysql'); $this->assertEquals( "Phpmyadmin", $table->get("production") From 020a3e1ce401163b6000022a723748721823e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:03:11 +0200 Subject: [PATCH 028/218] Use type cast safe comparison The values like true, '' or 0 could compare to lot of other stuff with type casting. --- js/ajax.js | 4 +-- js/chart.js | 54 +++++++++++++++++------------------ js/common.js | 4 +-- js/config.js | 16 +++++------ js/db_operations.js | 8 +++--- js/db_search.js | 2 +- js/db_structure.js | 8 +++--- js/gis_data_editor.js | 8 +++--- js/import.js | 2 +- js/indexes.js | 4 +-- js/replication.js | 2 +- js/server_databases.js | 4 +-- js/server_status_monitor.js | 46 ++++++++++++++--------------- js/server_status_variables.js | 4 +-- js/sql.js | 22 +++++++------- js/tbl_change.js | 4 +-- js/tbl_chart.js | 10 +++---- js/tbl_gis_visualization.js | 8 +++--- js/tbl_select.js | 12 ++++---- js/tbl_structure.js | 12 ++++---- 20 files changed, 117 insertions(+), 117 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index 39a1218947..5f51618546 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -142,7 +142,7 @@ var AJAX = { event.preventDefault(); event.stopImmediatePropagation(); } - if (AJAX.active == true) { + if (AJAX.active === true) { // Silently bail out, there is already a request in progress. // TODO: save a reference to the request and cancel the old request // when the user requests something else. Something like this is @@ -716,7 +716,7 @@ AJAX.setUrlHash = (function (jQuery, window) { // when the page finishes loading jQuery(function(){ /* Check if we should set URL */ - if (savedHash != "") { + if (savedHash !== "") { window.location.hash = savedHash; savedHash = ""; resetFavicon(); diff --git a/js/chart.js b/js/chart.js index 6cc7970260..971d57a4c3 100644 --- a/js/chart.js +++ b/js/chart.js @@ -24,7 +24,7 @@ ChartFactory.prototype = { /** * Abstract chart which defines the contract for charts - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -51,7 +51,7 @@ Chart.prototype = { * ColumnType.NUMBER and represents a data series. * * Line chart, area chart, bar chart, column chart are typical examples. - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -75,7 +75,7 @@ BaseChart.prototype.validateColumns = function(dataTable) { /** * Abstract pie chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -94,7 +94,7 @@ PieChart.prototype.validateColumns = function(dataTable) { /** * Abstract timeline chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -103,7 +103,7 @@ var TimelineChart = function(elementId) { }; TimelineChart.prototype = new BaseChart(); TimelineChart.prototype.constructor = TimelineChart; -TimelineChart.prototype.validateColumns = function(dataTable) { +TimelineChart.prototype.validateColumns = function(dataTable) { var result = BaseChart.prototype.validateColumns.call(this, dataTable); if (result) { var columns = dataTable.getColumns(); @@ -142,7 +142,7 @@ var DataTable = function() { }; var fillMissingValues = function() { - if (columns.length == 0) { + if (columns.length === 0) { throw new Error("Set columns first"); } var row, column; @@ -210,7 +210,7 @@ JQPlotChartFactory.prototype.createChart = function(type, elementId) { /** * Abstract JQplot chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -246,7 +246,7 @@ JQPlotChart.prototype.prepareData = function(dataTable) { /** * JQPlot line chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -274,15 +274,15 @@ JQPlotLineChart.prototype.populateOptions = function(dataTable, options) { series : [] }; $.extend(true, optional, options); - - if (optional.series.length == 0) { + + if (optional.series.length === 0) { for ( var i = 1; i < columns.length; i++) { optional.series.push({ label : columns[i].name.toString() }); } } - if (optional.axes.xaxis.ticks.length == 0) { + if (optional.axes.xaxis.ticks.length === 0) { var data = dataTable.getData(); for ( var i = 0; i < data.length; i++) { optional.axes.xaxis.ticks.push(data[i][0].toString()); @@ -310,7 +310,7 @@ JQPlotLineChart.prototype.prepareData = function(dataTable) { /** * JQPlot spline chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -337,7 +337,7 @@ JQPlotSplineChart.prototype.populateOptions = function(dataTable, options) { /** * JQPlot timeline chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -348,7 +348,7 @@ var JQPlotTimelineChart = function(elementId) { JQPlotTimelineChart.prototype = new JQPlotLineChart(); JQPlotTimelineChart.prototype.constructor = JQPlotAreaChart; -JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) { +JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) { var optional = { axes : { xaxis : { @@ -356,7 +356,7 @@ JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) { formatString:'%b %#d, %y' } } - } + } }; var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options); var compulsory = { @@ -392,7 +392,7 @@ JQPlotTimelineChart.prototype.prepareData = function(dataTable) { /** * JQPlot area chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -406,14 +406,14 @@ JQPlotAreaChart.prototype.populateOptions = function(dataTable, options) { var optional = { seriesDefaults : { fillToZero : true - } + } }; var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options); var compulsory = { seriesDefaults : { fill : true - } + } }; $.extend(true, optional, opt, compulsory); return optional; @@ -421,7 +421,7 @@ JQPlotAreaChart.prototype.populateOptions = function(dataTable, options) { /** * JQPlot column chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -435,7 +435,7 @@ JQPlotColumnChart.prototype.populateOptions = function(dataTable, options) { var optional = { seriesDefaults : { fillToZero : true - } + } }; var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options); @@ -450,7 +450,7 @@ JQPlotColumnChart.prototype.populateOptions = function(dataTable, options) { /** * JQPlot bar chart - * + * * @param elementId * id of the div element the chart is drawn in */ @@ -465,7 +465,7 @@ JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { var optional = { axes : { yaxis : { - label : columns[0].name, + label : columns[0].name, labelRenderer : $.jqplot.CanvasAxisLabelRenderer, renderer : $.jqplot.CategoryAxisRenderer, ticks : [] @@ -479,7 +479,7 @@ JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { seriesDefaults : { fillToZero : true } - }; + }; var compulsory = { seriesDefaults : { renderer : $.jqplot.BarRenderer, @@ -489,14 +489,14 @@ JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { } }; $.extend(true, optional, options, compulsory); - - if (optional.axes.yaxis.ticks.length == 0) { + + if (optional.axes.yaxis.ticks.length === 0) { var data = dataTable.getData(); for ( var i = 0; i < data.length; i++) { optional.axes.yaxis.ticks.push(data[i][0].toString()); } } - if (optional.series.length == 0) { + if (optional.series.length === 0) { for ( var i = 1; i < columns.length; i++) { optional.series.push({ label : columns[i].name.toString() @@ -508,7 +508,7 @@ JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { /** * JQPlot pie chart - * + * * @param elementId * id of the div element the chart is drawn in */ diff --git a/js/common.js b/js/common.js index c4f4bab7ef..017a5bad6a 100644 --- a/js/common.js +++ b/js/common.js @@ -254,7 +254,7 @@ var PMA_querywindow = (function ($, window) { refresh: function (url) { if (! querywindow.closed && querywindow.location) { var $form = $(querywindow.document).find('#sqlqueryform'); - if ($form.find('#checkbox_lock:checked').length == 0) { + if ($form.find('#checkbox_lock:checked').length === 0) { PMA_querywindow.open(url); } } @@ -272,7 +272,7 @@ var PMA_querywindow = (function ($, window) { reload: function (db, table, sql_query) { if (! querywindow.closed && querywindow.location) { var $form = $(querywindow.document).find('#sqlqueryform'); - if ($form.find('#checkbox_lock:checked').length == 0) { + if ($form.find('#checkbox_lock:checked').length === 0) { var $hiddenform = $(querywindow.document) .find('#hiddenqueryform'); $hiddenform.find('input[name=db]').val(db); diff --git a/js/config.js b/js/config.js index 2141b656e5..ee39ce7b65 100644 --- a/js/config.js +++ b/js/config.js @@ -203,7 +203,7 @@ var validators = { * @param {boolean} isKeyUp */ validate_positive_number: function (isKeyUp) { - if (isKeyUp && this.value == '') { + if (isKeyUp && this.value === '') { return true; } var result = this.value != '0' && validators._regexp_numeric.test(this.value); @@ -215,7 +215,7 @@ var validators = { * @param {boolean} isKeyUp */ validate_non_negative_number: function (isKeyUp) { - if (isKeyUp && this.value == '') { + if (isKeyUp && this.value === '') { return true; } var result = validators._regexp_numeric.test(this.value); @@ -227,7 +227,7 @@ var validators = { * @param {boolean} isKeyUp */ validate_port_number: function(isKeyUp) { - if (this.value == '') { + if (this.value === '') { return true; } var result = validators._regexp_numeric.test(this.value) && this.value != '0'; @@ -240,7 +240,7 @@ var validators = { * @param {string} regexp */ validate_by_regex: function(isKeyUp, regexp) { - if (isKeyUp && this.value == '') { + if (isKeyUp && this.value === '') { return true; } // convert PCRE regexp @@ -339,7 +339,7 @@ function displayErrors(error_list) // remove empty errors (used to clear error list) errors = $.grep(errors, function(item) { - return item != ''; + return item !== ''; }); // CSS error class @@ -351,7 +351,7 @@ function displayErrors(error_list) if (errors.length) { // if error container doesn't exist, create it - if (errorCnt.length == 0) { + if (errorCnt.length === 0) { if (isFieldset) { errorCnt = $('
    '); field.find('table').before(errorCnt); @@ -496,7 +496,7 @@ AJAX.registerOnload('config.js', function() { // 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') { + 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++) { @@ -598,7 +598,7 @@ AJAX.registerOnload('config.js', function() { function restoreField(field_id) { var field = $('#'+field_id); - if (field.length == 0 || defaultValues[field_id] == undefined) { + if (field.length === 0 || defaultValues[field_id] == undefined) { return; } setFieldValue(field, getFieldType(field), defaultValues[field_id]); diff --git a/js/db_operations.js b/js/db_operations.js index 848f984d22..c4b8f2930d 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -44,11 +44,11 @@ AJAX.registerOnload('db_operations.js', function() { $form.PMA_confirm(question, $form.attr('action'), function(url) { PMA_ajaxShowMessage(PMA_messages['strRenamingDatabases'], false); $.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); PMA_commonParams.set('db', data.newname); - PMA_reloadNavigation(function() { + PMA_reloadNavigation(function() { $('#pma_navigation_tree') .find("a:not('.expander')") .each(function(index) { @@ -78,7 +78,7 @@ AJAX.registerOnload('db_operations.js', function() { $.get($form.attr('action'), $form.serialize(), function(data) { // use messages that stay on screen $('div.success, div.error').fadeOut(); - if (data.success == true) { + if (data.success === true) { PMA_commonParams.set('db', data.newname); if ( $("#checkbox_switch").is(":checked")) { PMA_commonParams.set('db', data.newname); @@ -104,7 +104,7 @@ AJAX.registerOnload('db_operations.js', function() { PMA_prepareForAjaxRequest($form); PMA_ajaxShowMessage(PMA_messages['strChangingCharset']); $.get($form.attr('action'), $form.serialize() + "&submitcollation=1", function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); } else { PMA_ajaxShowMessage(data.error, false); diff --git a/js/db_search.js b/js/db_search.js index 495abadc38..f2a5178bd1 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -194,7 +194,7 @@ AJAX.registerOnload('db_search.js', function() { var url = $form.serialize() + "&submit_search=" + $("#buttonGo").val(); $.post($form.attr('action'), url, function(data) { - if (data.success == true) { + if (data.success === true) { // found results $("#searchresults").html(data.message); diff --git a/js/db_structure.js b/js/db_structure.js index 5081d0274e..2aad200d24 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -60,7 +60,7 @@ function PMA_adjustTotals() { // Get the number of rows for this SQL table var strRows = $this.find('.tbl_rows').text(); // If the value is approximated - if (strRows.indexOf('~') == 0) { + if (strRows.indexOf('~') === 0) { rowSumApproximated = true; // The approximated value contains a preceding ~ and a following 2 (Eg 100 --> ~1002) strRows = strRows.substring(1, strRows.length - 1); @@ -205,7 +205,7 @@ AJAX.registerOnload('db_structure.js', function() { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); // Adjust table statistics var $tr = $this_anchor.closest('tr'); @@ -266,7 +266,7 @@ AJAX.registerOnload('db_structure.js', function() { var $msg = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); toggleRowColors($curr_row.next()); $curr_row.hide("medium").remove(); @@ -302,7 +302,7 @@ AJAX.registerOnload('db_structure.js', function() { PMA_ajaxShowMessage(PMA_messages['strDeletingTrackingData']); $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { var $tracked_table = $curr_tracking_row.parents('table'); var table_name = $curr_tracking_row.find('td:nth-child(2)').text(); diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 99dc70d529..c545be2ddb 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -145,7 +145,7 @@ function loadGISEditor(value, field, type, input_name, token) { 'token' : token, 'ajax_request': true }, function(data) { - if (data.success == true) { + if (data.success === true) { $gis_editor.html(data.gis_editor); initGISEditorVisualization(); prepareJSVersion(); @@ -192,7 +192,7 @@ function insertDataAndClose() { var input_name = $form.find("input[name='input_name']").val(); $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function(data) { - if (data.success == true) { + if (data.success === true) { $("input[name='" + input_name + "']").val(data.result); } else { PMA_ajaxShowMessage(data.error, false); @@ -243,7 +243,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { $('#gis_editor').find("input[type='text']").live('change', function() { var $form = $('form#gis_data_editor_form'); $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function(data) { - if (data.success == true) { + if (data.success === true) { $('#gis_data_textarea').val(data.result); $('#placeholder').empty().removeClass('hasSVG').html(data.visualization); $('#openlayersmap').empty(); @@ -263,7 +263,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { var $form = $('form#gis_data_editor_form'); $.post('gis_data_editor.php', $form.serialize() + "&get_gis_editor=true&ajax_request=true", function(data) { - if (data.success == true) { + if (data.success === true) { $gis_editor.html(data.gis_editor); initGISEditorVisualization(); prepareJSVersion(); diff --git a/js/import.js b/js/import.js index 4dfda5a9df..79413b727f 100644 --- a/js/import.js +++ b/js/import.js @@ -31,7 +31,7 @@ function matchFile(fname) { var fname_array = fname.toLowerCase().split("."); var len = fname_array.length; - if (len != 0) { + if (len !== 0) { var extension = fname_array[len - 1]; if (extension == "gz" || extension == "bz2" || extension == "zip") { len--; diff --git a/js/indexes.js b/js/indexes.js index de94076304..00d754f114 100644 --- a/js/indexes.js +++ b/js/indexes.js @@ -135,7 +135,7 @@ AJAX.registerOnload('indexes.js', function() { $anchor.PMA_confirm(question, $anchor.attr('href'), function(url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strDroppingPrimaryKeyIndex'], false); $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msg); var $table_ref = $rows_to_hide.closest('table'); if ($rows_to_hide.length == $table_ref.find('tbody > tr').length) { @@ -176,7 +176,7 @@ AJAX.registerOnload('indexes.js', function() { **/ $("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").live('click', function(event) { event.preventDefault(); - if ($(this).find("a").length == 0) { + if ($(this).find("a").length === 0) { // Add index var valid = checkFormElementInRange( $(this).closest('form')[0], diff --git a/js/replication.js b/js/replication.js index 8c09de413f..3c0498b45b 100644 --- a/js/replication.js +++ b/js/replication.js @@ -13,7 +13,7 @@ function update_config() var conf_do = "binlog_do_db="; var database_list = ''; - if ($('#db_select option:selected').size() == 0) { + if ($('#db_select option:selected').size() === 0) { $('#rep').text(conf_prefix); } else if ($('#db_type option:selected').val() == 'all') { $('#db_select option:selected').each(function() { diff --git a/js/server_databases.js b/js/server_databases.js index 8408a8607b..786af38c03 100644 --- a/js/server_databases.js +++ b/js/server_databases.js @@ -66,7 +66,7 @@ AJAX.registerOnload('server_databases.js', function() { PMA_ajaxShowMessage(PMA_messages.strProcessingRequest, false); $.post(url, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); var $rowsToRemove = $form.find('tr.removeMe'); @@ -104,7 +104,7 @@ AJAX.registerOnload('server_databases.js', function() { PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); //Append database's row to table diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 286cb7539a..7db76becbd 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -494,12 +494,12 @@ AJAX.registerOnload('server_status_monitor.js', function() { var numColumns; var $tr = $('#chartGrid tr:first'); var row = 0; - while($tr.length != 0) { + while($tr.length !== 0) { numColumns = 1; // To many cells in one row => put into next row $tr.find('td').each(function() { if (numColumns > monitorSettings.columns) { - if ($tr.next().length == 0) { + if ($tr.next().length === 0) { $tr.after(''); } $tr.next().prepend($(this)); @@ -514,7 +514,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { for (var i = 0; i < cnt; i++) { $tr.append($tr.next().find('td:first')); $tr.nextAll().each(function() { - if ($(this).next().length != 0) { + if ($(this).next().length !== 0) { $(this).append($(this).next().find('td:first')); } }); @@ -577,7 +577,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // If user builds his own chart, it's being set/updated // each time he adds a series // So here we only warn if he didn't add a series yet - if (! newChart || ! newChart.nodes || newChart.nodes.length == 0) { + if (! newChart || ! newChart.nodes || newChart.nodes.length === 0) { alert(PMA_messages['strAddOneSeriesWarning']); return; } @@ -602,7 +602,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }; var $presetList = $('#addChartDialog select[name="presetCharts"]'); - if ($presetList.html().length == 0) { + if ($presetList.html().length === 0) { $.each(presetCharts, function(key, value) { $presetList.append(''); }); @@ -783,7 +783,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $.get('server_status_monitor.php?' + PMA_commonParams.get('common_query'), vars, function(data) { var logVars; - if (data.success == true) { + if (data.success === true) { logVars = data.message; } else { return serverResponseError(); @@ -798,11 +798,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { } } - if (msg.length == 0 && logVars['slow_query_log'] == 'ON') { + if (msg.length === 0 && logVars['slow_query_log'] == 'ON') { msg = PMA_messages['strSlowLogOn']; } - if (msg.length == 0) { + if (msg.length === 0) { icon = PMA_getImage('s_error.png'); msg = PMA_messages['strBothLogOff']; } @@ -924,7 +924,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); $('select[name="varChartList"]').change(function () { - if (this.selectedIndex != 0) { + if (this.selectedIndex !== 0) { $('#variableInput').val(this.value); } }); @@ -956,7 +956,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('a[href="#submitAddSeries"]').click(function(event) { event.preventDefault(); - if ($('#variableInput').val() == "") { + if ($('#variableInput').val() === "") { return false; } @@ -1196,10 +1196,10 @@ AJAX.registerOnload('server_status_monitor.js', function() { settings.series = chartObj.series; - if ($('#' + 'gridchart' + runtime.chartAI).length == 0) { + if ($('#' + 'gridchart' + runtime.chartAI).length === 0) { var numCharts = $('#chartGrid .monitorChart').length; - if (numCharts == 0 || !( numCharts % monitorSettings.columns)) { + if (numCharts === 0 || !( numCharts % monitorSettings.columns)) { $('#chartGrid').append(''); } @@ -1241,7 +1241,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { .parent() .append($legend); - if (initialize != true) { + if (initialize !== true) { runtime.charts['c' + runtime.chartAI] = chartObj; buildRequiredDataList(); } @@ -1443,7 +1443,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { requiredData: $.toJSON(runtime.dataList) }, function(data) { var chartData; - if (data.success == true) { + if (data.success === true) { chartData = data.message; } else { return serverResponseError(); @@ -1463,7 +1463,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { total = 0; for (var j = 0; j < elem.nodes.length; j++) { // Update x-axis - if (i == 0 && j == 0) { + if (i === 0 && j === 0) { if (oldChartData == null) { diff = chartData.x - runtime.xmax; } else { @@ -1508,7 +1508,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { elem.chart.series[j].data.push([chartData.x, value]); if (value > elem.maxYLabel) { elem.maxYLabel = value; - } else if (elem.maxYLabel == 0) { + } else if (elem.maxYLabel === 0) { elem.maxYLabel = 0.5; } // free old data point values and update maxYLabel @@ -1596,7 +1596,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // cur[0].value is Qcache_hits, cur[1].value is Com_select var diffQHits = cur[0].value - prev[0].value; // No NaN please :-) - if (cur[1].value - prev[1].value == 0) { + if (cur[1].value - prev[1].value === 0) { return 0; } @@ -1604,7 +1604,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // Query cache usage (%) case 'qcu': - if (cur[1].value == 0) { + if (cur[1].value === 0) { return 0; } // cur[0].value is Qcache_free_memory, cur[1].value is query_cache_size @@ -1676,13 +1676,13 @@ AJAX.registerOnload('server_status_monitor.js', function() { }, function(data) { var logData; - if (data.success == true) { + if (data.success === true) { logData = data.message; } else { return serverResponseError(); } - if (logData.rows.length != 0) { + if (logData.rows.length !== 0) { runtime.logDataCols = buildLogTable(logData); /* Show some stats in the dialog */ @@ -1758,7 +1758,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var odd_row = false, cell, textFilter; var val = $('#logTable #filterQueryText').val(); - if (val.length == 0) { + if (val.length === 0) { textFilter = null; } else { textFilter = new RegExp(val, 'i'); @@ -1944,7 +1944,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }; for (var i = 0, l = rows.length; i < l; i++) { - if (i == 0) { + if (i === 0) { $.each(rows[0], function(key, value) { cols.push(key); }); @@ -2063,7 +2063,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { query: codemirror_editor ? codemirror_editor.getValue() : $('#sqlquery').val(), database: db }, function(data) { - if (data.success == true) { + if (data.success === true) { data = data.message; } else { $('#queryAnalyzerDialog div.placeHolder').html('
    ' + data.error + '
    '); diff --git a/js/server_status_variables.js b/js/server_status_variables.js index 2f670666cc..a029f6f8c6 100644 --- a/js/server_status_variables.js +++ b/js/server_status_variables.js @@ -52,7 +52,7 @@ AJAX.registerOnload('server_status_variables.js', function() { $('#filterText').keyup(function(e) { var word = $(this).val().replace(/_/g, ' '); - if (word.length == 0) { + if (word.length === 0) { textFilter = null; } else { textFilter = new RegExp("(^| )" + word, 'i'); @@ -91,7 +91,7 @@ AJAX.registerOnload('server_status_variables.js', function() { $('#serverstatusvariables th.name').each(function() { if ((textFilter == null || textFilter.exec($(this).text())) && (! alertFilter || $(this).next().find('span.attention').length>0) - && (categoryFilter.length == 0 || $(this).parent().hasClass('s_' + categoryFilter)) + && (categoryFilter.length === 0 || $(this).parent().hasClass('s_' + categoryFilter)) ) { odd_row = ! odd_row; $(this).parent().css('display', ''); diff --git a/js/sql.js b/js/sql.js index 4866e6f98b..a54c244d80 100644 --- a/js/sql.js +++ b/js/sql.js @@ -48,7 +48,7 @@ function getFieldName($this_field) var left_action_skip = left_action_exist ? $('#table_results').find('th:first').attr('colspan') - 1 : 0; var field_name = $('#table_results').find('thead').find('th:eq('+ (this_field_index - left_action_skip) + ') a').text(); // happens when just one row (headings contain no a) - if ("" == field_name) { + if (field_name === '') { var $heading = $('#table_results').find('thead').find('th:eq('+ (this_field_index - left_action_skip) + ')').children('span'); // may contain column comment enclosed in a span - detach it temporarily to read the column name var $tempColComment = $heading.children().detach(); @@ -248,7 +248,7 @@ AJAX.registerOnload('sql.js', function() { PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize() , function(data) { - if (data.success == true) { + if (data.success === true) { // success happens if the query returns rows or not // // fade out previous messages, if any @@ -308,13 +308,13 @@ AJAX.registerOnload('sql.js', function() { }); PMA_reloadNavigation(); } - + $sqlqueryresults.show().trigger('makegrid'); $('#togglequerybox').show(); PMA_init_slider(); if (typeof data.action_bookmark == 'undefined') { - if ( $('#sqlqueryform input[name="retain_query_box"]').is(':checked') != true ) { + if ( $('#sqlqueryform input[name="retain_query_box"]').is(':checked') !== true ) { if ($("#togglequerybox").siblings(":visible").length > 0) { $("#togglequerybox").trigger('click'); } @@ -437,9 +437,9 @@ AJAX.registerOnload('sql.js', function() { PMA_prepareForAjaxRequest($form); //User wants to submit the form $.post($form.attr('action'), $form.serialize(), function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); - if ($("#pageselector").length != 0) { + if ($("#pageselector").length !== 0) { $("#pageselector").trigger('change'); } else { $("input[name=navig].ajax").trigger('click'); @@ -481,7 +481,7 @@ AJAX.registerOnload('sql.js', function() { PMA_prepareForAjaxRequest($form); //User wants to submit the form $.post($form.attr('action'), $form.serialize() , function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); if (selected_submit_type == "showinsert") { $("#sqlqueryresults").prepend(data.sql_query); @@ -494,7 +494,7 @@ AJAX.registerOnload('sql.js', function() { $("#table_results tbody tr" + ", #table_results tbody tr td").removeClass("marked"); } else { - if ($("#pageselector").length != 0) { + if ($("#pageselector").length !== 0) { $("#pageselector").trigger('change'); } else { $("input[name=navig].ajax").trigger('click'); @@ -577,12 +577,12 @@ AJAX.registerOnload('sql.js', function() { */ function makeProfilingChart() { - if ($('#profilingchart').length == 0 - || $('#profilingchart').html().length != 0 + if ($('#profilingchart').length === 0 + || $('#profilingchart').html().length !== 0 ) { return; } - + var data = []; $.each(jQuery.parseJSON($('#profilingChartData').html()),function(key,value) { data.push([key,parseFloat(value)]); diff --git a/js/tbl_change.js b/js/tbl_change.js index a249063b2c..44ad1e76b3 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -73,7 +73,7 @@ function nullify(theType, urlField, md5Field, multi_edit) //function checks the number of days in febuary function daysInFebruary (year) { - return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 ); + return (((year % 4 === 0) && ( (!(year % 100 === 0)) || (year % 400 === 0))) ? 29 : 28 ); } //function to convert single digit to double digit function fractionReplace(num) @@ -114,7 +114,7 @@ function isDate(val,tmstmp) if (val.substring(0, pos + 2).length == 2) { year = parseInt("20" + val.substring(0,pos+2)); } - if (tmstmp == true) { + if (tmstmp === true) { if (year < 1978) { return false; } diff --git a/js/tbl_chart.js b/js/tbl_chart.js index dc292fd3f9..de1099397c 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -78,7 +78,7 @@ AJAX.registerOnload('tbl_chart.js', function() { temp_chart_title = $(this).val(); }).keyup(function() { var title = $(this).val(); - if (title.length == 0) { + if (title.length === 0) { title = ' '; } currentSettings.title = $('input[name="chartTitle"]').val(); @@ -166,7 +166,7 @@ $("#tblchartform").live('submit', function(event) { PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function(data) { - if (data.success == true) { + if (data.success === true) { $('.success').fadeOut(); if (typeof data.chartData != 'undefined') { chart_data = jQuery.parseJSON(data.chartData); @@ -223,7 +223,7 @@ function extractDate(dateString) { var matches, match; var dateTimeRegExp = /[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}/; var dateRegExp = /[0-9]{4}-[0-9]{2}-[0-9]{2}/; - + matches = dateTimeRegExp.exec(dateString); if (matches != null && matches.length > 0) { match = matches[0]; @@ -239,7 +239,7 @@ function extractDate(dateString) { } function PMA_queryChart(data, columnNames, settings) { - if ($('#querychart').length == 0) { + if ($('#querychart').length === 0) { return; } @@ -300,7 +300,7 @@ function PMA_queryChart(data, columnNames, settings) { newRow = []; for ( var j = 0; j < columnsToExtract.length; j++) { col = columnNames[columnsToExtract[j]]; - if (j == 0) { + if (j === 0) { if (settings.type == 'timeline') { // first column is date type newRow.push(extractDate(row[col])); } else { // first column is string type diff --git a/js/tbl_gis_visualization.js b/js/tbl_gis_visualization.js index 79fac6565e..5e8d63814a 100644 --- a/js/tbl_gis_visualization.js +++ b/js/tbl_gis_visualization.js @@ -62,7 +62,7 @@ function zoomAndPan() * Initially loads either SVG or OSM visualization based on the choice. */ function selectVisualization() { - if ($('#choice').prop('checked') != true) { + if ($('#choice').prop('checked') !== true) { $('#openlayersmap').hide(); } else { $('#placeholder').hide(); @@ -219,7 +219,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function() { if (delta > 0) { //zoom in scale *= zoomFactor; - // zooming in keeping the position under mouse pointer unmoved. + // zooming in keeping the position under mouse pointer unmoved. x = relCoords.x - (relCoords.x - x) * zoomFactor; y = relCoords.y - (relCoords.y - y) * zoomFactor; zoomAndPan(); @@ -321,14 +321,14 @@ AJAX.registerOnload('tbl_gis_visualization.js', function() { y -= 100; zoomAndPan(); }); - + /** * Detect the mousemove event and show tooltips. */ $('.vector').bind('mousemove', function(event) { var contents = $.trim(escapeHtml($(this).attr('name'))); $("#tooltip").remove(); - if (contents != '') { + if (contents !== '') { $('
    ' + contents + '
    ').css({ position : 'absolute', top : event.pageY + 10, diff --git a/js/tbl_select.js b/js/tbl_select.js index 620155a7b9..3b7c9005a4 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -52,11 +52,11 @@ AJAX.registerOnload('tbl_select.js', function() { */ $("#tbl_search_form.ajax").live('submit', function(event) { var unaryFunctions = [ - 'IS NULL', + 'IS NULL', 'IS NOT NULL', "= ''", "!= ''"]; - + // jQuery object to reuse $search_form = $(this); event.preventDefault(); @@ -79,13 +79,13 @@ AJAX.registerOnload('tbl_select.js', function() { } }); var columnCount = $('select[name="columnsToDisplay[]"] option').length; - // Submit values only for the columns that have unary column operator or a search criteria + // Submit values only for the columns that have unary column operator or a search criteria for (var a = 0; a < columnCount; a++) { if ($.inArray(values['criteriaColumnOperators[' + a + ']'], unaryFunctions) >= 0) { continue; } - - if (values['criteriaValues[' + a + ']'] == '' || values['criteriaValues[' + a + ']'] == null) { + + if (values['criteriaValues[' + a + ']'] === '' || values['criteriaValues[' + a + ']'] == null) { delete values['criteriaValues[' + a + ']']; delete values['criteriaColumnOperators[' + a + ']']; delete values['criteriaColumnNames[' + a + ']']; @@ -105,7 +105,7 @@ AJAX.registerOnload('tbl_select.js', function() { $.post($search_form.attr('action'), values, function(data) { PMA_ajaxRemoveMessage($msgbox); - if (data.success == true) { + if (data.success === true) { if (data.sql_query != null) { // zero rows $("#sqlqueryresults").html(data.sql_query); } else { // results found diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 0f6e5f0bf6..4eb56968c9 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -55,12 +55,12 @@ AJAX.registerOnload('tbl_structure.js', function() { //User wants to submit the form PMA_ajaxShowMessage(); $.post($form.attr('action'), $form.serialize() + '&do_save_data=1', function(data) { - if ($("#sqlqueryresults").length != 0) { + if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); - } else if ($(".error").length != 0) { + } else if ($(".error").length !== 0) { $(".error").remove(); } - if (data.success == true) { + if (data.success === true) { $("
    ").prependTo("#page_content"); $("#sqlqueryresults").html(data.sql_query); $("#result_query .notice").remove(); @@ -145,7 +145,7 @@ AJAX.registerOnload('tbl_structure.js', function() { $(this).PMA_confirm(question, $(this).attr('href'), function(url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strDroppingColumn'], false); $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msg); if ($('#result_query').length) { $('#result_query').remove(); @@ -193,7 +193,7 @@ AJAX.registerOnload('tbl_structure.js', function() { $(this).PMA_confirm(question, $(this).attr('href'), function(url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strAddingPrimaryKey'], false); $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msg); $(this).remove(); if (typeof data.reload != 'undefined') { @@ -282,7 +282,7 @@ AJAX.registerOnload('tbl_structure.js', function() { .text($row.index() + 1) .end() .removeClass("odd even") - .addClass($row.index() % 2 == 0 ? "odd" : "even"); + .addClass($row.index() % 2 === 0 ? "odd" : "even"); } PMA_ajaxShowMessage(data.message); $this.dialog('close'); From 502165de66689e8c5f661d663395137809208a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:05:44 +0200 Subject: [PATCH 029/218] Explicitly define radix for parseInt This prevents unexpected behavior when parsing string like 033, which would be treated as octal. --- js/config.js | 2 +- js/gis_data_editor.js | 8 ++++---- js/server_databases.js | 4 ++-- js/server_status_monitor.js | 22 +++++++++++----------- js/server_status_queries.js | 2 +- js/tbl_change.js | 14 +++++++------- js/tbl_chart.js | 8 ++++---- js/tbl_structure.js | 2 +- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/js/config.js b/js/config.js index ee39ce7b65..26aea4874b 100644 --- a/js/config.js +++ b/js/config.js @@ -255,7 +255,7 @@ var validators = { * @param {int} max_value */ validate_upper_bound: function(isKeyUp, max_value) { - var val = parseInt(this.value); + var val = parseInt(this.value, 10); if (isNaN(val)) { return true; } diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index c545be2ddb..8005d409a0 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -290,7 +290,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { var prefix = name.substr(0, name.length - 11); // Find the number of points var $noOfPointsInput = $("input[name='" + prefix + "[no_of_points]" + "']"); - var noOfPoints = parseInt($noOfPointsInput.val()); + var noOfPoints = parseInt($noOfPointsInput.val(), 10); // Add the new data point var html = addDataPoint(noOfPoints, prefix); $a.before(html); @@ -310,7 +310,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { // Find the number of lines var $noOfLinesInput = $("input[name='" + prefix + "[no_of_lines]" + "']"); - var noOfLines = parseInt($noOfLinesInput.val()); + var noOfLines = parseInt($noOfLinesInput.val(), 10); // Add the new linesting of inner ring based on the type var html = '
    '; @@ -342,7 +342,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { var prefix = name.substr(0, name.length - 13); // Find the number of polygons var $noOfPolygonsInput = $("input[name='" + prefix + "[no_of_polygons]" + "']"); - var noOfPolygons = parseInt($noOfPolygonsInput.val()); + var noOfPolygons = parseInt($noOfPolygonsInput.val(), 10); // Add the new polygon var html = PMA_messages['strPolygon'] + ' ' + (noOfPolygons + 1) + ':
    '; @@ -369,7 +369,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { var prefix = 'gis_data[GEOMETRYCOLLECTION]'; // Find the number of geoms var $noOfGeomsInput = $("input[name='" + prefix + "[geom_count]" + "']"); - var noOfGeoms = parseInt($noOfGeomsInput.val()); + var noOfGeoms = parseInt($noOfGeomsInput.val(), 10); var html1 = PMA_messages['strGeometry'] + ' ' + (noOfGeoms + 1) + ':
    '; var $geomType = $("select[name='gis_data[" + (noOfGeoms - 1) + "][gis_type]']").clone(); diff --git a/js/server_databases.js b/js/server_databases.js index 786af38c03..7fdb6056c1 100644 --- a/js/server_databases.js +++ b/js/server_databases.js @@ -71,7 +71,7 @@ AJAX.registerOnload('server_databases.js', function() { var $rowsToRemove = $form.find('tr.removeMe'); var $databasesCount = $('#databases_count'); - var newCount = parseInt($databasesCount.text()) - $rowsToRemove.length; + var newCount = parseInt($databasesCount.text(), 10) - $rowsToRemove.length; $databasesCount.text(newCount); $rowsToRemove.remove(); @@ -114,7 +114,7 @@ AJAX.registerOnload('server_databases.js', function() { .PMA_sort_table('.name'); var $databases_count_object = $('#databases_count'); - var databases_count = parseInt($databases_count_object.text()) + 1; + var databases_count = parseInt($databases_count_object.text(), 10) + 1; $databases_count_object.text(databases_count); PMA_reloadNavigation(); } else { diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 7db76becbd..cc0bfef1c3 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -436,7 +436,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } else { // Case 2: drop is a empty cell => just completely rebuild the ids var keys = []; - var dropKeyNum = parseInt(dropKey.substr(1)); + var dropKeyNum = parseInt(dropKey.substr(1), 10); var insertBefore = pos.col + pos.row * monitorSettings.columns; var values = []; var newChartList = {}; @@ -483,7 +483,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // global settings $('div.popupContent select[name="chartColumns"]').change(function() { - monitorSettings.columns = parseInt(this.value); + monitorSettings.columns = parseInt(this.value, 10); var newSize = chartSize(); @@ -549,7 +549,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); $('div.popupContent select[name="gridChartRefresh"]').change(function() { - monitorSettings.gridRefresh = parseInt(this.value) * 1000; + monitorSettings.gridRefresh = parseInt(this.value, 10) * 1000; clearTimeout(runtime.refreshTimeout); if (runtime.refreshRequest) { @@ -981,7 +981,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } if ($('input[name="useDivisor"]').prop('checked')) { - serie.valueDivisor = parseInt($('input[name="valueDivisor"]').val()); + serie.valueDivisor = parseInt($('input[name="valueDivisor"]').val(), 10); } if ($('input[name="useUnit"]').prop('checked')) { @@ -1467,7 +1467,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if (oldChartData == null) { diff = chartData.x - runtime.xmax; } else { - diff = parseInt(chartData.x - oldChartData.x); + diff = parseInt(chartData.x - oldChartData.x, 10); } runtime.xmin += diff; @@ -1786,8 +1786,8 @@ AJAX.registerOnload('server_status_monitor.js', function() { columnSums[query][0] += timeToSec(cells[2].replace(/(|<\/td>)/gi, '')); columnSums[query][1] += timeToSec(cells[3].replace(/(|<\/td>)/gi, '')); // rows_examind and rows_sent are just numbers - columnSums[query][2] += parseInt(cells[4].replace(/(|<\/td>)/gi, '')); - columnSums[query][3] += parseInt(cells[5].replace(/(|<\/td>)/gi, '')); + columnSums[query][2] += parseInt(cells[4].replace(/(|<\/td>)/gi, ''), 10); + columnSums[query][3] += parseInt(cells[5].replace(/(|<\/td>)/gi, ''), 10); }; // We just assume the sql text is always in the second last column, and that the total count is right of it @@ -1806,11 +1806,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { // Js does not specify a limit on property name length, // so we can abuse it as index :-) if (filteredQueries[q]) { - filteredQueries[q] += parseInt($t.next().text()); - totalSum += parseInt($t.next().text()); + filteredQueries[q] += parseInt($t.next().text(), 10); + totalSum += parseInt($t.next().text(), 10); hide = true; } else { - filteredQueries[q] = parseInt($t.next().text()); + filteredQueries[q] = parseInt($t.next().text(), 10); filteredQueriesLines[q] = i; $t.text(q); } @@ -1846,7 +1846,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if (hide) { $t.parent().css('display', 'none'); } else { - totalSum += parseInt($t.next().text()); + totalSum += parseInt($t.next().text(), ); rowSum++; odd_row = ! odd_row; diff --git a/js/server_status_queries.js b/js/server_status_queries.js index 3faeec4510..e17675711c 100644 --- a/js/server_status_queries.js +++ b/js/server_status_queries.js @@ -17,7 +17,7 @@ AJAX.registerOnload('server_status_queries.js', function() { var cdata = []; try { $.each(jQuery.parseJSON($('#serverstatusquerieschart_data').text()), function(key, value) { - cdata.push([key, parseInt(value)]); + cdata.push([key, parseInt(value, 10)]); }); $('#serverstatusquerieschart').data( 'queryPieChart', diff --git a/js/tbl_change.js b/js/tbl_change.js index 44ad1e76b3..e8fbd6d224 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -78,7 +78,7 @@ function daysInFebruary (year) //function to convert single digit to double digit function fractionReplace(num) { - num = parseInt(num); + num = parseInt(num, 10); return num >= 1 && num <= 9 ? '0' + num : '00'; } @@ -105,14 +105,14 @@ function isDate(val,tmstmp) pos=0; } if (dtexp.test(val)) { - var month=parseInt(val.substring(pos+3,pos+5)); - var day=parseInt(val.substring(pos+6,pos+8)); - var year=parseInt(val.substring(0,pos+2)); + var month=parseInt(val.substring(pos+3,pos+5), 10); + var day=parseInt(val.substring(pos+6,pos+8), 10); + var year=parseInt(val.substring(0,pos+2), 10); if (month == 2 && day > daysInFebruary(year)) { return false; } if (val.substring(0, pos + 2).length == 2) { - year = parseInt("20" + val.substring(0,pos+2)); + year = parseInt("20" + val.substring(0,pos+2), 10); } if (tmstmp === true) { if (year < 1978) { @@ -365,7 +365,7 @@ AJAX.registerOnload('tbl_change.js', function() { /** extract the [10] from {@link name_parts} */ var old_row_index_string = this_name.match(/\[\d+\]/)[0]; /** extract 10 - had to split into two steps to accomodate double digits */ - var old_row_index = parseInt(old_row_index_string.match(/\d+/)[0]); + var old_row_index = parseInt(old_row_index_string.match(/\d+/)[0], 10); /** calculate next index i.e. 11 */ new_row_index = old_row_index + 1; @@ -446,7 +446,7 @@ AJAX.registerOnload('tbl_change.js', function() { /** name of {@link $last_checkbox} */ var last_checkbox_name = $last_checkbox.attr('name'); /** index of {@link $last_checkbox} */ - var last_checkbox_index = parseInt(last_checkbox_name.match(/\d+/)); + var last_checkbox_index = parseInt(last_checkbox_name.match(/\d+/), 10); /** name of new {@link $last_checkbox} */ var new_name = last_checkbox_name.replace(/\d+/,last_checkbox_index+1); diff --git a/js/tbl_chart.js b/js/tbl_chart.js index de1099397c..70a6734999 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -46,7 +46,7 @@ AJAX.registerOnload('tbl_chart.js', function() { yaxisLabel : $('input[name="yaxis_label"]').val(), title : $('input[name="chartTitle"]').val(), stackSeries : false, - mainAxis : parseInt($('select[name="chartXAxis"]').val()), + mainAxis : parseInt($('select[name="chartXAxis"]').val(), 10), selectedSeries : getSelectedSeries() }; @@ -92,12 +92,12 @@ AJAX.registerOnload('tbl_chart.js', function() { var dateTimeCols = []; var vals = $('input[name="dateTimeCols"]').val().split(' '); $.each(vals, function(i, v) { - dateTimeCols.push(parseInt(v)); + dateTimeCols.push(parseInt(v, 10)); }); // handle changing the x-axis $('select[name="chartXAxis"]').change(function() { - currentSettings.mainAxis = parseInt($(this).val()); + currentSettings.mainAxis = parseInt($(this).val(), 10); if (dateTimeCols.indexOf(currentSettings.mainAxis) != -1) { $('span.span_timeline').show(); } else { @@ -214,7 +214,7 @@ function getSelectedSeries() { var val = $('select[name="chartSeries"]').val() || []; var ret = []; $.each(val, function(i, v) { - ret.push(parseInt(v)); + ret.push(parseInt(v, 10)); }); return ret; } diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 4eb56968c9..22ffe77634 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -158,7 +158,7 @@ AJAX.registerOnload('tbl_structure.js', function() { toggleRowColors($curr_row.next()); // Adjust the row numbers for (var $row = $curr_row.next(); $row.length > 0; $row = $row.next()) { - var new_val = parseInt($row.find('td:nth-child(2)').text()) - 1; + var new_val = parseInt($row.find('td:nth-child(2)').text(), 10) - 1; $row.find('td:nth-child(2)').text(new_val); } $after_field_item.remove(); From cc2c8692c38399027516e6dfe1708ab1f6082933 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:12:34 +0200 Subject: [PATCH 030/218] Do not use vars out of scope --- js/functions.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/functions.js b/js/functions.js index 4f52c5f2c9..193582471e 100644 --- a/js/functions.js +++ b/js/functions.js @@ -869,17 +869,15 @@ function refreshLayout() { var $elm = $('#pdflayout'); var orientation = $('#orientation_opt').val(); + var paper = 'A4'; if ($('#paper_opt').length==1) { - var paper = $('#paper_opt').val(); - }else{ - var paper = 'A4'; + paper = $('#paper_opt').val(); } + var posa = 'y'; + var posb = 'x'; if (orientation == 'P') { - var posa = 'x'; - var posb = 'y'; - } else { - var posa = 'y'; - var posb = 'x'; + posa = 'x'; + posb = 'y'; } $elm.css('width', pdfPaperSize(paper, posa) + 'px'); $elm.css('height', pdfPaperSize(paper, posb) + 'px'); From cc7bef87d5fc7b079b755af1442bc027591cb3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:13:04 +0200 Subject: [PATCH 031/218] Some forgotten === conversion --- js/chart.js | 10 +++++----- js/config.js | 4 ++-- js/functions.js | 10 +++++----- js/server_status_monitor.js | 30 +++++++++++++++--------------- js/server_status_variables.js | 2 +- js/tbl_select.js | 6 +++--- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/js/chart.js b/js/chart.js index 971d57a4c3..72d1a33234 100644 --- a/js/chart.js +++ b/js/chart.js @@ -228,12 +228,12 @@ JQPlotChart.prototype.draw = function(data, options) { } }; JQPlotChart.prototype.destroy = function() { - if (this.plot != null) { + if (this.plot !== null) { this.plot.destroy(); } }; JQPlotChart.prototype.redraw = function(options) { - if (this.plot != null) { + if (this.plot !== null) { this.plot.replot(options); } }; @@ -298,7 +298,7 @@ JQPlotLineChart.prototype.prepareData = function(dataTable) { row = data[i]; for ( var j = 1; j < row.length; j++) { retRow = retData[j - 1]; - if (retRow == null) { + if (retRow === null) { retRow = []; retData[j - 1] = retRow; } @@ -378,11 +378,11 @@ JQPlotTimelineChart.prototype.prepareData = function(dataTable) { d = row[0]; for ( var j = 1; j < row.length; j++) { retRow = retData[j - 1]; - if (retRow == null) { + if (retRow === null) { retRow = []; retData[j - 1] = retRow; } - if (d != null) { + if (d !== null) { retRow.push([d.getTime(), row[j]]); } } diff --git a/js/config.js b/js/config.js index 26aea4874b..9d24473921 100644 --- a/js/config.js +++ b/js/config.js @@ -245,7 +245,7 @@ var validators = { } // convert PCRE regexp var parts = regexp.match(validators._regexp_pcre_extract); - var valid = this.value.match(new RegExp(parts[2], parts[3])) != null; + var valid = this.value.match(new RegExp(parts[2], parts[3])) !== null; return valid ? true : PMA_messages['error_invalid_value']; }, /** @@ -411,7 +411,7 @@ function validate_field(field, isKeyUp, errors) errors[field_id] = []; var functions = getFieldValidators(field_id, isKeyUp); for (var i = 0; i < functions.length; i++) { - var args = functions[i][1] != null + var args = functions[i][1] !== null ? functions[i][1].slice(0) : []; args.unshift(isKeyUp); diff --git a/js/functions.js b/js/functions.js index 193582471e..48c1848d36 100644 --- a/js/functions.js +++ b/js/functions.js @@ -392,7 +392,7 @@ function checkSqlQuery(theForm) return true; } if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined' && - (theForm.elements['id_bookmark'].value != null || theForm.elements['id_bookmark'].value !== '') && + (theForm.elements['id_bookmark'].value !== null || theForm.elements['id_bookmark'].value !== '') && theForm.elements['id_bookmark'].selectedIndex !== 0 ) { return true; @@ -515,7 +515,7 @@ function checkTableEditForm(theForm, fieldsCnt) elm2 = $("#field_" + i + "_3"); val = parseInt(elm2.val(), 10); elm3 = $("#field_" + i + "_1"); - if (isNaN(val) && elm3.val() != "") { + if (isNaN(val) && elm3.val() !== "") { elm2.select(); alert(PMA_messages['strNotNumber']); elm2.focus(); @@ -538,7 +538,7 @@ function checkTableEditForm(theForm, fieldsCnt) } // at least this section is under jQuery - if ($("input.textfield[name='table']").val() == "") { + if ($("input.textfield[name='table']").val() === "") { alert(PMA_messages['strFormEmpty']); $("input.textfield[name='table']").focus(); return false; @@ -1770,7 +1770,7 @@ function PMA_SQLPrettyPrint(string) while (! stream.eol()) { stream.start = stream.pos; token = mode.token(stream, state); - if (token != null) { + if (token !== null) { tokens.push([token, stream.current().toLowerCase()]); } } @@ -3455,7 +3455,7 @@ AJAX.registerTeardown('functions.js', function() { */ (function ($) { $.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas - var prevent = (p == null) ? true : p; + var prevent = (p === null) ? true : p; if (prevent) { return this.each(function () { if ($.browser.msie || $.browser.safari) { diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index cc0bfef1c3..379c4e0a5e 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -960,7 +960,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; } - if (newChart == null) { + if (newChart === null) { $('#seriesPreview').html(''); newChart = { @@ -1027,9 +1027,9 @@ AJAX.registerOnload('server_status_monitor.js', function() { monitorSettings = $.parseJSON(window.localStorage['monitorSettings']); } - $('a[href="#clearMonitorConfig"]').toggle(runtime.charts != null); + $('a[href="#clearMonitorConfig"]').toggle(runtime.charts !== null); - if (runtime.charts != null && monitorProtocolVersion != window.localStorage['monitorVersion']) { + if (runtime.charts !== null && monitorProtocolVersion != window.localStorage['monitorVersion']) { $('#emptyDialog').dialog({title: PMA_messages['strIncompatibleMonitorConfig']}); $('#emptyDialog').html(PMA_messages['strIncompatibleMonitorConfigDescription']); @@ -1043,10 +1043,10 @@ AJAX.registerOnload('server_status_monitor.js', function() { } } - if (runtime.charts == null) { + if (runtime.charts === null) { runtime.charts = defaultChartGrid; } - if (monitorSettings == null) { + if (monitorSettings === null) { monitorSettings = defaultMonitorSettings; } @@ -1331,7 +1331,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } }); - if (chart == null) { + if (chart === null) { return; } @@ -1464,7 +1464,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { for (var j = 0; j < elem.nodes.length; j++) { // Update x-axis if (i === 0 && j === 0) { - if (oldChartData == null) { + if (oldChartData === null) { diff = chartData.x - runtime.xmax; } else { diff = parseInt(chartData.x - oldChartData.x, 10); @@ -1483,7 +1483,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { elem.nodes[j].transformFn, chartData[key][j], // Check if first iteration (oldChartData==null), or if newly added chart oldChartData[key]==null - (oldChartData == null || oldChartData[key] == null ? null : oldChartData[key][j]) + (oldChartData === null || oldChartData[key] === null ? null : oldChartData[key][j]) ); // Otherwise use original value and apply differential and divisor if given, @@ -1492,7 +1492,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { value = parseFloat(chartData[key][j][0].value); if (elem.nodes[j].display == 'differential') { - if (oldChartData == null || oldChartData[key] == null) { + if (oldChartData === null || oldChartData[key] === null) { continue; } value -= oldChartData[key][j][0].value; @@ -1576,7 +1576,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { function chartValueTransform(name, cur, prev) { switch(name) { case 'cpu-linux': - if (prev == null) { + if (prev === null) { return undefined; } // cur and prev are datapoint arrays, but containing @@ -1590,7 +1590,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // Query cache efficiency (%) case 'qce': - if (prev == null) { + if (prev === null) { return undefined; } // cur[0].value is Qcache_hits, cur[1].value is Com_select @@ -1651,7 +1651,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var dlgBtns = {}; dlgBtns[PMA_messages['strCancelRequest']] = function() { - if (logRequest != null) { + if (logRequest !== null) { logRequest.abort(); } @@ -1838,7 +1838,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // If not required to be hidden, do we need // to hide because of a not matching text filter? - if (! hide && (textFilter != null && ! textFilter.exec($t.text()))) { + if (! hide && (textFilter !== null && ! textFilter.exec($t.text()))) { hide = true; } @@ -2036,7 +2036,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { resizable: false, buttons: dlgBtns, close: function() { - if (profilingChart != null) { + if (profilingChart !== null) { profilingChart.destroy(); } $('#queryAnalyzerDialog div.placeHolder').html(''); @@ -2089,7 +2089,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { for (var i = 0, l = data.explain.length; i < l; i++) { explain += '
    0? 'style="display:none;"' : '' ) + '>'; $.each(data.explain[i], function(key, value) { - value = (value == null)?'null':value; + value = (value === null)?'null':value; if (key == 'type' && value.toLowerCase() == 'all') { value = '' + value + ''; diff --git a/js/server_status_variables.js b/js/server_status_variables.js index a029f6f8c6..48c08d220f 100644 --- a/js/server_status_variables.js +++ b/js/server_status_variables.js @@ -89,7 +89,7 @@ AJAX.registerOnload('server_status_variables.js', function() { odd_row = false; $('#serverstatusvariables th.name').each(function() { - if ((textFilter == null || textFilter.exec($(this).text())) + if ((textFilter === null || textFilter.exec($(this).text())) && (! alertFilter || $(this).next().find('span.attention').length>0) && (categoryFilter.length === 0 || $(this).parent().hasClass('s_' + categoryFilter)) ) { diff --git a/js/tbl_select.js b/js/tbl_select.js index 3b7c9005a4..5f82bb2a0c 100644 --- a/js/tbl_select.js +++ b/js/tbl_select.js @@ -85,7 +85,7 @@ AJAX.registerOnload('tbl_select.js', function() { continue; } - if (values['criteriaValues[' + a + ']'] === '' || values['criteriaValues[' + a + ']'] == null) { + if (values['criteriaValues[' + a + ']'] === '' || values['criteriaValues[' + a + ']'] === null) { delete values['criteriaValues[' + a + ']']; delete values['criteriaColumnOperators[' + a + ']']; delete values['criteriaColumnNames[' + a + ']']; @@ -94,7 +94,7 @@ AJAX.registerOnload('tbl_select.js', function() { } } // If all columns are selected, use a single parameter to indicate that - if (values['columnsToDisplay[]'] != null) { + if (values['columnsToDisplay[]'] !== null) { if (values['columnsToDisplay[]'].length == columnCount) { delete values['columnsToDisplay[]']; values['displayAllColumns'] = true; @@ -106,7 +106,7 @@ AJAX.registerOnload('tbl_select.js', function() { $.post($search_form.attr('action'), values, function(data) { PMA_ajaxRemoveMessage($msgbox); if (data.success === true) { - if (data.sql_query != null) { // zero rows + if (data.sql_query !== null) { // zero rows $("#sqlqueryresults").html(data.sql_query); } else { // results found $("#sqlqueryresults").html(data.message); From 6aa7eaabef36b98adc0be04f1ca9c13b4fe4bdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:17:41 +0200 Subject: [PATCH 032/218] Include pmd files in checking --- build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.xml b/build.xml index cc419ed6b5..712fa6db2b 100644 --- a/build.xml +++ b/build.xml @@ -4,7 +4,7 @@ - + From 83c2a074a5855e073889008ff9428099c92c4b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 12:19:33 +0200 Subject: [PATCH 033/218] JS fixes for PMD code - parseInt with radix - === and !== for type cast unsafe values --- js/pmd/ajax.js | 2 +- js/pmd/history.js | 16 ++++++------- js/pmd/move.js | 58 +++++++++++++++++++++++------------------------ 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/js/pmd/ajax.js b/js/pmd/ajax.js index 766c3dd060..f1e1ae5cf5 100644 --- a/js/pmd/ajax.js +++ b/js/pmd/ajax.js @@ -23,7 +23,7 @@ function makeRequest(url, parameters) function PrintXML(data) { var $root = $(data).find('root'); - if ($root.length == 0) { + if ($root.length === 0) { // error var myWin=window.open('','Report','width=400, height=250, resizable=1, scrollbars=1, status=1'); var tmp = myWin.document; diff --git a/js/pmd/history.js b/js/pmd/history.js index 310f0e590f..15e765422d 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -222,7 +222,7 @@ function history_edit(index) function edit(type) { if (type == "Rename") { - if (document.getElementById('e_rename').value != "") { + if (document.getElementById('e_rename').value !== "") { history_array[g_index].get_obj().setrename_to(document.getElementById('e_rename').value); document.getElementById('e_rename').value = ""; } @@ -479,7 +479,7 @@ function build_query(formtitle, fadin) var temp; for (var i = 0;i < select_field.length; i++) { temp = check_aggregate(select_field[i]); - if (temp != "") { + if (temp !== "") { q_select += temp; temp = check_rename(select_field[i]); q_select += temp + ","; @@ -490,13 +490,13 @@ function build_query(formtitle, fadin) } q_select = q_select.substring(0,q_select.length - 1); q_select += " FROM " + query_from(); - if (query_where() != "") { + if (query_where() !== "") { q_select +="\n WHERE"; q_select += query_where(); } - if (query_groupby() != "") { q_select += "\nGROUP BY " + query_groupby(); } - if (query_having() != "") { q_select += "\nHAVING " + query_having(); } - if (query_orderby() != "") { q_select += "\nORDER BY " + query_orderby(); } + if (query_groupby() !== "") { q_select += "\nGROUP BY " + query_groupby(); } + if (query_having() !== "") { q_select += "\nHAVING " + query_having(); } + if (query_orderby() !== "") { q_select += "\nORDER BY " + query_orderby(); } var box = document.getElementById('box'); document.getElementById('filter').style.display='block'; var btitle = document.getElementById('boxtitle'); @@ -708,7 +708,7 @@ function query_where() var or = "("; for (i = 0; i < history_array.length;i++) { if (history_array[i].get_type() == "Where") { - if (history_array[i].get_and_or() == 0) { + if (history_array[i].get_and_or() === 0) { and += "( " + history_array[i].get_column_name() + " " + history_array[i].get_obj().getrelation_operator() +" " + history_array[i].get_obj().getquery() + ")"; and += " AND "; } else { or +="( " + history_array[i].get_column_name() + " " + history_array[i].get_obj().getrelation_operator() + " " + history_array[i].get_obj().getquery() +")"; @@ -726,7 +726,7 @@ function query_where() } else { and = "" ; } - if (or != "" ) { + if (or !== "" ) { and = and + " OR " + or + " )"; } return and; diff --git a/js/pmd/move.js b/js/pmd/move.js index eed06f84aa..ef52e91bba 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -43,7 +43,7 @@ FIXME: we can't register the beforeonload event because it will persist between AJAX.registerOnload('pmd/move.js', function(){ $(window).bind('beforeunload', function() { // onbeforeunload for the frame window. - if (_change == 1 && _staying == 0) { + if (_change == 1 && _staying === 0) { return PMA_messages['strLeavingDesigner']; } else if (_change == 1 && _staying == 1) { _staying = 0; @@ -53,7 +53,7 @@ AJAX.registerOnload('pmd/move.js', function(){ _change = 0; }); window.top.onbeforeunload = function() { // onbeforeunload for the browser main window. - if (_change == 1 && _staying == 0) { + if (_change == 1 && _staying === 0) { _staying = 1; // Helps if the user stays on the page as there setTimeout('make_zero();', 100); // is no other way of knowing whether the user stayed or not. return PMA_messages['strLeavingDesigner']; @@ -119,16 +119,16 @@ if (isIE) { function MouseDown(e) { var offsetx, offsety; - if (cur_click != null) { + if (cur_click !== null) { offsetx = isIE ? event.clientX + document.body.scrollLeft : e.pageX; offsety = isIE ? event.clientY + document.body.scrollTop : e.pageY; - dx = offsetx - parseInt(cur_click.style.left); - dy = offsety - parseInt(cur_click.style.top); + dx = offsetx - parseInt(cur_click.style.left, 10); + dy = offsety - parseInt(cur_click.style.top, 10); //alert(" dx = " + dx + " dy = " +dy); document.getElementById("canvas").style.display = 'none'; /* - var left = parseInt(cur_click.style.left); - var top = parseInt(cur_click.style.top); + var left = parseInt(cur_click.style.left, 10); + var top = parseInt(cur_click.style.top, 10); dx = e.pageX - left; dy = e.pageY - top; @@ -138,7 +138,7 @@ function MouseDown(e) } if (layer_menu_cur_click) { offsetx = e.pageX; - dx = offsetx - parseInt(document.getElementById("layer_menu").style.width); + dx = offsetx - parseInt(document.getElementById("layer_menu").style.width, 10); } } @@ -154,7 +154,7 @@ function MouseMove(e) //window.status = "X = "+ Glob_X + " Y = "+ Glob_Y; - if (cur_click != null) { + if (cur_click !== null) { _change = 1; var mGx = Glob_X - dx; var mGy = Glob_Y - dy; @@ -184,7 +184,7 @@ function MouseMove(e) function MouseUp(e) { - if (cur_click != null) { + if (cur_click !== null) { document.getElementById("canvas").style.display = 'inline-block'; Re_load(); cur_click.style.zIndex = 1; @@ -216,8 +216,8 @@ function Canvas_pos() function Osn_tab_pos() { - osn_tab_width = parseInt(document.getElementById('osn_tab').style.width); - osn_tab_height = parseInt(document.getElementById('osn_tab').style.height); + osn_tab_width = parseInt(document.getElementById('osn_tab').style.width, 10); + osn_tab_height = parseInt(document.getElementById('osn_tab').style.height, 10); } @@ -246,8 +246,8 @@ function Rezize_osn_tab() var max_X = 0; var max_Y = 0; for (var key in j_tabs) { - var k_x = parseInt(document.getElementById(key).style.left) + document.getElementById(key).offsetWidth; - var k_y = parseInt(document.getElementById(key).style.top) + document.getElementById(key).offsetHeight; + var k_x = parseInt(document.getElementById(key).style.left, 10) + document.getElementById(key).offsetWidth; + var k_y = parseInt(document.getElementById(key).style.top, 10) + document.getElementById(key).offsetHeight; max_X = max_X < k_x ? k_x : max_X; max_Y = max_Y < k_y ? k_y : max_Y; } @@ -320,7 +320,7 @@ function Re_load() x2 = x2_right + sm_s; s_right = 1; } - if (n == 0) { + if (n === 0) { x1 = x1_left - sm_s; x2 = x2_left - sm_s; s_left = 1; @@ -492,7 +492,7 @@ function Rect(x1, y1, w, h, color) //--------------------------- FULLSCREEN ------------------------------------- function Enter_fullscreen() { - if (! $.FullScreen.isFullScreen()) { + if (! $.FullScreen.isFullScreen()) { $('#enterFullscreen').hide(); $('#exitFullscreen').show(); $('#page_content') @@ -513,8 +513,8 @@ function Exit_fullscreen() function Save(url) // (del?) no for pdf { for (var key in j_tabs) { - document.getElementById('t_x_' + key + '_').value = parseInt(document.getElementById(key).style.left); - document.getElementById('t_y_' + key + '_').value = parseInt(document.getElementById(key).style.top); + document.getElementById('t_x_' + key + '_').value = parseInt(document.getElementById(key).style.left, 10); + document.getElementById('t_y_' + key + '_').value = parseInt(document.getElementById(key).style.top, 10); document.getElementById('t_v_' + key + '_').value = document.getElementById('id_tbody_' + key).style.display == 'none' ? 0 : 1; document.getElementById('t_h_' + key + '_').value = document.getElementById('check_vis_' + key).checked ? 1 : 0; } @@ -526,8 +526,8 @@ function Get_url_pos() { var poststr = ''; for (var key in j_tabs) { - poststr += '&t_x[' + key + ']=' + parseInt(document.getElementById(key).style.left); - poststr += '&t_y[' + key + ']=' + parseInt(document.getElementById(key).style.top); + poststr += '&t_x[' + key + ']=' + parseInt(document.getElementById(key).style.left, 10); + poststr += '&t_y[' + key + ']=' + parseInt(document.getElementById(key).style.top, 10); poststr += '&t_v[' + key + ']=' + (document.getElementById('id_tbody_' + key).style.display == 'none' ? 0 : 1); poststr += '&t_h[' + key + ']=' + (document.getElementById('check_vis_' + key).checked ? 1 : 0); } @@ -743,7 +743,7 @@ function Select_tab(t) } //---------- var id_t = document.getElementById(t); - window.scrollTo(parseInt(id_t.style.left) - 300, parseInt(id_t.style.top) - 300); + window.scrollTo(parseInt(id_t.style.left, 10) - 300, parseInt(id_t.style.top, 10) - 300); setTimeout(function(){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800); } //------------------------------------------------------------------------------ @@ -800,7 +800,7 @@ function Canvas_click(id) x2 = x2_right + sm_s; s_right = 1; } - if (n == 0) { + if (n === 0) { x1 = x1_left - sm_s; x2 = x2_left - sm_s; s_left = 1; @@ -1115,7 +1115,7 @@ function Select_all(id_this,owner) var tab = []; for (i = 0; i < parent.elements.length; i++) { if (parent.elements[i].type == "checkbox" && parent.elements[i].id.substring(0,(9 + id_this.length)) == 'select_' + id_this + '._') { - if(document.getElementById('select_all_' + id_this).checked == true) { + if(document.getElementById('select_all_' + id_this).checked === true) { parent.elements[i].checked = true; parent.elements[i].disabled = true; var temp = '`' + id_this.substring(owner.length +1) + '`.*'; @@ -1126,7 +1126,7 @@ function Select_all(id_this,owner) } } } - if (document.getElementById('select_all_' + id_this).checked == true) { + if (document.getElementById('select_all_' + id_this).checked === true) { select_field.push('`' + id_this.substring(owner.length +1) + '`.*'); tab = id_this.split("."); from_array.push(tab[1]); @@ -1171,7 +1171,7 @@ function store_column(id_this,owner,col) { var i; var k; - if (document.getElementById('select_' + owner + '.' + id_this + '._' + col).checked == true) { + if (document.getElementById('select_' + owner + '.' + id_this + '._' + col).checked === true) { select_field.push('`' + id_this + '`.`' + col +'`'); from_array.push(id_this); } @@ -1204,7 +1204,7 @@ function add_object() var sum = 0; var init = history_array.length; if (rel.value != '--') { - if (document.getElementById('Query').value == "") { + if (document.getElementById('Query').value === "") { document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; document.getElementById('pmd_hint').style.display = 'block'; return; @@ -1229,14 +1229,14 @@ function add_object() document.getElementById('operator').value = '---'; //make aggregate operator } - if (document.getElementById('groupby').checked == true ) { + if (document.getElementById('groupby').checked === true ) { history_array.push(new history(col_name,'GroupBy',tab_name,h_tabs[downer + '.' +tab_name],"GroupBy")); sum = sum + 1; document.getElementById('groupby').checked = false; //make groupby } if (document.getElementById('h_rel_opt').value != '--') { - if (document.getElementById('having').value == "") { + if (document.getElementById('having').value === "") { document.getElementById('pmd_hint').innerHTML = "value/subQuery is empty" ; document.getElementById('pmd_hint').style.display = 'block'; return; @@ -1249,7 +1249,7 @@ function add_object() document.getElementById('h_operator').value = '---'; p.value = ""; //make having } - if (document.getElementById('orderby').checked == true) { + if (document.getElementById('orderby').checked === true) { history_array.push(new history(col_name,'OrderBy',tab_name,h_tabs[downer + '.' + tab_name],"OrderBy")); sum = sum + 1; document.getElementById('orderby').checked = false; From e6517db98a0a03a0430ccca8d23afbeb7d30a0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 13:16:01 +0200 Subject: [PATCH 034/218] More javascript cleanup, more fixes of === / !=== --- js/config.js | 8 +++---- js/date.js | 30 ++++++++++++------------ js/db_operations.js | 2 +- js/functions.js | 16 ++++++------- js/makegrid.js | 46 ++++++++++++++++++------------------- js/navigation.js | 32 +++++++++++++------------- js/pmd/history.js | 4 ++-- js/pmd/move.js | 4 ++-- js/server_privileges.js | 44 +++++++++++++++++------------------ js/server_status_monitor.js | 4 ++-- js/sql.js | 6 ++--- js/tbl_chart.js | 6 ++--- js/tbl_gis_visualization.js | 2 +- js/tbl_relation.js | 2 +- js/tbl_structure.js | 2 +- js/tbl_zoom_plot_jqplot.js | 16 ++++++------- 16 files changed, 112 insertions(+), 112 deletions(-) diff --git a/js/config.js b/js/config.js index 9d24473921..50d0f99379 100644 --- a/js/config.js +++ b/js/config.js @@ -62,16 +62,16 @@ function setFieldValue(field, field_type, value) switch (field_type) { case 'text': //TODO: replace to .val() - field.attr('value', (value != undefined ? value : field.attr('defaultValue'))); + field.attr('value', (value !== undefined ? value : field.attr('defaultValue'))); break; case 'checkbox': //TODO: replace to .prop() - field.attr('checked', (value != undefined ? value : field.attr('defaultChecked'))); + field.attr('checked', (value !== undefined ? value : field.attr('defaultChecked'))); break; case 'select': var options = field.prop('options'); var i, imax = options.length; - if (value == undefined) { + if (value === undefined) { for (i = 0; i < imax; i++) { options[i].selected = options[i].defaultSelected; } @@ -598,7 +598,7 @@ AJAX.registerOnload('config.js', function() { function restoreField(field_id) { var field = $('#'+field_id); - if (field.length === 0 || defaultValues[field_id] == undefined) { + if (field.length === 0 || defaultValues[field_id] === undefined) { return; } setFieldValue(field, getFieldType(field), defaultValues[field_id]); diff --git a/js/date.js b/js/date.js index 47253a0b11..fe86d1a312 100644 --- a/js/date.js +++ b/js/date.js @@ -69,7 +69,7 @@ function LZ(x) {return(x<0||x>9?"":"0")+x} // ------------------------------------------------------------------ function isDate(val,format) { var date=getDateFromFormat(val,format); - if (date==0) { return false; } + if (date === 0) { return false; } return true; } @@ -84,7 +84,7 @@ function isDate(val,format) { function compareDates(date1,dateformat1,date2,dateformat2) { var d1=getDateFromFormat(date1,dateformat1); var d2=getDateFromFormat(date2,dateformat2); - if (d1==0 || d2==0) { + if (d1 === 0 || d2 === 0) { return -1; } else if (d1 > d2) { @@ -128,7 +128,7 @@ function formatDate(date,format) { value["EE"]=DAY_NAMES[E]; value["H"]=H; value["HH"]=LZ(H); - if (H==0){value["h"]=12;} + if (H === 0){value["h"]=12;} else if (H>12){value["h"]=H-12;} else {value["h"]=H;} value["hh"]=LZ(value["h"]); @@ -148,7 +148,7 @@ function formatDate(date,format) { while ((format.charAt(i_format)==c) && (i_format < format.length)) { token += format.charAt(i_format++); } - if (value[token] != null) { result=result + value[token]; } + if (value[token] !== null) { result=result + value[token]; } else { result=result + token; } } return result; @@ -211,7 +211,7 @@ function getDateFromFormat(val,format) { if (token=="yy") { x=2;y=2; } if (token=="y") { x=2;y=4; } year=_getInt(val,i_val,x,y); - if (year==null) { return 0; } + if (year === null) { return 0; } i_val += year.length; if (year.length==2) { if (year > 70) { year=1900+(year-0); } @@ -244,35 +244,35 @@ function getDateFromFormat(val,format) { } else if (token=="MM"||token=="M") { month=_getInt(val,i_val,token.length,2); - if (month==null||(month<1)||(month>12)){return 0;} + if (month === null||(month<1)||(month>12)){return 0;} i_val+=month.length;} else if (token=="dd"||token=="d") { date=_getInt(val,i_val,token.length,2); - if (date==null||(date<1)||(date>31)){return 0;} + if (date === null||(date<1)||(date>31)){return 0;} i_val+=date.length;} else if (token=="hh"||token=="h") { hh=_getInt(val,i_val,token.length,2); - if (hh==null||(hh<1)||(hh>12)){return 0;} + if (hh === null||(hh<1)||(hh>12)){return 0;} i_val+=hh.length;} else if (token=="HH"||token=="H") { hh=_getInt(val,i_val,token.length,2); - if (hh==null||(hh<0)||(hh>23)){return 0;} + if (hh === null||(hh<0)||(hh>23)){return 0;} i_val+=hh.length;} else if (token=="KK"||token=="K") { hh=_getInt(val,i_val,token.length,2); - if (hh==null||(hh<0)||(hh>11)){return 0;} + if (hh === null||(hh<0)||(hh>11)){return 0;} i_val+=hh.length;} else if (token=="kk"||token=="k") { hh=_getInt(val,i_val,token.length,2); - if (hh==null||(hh<1)||(hh>24)){return 0;} + if (hh === null||(hh<1)||(hh>24)){return 0;} i_val+=hh.length;hh--;} else if (token=="mm"||token=="m") { mm=_getInt(val,i_val,token.length,2); - if (mm==null||(mm<0)||(mm>59)){return 0;} + if (mm === null||(mm<0)||(mm>59)){return 0;} i_val+=mm.length;} else if (token=="ss"||token=="s") { ss=_getInt(val,i_val,token.length,2); - if (ss==null||(ss<0)||(ss>59)){return 0;} + if (ss === null||(ss<0)||(ss>59)){return 0;} i_val+=ss.length;} else if (token=="a") { if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";} @@ -289,7 +289,7 @@ function getDateFromFormat(val,format) { // Is date valid for month? if (month==2) { // Check for leap year - if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year + if ( ( (year%4 === 0)&&(year%100 !== 0) ) || (year%400 === 0) ) { // leap year if (date > 29){ return 0; } } else { if (date > 28) { return 0; } } @@ -328,7 +328,7 @@ function parseDate(val) { var l=window[checkList[i]]; for (var j=0; j
    ").prependTo("#page_content"); $("#sqlqueryresults").html(data.sql_query); @@ -2841,7 +2841,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure) }; var $msgbox = PMA_ajaxShowMessage(); $.get("tbl_indexes.php", url, function(data) { - if (data.success == false) { + if (data.success === false) { //in the case of an error, show the error message returned. PMA_ajaxShowMessage(data.error, false); } else { @@ -2901,7 +2901,7 @@ function indexEditorDialog(url, title, callback_success, callback_failure) **/ function PMA_showHints($div) { - if ($div == undefined || ! $div instanceof jQuery || $div.length === 0) { + if ($div === undefined || ! $div instanceof jQuery || $div.length === 0) { $div = $("body"); } $div.find('.pma_hint').each(function () { @@ -3276,11 +3276,11 @@ AJAX.registerTeardown('functions.js', function() { */ function PMA_slidingMessage(msg, $obj) { - if (msg == undefined || msg.length === 0) { + if (msg === undefined || msg.length === 0) { // Don't show an empty message return false; } - if ($obj == undefined || ! $obj instanceof jQuery || $obj.length === 0) { + if ($obj === undefined || ! $obj instanceof jQuery || $obj.length === 0) { // If the second argument was not supplied, // we might have to create a new DOM node. if ($('#PMA_slidingMessage').length === 0) { diff --git a/js/makegrid.js b/js/makegrid.js index c6237886a3..60b0fef045 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -361,7 +361,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * Send column preferences (column order and visibility) to the server. */ sendColPrefs: function() { - if ($(g.t).is('.ajax')) { // only send preferences if ajax class + if ($(g.t).is('.ajax')) { // only send preferences if ajax class var post_params = { ajax_request: true, db: g.db, @@ -378,7 +378,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $.extend(post_params, {col_visib: g.colVisib.toString()}); } $.post('sql.php', post_params, function(data) { - if (data.success != true) { + if (data.success !== true) { var $temp_div = $(document.createElement('div')); $temp_div.html(data.error); $temp_div.addClass("error"); @@ -604,7 +604,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } // cancel any previous request - if (g.lastXHR != null) { + if (g.lastXHR !== null) { g.lastXHR.abort(); g.lastXHR = null; } @@ -613,7 +613,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (g.currentEditCell) { // save value of currently edited cell // replace current edited field with the new value var $this_field = $(g.currentEditCell); - var is_null = $this_field.data('value') == null; + var is_null = $this_field.data('value') === null; if (is_null) { $this_field.find('span').html('NULL'); $this_field.addClass('null'); @@ -630,13 +630,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $this_field.find('span').text(new_html); } } - if (data.transformations != undefined) { + if (data.transformations !== undefined) { $.each(data.transformations, function(cell_index, value) { var $this_field = $(g.t).find('.to_be_saved:eq(' + cell_index + ')'); $this_field.find('span').html(value); }); } - if (data.relations != undefined) { + if (data.relations !== undefined) { $.each(data.relations, function(cell_index, value) { var $this_field = $(g.t).find('.to_be_saved:eq(' + cell_index + ')'); $this_field.find('span').html(value); @@ -931,7 +931,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }, function(data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); - if (data.success == true) { + if (data.success === true) { if ($td.is('.truncated')) { // get the truncated data length g.maxTruncatedLen = $(g.currentEditCell).text().length - 3; @@ -983,13 +983,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // force to restore modified $input_field value after adding datepicker // (after adding a datepicker, the input field doesn't display the time anymore, only the date) - if (is_null - || current_datetime_value == '0000-00-00' + if (is_null + || current_datetime_value == '0000-00-00' || current_datetime_value == '0000-00-00 00:00:00' ) { $input_field.val(current_datetime_value); } else { - $editArea.datetimepicker('setDate', current_datetime_value); + $editArea.datetimepicker('setDate', current_datetime_value); } $editArea.append('
    ' + g.cellEditHint + '
    '); @@ -1210,9 +1210,9 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $('div.save_edited').removeClass('saving_edited_data') .find('input').removeProp('disabled'); // enable the save button back } - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); - + // update where_clause related data in each edited row $('td.to_be_saved').parents('tr').each(function() { var new_clause = $(this).data('new_clause'); @@ -1589,7 +1589,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi function startGridEditing(e, cell) { if (g.isCellEditActive) { - g.saveOrPostEditedCell(); + g.saveOrPostEditedCell(); } else { g.showEditCell(cell); } @@ -1627,17 +1627,17 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $(t).find('td.data.click2') .click(function(e) { $cell = $(this); - // In the case of relational link, We want single click on the link + // In the case of relational link, We want single click on the link // to goto the link and double click to start grid-editing. var $link = $(e.target); if ($link.is('.grid_edit.relation a')) { e.preventDefault(); // get the click count and increase var clicks = $cell.data('clicks'); - clicks = (clicks == null) ? 1 : clicks + 1; + clicks = (clicks === null) ? 1 : clicks + 1; if (clicks == 1) { - // if there are no previous clicks, + // if there are no previous clicks, // start the single click timer timer = setTimeout(function() { // temporarily remove ajax class so the page loader will not handle it, @@ -1709,7 +1709,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $(g.gDiv).append(g.cEdit); // add hint for grid editing feature when hovering "Edit" link in each table row - if (PMA_messages['strGridEditFeatureHint'] != undefined) { + if (PMA_messages['strGridEditFeatureHint'] !== undefined) { PMA_tooltip( $(g.t).find('.edit_row_anchor a'), 'a', @@ -1773,10 +1773,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $(g.gDiv).append(t); // FEATURES - enableResize = enableResize == undefined ? true : enableResize; - enableReorder = enableReorder == undefined ? true : enableReorder; - enableVisib = enableVisib == undefined ? true : enableVisib; - enableGridEdit = enableGridEdit == undefined ? true : enableGridEdit; + enableResize = enableResize === undefined ? true : enableResize; + enableReorder = enableReorder === undefined ? true : enableReorder; + enableVisib = enableVisib === undefined ? true : enableVisib; + enableGridEdit = enableGridEdit === undefined ? true : enableGridEdit; if (enableResize) { g.initColResize(); } @@ -1807,13 +1807,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi g.showSortHint = true; $(t).find("th.draggable").tooltip("option", { content: g.updateHint() - }); + }); }) .mouseleave(function(e) { g.showSortHint = false; $(t).find("th.draggable").tooltip("option", { content: g.updateHint() - }); + }); }); // register events for dragging-related feature diff --git a/js/navigation.js b/js/navigation.js index 256fd12695..4e4f68bf97 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -114,7 +114,7 @@ $(function() { $('#pma_navigation_tree.highlight li:not(.fast_filter)').live( 'mouseover', function () { - if ($('li:visible', this).length == 0) { + if ($('li:visible', this).length === 0) { $(this).addClass('activePointer'); } } @@ -130,7 +130,7 @@ $(function() { * Jump to recent table */ $('#recentTable').live('change', function() { - if (this.value != '') { + if (this.value !== '') { var arr = jQuery.parseJSON(this.value); var $form = $(this).closest('form'); $form.find('input[name=db]').val(arr['db']); @@ -210,7 +210,7 @@ $(function() { /** * Reloads the whole navigation tree while preserving its state * - * @param function the callback function + * @param function the callback function * @return void */ function PMA_reloadNavigation(callback) { @@ -227,7 +227,7 @@ function PMA_reloadNavigation(callback) { var count = 0; $('#pma_navigation_tree').find('a.expander:visible').each(function () { if ($(this).find('img').is('.ic_b_minus') - && $(this).closest('li').find('div.list_container .ic_b_minus').length == 0 + && $(this).closest('li').find('div.list_container .ic_b_minus').length === 0 ) { params['n' + count + '_aPath'] = $(this).find('span.aPath').text(); params['n' + count + '_vPath'] = $(this).find('span.vPath').text(); @@ -424,13 +424,13 @@ var ResizeHandler = function () { */ this.getSymbol = function (width) { if (this.left == 'left') { - if (width == 0) { + if (width === 0) { return '→'; } else { return '←'; } } else { - if (width == 0) { + if (width === 0) { return '←'; } else { return '→'; @@ -559,8 +559,8 @@ var PMA_fastFilter = { this.timeout = null; var $filterInput = $this.find('li.fast_filter input.searchClause'); - if ( $filterInput.length != 0 - && $filterInput.val() != '' + if ( $filterInput.length !== 0 + && $filterInput.val() !== '' && $filterInput.val() != $filterInput[0].defaultValue ) { this.request(); @@ -590,7 +590,7 @@ var PMA_fastFilter = { var $filterContainer = $this.closest('div.list_container'); var $filterInput = $([]); while (1) { - if ($filterContainer.find('li.fast_filter:not(.db_fast_filter) input.searchClause').length != 0) { + if ($filterContainer.find('li.fast_filter:not(.db_fast_filter) input.searchClause').length !== 0) { $filterInput = $filterContainer.find('li.fast_filter:not(.db_fast_filter) input.searchClause'); break; } else if (! $filterContainer.is('div.list_container')) { @@ -601,7 +601,7 @@ var PMA_fastFilter = { .closest('div.list_container'); } var searchClause2 = ''; - if ($filterInput.length != 0 + if ($filterInput.length !== 0 && $filterInput.first().val() != $filterInput[0].defaultValue ) { searchClause2 = $filterInput.val(); @@ -628,7 +628,7 @@ var PMA_fastFilter = { } }, blur: function (event) { - if ($(this).val() == '') { + if ($(this).val() === '') { $(this).val(this.defaultValue); } var $obj = $(this).closest('div.list_container'); @@ -639,7 +639,7 @@ var PMA_fastFilter = { keyup: function (event) { var $obj = $(this).closest('div.list_container'); var str = ''; - if ($(this).val() != this.defaultValue && $(this).val() != '') { + if ($(this).val() != this.defaultValue && $(this).val() !== '') { $obj.find('div.pageselector').hide(); str = $(this).val().toLowerCase(); } @@ -657,13 +657,13 @@ var PMA_fastFilter = { container_filter($group); // recursive } $group.parent().show().removeClass('hidden'); - if ($group.children().not('.hidden').length == 0) { + if ($group.children().not('.hidden').length === 0) { $group.parent().hide().addClass('hidden'); } }); }; container_filter($obj, str); - if ($(this).val() != this.defaultValue && $(this).val() != '') { + if ($(this).val() != this.defaultValue && $(this).val() !== '') { if (! $obj.data('fastFilter')) { $obj.data( 'fastFilter', @@ -713,7 +713,7 @@ PMA_fastFilter.filter.prototype.request = function () { var self = this; clearTimeout(self.timeout); - if (self.$this.find('li.fast_filter').find('img.throbber').length == 0) { + if (self.$this.find('li.fast_filter').find('img.throbber').length === 0) { self.$this.find('li.fast_filter').append( $('
    ').append( $('#pma_navigation_content') @@ -730,7 +730,7 @@ PMA_fastFilter.filter.prototype.request = function () var url = $('#pma_navigation').find('a.navigation_url').attr('href'); var results = self.$this.find('li:not(.hidden):not(.fast_filter):not(.navGroup)').not('[class^=new]').length; var params = self.$this.find('> ul > li > form.fast_filter').first().serialize() + "&results=" + results; - if (self.$this.find('> ul > li > form.fast_filter:first input[name=searchClause]').length == 0) { + if (self.$this.find('> ul > li > form.fast_filter:first input[name=searchClause]').length === 0) { var $input = $('#pma_navigation_tree').find('li.fast_filter.db_fast_filter input.searchClause'); if ($input.length && $input.val() != $input[0].defaultValue) { params += '&searchClause=' + encodeURIComponent($input.val()); diff --git a/js/pmd/history.js b/js/pmd/history.js index 15e765422d..f45e4262b7 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -236,14 +236,14 @@ function edit(type) document.getElementById('query_Aggregate').style.visibility = 'hidden'; } if (type == "Where") { - if (document.getElementById('erel_opt').value != '--' && document.getElementById('eQuery').value !="") { + if (document.getElementById('erel_opt').value != '--' && document.getElementById('eQuery').value !== "") { history_array[g_index].get_obj().setquery(document.getElementById('eQuery').value); history_array[g_index].get_obj().setrelation_operator(document.getElementById('erel_opt').value); } document.getElementById('query_where').style.visibility = 'hidden'; } if (type == "Having") { - if (document.getElementById('hrel_opt').value != '--' && document.getElementById('hQuery').value !="") { + if (document.getElementById('hrel_opt').value != '--' && document.getElementById('hQuery').value !== "") { history_array[g_index].get_obj().setquery(document.getElementById('hQuery').value); history_array[g_index].get_obj().setrelation_operator(document.getElementById('hrel_opt').value); history_array[g_index].get_obj().set_operator(document.getElementById('hoperator').value); diff --git a/js/pmd/move.js b/js/pmd/move.js index ef52e91bba..3474de442c 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -1057,7 +1057,7 @@ function getColorByTarget( target ) } - if (color.length==0) { + if (color.length === 0) { var i = TargetColors.length+1; var d = i % 6; var j = (i - d) / 6; @@ -1216,7 +1216,7 @@ function add_object() rel.value = '--'; p.value = ""; } - if (document.getElementById('new_name').value !="") { + if (document.getElementById('new_name').value !== "") { var rename_obj = new rename(document.getElementById('new_name').value);//make Rename object history_array.push(new history(col_name,rename_obj,tab_name,h_tabs[downer + '.' + tab_name],"Rename")); sum = sum + 1; diff --git a/js/server_privileges.js b/js/server_privileges.js index f6c05999f1..c2b5c37810 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -16,13 +16,13 @@ */ function checkAddUser(the_form) { - if (the_form.elements['pred_hostname'].value == 'userdefined' && the_form.elements['hostname'].value == '') { + if (the_form.elements['pred_hostname'].value == 'userdefined' && the_form.elements['hostname'].value === '') { alert(PMA_messages['strHostEmpty']); the_form.elements['hostname'].focus(); return false; } - if (the_form.elements['pred_username'].value == 'userdefined' && the_form.elements['username'].value == '') { + if (the_form.elements['pred_username'].value == 'userdefined' && the_form.elements['username'].value === '') { alert(PMA_messages['strUserEmpty']); the_form.elements['username'].focus(); return false; @@ -88,7 +88,7 @@ function addUser($form) //We also need to post the value of the submit button in order to get this to work correctly $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $("input[name=adduser_submit]").val(), function(data) { - if (data.success == true) { + if (data.success === true) { // Refresh navigation, if we created a database with the name // that is the same as the username of the new user if ($('#add_user_dialog #createdb-1:checked').length) { @@ -107,7 +107,7 @@ function addUser($form) //Remove the empty notice div generated due to a NULL query passed to PMA_getMessage() var $notice_class = $("#result_query").find('.notice'); - if ($notice_class.text() == '') { + if ($notice_class.text() === '') { $notice_class.remove(); } if ($('#fieldset_add_user a.ajax').attr('name') == 'db_specific') { @@ -124,12 +124,12 @@ function addUser($form) $.post($form.attr('action'), url, function(priv_data) { /*Remove the old userForm table*/ - if ($('#userFormDiv').length != 0) { + if ($('#userFormDiv').length !== 0) { $('#userFormDiv').remove(); } else { $("#usersForm").remove(); } - if (priv_data.success == true) { + if (priv_data.success === true) { $('
    ') .html(priv_data.user_form) .insertAfter('#result_query'); @@ -194,10 +194,10 @@ AJAX.registerOnload('server_privileges.js', function() { var $msgbox = PMA_ajaxShowMessage(); $.get($(this).attr("href"), {'ajax_request':true}, function(data) { - if (data.success == true) { + if (data.success === true) { $('#page_content').hide(); var $div = $('#add_user_dialog'); - if ($div.length == 0) { + if ($div.length === 0) { $div = $('
    ') .insertBefore('#page_content'); } else { @@ -237,7 +237,7 @@ AJAX.registerOnload('server_privileges.js', function() { var $msgbox = PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']); $.get($(this).attr("href"), {'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); } else { PMA_ajaxShowMessage(data.error, false); @@ -261,7 +261,7 @@ AJAX.registerOnload('server_privileges.js', function() { var $form = $("#usersForm"); $.post($form.attr('action'), $form.serialize() + "&delete=" + $(this).val() + "&ajax_request=true", function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxShowMessage(data.message); // Refresh navigation, if we droppped some databases with the name // that is the same as the username of the deleted user @@ -274,7 +274,7 @@ AJAX.registerOnload('server_privileges.js', function() { $(this).remove(); //If this is the last user with this_user_initial, remove the link from #initials_table - if ($("#tableuserrights").find('input:checkbox[value^=' + this_user_initial + ']').length == 0) { + if ($("#tableuserrights").find('input:checkbox[value^=' + this_user_initial + ']').length === 0) { $("#initials_table").find('td > a:contains(' + this_user_initial + ')').parent('td').html(this_user_initial); } @@ -324,10 +324,10 @@ AJAX.registerOnload('server_privileges.js', function() { 'token': token }, function(data) { - if (data.success == true) { + if (data.success === true) { $('#page_content').hide(); var $div = $('#edit_user_dialog'); - if ($div.length == 0) { + if ($div.length === 0) { $div = $('
    ') .insertBefore('#page_content'); } else { @@ -375,7 +375,7 @@ AJAX.registerOnload('server_privileges.js', function() { */ var curr_submit_value = $t.find('.tblFooters').find('input:submit').val(); - // If any option other than 'keep the old one'(option 4) is chosen, we need to remove + // If any option other than 'keep the old one'(option 4) is chosen, we need to remove // the old one from the table. var $row_to_remove; if (curr_submit_name == 'change_copy' @@ -393,7 +393,7 @@ AJAX.registerOnload('server_privileges.js', function() { } $.post($t.attr('action'), $t.serialize() + '&' + curr_submit_name + '=' + curr_submit_value, function(data) { - if (data.success == true) { + if (data.success === true) { $('#page_content').show(); $("#edit_user_dialog").remove(); @@ -406,13 +406,13 @@ AJAX.registerOnload('server_privileges.js', function() { 'margin-top' : '0.5em' }); var $notice_class = $("#result_query").find('.notice'); - if ($notice_class.text() == '') { + if ($notice_class.text() === '') { $notice_class.remove(); } } //Show SQL Query that was executed // Remove the old row if the old user is deleted - if ($row_to_remove != null) { + if ($row_to_remove !== null) { $row_to_remove.remove(); } @@ -427,7 +427,7 @@ AJAX.registerOnload('server_privileges.js', function() { // and on the global page when adjusting global privileges, // but not on the global page when adjusting db-specific privileges. var reload_privs = false; - if (data.db_specific_privs == false || (db_priv_page == data.db_specific_privs)) { + if (data.db_specific_privs === false || (db_priv_page == data.db_specific_privs)) { reload_privs = true; } if (data.db_wildcard_privs) { @@ -462,7 +462,7 @@ AJAX.registerOnload('server_privileges.js', function() { $("button.mult_submit[value=export]").live('click', function(event) { event.preventDefault(); // can't export if no users checked - if ($(this.form).find("input:checked").length == 0) { + if ($(this.form).find("input:checked").length === 0) { return; } var $msgbox = PMA_ajaxShowMessage(); @@ -474,7 +474,7 @@ AJAX.registerOnload('server_privileges.js', function() { $(this.form).prop('action'), $(this.form).serialize() + '&submit_mult=export&ajax_request=true', function(data) { - if (data.success == true) { + if (data.success === true) { var $ajaxDialog = $('
    ') .append(data.message) .dialog({ @@ -530,7 +530,7 @@ AJAX.registerOnload('server_privileges.js', function() { $(this).dialog("close"); }; $.get($(this).attr('href'), {'ajax_request': true}, function(data) { - if (data.success == true) { + if (data.success === true) { var $ajaxDialog = $('
    ') .append(data.message) .dialog({ @@ -571,7 +571,7 @@ AJAX.registerOnload('server_privileges.js', function() { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); $.get($(this).attr('href'), {'ajax_request' : true}, function(data) { - if (data.success == true) { + if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); // This form is not on screen when first entering Privileges // if there are more than 50 users diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 379c4e0a5e..dde7381299 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1289,7 +1289,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if (! drawTimeSpan) { return; } - if (selectionStartX != undefined) { + if (selectionStartX !== undefined) { $('#selection_box') .css({ width: Math.ceil(ev.pageX - selectionStartX) @@ -1504,7 +1504,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } // Set y value, if defined - if (value != undefined) { + if (value !== undefined) { elem.chart.series[j].data.push([chartData.x, value]); if (value > elem.maxYLabel) { elem.maxYLabel = value; diff --git a/js/sql.js b/js/sql.js index a54c244d80..e0925b86ca 100644 --- a/js/sql.js +++ b/js/sql.js @@ -320,7 +320,7 @@ AJAX.registerOnload('sql.js', function() { } } } - } else if (data.success == false ) { + } else if (data.success === false ) { // show an error message that stays on screen $('#sqlqueryform').before(data.error); $sqlqueryresults.hide(); @@ -386,7 +386,7 @@ AJAX.registerOnload('sql.js', function() { $.get($form.attr('action'), $form.serialize()+"&ajax_request=true&submit_mult=row_edit", function(data) { //in the case of an error, show the error message returned. - if (data.success != undefined && data.success == false) { + if (data.success !== undefined && data.success === false) { $div .append(data.error) .dialog({ @@ -536,7 +536,7 @@ function PMA_changeClassForColumn($this_th, newclass, isAddClass) th_index--; } var $tds = $this_th.closest('table').find('tbody tr').find('td.data:eq('+th_index+')'); - if (isAddClass == undefined) { + if (isAddClass === undefined) { $tds.toggleClass(newclass); } else { $tds.toggleClass(newclass, isAddClass); diff --git a/js/tbl_chart.js b/js/tbl_chart.js index 70a6734999..e07237ea10 100644 --- a/js/tbl_chart.js +++ b/js/tbl_chart.js @@ -195,7 +195,7 @@ function drawChart() { currentSettings.height = $('#resizer').height() - 20; // todo: a better way using .redraw() ? - if (currentChart != null) { + if (currentChart !== null) { currentChart.destroy(); } @@ -225,12 +225,12 @@ function extractDate(dateString) { var dateRegExp = /[0-9]{4}-[0-9]{2}-[0-9]{2}/; matches = dateTimeRegExp.exec(dateString); - if (matches != null && matches.length > 0) { + if (matches !== null && matches.length > 0) { match = matches[0]; return new Date(match.substr(0, 4), match.substr(5, 2), match.substr(8, 2), match.substr(11, 2), match.substr(14, 2), match.substr(17, 2)); } else { matches = dateRegExp.exec(dateString); - if (matches != null && matches.length > 0) { + if (matches !== null && matches.length > 0) { match = matches[0]; return new Date(match.substr(0, 4), match.substr(5, 2), match.substr(8, 2)); } diff --git a/js/tbl_gis_visualization.js b/js/tbl_gis_visualization.js index 5e8d63814a..d5d156c804 100644 --- a/js/tbl_gis_visualization.js +++ b/js/tbl_gis_visualization.js @@ -205,7 +205,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function() { } $('#choice').live('click', function() { - if ($(this).prop('checked') == false) { + if ($(this).prop('checked') === false) { $('#placeholder').show(); $('#openlayersmap').hide(); } else { diff --git a/js/tbl_relation.js b/js/tbl_relation.js index 4ce39854b6..32711902b2 100644 --- a/js/tbl_relation.js +++ b/js/tbl_relation.js @@ -8,7 +8,7 @@ function show_hide_clauses($thisDropdown) // here, one span contains the label and the clause dropdown // and we have one span for ON DELETE and one for ON UPDATE // - if ($thisDropdown.val() != '') { + if ($thisDropdown.val() !== '') { $thisDropdown.parent().nextAll('span').show(); } else { $thisDropdown.parent().nextAll('span').hide(); diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 22ffe77634..2ceb187c49 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -247,7 +247,7 @@ AJAX.registerOnload('tbl_structure.js', function() { } $.post($form.prop("action"), serialized + "&ajax_request=true", function (data) { - if (data.success == false) { + if (data.success === false) { PMA_ajaxRemoveMessage($msgbox); $this .clone() diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 83c7db5273..320b3bdaf2 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -236,7 +236,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { * Input form validation **/ $('#inputFormSubmitId').click(function() { - if ($('#tableid_0').get(0).selectedIndex == 0 || $('#tableid_1').get(0).selectedIndex == 0) { + if ($('#tableid_0').get(0).selectedIndex === 0 || $('#tableid_1').get(0).selectedIndex === 0) { PMA_ajaxShowMessage(PMA_messages['strInputNull']); } else if (xLabel == yLabel) { PMA_ajaxShowMessage(PMA_messages['strSameInputs']); @@ -352,17 +352,17 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { var value = newValues[key]; // null - if (value == null) { + if (value === null) { sql_query += 'NULL, '; // empty - } else if ($.trim(value) == '') { + } else if ($.trim(value) === '') { sql_query += "'', "; // other } else { // type explicitly identified - if (sqlTypes[key] != null) { + if (sqlTypes[key] !== null) { if (sqlTypes[key] == 'bit') { sql_query += "b'" + value + "', "; } @@ -387,7 +387,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { 'sql_query' : sql_query, 'inline_edit' : false }, function(data) { - if (data.success == true) { + if (data.success === true) { $('#sqlqueryresults').html(data.sql_query); $("#sqlqueryresults").trigger('appendAnchor'); } else { @@ -429,7 +429,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { * Generate plot using jqplot */ - if (searchedData != null) { + if (searchedData !== null) { $('#zoom_search_form') .slideToggle() .hide(); @@ -483,7 +483,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { }; // If data label is not set, do not show tooltips - if (dataLabel == '') { + if (dataLabel === '') { options.highlighter.show = false; } @@ -590,7 +590,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { for (key in data.row_info) { $field = $('#edit_fieldID_' + field_id); $field_null = $('#edit_fields_null_id_' + field_id); - if (data.row_info[key] == null) { + if (data.row_info[key] === null) { $field_null.prop('checked', true); $field.val(''); } else { From 697f5895379bc6a43e67b21254b0920930afbd83 Mon Sep 17 00:00:00 2001 From: Yungu Kim Date: Mon, 15 Apr 2013 12:56:33 +0200 Subject: [PATCH 035/218] Translated using Weblate (Korean) Currently translated at 56.4% (1468 of 2605) --- po/ko.po | 49 +++++++++++++++++++++++-------------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/po/ko.po b/po/ko.po index 7a3ed17c9e..01b8902333 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-04-03 10:26+0200\n" -"PO-Revision-Date: 2013-04-13 00:19+0200\n" +"PO-Revision-Date: 2013-04-15 12:56+0200\n" "Last-Translator: Yungu Kim \n" "Language-Team: Korean \n" "Language: ko\n" @@ -1924,7 +1924,7 @@ msgstr "패널 숨기기" #: js/messages.php:376 #| msgid "The selected user was not found in the privilege table." msgid "The requested page was not found in the history, it may have expired." -msgstr "요청하신 페이지를 기록에서 찾을 수 없습니다. 만기되었을 수도 있습니다." +msgstr "요청하신 페이지를 기록에서 찾을 수 없습니다. 만기 되었을 수도 있습니다." #: js/messages.php:379 setup/lib/index.lib.php:188 #, php-format @@ -2545,7 +2545,7 @@ msgstr "" #: libraries/DisplayResults.class.php:1612 msgid "Show binary contents" -msgstr "" +msgstr "바이너리 항목 보이기" #: libraries/DisplayResults.class.php:1617 msgid "Show BLOB contents" @@ -5629,17 +5629,17 @@ msgstr "" #: libraries/config/messages.inc.php:440 msgid "Add DROP TABLE" -msgstr "" +msgstr "DROP TABLE 추가" #: libraries/config/messages.inc.php:441 msgid "" "Whether a DROP VIEW IF EXISTS statement will be added as first line to the " "log when creating a view." -msgstr "" +msgstr "뷰를 생성할 때 로그의 첫 번째 줄에 DROP VIEW IF EXISTS 구문을 추가할지 여부." #: libraries/config/messages.inc.php:442 msgid "Add DROP VIEW" -msgstr "" +msgstr "DROP VIEW 추가" #: libraries/config/messages.inc.php:443 msgid "Defines the list of statements the auto-creation uses for new versions." @@ -5716,26 +5716,25 @@ msgstr "" #: libraries/config/messages.inc.php:459 msgid "Show create database form" -msgstr "" +msgstr "데이터베이스 생성 폼 보이기" #: libraries/config/messages.inc.php:460 msgid "Show or hide a column displaying the Creation timestamp for all tables" msgstr "전체 테이블의 생성 시간을 표시하는 컬럼을 보이기/숨기기" #: libraries/config/messages.inc.php:461 -#, fuzzy #| msgid "Show PHP information" msgid "Show Creation timestamp" -msgstr "PHP 정보 보기" +msgstr "생성 시간 보이기" #: libraries/config/messages.inc.php:462 msgid "" "Show or hide a column displaying the Last update timestamp for all tables" -msgstr "" +msgstr "모든 테이블에 대해 최종 업데이트 시간을 표시하는 컬럼을 보이기/숨기기" #: libraries/config/messages.inc.php:463 msgid "Show Last update timestamp" -msgstr "" +msgstr "최종 업데이트 시간 표시" #: libraries/config/messages.inc.php:464 msgid "" @@ -5761,7 +5760,7 @@ msgstr "데이터베이스 사용량 통계" msgid "" "Defines whether or not type fields should be initially displayed in edit/" "insert mode" -msgstr "" +msgstr "편집/삽입 모드에서 타입 필드가 기본적으로 보일지 여부 정의" #: libraries/config/messages.inc.php:469 msgid "Show field types" @@ -5769,27 +5768,26 @@ msgstr "필드 타입 출력" #: libraries/config/messages.inc.php:470 msgid "Display the function fields in edit/insert mode" -msgstr "" +msgstr "편집/삽입 모드에서 함수 필드 보이기" #: libraries/config/messages.inc.php:471 msgid "Show function fields" -msgstr "" +msgstr "함수 필드 보이기" #: libraries/config/messages.inc.php:472 msgid "Whether to show hint or not" -msgstr "" +msgstr "힌트 보여주기 여부" #: libraries/config/messages.inc.php:473 -#, fuzzy #| msgid "Show grid" msgid "Show hint" -msgstr "grid 보기" +msgstr "힌트 보여주기" #: libraries/config/messages.inc.php:474 msgid "" "Shows link to [a@http://php.net/manual/function.phpinfo.php]phpinfo()[/a] " "output" -msgstr "" +msgstr "[a@http://php.net/manual/function.phpinfo.php]phpinfo()[/a] 출력 링크 표시" #: libraries/config/messages.inc.php:475 msgid "Show phpinfo() link" @@ -5797,11 +5795,11 @@ msgstr "phpinfo()링크 표시" #: libraries/config/messages.inc.php:476 msgid "Show detailed MySQL server information" -msgstr "" +msgstr "MYSQL 서버 정보 자세하게 표시" #: libraries/config/messages.inc.php:477 msgid "Defines whether SQL queries generated by phpMyAdmin should be displayed" -msgstr "" +msgstr "phpMyAdmin이 생성한 SQL 쿼리를 표시할지 여부를 정의" #: libraries/config/messages.inc.php:478 msgid "Show SQL queries" @@ -10409,26 +10407,25 @@ msgstr "실패한 시도" #: server_status.php:252 msgid "Aborted" -msgstr "" +msgstr "중지됨" #: server_status.php:312 msgid "ID" -msgstr "" +msgstr "아이디" #: server_status.php:328 msgid "Command" msgstr "커맨드" #: server_status_advisor.php:29 -#, fuzzy msgid "Instructions" -msgstr "함수" +msgstr "안내 설명" #: server_status_advisor.php:35 msgid "" "The Advisor system can provide recommendations on server variables by " "analyzing the server status variables." -msgstr "" +msgstr "어드바이저 시스템은 서버의 상태 변수를 분석하고, 변수 값을 추천해줍니다." #: server_status_advisor.php:41 msgid "" @@ -11587,7 +11584,7 @@ msgstr "SQL 결과" #: sql.php:1112 msgid "Generated by" -msgstr "" +msgstr "생성자" #: sql.php:1234 #, fuzzy From c935413fcc47873d5d9335c6eed5a89a0047ff7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 14:08:45 +0200 Subject: [PATCH 036/218] Various javascript fixes - missing ; - confusing ! --- js/config.js | 4 ++-- js/date.js | 2 +- js/db_search.js | 4 ++-- js/navigation.js | 14 +++++++------- js/server_status_monitor.js | 10 ++++++---- js/server_status_sorter.js | 4 ++-- js/sql.js | 2 +- js/tbl_change.js | 4 ++-- js/tbl_structure.js | 2 +- js/tbl_zoom_plot_jqplot.js | 2 +- 10 files changed, 25 insertions(+), 23 deletions(-) diff --git a/js/config.js b/js/config.js index 50d0f99379..d08d39cd6a 100644 --- a/js/config.js +++ b/js/config.js @@ -606,8 +606,8 @@ function restoreField(field_id) AJAX.registerOnload('config.js', function() { $('div.tabs_contents') - .delegate('.restore-default, .set-value', 'mouseenter', function(){$(this).css('opacity', 1)}) - .delegate('.restore-default, .set-value', 'mouseleave', function(){$(this).css('opacity', 0.25)}) + .delegate('.restore-default, .set-value', 'mouseenter', function(){$(this).css('opacity', 1);}) + .delegate('.restore-default, .set-value', 'mouseleave', function(){$(this).css('opacity', 0.25);}) .delegate('.restore-default, .set-value', 'click', function(e) { e.preventDefault(); var href = $(this).attr('href'); diff --git a/js/date.js b/js/date.js index fe86d1a312..325ebba2b1 100644 --- a/js/date.js +++ b/js/date.js @@ -58,7 +58,7 @@ var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat'); -function LZ(x) {return(x<0||x>9?"":"0")+x} +function LZ(x) {return(x<0||x>9?"":"0")+x;} // ------------------------------------------------------------------ // isDate ( date_string, format_string ) diff --git a/js/db_search.js b/js/db_search.js index f2a5178bd1..2588fba454 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -223,6 +223,6 @@ AJAX.registerOnload('db_search.js', function() { } PMA_ajaxRemoveMessage($msgbox); - }) - }) + }); + }); }); // end $() diff --git a/js/navigation.js b/js/navigation.js index 4e4f68bf97..44cefc2b9b 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -143,41 +143,41 @@ $(function() { $('li.new_procedure a.ajax, li.new_function a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('routine'); - dialog.editorDialog(1, $(this)) + dialog.editorDialog(1, $(this)); }); $('li.new_trigger a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('trigger'); - dialog.editorDialog(1, $(this)) + dialog.editorDialog(1, $(this)); }); $('li.new_event a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('event'); - dialog.editorDialog(1, $(this)) + dialog.editorDialog(1, $(this)); }); /** Edit Routines, Triggers and Events */ $('li.procedure > a.ajax, li.function > a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('routine'); - dialog.editorDialog(0, $(this)) + dialog.editorDialog(0, $(this)); }); $('li.trigger > a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('trigger'); - dialog.editorDialog(0, $(this)) + dialog.editorDialog(0, $(this)); }); $('li.event > a.ajax').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object('event'); - dialog.editorDialog(0, $(this)) + dialog.editorDialog(0, $(this)); }); /** Export Routines, Triggers and Events */ $('li.procedure a.ajax img, li.function a.ajax img, li.trigger a.ajax img, li.event a.ajax img').live('click', function (event) { event.preventDefault(); var dialog = new RTE.object(); - dialog.exportDialog($(this).parent()) + dialog.exportDialog($(this).parent()); }); /** New index */ diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index dde7381299..178032849e 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1199,7 +1199,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if ($('#' + 'gridchart' + runtime.chartAI).length === 0) { var numCharts = $('#chartGrid .monitorChart').length; - if (numCharts === 0 || !( numCharts % monitorSettings.columns)) { + if (numCharts === 0 || (numCharts % monitorSettings.columns === 0)) { $('#chartGrid').append(''); } @@ -1568,7 +1568,9 @@ AJAX.registerOnload('server_status_monitor.js', function() { */ function getMaxYLabel(dataValues) { var maxY = dataValues[0][1]; - $.each(dataValues,function(k,v){maxY = (v[1]>maxY) ? v[1] : maxY}); + $.each(dataValues,function(k,v){ + maxY = (v[1]>maxY) ? v[1] : maxY; + }); return maxY; } @@ -1846,7 +1848,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if (hide) { $t.parent().css('display', 'none'); } else { - totalSum += parseInt($t.next().text(), ); + totalSum += parseInt($t.next().text(), 10); rowSum++; odd_row = ! odd_row; @@ -1903,7 +1905,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { /* Turns a timespan (12:12:12) into a number */ function timeToSec(timeStr) { var time = timeStr.split(':'); - return parseInt(time[0]*3600) + parseInt(time[1]*60) + parseInt(time[2]); + return (parseInt(time[0], 10) * 3600) + (parseInt(time[1], 10) * 60) + parseInt(time[2], 10); } /* Turns a number into a timespan (100 into 00:01:40) */ diff --git a/js/server_status_sorter.js b/js/server_status_sorter.js index 383cb8ac7f..32f418ce09 100644 --- a/js/server_status_sorter.js +++ b/js/server_status_sorter.js @@ -33,7 +33,7 @@ $(function () { $.tablesorter.addParser({ id: "fancyNumber", is: function(s) { - return /^[0-9]?[0-9,\.]*\s?(k|M|G|T|%)?$/.test(s); + return (/^[0-9]?[0-9,\.]*\s?(k|M|G|T|%)?$/).test(s); }, format: function(s) { var num = jQuery.tablesorter.formatFloat( @@ -59,7 +59,7 @@ $(function () { $.tablesorter.addParser({ id: "withinSpanNumber", is: function(s) { - return /(.*)?<\/span>/); diff --git a/js/sql.js b/js/sql.js index e0925b86ca..8445b7c2b9 100644 --- a/js/sql.js +++ b/js/sql.js @@ -117,7 +117,7 @@ AJAX.registerOnload('sql.js', function() { } else { PMA_ajaxShowMessage(data.error, false); } - }) + }); }); }); diff --git a/js/tbl_change.js b/js/tbl_change.js index e8fbd6d224..78cc2cd040 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -73,7 +73,7 @@ function nullify(theType, urlField, md5Field, multi_edit) //function checks the number of days in febuary function daysInFebruary (year) { - return (((year % 4 === 0) && ( (!(year % 100 === 0)) || (year % 400 === 0))) ? 29 : 28 ); + return (((year % 4 === 0) && ( ((year % 100 !== 0)) || (year % 400 === 0))) ? 29 : 28 ); } //function to convert single digit to double digit function fractionReplace(num) @@ -491,5 +491,5 @@ AJAX.registerOnload('tbl_change.js', function() { curr_rows--; } } - }) + }); }); diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 2ceb187c49..ba88177310 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -379,7 +379,7 @@ function PMA_tbl_structure_menu_resizer_callback() { var columnsWidth = 0; var $columns = $('#tablestructure').find('tr:eq(1)').find('td,th'); $columns.not(':last').each(function (){ - columnsWidth += $(this).outerWidth(true) + columnsWidth += $(this).outerWidth(true); }); var totalCellSpacing = $('#tablestructure').width(); $columns.each(function (){ diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js index 320b3bdaf2..c994d62e72 100644 --- a/js/tbl_zoom_plot_jqplot.js +++ b/js/tbl_zoom_plot_jqplot.js @@ -567,7 +567,7 @@ AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() { // make room so that the handle will still appear $('div#querychart').height($('div#resizer').height() * 0.96); $('div#querychart').width($('div#resizer').width() * 0.96); - currentChart.replot( {resetAxes: true}) + currentChart.replot( {resetAxes: true}); }); $('div#querychart').bind('jqplotDataClick', From 2c3f59c41c7d2bb973f9a9d04849607205624d73 Mon Sep 17 00:00:00 2001 From: Yungu Kim Date: Mon, 15 Apr 2013 14:03:02 +0200 Subject: [PATCH 037/218] Translated using Weblate (Korean) Currently translated at 57.0% (1485 of 2605) --- po/ko.po | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/po/ko.po b/po/ko.po index 01b8902333..b67847d5dc 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.1-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-04-03 10:26+0200\n" -"PO-Revision-Date: 2013-04-15 12:56+0200\n" +"PO-Revision-Date: 2013-04-15 14:03+0200\n" "Last-Translator: Yungu Kim \n" "Language-Team: Korean \n" "Language: ko\n" @@ -2211,12 +2211,12 @@ msgstr "규칙 '%s'에 대한 precondition 계산 실패" #: libraries/Advisor.class.php:121 #, php-format msgid "Failed calculating value for rule '%s'" -msgstr "" +msgstr "규칙 '%s'에 대한 값 계산 실패" #: libraries/Advisor.class.php:140 #, php-format msgid "Failed running test for rule '%s'" -msgstr "" +msgstr "규칙 '%s'에 대한 테스트를 실행 못 함" #: libraries/Advisor.class.php:222 #, php-format @@ -5476,6 +5476,8 @@ msgid "" "use their literal instances, i.e. use [kbd]'my\\_db'[/kbd] and not " "[kbd]'my_db'[/kbd]." msgstr "" +"MySQL 와일드카드 문자 (%와 _)를 쓸 수 있습니다. 원래 의미로 쓰기 위해서는 이스케이프 " +"하세요([kbd]'my_db'[/kbd]로 하지 말고 [kbd]'my\\_db'[/kbd])." #: libraries/config/messages.inc.php:409 msgid "Show only listed databases" @@ -9670,7 +9672,7 @@ msgstr "" #: libraries/tbl_columns_definition_form.inc.php:171 msgid "Transformation options" -msgstr "" +msgstr "변환 옵션" #: libraries/tbl_columns_definition_form.inc.php:174 msgid "" @@ -9685,14 +9687,13 @@ msgstr "" #: libraries/tbl_columns_definition_form.inc.php:412 msgid "ENUM or SET data too long?" -msgstr "" +msgstr "ENUM 또는 SET 데이터가 너무 긴 것 같음" #: libraries/tbl_columns_definition_form.inc.php:414 msgid "Get more editing space" msgstr "" #: libraries/tbl_columns_definition_form.inc.php:430 -#, fuzzy #| msgid "None" msgctxt "for default" msgid "None" @@ -9700,31 +9701,31 @@ msgstr "없음" #: libraries/tbl_columns_definition_form.inc.php:431 msgid "As defined:" -msgstr "" +msgstr "사용자 정의:" #: libraries/tbl_columns_definition_form.inc.php:634 msgid "first" -msgstr "" +msgstr "맨 처음" #: libraries/tbl_columns_definition_form.inc.php:644 -#, fuzzy, php-format +#, php-format #| msgid "After %s" msgid "after %s" msgstr "%s 다음에" #: libraries/tbl_columns_definition_form.inc.php:737 msgid "Table name" -msgstr "" +msgstr "테이블 이름" #: libraries/tbl_columns_definition_form.inc.php:876 msgid "PARTITION definition" -msgstr "" +msgstr "PARTITION 정의" #: libraries/tbl_common.inc.php:54 -#, fuzzy, php-format +#, php-format #| msgid "Tracking is active." msgid "Tracking of %s is activated." -msgstr "트래킹이 활성화되었습니다." +msgstr "%s의 트래킹이 활성화되었습니다." #: libraries/user_preferences.inc.php:29 msgid "Manage your settings" @@ -12436,7 +12437,7 @@ msgstr "" msgid "" "Depending on your environment, it might be performance increasing to reduce " "this value." -msgstr "" +msgstr "이 값을 감소시켜 성능을 향상할 수 있음(환경에 따라 다름)." #: libraries/advisory_rules.txt:200 #, php-format @@ -12487,20 +12488,19 @@ msgstr "너무 많은 정렬로 인해 임시 테이블의 사용이 발생합 msgid "" "Consider increasing {sort_buffer_size} and/or {read_rnd_buffer_size}, " "depending on your system memory limits" -msgstr "" +msgstr "시스템의 메모리 한계값에 따라 {sort_buffer_size} 나 {read_rnd_buffer_size} 값을 증가시키세요" #: libraries/advisory_rules.txt:216 #, php-format msgid "" "%s%% of all sorts cause temporary tables, this value should be lower than " "10%%." -msgstr "" +msgstr "정렬 연산의 %s%%가 임시 테이블을 생성합니다. 이 값은 10%% 미만인 것이 좋습니다." #: libraries/advisory_rules.txt:218 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Rate of sorts that cause temporary tables" -msgstr "임시테이블 생성 허용." +msgstr "임시 테이블을 생성하는 정렬의 비율" #: libraries/advisory_rules.txt:223 #, php-format @@ -12514,7 +12514,7 @@ msgstr "행 정렬" #: libraries/advisory_rules.txt:228 msgid "There are lots of rows being sorted." -msgstr "" +msgstr "정렬중인 로우가 많습니다." #: libraries/advisory_rules.txt:229 msgid "" From f1299ad66571b94063515ce347e2ee5018b3bbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 15:09:32 +0200 Subject: [PATCH 038/218] Remove extra ; from code --- js/gis_data_editor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 99dc70d529..753ba39dcb 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -346,8 +346,8 @@ AJAX.registerOnload('gis_data_editor.js', function() { // Add the new polygon var html = PMA_messages['strPolygon'] + ' ' + (noOfPolygons + 1) + ':
    '; - html += ''; - + '
    ' + PMA_messages['strOuterRing'] + ':'; + html += '' + + '
    ' + PMA_messages['strOuterRing'] + ':' + ''; for (var i = 0; i < 4; i++) { html += addDataPoint(i, (prefix + '[' + noOfPolygons + '][0]')); From e16ff8ce974b9ab28e1b1830022b346c9adf0ec5 Mon Sep 17 00:00:00 2001 From: Yungu Kim Date: Mon, 15 Apr 2013 14:03:03 +0200 Subject: [PATCH 039/218] Translated using Weblate (Korean) Currently translated at 57.0% (1485 of 2605) --- po/ko.po | 85 +++++++++++++++++++++++++++----------------------------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/po/ko.po b/po/ko.po index dd3e896884..11fb026b40 100644 --- a/po/ko.po +++ b/po/ko.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.0.0-rc1\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2013-04-03 10:24+0200\n" -"PO-Revision-Date: 2013-04-13 00:19+0200\n" +"PO-Revision-Date: 2013-04-15 14:03+0200\n" "Last-Translator: Yungu Kim \n" "Language-Team: Korean \n" "Language: ko\n" @@ -1924,7 +1924,7 @@ msgstr "패널 숨기기" #: js/messages.php:376 #| msgid "The selected user was not found in the privilege table." msgid "The requested page was not found in the history, it may have expired." -msgstr "요청하신 페이지를 기록에서 찾을 수 없습니다. 만기되었을 수도 있습니다." +msgstr "요청하신 페이지를 기록에서 찾을 수 없습니다. 만기 되었을 수도 있습니다." #: js/messages.php:379 setup/lib/index.lib.php:188 #, php-format @@ -2211,12 +2211,12 @@ msgstr "규칙 '%s'에 대한 precondition 계산 실패" #: libraries/Advisor.class.php:121 #, php-format msgid "Failed calculating value for rule '%s'" -msgstr "" +msgstr "규칙 '%s'에 대한 값 계산 실패" #: libraries/Advisor.class.php:140 #, php-format msgid "Failed running test for rule '%s'" -msgstr "" +msgstr "규칙 '%s'에 대한 테스트를 실행 못 함" #: libraries/Advisor.class.php:222 #, php-format @@ -2545,7 +2545,7 @@ msgstr "" #: libraries/DisplayResults.class.php:1612 msgid "Show binary contents" -msgstr "" +msgstr "바이너리 항목 보이기" #: libraries/DisplayResults.class.php:1617 msgid "Show BLOB contents" @@ -5476,6 +5476,8 @@ msgid "" "use their literal instances, i.e. use [kbd]'my\\_db'[/kbd] and not " "[kbd]'my_db'[/kbd]." msgstr "" +"MySQL 와일드카드 문자 (%와 _)를 쓸 수 있습니다. 원래 의미로 쓰기 위해서는 이스케이프 " +"하세요([kbd]'my_db'[/kbd]로 하지 말고 [kbd]'my\\_db'[/kbd])." #: libraries/config/messages.inc.php:409 msgid "Show only listed databases" @@ -5629,17 +5631,17 @@ msgstr "" #: libraries/config/messages.inc.php:440 msgid "Add DROP TABLE" -msgstr "" +msgstr "DROP TABLE 추가" #: libraries/config/messages.inc.php:441 msgid "" "Whether a DROP VIEW IF EXISTS statement will be added as first line to the " "log when creating a view." -msgstr "" +msgstr "뷰를 생성할 때 로그의 첫 번째 줄에 DROP VIEW IF EXISTS 구문을 추가할지 여부." #: libraries/config/messages.inc.php:442 msgid "Add DROP VIEW" -msgstr "" +msgstr "DROP VIEW 추가" #: libraries/config/messages.inc.php:443 msgid "Defines the list of statements the auto-creation uses for new versions." @@ -5716,26 +5718,25 @@ msgstr "" #: libraries/config/messages.inc.php:459 msgid "Show create database form" -msgstr "" +msgstr "데이터베이스 생성 폼 보이기" #: libraries/config/messages.inc.php:460 msgid "Show or hide a column displaying the Creation timestamp for all tables" msgstr "전체 테이블의 생성 시간을 표시하는 컬럼을 보이기/숨기기" #: libraries/config/messages.inc.php:461 -#, fuzzy #| msgid "Show PHP information" msgid "Show Creation timestamp" -msgstr "PHP 정보 보기" +msgstr "생성 시간 보이기" #: libraries/config/messages.inc.php:462 msgid "" "Show or hide a column displaying the Last update timestamp for all tables" -msgstr "" +msgstr "모든 테이블에 대해 최종 업데이트 시간을 표시하는 컬럼을 보이기/숨기기" #: libraries/config/messages.inc.php:463 msgid "Show Last update timestamp" -msgstr "" +msgstr "최종 업데이트 시간 표시" #: libraries/config/messages.inc.php:464 msgid "" @@ -5761,7 +5762,7 @@ msgstr "데이터베이스 사용량 통계" msgid "" "Defines whether or not type fields should be initially displayed in edit/" "insert mode" -msgstr "" +msgstr "편집/삽입 모드에서 타입 필드가 기본적으로 보일지 여부 정의" #: libraries/config/messages.inc.php:469 msgid "Show field types" @@ -5769,27 +5770,26 @@ msgstr "필드 타입 출력" #: libraries/config/messages.inc.php:470 msgid "Display the function fields in edit/insert mode" -msgstr "" +msgstr "편집/삽입 모드에서 함수 필드 보이기" #: libraries/config/messages.inc.php:471 msgid "Show function fields" -msgstr "" +msgstr "함수 필드 보이기" #: libraries/config/messages.inc.php:472 msgid "Whether to show hint or not" -msgstr "" +msgstr "힌트 보여주기 여부" #: libraries/config/messages.inc.php:473 -#, fuzzy #| msgid "Show grid" msgid "Show hint" -msgstr "grid 보기" +msgstr "힌트 보여주기" #: libraries/config/messages.inc.php:474 msgid "" "Shows link to [a@http://php.net/manual/function.phpinfo.php]phpinfo()[/a] " "output" -msgstr "" +msgstr "[a@http://php.net/manual/function.phpinfo.php]phpinfo()[/a] 출력 링크 표시" #: libraries/config/messages.inc.php:475 msgid "Show phpinfo() link" @@ -5797,11 +5797,11 @@ msgstr "phpinfo()링크 표시" #: libraries/config/messages.inc.php:476 msgid "Show detailed MySQL server information" -msgstr "" +msgstr "MYSQL 서버 정보 자세하게 표시" #: libraries/config/messages.inc.php:477 msgid "Defines whether SQL queries generated by phpMyAdmin should be displayed" -msgstr "" +msgstr "phpMyAdmin이 생성한 SQL 쿼리를 표시할지 여부를 정의" #: libraries/config/messages.inc.php:478 msgid "Show SQL queries" @@ -9672,7 +9672,7 @@ msgstr "" #: libraries/tbl_columns_definition_form.inc.php:171 msgid "Transformation options" -msgstr "" +msgstr "변환 옵션" #: libraries/tbl_columns_definition_form.inc.php:174 msgid "" @@ -9687,14 +9687,13 @@ msgstr "" #: libraries/tbl_columns_definition_form.inc.php:412 msgid "ENUM or SET data too long?" -msgstr "" +msgstr "ENUM 또는 SET 데이터가 너무 긴 것 같음" #: libraries/tbl_columns_definition_form.inc.php:414 msgid "Get more editing space" msgstr "" #: libraries/tbl_columns_definition_form.inc.php:430 -#, fuzzy #| msgid "None" msgctxt "for default" msgid "None" @@ -9702,31 +9701,31 @@ msgstr "없음" #: libraries/tbl_columns_definition_form.inc.php:431 msgid "As defined:" -msgstr "" +msgstr "사용자 정의:" #: libraries/tbl_columns_definition_form.inc.php:634 msgid "first" -msgstr "" +msgstr "맨 처음" #: libraries/tbl_columns_definition_form.inc.php:644 -#, fuzzy, php-format +#, php-format #| msgid "After %s" msgid "after %s" msgstr "%s 다음에" #: libraries/tbl_columns_definition_form.inc.php:737 msgid "Table name" -msgstr "" +msgstr "테이블 이름" #: libraries/tbl_columns_definition_form.inc.php:876 msgid "PARTITION definition" -msgstr "" +msgstr "PARTITION 정의" #: libraries/tbl_common.inc.php:54 -#, fuzzy, php-format +#, php-format #| msgid "Tracking is active." msgid "Tracking of %s is activated." -msgstr "트래킹이 활성화되었습니다." +msgstr "%s의 트래킹이 활성화되었습니다." #: libraries/user_preferences.inc.php:29 msgid "Manage your settings" @@ -10409,26 +10408,25 @@ msgstr "실패한 시도" #: server_status.php:252 msgid "Aborted" -msgstr "" +msgstr "중지됨" #: server_status.php:312 msgid "ID" -msgstr "" +msgstr "아이디" #: server_status.php:328 msgid "Command" msgstr "커맨드" #: server_status_advisor.php:29 -#, fuzzy msgid "Instructions" -msgstr "함수" +msgstr "안내 설명" #: server_status_advisor.php:35 msgid "" "The Advisor system can provide recommendations on server variables by " "analyzing the server status variables." -msgstr "" +msgstr "어드바이저 시스템은 서버의 상태 변수를 분석하고, 변수 값을 추천해줍니다." #: server_status_advisor.php:41 msgid "" @@ -11587,7 +11585,7 @@ msgstr "SQL 결과" #: sql.php:1112 msgid "Generated by" -msgstr "" +msgstr "생성자" #: sql.php:1234 #, fuzzy @@ -12439,7 +12437,7 @@ msgstr "" msgid "" "Depending on your environment, it might be performance increasing to reduce " "this value." -msgstr "" +msgstr "이 값을 감소시켜 성능을 향상할 수 있음(환경에 따라 다름)." #: libraries/advisory_rules.txt:200 #, php-format @@ -12490,20 +12488,19 @@ msgstr "너무 많은 정렬로 인해 임시 테이블의 사용이 발생합 msgid "" "Consider increasing {sort_buffer_size} and/or {read_rnd_buffer_size}, " "depending on your system memory limits" -msgstr "" +msgstr "시스템의 메모리 한계값에 따라 {sort_buffer_size} 나 {read_rnd_buffer_size} 값을 증가시키세요" #: libraries/advisory_rules.txt:216 #, php-format msgid "" "%s%% of all sorts cause temporary tables, this value should be lower than " "10%%." -msgstr "" +msgstr "정렬 연산의 %s%%가 임시 테이블을 생성합니다. 이 값은 10%% 미만인 것이 좋습니다." #: libraries/advisory_rules.txt:218 -#, fuzzy #| msgid "Allows creating temporary tables." msgid "Rate of sorts that cause temporary tables" -msgstr "임시테이블 생성 허용." +msgstr "임시 테이블을 생성하는 정렬의 비율" #: libraries/advisory_rules.txt:223 #, php-format @@ -12517,7 +12514,7 @@ msgstr "행 정렬" #: libraries/advisory_rules.txt:228 msgid "There are lots of rows being sorted." -msgstr "" +msgstr "정렬중인 로우가 많습니다." #: libraries/advisory_rules.txt:229 msgid "" From a1b6f206b2cfe78e3819ef1bf1da0c78f847a2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 15 Apr 2013 15:12:49 +0200 Subject: [PATCH 040/218] Various spacing and identation fixes --- js/OpenStreetMap.js | 8 +- js/ajax.js | 8 +- js/chart.js | 86 ++++++------ js/common.js | 2 +- js/config.js | 122 ++++++++--------- js/db_operations.js | 22 ++-- js/db_search.js | 54 ++++---- js/db_structure.js | 46 +++---- js/export.js | 30 ++--- js/functions.js | 242 +++++++++++++++++----------------- js/gis_data_editor.js | 40 +++--- js/import.js | 24 ++-- js/indexes.js | 34 ++--- js/keyhandler.js | 44 +++---- js/makegrid.js | 224 +++++++++++++++---------------- js/navigation.js | 6 +- js/pmd/history.js | 82 ++++++------ js/pmd/iecanvas.js | 18 +-- js/pmd/init.js | 6 +- js/pmd/move.js | 38 +++--- js/replication.js | 36 ++--- js/rte.js | 50 +++---- js/server_databases.js | 17 +-- js/server_plugins.js | 4 +- js/server_privileges.js | 52 ++++---- js/server_status.js | 2 +- js/server_status_advisor.js | 14 +- js/server_status_monitor.js | 190 +++++++++++++------------- js/server_status_queries.js | 6 +- js/server_status_sorter.js | 72 +++++----- js/server_status_variables.js | 16 +-- js/server_variables.js | 20 +-- js/sql.js | 62 ++++----- js/tbl_change.js | 34 ++--- js/tbl_chart.js | 38 +++--- js/tbl_gis_visualization.js | 46 +++---- js/tbl_relation.js | 8 +- js/tbl_select.js | 79 +++++------ js/tbl_structure.js | 42 +++--- js/tbl_zoom_plot_jqplot.js | 90 ++++++------- 40 files changed, 1015 insertions(+), 999 deletions(-) diff --git a/js/OpenStreetMap.js b/js/OpenStreetMap.js index 8a7f0166d8..51694bc86c 100644 --- a/js/OpenStreetMap.js +++ b/js/OpenStreetMap.js @@ -19,7 +19,7 @@ OpenLayers.Util.OSM.originalOnImageLoadError = OpenLayers.Util.onImageLoadError; /** * Function: onImageLoadError */ -OpenLayers.Util.onImageLoadError = function() { +OpenLayers.Util.onImageLoadError = function () { if (this.src.match(/^http:\/\/[abc]\.[a-z]+\.openstreetmap\.org\//)) { this.src = OpenLayers.Util.OSM.MISSING_TILE_URL; } else if (this.src.match(/^http:\/\/[def]\.tah\.openstreetmap\.org\//)) { @@ -43,7 +43,7 @@ OpenLayers.Layer.OSM.Mapnik = OpenLayers.Class(OpenLayers.Layer.OSM, { * name - {String} * options - {Object} Hashtable of extra options to tag onto the layer */ - initialize: function(name, options) { + initialize: function (name, options) { var url = [ "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png", "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png", @@ -75,7 +75,7 @@ OpenLayers.Layer.OSM.Osmarender = OpenLayers.Class(OpenLayers.Layer.OSM, { * name - {String} * options - {Object} Hashtable of extra options to tag onto the layer */ - initialize: function(name, options) { + initialize: function (name, options) { var url = [ "http://a.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png", "http://b.tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png", @@ -107,7 +107,7 @@ OpenLayers.Layer.OSM.CycleMap = OpenLayers.Class(OpenLayers.Layer.OSM, { * name - {String} * options - {Object} Hashtable of extra options to tag onto the layer */ - initialize: function(name, options) { + initialize: function (name, options) { var url = [ "http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png", diff --git a/js/ajax.js b/js/ajax.js index 5f51618546..9b7bbd5749 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -553,7 +553,7 @@ AJAX.cache = { * * @return int */ - size: function(obj) { + size: function (obj) { var size = 0, key; for (key in obj) { if (obj.hasOwnProperty(key)) { @@ -714,7 +714,7 @@ AJAX.setUrlHash = (function (jQuery, window) { } else { // We don't have a valid hash, so we'll set it up // when the page finishes loading - jQuery(function(){ + jQuery(function (){ /* Check if we should set URL */ if (savedHash !== "") { window.location.hash = savedHash; @@ -728,7 +728,7 @@ AJAX.setUrlHash = (function (jQuery, window) { /** * Register an event handler for when the url hash changes */ - jQuery(function(){ + jQuery(function (){ jQuery(window).hashchange(function () { if (userChange === false) { // Ignore internally triggered hash changes @@ -788,7 +788,7 @@ $('form').live('submit', AJAX.requestHandler); * Gracefully handle fatal server errors * (e.g: 500 - Internal server error) */ -$(document).ajaxError(function(event, request, settings){ +$(document).ajaxError(function (event, request, settings){ if (request.status !== 0) { // Don't handle aborted requests var errorCode = $.sprintf(PMA_messages['strErrorCode'], request.status); var errorText = $.sprintf(PMA_messages['strErrorText'], request.statusText); diff --git a/js/chart.js b/js/chart.js index 72d1a33234..da70c662bd 100644 --- a/js/chart.js +++ b/js/chart.js @@ -14,10 +14,10 @@ var ChartType = { /** * Abstract chart factory which defines the contract for chart factories */ -var ChartFactory = function() { +var ChartFactory = function () { }; ChartFactory.prototype = { - createChart : function(type, options) { + createChart : function (type, options) { throw new Error("createChart must be implemented by a subclass"); } }; @@ -28,17 +28,17 @@ ChartFactory.prototype = { * @param elementId * id of the div element the chart is drawn in */ -var Chart = function(elementId) { +var Chart = function (elementId) { this.elementId = elementId; }; Chart.prototype = { - draw : function(data, options) { + draw : function (data, options) { throw new Error("draw must be implemented by a subclass"); }, - redraw : function(options) { + redraw : function (options) { throw new Error("redraw must be implemented by a subclass"); }, - destroy : function() { + destroy : function () { throw new Error("destroy must be implemented by a subclass"); } }; @@ -55,12 +55,12 @@ Chart.prototype = { * @param elementId * id of the div element the chart is drawn in */ -var BaseChart = function(elementId) { +var BaseChart = function (elementId) { Chart.call(this, elementId); }; BaseChart.prototype = new Chart(); BaseChart.prototype.constructor = BaseChart; -BaseChart.prototype.validateColumns = function(dataTable) { +BaseChart.prototype.validateColumns = function (dataTable) { var columns = dataTable.getColumns(); if (columns.length < 2) { throw new Error("Minimum of two columns are required for this chart"); @@ -79,12 +79,12 @@ BaseChart.prototype.validateColumns = function(dataTable) { * @param elementId * id of the div element the chart is drawn in */ -var PieChart = function(elementId) { +var PieChart = function (elementId) { BaseChart.call(this, elementId); }; PieChart.prototype = new BaseChart(); PieChart.prototype.constructor = PieChart; -PieChart.prototype.validateColumns = function(dataTable) { +PieChart.prototype.validateColumns = function (dataTable) { var columns = dataTable.getColumns(); if (columns.length > 2) { throw new Error("Pie charts can draw only one series"); @@ -98,12 +98,12 @@ PieChart.prototype.validateColumns = function(dataTable) { * @param elementId * id of the div element the chart is drawn in */ -var TimelineChart = function(elementId) { +var TimelineChart = function (elementId) { BaseChart.call(this, elementId); }; TimelineChart.prototype = new BaseChart(); TimelineChart.prototype.constructor = TimelineChart; -TimelineChart.prototype.validateColumns = function(dataTable) { +TimelineChart.prototype.validateColumns = function (dataTable) { var result = BaseChart.prototype.validateColumns.call(this, dataTable); if (result) { var columns = dataTable.getColumns(); @@ -117,31 +117,31 @@ TimelineChart.prototype.validateColumns = function(dataTable) { /** * The data table contains column information and data for the chart. */ -var DataTable = function() { +var DataTable = function () { var columns = []; var data; - this.addColumn = function(type, name) { + this.addColumn = function (type, name) { columns.push({ 'type' : type, 'name' : name }); }; - this.getColumns = function() { + this.getColumns = function () { return columns; }; - this.setData = function(rows) { + this.setData = function (rows) { data = rows; fillMissingValues(); }; - this.getData = function() { + this.getData = function () { return data; }; - var fillMissingValues = function() { + var fillMissingValues = function () { if (columns.length === 0) { throw new Error("Set columns first"); } @@ -176,10 +176,10 @@ var ColumnType = { /** * Chart factory that returns JQPlotCharts */ -var JQPlotChartFactory = function() { +var JQPlotChartFactory = function () { }; JQPlotChartFactory.prototype = new ChartFactory(); -JQPlotChartFactory.prototype.createChart = function(type, elementId) { +JQPlotChartFactory.prototype.createChart = function (type, elementId) { var chart; switch (type) { case ChartType.LINE: @@ -214,33 +214,33 @@ JQPlotChartFactory.prototype.createChart = function(type, elementId) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotChart = function(elementId) { +var JQPlotChart = function (elementId) { Chart.call(this, elementId); this.plot; this.validator; }; JQPlotChart.prototype = new Chart(); JQPlotChart.prototype.constructor = JQPlotChart; -JQPlotChart.prototype.draw = function(data, options) { +JQPlotChart.prototype.draw = function (data, options) { if (this.validator.validateColumns(data)) { this.plot = $.jqplot(this.elementId, this.prepareData(data), this .populateOptions(data, options)); } }; -JQPlotChart.prototype.destroy = function() { +JQPlotChart.prototype.destroy = function () { if (this.plot !== null) { this.plot.destroy(); } }; -JQPlotChart.prototype.redraw = function(options) { +JQPlotChart.prototype.redraw = function (options) { if (this.plot !== null) { this.plot.replot(options); } }; -JQPlotChart.prototype.populateOptions = function(dataTable, options) { +JQPlotChart.prototype.populateOptions = function (dataTable, options) { throw new Error("populateOptions must be implemented by a subclass"); }; -JQPlotChart.prototype.prepareData = function(dataTable) { +JQPlotChart.prototype.prepareData = function (dataTable) { throw new Error("prepareData must be implemented by a subclass"); }; @@ -250,14 +250,14 @@ JQPlotChart.prototype.prepareData = function(dataTable) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotLineChart = function(elementId) { +var JQPlotLineChart = function (elementId) { JQPlotChart.call(this, elementId); this.validator = BaseChart.prototype; }; JQPlotLineChart.prototype = new JQPlotChart(); JQPlotLineChart.prototype.constructor = JQPlotLineChart; -JQPlotLineChart.prototype.populateOptions = function(dataTable, options) { +JQPlotLineChart.prototype.populateOptions = function (dataTable, options) { var columns = dataTable.getColumns(); var optional = { axes : { @@ -291,7 +291,7 @@ JQPlotLineChart.prototype.populateOptions = function(dataTable, options) { return optional; }; -JQPlotLineChart.prototype.prepareData = function(dataTable) { +JQPlotLineChart.prototype.prepareData = function (dataTable) { var data = dataTable.getData(), row; var retData = [], retRow; for ( var i = 0; i < data.length; i++) { @@ -314,13 +314,13 @@ JQPlotLineChart.prototype.prepareData = function(dataTable) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotSplineChart = function(elementId) { +var JQPlotSplineChart = function (elementId) { JQPlotLineChart.call(this, elementId); }; JQPlotSplineChart.prototype = new JQPlotLineChart(); JQPlotSplineChart.prototype.constructor = JQPlotSplineChart; -JQPlotSplineChart.prototype.populateOptions = function(dataTable, options) { +JQPlotSplineChart.prototype.populateOptions = function (dataTable, options) { var optional = {}; var opt = JQPlotLineChart.prototype.populateOptions.call(this, dataTable, options); @@ -341,14 +341,14 @@ JQPlotSplineChart.prototype.populateOptions = function(dataTable, options) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotTimelineChart = function(elementId) { +var JQPlotTimelineChart = function (elementId) { JQPlotLineChart.call(this, elementId); this.validator = TimelineChart.prototype; }; JQPlotTimelineChart.prototype = new JQPlotLineChart(); JQPlotTimelineChart.prototype.constructor = JQPlotAreaChart; -JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) { +JQPlotTimelineChart.prototype.populateOptions = function (dataTable, options) { var optional = { axes : { xaxis : { @@ -370,7 +370,7 @@ JQPlotTimelineChart.prototype.populateOptions = function(dataTable, options) { return optional; }; -JQPlotTimelineChart.prototype.prepareData = function(dataTable) { +JQPlotTimelineChart.prototype.prepareData = function (dataTable) { var data = dataTable.getData(), row, d; var retData = [], retRow; for ( var i = 0; i < data.length; i++) { @@ -396,13 +396,13 @@ JQPlotTimelineChart.prototype.prepareData = function(dataTable) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotAreaChart = function(elementId) { +var JQPlotAreaChart = function (elementId) { JQPlotLineChart.call(this, elementId); }; JQPlotAreaChart.prototype = new JQPlotLineChart(); JQPlotAreaChart.prototype.constructor = JQPlotAreaChart; -JQPlotAreaChart.prototype.populateOptions = function(dataTable, options) { +JQPlotAreaChart.prototype.populateOptions = function (dataTable, options) { var optional = { seriesDefaults : { fillToZero : true @@ -425,13 +425,13 @@ JQPlotAreaChart.prototype.populateOptions = function(dataTable, options) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotColumnChart = function(elementId) { +var JQPlotColumnChart = function (elementId) { JQPlotLineChart.call(this, elementId); }; JQPlotColumnChart.prototype = new JQPlotLineChart(); JQPlotColumnChart.prototype.constructor = JQPlotColumnChart; -JQPlotColumnChart.prototype.populateOptions = function(dataTable, options) { +JQPlotColumnChart.prototype.populateOptions = function (dataTable, options) { var optional = { seriesDefaults : { fillToZero : true @@ -454,13 +454,13 @@ JQPlotColumnChart.prototype.populateOptions = function(dataTable, options) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotBarChart = function(elementId) { +var JQPlotBarChart = function (elementId) { JQPlotLineChart.call(this, elementId); }; JQPlotBarChart.prototype = new JQPlotLineChart(); JQPlotBarChart.prototype.constructor = JQPlotBarChart; -JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { +JQPlotBarChart.prototype.populateOptions = function (dataTable, options) { var columns = dataTable.getColumns(); var optional = { axes : { @@ -512,14 +512,14 @@ JQPlotBarChart.prototype.populateOptions = function(dataTable, options) { * @param elementId * id of the div element the chart is drawn in */ -var JQPlotPieChart = function(elementId) { +var JQPlotPieChart = function (elementId) { JQPlotChart.call(this, elementId); this.validator = PieChart.prototype; }; JQPlotPieChart.prototype = new JQPlotChart(); JQPlotPieChart.prototype.constructor = JQPlotPieChart; -JQPlotPieChart.prototype.populateOptions = function(dataTable, options) { +JQPlotPieChart.prototype.populateOptions = function (dataTable, options) { var optional = {}; var compulsory = { seriesDefaults : { @@ -530,7 +530,7 @@ JQPlotPieChart.prototype.populateOptions = function(dataTable, options) { return optional; }; -JQPlotPieChart.prototype.prepareData = function(dataTable) { +JQPlotPieChart.prototype.prepareData = function (dataTable) { var data = dataTable.getData(), row; var retData = []; for ( var i = 0; i < data.length; i++) { diff --git a/js/common.js b/js/common.js index 017a5bad6a..7156ba9868 100644 --- a/js/common.js +++ b/js/common.js @@ -207,7 +207,7 @@ var PMA_querywindow = (function ($, window) { ); } if (! querywindow.opener) { - querywindow.opener = window.window; + querywindow.opener = window.window; } if (window.focus) { querywindow.focus(); diff --git a/js/config.js b/js/config.js index d08d39cd6a..c16055fa9c 100644 --- a/js/config.js +++ b/js/config.js @@ -6,7 +6,7 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('config.js', function() { +AJAX.registerTeardown('config.js', function () { $('input[id], select[id], textarea[id]').unbind('change').unbind('keyup'); $('input[type=button][name=submit_reset]').unbind('click'); $('div.tabs_contents').undelegate(); @@ -16,7 +16,7 @@ AJAX.registerTeardown('config.js', function() { $('#prefs_autoload').find('a').unbind('click'); }); -AJAX.registerOnload('config.js', function() { +AJAX.registerOnload('config.js', function () { $('#topmenu2').find('li.active a').attr('rel', 'samepage'); $('#topmenu2').find('li:not(.active) a').attr('rel', 'newpage'); }); @@ -60,27 +60,27 @@ function setFieldValue(field, field_type, value) { field = $(field); switch (field_type) { - case 'text': - //TODO: replace to .val() - field.attr('value', (value !== undefined ? value : field.attr('defaultValue'))); - break; - case 'checkbox': - //TODO: replace to .prop() - field.attr('checked', (value !== undefined ? value : field.attr('defaultChecked'))); - break; - case 'select': - var options = field.prop('options'); - var i, imax = options.length; - if (value === undefined) { - for (i = 0; i < imax; i++) { - options[i].selected = options[i].defaultSelected; - } - } else { - for (i = 0; i < imax; i++) { - options[i].selected = (value.indexOf(options[i].value) != -1); - } + case 'text': + //TODO: replace to .val() + field.attr('value', (value !== undefined ? value : field.attr('defaultValue'))); + break; + case 'checkbox': + //TODO: replace to .prop() + field.attr('checked', (value !== undefined ? value : field.attr('defaultChecked'))); + break; + case 'select': + var options = field.prop('options'); + var i, imax = options.length; + if (value === undefined) { + for (i = 0; i < imax; i++) { + options[i].selected = options[i].defaultSelected; } - break; + } else { + for (i = 0; i < imax; i++) { + options[i].selected = (value.indexOf(options[i].value) != -1); + } + } + break; } markField(field); } @@ -101,19 +101,19 @@ function getFieldValue(field, field_type) { field = $(field); switch (field_type) { - case 'text': - return field.prop('value'); - case 'checkbox': - return field.prop('checked'); - case 'select': - var options = field.prop('options'); - var i, imax = options.length, items = []; - for (i = 0; i < imax; i++) { - if (options[i].selected) { - items.push(options[i].value); - } + case 'text': + return field.prop('value'); + case 'checkbox': + return field.prop('checked'); + case 'select': + var options = field.prop('options'); + var i, imax = options.length, items = []; + for (i = 0; i < imax; i++) { + if (options[i].selected) { + items.push(options[i].value); } - return items; + } + return items; } return null; } @@ -226,7 +226,7 @@ var validators = { * * @param {boolean} isKeyUp */ - validate_port_number: function(isKeyUp) { + validate_port_number: function (isKeyUp) { if (this.value === '') { return true; } @@ -239,7 +239,7 @@ var validators = { * @param {boolean} isKeyUp * @param {string} regexp */ - validate_by_regex: function(isKeyUp, regexp) { + validate_by_regex: function (isKeyUp, regexp) { if (isKeyUp && this.value === '') { return true; } @@ -254,7 +254,7 @@ var validators = { * @param {boolean} isKeyUp * @param {int} max_value */ - validate_upper_bound: function(isKeyUp, max_value) { + validate_upper_bound: function (isKeyUp, max_value) { var val = parseInt(this.value, 10); if (isNaN(val)) { return true; @@ -338,7 +338,7 @@ function displayErrors(error_list) : field.siblings('.inline_errors'); // remove empty errors (used to clear error list) - errors = $.grep(errors, function(item) { + errors = $.grep(errors, function (item) { return item !== ''; }); @@ -469,27 +469,27 @@ function setRestoreDefaultBtn(field, display) el[display ? 'show' : 'hide'](); } -AJAX.registerOnload('config.js', function() { +AJAX.registerOnload('config.js', function () { // register validators and mark custom values var elements = $('input[id], select[id], textarea[id]'); - $('input[id], select[id], textarea[id]').each(function(){ + $('input[id], select[id], textarea[id]').each(function (){ markField(this); var el = $(this); - el.bind('change', function() { + el.bind('change', function () { validate_field_and_fieldset(this, false); markField(this); }); 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); } }); @@ -503,7 +503,7 @@ AJAX.registerOnload('config.js', function() { validate_field(elements[i], false, errors); } // run all fieldset validators - $('fieldset').each(function(){ + $('fieldset').each(function (){ validate_fieldset(this, false, errors); }); @@ -534,14 +534,14 @@ function setTab(tab_id) $('form.config-form input[name=tab_hash]').val(location.hash); } -AJAX.registerOnload('config.js', function() { +AJAX.registerOnload('config.js', function () { var tabs = $('ul.tabs'); if (!tabs.length) { return; } // add tabs events and activate one tab (the first one or indicated by location hash) tabs.find('a') - .click(function(e) { + .click(function (e) { e.preventDefault(); setTab($(this).attr('href').substr(1)); }) @@ -553,7 +553,7 @@ AJAX.registerOnload('config.js', function() { // tab links handling, check each 200ms // (works with history in FF, further browser support here would be an overkill) var prev_hash; - var tab_check_fnc = function() { + var tab_check_fnc = function () { if (location.hash != prev_hash) { prev_hash = location.hash; if (location.hash.match(/^#tab_.+/) && $('#' + location.hash.substr(5)).length) { @@ -573,8 +573,8 @@ AJAX.registerOnload('config.js', function() { // Form reset buttons // -AJAX.registerOnload('config.js', function() { - $('input[type=button][name=submit_reset]').click(function() { +AJAX.registerOnload('config.js', function () { + $('input[type=button][name=submit_reset]').click(function () { var fields = $(this).closest('fieldset').find('input, select, textarea'); for (var i = 0, imax = fields.length; i < imax; i++) { setFieldValue(fields[i], getFieldType(fields[i])); @@ -604,11 +604,11 @@ function restoreField(field_id) setFieldValue(field, getFieldType(field), defaultValues[field_id]); } -AJAX.registerOnload('config.js', function() { +AJAX.registerOnload('config.js', function () { $('div.tabs_contents') - .delegate('.restore-default, .set-value', 'mouseenter', function(){$(this).css('opacity', 1);}) - .delegate('.restore-default, .set-value', 'mouseleave', function(){$(this).css('opacity', 0.25);}) - .delegate('.restore-default, .set-value', 'click', function(e) { + .delegate('.restore-default, .set-value', 'mouseenter', function (){$(this).css('opacity', 1);}) + .delegate('.restore-default, .set-value', 'mouseleave', function (){$(this).css('opacity', 0.25);}) + .delegate('.restore-default, .set-value', 'click', function (e) { e.preventDefault(); var href = $(this).attr('href'); var field_sel; @@ -635,7 +635,7 @@ AJAX.registerOnload('config.js', function() { // User preferences import/export // -AJAX.registerOnload('config.js', function() { +AJAX.registerOnload('config.js', function () { offerPrefsAutoimport(); var radios = $('#import_local_storage, #export_local_storage'); if (!radios.length) { @@ -646,7 +646,7 @@ AJAX.registerOnload('config.js', function() { radios .prop('disabled', false) .add('#export_text_file, #import_text_file') - .click(function(){ + .click(function (){ var enable_id = $(this).attr('id'); var disable_id = enable_id.match(/local_storage$/) ? enable_id.replace(/local_storage$/, 'text_file') @@ -663,7 +663,7 @@ AJAX.registerOnload('config.js', function() { if (ls_exists) { updatePrefsDate(); } - $('form.prefs-form').change(function(){ + $('form.prefs-form').change(function (){ var form = $(this); var disabled = false; if (!ls_supported) { @@ -673,7 +673,7 @@ AJAX.registerOnload('config.js', function() { disabled = true; } form.find('input[type=submit]').prop('disabled', disabled); - }).submit(function(e) { + }).submit(function (e) { var form = $(this); if (form.attr('name') == 'prefs_export' && $('#export_local_storage')[0].checked) { e.preventDefault(); @@ -685,7 +685,7 @@ AJAX.registerOnload('config.js', function() { } }); - $('div.click-hide-message').live('click', function(){ + $('div.click-hide-message').live('click', function (){ $(this) .hide() .parent('.group') @@ -714,7 +714,7 @@ function savePrefsToLocalStorage(form) token: form.find('input[name=token]').val(), submit_get_json: true }, - success: function(response) { + success: function (response) { window.localStorage['config'] = response.prefs; window.localStorage['config_mtime'] = response.mtime; window.localStorage['config_mtime_local'] = (new Date()).toUTCString(); @@ -726,7 +726,7 @@ function savePrefsToLocalStorage(form) form.hide('fast'); form.prev('.click-hide-message').show('fast'); }, - complete: function() { + complete: function () { submit.prop('disabled', false); } }); @@ -766,7 +766,7 @@ function offerPrefsAutoimport() if (!cnt.length || !has_config) { return; } - cnt.find('a').click(function(e) { + cnt.find('a').click(function (e) { e.preventDefault(); var a = $(this); if (a.attr('href') == '#no') { diff --git a/js/db_operations.js b/js/db_operations.js index 371b9edf83..3ed84c04fb 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -21,18 +21,18 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('db_operations.js', function() { +AJAX.registerTeardown('db_operations.js', function () { $("#rename_db_form.ajax").die('submit'); $("#copy_db_form.ajax").die('submit'); $("#change_db_charset_form.ajax").die('submit'); }); -AJAX.registerOnload('db_operations.js', function() { +AJAX.registerOnload('db_operations.js', function () { /** * Ajax event handlers for 'Rename Database' */ - $("#rename_db_form.ajax").live('submit', function(event) { + $("#rename_db_form.ajax").live('submit', function (event) { event.preventDefault(); var $form = $(this); @@ -41,17 +41,17 @@ AJAX.registerOnload('db_operations.js', function() { PMA_prepareForAjaxRequest($form); - $form.PMA_confirm(question, $form.attr('action'), function(url) { + $form.PMA_confirm(question, $form.attr('action'), function (url) { PMA_ajaxShowMessage(PMA_messages['strRenamingDatabases'], false); - $.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function(data) { + $.get(url, $("#rename_db_form").serialize() + '&is_js_confirmed=1', function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); PMA_commonParams.set('db', data.newname); - PMA_reloadNavigation(function() { + PMA_reloadNavigation(function () { $('#pma_navigation_tree') .find("a:not('.expander')") - .each(function(index) { + .each(function (index) { var $thisAnchor = $(this); if ($thisAnchor.text() == data.newname) { // simulate a click on the new db name @@ -70,12 +70,12 @@ AJAX.registerOnload('db_operations.js', function() { /** * Ajax Event Handler for 'Copy Database' */ - $("#copy_db_form.ajax").live('submit', function(event) { + $("#copy_db_form.ajax").live('submit', function (event) { event.preventDefault(); PMA_ajaxShowMessage(PMA_messages['strCopyingDatabase'], false); var $form = $(this); PMA_prepareForAjaxRequest($form); - $.get($form.attr('action'), $form.serialize(), function(data) { + $.get($form.attr('action'), $form.serialize(), function (data) { // use messages that stay on screen $('div.success, div.error').fadeOut(); if (data.success === true) { @@ -98,12 +98,12 @@ AJAX.registerOnload('db_operations.js', function() { /** * Ajax Event handler for 'Change Charset' of the database */ - $("#change_db_charset_form.ajax").live('submit', function(event) { + $("#change_db_charset_form.ajax").live('submit', function (event) { event.preventDefault(); var $form = $(this); PMA_prepareForAjaxRequest($form); PMA_ajaxShowMessage(PMA_messages['strChangingCharset']); - $.get($form.attr('action'), $form.serialize() + "&submitcollation=1", function(data) { + $.get($form.attr('action'), $form.serialize() + "&submitcollation=1", function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); } else { diff --git a/js/db_search.js b/js/db_search.js index 2588fba454..daf159da77 100644 --- a/js/db_search.js +++ b/js/db_search.js @@ -18,7 +18,7 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('db_search.js', function() { +AJAX.registerTeardown('db_search.js', function () { $('#buttonGo').unbind('click'); $('#togglesearchresultlink').unbind('click'); $("#togglequerybox").unbind('click'); @@ -36,7 +36,7 @@ AJAX.registerTeardown('db_search.js', function() { */ function loadResult(result_path, table_name, link) { - $(function() { + $(function () { /** Hides the results shown by the delete criteria */ var $msg = PMA_ajaxShowMessage(PMA_messages['strBrowsing'], false); $('#sqlqueryform').hide(); @@ -45,7 +45,7 @@ function loadResult(result_path, table_name, link) $("#table-info").show(); $('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name); var url = result_path + " #sqlqueryresults"; - $('#browse-results').load(url, null, function() { + $('#browse-results').load(url, null, function () { $('html, body') .animate({ scrollTop: $("#browse-results").offset().top @@ -66,7 +66,7 @@ function loadResult(result_path, table_name, link) */ function deleteResult(result_path, msg) { - $(function() { + $(function () { /** Hides the results shown by the browse criteria */ $("#table-info").hide(); $('#browse-results').hide(); @@ -92,17 +92,17 @@ function deleteResult(result_path, msg) }, 1000); PMA_ajaxRemoveMessage($msg); }); - } + } }); } -AJAX.registerOnload('db_search.js', function() { +AJAX.registerOnload('db_search.js', function () { /** Hide the table link in the initial search result */ var icon = PMA_getImage('s_tbl.png', '', {'id': 'table-image'}).toString(); $("#table-info").prepend(icon).hide(); /** Hide the browse and deleted results in the new search criteria */ - $('#buttonGo').click(function(){ + $('#buttonGo').click(function (){ $("#table-info").hide(); $('#browse-results').hide(); $('#sqlqueryform').hide(); @@ -123,16 +123,16 @@ AJAX.registerOnload('db_search.js', function() { */ $('#togglesearchresultlink') .html(PMA_messages['strHideSearchResults']) - .bind('click', function() { - var $link = $(this); - $('#searchresults').slideToggle(); - if ($link.text() == PMA_messages['strHideSearchResults']) { - $link.text(PMA_messages['strShowSearchResults']); - } else { - $link.text(PMA_messages['strHideSearchResults']); - } - /** avoid default click action */ - return false; + .bind('click', function () { + var $link = $(this); + $('#searchresults').slideToggle(); + if ($link.text() == PMA_messages['strHideSearchResults']) { + $link.text(PMA_messages['strShowSearchResults']); + } else { + $link.text(PMA_messages['strHideSearchResults']); + } + /** avoid default click action */ + return false; }); /** @@ -149,7 +149,7 @@ AJAX.registerOnload('db_search.js', function() { */ $("#togglequerybox") .hide() - .bind('click', function() { + .bind('click', function () { var $link = $(this); $('#sqlqueryform').slideToggle("medium"); if ($link.text() == PMA_messages['strHideQueryBox']) { @@ -163,13 +163,13 @@ AJAX.registerOnload('db_search.js', function() { /** don't show it until we have results on-screen */ - /** - * Changing the displayed text according to - * the hide/show criteria in search criteria form - */ - $('#togglesearchformlink') + /** + * Changing the displayed text according to + * the hide/show criteria in search criteria form + */ + $('#togglesearchformlink') .html(PMA_messages['strShowSearchCriteria']) - .bind('click', function() { + .bind('click', function () { var $link = $(this); $('#db_search_form').slideToggle(); if ($link.text() == PMA_messages['strHideSearchCriteria']) { @@ -179,11 +179,11 @@ AJAX.registerOnload('db_search.js', function() { } /** avoid default click action */ return false; - }); + }); /** * Ajax Event handler for retrieving the result of an SQL Query */ - $("#db_search_form.ajax").live('submit', function(event) { + $("#db_search_form.ajax").live('submit', function (event) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching'], false); @@ -193,7 +193,7 @@ AJAX.registerOnload('db_search.js', function() { PMA_prepareForAjaxRequest($form); var url = $form.serialize() + "&submit_search=" + $("#buttonGo").val(); - $.post($form.attr('action'), url, function(data) { + $.post($form.attr('action'), url, function (data) { if (data.success === true) { // found results $("#searchresults").html(data.message); diff --git a/js/db_structure.js b/js/db_structure.js index 2aad200d24..9cc8dee4ff 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -21,7 +21,7 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('db_structure.js', function() { +AJAX.registerTeardown('db_structure.js', function () { $("span.fkc_switch").unbind('click'); $('#fkc_checkbox').unbind('change'); $("a.truncate_table_anchor.ajax").die('click'); @@ -129,7 +129,7 @@ function PMA_adjustTotals() { $summary.find('.tbl_overhead').text(overheadSum + " " + byteUnits[overhead_magnitude]); } -AJAX.registerOnload('db_structure.js', function() { +AJAX.registerOnload('db_structure.js', function () { /** * Handler for the print view multisubmit. * All other multi submits can be handled via ajax, but this one needs @@ -159,14 +159,14 @@ AJAX.registerOnload('db_structure.js', function() { * Event handler for 'Foreign Key Checks' disabling option * in the drop table confirmation form */ - $("span.fkc_switch").click(function(event){ - if ($("#fkc_checkbox").prop('checked')) { - $("#fkc_checkbox").prop('checked', false); - $("#fkc_status").html(PMA_messages['strForeignKeyCheckDisabled']); - return; - } - $("#fkc_checkbox").prop('checked', true); - $("#fkc_status").html(PMA_messages['strForeignKeyCheckEnabled']); + $("span.fkc_switch").click(function (event){ + if ($("#fkc_checkbox").prop('checked')) { + $("#fkc_checkbox").prop('checked', false); + $("#fkc_status").html(PMA_messages['strForeignKeyCheckDisabled']); + return; + } + $("#fkc_checkbox").prop('checked', true); + $("#fkc_status").html(PMA_messages['strForeignKeyCheckEnabled']); }); $('#fkc_checkbox').change(function () { @@ -180,7 +180,7 @@ AJAX.registerOnload('db_structure.js', function() { /** * Ajax Event handler for 'Truncate Table' */ - $("a.truncate_table_anchor.ajax").live('click', function(event) { + $("a.truncate_table_anchor.ajax").live('click', function (event) { event.preventDefault(); /** @@ -200,11 +200,11 @@ AJAX.registerOnload('db_structure.js', function() { PMA_messages.strTruncateTableStrongWarning + ' ' + $.sprintf(PMA_messages.strDoYouReally, 'TRUNCATE ' + escapeHtml(curr_table_name)); - $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function(url) { + $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { + $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); // Adjust table statistics @@ -230,7 +230,7 @@ AJAX.registerOnload('db_structure.js', function() { /** * Ajax Event handler for 'Drop Table' or 'Drop View' */ - $("a.drop_table_anchor.ajax").live('click', function(event) { + $("a.drop_table_anchor.ajax").live('click', function (event) { event.preventDefault(); var $this_anchor = $(this); @@ -261,11 +261,11 @@ AJAX.registerOnload('db_structure.js', function() { $.sprintf(PMA_messages.strDoYouReally, 'DROP VIEW ' + escapeHtml(curr_table_name)); } - $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function(url) { + $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { + $.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); toggleRowColors($curr_row.next()); @@ -283,7 +283,7 @@ AJAX.registerOnload('db_structure.js', function() { /** * Ajax Event handler for 'Drop tracking' */ - $('a.drop_tracking_anchor.ajax').live('click', function(event) { + $('a.drop_tracking_anchor.ajax').live('click', function (event) { event.preventDefault(); var $anchor = $(this); @@ -297,11 +297,11 @@ AJAX.registerOnload('db_structure.js', function() { */ var question = PMA_messages['strDeleteTrackingData']; - $anchor.PMA_confirm(question, $anchor.attr('href'), function(url) { + $anchor.PMA_confirm(question, $anchor.attr('href'), function (url) { PMA_ajaxShowMessage(PMA_messages['strDeletingTrackingData']); - $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) { + $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) { if (data.success === true) { var $tracked_table = $curr_tracking_row.parents('table'); var table_name = $curr_tracking_row.find('td:nth-child(2)').text(); @@ -313,7 +313,7 @@ AJAX.registerOnload('db_structure.js', function() { } else { // There are more rows left after the deletion toggleRowColors($curr_tracking_row.next()); - $curr_tracking_row.hide("slow", function() { + $curr_tracking_row.hide("slow", function () { $(this).remove(); }); } @@ -325,7 +325,7 @@ AJAX.registerOnload('db_structure.js', function() { if ($untracked_table.length > 0) { var $rows = $untracked_table.find('tbody tr'); - $rows.each(function(index) { + $rows.each(function (index) { var $row = $(this); var tmp_tbl_name = $row.find('td:first-child').text(); var is_last_iteration = (index == ($rows.length - 1)); @@ -369,7 +369,7 @@ AJAX.registerOnload('db_structure.js', function() { * Ajax Event handler for calculatig the real end for a InnoDB table * */ - $('#real_end_input').live('click', function(event) { + $('#real_end_input').live('click', function (event) { event.preventDefault(); /** @@ -377,7 +377,7 @@ AJAX.registerOnload('db_structure.js', function() { */ var question = PMA_messages['strOperationTakesLongTime']; - $(this).PMA_confirm(question, '', function() { + $(this).PMA_confirm(question, '', function () { return true; }); return false; diff --git a/js/export.js b/js/export.js index 12689e11b7..81b30ff95e 100644 --- a/js/export.js +++ b/js/export.js @@ -7,7 +7,7 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('export.js', function() { +AJAX.registerTeardown('export.js', function () { $("#plugins").unbind('change'); $("input[type='radio'][name='sql_structure_or_data']").unbind('change'); $("input[type='radio'][name='latex_structure_or_data']").unbind('change'); @@ -27,16 +27,16 @@ AJAX.registerOnload('export.js', function () { * Toggles the hiding and showing of each plugin's options * according to the currently selected plugin from the dropdown list */ - $("#plugins").change(function() { + $("#plugins").change(function () { $("#format_specific_opts div.format_specific_options").hide(); var selected_plugin_name = $("#plugins option:selected").val(); $("#" + selected_plugin_name + "_options").show(); - }); + }); /** * Toggles the enabling and disabling of the SQL plugin's comment options that apply only when exporting structure */ - $("input[type='radio'][name='sql_structure_or_data']").change(function() { + $("input[type='radio'][name='sql_structure_or_data']").change(function () { var comments_are_present = $("#checkbox_sql_include_comments").prop("checked"); var show = $("input[type='radio'][name='sql_structure_or_data']:checked").val(); if (show == 'data') { @@ -54,7 +54,7 @@ AJAX.registerOnload('export.js', function () { $("#checkbox_sql_relation").removeProp('disabled').parent().fadeTo('fast', 1); $("#checkbox_sql_mime").removeProp('disabled').parent().fadeTo('fast', 1); } - }); + }); }); @@ -82,19 +82,19 @@ function toggle_structure_data_opts(pluginName) } AJAX.registerOnload('export.js', function () { - $("input[type='radio'][name='latex_structure_or_data']").change(function() { + $("input[type='radio'][name='latex_structure_or_data']").change(function () { toggle_structure_data_opts("latex"); }); - $("input[type='radio'][name='odt_structure_or_data']").change(function() { + $("input[type='radio'][name='odt_structure_or_data']").change(function () { toggle_structure_data_opts("odt"); }); - $("input[type='radio'][name='texytext_structure_or_data']").change(function() { + $("input[type='radio'][name='texytext_structure_or_data']").change(function () { toggle_structure_data_opts("texytext"); }); - $("input[type='radio'][name='htmlword_structure_or_data']").change(function() { + $("input[type='radio'][name='htmlword_structure_or_data']").change(function () { toggle_structure_data_opts("htmlword"); }); - $("input[type='radio'][name='sql_structure_or_data']").change(function() { + $("input[type='radio'][name='sql_structure_or_data']").change(function () { toggle_structure_data_opts("sql"); }); }); @@ -125,7 +125,7 @@ AJAX.registerOnload('export.js', function () { */ function toggle_sql_include_comments() { - $("#checkbox_sql_include_comments").change(function() { + $("#checkbox_sql_include_comments").change(function () { if (!$("#checkbox_sql_include_comments").prop("checked")) { $("#ul_include_comments > li").fadeTo('fast', 0.4); $("#ul_include_comments > li > input").prop('disabled', true); @@ -147,10 +147,10 @@ AJAX.registerOnload('export.js', function () { */ var $create = $("#checkbox_sql_create_table_statements"); var $create_options = $("#ul_create_table_statements input"); - $create.change(function() { + $create.change(function () { $create_options.prop('checked', $(this).prop("checked")); }); - $create_options.change(function() { + $create_options.change(function () { if ($create_options.is(":checked")) { $create.prop('checked', true); } @@ -159,7 +159,7 @@ AJAX.registerOnload('export.js', function () { /** * Disables the view output as text option if the output must be saved as a file */ - $("#plugins").change(function() { + $("#plugins").change(function () { var active_plugin = $("#plugins option:selected").val(); var force_file = $("#force_file_" + active_plugin).val(); if (force_file == "true") { @@ -220,7 +220,7 @@ AJAX.registerOnload('export.js', function () { /** * Disables the "Dump some row(s)" sub-options when it is not selected */ - $("input[type='radio'][name='allrows']").change(function() { + $("input[type='radio'][name='allrows']").change(function () { if ($("input[type='radio'][name='allrows']").prop("checked")) { $("label[for='limit_to']").fadeTo('fast', 0.4); $("label[for='limit_from']").fadeTo('fast', 0.4); diff --git a/js/functions.js b/js/functions.js index 5c867a4bd8..037a5b4658 100644 --- a/js/functions.js +++ b/js/functions.js @@ -209,17 +209,17 @@ function PMA_addDatepicker($this_element, options) timeFormat: 'HH:mm:ss', altFieldTimeOnly: false, showAnim: '', - beforeShow: function(input, inst) { + beforeShow: function (input, inst) { // Remember that we came from the datepicker; this is used // in tbl_change.js by verificationsAfterFieldChange() $this_element.data('comes_from', 'datepicker'); // Fix wrong timepicker z-index, doesn't work without timeout - setTimeout(function() { + setTimeout(function () { $('#ui-timepicker-div').css('z-index',$('#ui-datepicker-div').css('z-index')); }, 0); }, - onClose: function(dateText, dp_inst) { + onClose: function (dateText, dp_inst) { // The value is no more from the date picker $this_element.data('comes_from', ''); } @@ -551,17 +551,17 @@ function checkTableEditForm(theForm, fieldsCnt) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('input:checkbox.checkall').die('click'); }); -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** * Row marking in horizontal mode (use "live" so that it works also for * next pages reached via AJAX); a tr may have the class noclick to remove * this behavior. */ - $('input:checkbox.checkall').live('click', function(e) { + $('input:checkbox.checkall').live('click', function (e) { var $tr = $(this).closest('tr'); // make the table unselectable (to prevent default highlighting when shift+click) @@ -667,8 +667,8 @@ var last_shift_clicked_row = -1; * Row highlighting in horizontal mode (use "live" * so that it works also for pages reached via AJAX) */ -/*AJAX.registerOnload('functions.js', function() { - $('tr.odd, tr.even').live('hover',function(event) { +/*AJAX.registerOnload('functions.js', function () { + $('tr.odd, tr.even').live('hover',function (event) { var $tr = $(this); $tr.toggleClass('hover',event.type=='mouseover'); $tr.children().toggleClass('hover',event.type=='mouseover'); @@ -856,7 +856,7 @@ function insertValueQuery() */ function addDateTimePicker() { if ($.timepicker !== undefined) { - $('input.datefield, input.datetimefield').each(function() { + $('input.datefield, input.datetimefield').each(function () { PMA_addDatepicker($(this)); }); } @@ -1315,7 +1315,7 @@ function pdfPaperSize(format, axis) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("a.inline_edit_sql").die('click'); $("input#sql_query_edit_save").die('click'); $("input#sql_query_edit_discard").die('click'); @@ -1339,11 +1339,11 @@ AJAX.registerTeardown('functions.js', function() { /** * Jquery Coding for inline editing SQL_QUERY */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { // If we are coming back to the page by clicking forward button // of the browser, bind the code mirror to inline query editor. bindCodeMirrorToInlineEditor(); - $("a.inline_edit_sql").live('click', function() { + $("a.inline_edit_sql").live('click', function () { if ($('#sql_query_edit').length) { // An inline query editor is already open, // we don't want another copy of it @@ -1370,7 +1370,7 @@ AJAX.registerOnload('functions.js', function() { return false; }); - $("input#sql_query_edit_save").live('click', function() { + $("input#sql_query_edit_save").live('click', function () { if (codemirror_inline_editor) { var sql_query = codemirror_inline_editor.getValue(); } else { @@ -1385,18 +1385,18 @@ AJAX.registerOnload('functions.js', function() { $fake_form.appendTo($('body')).submit(); }); - $("input#sql_query_edit_discard").live('click', function() { + $("input#sql_query_edit_discard").live('click', function () { $('div#inline_editor_outer') .empty() .siblings('.inner_sql').show(); }); - $('input.sqlbutton').click(function(evt) { + $('input.sqlbutton').click(function (evt) { insertQuery(evt.target.id); return false; }); - $("#export_type").change(function() { + $("#export_type").change(function () { if ($("#export_type").val()=='svg') { $("#show_grid_opt").prop("disabled",true); $("#orientation_opt").prop("disabled",true); @@ -1575,7 +1575,7 @@ function PMA_ajaxShowMessage(message, timeout) if (self_closing) { $retval .delay(timeout) - .fadeOut('medium', function() { + .fadeOut('medium', function () { if ($(this).is('.dismissable')) { $(this).tooltip('destroy'); } @@ -1625,7 +1625,7 @@ function PMA_ajaxRemoveMessage($this_msgbox) } // This event only need to be fired once after the initial page load -$(function() { +$(function () { /** * Allows the user to dismiss a notification * created with PMA_ajaxShowMessage() @@ -1746,7 +1746,7 @@ function PMA_SQLPrettyPrint(string) var state = mode.startState(); var token, tokens = []; var output = ''; - var tabs = function(cnt) { + var tabs = function (cnt) { var ret = ''; for (var i=0; i<4*cnt; i++) { ret += " "; @@ -1889,7 +1889,7 @@ function PMA_SQLPrettyPrint(string) * @param function callbackFn callback to execute after user clicks on OK */ -jQuery.fn.PMA_confirm = function(question, url, callbackFn) { +jQuery.fn.PMA_confirm = function (question, url, callbackFn) { var confirmState = PMA_commonParams.get('confirm'); // when the Confirm directive is set to false in config.inc.php // and not changed in user prefs, confirmState is "" @@ -1910,14 +1910,14 @@ jQuery.fn.PMA_confirm = function(question, url, callbackFn) { * dialog */ var button_options = {}; - button_options[PMA_messages['strOK']] = function() { + button_options[PMA_messages['strOK']] = function () { $(this).dialog("close"); if ($.isFunction(callbackFn)) { callbackFn.call(this, url); } }; - button_options[PMA_messages['strCancel']] = function() { + button_options[PMA_messages['strCancel']] = function () { $(this).dialog("close"); }; @@ -1940,8 +1940,8 @@ jQuery.fn.PMA_confirm = function(question, url, callbackFn) { * * @return jQuery Object for chaining purposes */ -jQuery.fn.PMA_sort_table = function(text_selector) { - return this.each(function() { +jQuery.fn.PMA_sort_table = function (text_selector) { + return this.each(function () { /** * @var table_body Object referring to the table's element @@ -1953,12 +1953,12 @@ jQuery.fn.PMA_sort_table = function(text_selector) { var rows = $(this).find('tr').get(); //get the text of the field that we will sort by - $.each(rows, function(index, row) { + $.each(rows, function (index, row) { row.sortKey = $.trim($(row).find(text_selector).text().toLowerCase()); }); //get the sorted order - rows.sort(function(a, b) { + rows.sort(function (a, b) { if (a.sortKey < b.sortKey) { return -1; } @@ -1969,7 +1969,7 @@ jQuery.fn.PMA_sort_table = function(text_selector) { }); //pull out each row from the table and then append it according to it's order - $.each(rows, function(index, row) { + $.each(rows, function (index, row) { $(table_body).append(row); row.sortKey = null; }); @@ -1986,7 +1986,7 @@ jQuery.fn.PMA_sort_table = function(text_selector) { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("#create_table_form_minimal.ajax").die('submit'); $("form.create_table_form.ajax").die('submit'); $("form.create_table_form.ajax input[name=submit_num_fields]").die('click'); @@ -2000,11 +2000,11 @@ AJAX.registerTeardown('functions.js', function() { * * Attach Ajax Event handlers for Create Table */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** * Attach event handler for submission of create table form (save) */ - $("form.create_table_form.ajax").live('submit', function(event) { + $("form.create_table_form.ajax").live('submit', function (event) { event.preventDefault(); /** @@ -2024,7 +2024,7 @@ AJAX.registerOnload('functions.js', function() { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); PMA_prepareForAjaxRequest($form); //User wants to submit the form - $.post($form.attr('action'), $form.serialize() + "&do_save_data=1", function(data) { + $.post($form.attr('action'), $form.serialize() + "&do_save_data=1", function (data) { if (data.success === true) { $('#properties_message') .removeClass('error') @@ -2094,7 +2094,7 @@ AJAX.registerOnload('functions.js', function() { /** * Attach event handler for create table form (add fields) */ - $("form.create_table_form.ajax input[name=submit_num_fields]").live('click', function(event) { + $("form.create_table_form.ajax input[name=submit_num_fields]").live('click', function (event) { event.preventDefault(); /** * @var the_form object referring to the create table form @@ -2105,7 +2105,7 @@ AJAX.registerOnload('functions.js', function() { PMA_prepareForAjaxRequest($form); //User wants to add more fields to the table - $.post($form.attr('action'), $form.serialize() + "&submit_num_fields=1", function(data) { + $.post($form.attr('action'), $form.serialize() + "&submit_num_fields=1", function (data) { if (data.success) { $("#page_content").html(data.message); PMA_verifyColumnsProperties(); @@ -2132,7 +2132,7 @@ AJAX.registerOnload('functions.js', function() { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("#copyTable.ajax").die('submit'); $("#moveTableForm").die('submit'); $("#tableOptionsForm").die('submit'); @@ -2142,15 +2142,15 @@ AJAX.registerTeardown('functions.js', function() { * jQuery coding for 'Table operations'. Used on tbl_operations.php * Attach Ajax Event handlers for Table operations */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** *Ajax action for submitting the "Copy table" **/ - $("#copyTable.ajax").live('submit', function(event) { + $("#copyTable.ajax").live('submit', function (event) { event.preventDefault(); var $form = $(this); PMA_prepareForAjaxRequest($form); - $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function(data) { + $.post($form.attr('action'), $form.serialize()+"&submit_copy=Go", function (data) { if (data.success === true) { if ($form.find("input[name='switch_to_new']").prop('checked')) { PMA_commonParams.set( @@ -2178,13 +2178,13 @@ AJAX.registerOnload('functions.js', function() { /** *Ajax action for submitting the "Move table" */ - $("#moveTableForm").live('submit', function(event) { + $("#moveTableForm").live('submit', function (event) { event.preventDefault(); var $form = $(this); var db = $form.find('select[name=target_db]').val(); var tbl = $form.find('input[name=new_name]').val(); PMA_prepareForAjaxRequest($form); - $.post($form.attr('action'), $form.serialize()+"&submit_move=1", function(data) { + $.post($form.attr('action'), $form.serialize()+"&submit_move=1", function (data) { if (data.success === true) { PMA_commonParams.set('db', db); PMA_commonParams.set('table', tbl); @@ -2202,7 +2202,7 @@ AJAX.registerOnload('functions.js', function() { /** * Ajax action for submitting the "Table options" */ - $("#tableOptionsForm").live('submit', function(event) { + $("#tableOptionsForm").live('submit', function (event) { event.preventDefault(); event.stopPropagation(); var $form = $(this); @@ -2211,10 +2211,10 @@ AJAX.registerOnload('functions.js', function() { // reload page and navigation if the table has been renamed PMA_prepareForAjaxRequest($form); var tbl = $tblNameField.val(); - $.post($form.attr('action'), $form.serialize(), function(data) { + $.post($form.attr('action'), $form.serialize(), function (data) { if (data.success === true) { PMA_commonParams.set('table', tbl); - PMA_commonActions.refreshMain(false, function() { + PMA_commonActions.refreshMain(false, function () { $('#page_content').html(data.message); }); } else { @@ -2229,7 +2229,7 @@ AJAX.registerOnload('functions.js', function() { /** *Ajax events for actions in the "Table maintenance" **/ - $("#tbl_maintenance li a.maintain_action.ajax").live('click', function(event) { + $("#tbl_maintenance li a.maintain_action.ajax").live('click', function (event) { event.preventDefault(); if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); @@ -2238,7 +2238,7 @@ AJAX.registerOnload('functions.js', function() { $("#result_query").remove(); } //variables which stores the common attributes - $.post($(this).attr('href'), { ajax_request: 1 }, function(data) { + $.post($(this).attr('href'), { ajax_request: 1 }, function (data) { function scrollToTop() { $('html, body').animate({ scrollTop: 0 }); } @@ -2270,15 +2270,15 @@ AJAX.registerOnload('functions.js', function() { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("#drop_db_anchor.ajax").die('click'); }); /** * Attach Ajax event handlers for Drop Database. Moved here from db_structure.js * as it was also required on db_create.php */ -AJAX.registerOnload('functions.js', function() { - $("#drop_db_anchor.ajax").live('click', function(event) { +AJAX.registerOnload('functions.js', function () { + $("#drop_db_anchor.ajax").live('click', function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation @@ -2288,9 +2288,9 @@ AJAX.registerOnload('functions.js', function() { PMA_messages.strDoYouReally, 'DROP DATABASE ' + escapeHtml(PMA_commonParams.get('db')) ); - $(this).PMA_confirm(question, $(this).attr('href'), function(url) { + $(this).PMA_confirm(question, $(this).attr('href'), function (url) { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) { + $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) { if (data.success) { //Database deleted successfully, refresh both the frames PMA_reloadNavigation(); @@ -2352,18 +2352,18 @@ function PMA_checkPassword($the_form) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('#change_password_anchor.ajax').die('click'); }); /** * Attach Ajax event handlers for 'Change Password' on index.php */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** * Attach Ajax event handler on the change password anchor */ - $('#change_password_anchor.ajax').live('click', function(event) { + $('#change_password_anchor.ajax').live('click', function (event) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); @@ -2372,7 +2372,7 @@ AJAX.registerOnload('functions.js', function() { * @var button_options Object containing options to be passed to jQueryUI's dialog */ var button_options = {}; - button_options[PMA_messages['strGo']] = function() { + button_options[PMA_messages['strGo']] = function () { event.preventDefault(); @@ -2395,7 +2395,7 @@ AJAX.registerOnload('functions.js', function() { var $msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); $the_form.append(''); - $.post($the_form.attr('action'), $the_form.serialize() + '&change_pw='+ this_value, function(data) { + $.post($the_form.attr('action'), $the_form.serialize() + '&change_pw='+ this_value, function (data) { if (data.success === true) { $("#page_content").prepend(data.message); $("#change_password_dialog").hide().remove(); @@ -2408,16 +2408,16 @@ AJAX.registerOnload('functions.js', function() { }); // end $.post() }; - button_options[PMA_messages['strCancel']] = function() { + button_options[PMA_messages['strCancel']] = function () { $(this).dialog('close'); }; - $.get($(this).attr('href'), {'ajax_request': true}, function(data) { + $.get($(this).attr('href'), {'ajax_request': true}, function (data) { if (data.success) { $('
    ') .dialog({ title: PMA_messages['strChangePassword'], width: 600, - close: function(ev, ui) { + close: function (ev, ui) { $(this).remove(); }, buttons : button_options, @@ -2450,7 +2450,7 @@ AJAX.registerOnload('functions.js', function() { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("select.column_type").die('change'); $("select.default_type").die('change'); $('input.allow_null').die('change'); @@ -2459,29 +2459,29 @@ AJAX.registerTeardown('functions.js', function() { * Toggle the hiding/showing of the "Open in ENUM/SET editor" message when * the page loads and when the selected data type changes */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { // is called here for normal page loads and also when opening // the Create table dialog PMA_verifyColumnsProperties(); // // needs live() to work also in the Create Table dialog - $("select.column_type").live('change', function() { + $("select.column_type").live('change', function () { PMA_showNoticeForEnum($(this)); }); - $("select.default_type").live('change', function() { + $("select.default_type").live('change', function () { PMA_hideShowDefaultValue($(this)); }); - $('input.allow_null').live('change', function() { + $('input.allow_null').live('change', function () { PMA_validateDefaultValue($(this)); }); }); function PMA_verifyColumnsProperties() { - $("select.column_type").each(function() { + $("select.column_type").each(function () { PMA_showNoticeForEnum($(this)); }); - $("select.default_type").each(function() { + $("select.default_type").each(function () { PMA_hideShowDefaultValue($(this)); }); } @@ -2520,7 +2520,7 @@ function PMA_validateDefaultValue($null_checkbox) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("a.open_enum_editor").die('click'); $("input.add_value").die('click'); $("#enum_editor td.drop").die('click'); @@ -2533,8 +2533,8 @@ var $enum_editor_dialog = null; /** * Opens the ENUM/SET editor and controls its functions */ -AJAX.registerOnload('functions.js', function() { - $("a.open_enum_editor").live('click', function() { +AJAX.registerOnload('functions.js', function () { + $("a.open_enum_editor").live('click', function () { // Get the name of the column that is being edited var colname = $(this).closest('tr').find('input:first').val(); // And use it to make up a title for the page @@ -2629,7 +2629,7 @@ AJAX.registerOnload('functions.js', function() { // When the submit button is clicked, // put the data back into the original form var value_array = []; - $(this).find(".values input").each(function(index, elm) { + $(this).find(".values input").each(function (index, elm) { var val = elm.value.replace(/\\/g, '\\\\').replace(/'/g, "''"); value_array.push("'" + val + "'"); }); @@ -2654,11 +2654,11 @@ AJAX.registerOnload('functions.js', function() { modal: true, title: PMA_messages['enum_editor'], buttons: buttonOptions, - open: function() { + open: function () { // Focus the "Go" button after opening the dialog $(this).closest('.ui-dialog').find('.ui-dialog-buttonpane button:first').focus(); }, - close: function() { + close: function () { $(this).remove(); } }); @@ -2669,7 +2669,7 @@ AJAX.registerOnload('functions.js', function() { value: 1, min: 1, max: 9, - slide: function( event, ui ) { + slide: function ( event, ui ) { $(this).closest('table').find('input[type=submit]').val( $.sprintf(PMA_messages['enum_addValue'], ui.value) ); @@ -2681,7 +2681,7 @@ AJAX.registerOnload('functions.js', function() { }); // When "add a new value" is clicked, append an empty text field - $("input.add_value").live('click', function(e) { + $("input.add_value").live('click', function (e) { e.preventDefault(); var num_new_rows = $enum_editor_dialog.find("div.slider").slider('value'); while (num_new_rows--) { @@ -2699,7 +2699,7 @@ AJAX.registerOnload('functions.js', function() { }); // Removes the specified row from the enum editor - $("#enum_editor td.drop").live('click', function() { + $("#enum_editor td.drop").live('click', function () { $(this).closest('tr').hide('fast', function () { $(this).remove(); }); @@ -2740,14 +2740,14 @@ function checkIndexName(form_id) return true; } // end of the 'checkIndexName()' function -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('#index_frm input[type=submit]').die('click'); }); -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** * Handler for adding more columns to an index in the editor */ - $('#index_frm input[type=submit]').live('click', function(event) { + $('#index_frm input[type=submit]').live('click', function (event) { event.preventDefault(); var rows_to_add = $(this) .closest('fieldset') @@ -2760,11 +2760,11 @@ AJAX.registerOnload('functions.js', function() { .appendTo( $('#index_columns').find('tbody') ); - $newrow.find(':input').each(function() { + $newrow.find(':input').each(function () { $(this).val(''); }); // focus index size input on column picked - $newrow.find('select').change(function() { + $newrow.find('select').change(function () { if ($(this).find("option:selected").val() === '') { return true; } @@ -2787,14 +2787,14 @@ function indexEditorDialog(url, title, callback_success, callback_failure) * passed to jQueryUI dialog */ var button_options = {}; - button_options[PMA_messages['strGo']] = function() { + button_options[PMA_messages['strGo']] = function () { /** * @var the_form object referring to the export form */ var $form = $("#index_frm"); PMA_prepareForAjaxRequest($form); //User wants to submit the form - $.post($form.attr('action'), $form.serialize()+"&do_save_data=1", function(data) { + $.post($form.attr('action'), $form.serialize()+"&do_save_data=1", function (data) { if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); } @@ -2836,11 +2836,11 @@ function indexEditorDialog(url, title, callback_success, callback_failure) } }); // end $.post() }; - button_options[PMA_messages['strCancel']] = function() { + button_options[PMA_messages['strCancel']] = function () { $(this).dialog('close'); }; var $msgbox = PMA_ajaxShowMessage(); - $.get("tbl_indexes.php", url, function(data) { + $.get("tbl_indexes.php", url, function (data) { if (data.success === false) { //in the case of an error, show the error message returned. PMA_ajaxShowMessage(data.error, false); @@ -2868,14 +2868,14 @@ function indexEditorDialog(url, title, callback_success, callback_failure) value: 1, min: 1, max: 16, - slide: function( event, ui ) { + slide: function ( event, ui ) { $(this).closest('fieldset').find('input[type=submit]').val( $.sprintf(PMA_messages['strAddToIndex'], ui.value) ); } }); // focus index size input on column picked - $div.find('table#index_columns select').change(function() { + $div.find('table#index_columns select').change(function () { if ($(this).find("option:selected").val() === '') { return true; } @@ -2913,7 +2913,7 @@ function PMA_showHints($div) }); } -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { PMA_showHints(); }); @@ -2922,7 +2922,7 @@ function PMA_mainMenuResizerCallback() { return $(document.body).width() - 5; } // This must be fired only once after the inital page load -$(function() { +$(function () { // Initialise the menu resize plugin $('#topmenu').menuResizer(PMA_mainMenuResizerCallback); // register resize event @@ -3051,7 +3051,7 @@ var toggleButton = function ($obj) { var removeClass = 'off'; var addClass = 'on'; } - $.post(url, {'ajax_request': true}, function(data) { + $.post(url, {'ajax_request': true}, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); $container @@ -3072,7 +3072,7 @@ var toggleButton = function ($obj) { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('div.container').unbind('click'); }); /** @@ -3081,7 +3081,7 @@ AJAX.registerTeardown('functions.js', function() { AJAX.registerOnload('functions.js', function () { $('div.toggleAjax').each(function () { var $button = $(this).show(); - $button.find('img').each(function() { + $button.find('img').each(function () { if (this.complete) { toggleButton($button); } else { @@ -3096,7 +3096,7 @@ AJAX.registerOnload('functions.js', function () { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('.vpointer').die('hover'); $('.vmarker').die('click'); $('#pageselector').die('change'); @@ -3106,10 +3106,10 @@ AJAX.registerTeardown('functions.js', function() { /** * Vertical pointer */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { $('.vpointer').live('hover', //handlerInOut - function(e) { + function (e) { var $this_td = $(this); var row_num = PMA_getRowNumber($this_td.attr('class')); // for all td of the same vertical row, toggle hover @@ -3121,7 +3121,7 @@ AJAX.registerOnload('functions.js', function() { /** * Vertical marker */ - $('.vmarker').live('click', function(e) { + $('.vmarker').live('click', function (e) { // do not trigger when clicked on anchor if ($(e.target).is('a, img, a *')) { return; @@ -3154,7 +3154,7 @@ AJAX.registerOnload('functions.js', function() { /** * Autosubmit page selector */ - $('select.pageselector').live('change', function(event) { + $('select.pageselector').live('change', function (event) { event.stopPropagation(); // Check where to load the new content if ($(this).closest("#pma_navigation").length === 0) { @@ -3185,7 +3185,7 @@ AJAX.registerOnload('functions.js', function() { /** * Enables the text generated by PMA_Util::linkOrButton() to be clickable */ - $('a.formLinkSubmit').live('click', function(e) { + $('a.formLinkSubmit').live('click', function (e) { if ($(this).attr('href').indexOf('=') != -1) { var data = $(this).attr('href').substr($(this).attr('href').indexOf('#')+1).split('=', 2); @@ -3214,7 +3214,7 @@ AJAX.registerOnload('functions.js', function() { */ function PMA_init_slider() { - $('div.pma_auto_slider').each(function() { + $('div.pma_auto_slider').each(function () { var $this = $(this); if ($this.data('slider_init_done')) { return; @@ -3225,13 +3225,13 @@ function PMA_init_slider() .text(this.title) .prepend($('')) .insertBefore($this) - .click(function() { + .click(function () { var $wrapper = $this.closest('.slide-wrapper'); var visible = $this.is(':visible'); if (!visible) { $wrapper.show(); } - $this[visible ? 'hide' : 'show']('blind', function() { + $this[visible ? 'hide' : 'show']('blind', function () { $wrapper.toggle(!visible); PMA_set_status_label($this); }); @@ -3246,15 +3246,15 @@ function PMA_init_slider() /** * Initializes slider effect. */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { PMA_init_slider(); }); /** * Restores sliders to the state they were in before initialisation. */ -AJAX.registerTeardown('functions.js', function() { - $('div.pma_auto_slider').each(function() { +AJAX.registerTeardown('functions.js', function () { + $('div.pma_auto_slider').each(function () { var $this = $(this); $this.removeData(); $this.parent().replaceWith($this); @@ -3326,7 +3326,7 @@ function PMA_slidingMessage(msg, $obj) .show() .animate({ height: h - }, function() { + }, function () { // Set the height of the parent // to the height of the child $obj @@ -3344,15 +3344,15 @@ function PMA_slidingMessage(msg, $obj) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $("#drop_tbl_anchor.ajax").die('click'); $("#truncate_tbl_anchor.ajax").die('click'); }); /** * Attach Ajax event handlers for Drop Table. */ -AJAX.registerOnload('functions.js', function() { - $("#drop_tbl_anchor.ajax").live('click', function(event) { +AJAX.registerOnload('functions.js', function () { + $("#drop_tbl_anchor.ajax").live('click', function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation @@ -3363,10 +3363,10 @@ AJAX.registerOnload('functions.js', function() { 'DROP TABLE ' + PMA_commonParams.get('table') ); - $(this).PMA_confirm(question, $(this).attr('href'), function(url) { + $(this).PMA_confirm(question, $(this).attr('href'), function (url) { var $msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) { + $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); // Table deleted successfully, refresh both the frames @@ -3385,7 +3385,7 @@ AJAX.registerOnload('functions.js', function() { }); // end $.PMA_confirm() }); //end of Drop Table Ajax action - $("#truncate_tbl_anchor.ajax").live('click', function(event) { + $("#truncate_tbl_anchor.ajax").live('click', function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation @@ -3395,9 +3395,9 @@ AJAX.registerOnload('functions.js', function() { PMA_messages.strDoYouReally, 'TRUNCATE ' + PMA_commonParams.get('table') ); - $(this).PMA_confirm(question, $(this).attr('href'), function(url) { + $(this).PMA_confirm(question, $(this).attr('href'), function (url) { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); - $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) { + $.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function (data) { if ($("#sqlqueryresults").length !== 0) { $("#sqlqueryresults").remove(); } @@ -3419,7 +3419,7 @@ AJAX.registerOnload('functions.js', function() { /** * Attach CodeMirror2 editor to SQL edit area. */ -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { var $elm = $('#sqlquery'); if ($elm.length > 0) { if (typeof CodeMirror != 'undefined') { @@ -3442,7 +3442,7 @@ AJAX.registerOnload('functions.js', function() { } } }); -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { if (codemirror_editor) { $('#sqlquery').text(codemirror_editor.getValue()); codemirror_editor.toTextArea(); @@ -3546,17 +3546,17 @@ function PMA_getCellValue(td) { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('a.themeselect').die('click'); $('.autosubmit').unbind('change'); $('a.take_theme').unbind('click'); }); -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { /** * Theme selector. */ - $('a.themeselect').live('click', function(e) { + $('a.themeselect').live('click', function (e) { window.open( e.target, 'themes', @@ -3568,14 +3568,14 @@ AJAX.registerOnload('functions.js', function() { /** * Automatic form submission on change. */ - $('.autosubmit').change(function(e) { + $('.autosubmit').change(function (e) { $(this).closest('form').submit(); }); /** * Theme changer. */ - $('a.take_theme').click(function(e) { + $('a.take_theme').click(function (e) { var what = this.name; if (window.opener && window.opener.document.forms['setTheme'].elements['set_theme']) { window.opener.document.forms['setTheme'].elements['set_theme'].value = what; @@ -3630,13 +3630,13 @@ function printPage() /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('functions.js', function() { +AJAX.registerTeardown('functions.js', function () { $('input#print').unbind('click'); $('span a.create_view.ajax').die('click'); $('#createViewDialog').find('input, select').die('keydown'); }); -AJAX.registerOnload('functions.js', function() { +AJAX.registerOnload('functions.js', function () { $('input#print').click(printPage); /** * Ajaxification for the "Create View" action @@ -3768,7 +3768,7 @@ $(checkboxes_sel).live("change", function () { $checkall.prop({checked: false, indeterminate: false}); } }); -$("input#checkall").live("change", function() { +$("input#checkall").live("change", function () { var is_checked = $(this).is(":checked"); $(this.form).find(checkboxes_sel).prop("checked", is_checked) .parents("tr").toggleClass("marked", is_checked); @@ -3838,7 +3838,7 @@ AJAX.registerOnload('functions.js', function () { /** * When user gets an ajax session expiry message, we show a login link */ -$('a.login-link').live('click', function(e) { +$('a.login-link').live('click', function (e) { e.preventDefault(); window.location.reload(true); }); diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js index 8005d409a0..7d67058b1d 100644 --- a/js/gis_data_editor.js +++ b/js/gis_data_editor.js @@ -37,7 +37,7 @@ function prepareJSVersion() { $('div#gis_data_output p').remove(); // Remove 'add' buttons and add links - $('#gis_editor input.add').each(function(e) { + $('#gis_editor input.add').each(function (e) { var $button = $(this); $button.addClass('addJs').removeClass('add'); var classes = $button.attr('class'); @@ -109,12 +109,12 @@ function loadJSAndGISEditor(value, field, type, input_name, token) { script = document.createElement('script'); script.type = 'text/javascript'; - script.onreadystatechange = function() { + script.onreadystatechange = function () { if (this.readyState == 'complete') { loadGISEditor(value, field, type, input_name, token); } }; - script.onload = function() { + script.onload = function () { loadGISEditor(value, field, type, input_name, token); }; @@ -144,7 +144,7 @@ function loadGISEditor(value, field, type, input_name, token) { 'get_gis_editor' : true, 'token' : token, 'ajax_request': true - }, function(data) { + }, function (data) { if (data.success === true) { $gis_editor.html(data.gis_editor); initGISEditorVisualization(); @@ -191,7 +191,7 @@ function insertDataAndClose() { var $form = $('form#gis_data_editor_form'); var input_name = $form.find("input[name='input_name']").val(); - $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function(data) { + $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function (data) { if (data.success === true) { $("input[name='" + input_name + "']").val(data.result); } else { @@ -204,7 +204,7 @@ function insertDataAndClose() { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('gis_data_editor.js', function() { +AJAX.registerTeardown('gis_data_editor.js', function () { $("#gis_editor input[name='gis_data[save]']").die('click'); $('#gis_editor').die('submit'); $('#gis_editor').find("input[type='text']").die('change'); @@ -216,7 +216,7 @@ AJAX.registerTeardown('gis_data_editor.js', function() { $('#gis_editor a.addJs.addGeom').die('click'); }); -AJAX.registerOnload('gis_data_editor.js', function() { +AJAX.registerOnload('gis_data_editor.js', function () { // Remove the class that is added due to the URL being too long. $('span.open_gis_editor a').removeClass('formLinkSubmit'); @@ -224,7 +224,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Prepares and insert the GIS data to the input field on clicking 'copy'. */ - $("#gis_editor input[name='gis_data[save]']").live('click', function(event) { + $("#gis_editor input[name='gis_data[save]']").live('click', function (event) { event.preventDefault(); insertDataAndClose(); }); @@ -232,7 +232,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Prepares and insert the GIS data to the input field on pressing 'enter'. */ - $('#gis_editor').live('submit', function(event) { + $('#gis_editor').live('submit', function (event) { event.preventDefault(); insertDataAndClose(); }); @@ -240,9 +240,9 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Trigger asynchronous calls on data change and update the output. */ - $('#gis_editor').find("input[type='text']").live('change', function() { + $('#gis_editor').find("input[type='text']").live('change', function () { var $form = $('form#gis_data_editor_form'); - $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function(data) { + $.post('gis_data_editor.php', $form.serialize() + "&generate=true&ajax_request=true", function (data) { if (data.success === true) { $('#gis_data_textarea').val(data.result); $('#placeholder').empty().removeClass('hasSVG').html(data.visualization); @@ -258,11 +258,11 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Update the form on change of the GIS type. */ - $("#gis_editor select.gis_type").live('change', function(event) { + $("#gis_editor select.gis_type").live('change', function (event) { var $gis_editor = $("#gis_editor"); var $form = $('form#gis_data_editor_form'); - $.post('gis_data_editor.php', $form.serialize() + "&get_gis_editor=true&ajax_request=true", function(data) { + $.post('gis_data_editor.php', $form.serialize() + "&get_gis_editor=true&ajax_request=true", function (data) { if (data.success === true) { $gis_editor.html(data.gis_editor); initGISEditorVisualization(); @@ -276,14 +276,14 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Handles closing of the GIS data editor. */ - $('#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor').live('click', function() { + $('#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor').live('click', function () { closeGISEditor(); }); /** * Handles adding data points */ - $('#gis_editor a.addJs.addPoint').live('click', function() { + $('#gis_editor a.addJs.addPoint').live('click', function () { var $a = $(this); var name = $a.attr('name'); // Eg. name = gis_data[0][MULTIPOINT][add_point] => prefix = gis_data[0][MULTIPOINT] @@ -300,7 +300,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Handles adding linestrings and inner rings */ - $('#gis_editor a.addLine.addJs').live('click', function() { + $('#gis_editor a.addLine.addJs').live('click', function () { var $a = $(this); var name = $a.attr('name'); @@ -335,7 +335,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Handles adding polygons */ - $('#gis_editor a.addJs.addPolygon').live('click', function() { + $('#gis_editor a.addJs.addPolygon').live('click', function () { var $a = $(this); var name = $a.attr('name'); // Eg. name = gis_data[0][MULTIPOLYGON][add_polygon] => prefix = gis_data[0][MULTIPOLYGON] @@ -364,7 +364,7 @@ AJAX.registerOnload('gis_data_editor.js', function() { /** * Handles adding geoms */ - $('#gis_editor a.addJs.addGeom').live('click', function() { + $('#gis_editor a.addJs.addGeom').live('click', function () { var $a = $(this); var prefix = 'gis_data[GEOMETRYCOLLECTION]'; // Find the number of geoms @@ -381,7 +381,9 @@ AJAX.registerOnload('gis_data_editor.js', function() { + '' + '

    '; - $a.before(html1); $geomType.insertBefore($a); $a.before(html2); + $a.before(html1); + $geomType.insertBefore($a); + $a.before(html2); $noOfGeomsInput.val(noOfGeoms + 1); }); }); diff --git a/js/import.js b/js/import.js index 79413b727f..b78d97bb38 100644 --- a/js/import.js +++ b/js/import.js @@ -11,7 +11,7 @@ */ function changePluginOpts() { - $("#format_specific_opts div.format_specific_options").each(function() { + $("#format_specific_opts div.format_specific_options").each(function () { $(this).hide(); }); var selected_plugin_name = $("#plugins option:selected").val(); @@ -47,7 +47,7 @@ function matchFile(fname) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('import.js', function() { +AJAX.registerTeardown('import.js', function () { $("#plugins").unbind('change'); $("#input_import_file").unbind('change'); $("#select_local_import_file").unbind('change'); @@ -55,20 +55,20 @@ AJAX.registerTeardown('import.js', function() { $("#select_local_import_file").unbind('focus'); }); -AJAX.registerOnload('import.js', function() { +AJAX.registerOnload('import.js', function () { // Initially display the options for the selected plugin changePluginOpts(); // Whenever the selected plugin changes, change the options displayed - $("#plugins").change(function() { + $("#plugins").change(function () { changePluginOpts(); }); - $("#input_import_file").change(function() { + $("#input_import_file").change(function () { matchFile($(this).val()); }); - $("#select_local_import_file").change(function() { + $("#select_local_import_file").change(function () { matchFile($(this).val()); }); @@ -76,13 +76,13 @@ AJAX.registerOnload('import.js', function() { * When the "Browse the server" form is clicked or the "Select from the web server upload directory" * form is clicked, the radio button beside it becomes selected and the other form becomes disabled. */ - $("#input_import_file").bind("focus change", function() { - $("#radio_import_file").prop('checked', true); - $("#radio_local_import_file").prop('checked', false); + $("#input_import_file").bind("focus change", function () { + $("#radio_import_file").prop('checked', true); + $("#radio_local_import_file").prop('checked', false); }); - $("#select_local_import_file").focus(function() { - $("#radio_local_import_file").prop('checked', true); - $("#radio_import_file").prop('checked', false); + $("#select_local_import_file").focus(function () { + $("#radio_local_import_file").prop('checked', true); + $("#radio_import_file").prop('checked', false); }); /** diff --git a/js/indexes.js b/js/indexes.js index 00d754f114..a6030a4d40 100644 --- a/js/indexes.js +++ b/js/indexes.js @@ -38,7 +38,7 @@ function checkIndexType() if ($select_index_type.val() == 'SPATIAL') { // Disable and hide the size column $size_header.hide(); - $size_inputs.each(function(){ + $size_inputs.each(function (){ $(this) .prop('disabled', true) .parent('td').hide(); @@ -46,7 +46,7 @@ function checkIndexType() // Disable and hide the columns of the index other than the first one var initial = true; - $column_inputs.each(function() { + $column_inputs.each(function () { $column_input = $(this); if (! initial) { $column_input @@ -62,14 +62,14 @@ function checkIndexType() } else { // Enable and show the size column $size_header.show(); - $size_inputs.each(function() { + $size_inputs.each(function () { $(this) .prop('disabled', false) .parent('td').show(); }); // Enable and show the columns of the index - $column_inputs.each(function() { + $column_inputs.each(function () { $(this) .prop('disabled', false) .parent('td').show(); @@ -83,7 +83,7 @@ function checkIndexType() /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('indexes.js', function() { +AJAX.registerTeardown('indexes.js', function () { $('#select_index_type').die('change'); $('a.drop_primary_key_index_anchor.ajax').die('click'); $("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").die('click'); @@ -99,10 +99,10 @@ AJAX.registerTeardown('indexes.js', function() { *
  • create/edit/drop indexes
  • * */ -AJAX.registerOnload('indexes.js', function() { +AJAX.registerOnload('indexes.js', function () { checkIndexType(); checkIndexName("index_frm"); - $('#select_index_type').live('change', function(event){ + $('#select_index_type').live('change', function (event){ event.preventDefault(); checkIndexType(); checkIndexName("index_frm"); @@ -111,7 +111,7 @@ AJAX.registerOnload('indexes.js', function() { /** * Ajax Event handler for 'Drop Index' */ - $('a.drop_primary_key_index_anchor.ajax').live('click', function(event) { + $('a.drop_primary_key_index_anchor.ajax').live('click', function (event) { event.preventDefault(); var $anchor = $(this); /** @@ -132,15 +132,15 @@ AJAX.registerOnload('indexes.js', function() { .val() ); - $anchor.PMA_confirm(question, $anchor.attr('href'), function(url) { + $anchor.PMA_confirm(question, $anchor.attr('href'), function (url) { var $msg = PMA_ajaxShowMessage(PMA_messages['strDroppingPrimaryKeyIndex'], false); - $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) { + $.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msg); var $table_ref = $rows_to_hide.closest('table'); if ($rows_to_hide.length == $table_ref.find('tbody > tr').length) { // We are about to remove all rows from the table - $table_ref.hide('medium', function() { + $table_ref.hide('medium', function () { $('div.no_indexes_defined').show('medium'); $rows_to_hide.remove(); }); @@ -151,8 +151,8 @@ AJAX.registerOnload('indexes.js', function() { $rows_to_hide.hide("medium", function () { $(this).remove(); }); - } - if ($('#result_query').length) { + } + if ($('#result_query').length) { $('#result_query').remove(); } if (data.sql_query) { @@ -160,7 +160,7 @@ AJAX.registerOnload('indexes.js', function() { .html(data.sql_query) .prependTo('#page_content'); } - PMA_commonActions.refreshMain(false, function() { + PMA_commonActions.refreshMain(false, function () { $("a.ajax[href^=#indexes]").click(); }); PMA_reloadNavigation(); @@ -174,7 +174,7 @@ AJAX.registerOnload('indexes.js', function() { /** *Ajax event handler for index edit **/ - $("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").live('click', function(event) { + $("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").live('click', function (event) { event.preventDefault(); if ($(this).find("a").length === 0) { // Add index @@ -197,9 +197,9 @@ AJAX.registerOnload('indexes.js', function() { var title = PMA_messages['strEditIndex']; } url += "&ajax_request=true"; - indexEditorDialog(url, title, function() { + indexEditorDialog(url, title, function () { // refresh the page using ajax - PMA_commonActions.refreshMain(false, function() { + PMA_commonActions.refreshMain(false, function () { $("a.ajax[href^=#indexes]").click(); }); }); diff --git a/js/keyhandler.js b/js/keyhandler.js index 8f9ccec527..4d2eb8cda6 100644 --- a/js/keyhandler.js +++ b/js/keyhandler.js @@ -5,16 +5,16 @@ * @param object event data */ -AJAX.registerTeardown('keyhandler.js', function() { +AJAX.registerTeardown('keyhandler.js', function () { $('#table_columns').die('keydown'); $('table.insertRowTable').die('keydown'); }); -AJAX.registerOnload('keyhandler.js', function() { - $('#table_columns').live('keydown', function(event) { +AJAX.registerOnload('keyhandler.js', function () { + $('#table_columns').live('keydown', function (event) { onKeyDownArrowsHandler(event.originalEvent); }); - $('table.insertRowTable').live('keydown', function(event) { + $('table.insertRowTable').live('keydown', function (event) { onKeyDownArrowsHandler(event.originalEvent); }); }); @@ -52,24 +52,24 @@ function onKeyDownArrowsHandler(e) var nO = null; switch(e.keyCode) { - case 38: - // up - y--; - break; - case 40: - // down - y++; - break; - case 37: - // left - x--; - break; - case 39: - // right - x++; - break; - default: - return; + case 38: + // up + y--; + break; + case 40: + // down + y++; + break; + case 37: + // left + x--; + break; + case 39: + // right + x++; + break; + default: + return; } var id = "field_" + y + "_" + x; diff --git a/js/makegrid.js b/js/makegrid.js index 60b0fef045..494cf61baa 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -77,7 +77,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param e event * @param obj dragged div object */ - dragStartRsz: function(e, obj) { + dragStartRsz: function (e, obj) { var n = $(g.cRsz).find('div').index(obj); // get the index of separator (i.e., column index) $(obj).addClass('colborder_active'); g.colRsz = { @@ -99,7 +99,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param e event * @param obj table header object */ - dragStartReorder: function(e, obj) { + dragStartReorder: function (e, obj) { // prepare the cCpy (column copy) and cPointer (column pointer) from the dragged column $(g.cCpy).text($(obj).text()); var objPos = $(obj).position(); @@ -137,7 +137,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * * @param e event */ - dragMove: function(e) { + dragMove: function (e) { if (g.colRsz) { var dx = e.pageX - g.colRsz.x0; if (g.colRsz.objWidth + dx > g.minColWidth) { @@ -179,7 +179,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * * @param e event */ - dragEnd: function(e) { + dragEnd: function (e) { if (g.colRsz) { var dx = e.pageX - g.colRsz.x0; var nw = g.colRsz.objWidth + dx; @@ -230,8 +230,8 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param n zero-based column index * @param nw new width of the column in pixel */ - resize: function(n, nw) { - $(g.t).find('tr').each(function() { + resize: function (n, nw) { + $(g.t).find('tr').each(function () { $(this).find('th.draggable:visible:eq(' + n + ') span,' + 'td:visible:eq(' + (g.actionSpan + n) + ') span') .css('width', nw); @@ -241,7 +241,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Reposition column resize bars. */ - reposRsz: function() { + reposRsz: function () { $(g.cRsz).find('div').hide(); var $firstRowCols = $(g.t).find('tr:first th.draggable:visible'); var $resizeHandles = $(g.cRsz).find('div').removeClass('condition'); @@ -269,8 +269,8 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param oldn old zero-based column index * @param newn new zero-based column index */ - shiftCol: function(oldn, newn) { - $(g.t).find('tr').each(function() { + shiftCol: function (oldn, newn) { + $(g.t).find('tr').each(function () { if (newn < oldn) { $(this).find('th.draggable:eq(' + newn + '),' + 'td:eq(' + (g.actionSpan + newn) + ')') @@ -312,10 +312,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param e event * @return the hovered column's th object or undefined if no hovered column found. */ - getHoveredCol: function(e) { + getHoveredCol: function (e) { var hoveredCol; $headers = $(g.t).find('th.draggable:visible'); - $headers.each(function() { + $headers.each(function () { var left = $(this).offset().left; var right = left + $(this).outerWidth(); if (left <= e.pageX && e.pageX <= right) { @@ -331,14 +331,14 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param obj table header object * @return zero-based index of the specified table header in the set of table headers (visible or not) */ - getHeaderIdx: function(obj) { + getHeaderIdx: function (obj) { return $(obj).parents('tr').find('th.draggable').index(obj); }, /** * Reposition the columns back to normal order. */ - restoreColOrder: function() { + restoreColOrder: function () { // use insertion sort, since we already have shiftCol function for (var i = 1; i < g.colOrder.length; i++) { var x = g.colOrder[i]; @@ -360,7 +360,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Send column preferences (column order and visibility) to the server. */ - sendColPrefs: function() { + sendColPrefs: function () { if ($(g.t).is('.ajax')) { // only send preferences if ajax class var post_params = { ajax_request: true, @@ -377,7 +377,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (g.colVisib.length > 0) { $.extend(post_params, {col_visib: g.colVisib.toString()}); } - $.post('sql.php', post_params, function(data) { + $.post('sql.php', post_params, function (data) { if (data.success !== true) { var $temp_div = $(document.createElement('div')); $temp_div.html(data.error); @@ -392,7 +392,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * Refresh restore button state. * Make restore button disabled if the table is similar with initial state. */ - refreshRestoreButton: function() { + refreshRestoreButton: function () { // check if table state is as initial state var isInitial = true; for (var i = 0; i < g.colOrder.length; i++) { @@ -415,7 +415,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * Update current hint using the boolean values (showReorderHint, showSortHint, etc.). * */ - updateHint: function() { + updateHint: function () { var text = ''; if (!g.colRsz && !g.colReorder) { // if not resizing or dragging if (g.visibleHeadersCount > 1) { @@ -450,11 +450,11 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * * @return boolean True if the column is toggled successfully. */ - toggleCol: function(n) { + toggleCol: function (n) { if (g.colVisib[n]) { // can hide if more than one column is visible if (g.visibleHeadersCount > 1) { - $(g.t).find('tr').each(function() { + $(g.t).find('tr').each(function () { $(this).find('th.draggable:eq(' + n + '),' + 'td:eq(' + (g.actionSpan + n) + ')') .hide(); @@ -467,7 +467,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi return false; } } else { // column n is not visible - $(g.t).find('tr').each(function() { + $(g.t).find('tr').each(function () { $(this).find('th.draggable:eq(' + n + '),' + 'td:eq(' + (g.actionSpan + n) + ')') .show(); @@ -484,7 +484,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * This function is separated from toggleCol because, sometimes, we want to toggle * some columns together at one time and do just one adjustment after it, e.g. in showAllColumns(). */ - afterToggleCol: function() { + afterToggleCol: function () { // some adjustments after hiding column g.reposRsz(); g.reposDrop(); @@ -500,7 +500,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * * @param obj The drop down arrow of column visibility list */ - showColList: function(obj) { + showColList: function (obj) { // only show when not resizing or reordering if (!g.colRsz && !g.colReorder) { var pos = $(obj).position(); @@ -520,7 +520,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Hide columns' visibility list. */ - hideColList: function() { + hideColList: function () { $(g.cList).hide(); $(g.cDrop).find('.coldrop-hover').removeClass('coldrop-hover'); }, @@ -528,7 +528,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Reposition the column visibility drop-down arrow. */ - reposDrop: function() { + reposDrop: function () { var $th = $(t).find('th:not(.draggable)'); for (var i = 0; i < $th.length; i++) { var $cd = $(g.cDrop).find('div:eq(' + i + ')'); // column drop-down arrow @@ -543,7 +543,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Show all hidden columns. */ - showAllColumns: function() { + showAllColumns: function () { for (var i = 0; i < g.colVisib.length; i++) { if (!g.colVisib[i]) { g.toggleCol(i); @@ -557,7 +557,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * * @param cell element to be edited */ - showEditCell: function(cell) { + showEditCell: function (cell) { if ($(cell).is('.grid_edit') && !g.colRsz && !g.colReorder) { @@ -596,7 +596,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @param field Optional, the edited . If not specified, the function will * use currently edited from g.currentEditCell. */ - hideEditCell: function(force, data, field) { + hideEditCell: function (force, data, field) { if (g.isCellEditActive && !force) { // cell is being edited, save or post the edited data g.saveOrPostEditedCell(); @@ -631,13 +631,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } } if (data.transformations !== undefined) { - $.each(data.transformations, function(cell_index, value) { + $.each(data.transformations, function (cell_index, value) { var $this_field = $(g.t).find('.to_be_saved:eq(' + cell_index + ')'); $this_field.find('span').html(value); }); } if (data.relations !== undefined) { - $.each(data.relations, function(cell_index, value) { + $.each(data.relations, function (cell_index, value) { var $this_field = $(g.t).find('.to_be_saved:eq(' + cell_index + ')'); $this_field.find('span').html(value); }); @@ -666,7 +666,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Show drop-down edit area when edit cell is focused. */ - showEditArea: function() { + showEditArea: function () { if (!g.isCellEditActive) { // make sure the edit area has not been shown g.isCellEditActive = true; g.isEditCellTextEditable = false; @@ -738,37 +738,37 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // if the select/editor is changed un-check the 'checkbox_null__'. if ($td.is('.enum, .set')) { - $editArea.find('select').live('change', function(e) { + $editArea.find('select').live('change', function (e) { $checkbox.prop('checked', false); }); } else if ($td.is('.relation')) { - $editArea.find('select').live('change', function(e) { + $editArea.find('select').live('change', function (e) { $checkbox.prop('checked', false); }); - $editArea.find('.browse_foreign').live('click', function(e) { + $editArea.find('.browse_foreign').live('click', function (e) { $checkbox.prop('checked', false); }); } else { - $(g.cEdit).find('.edit_box').live('keypress change', function(e) { + $(g.cEdit).find('.edit_box').live('keypress change', function (e) { $checkbox.prop('checked', false); }); // Capture ctrl+v (on IE and Chrome) - $(g.cEdit).find('.edit_box').live('keydown', function(e) { + $(g.cEdit).find('.edit_box').live('keydown', function (e) { if (e.ctrlKey && e.which == 86) { $checkbox.prop('checked', false); } }); - $editArea.find('textarea').live('keydown', function(e) { + $editArea.find('textarea').live('keydown', function (e) { $checkbox.prop('checked', false); }); } // if null checkbox is clicked empty the corresponding select/editor. - $checkbox.click(function(e) { + $checkbox.click(function (e) { if ($td.is('.enum')) { $editArea.find('select').val(''); } else if ($td.is('.set')) { - $editArea.find('select').find('option').each(function() { + $editArea.find('select').find('option').each(function () { var $option = $(this); $option.prop('selected', false); }); @@ -806,7 +806,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi 'relation_key_or_display_column' : relation_key_or_display_column }; - g.lastXHR = $.post('sql.php', post_params, function(data) { + g.lastXHR = $.post('sql.php', post_params, function (data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); if ($(data.dropdown).is('select')) { @@ -824,13 +824,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // hide the value next to 'Browse foreign values' link $editArea.find('span.curr_value').hide(); // handle update for new values selected from new window - $editArea.find('span.curr_value').change(function() { + $editArea.find('span.curr_value').change(function () { $(g.cEdit).find('.edit_box').val($(this).text()); }); }); // end $.post() $editArea.show(); - $editArea.find('select').live('change', function(e) { + $editArea.find('select').live('change', function (e) { $(g.cEdit).find('.edit_box').val($(this).val()); }); g.isEditCellTextEditable = true; @@ -843,16 +843,16 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @var post_params Object containing parameters for the POST request */ var post_params = { - 'ajax_request' : true, - 'get_enum_values' : true, - 'server' : g.server, - 'db' : g.db, - 'table' : g.table, - 'column' : field_name, - 'token' : g.token, - 'curr_value' : curr_value + 'ajax_request' : true, + 'get_enum_values' : true, + 'server' : g.server, + 'db' : g.db, + 'table' : g.table, + 'column' : field_name, + 'token' : g.token, + 'curr_value' : curr_value }; - g.lastXHR = $.post('sql.php', post_params, function(data) { + g.lastXHR = $.post('sql.php', post_params, function (data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); $editArea.append(data.dropdown); @@ -860,7 +860,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }); // end $.post() $editArea.show(); - $editArea.find('select').live('change', function(e) { + $editArea.find('select').live('change', function (e) { $(g.cEdit).find('.edit_box').val($(this).val()); }); } @@ -872,17 +872,17 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi * @var post_params Object containing parameters for the POST request */ var post_params = { - 'ajax_request' : true, - 'get_set_values' : true, - 'server' : g.server, - 'db' : g.db, - 'table' : g.table, - 'column' : field_name, - 'token' : g.token, - 'curr_value' : curr_value + 'ajax_request' : true, + 'get_set_values' : true, + 'server' : g.server, + 'db' : g.db, + 'table' : g.table, + 'column' : field_name, + 'token' : g.token, + 'curr_value' : curr_value }; - g.lastXHR = $.post('sql.php', post_params, function(data) { + g.lastXHR = $.post('sql.php', post_params, function (data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); $editArea.append(data.select); @@ -890,7 +890,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }); // end $.post() $editArea.show(); - $editArea.find('select').live('change', function(e) { + $editArea.find('select').live('change', function (e) { $(g.cEdit).find('.edit_box').val($(this).val()); }); } @@ -901,10 +901,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $editArea.append(''); $editArea.find('textarea') .val(value) - .live('keyup', function(e) { + .live('keyup', function (e) { $(g.cEdit).find('.edit_box').val($(this).val()); }); - $(g.cEdit).find('.edit_box').live('keyup', function(e) { + $(g.cEdit).find('.edit_box').live('keyup', function (e) { $editArea.find('textarea').val($(this).val()); }); $editArea.append('
    ' + g.cellEditHint + '
    '); @@ -928,7 +928,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi 'ajax_request' : true, 'sql_query' : sql_query, 'grid_edit' : true - }, function(data) { + }, function (data) { g.lastXHR = null; $editArea.removeClass('edit_area_loading'); if (data.success === true) { @@ -942,10 +942,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $editArea.append(''); $editArea.find('textarea') .val(data.value) - .live('keyup', function(e) { + .live('keyup', function (e) { $(g.cEdit).find('.edit_box').val($(this).val()); }); - $(g.cEdit).find('.edit_box').live('keyup', function(e) { + $(g.cEdit).find('.edit_box').live('keyup', function (e) { $editArea.find('textarea').val($(this).val()); }); $editArea.append('
    ' + g.cellEditHint + '
    '); @@ -970,14 +970,14 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi PMA_addDatepicker($editArea, { altField: $input_field, showTimepicker: showTimeOption, - onSelect: function(dateText, inst) { + onSelect: function (dateText, inst) { // remove null checkbox if it exists $(g.cEdit).find('.null_div input[type=checkbox]').prop('checked', false); } }); // cancel any click on the datepicker element - $editArea.find('> *').click(function(e) { + $editArea.find('> *').click(function (e) { e.stopPropagation(); }); @@ -1015,7 +1015,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Post the content of edited cell. */ - postEditedCell: function() { + postEditedCell: function () { if (g.isSaving) { return; } @@ -1070,7 +1070,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } // loop each edited row - $('td.to_be_saved').parents('tr').each(function() { + $('td.to_be_saved').parents('tr').each(function () { var $tr = $(this); var where_clause = $tr.find('.where_clause').val(); full_where_clause.push(PMA_urldecode(where_clause)); @@ -1085,7 +1085,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi var fields_null = []; // loop each edited cell in a row - $tr.find('.to_be_saved').each(function() { + $tr.find('.to_be_saved').each(function () { /** * @var $this_field Object referring to the td that is being edited */ @@ -1201,7 +1201,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi url: 'tbl_replace.php', data: post_params, success: - function(data) { + function (data) { g.isSaving = false; if (!g.saveCellsAtOnce) { $(g.cEdit).find('*').removeProp('disabled'); @@ -1214,7 +1214,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi PMA_ajaxShowMessage(data.message); // update where_clause related data in each edited row - $('td.to_be_saved').parents('tr').each(function() { + $('td.to_be_saved').parents('tr').each(function () { var new_clause = $(this).data('new_clause'); var $where_clause = $(this).find('.where_clause'); var old_clause = $where_clause.val(); @@ -1223,20 +1223,20 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $where_clause.val(new_clause); // update Edit, Copy, and Delete links also - $(this).find('a').each(function() { + $(this).find('a').each(function () { $(this).attr('href', $(this).attr('href').replace(old_clause, new_clause)); // update delete confirmation in Delete link if ($(this).attr('href').indexOf('DELETE') > -1) { $(this).removeAttr('onclick') .unbind('click') - .bind('click', function() { + .bind('click', function () { return confirmLink(this, 'DELETE FROM `' + g.db + '`.`' + g.table + '` WHERE ' + decoded_new_clause + (is_unique ? '' : ' LIMIT 1')); }); } }); // update the multi edit checkboxes - $(this).find('input[type=checkbox]').each(function() { + $(this).find('input[type=checkbox]').each(function () { var $checkbox = $(this); var checkbox_name = $checkbox.attr('name'); var checkbox_value = $checkbox.val(); @@ -1273,7 +1273,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Save edited cell, so it can be posted later. */ - saveEditedCell: function() { + saveEditedCell: function () { /** * @var $this_field Object referring to the td that is being edited */ @@ -1312,7 +1312,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi this_field_params[field_name] = '0b' + $(g.cEdit).find('.edit_box').val(); } else if ($this_field.is('.set')) { $test_element = $(g.cEdit).find('select'); - this_field_params[field_name] = $test_element.map(function(){ + this_field_params[field_name] = $test_element.map(function (){ return $(this).val(); }).get().join(","); } else if ($this_field.is('.relation, .enum')) { @@ -1343,7 +1343,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Save or post currently edited cell, depending on the "saveCellsAtOnce" configuration. */ - saveOrPostEditedCell: function() { + saveOrPostEditedCell: function () { var saved = g.saveEditedCell(); if (!g.saveCellsAtOnce) { if (saved) { @@ -1363,7 +1363,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Initialize column resize feature. */ - initColResize: function() { + initColResize: function () { // create column resizer div g.cRsz = document.createElement('div'); g.cRsz.className = 'cRsz'; @@ -1372,10 +1372,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi var $firstRowCols = $(g.t).find('tr:first th.draggable'); // create column borders - $firstRowCols.each(function() { + $firstRowCols.each(function () { var cb = document.createElement('div'); // column border $(cb).addClass('colborder') - .mousedown(function(e) { + .mousedown(function (e) { g.dragStartRsz(e, this); }); $(g.cRsz).append(cb); @@ -1389,7 +1389,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Initialize column reordering feature. */ - initColReorder: function() { + initColReorder: function () { g.cCpy = document.createElement('div'); // column copy, to store copy of dragged column header g.cPointer = document.createElement('div'); // column pointer, used when reordering column @@ -1423,25 +1423,25 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // register events $(t).find('th.draggable') - .mousedown(function(e) { + .mousedown(function (e) { if (g.visibleHeadersCount > 1) { g.dragStartReorder(e, this); } }) - .mouseenter(function(e) { + .mouseenter(function (e) { if (g.visibleHeadersCount > 1) { $(this).css('cursor', 'move'); } else { $(this).css('cursor', 'inherit'); } }) - .mouseleave(function(e) { + .mouseleave(function (e) { g.showReorderHint = false; $(this).tooltip("option", { content: g.updateHint() }) ; }) - .dblclick(function(e) { + .dblclick(function (e) { e.preventDefault(); $("
    ") .prop("title", PMA_messages["strColNameCopyTitle"]) @@ -1459,7 +1459,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi .find("input").focus().select(); }); // restore column order when the restore button is clicked - $('div.restore_column').click(function() { + $('div.restore_column').click(function () { g.restoreColOrder(); }); @@ -1468,7 +1468,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $(g.gDiv).append(g.cCpy); // prevent default "dragstart" event when dragging a link - $(t).find('th a').bind('dragstart', function() { + $(t).find('th a').bind('dragstart', function () { return false; }); @@ -1479,7 +1479,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Initialize column visibility feature. */ - initColVisib: function() { + initColVisib: function () { g.cDrop = document.createElement('div'); // column drop-down arrows g.cList = document.createElement('div'); // column visibility list @@ -1520,12 +1520,12 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi ); // create column visibility drop-down arrow(s) - $colVisibTh.each(function() { + $colVisibTh.each(function () { var $th = $(this); var cd = document.createElement('div'); // column drop-down arrow var pos = $th.position(); $(cd).addClass('coldrop') - .click(function() { + .click(function () { if (g.cList.style.display == 'none') { g.showColList(this); } else { @@ -1545,7 +1545,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi .prepend(''); $listDiv.append(listElmt); // add event on click - $(listElmt).click(function() { + $(listElmt).click(function () { if ( g.toggleCol($(this).index()) ) { g.afterToggleCol(); } @@ -1556,21 +1556,21 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi $(showAll).addClass('showAllColBtn') .text(g.showAllColText); $(g.cList).append(showAll); - $(showAll).click(function() { + $(showAll).click(function () { g.showAllColumns(); }); // prepend "show all column" button at top if the list is too long if ($firstRowCols.length > 10) { var clone = showAll.cloneNode(true); $(g.cList).prepend(clone); - $(clone).click(function() { + $(clone).click(function () { g.showAllColumns(); }); } } // hide column visibility list if we move outside the list - $(t).find('td, th.draggable').mouseenter(function() { + $(t).find('td, th.draggable').mouseenter(function () { g.hideColList(); }); @@ -1585,7 +1585,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi /** * Initialize grid editing feature. */ - initGridEdit: function() { + initGridEdit: function () { function startGridEditing(e, cell) { if (g.isCellEditActive) { @@ -1616,7 +1616,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // register events $(t).find('td.data.click1') - .click(function(e) { + .click(function (e) { startGridEditing(e, this); // prevent default action when clicking on "link" in a table if ($(e.target).is('.grid_edit a')) { @@ -1625,7 +1625,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi }); $(t).find('td.data.click2') - .click(function(e) { + .click(function (e) { $cell = $(this); // In the case of relational link, We want single click on the link // to goto the link and double click to start grid-editing. @@ -1639,7 +1639,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi if (clicks == 1) { // if there are no previous clicks, // start the single click timer - timer = setTimeout(function() { + timer = setTimeout(function () { // temporarily remove ajax class so the page loader will not handle it, // submit and then add it back $link.removeClass('ajax'); @@ -1659,7 +1659,7 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } } }) - .dblclick(function(e) { + .dblclick(function (e) { if ($(e.target).is('.grid_edit a')) { e.preventDefault(); } else { @@ -1667,39 +1667,39 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi } }); - $(g.cEdit).find('.edit_box').focus(function(e) { + $(g.cEdit).find('.edit_box').focus(function (e) { g.showEditArea(); }); - $(g.cEdit).find('.edit_box, select').live('keydown', function(e) { + $(g.cEdit).find('.edit_box, select').live('keydown', function (e) { if (e.which == 13) { // post on pressing "Enter" e.preventDefault(); g.saveOrPostEditedCell(); } }); - $(g.cEdit).keydown(function(e) { + $(g.cEdit).keydown(function (e) { if (!g.isEditCellTextEditable) { // prevent text editing e.preventDefault(); } }); - $('html').click(function(e) { + $('html').click(function (e) { // hide edit cell if the click is not from g.cEdit if ($(e.target).parents().index(g.cEdit) == -1) { g.hideEditCell(); } - }).keydown(function(e) { + }).keydown(function (e) { if (e.which == 27 && g.isCellEditActive) { // cancel on pressing "Esc" g.hideEditCell(true); } }); - $('div.save_edited').click(function() { + $('div.save_edited').click(function () { g.hideEditCell(); g.postEditedCell(); }); - $(window).bind('beforeunload', function(e) { + $(window).bind('beforeunload', function (e) { if (g.isCellEdited) { return g.saveCellWarning; } @@ -1803,13 +1803,13 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // register events for hint tooltip (anchors inside draggable th) $(t).find('th.draggable a') - .mouseenter(function(e) { + .mouseenter(function (e) { g.showSortHint = true; $(t).find("th.draggable").tooltip("option", { content: g.updateHint() }); }) - .mouseleave(function(e) { + .mouseleave(function (e) { g.showSortHint = false; $(t).find("th.draggable").tooltip("option", { content: g.updateHint() @@ -1818,10 +1818,10 @@ function PMA_makegrid(t, enableResize, enableReorder, enableVisib, enableGridEdi // register events for dragging-related feature if (enableResize || enableReorder) { - $(document).mousemove(function(e) { + $(document).mousemove(function (e) { g.dragMove(e); }); - $(document).mouseup(function(e) { + $(document).mouseup(function (e) { g.dragEnd(e); }); } diff --git a/js/navigation.js b/js/navigation.js index 44cefc2b9b..8f2970f8fc 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -8,7 +8,7 @@ /** * Executed on page load */ -$(function() { +$(function () { if (! $('#pma_navigation').length) { // Don't bother running any code if the navigation is not even on the page return; @@ -21,7 +21,7 @@ $(function() { * opens/closes (hides/shows) tree elements * loads data via ajax */ - $('#pma_navigation_tree a.expander').live('click', function(event) { + $('#pma_navigation_tree a.expander').live('click', function (event) { event.preventDefault(); event.stopImmediatePropagation(); var $this = $(this); @@ -129,7 +129,7 @@ $(function() { /** * Jump to recent table */ - $('#recentTable').live('change', function() { + $('#recentTable').live('change', function () { if (this.value !== '') { var arr = jQuery.parseJSON(this.value); var $form = $(this).closest('form'); diff --git a/js/pmd/history.js b/js/pmd/history.js index f45e4262b7..bea89f62f5 100644 --- a/js/pmd/history.js +++ b/js/pmd/history.js @@ -22,8 +22,8 @@ function panel(index) if (!index) { $(".toggle_container").hide(); } - $("h2.tiger").click(function() { - $(this).toggleClass("active").next().slideToggle("slow"); + $("h2.tiger").click(function () { + $(this).toggleClass("active").next().slideToggle("slow"); }); } @@ -67,19 +67,19 @@ function display(init,finit) if (history_array[i].get_and_or()) { str +=''; } else { - str +=''; + str +=''; } str +='' + PMA_getImage('b_sbrowse.png', 'column name') + '' + history_array[i].get_column_name(); if (history_array[i].get_type() == "GroupBy" || history_array[i].get_type() == "OrderBy") { str += '' + PMA_getImage('b_info.png', detail(i)) + '' + history_array[i].get_type() + '' + PMA_getImage('b_drop.png', 'Delete') + ''; - } else { - str += '' + PMA_getImage('b_info.png', detail(i)) + '' + history_array[i]. get_type() + '' + PMA_getImage('b_edit.png', PMA_messages['strEdit']) + ''; - } - i++; - if (i >= history_array.length) { - break; - } - str += '

    '; + } else { + str += '' + PMA_getImage('b_info.png', detail(i)) + '' + history_array[i]. get_type() + '' + PMA_getImage('b_edit.png', PMA_messages['strEdit']) + ''; + } + i++; + if (i >= history_array.length) { + break; + } + str += '

    '; } i--; str += '

    '; @@ -237,8 +237,8 @@ function edit(type) } if (type == "Where") { if (document.getElementById('erel_opt').value != '--' && document.getElementById('eQuery').value !== "") { - history_array[g_index].get_obj().setquery(document.getElementById('eQuery').value); - history_array[g_index].get_obj().setrelation_operator(document.getElementById('erel_opt').value); + history_array[g_index].get_obj().setquery(document.getElementById('eQuery').value); + history_array[g_index].get_obj().setrelation_operator(document.getElementById('erel_opt').value); } document.getElementById('query_where').style.visibility = 'hidden'; } @@ -277,40 +277,40 @@ function history(ncolumn_name,nobj,ntab,nobj_no,ntype) this.set_column_name = function (ncolumn_name) { column_name = ncolumn_name; }; - this.get_column_name = function() { + this.get_column_name = function () { return column_name; }; - this.set_and_or = function(nand_or) { + this.set_and_or = function (nand_or) { and_or = nand_or; }; - this.get_and_or = function() { + this.get_and_or = function () { return and_or; }; - this.get_relation = function() { + this.get_relation = function () { return and_or; }; - this.set_obj = function(nobj) { + this.set_obj = function (nobj) { obj = nobj; }; - this.get_obj = function() { + this.get_obj = function () { return obj; }; - this.set_tab = function(ntab) { + this.set_tab = function (ntab) { tab = ntab; }; - this.get_tab = function() { + this.get_tab = function () { return tab; }; - this.set_obj_no = function(nobj_no) { + this.set_obj_no = function (nobj_no) { obj_no = nobj_no; }; - this.get_obj_no = function() { + this.get_obj_no = function () { return obj_no; }; - this.set_type = function(ntype) { + this.set_type = function (ntype) { type = ntype; }; - this.get_type = function() { + this.get_type = function () { return type; }; this.set_obj_no(nobj_no); @@ -333,16 +333,16 @@ function history(ncolumn_name,nobj,ntab,nobj_no,ntype) var where = function (nrelation_operator,nquery) { var relation_operator; var query; - this.setrelation_operator = function(nrelation_operator) { + this.setrelation_operator = function (nrelation_operator) { relation_operator = nrelation_operator; }; - this.setquery = function(nquery) { + this.setquery = function (nquery) { query = nquery; }; - this.getquery = function() { + this.getquery = function () { return query; }; - this.getrelation_operator = function() { + this.getrelation_operator = function () { return relation_operator; }; this.setquery(nquery); @@ -362,22 +362,22 @@ var having = function (nrelation_operator,nquery,noperator) { var relation_operator; var query; var operator; - this.set_operator = function(noperator) { + this.set_operator = function (noperator) { operator = noperator; }; - this.setrelation_operator = function(nrelation_operator) { + this.setrelation_operator = function (nrelation_operator) { relation_operator = nrelation_operator; }; - this.setquery = function(nquery) { + this.setquery = function (nquery) { query = nquery; }; - this.getquery = function() { + this.getquery = function () { return query; }; - this.getrelation_operator = function() { + this.getrelation_operator = function () { return relation_operator; }; - this.get_operator = function() { + this.get_operator = function () { return operator; }; this.setquery(nquery); @@ -392,12 +392,12 @@ var having = function (nrelation_operator,nquery,noperator) { * **/ -var rename = function(nrename_to) { +var rename = function (nrename_to) { var rename_to; - this.setrename_to = function(nrename_to) { + this.setrename_to = function (nrename_to) { rename_to = nrename_to; }; - this.getrename_to =function() { + this.getrename_to =function () { return rename_to; }; this.setrename_to(nrename_to); @@ -410,12 +410,12 @@ var rename = function(nrename_to) { * **/ -var aggregate = function(noperator) { +var aggregate = function (noperator) { var operator; - this.set_operator = function(noperator) { + this.set_operator = function (noperator) { operator = noperator; }; - this.get_operator = function() { + this.get_operator = function () { return operator; }; this.set_operator(noperator); diff --git a/js/pmd/iecanvas.js b/js/pmd/iecanvas.js index 90e1cae985..3e8fab56aa 100644 --- a/js/pmd/iecanvas.js +++ b/js/pmd/iecanvas.js @@ -48,28 +48,28 @@ if (!window.all) // if IE this.fillStyle; this.lineWidth; - this.closePath = function() { + this.closePath = function () { this.pmd_arr.push({type: "close"}); }; - this.clearRect = function() { + this.clearRect = function () { this.element_.innerHTML = ""; this.pmd_arr = []; }; - this.beginPath = function() { + this.beginPath = function () { this.pmd_arr = []; }; - this.moveTo = function(aX, aY) { + this.moveTo = function (aX, aY) { this.pmd_arr.push({type: "moveTo", x: aX, y: aY}); }; - this.lineTo = function(aX, aY) { + this.lineTo = function (aX, aY) { this.pmd_arr.push({type: "lineTo", x: aX, y: aY}); }; - this.arc = function(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { + this.arc = function (aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) { if (!aClockwise) { var t = aStartAngle; aStartAngle = aEndAngle; @@ -86,7 +86,7 @@ if (!window.all) // if IE radius: aRadius, xStart: xStart, yStart: yStart, xEnd: xEnd, yEnd: yEnd}); }; - this.rect = function(aX, aY, aW, aH) { + this.rect = function (aX, aY, aW, aH) { this.moveTo(aX, aY); this.lineTo(aX + aW, aY); this.lineTo(aX + aW, aY + aH); @@ -94,7 +94,7 @@ if (!window.all) // if IE this.closePath(); }; - this.fillRect = function(aX, aY, aW, aH) { + this.fillRect = function (aX, aY, aW, aH) { this.beginPath(); this.moveTo(aX, aY); this.lineTo(aX + aW, aY); @@ -104,7 +104,7 @@ if (!window.all) // if IE this.stroke(true); }; - this.stroke = function(aFill) { + this.stroke = function (aFill) { var Str = []; var a = convert_style(aFill ? this.fillStyle : this.strokeStyle); var color = a[0]; diff --git a/js/pmd/init.js b/js/pmd/init.js index 00b09b9e3a..d0832b0481 100644 --- a/js/pmd/init.js +++ b/js/pmd/init.js @@ -5,12 +5,12 @@ var j_tabs, h_tabs, contr, server, db, token; -AJAX.registerTeardown('pmd/init.js', function() { +AJAX.registerTeardown('pmd/init.js', function () { $(".trigger").unbind('click'); }); -AJAX.registerOnload('pmd/init.js', function() { - $(".trigger").click(function() { +AJAX.registerOnload('pmd/init.js', function () { + $(".trigger").click(function () { $(".panel").toggle("fast"); $(this).toggleClass("active"); return false; diff --git a/js/pmd/move.js b/js/pmd/move.js index 3474de442c..effe11451d 100644 --- a/js/pmd/move.js +++ b/js/pmd/move.js @@ -8,21 +8,21 @@ */ - var _change = 0; // variable to track any change in designer layout. - var _staying = 0; // variable to check if the user stayed after seeing the confirmation prompt. - var show_relation_lines = true; +var _change = 0; // variable to track any change in designer layout. +var _staying = 0; // variable to check if the user stayed after seeing the confirmation prompt. +var show_relation_lines = true; -AJAX.registerTeardown('pmd/move.js', function() { +AJAX.registerTeardown('pmd/move.js', function () { if ($.FullScreen.supported) { $(document).unbind($.FullScreen.prefix + 'fullscreenchange'); } }); -AJAX.registerOnload('pmd/move.js', function() { +AJAX.registerOnload('pmd/move.js', function () { $('#page_content').css({'margin-left': '3px'}); $('#exitFullscreen').hide(); if ($.FullScreen.supported) { - $(document).fullScreenChange(function() { + $(document).fullScreenChange(function () { if (! $.FullScreen.isFullScreen()) { $('#page_content').removeClass('content_fullscreen') .css({'width': 'auto', 'height': 'auto'}); @@ -41,18 +41,18 @@ AJAX.registerOnload('pmd/move.js', function() { /* FIXME: we can't register the beforeonload event because it will persist between pageloads -AJAX.registerOnload('pmd/move.js', function(){ - $(window).bind('beforeunload', function() { // onbeforeunload for the frame window. +AJAX.registerOnload('pmd/move.js', function (){ + $(window).bind('beforeunload', function () { // onbeforeunload for the frame window. if (_change == 1 && _staying === 0) { return PMA_messages['strLeavingDesigner']; } else if (_change == 1 && _staying == 1) { _staying = 0; } }); - $(window).unload(function() { + $(window).unload(function () { _change = 0; }); - window.top.onbeforeunload = function() { // onbeforeunload for the browser main window. + window.top.onbeforeunload = function () { // onbeforeunload for the browser main window. if (_change == 1 && _staying === 0) { _staying = 1; // Helps if the user stays on the page as there setTimeout('make_zero();', 100); // is no other way of knowing whether the user stayed or not. @@ -115,7 +115,7 @@ if (isIE) { document.onselectstart = function () {return false;}; } -//document.onmouseup = function(){General_scroll_end();} +//document.onmouseup = function (){General_scroll_end();} function MouseDown(e) { var offsetx, offsety; @@ -706,12 +706,12 @@ function Relation_lines_invert() function Small_tab_refresh() { - for (var key in j_tabs) { - if(document.getElementById('id_hide_tbody_'+key).innerHTML != "v") { - Small_tab(key, 0); - Small_tab(key, 0); - } - } + for (var key in j_tabs) { + if(document.getElementById('id_hide_tbody_'+key).innerHTML != "v") { + Small_tab(key, 0); + Small_tab(key, 0); + } + } } function Small_tab(t, re_load) @@ -744,7 +744,7 @@ function Select_tab(t) //---------- var id_t = document.getElementById(t); window.scrollTo(parseInt(id_t.style.left, 10) - 300, parseInt(id_t.style.top, 10) - 300); - setTimeout(function(){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800); + setTimeout(function (){document.getElementById('id_zag_' + t).className = 'tab_zag';}, 800); } //------------------------------------------------------------------------------ @@ -950,7 +950,7 @@ function General_scroll() clearTimeout(timeoutID); timeoutID = setTimeout ( - function() + function () { document.getElementById('top_menu').style.left = document.body.scrollLeft + 'px'; document.getElementById('top_menu').style.top = document.body.scrollTop + 'px'; diff --git a/js/replication.js b/js/replication.js index 3c0498b45b..888bd9ddf8 100644 --- a/js/replication.js +++ b/js/replication.js @@ -16,12 +16,12 @@ function update_config() if ($('#db_select option:selected').size() === 0) { $('#rep').text(conf_prefix); } else if ($('#db_type option:selected').val() == 'all') { - $('#db_select option:selected').each(function() { + $('#db_select option:selected').each(function () { database_list += conf_ignore + $(this).val() + "\n"; }); $('#rep').text(conf_prefix + database_list); } else { - $('#db_select option:selected').each(function() { + $('#db_select option:selected').each(function () { database_list += conf_do + $(this).val() + "\n"; }); $('#rep').text(conf_prefix + database_list); @@ -31,7 +31,7 @@ function update_config() /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('replication.js', function() { +AJAX.registerTeardown('replication.js', function () { $('#db_type').unbind('change'); $('#db_select').unbind('change'); $('#master_status_href').unbind('click'); @@ -43,30 +43,30 @@ AJAX.registerTeardown('replication.js', function() { $('#db_reset_href').unbind('click'); }); -AJAX.registerOnload('replication.js', function() { +AJAX.registerOnload('replication.js', function () { $('#rep').text(conf_prefix); $('#db_type').change(update_config); $('#db_select').change(update_config); - $('#master_status_href').click(function() { + $('#master_status_href').click(function () { $('#replication_master_section').toggle(); - }); - $('#master_slaves_href').click(function() { + }); + $('#master_slaves_href').click(function () { $('#replication_slaves_section').toggle(); - }); - $('#slave_status_href').click(function() { + }); + $('#slave_status_href').click(function () { $('#replication_slave_section').toggle(); - }); - $('#slave_control_href').click(function() { + }); + $('#slave_control_href').click(function () { $('#slave_control_gui').toggle(); - }); - $('#slave_errormanagement_href').click(function() { + }); + $('#slave_errormanagement_href').click(function () { $('#slave_errormanagement_gui').toggle(); - }); - $('#slave_synchronization_href').click(function() { + }); + $('#slave_synchronization_href').click(function () { $('#slave_synchronization_gui').toggle(); - }); - $('#db_reset_href').click(function() { + }); + $('#db_reset_href').click(function () { $('#db_select option:selected').prop('selected', false); - }); + }); }); diff --git a/js/rte.js b/js/rte.js index e9863a4d01..20ef257c2f 100644 --- a/js/rte.js +++ b/js/rte.js @@ -16,17 +16,17 @@ var RTE = { object: function (type) { $.extend(this, RTE.COMMON); switch (type) { - case 'routine': - $.extend(this, RTE.ROUTINE); - break; - case 'trigger': - // nothing extra yet for triggers - break; - case 'event': - $.extend(this, RTE.EVENT); - break; - default: - break; + case 'routine': + $.extend(this, RTE.ROUTINE); + break; + case 'trigger': + // nothing extra yet for triggers + break; + case 'event': + $.extend(this, RTE.EVENT); + break; + default: + break; } }, /** @@ -126,10 +126,10 @@ RTE.COMMON = { * Display the dialog to the user */ var $ajaxDialog = $('
    ' + data.message + '
    ').dialog({ - width: 500, - buttons: button_options, - title: data.title - }); + width: 500, + buttons: button_options, + title: data.title + }); // Attach syntax highlited editor to export dialog /** * @var $elm jQuery object containing the reference @@ -297,15 +297,15 @@ RTE.COMMON = { * Display the dialog to the user */ that.$ajaxDialog = $('
    ' + data.message + '
    ').dialog({ - width: 700, - minWidth: 500, - buttons: that.buttonOptions, - title: data.title, - modal: true, - close: function () { - $(this).remove(); - } - }); + width: 700, + minWidth: 500, + buttons: that.buttonOptions, + title: data.title, + modal: true, + close: function () { + $(this).remove(); + } + }); that.$ajaxDialog.find('input[name=item_name]').focus(); that.$ajaxDialog.find('input.datefield, input.datetimefield').each(function () { PMA_addDatepicker($(this).css('width', '95%')); @@ -766,7 +766,7 @@ $(function () { */ $('a.ajax.drop_anchor').live('click', function (event) { event.preventDefault(); - var dialog = new RTE.object(); + var dialog = new RTE.object(); dialog.dropDialog($(this)); }); // end $.live() diff --git a/js/server_databases.js b/js/server_databases.js index 7fdb6056c1..282a37b3c8 100644 --- a/js/server_databases.js +++ b/js/server_databases.js @@ -11,7 +11,7 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_databases.js', function() { +AJAX.registerTeardown('server_databases.js', function () { $("#dbStatsForm").die('submit'); $('#create_database_form.ajax').die('submit'); }); @@ -23,11 +23,11 @@ AJAX.registerTeardown('server_databases.js', function() { * Drop Databases * */ -AJAX.registerOnload('server_databases.js', function() { +AJAX.registerOnload('server_databases.js', function () { /** * Attach Event Handler for 'Drop Databases' */ - $("#dbStatsForm").live('submit', function(event) { + $("#dbStatsForm").live('submit', function (event) { event.preventDefault(); var $form = $(this); @@ -62,10 +62,10 @@ AJAX.registerOnload('server_databases.js', function() { $form.prop('action') + '?' + $(this).serialize() + '&drop_selected_dbs=1&is_js_confirmed=1&ajax_request=true', - function(url) { + function (url) { PMA_ajaxShowMessage(PMA_messages.strProcessingRequest, false); - $.post(url, function(data) { + $.post(url, function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); @@ -82,13 +82,14 @@ AJAX.registerOnload('server_databases.js', function() { PMA_ajaxShowMessage(data.error, false); } }); // end $.post() - }); // end $.PMA_confirm() + } + ); // end $.PMA_confirm() }) ; //end of Drop Database action /** * Attach Ajax event handlers for 'Create Database'. */ - $('#create_database_form.ajax').live('submit', function(event) { + $('#create_database_form.ajax').live('submit', function (event) { event.preventDefault(); $form = $(this); @@ -103,7 +104,7 @@ AJAX.registerOnload('server_databases.js', function() { PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']); PMA_prepareForAjaxRequest($form); - $.post($form.attr('action'), $form.serialize(), function(data) { + $.post($form.attr('action'), $form.serialize(), function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); diff --git a/js/server_plugins.js b/js/server_plugins.js index 17391affbf..ba6bfb31b3 100644 --- a/js/server_plugins.js +++ b/js/server_plugins.js @@ -4,12 +4,12 @@ */ var pma_theme_image; // filled in server_plugins.php -AJAX.registerOnload('server_plugins.js', function() { +AJAX.registerOnload('server_plugins.js', function () { // Add tabs $('#pluginsTabs').tabs({ // Tab persistence cookie: { name: 'pma_serverStatusTabs', expires: 1 }, - show: function(event, ui) { + show: function (event, ui) { // Fixes line break in the menu bar when the page overflows and scrollbar appears $('#topmenu').menuResizer('resize'); // 'Plugins' tab is too high due to hiding of 'Modules' by negative left position, diff --git a/js/server_privileges.js b/js/server_privileges.js index c2b5c37810..56c81f0d09 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -60,7 +60,7 @@ function appendNewUser(new_user_string, new_user_initial, new_user_initial_strin .insertAfter($curr_last_row) .find('input:checkbox') .attr('id', new_last_row_id) - .val(function() { + .val(function () { //the insert messes up the &27; part. let's fix it return $(this).val().replace(/&/,'&'); }) @@ -87,7 +87,7 @@ function addUser($form) } //We also need to post the value of the submit button in order to get this to work correctly - $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $("input[name=adduser_submit]").val(), function(data) { + $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $("input[name=adduser_submit]").val(), function (data) { if (data.success === true) { // Refresh navigation, if we created a database with the name // that is the same as the username of the new user @@ -121,7 +121,7 @@ function addUser($form) url = url + "&ajax_request=true&db_specific=true"; /* post request for get the updated userForm table */ - $.post($form.attr('action'), url, function(priv_data) { + $.post($form.attr('action'), url, function (priv_data) { /*Remove the old userForm table*/ if ($('#userFormDiv').length !== 0) { @@ -165,7 +165,7 @@ function addUser($form) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_privileges.js', function() { +AJAX.registerTeardown('server_privileges.js', function () { $("#fieldset_add_user a.ajax").die("click"); $('form[name=usersForm]').unbind('submit'); $("#reload_privileges_anchor.ajax").die("click"); @@ -178,7 +178,7 @@ AJAX.registerTeardown('server_privileges.js', function() { $('#checkbox_drop_users_db').unbind('click'); }); -AJAX.registerOnload('server_privileges.js', function() { +AJAX.registerOnload('server_privileges.js', function () { /** * AJAX event handler for 'Add a New User' * @@ -188,12 +188,12 @@ AJAX.registerOnload('server_privileges.js', function() { * @name add_user_click * */ - $("#fieldset_add_user a.ajax").live("click", function(event) { + $("#fieldset_add_user a.ajax").live("click", function (event) { /** @lends jQuery */ event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); - $.get($(this).attr("href"), {'ajax_request':true}, function(data) { + $.get($(this).attr("href"), {'ajax_request':true}, function (data) { if (data.success === true) { $('#page_content').hide(); var $div = $('#add_user_dialog'); @@ -231,12 +231,12 @@ AJAX.registerOnload('server_privileges.js', function() { * @memberOf jQuery * @name reload_privileges_click */ - $("#reload_privileges_anchor.ajax").live("click", function(event) { + $("#reload_privileges_anchor.ajax").live("click", function (event) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(PMA_messages['strReloadingPrivileges']); - $.get($(this).attr("href"), {'ajax_request': true}, function(data) { + $.get($(this).attr("href"), {'ajax_request': true}, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); } else { @@ -253,14 +253,14 @@ AJAX.registerOnload('server_privileges.js', function() { * @memberOf jQuery * @name revoke_user_click */ - $("#fieldset_delete_user_footer #buttonGo.ajax").live('click', function(event) { + $("#fieldset_delete_user_footer #buttonGo.ajax").live('click', function (event) { event.preventDefault(); PMA_ajaxShowMessage(PMA_messages['strRemovingSelectedUsers']); var $form = $("#usersForm"); - $.post($form.attr('action'), $form.serialize() + "&delete=" + $(this).val() + "&ajax_request=true", function(data) { + $.post($form.attr('action'), $form.serialize() + "&delete=" + $(this).val() + "&ajax_request=true", function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); // Refresh navigation, if we droppped some databases with the name @@ -269,7 +269,7 @@ AJAX.registerOnload('server_privileges.js', function() { PMA_reloadNavigation(); } //Remove the revoked user from the users list - $form.find("input:checkbox:checked").parents("tr").slideUp("medium", function() { + $form.find("input:checkbox:checked").parents("tr").slideUp("medium", function () { var this_user_initial = $(this).find('input:checkbox').val().charAt(0).toUpperCase(); $(this).remove(); @@ -307,7 +307,7 @@ AJAX.registerOnload('server_privileges.js', function() { * @memberOf jQuery * @name edit_user_click */ - $("a.edit_user_anchor.ajax").live('click', function(event) { + $("a.edit_user_anchor.ajax").live('click', function (event) { /** @lends jQuery */ event.preventDefault(); @@ -323,7 +323,7 @@ AJAX.registerOnload('server_privileges.js', function() { 'edit_user_dialog': true, 'token': token }, - function(data) { + function (data) { if (data.success === true) { $('#page_content').hide(); var $div = $('#edit_user_dialog'); @@ -351,7 +351,7 @@ AJAX.registerOnload('server_privileges.js', function() { * @memberOf jQuery * @name edit_user_submit */ - $("#edit_user_dialog").find("form.ajax").live('submit', function(event) { + $("#edit_user_dialog").find("form.ajax").live('submit', function (event) { /** @lends jQuery */ event.preventDefault(); @@ -382,7 +382,7 @@ AJAX.registerOnload('server_privileges.js', function() { && $('input[name=mode]:checked', '#fieldset_mode').val() != '4') { var old_username = $t.find('input[name="old_username"]').val(); var old_hostname = $t.find('input[name="old_hostname"]').val(); - $('#usersForm tbody tr').each(function() { + $('#usersForm tbody tr').each(function () { var $tr = $(this); if ($tr.find('td:nth-child(2) label').text() == old_username && $tr.find('td:nth-child(3)').text() == old_hostname) { @@ -392,7 +392,7 @@ AJAX.registerOnload('server_privileges.js', function() { }); } - $.post($t.attr('action'), $t.serialize() + '&' + curr_submit_name + '=' + curr_submit_value, function(data) { + $.post($t.attr('action'), $t.serialize() + '&' + curr_submit_name + '=' + curr_submit_value, function (data) { if (data.success === true) { $('#page_content').show(); $("#edit_user_dialog").remove(); @@ -459,7 +459,7 @@ AJAX.registerOnload('server_privileges.js', function() { * @memberOf jQuery * @name export_user_click */ - $("button.mult_submit[value=export]").live('click', function(event) { + $("button.mult_submit[value=export]").live('click', function (event) { event.preventDefault(); // can't export if no users checked if ($(this.form).find("input:checked").length === 0) { @@ -467,13 +467,13 @@ AJAX.registerOnload('server_privileges.js', function() { } var $msgbox = PMA_ajaxShowMessage(); var button_options = {}; - button_options[PMA_messages['strClose']] = function() { + button_options[PMA_messages['strClose']] = function () { $(this).dialog("close"); }; $.post( $(this.form).prop('action'), $(this.form).serialize() + '&submit_mult=export&ajax_request=true', - function(data) { + function (data) { if (data.success === true) { var $ajaxDialog = $('
    ') .append(data.message) @@ -519,17 +519,17 @@ AJAX.registerOnload('server_privileges.js', function() { ); } - $("a.export_user_anchor.ajax").live('click', function(event) { + $("a.export_user_anchor.ajax").live('click', function (event) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); /** * @var button_options Object containing options for jQueryUI dialog buttons */ var button_options = {}; - button_options[PMA_messages['strClose']] = function() { + button_options[PMA_messages['strClose']] = function () { $(this).dialog("close"); }; - $.get($(this).attr('href'), {'ajax_request': true}, function(data) { + $.get($(this).attr('href'), {'ajax_request': true}, function (data) { if (data.success === true) { var $ajaxDialog = $('
    ') .append(data.message) @@ -567,10 +567,10 @@ AJAX.registerOnload('server_privileges.js', function() { * @name paginate_users_table_click * @memberOf jQuery */ - $("#initials_table").find("a.ajax").live('click', function(event) { + $("#initials_table").find("a.ajax").live('click', function (event) { event.preventDefault(); var $msgbox = PMA_ajaxShowMessage(); - $.get($(this).attr('href'), {'ajax_request' : true}, function(data) { + $.get($(this).attr('href'), {'ajax_request' : true}, function (data) { if (data.success === true) { PMA_ajaxRemoveMessage($msgbox); // This form is not on screen when first entering Privileges @@ -591,7 +591,7 @@ AJAX.registerOnload('server_privileges.js', function() { * Additional confirmation dialog after clicking * 'Drop the databases...' */ - $('#checkbox_drop_users_db').click(function() { + $('#checkbox_drop_users_db').click(function () { var $this_checkbox = $(this); if ($this_checkbox.is(':checked')) { var is_confirmed = confirm(PMA_messages['strDropDatabaseStrongWarning'] + '\n' + $.sprintf(PMA_messages['strDoYouReally'], 'DROP DATABASE')); diff --git a/js/server_status.js b/js/server_status.js index e9fb3263c7..0bb534c02f 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -12,7 +12,7 @@ var pma_token, server_db_isLocal; // Add a tablesorter parser to properly handle thousands seperated numbers and SI prefixes -AJAX.registerOnload('server_status.js', function() { +AJAX.registerOnload('server_status.js', function () { var $js_data_form = $('#js_data'); pma_token = $js_data_form.find("input[name=pma_token]").val(); diff --git a/js/server_status_advisor.js b/js/server_status_advisor.js index d581a68362..f15ec13111 100644 --- a/js/server_status_advisor.js +++ b/js/server_status_advisor.js @@ -8,23 +8,23 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_status_advisor.js', function() { +AJAX.registerTeardown('server_status_advisor.js', function () { $('a[href="#openAdvisorInstructions"]').unbind('click'); $('#statustabs_advisor').html(''); $('#advisorDialog').remove(); $('#instructionsDialog').remove(); }); -AJAX.registerOnload('server_status_advisor.js', function() { +AJAX.registerOnload('server_status_advisor.js', function () { /**** Server config advisor ****/ var $dialog = $('
    ').attr('id', 'advisorDialog'); var $instructionsDialog = $('
    ') .attr('id', 'instructionsDialog') .html($('#advisorInstructionsDialog').html()); - $('a[href="#openAdvisorInstructions"]').click(function() { + $('a[href="#openAdvisorInstructions"]').click(function () { var dlgBtns = {}; - dlgBtns[PMA_messages['strClose']] = function() { + dlgBtns[PMA_messages['strClose']] = function () { $(this).dialog('close'); }; $instructionsDialog.dialog({ @@ -61,7 +61,7 @@ AJAX.registerOnload('server_status_advisor.js', function() { var rc_stripped; - $.each(data.run.fired, function(key, value) { + $.each(data.run.fired, function (key, value) { // recommendation may contain links, don't show those in overview table (clicking on them redirects the user) rc_stripped = $.trim($('
    ').html(value.recommendation).text()); $tbody.append($tr = $('' + @@ -69,7 +69,7 @@ AJAX.registerOnload('server_status_advisor.js', function() { even = !even; $tr.data('rule', value); - $tr.click(function() { + $tr.click(function () { var rule = $(this).data('rule'); $dialog .dialog({title: PMA_messages['strRuleDetails']}) @@ -82,7 +82,7 @@ AJAX.registerOnload('server_status_advisor.js', function() { ); var dlgBtns = {}; - dlgBtns[PMA_messages['strClose']] = function() { + dlgBtns[PMA_messages['strClose']] = function () { $(this).dialog('close'); }; diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 178032849e..841db3c36d 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -4,7 +4,7 @@ var runtime = {}, server_os, is_superuser, server_db_isLocal; -AJAX.registerOnload('server_status_monitor.js', function() { +AJAX.registerOnload('server_status_monitor.js', function () { var $js_data_form = $('#js_data'); server_time_diff = new Date().getTime() - $js_data_form.find("input[name=server_time]").val(); server_os = $js_data_form.find("input[name=server_os]").val(); @@ -15,7 +15,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_status_monitor.js', function() { +AJAX.registerTeardown('server_status_monitor.js', function () { $('#emptyDialog').remove(); $('#addChartDialog').remove(); $('a.popupLink').unbind('click'); @@ -24,14 +24,14 @@ AJAX.registerTeardown('server_status_monitor.js', function() { /** * Popup behaviour */ -AJAX.registerOnload('server_status_monitor.js', function() { +AJAX.registerOnload('server_status_monitor.js', function () { $('
    ') .attr('id', 'emptyDialog') .appendTo('#page_content'); $('#addChartDialog') .appendTo('#page_content'); - $('a.popupLink').click( function() { + $('a.popupLink').click( function () { var $link = $(this); $('div.' + $link.attr('href').substr(1)) .show() @@ -40,8 +40,8 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('body').click( function(event) { - $('div.openedPopup').each(function() { + $('body').click( function (event) { + $('div.openedPopup').each(function () { var $cnt = $(this); var pos = $cnt.offset(); // Hide if the mouseclick is outside the popupcontent @@ -56,7 +56,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); }); -AJAX.registerTeardown('server_status_monitor.js', function() { +AJAX.registerTeardown('server_status_monitor.js', function () { $('a[href="#rearrangeCharts"], a[href="#endChartEditMode"]').unbind('click'); $('div.popupContent select[name="chartColumns"]').unbind('change'); $('div.popupContent select[name="gridChartRefresh"]').unbind('change'); @@ -80,7 +80,7 @@ AJAX.registerTeardown('server_status_monitor.js', function() { destroyGrid(); }); -AJAX.registerOnload('server_status_monitor.js', function() { +AJAX.registerOnload('server_status_monitor.js', function () { // Show tab links $('div.tabLinks').show(); $('#loadingMonitorIcon').remove(); @@ -101,7 +101,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } // Timepicker is loaded on demand so we need to initialize // datetime fields from the 'load log' dialog - $('#logAnalyseDialog .datetimefield').each(function() { + $('#logAnalyseDialog .datetimefield').each(function () { PMA_addDatepicker($(this)); }); @@ -165,7 +165,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { nodes: [ { dataPoints: [{type: 'statusvar', name: 'Qcache_hits'}, {type: 'statusvar', name: 'Com_select'}], transformFn: 'qce' - } ], + } ], maxYLabel: 0 }, // Query cache usage @@ -177,7 +177,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { nodes: [ { dataPoints: [{type: 'statusvar', name: 'Qcache_free_memory'}, {type: 'servervar', name: 'query_cache_size'}], transformFn: 'qcu' - } ], + } ], maxYLabel: 0 } }; @@ -201,7 +201,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } ], nodes: [ { dataPoints: [{ type: 'cpu', name: 'loadavg'}] - } ], + } ], maxYLabel: 100 }, @@ -263,7 +263,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { { dataPoints: [{ type: 'memory', name: 'MemFree' }], valueDivisor: 1024 } ], maxYLabel: 0 - }, + }, 'swap': { title: PMA_messages['strSystemSwap'], series: [ @@ -290,7 +290,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } ], nodes: [ { dataPoints: [{ type: 'cpu', name: 'loadavg'}] - } ], + } ], maxYLabel: 0 }, 'memory': { @@ -304,7 +304,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { { dataPoints: [{ type: 'memory', name: 'MemFree' }], valueDivisor: 1024 } ], maxYLabel: 0 - }, + }, 'swap': { title: PMA_messages['strSystemSwap'], series: [ @@ -370,19 +370,19 @@ AJAX.registerOnload('server_status_monitor.js', function() { menuName: 'gridsettings', menuItems: [{ textKey: 'editChart', - onclick: function() { + onclick: function () { editChart(this); } }, { textKey: 'removeChart', - onclick: function() { + onclick: function () { removeChart(this); } }] } }; - $('a[href="#rearrangeCharts"], a[href="#endChartEditMode"]').click(function(event) { + $('a[href="#rearrangeCharts"], a[href="#endChartEditMode"]').click(function (event) { event.preventDefault(); editMode = !editMode; if ($(this).attr('href') == '#endChartEditMode') { @@ -409,7 +409,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { events: { // Drop event. The drag child element is moved into the drop element // and vice versa. So the parameters are switched. - drop: function(drag, drop, pos) { + drop: function (drag, drop, pos) { var dragKey, dropKey, dropRender; var dragRender = $(drag).children().first().attr('id'); @@ -418,7 +418,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } // Find the charts in the array - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { if (value.chart.options.chart.renderTo == dragRender) { dragKey = key; } @@ -442,7 +442,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var newChartList = {}; var c = 0; - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { if (key != dropKey) { keys.push(key); } @@ -482,7 +482,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); // global settings - $('div.popupContent select[name="chartColumns"]').change(function() { + $('div.popupContent select[name="chartColumns"]').change(function () { monitorSettings.columns = parseInt(this.value, 10); var newSize = chartSize(); @@ -497,7 +497,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { while($tr.length !== 0) { numColumns = 1; // To many cells in one row => put into next row - $tr.find('td').each(function() { + $tr.find('td').each(function () { if (numColumns > monitorSettings.columns) { if ($tr.next().length === 0) { $tr.after(''); @@ -513,7 +513,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var cnt = monitorSettings.columns - $tr.find('td').length; for (var i = 0; i < cnt; i++) { $tr.append($tr.next().find('td:first')); - $tr.nextAll().each(function() { + $tr.nextAll().each(function () { if ($(this).next().length !== 0) { $(this).append($(this).next().find('td:first')); } @@ -526,7 +526,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } /* Apply new chart size to all charts */ - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { value.chart.setSize( newSize.width, newSize.height, @@ -548,7 +548,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { saveMonitor(); // Save settings }); - $('div.popupContent select[name="gridChartRefresh"]').change(function() { + $('div.popupContent select[name="gridChartRefresh"]').change(function () { monitorSettings.gridRefresh = parseInt(this.value, 10) * 1000; clearTimeout(runtime.refreshTimeout); @@ -564,11 +564,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { saveMonitor(); // Save settings }); - $('a[href="#addNewChart"]').click(function(event) { + $('a[href="#addNewChart"]').click(function (event) { event.preventDefault(); var dlgButtons = { }; - dlgButtons[PMA_messages['strAddChart']] = function() { + dlgButtons[PMA_messages['strAddChart']] = function () { var type = $('input[name="chartType"]:checked').val(); if (type == 'preset') { @@ -594,7 +594,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $(this).dialog("close"); }; - dlgButtons[PMA_messages['strClose']] = function() { + dlgButtons[PMA_messages['strClose']] = function () { newChart = null; $('span#clearSeriesLink').hide(); $('#seriesPreview').html(''); @@ -603,10 +603,10 @@ AJAX.registerOnload('server_status_monitor.js', function() { var $presetList = $('#addChartDialog select[name="presetCharts"]'); if ($presetList.html().length === 0) { - $.each(presetCharts, function(key, value) { + $.each(presetCharts, function (key, value) { $presetList.append(''); }); - $presetList.change(function() { + $presetList.change(function () { $('input[name="chartTitle"]').val( $presetList.find(':selected').text() ); @@ -640,10 +640,10 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('a[href="#exportMonitorConfig"]').click(function(event) { + $('a[href="#exportMonitorConfig"]').click(function (event) { event.preventDefault(); var gridCopy = {}; - $.each(runtime.charts, function(key, elem) { + $.each(runtime.charts, function (key, elem) { gridCopy[key] = {}; gridCopy[key].nodes = elem.nodes; gridCopy[key].settings = elem.settings; @@ -671,7 +671,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { .remove(); }); - $('a[href="#importMonitorConfig"]').click(function(event) { + $('a[href="#importMonitorConfig"]').click(function (event) { event.preventDefault(); $('#emptyDialog').dialog({title: PMA_messages['strImportDialogTitle']}); $('#emptyDialog').html(PMA_messages['strImportDialogMessage'] + ':
    ' + @@ -679,14 +679,14 @@ AJAX.registerOnload('server_status_monitor.js', function() { var dlgBtns = {}; - dlgBtns[PMA_messages['strImport']] = function() { + dlgBtns[PMA_messages['strImport']] = function () { var $iframe, $form; $('body').append($iframe = $('')); var d = $iframe[0].contentWindow.document; d.open(); d.close(); mew = d; - $iframe.load(function() { + $iframe.load(function () { var json; // Try loading config @@ -728,7 +728,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('#emptyDialog').append(''); }; - dlgBtns[PMA_messages['strCancel']] = function() { + dlgBtns[PMA_messages['strCancel']] = function () { $(this).dialog('close'); }; @@ -740,7 +740,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); }); - $('a[href="#clearMonitorConfig"]').click(function(event) { + $('a[href="#clearMonitorConfig"]').click(function (event) { event.preventDefault(); window.localStorage.removeItem('monitorCharts'); window.localStorage.removeItem('monitorSettings'); @@ -749,7 +749,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { rebuildGrid(); }); - $('a[href="#pauseCharts"]').click(function(event) { + $('a[href="#pauseCharts"]').click(function (event) { event.preventDefault(); runtime.redrawCharts = ! runtime.redrawCharts; if (! runtime.redrawCharts) { @@ -764,7 +764,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('a[href="#monitorInstructionsDialog"]').click(function(event) { + $('a[href="#monitorInstructionsDialog"]').click(function (event) { event.preventDefault(); var $dialog = $('#monitorInstructionsDialog'); @@ -774,14 +774,14 @@ AJAX.registerOnload('server_status_monitor.js', function() { height: 'auto' }).find('img.ajaxIcon').show(); - var loadLogVars = function(getvars) { + var loadLogVars = function (getvars) { var vars = { ajax_request: true, logging_vars: true }; if (getvars) { $.extend(vars, getvars); } $.get('server_status_monitor.php?' + PMA_commonParams.get('common_query'), vars, - function(data) { + function (data) { var logVars; if (data.success === true) { logVars = data.message; @@ -887,7 +887,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $dialog.find('div.ajaxContent').html(str); $dialog.find('img.ajaxIcon').hide(); - $dialog.find('a.set').click(function() { + $dialog.find('a.set').click(function () { var nameValue = $(this).attr('href').split('-'); loadLogVars({ varName: nameValue[0].substr(1), varValue: nameValue[1]}); $dialog.find('img.ajaxIcon').show(); @@ -902,7 +902,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('input[name="chartType"]').change(function() { + $('input[name="chartType"]').change(function () { $('#chartVariableSettings').toggle(this.checked && this.value == 'variable'); var title = $('input[name="chartTitle"]').val(); if (title == PMA_messages['strChartTitle'] @@ -915,11 +915,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); - $('input[name="useDivisor"]').change(function() { + $('input[name="useDivisor"]').change(function () { $('span.divisorInput').toggle(this.checked); }); - $('input[name="useUnit"]').change(function() { + $('input[name="useUnit"]').change(function () { $('span.unitInput').toggle(this.checked); }); @@ -929,7 +929,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } }); - $('a[href="#kibDivisor"]').click(function(event) { + $('a[href="#kibDivisor"]').click(function (event) { event.preventDefault(); $('input[name="valueDivisor"]').val(1024); $('input[name="valueUnit"]').val(PMA_messages['strKiB']); @@ -938,7 +938,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('a[href="#mibDivisor"]').click(function(event) { + $('a[href="#mibDivisor"]').click(function (event) { event.preventDefault(); $('input[name="valueDivisor"]').val(1024*1024); $('input[name="valueUnit"]').val(PMA_messages['strMiB']); @@ -947,14 +947,14 @@ AJAX.registerOnload('server_status_monitor.js', function() { return false; }); - $('a[href="#submitClearSeries"]').click(function(event) { + $('a[href="#submitClearSeries"]').click(function (event) { event.preventDefault(); $('#seriesPreview').html('' + PMA_messages['strNone'] + ''); newChart = null; $('#clearSeriesLink').hide(); }); - $('a[href="#submitAddSeries"]').click(function(event) { + $('a[href="#submitAddSeries"]').click(function (event) { event.preventDefault(); if ($('#variableInput').val() === "") { return false; @@ -1034,7 +1034,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('#emptyDialog').html(PMA_messages['strIncompatibleMonitorConfigDescription']); var dlgBtns = {}; - dlgBtns[PMA_messages['strClose']] = function() { $(this).dialog('close'); }; + dlgBtns[PMA_messages['strClose']] = function () { $(this).dialog('close'); }; $('#emptyDialog').dialog({ width: 400, @@ -1074,7 +1074,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { /* Add all charts - in correct order */ var keys = []; - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { keys.push(key); }); keys.sort(); @@ -1102,7 +1102,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var oldData = null; if (runtime.charts) { oldData = {}; - $.each(runtime.charts, function(key, chartObj) { + $.each(runtime.charts, function (key, chartObj) { for (var i = 0, l = chartObj.nodes.length; i < l; i++) { oldData[chartObj.nodes[i].dataPoint] = []; for (var j = 0, ll = chartObj.chart.series[i].data.length; j < ll; j++) { @@ -1116,7 +1116,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { initGrid(); if (oldData) { - $.each(runtime.charts, function(key, chartObj) { + $.each(runtime.charts, function (key, chartObj) { for (var j = 0, l = chartObj.nodes.length; j < l; j++) { if (oldData[chartObj.nodes[j].dataPoint]) { chartObj.chart.series[j].setData(oldData[chartObj.nodes[j].dataPoint]); @@ -1247,7 +1247,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } // time span selection - $('#gridchart' + runtime.chartAI).bind('jqplotMouseDown', function(ev, gridpos, datapos, neighbor, plot) { + $('#gridchart' + runtime.chartAI).bind('jqplotMouseDown', function (ev, gridpos, datapos, neighbor, plot) { drawTimeSpan = true; selectionTimeDiff.push(datapos.xaxis); if ($('#selection_box').length) { @@ -1266,7 +1266,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { .fadeIn(); }); - $('#gridchart' + runtime.chartAI).bind('jqplotMouseUp', function(ev, gridpos, datapos, neighbor, plot) { + $('#gridchart' + runtime.chartAI).bind('jqplotMouseUp', function (ev, gridpos, datapos, neighbor, plot) { if (! drawTimeSpan) { return; } @@ -1285,7 +1285,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { drawTimeSpan = false; }); - $('#gridchart' + runtime.chartAI).bind('jqplotMouseMove', function(ev, gridpos, datapos, neighbor, plot) { + $('#gridchart' + runtime.chartAI).bind('jqplotMouseMove', function (ev, gridpos, datapos, neighbor, plot) { if (! drawTimeSpan) { return; } @@ -1298,11 +1298,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { } }); - $('#gridchart' + runtime.chartAI).bind('jqplotMouseLeave', function(ev, gridpos, datapos, neighbor, plot) { + $('#gridchart' + runtime.chartAI).bind('jqplotMouseLeave', function (ev, gridpos, datapos, neighbor, plot) { drawTimeSpan = false; }); - $(document.body).mouseup(function() { + $(document.body).mouseup(function () { if ($('#selection_box').length) { selectionBox.remove(); } @@ -1323,7 +1323,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var chart = null; var chartKey = null; - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { if (value.chart.options.chart.renderTo == htmlnode) { chart = value; chartKey = key; @@ -1342,11 +1342,11 @@ AJAX.registerOnload('server_status_monitor.js', function() { } dlgBtns = {}; - dlgBtns[PMA_messages['strSave']] = function() { + dlgBtns[PMA_messages['strSave']] = function () { runtime.charts[chartKey].title = $('#emptyDialog input[name="chartTitle"]').val(); runtime.charts[chartKey].chart.setTitle({ text: runtime.charts[chartKey].title }); - $('#emptyDialog input[name*="chartSerie"]').each(function() { + $('#emptyDialog input[name*="chartSerie"]').each(function () { var $t = $(this); var idx = $t.attr('name').split('-')[1]; runtime.charts[chartKey].nodes[idx].name = $t.val(); @@ -1356,7 +1356,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $(this).dialog('close'); saveMonitor(); }; - dlgBtns[PMA_messages['strCancel']] = function() { + dlgBtns[PMA_messages['strCancel']] = function () { $(this).dialog('close'); }; @@ -1377,12 +1377,12 @@ AJAX.registerOnload('server_status_monitor.js', function() { var dlgBtns = { }; - dlgBtns[PMA_messages['strFromSlowLog']] = function() { + dlgBtns[PMA_messages['strFromSlowLog']] = function () { loadLog('slow', min, max); $(this).dialog("close"); }; - dlgBtns[PMA_messages['strFromGeneralLog']] = function() { + dlgBtns[PMA_messages['strFromGeneralLog']] = function () { loadLog('general', min, max); $(this).dialog("close"); }; @@ -1414,7 +1414,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { return; } - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { if (value.chart.options.chart.renderTo == htmlnode) { delete runtime.charts[key]; return false; @@ -1425,7 +1425,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // Using settimeout() because clicking the remove link fires an onclick event // which throws an error when the chart is destroyed - setTimeout(function() { + setTimeout(function () { chartObj.destroy(); $('#' + htmlnode).remove(); }, 10); @@ -1441,7 +1441,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { chart_data: 1, type: 'chartgrid', requiredData: $.toJSON(runtime.dataList) - }, function(data) { + }, function (data) { var chartData; if (data.success === true) { chartData = data.message; @@ -1453,7 +1453,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var total; /* Update values in each graph */ - $.each(runtime.charts, function(orderKey, elem) { + $.each(runtime.charts, function (orderKey, elem) { var key = elem.chartID; // If newly added chart, we have no data for it yet if (! chartData[key]) { @@ -1568,7 +1568,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { */ function getMaxYLabel(dataValues) { var maxY = dataValues[0][1]; - $.each(dataValues,function(k,v){ + $.each(dataValues,function (k,v){ maxY = (v[1]>maxY) ? v[1] : maxY; }); return maxY; @@ -1624,7 +1624,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { // Store an own id, because the property name is subject of reordering, // thus destroying our mapping with runtime.charts <=> runtime.dataList var chartID = 0; - $.each(runtime.charts, function(key, chart) { + $.each(runtime.charts, function (key, chart) { runtime.dataList[chartID] = []; for (var i=0, l=chart.nodes.length; i < l; i++) { runtime.dataList[chartID][i] = chart.nodes[i].dataPoints; @@ -1652,7 +1652,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { 'ajax_clock_small.gif" alt="">'); var dlgBtns = {}; - dlgBtns[PMA_messages['strCancelRequest']] = function() { + dlgBtns[PMA_messages['strCancelRequest']] = function () { if (logRequest !== null) { logRequest.abort(); } @@ -1676,7 +1676,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { removeVariables: opts.removeVariables, limitTypes: opts.limitTypes }, - function(data) { + function (data) { var logData; if (data.success === true) { logData = data.message; @@ -1690,7 +1690,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { /* Show some stats in the dialog */ $('#emptyDialog').dialog({title: PMA_messages['strLoadingLogs']}); $('#emptyDialog').html('

    ' + PMA_messages['strLogDataLoaded'] + '

    '); - $.each(logData.sum, function(key, value) { + $.each(logData.sum, function (key, value) { key = key.charAt(0).toUpperCase() + key.slice(1).toLowerCase(); if (key == 'Total') { key = '' + key + ''; @@ -1715,7 +1715,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { '' ); - $('#logTable #noWHEREData').change(function() { + $('#logTable #noWHEREData').change(function () { filterQueries(true); }); @@ -1728,7 +1728,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } var dlgBtns = {}; - dlgBtns[PMA_messages['strJumpToTable']] = function() { + dlgBtns[PMA_messages['strJumpToTable']] = function () { $(this).dialog("close"); $(document).scrollTop($('#logTable').offset().top); }; @@ -1740,7 +1740,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('#emptyDialog').html('

    ' + PMA_messages['strNoDataFound'] + '

    '); var dlgBtns = {}; - dlgBtns[PMA_messages['strClose']] = function() { + dlgBtns[PMA_messages['strClose']] = function () { $(this).dialog("close"); }; @@ -1778,7 +1778,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var columnSums = {}; // For the slow log we have to count many columns (query_time, lock_time, rows_examined, rows_sent, etc.) - var countRow = function(query, row) { + var countRow = function (query, row) { var cells = row.match(/(.*?)<\/td>/gi); if (!columnSums[query]) { columnSums[query] = [0, 0, 0, 0]; @@ -1793,7 +1793,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { }; // We just assume the sql text is always in the second last column, and that the total count is right of it - $('#logTable table tbody tr td:nth-child(' + (runtime.logDataCols.length - 1) + ')').each(function() { + $('#logTable table tbody tr td:nth-child(' + (runtime.logDataCols.length - 1) + ')').each(function () { var $t = $(this); // If query is a SELECT and user enabled or disabled to group // queries ignoring data in where statements, we @@ -1870,7 +1870,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { if (varFilterChange) { if (noVars) { var numCol, row, $table = $('#logTable table tbody'); - $.each(filteredQueriesLines, function(key, value) { + $.each(filteredQueriesLines, function (key, value) { if (filteredQueries[key] <= 1) { return; } @@ -1889,7 +1889,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { } $('#logTable table').trigger("update"); - setTimeout(function() { + setTimeout(function () { $('#logTable table').trigger('sorton', [[[runtime.logDataCols.length - 1, 1]]]); }, 0); } @@ -1937,7 +1937,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('#logTable').html($table); - var formatValue = function(name, value) { + var formatValue = function (name, value) { switch(name) { case 'user_host': return value.replace(/(\[.*?\])+/g, ''); @@ -1947,7 +1947,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { for (var i = 0, l = rows.length; i < l; i++) { if (i === 0) { - $.each(rows[0], function(key, value) { + $.each(rows[0], function (key, value) { cols.push(key); }); $table.append( '' + @@ -2014,7 +2014,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { codemirror_editor.setValue(query); // Codemirror is bugged, it doesn't refresh properly sometimes. // Following lines seem to fix that - setTimeout(function() { + setTimeout(function () { codemirror_editor.refresh(); },50); } @@ -2025,7 +2025,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { var profilingChart = null; var dlgBtns = {}; - dlgBtns[PMA_messages['strAnalyzeQuery']] = function() { + dlgBtns[PMA_messages['strAnalyzeQuery']] = function () { loadQueryAnalysis(rowData); }; dlgBtns[PMA_messages['strClose']] = function () { @@ -2037,7 +2037,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { height: 'auto', resizable: false, buttons: dlgBtns, - close: function() { + close: function () { if (profilingChart !== null) { profilingChart.destroy(); } @@ -2064,7 +2064,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { query_analyzer: true, query: codemirror_editor ? codemirror_editor.getValue() : $('#sqlquery').val(), database: db - }, function(data) { + }, function (data) { if (data.success === true) { data = data.message; } else { @@ -2090,7 +2090,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { explain += '

    '; for (var i = 0, l = data.explain.length; i < l; i++) { explain += '
    0? 'style="display:none;"' : '' ) + '>'; - $.each(data.explain[i], function(key, value) { + $.each(data.explain[i], function (key, value) { value = (value === null)?'null':value; if (key == 'type' && value.toLowerCase() == 'all') { @@ -2108,7 +2108,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { $('#queryAnalyzerDialog div.placeHolder td.explain').append(explain); - $('#queryAnalyzerDialog div.placeHolder a[href*="#showExplain"]').click(function() { + $('#queryAnalyzerDialog div.placeHolder a[href*="#showExplain"]').click(function () { var id = $(this).attr('href').split('-')[1]; $(this).parent().find('div[class*="explain"]').hide(); $(this).parent().find('div[class*="explain-' + id + '"]').show(); @@ -2151,13 +2151,13 @@ AJAX.registerOnload('server_status_monitor.js', function() { '(' + PMA_messages['strTable'] + ', ' + PMA_messages['strChart'] + ')
    ' + numberTable + '
    '); - $('#queryAnalyzerDialog div.placeHolder a[href="#showNums"]').click(function() { + $('#queryAnalyzerDialog div.placeHolder a[href="#showNums"]').click(function () { $('#queryAnalyzerDialog #queryProfiling').hide(); $('#queryAnalyzerDialog table.queryNums').show(); return false; }); - $('#queryAnalyzerDialog div.placeHolder a[href="#showChart"]').click(function() { + $('#queryAnalyzerDialog div.placeHolder a[href="#showChart"]').click(function () { $('#queryAnalyzerDialog #queryProfiling').show(); $('#queryAnalyzerDialog table.queryNums').hide(); return false; @@ -2177,7 +2177,7 @@ AJAX.registerOnload('server_status_monitor.js', function() { function saveMonitor() { var gridCopy = {}; - $.each(runtime.charts, function(key, elem) { + $.each(runtime.charts, function (key, elem) { gridCopy[key] = {}; gridCopy[key].nodes = elem.nodes; gridCopy[key].settings = elem.settings; @@ -2197,13 +2197,13 @@ AJAX.registerOnload('server_status_monitor.js', function() { }); // Run the monitor once loaded -AJAX.registerOnload('server_status_monitor.js', function() { +AJAX.registerOnload('server_status_monitor.js', function () { $('a[href="#pauseCharts"]').trigger('click'); }); function serverResponseError() { var btns = {}; - btns[PMA_messages['strReloadPage']] = function() { + btns[PMA_messages['strReloadPage']] = function () { window.location.reload(); }; $('#emptyDialog').dialog({title: PMA_messages['strRefreshFailed']}); @@ -2217,7 +2217,7 @@ function serverResponseError() { /* Destroys all monitor related resources */ function destroyGrid() { if (runtime.charts) { - $.each(runtime.charts, function(key, value) { + $.each(runtime.charts, function (key, value) { try { value.chart.destroy(); } catch(err) {} diff --git a/js/server_status_queries.js b/js/server_status_queries.js index e17675711c..51bb155347 100644 --- a/js/server_status_queries.js +++ b/js/server_status_queries.js @@ -5,18 +5,18 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_status_queries.js', function() { +AJAX.registerTeardown('server_status_queries.js', function () { var queryPieChart = $('#serverstatusquerieschart').data('queryPieChart'); if (queryPieChart) { queryPieChart.destroy(); } }); -AJAX.registerOnload('server_status_queries.js', function() { +AJAX.registerOnload('server_status_queries.js', function () { // Build query statistics chart var cdata = []; try { - $.each(jQuery.parseJSON($('#serverstatusquerieschart_data').text()), function(key, value) { + $.each(jQuery.parseJSON($('#serverstatusquerieschart_data').text()), function (key, value) { cdata.push([key, parseInt(value, 10)]); }); $('#serverstatusquerieschart').data( diff --git a/js/server_status_sorter.js b/js/server_status_sorter.js index 32f418ce09..b89778be7c 100644 --- a/js/server_status_sorter.js +++ b/js/server_status_sorter.js @@ -2,27 +2,27 @@ function initTableSorter(tabid) { var $table, opts; switch(tabid) { - case 'statustabs_queries': - $table = $('#serverstatusqueriesdetails'); - opts = { - sortList: [[3, 1]], - widgets: ['fast-zebra'], - headers: { - 1: { sorter: 'fancyNumber' }, - 2: { sorter: 'fancyNumber' } - } - }; - break; - case 'statustabs_allvars': - $table = $('#serverstatusvariables'); - opts = { - sortList: [[0, 0]], - widgets: ['fast-zebra'], - headers: { - 1: { sorter: 'withinSpanNumber' } - } - }; - break; + case 'statustabs_queries': + $table = $('#serverstatusqueriesdetails'); + opts = { + sortList: [[3, 1]], + widgets: ['fast-zebra'], + headers: { + 1: { sorter: 'fancyNumber' }, + 2: { sorter: 'fancyNumber' } + } + }; + break; + case 'statustabs_allvars': + $table = $('#serverstatusvariables'); + opts = { + sortList: [[0, 0]], + widgets: ['fast-zebra'], + headers: { + 1: { sorter: 'withinSpanNumber' } + } + }; + break; } $table.tablesorter(opts); $table.find('tr:first th') @@ -32,10 +32,10 @@ function initTableSorter(tabid) { $(function () { $.tablesorter.addParser({ id: "fancyNumber", - is: function(s) { + is: function (s) { return (/^[0-9]?[0-9,\.]*\s?(k|M|G|T|%)?$/).test(s); }, - format: function(s) { + format: function (s) { var num = jQuery.tablesorter.formatFloat( s.replace(PMA_messages['strThousandsSeparator'], '') .replace(PMA_messages['strDecimalSeparator'], '.') @@ -43,12 +43,22 @@ $(function () { var factor = 1; switch (s.charAt(s.length - 1)) { - case '%': factor = -2; break; - // Todo: Complete this list (as well as in the regexp a few lines up) - case 'k': factor = 3; break; - case 'M': factor = 6; break; - case 'G': factor = 9; break; - case 'T': factor = 12; break; + case '%': + factor = -2; + break; + // Todo: Complete this list (as well as in the regexp a few lines up) + case 'k': + factor = 3; + break; + case 'M': + factor = 6; + break; + case 'G': + factor = 9; + break; + case 'T': + factor = 12; + break; } return num * Math.pow(10, factor); @@ -58,10 +68,10 @@ $(function () { $.tablesorter.addParser({ id: "withinSpanNumber", - is: function(s) { + is: function (s) { return (/(.*)?<\/span>/); return (res && res.length >= 3) ? res[2] : 0; }, diff --git a/js/server_status_variables.js b/js/server_status_variables.js index 48c08d220f..40b1b600ec 100644 --- a/js/server_status_variables.js +++ b/js/server_status_variables.js @@ -8,14 +8,14 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_status_variables.js', function() { +AJAX.registerTeardown('server_status_variables.js', function () { $('#filterAlert').unbind('change'); $('#filterText').unbind('keyup'); $('#filterCategory').unbind('change'); $('#dontFormat').unbind('change'); }); -AJAX.registerOnload('server_status_variables.js', function() { +AJAX.registerOnload('server_status_variables.js', function () { /*** Table sort tooltip ***/ PMA_tooltip( $('table.sortable>thead>tr:first').find('th'), @@ -32,17 +32,17 @@ AJAX.registerOnload('server_status_variables.js', function() { var text = ''; // Holds filter text /* 3 Filtering functions */ - $('#filterAlert').change(function() { + $('#filterAlert').change(function () { alertFilter = this.checked; filterVariables(); }); - $('#filterCategory').change(function() { + $('#filterCategory').change(function () { categoryFilter = $(this).val(); filterVariables(); }); - $('#dontFormat').change(function() { + $('#dontFormat').change(function () { // Hiding the table while changing values speeds up the process a lot $('#serverstatusvariables').hide(); $('#serverstatusvariables td.value span.original').toggle(this.checked); @@ -50,7 +50,7 @@ AJAX.registerOnload('server_status_variables.js', function() { $('#serverstatusvariables').show(); }).trigger('change'); - $('#filterText').keyup(function(e) { + $('#filterText').keyup(function (e) { var word = $(this).val().replace(/_/g, ' '); if (word.length === 0) { textFilter = null; @@ -71,7 +71,7 @@ AJAX.registerOnload('server_status_variables.js', function() { } if (section.length > 1) { - $('#linkSuggestions span').each(function() { + $('#linkSuggestions span').each(function () { if ($(this).attr('class').indexOf('status_' + section) != -1) { useful_links++; $(this).css('display', ''); @@ -88,7 +88,7 @@ AJAX.registerOnload('server_status_variables.js', function() { } odd_row = false; - $('#serverstatusvariables th.name').each(function() { + $('#serverstatusvariables th.name').each(function () { if ((textFilter === null || textFilter.exec($(this).text())) && (! alertFilter || $(this).next().find('span.attention').length>0) && (categoryFilter.length === 0 || $(this).parent().hasClass('s_' + categoryFilter)) diff --git a/js/server_variables.js b/js/server_variables.js index 12ae9d0c52..f2c4b4409b 100644 --- a/js/server_variables.js +++ b/js/server_variables.js @@ -3,21 +3,21 @@ /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('server_variables.js', function() { +AJAX.registerTeardown('server_variables.js', function () { $('#serverVariables .var-row').unbind('hover'); $('#filterText').unbind('keyup'); $('a.editLink').die('click'); $('#serverVariables').find('.var-name').find('a img').remove(); }); -AJAX.registerOnload('server_variables.js', function() { +AJAX.registerOnload('server_variables.js', function () { var $editLink = $('a.editLink'); var $saveLink = $('a.saveLink'); var $cancelLink = $('a.cancelLink'); var $filterField = $('#filterText'); /* Show edit link on hover */ - $('#serverVariables').delegate('.var-row', 'hover', function(event) { + $('#serverVariables').delegate('.var-row', 'hover', function (event) { if (event.type === 'mouseenter') { var $elm = $(this).find('.var-value'); // Only add edit element if the element is not being edited @@ -38,7 +38,7 @@ AJAX.registerOnload('server_variables.js', function() { }); /* Event handler for variables filter */ - $filterField.keyup(function() { + $filterField.keyup(function () { var textFilter = null, val = $(this).val(); if (val.length !== 0) { textFilter = new RegExp("(^| )"+val.replace(/_/g,' '),'i'); @@ -54,7 +54,7 @@ AJAX.registerOnload('server_variables.js', function() { /* Filters the rows by the user given regexp */ function filterVariables(textFilter) { var mark_next = false, $row, odd_row = false; - $('#serverVariables .var-row').not('.var-header').each(function() { + $('#serverVariables .var-row').not('.var-header').each(function () { $row = $(this); if ( mark_next || textFilter === null @@ -90,14 +90,14 @@ AJAX.registerOnload('server_variables.js', function() { .find('a.editLink') .remove(); // remove edit link - $mySaveLink.click(function() { + $mySaveLink.click(function () { var $msgbox = PMA_ajaxShowMessage(PMA_messages.strProcessingRequest); $.get($(this).attr('href'), { ajax_request: true, type: 'setval', varName: varName, varValue: $cell.find('input').val() - }, function(data) { + }, function (data) { if (data.success) { $cell .html(data.variable) @@ -112,7 +112,7 @@ AJAX.registerOnload('server_variables.js', function() { return false; }); - $myCancelLink.click(function() { + $myCancelLink.click(function () { $cell .html($cell.data('content')) .removeClass('edit'); @@ -123,7 +123,7 @@ AJAX.registerOnload('server_variables.js', function() { ajax_request: true, type: 'getval', varName: varName - }, function(data) { + }, function (data) { if (data.success === true) { var $editor = $('
    ', {'class':'serverVariableEditor'}) .append($myCancelLink) @@ -141,7 +141,7 @@ AJAX.registerOnload('server_variables.js', function() { .html($editor) .find('input') .focus() - .keydown(function(event) { // Keyboard shortcuts + .keydown(function (event) { // Keyboard shortcuts if (event.keyCode === 13) { // Enter key $mySaveLink.trigger('click'); } else if (event.keyCode === 27) { // Escape key diff --git a/js/sql.js b/js/sql.js index 8445b7c2b9..68b0399eab 100644 --- a/js/sql.js +++ b/js/sql.js @@ -65,7 +65,7 @@ function getFieldName($this_field) /** * Unbind all event handlers before tearing down a page */ -AJAX.registerTeardown('sql.js', function() { +AJAX.registerTeardown('sql.js', function () { $('a.delete_row.ajax').unbind('click'); $('#bookmarkQueryForm').die('submit'); $('input#bkm_label').unbind('keyup'); @@ -102,7 +102,7 @@ AJAX.registerTeardown('sql.js', function() { * @name document.ready * @memberOf jQuery */ -AJAX.registerOnload('sql.js', function() { +AJAX.registerOnload('sql.js', function () { // Delete row from SQL results $('a.delete_row.ajax').click(function (e) { e.preventDefault(); @@ -135,7 +135,7 @@ AJAX.registerOnload('sql.js', function() { }); /* Hides the bookmarkoptions checkboxes when the bookmark label is empty */ - $('input#bkm_label').keyup(function() { + $('input#bkm_label').keyup(function () { $('input#id_bkm_all_users, input#id_bkm_replace') .parent() .toggle($(this).val().length > 0); @@ -146,7 +146,7 @@ AJAX.registerOnload('sql.js', function() { * triggered manually everytime the table of results is reloaded * @memberOf jQuery */ - $("#sqlqueryresults").live('makegrid', function() { + $("#sqlqueryresults").live('makegrid', function () { PMA_makegrid($('#table_results')[0]); }); @@ -166,7 +166,7 @@ AJAX.registerOnload('sql.js', function() { .hide(); // Attach the toggling of the query box visibility to a click - $("#togglequerybox").bind('click', function() { + $("#togglequerybox").bind('click', function () { var $link = $(this); $link.siblings().slideToggle("fast"); if ($link.text() == PMA_messages['strHideQueryBox']) { @@ -189,7 +189,7 @@ AJAX.registerOnload('sql.js', function() { * * @memberOf jQuery */ - $("#button_submit_query").live('click', function(event) { + $("#button_submit_query").live('click', function (event) { var $form = $(this).closest("form"); // the Go button related to query submission was clicked, // instead of the one related to Bookmarks, so empty the @@ -205,7 +205,7 @@ AJAX.registerOnload('sql.js', function() { * * @memberOf jQuery */ - $("input[name=bookmark_variable]").bind("keypress", function(event) { + $("input[name=bookmark_variable]").bind("keypress", function (event) { // force the 'Enter Key' to implicitly click the #button_submit_bookmark var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode)); if (keycode == 13) { // keycode for enter key @@ -218,9 +218,9 @@ AJAX.registerOnload('sql.js', function() { // section and hit enter, you expect it to do the // same action as the Go button in that section. $("#button_submit_bookmark").click(); - return false; + return false; } else { - return true; + return true; } }); @@ -231,7 +231,7 @@ AJAX.registerOnload('sql.js', function() { * @memberOf jQuery * @name sqlqueryform_submit */ - $("#sqlqueryform.ajax").live('submit', function(event) { + $("#sqlqueryform.ajax").live('submit', function (event) { event.preventDefault(); var $form = $(this); @@ -247,7 +247,7 @@ AJAX.registerOnload('sql.js', function() { PMA_prepareForAjaxRequest($form); - $.post($form.attr('action'), $form.serialize() , function(data) { + $.post($form.attr('action'), $form.serialize() , function (data) { if (data.success === true) { // success happens if the query returns rows or not // @@ -334,7 +334,7 @@ AJAX.registerOnload('sql.js', function() { * @memberOf jQuery * @name paginate_dropdown_change */ - $("#pageselector").live('change', function(event) { + $("#pageselector").live('change', function (event) { var $form = $(this).parent("form"); $form.submit(); }); // end Paginate results with Page Selector @@ -344,12 +344,12 @@ AJAX.registerOnload('sql.js', function() { * @memberOf jQuery * @name displayOptionsForm_submit */ - $("#displayOptionsForm.ajax").live('submit', function(event) { + $("#displayOptionsForm.ajax").live('submit', function (event) { event.preventDefault(); $form = $(this); - $.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function(data) { + $.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function (data) { $("#sqlqueryresults") .html(data.message) .trigger('makegrid'); @@ -360,7 +360,7 @@ AJAX.registerOnload('sql.js', function() { /** * Ajax Event for table row change * */ - $("#resultsForm.ajax .mult_submit[value=edit]").live('click', function(event){ + $("#resultsForm.ajax .mult_submit[value=edit]").live('click', function (event){ event.preventDefault(); /*Check whether atleast one row is selected for change*/ @@ -373,18 +373,18 @@ AJAX.registerOnload('sql.js', function() { */ var button_options = {}; // in the following function we need to use $(this) - button_options[PMA_messages['strCancel']] = function() { + button_options[PMA_messages['strCancel']] = function () { $(this).dialog('close'); }; var button_options_error = {}; - button_options_error[PMA_messages['strOK']] = function() { + button_options_error[PMA_messages['strOK']] = function () { $(this).dialog('close'); }; var $form = $("#resultsForm"); var $msgbox = PMA_ajaxShowMessage(); - $.get($form.attr('action'), $form.serialize()+"&ajax_request=true&submit_mult=row_edit", function(data) { + $.get($form.attr('action'), $form.serialize()+"&ajax_request=true&submit_mult=row_edit", function (data) { //in the case of an error, show the error message returned. if (data.success !== undefined && data.success === false) { $div @@ -394,7 +394,7 @@ AJAX.registerOnload('sql.js', function() { height: 230, width: 900, open: PMA_verifyColumnsProperties, - close: function(event, ui) { + close: function (event, ui) { $(this).remove(); }, buttons : button_options_error @@ -407,7 +407,7 @@ AJAX.registerOnload('sql.js', function() { height: 600, width: 900, open: PMA_verifyColumnsProperties, - close: function(event, ui) { + close: function (event, ui) { $(this).remove(); }, buttons : button_options @@ -428,7 +428,7 @@ AJAX.registerOnload('sql.js', function() { /** * Click action for "Go" button in ajax dialog insertForm -> insertRowTable */ - $("#insertForm .insertRowTable.ajax input[type=submit]").live('click', function(event) { + $("#insertForm .insertRowTable.ajax input[type=submit]").live('click', function (event) { event.preventDefault(); /** * @var the_form object referring to the insert form @@ -436,7 +436,7 @@ AJAX.registerOnload('sql.js', function() { var $form = $("#insertForm"); PMA_prepareForAjaxRequest($form); //User wants to submit the form - $.post($form.attr('action'), $form.serialize(), function(data) { + $.post($form.attr('action'), $form.serialize(), function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); if ($("#pageselector").length !== 0) { @@ -469,7 +469,7 @@ AJAX.registerOnload('sql.js', function() { * Click action for #buttonYes button in ajax dialog insertForm */ - $("#buttonYes.ajax").live('click', function(event){ + $("#buttonYes.ajax").live('click', function (event){ event.preventDefault(); /** * @var the_form object referring to the insert form @@ -480,7 +480,7 @@ AJAX.registerOnload('sql.js', function() { $("#result_query").remove(); PMA_prepareForAjaxRequest($form); //User wants to submit the form - $.post($form.attr('action'), $form.serialize() , function(data) { + $.post($form.attr('action'), $form.serialize() , function (data) { if (data.success === true) { PMA_ajaxShowMessage(data.message); if (selected_submit_type == "showinsert") { @@ -543,9 +543,9 @@ function PMA_changeClassForColumn($this_th, newclass, isAddClass) } } -AJAX.registerOnload('sql.js', function() { +AJAX.registerOnload('sql.js', function () { - $('a.browse_foreign').live('click', function(e) { + $('a.browse_foreign').live('click', function (e) { e.preventDefault(); window.open(this.href, 'foreigners', 'width=640,height=240,scrollbars=yes,resizable=yes'); $anchor = $(this); @@ -555,16 +555,16 @@ AJAX.registerOnload('sql.js', function() { /** * vertical column highlighting in horizontal mode when hovering over the column header */ - $('th.column_heading.pointer').live('hover', function(e) { + $('th.column_heading.pointer').live('hover', function (e) { PMA_changeClassForColumn($(this), 'hover', e.type == 'mouseenter'); - }); + }); /** * vertical column marking in horizontal mode when clicking the column header */ - $('th.column_heading.marker').live('click', function() { + $('th.column_heading.marker').live('click', function () { PMA_changeClassForColumn($(this), 'marked'); - }); + }); /** * create resizable table @@ -584,7 +584,7 @@ function makeProfilingChart() } var data = []; - $.each(jQuery.parseJSON($('#profilingChartData').html()),function(key,value) { + $.each(jQuery.parseJSON($('#profilingChartData').html()),function (key,value) { data.push([key,parseFloat(value)]); }); diff --git a/js/tbl_change.js b/js/tbl_change.js index 78cc2cd040..6614de31e1 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -93,9 +93,9 @@ function isDate(val,tmstmp) { val = val.replace(/[.|*|^|+|//|@]/g,'-'); var arrayVal = val.split("-"); - for (var a=0;a