Git
Threads by month
- ----- 2026 -----
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 9 participants
- 39110 discussions
[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_4, updated. RELEASE_3_4_2-22-g396e4e9
by Madhura Jayaratne 15 Jun '11
by Madhura Jayaratne 15 Jun '11
15 Jun '11
The branch, QA_3_4 has been updated
via 396e4e99799c91a8c39f2bbe156e6795cdef6ee5 (commit)
from 8cebaca19b08f8faa5eaebfdb2d87c466f274db8 (commit)
- Log -----------------------------------------------------------------
commit 396e4e99799c91a8c39f2bbe156e6795cdef6ee5
Author: Madhura Jayaratne <madhura.cj(a)gmail.com>
Date: Wed Jun 15 20:06:26 2011 +0530
bug #3315741 [display] Inline query edit broken
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 ++-
js/functions.js | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2d2d054..5e40b2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-phpMyAdmin - ChangeLog
+phpMyAdmin - ChangeLog
======================
3.4.3.0 (not yet released)
@@ -10,6 +10,7 @@
- bug #3313210 [interface] Columns class sometimes changed for nothing
- patch #3313326 [interface] Some tooltips do not disappear
- bug #3315720 [search] Fix search in non unicode tables
+- bug #3315741 [display] Inline query edit broken
3.4.2.0 (2011-06-07)
- bug #3301249 [interface] Iconic table operations does not remove inline edit label
diff --git a/js/functions.js b/js/functions.js
index cfbb25f..35ec292 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1116,7 +1116,7 @@ function changeMIMEType(db, table, reference, mime_type)
* Jquery Coding for inline editing SQL_QUERY
*/
$(document).ready(function(){
- $(".inline_edit_sql").click( function(){
+ $(".inline_edit_sql").live('click', function(){
var db = $(this).prev().find("input[name='db']").val();
var table = $(this).prev().find("input[name='table']").val();
var token = $(this).prev().find("input[name='token']").val();
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3761-gf05a988
by Michal Čihař 15 Jun '11
by Michal Čihař 15 Jun '11
15 Jun '11
The branch, master has been updated
via f05a988b86049fae9eadfa0c1f29cb020d332930 (commit)
via 1baf5c7e4c8e24ad049061b142a1889cc687eaec (commit)
from f79a619326dea60ffd8bab3a3b22791143c65df9 (commit)
- Log -----------------------------------------------------------------
commit f05a988b86049fae9eadfa0c1f29cb020d332930
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 15:50:56 2011 +0200
Whitespace cleanup
commit 1baf5c7e4c8e24ad049061b142a1889cc687eaec
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 15:50:49 2011 +0200
Send correct mime type (the reply is actually HTML)
-----------------------------------------------------------------------
Summary of changes:
server_status.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/server_status.php b/server_status.php
index 7db187b..2f06abd 100644
--- a/server_status.php
+++ b/server_status.php
@@ -27,7 +27,7 @@ if (isset($_REQUEST['ajax_request'])) {
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header_remove('Last-Modified');
// Send correct charset
- header('Content-Type: text/javascript; charset=UTF-8');
+ header('Content-Type: text/html; charset=UTF-8');
if (isset($_REQUEST["query_chart"])) {
exit(createQueryChart());
@@ -52,10 +52,10 @@ if (isset($_REQUEST['ajax_request'])) {
exit(json_encode($ret));
case 'traffic':
$traffic = PMA_DBI_fetch_result('SHOW GLOBAL STATUS WHERE Variable_name="Bytes_received" OR Variable_name="Bytes_sent"', 0, 1);
-
+
$ret = Array('x'=>(microtime(true)*1000),'y_sent'=>$traffic['Bytes_sent'],'y_received'=>$traffic['Bytes_received']);
exit(json_encode($ret));
-
+
}
}
}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3759-gf79a619
by Michal Čihař 15 Jun '11
by Michal Čihař 15 Jun '11
15 Jun '11
The branch, master has been updated
via f79a619326dea60ffd8bab3a3b22791143c65df9 (commit)
via 14cacc70acc6582244a7e08203999adb6497f445 (commit)
via efc9f6ddc40d8b4bc41aae1b66c14aa62040c736 (commit)
from a10e1e070f6aa8300cc98bdda71bcdaa518c44af (commit)
- Log -----------------------------------------------------------------
commit f79a619326dea60ffd8bab3a3b22791143c65df9
Merge: a10e1e070f6aa8300cc98bdda71bcdaa518c44af 14cacc70acc6582244a7e08203999adb6497f445
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 15:46:11 2011 +0200
Merge remote-tracking branch 'tyron/master'
Conflicts:
server_status.php
commit 14cacc70acc6582244a7e08203999adb6497f445
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Wed Jun 15 14:37:08 2011 +0200
Send correct charset header with ajax responses
commit efc9f6ddc40d8b4bc41aae1b66c14aa62040c736
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Wed Jun 15 13:17:19 2011 +0200
Chart export now works with IE8
-----------------------------------------------------------------------
Summary of changes:
js/highcharts/exporting.js | 17 +++++++++++------
server_status.php | 12 +++++++-----
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/js/highcharts/exporting.js b/js/highcharts/exporting.js
index 036c6ae..171ea50 100644
--- a/js/highcharts/exporting.js
+++ b/js/highcharts/exporting.js
@@ -308,12 +308,9 @@ extend(Chart.prototype, {
chart = this,
canvas=createElement('canvas');
- if (typeof FlashCanvas != "undefined") {
- FlashCanvas.initElement(canvas);
- }
-
$('body').append(canvas);
- $(canvas).hide();
+ $(canvas).css('position','absolute');
+ $(canvas).css('left','-10000px');
var submitData = function(chartData) {
// merge the options
@@ -352,11 +349,19 @@ extend(Chart.prototype, {
if(options && options.type=='image/svg+xml') {
submitData(chart.getSVG(chartOptions));
} else {
+ if (typeof FlashCanvas != "undefined") {
+ FlashCanvas.initElement(canvas);
+ }
+
// Generate data uri and submit once done
canvg(canvas, chart.getSVG(chartOptions),{
ignoreAnimation:true,
ignoreMouse:true,
- renderCallback:function() { submitData(canvas.toDataURL()); }
+ renderCallback:function() {
+ // IE8 fix: flashcanvas doesn't update the canvas immediately, thus requiring setTimeout.
+ // See also http://groups.google.com/group/flashcanvas/browse_thread/thread/e36ff7a03e1…
+ setTimeout(function() { submitData(canvas.toDataURL()); }, 100);
+ }
});
}
},
diff --git a/server_status.php b/server_status.php
index c56eb70..7db187b 100644
--- a/server_status.php
+++ b/server_status.php
@@ -21,11 +21,13 @@ require_once './libraries/common.inc.php';
* Ajax request
*/
-// Prevent ajax requests from being cached
if (isset($_REQUEST['ajax_request'])) {
- header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
- header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ // Prevent ajax requests from being cached
+ header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
+ header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header_remove('Last-Modified');
+ // Send correct charset
+ header('Content-Type: text/javascript; charset=UTF-8');
if (isset($_REQUEST["query_chart"])) {
exit(createQueryChart());
@@ -50,10 +52,10 @@ if (isset($_REQUEST['ajax_request'])) {
exit(json_encode($ret));
case 'traffic':
$traffic = PMA_DBI_fetch_result('SHOW GLOBAL STATUS WHERE Variable_name="Bytes_received" OR Variable_name="Bytes_sent"', 0, 1);
-
+
$ret = Array('x'=>(microtime(true)*1000),'y_sent'=>$traffic['Bytes_sent'],'y_received'=>$traffic['Bytes_received']);
exit(json_encode($ret));
-
+
}
}
}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3756-ga10e1e0
by Michal Čihař 15 Jun '11
by Michal Čihař 15 Jun '11
15 Jun '11
The branch, master has been updated
via a10e1e070f6aa8300cc98bdda71bcdaa518c44af (commit)
via 4a50bbcef57598261ee4357bf95fbab04159cc8c (commit)
via 62da72ed8247c2dd82ab511e2e990546164c164e (commit)
via 940e473b01d5c5243edd7bd072fc2ba4e09533f8 (commit)
via 4dd9865a350158f0f2360c08e46e9a3d68bba03d (commit)
via 6094156eb5095870f2729ffae06c27fcdab59c80 (commit)
via 48627196e77a033b6404347fe0c6dae2f23c8f18 (commit)
via 864b846acf2aeb8057c594f62256e462df5ee7bd (commit)
via 63816c774eb982a8ba28e027f2b179345daacf20 (commit)
via d2dcb595d2e2e2cba0a132b7980ccc577f7d3081 (commit)
via 94ff7f9f9255f540f765ef50cc13b711b6732d44 (commit)
via d70cb42d130c9c04f39fc58402cbae4aee1a82c4 (commit)
via 4eeecc9038007e8de221316af4e36f216ae4980c (commit)
via 2a14a1ee04381f1b0dba7d3c1d61c84389853c14 (commit)
via a62f0e4f408f741dcf70f0bd94d5127021b65e3e (commit)
via 23cffdb0de983cbffab884c5789e8dd3ed0f7b67 (commit)
via 1f54a1ac561a1d163876d813c7ac72f8f10aba76 (commit)
via dbe5767e4789bcac683a954359983697b81ba1cb (commit)
via 167defd182e6fea612d8bb6f9929428dee46e6b2 (commit)
via ccfc5f1382ee6b9d3c4c74e1d3b6937ea8ce3b75 (commit)
via 76ce500031db0071ff7b84cd2873fa3bc77799e7 (commit)
via a3e98a2f6f7055f54b7a6afa19eab31c82e9390d (commit)
via 860c45a24e8b1bda6f09ca8ca640f856c3de8856 (commit)
via 3b9df48571afa30378ee96d97ad0ee33fe041979 (commit)
via 8e9a4603fe6e2ffe39d811f9e7221640485897cb (commit)
via 1fda7c8102625a4109396c9c1193e70e82a9868e (commit)
via 1c6f84d6e501554409a78ad228f354e997e64e57 (commit)
via e9f5dc3e9bce501ab505c25b0754884ff41ea02f (commit)
via f57d15ba052581568d670a0821570711e27769d1 (commit)
via e484233d32cec3e406824ce3e83fc0a6b13424d9 (commit)
via 143ebaf7508aff437a89eff7df96f9ac60a0f022 (commit)
via 39ccdb6abbe3792571f285dc4e2a9d12bc861236 (commit)
via 8244771b50a3765fd6ec876a8fc1d3c71fcef9da (commit)
via 3240586b67a3e6488385ef6b85d34e6272ac4196 (commit)
via f36f624adb8a64902744688b79eeb491d76eac3f (commit)
via d758e77c4e9f6baee1cfd1c8745c63317bbeeba1 (commit)
via 66e72289b36e570b790af443d3417413204e7ba7 (commit)
via 0bef847f0812a3b91d1b63a9d6f1a30fb1a08c07 (commit)
via 168e968f2d818cdf9d97377d4275f825472edc3e (commit)
via 2049107eafdbcb2e6cb9965fea5fa9dbeae245d5 (commit)
via b65f1e18041abdf4fe0a3b6ac7c81e307714a331 (commit)
via 857bd9d01c4250bc5b6bcb7057b15e069f1ca8c5 (commit)
via e2f1882570ea7db63047d028687cd345b1832a13 (commit)
via 87a9309216b08277669bf2018cb6ed0f8e6de37c (commit)
via 47c19f0527ba56e8771812c2c655044e1b807d2f (commit)
via 004d4d267524938b34cbbf18bb7575614192cb37 (commit)
via f1821224cd96a5144deba0000d8c2a7e4fa8698b (commit)
via 58a6b6e3d55de1d32e143f75c145799a48f5556f (commit)
via 1a9d991ce3d3986bbfdaaf16be71a6824e02d290 (commit)
via 61acf395baf9fcfa5e4b9658b331afd6affb39a6 (commit)
via 28f12211ba430be9d6006992146f0008d7ef07f8 (commit)
via e7274c125071c96e30ccfb56358d717e6d41ddc9 (commit)
via 91c3db2fcfdc2f39e05b28e162900846aac6a5ed (commit)
via 0f9fdc8a10f0dd458106940c3b5948f84ab372c6 (commit)
via debfc3324882a8b1971d8112af8e028349791290 (commit)
via 0674e697da641f44101422c66bf450632139ad12 (commit)
via 2b64caa9dca24f3ab0f808dd87bbabf5f7273114 (commit)
via bbab90434370a8ff39f0b65e14b00757901cb932 (commit)
via bf9eaff2ca308a9db1ca17a543bc69943d66c0ac (commit)
via 9de722c13ee8b42c283fc3d12ab7732093605579 (commit)
via 997ac0c266b76f5943d533608f6260d2081b9d27 (commit)
via 1266d383dc6e6aee7ac397d387dcf7ac8d60b5e9 (commit)
via 977e66cec75e06f5abcae53ab15fe21b40e1f3e8 (commit)
via 69e2934ca492ca10c6fbfe8411abf4bc17518203 (commit)
via 49531058fc03d5cf68ebdbd9e28d3f7ea791e6c0 (commit)
via cf6dbed6a5c620a10ed544fcee50265a93651560 (commit)
via ea9f4ac7f037ad68db5b0cef263890aacfca9c4e (commit)
via b3e1a0e7411b92a16cf9e0cde5c3124b8373a406 (commit)
via cb8e1980e03e5ece0efffa697ad7bbe926e95eeb (commit)
via 44cac7029451ffd3ea5286b0f20dccd829264a59 (commit)
via fc1ee815ba94f8b048fdc566525c954fd314cd11 (commit)
via 0f1efeea0793b5a4c5ef9a739803ed31ed6ec033 (commit)
via 85ed8e314199da236c97ad4f4604ffe5606c5224 (commit)
via 51f863dc6c4209589b4ec9a991212be0bbea3c28 (commit)
via ec5118df9467e13429f2daaf0a7ebfa1dd10d8be (commit)
via 65a8bacd038b49ef5c9df2cb2da79f5bd06a5694 (commit)
via 0168d4ebd41c784cfe96986f94e19dd45e7e42f0 (commit)
via 1516608ce32dc005b9fcf821a7c13a17c5559795 (commit)
via eea00bf395b76873b187cb70ecd2da570f9c6d83 (commit)
via cc16828cc11b0430834d5ebade5ac9452b9d75cc (commit)
via f2998c6bb2709b0dd44f718f743a3e1e3b823011 (commit)
via 8a210f89d1cd8ddf268a827968f7a5a2e253a627 (commit)
via c80a5d245f48a6435c0ef5dbc7a0ae2427f3bc04 (commit)
via 6089141ee73a498ac4b27e527c370b4fef0a2cc2 (commit)
via b3c53f4bed61d55988802c2a2eef6161ab23bcf8 (commit)
via ea985e424cf3c91710a455791f2f34359b0b73bd (commit)
from f9550ae3e2808ecc8d82b7528b7a9a3ee92249db (commit)
- Log -----------------------------------------------------------------
commit a10e1e070f6aa8300cc98bdda71bcdaa518c44af
Merge: f9550ae3e2808ecc8d82b7528b7a9a3ee92249db 4a50bbcef57598261ee4357bf95fbab04159cc8c
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 15:44:09 2011 +0200
Merge remote-tracking branch 'pootle/master'
Conflicts:
po/fr.po
po/ja.po
po/pt_BR.po
commit 4a50bbcef57598261ee4357bf95fbab04159cc8c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:46:22 2011 +0200
Translation update done using Pootle.
commit 62da72ed8247c2dd82ab511e2e990546164c164e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:46:05 2011 +0200
Translation update done using Pootle.
commit 940e473b01d5c5243edd7bd072fc2ba4e09533f8
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:41:49 2011 +0200
Translation update done using Pootle.
commit 4dd9865a350158f0f2360c08e46e9a3d68bba03d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:41:12 2011 +0200
Translation update done using Pootle.
commit 6094156eb5095870f2729ffae06c27fcdab59c80
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:39:41 2011 +0200
Translation update done using Pootle.
commit 48627196e77a033b6404347fe0c6dae2f23c8f18
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:39:01 2011 +0200
Translation update done using Pootle.
commit 864b846acf2aeb8057c594f62256e462df5ee7bd
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:37:37 2011 +0200
Translation update done using Pootle.
commit 63816c774eb982a8ba28e027f2b179345daacf20
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:36:02 2011 +0200
Translation update done using Pootle.
commit d2dcb595d2e2e2cba0a132b7980ccc577f7d3081
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:35:28 2011 +0200
Translation update done using Pootle.
commit 94ff7f9f9255f540f765ef50cc13b711b6732d44
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:34:22 2011 +0200
Translation update done using Pootle.
commit d70cb42d130c9c04f39fc58402cbae4aee1a82c4
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:33:49 2011 +0200
Translation update done using Pootle.
commit 4eeecc9038007e8de221316af4e36f216ae4980c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:33:42 2011 +0200
Translation update done using Pootle.
commit 2a14a1ee04381f1b0dba7d3c1d61c84389853c14
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:33:31 2011 +0200
Translation update done using Pootle.
commit a62f0e4f408f741dcf70f0bd94d5127021b65e3e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:59 2011 +0200
Translation update done using Pootle.
commit 23cffdb0de983cbffab884c5789e8dd3ed0f7b67
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:32 2011 +0200
Translation update done using Pootle.
commit 1f54a1ac561a1d163876d813c7ac72f8f10aba76
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:21 2011 +0200
Translation update done using Pootle.
commit dbe5767e4789bcac683a954359983697b81ba1cb
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:16 2011 +0200
Translation update done using Pootle.
commit 167defd182e6fea612d8bb6f9929428dee46e6b2
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:10 2011 +0200
Translation update done using Pootle.
commit ccfc5f1382ee6b9d3c4c74e1d3b6937ea8ce3b75
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:32:04 2011 +0200
Translation update done using Pootle.
commit 76ce500031db0071ff7b84cd2873fa3bc77799e7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:31:38 2011 +0200
Translation update done using Pootle.
commit a3e98a2f6f7055f54b7a6afa19eab31c82e9390d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:31:27 2011 +0200
Translation update done using Pootle.
commit 860c45a24e8b1bda6f09ca8ca640f856c3de8856
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:30:46 2011 +0200
Translation update done using Pootle.
commit 3b9df48571afa30378ee96d97ad0ee33fe041979
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:30:13 2011 +0200
Translation update done using Pootle.
commit 8e9a4603fe6e2ffe39d811f9e7221640485897cb
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:29:58 2011 +0200
Translation update done using Pootle.
commit 1fda7c8102625a4109396c9c1193e70e82a9868e
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:29:45 2011 +0200
Translation update done using Pootle.
commit 1c6f84d6e501554409a78ad228f354e997e64e57
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:29:36 2011 +0200
Translation update done using Pootle.
commit e9f5dc3e9bce501ab505c25b0754884ff41ea02f
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:29:25 2011 +0200
Translation update done using Pootle.
commit f57d15ba052581568d670a0821570711e27769d1
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:29:16 2011 +0200
Translation update done using Pootle.
commit e484233d32cec3e406824ce3e83fc0a6b13424d9
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:28:28 2011 +0200
Translation update done using Pootle.
commit 143ebaf7508aff437a89eff7df96f9ac60a0f022
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:26:57 2011 +0200
Translation update done using Pootle.
commit 39ccdb6abbe3792571f285dc4e2a9d12bc861236
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 14:25:59 2011 +0200
Translation update done using Pootle.
commit 8244771b50a3765fd6ec876a8fc1d3c71fcef9da
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:55:59 2011 +0200
Translation update done using Pootle.
commit 3240586b67a3e6488385ef6b85d34e6272ac4196
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:54:51 2011 +0200
Translation update done using Pootle.
commit f36f624adb8a64902744688b79eeb491d76eac3f
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:54:00 2011 +0200
Translation update done using Pootle.
commit d758e77c4e9f6baee1cfd1c8745c63317bbeeba1
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:53:28 2011 +0200
Translation update done using Pootle.
commit 66e72289b36e570b790af443d3417413204e7ba7
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:51:45 2011 +0200
Translation update done using Pootle.
commit 0bef847f0812a3b91d1b63a9d6f1a30fb1a08c07
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:49:57 2011 +0200
Translation update done using Pootle.
commit 168e968f2d818cdf9d97377d4275f825472edc3e
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:49:18 2011 +0200
Translation update done using Pootle.
commit 2049107eafdbcb2e6cb9965fea5fa9dbeae245d5
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:47:52 2011 +0200
Translation update done using Pootle.
commit b65f1e18041abdf4fe0a3b6ac7c81e307714a331
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:46:20 2011 +0200
Translation update done using Pootle.
commit 857bd9d01c4250bc5b6bcb7057b15e069f1ca8c5
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:45:25 2011 +0200
Translation update done using Pootle.
commit e2f1882570ea7db63047d028687cd345b1832a13
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:44:29 2011 +0200
Translation update done using Pootle.
commit 87a9309216b08277669bf2018cb6ed0f8e6de37c
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:43:35 2011 +0200
Translation update done using Pootle.
commit 47c19f0527ba56e8771812c2c655044e1b807d2f
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:41:46 2011 +0200
Translation update done using Pootle.
commit 004d4d267524938b34cbbf18bb7575614192cb37
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:37:44 2011 +0200
Translation update done using Pootle.
commit f1821224cd96a5144deba0000d8c2a7e4fa8698b
Author: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>
Date: Wed Jun 15 13:36:07 2011 +0200
Translation update done using Pootle.
commit 58a6b6e3d55de1d32e143f75c145799a48f5556f
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:47:18 2011 +0200
Translation update done using Pootle.
commit 1a9d991ce3d3986bbfdaaf16be71a6824e02d290
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:44:21 2011 +0200
Translation update done using Pootle.
commit 61acf395baf9fcfa5e4b9658b331afd6affb39a6
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:44:13 2011 +0200
Translation update done using Pootle.
commit 28f12211ba430be9d6006992146f0008d7ef07f8
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:41:09 2011 +0200
Translation update done using Pootle.
commit e7274c125071c96e30ccfb56358d717e6d41ddc9
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:40:59 2011 +0200
Translation update done using Pootle.
commit 91c3db2fcfdc2f39e05b28e162900846aac6a5ed
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:40:42 2011 +0200
Translation update done using Pootle.
commit 0f9fdc8a10f0dd458106940c3b5948f84ab372c6
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:34:57 2011 +0200
Translation update done using Pootle.
commit debfc3324882a8b1971d8112af8e028349791290
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:34:26 2011 +0200
Translation update done using Pootle.
commit 0674e697da641f44101422c66bf450632139ad12
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:33:46 2011 +0200
Translation update done using Pootle.
commit 2b64caa9dca24f3ab0f808dd87bbabf5f7273114
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:27:43 2011 +0200
Translation update done using Pootle.
commit bbab90434370a8ff39f0b65e14b00757901cb932
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:25:41 2011 +0200
Translation update done using Pootle.
commit bf9eaff2ca308a9db1ca17a543bc69943d66c0ac
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:22:41 2011 +0200
Translation update done using Pootle.
commit 9de722c13ee8b42c283fc3d12ab7732093605579
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:20:29 2011 +0200
Translation update done using Pootle.
commit 997ac0c266b76f5943d533608f6260d2081b9d27
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:17:44 2011 +0200
Translation update done using Pootle.
commit 1266d383dc6e6aee7ac397d387dcf7ac8d60b5e9
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:16:15 2011 +0200
Translation update done using Pootle.
commit 977e66cec75e06f5abcae53ab15fe21b40e1f3e8
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:13:40 2011 +0200
Translation update done using Pootle.
commit 69e2934ca492ca10c6fbfe8411abf4bc17518203
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:12:37 2011 +0200
Translation update done using Pootle.
commit 49531058fc03d5cf68ebdbd9e28d3f7ea791e6c0
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:12:30 2011 +0200
Translation update done using Pootle.
commit cf6dbed6a5c620a10ed544fcee50265a93651560
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:12:24 2011 +0200
Translation update done using Pootle.
commit ea9f4ac7f037ad68db5b0cef263890aacfca9c4e
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:11:59 2011 +0200
Translation update done using Pootle.
commit b3e1a0e7411b92a16cf9e0cde5c3124b8373a406
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:11:42 2011 +0200
Translation update done using Pootle.
commit cb8e1980e03e5ece0efffa697ad7bbe926e95eeb
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:09:40 2011 +0200
Translation update done using Pootle.
commit 44cac7029451ffd3ea5286b0f20dccd829264a59
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:03:14 2011 +0200
Translation update done using Pootle.
commit fc1ee815ba94f8b048fdc566525c954fd314cd11
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:03:05 2011 +0200
Translation update done using Pootle.
commit 0f1efeea0793b5a4c5ef9a739803ed31ed6ec033
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:02:54 2011 +0200
Translation update done using Pootle.
commit 85ed8e314199da236c97ad4f4604ffe5606c5224
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:01:58 2011 +0200
Translation update done using Pootle.
commit 51f863dc6c4209589b4ec9a991212be0bbea3c28
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:01:25 2011 +0200
Translation update done using Pootle.
commit ec5118df9467e13429f2daaf0a7ebfa1dd10d8be
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:01:04 2011 +0200
Translation update done using Pootle.
commit 65a8bacd038b49ef5c9df2cb2da79f5bd06a5694
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:00:48 2011 +0200
Translation update done using Pootle.
commit 0168d4ebd41c784cfe96986f94e19dd45e7e42f0
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:00:33 2011 +0200
Translation update done using Pootle.
commit 1516608ce32dc005b9fcf821a7c13a17c5559795
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 12:00:20 2011 +0200
Translation update done using Pootle.
commit eea00bf395b76873b187cb70ecd2da570f9c6d83
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:59:57 2011 +0200
Translation update done using Pootle.
commit cc16828cc11b0430834d5ebade5ac9452b9d75cc
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:59:40 2011 +0200
Translation update done using Pootle.
commit f2998c6bb2709b0dd44f718f743a3e1e3b823011
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:59:14 2011 +0200
Translation update done using Pootle.
commit 8a210f89d1cd8ddf268a827968f7a5a2e253a627
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:58:49 2011 +0200
Translation update done using Pootle.
commit c80a5d245f48a6435c0ef5dbc7a0ae2427f3bc04
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:58:00 2011 +0200
Translation update done using Pootle.
commit 6089141ee73a498ac4b27e527c370b4fef0a2cc2
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:57:11 2011 +0200
Translation update done using Pootle.
commit b3c53f4bed61d55988802c2a2eef6161ab23bcf8
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:56:36 2011 +0200
Translation update done using Pootle.
commit ea985e424cf3c91710a455791f2f34359b0b73bd
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Wed Jun 15 11:56:13 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/fr.po | 74 +++++++++++++++++-----------------------
po/ja.po | 107 ++++++++++++++++++++++------------------------------------
po/pt_BR.po | 33 ++++++++----------
3 files changed, 87 insertions(+), 127 deletions(-)
diff --git a/po/fr.po b/po/fr.po
index 96b6d0a..38c6b0e 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-15 08:36-0400\n"
-"PO-Revision-Date: 2011-06-09 22:13+0200\n"
+"PO-Revision-Date: 2011-06-15 14:46+0200\n"
"Last-Translator: Marc Delisle <marc(a)infomarc.info>\n"
"Language-Team: french <fr(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -26,7 +26,7 @@ msgstr "Tout afficher"
#: libraries/schema/Pdf_Relation_Schema.class.php:1114
#: libraries/schema/User_Schema.class.php:360
msgid "Page number:"
-msgstr "Page n°: "
+msgstr "Page n° : "
#: browse_foreigners.php:133
msgid ""
@@ -36,7 +36,7 @@ msgid ""
msgstr ""
"La fenêtre demandée depuis votre navigateur ne peut être rafraîchie. Il est "
"possible que vous ayez fermé la fenêtre source , ou encore que votre "
-"navigateur bloque les mises à jour inter-fenêtres pour des raisons de "
+"navigateur bloque les mises à jour entre fenêtres pour des raisons de "
"sécurité."
#: browse_foreigners.php:151 libraries/common.lib.php:2763
@@ -1018,10 +1018,9 @@ msgstr "Ce n'est pas un nombre !"
#. l10n: Default description for the y-Axis of Charts
#: js/messages.php:51
-#, fuzzy
#| msgid "Log file count"
msgid "Total count"
-msgstr "Nombre de fichiers journal"
+msgstr "Nombre total"
#: js/messages.php:54
msgid "The host name is empty!"
@@ -1058,24 +1057,22 @@ msgid "Close"
msgstr "Fermer"
#: js/messages.php:64 server_status.php:397
-#, fuzzy
#| msgid "Server Choice"
msgid "Live traffic chart"
-msgstr "Choix du serveur"
+msgstr "Graphique du trafic en temps réel"
#: js/messages.php:65 server_status.php:400
msgid "Live conn./process chart"
-msgstr ""
+msgstr "Graphique des connexions et processus en temps réel"
#: js/messages.php:66 server_status.php:429
-#, fuzzy
#| msgid "Show query chart"
msgid "Live query chart"
-msgstr "Afficher le graphique des requêtes"
+msgstr "Graphique des requêtes en temps réel"
#: js/messages.php:68
msgid "Static data"
-msgstr ""
+msgstr "Données statiques"
#. l10n: Total number of queries
#: js/messages.php:70 libraries/build_html_for_db.lib.php:45
@@ -1088,12 +1085,12 @@ msgstr "Total"
#. l10n: Other, small valued, queries
#: js/messages.php:72 server_status.php:592
msgid "Other"
-msgstr ""
+msgstr "Autres"
#. l10n: Thousands separator
#: js/messages.php:74 libraries/common.lib.php:1375
msgid ","
-msgstr " "
+msgstr " "
#. l10n: Decimal separator
#: js/messages.php:76 libraries/common.lib.php:1377
@@ -1108,7 +1105,7 @@ msgstr "Annuler"
#: js/messages.php:83
msgid "Loading"
-msgstr "Chargement"
+msgstr "Chargement en cours"
#: js/messages.php:84
msgid "Processing Request"
@@ -8349,71 +8346,62 @@ msgid "Runtime Information"
msgstr "Informations sur le serveur"
#: server_status.php:371
-#, fuzzy
#| msgid "Server Choice"
msgid "Server traffic"
-msgstr "Choix du serveur"
+msgstr "Trafic du serveur"
#: server_status.php:372
msgid "Query statistics"
msgstr "Statistiques sur les requêtes"
#: server_status.php:373
-#, fuzzy
#| msgid "See slave status table"
msgid "All status variables"
-msgstr "Montrer l'état de l'esclave"
+msgstr "Toutes les variables d'état"
#: server_status.php:383 server_status.php:416
-#, fuzzy
#| msgid "Refresh"
msgid "Refresh rate"
-msgstr "Actualiser"
+msgstr "Taux de rafraîchissement"
#: server_status.php:384 server_status.php:417
-#, fuzzy
#| msgid "Second"
msgid "second"
-msgstr "Seconde"
+msgstr "seconde"
#: server_status.php:385 server_status.php:386 server_status.php:387
#: server_status.php:388 server_status.php:389 server_status.php:418
#: server_status.php:419 server_status.php:420 server_status.php:421
#: server_status.php:422
-#, fuzzy
#| msgid "Second"
msgid "seconds"
-msgstr "Seconde"
+msgstr "secondes"
#: server_status.php:390 server_status.php:391 server_status.php:392
#: server_status.php:393 server_status.php:423 server_status.php:424
#: server_status.php:425 server_status.php:426
-#, fuzzy
#| msgid "Minute"
msgid "minutes"
-msgstr "Minute"
+msgstr "minutes"
#: server_status.php:446
-#, fuzzy
#| msgid "Do not change the password"
msgid "Containing the word:"
-msgstr "Conserver le mot de passe"
+msgstr "Contenant le mot :"
#: server_status.php:451
-#, fuzzy
#| msgid "Show open tables"
msgid "Show only alert values"
-msgstr "Montrer les tables ouvertes"
+msgstr "Afficher uniquement les valeurs d'alerte"
#: server_status.php:455
msgid "Filter by category..."
-msgstr ""
+msgstr "Filtrer par catégorie..."
#: server_status.php:468
-#, fuzzy
#| msgid "Related Links"
msgid "Related links:"
-msgstr "Liens connexes"
+msgstr "Liens connexes:"
#: server_status.php:513 server_status.php:545 server_status.php:666
#: server_status.php:711
@@ -8435,12 +8423,12 @@ msgstr "Type de requête"
#. l10n: # = Amount of queries
#: server_status.php:543
msgid "#"
-msgstr ""
+msgstr "#"
#: server_status.php:615
#, php-format
msgid "Network traffic since startup: %s"
-msgstr ""
+msgstr "Trafic réseau depuis le démarrage : %s"
#: server_status.php:623
#, php-format
@@ -8525,10 +8513,9 @@ msgid "ID"
msgstr "ID"
#: server_status.php:846
-#, fuzzy
#| msgid "Whether to enable SSL for connection to MySQL server."
msgid "The number of failed attempts to connect to the MySQL server."
-msgstr "Pour activer ou pas une connexion SSL vers le serveur MySQL."
+msgstr "Le nombre de tentatives de connexion au serveur MySQL infructueuses."
#: server_status.php:847
msgid ""
@@ -8549,6 +8536,7 @@ msgstr ""
msgid ""
"The number of connection attempts (successful or not) to the MySQL server."
msgstr ""
+"Le nombre de tentatives de connexion (réussies ou non) au serveur MySQL."
#: server_status.php:850
msgid ""
@@ -8976,6 +8964,7 @@ msgid ""
"The maximum number of connections that have been in use simultaneously since "
"the server started."
msgstr ""
+"Le nombre maximum de connexions simultanées depuis le démarrage du serveur."
#: server_status.php:921
msgid "The number of rows waiting to be written in INSERT DELAYED queues."
@@ -9007,6 +8996,9 @@ msgid ""
"fragmentation issues, which may be solved by issuing a FLUSH QUERY CACHE "
"statement."
msgstr ""
+"Le nombre de blocs mémoire libres dans la cache de requêtes. Un nombre élevé "
+"peut indiquer des problèmes de fragmentation, qui peuvent être réglés par "
+"la commande FLUSH QUERY CACHE."
#: server_status.php:927
msgid "The amount of free memory for query cache."
@@ -9750,10 +9742,9 @@ msgid "Line"
msgstr "Ligne"
#: tbl_chart.php:88
-#, fuzzy
#| msgid "Inline"
msgid "Spline"
-msgstr "En ligne"
+msgstr "Spline"
#: tbl_chart.php:89
msgid "Pie"
@@ -9764,14 +9755,13 @@ msgid "Stacked"
msgstr "En piles"
#: tbl_chart.php:94
-#, fuzzy
#| msgid "Report title:"
msgid "Chart title"
-msgstr "Titre du rapport :"
+msgstr "Titre du graphique"
#: tbl_chart.php:99
msgid "X-Axis:"
-msgstr ""
+msgstr "Axe des X"
#: tbl_chart.php:113
#, fuzzy
diff --git a/po/ja.po b/po/ja.po
index 16b009b..f90d0f4 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-15 08:36-0400\n"
-"PO-Revision-Date: 2011-06-08 12:19+0200\n"
+"PO-Revision-Date: 2011-06-15 12:47+0200\n"
"Last-Translator: Yuichiro <yuichiro(a)pop07.odn.ne.jp>\n"
"Language-Team: japanese <jp(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -1047,10 +1047,9 @@ msgid "Close"
msgstr "閉じる"
#: js/messages.php:64 server_status.php:397
-#, fuzzy
#| msgid "Server Choice"
msgid "Live traffic chart"
-msgstr "サーバの選択"
+msgstr "リアルタイムでのトラフィックグラフ"
#: js/messages.php:65 server_status.php:400
msgid "Live conn./process chart"
@@ -3053,9 +3052,7 @@ msgstr "変更追跡機能"
msgid ""
"Tracking of changes made in database. Requires the phpMyAdmin configuration "
"storage."
-msgstr ""
-"データベースで行われた変更の追跡機能です。これには、 phpMyAdmin の設定保存場"
-"所が必要です。"
+msgstr "データベースで行われた変更の追跡機能です。これには、phpMyAdmin の設定保存場所が必要です。"
#: libraries/config/messages.inc.php:208
msgid "Customize export options"
@@ -3336,7 +3333,7 @@ msgstr "ロゴリンクのターゲット"
#: libraries/config/messages.inc.php:286
msgid "Highlight server under the mouse cursor"
-msgstr "マウスカーソルの下のサーバー名を強調表示します。"
+msgstr "マウスカーソルの下のサーバ名を強調表示します。"
#: libraries/config/messages.inc.php:287
msgid "Enable highlighting"
@@ -3526,7 +3523,7 @@ msgstr "HTTP 転送の高速化のために GZip の出力バッファリング
#: libraries/config/messages.inc.php:326
msgid "GZip output buffering"
-msgstr "GZipの出力バッファリング"
+msgstr "GZip の出力バッファリング"
#: libraries/config/messages.inc.php:327
msgid ""
@@ -4086,13 +4083,11 @@ msgstr "バージョンの自動作成"
msgid ""
"Leave blank for no user preferences storage in database, suggested: [kbd]"
"pma_config[/kbd]"
-msgstr ""
-"データベースにユーザ設定の保存しない場合は空欄にします。[kbd]pma_config[/"
-"kbd] としておくのがいいでしょう。"
+msgstr "データベースにユーザ環境設定を保存しない場合は空欄にします。[kbd]pma_config[/kbd] としておくのがいいでしょう。"
#: libraries/config/messages.inc.php:441
msgid "User preferences storage table"
-msgstr "ユーザ設定保存テーブル"
+msgstr "ユーザ環境設定保存テーブル"
#: libraries/config/messages.inc.php:443
msgid "User for config auth"
@@ -4945,7 +4940,7 @@ msgstr "水平"
#: libraries/display_tbl.lib.php:437
msgid "horizontal (rotated headers)"
-msgstr "水平 (ヘッダも回転)"
+msgstr "水平 (縦ヘッダ)"
#: libraries/display_tbl.lib.php:438
msgid "vertical"
@@ -5056,7 +5051,7 @@ msgstr "グラフで表示する"
#: libraries/display_tbl.lib.php:2473
msgid "Create view"
-msgstr "ビューを作成"
+msgstr "ビューを作成する"
#: libraries/display_tbl.lib.php:2588
msgid "Link not found"
@@ -6218,7 +6213,7 @@ msgstr "PDF の作成"
#: libraries/relation.lib.php:121
msgid "Displaying Column Comments"
-msgstr "列コメント表示機能"
+msgstr "カラムコメント表示機能"
#: libraries/relation.lib.php:126
msgid ""
@@ -6243,7 +6238,7 @@ msgstr "永続的な『テーブルのユーザ設定』"
#: libraries/relation.lib.php:155
msgid "User preferences"
-msgstr "ユーザ設定"
+msgstr "ユーザ環境設定"
#: libraries/relation.lib.php:159
msgid "Quick steps to setup advanced features:"
@@ -6287,8 +6282,8 @@ msgid ""
"Make sure, you have unique server-id in your configuration file (my.cnf). If "
"not, please add the following line into [mysqld] section:"
msgstr ""
-"念のため、設定ファイル (my.cnf) 内でサーバーIDがユニークであるか確認してくだ"
-"さい。もしそうでないならば、[mysqld] セクションに以下の行を追加してください。"
+"念のため、設定ファイル (my.cnf) 内でサーバ ID がユニークであるか確認してください。もしそうでないならば、[mysqld] "
+"セクションに以下の行を追加してください。"
#: libraries/replication_gui.lib.php:57 libraries/replication_gui.lib.php:58
#: libraries/replication_gui.lib.php:251 libraries/replication_gui.lib.php:254
@@ -8029,12 +8024,9 @@ msgid ""
"ignore all databases by default and allow only certain databases to be "
"replicated. Please select the mode:"
msgstr ""
-"このサーバは、レプリケーションプロセスのマスタサーバーとして構成されていませ"
-"ん。以下のいずれかを選択できます。1つは、特定のデータベースを無視して残り全"
-"てのデータベースをレプリケーションするモード(データベースの大部分をレプリ"
-"ケーションする場合に便利です。)。もう1つは、デフォルトで全てのデータベース"
-"を無視して、特定のデータベースだけのレプリケーションを許可するモード。以下よ"
-"りいずれかのモードを選択してください。"
+"このサーバは、レプリケーションプロセスのマスタサーバとして構成されていません。以下のいずれかを選択できます。1つは、特定のデータベースを無視して残り全て"
+"のデータベースをレプリケーションするモード(データベースの大部分をレプリケーションする場合に便利です。)。もう1つは、デフォルトで全てのデータベースを無"
+"視して、特定のデータベースだけのレプリケーションを許可するモード。以下よりいずれかのモードを選択してください。"
#: server_replication.php:219
msgid "Replicate all databases; Ignore:"
@@ -8062,9 +8054,8 @@ msgid ""
"should see a message informing you, that this server <b>is</b> configured as "
"master"
msgstr ""
-"MySQL サーバが再起動したら、「実行する」ボタンをクリックしてください。その"
-"後、このサーバー<b>が</b>マスタとして設定されていることを知らせるメッセージが"
-"表示されます。"
+"MySQL サーバが再起動したら、「実行する」ボタンをクリックしてください。その後、このサーバ<b>が</b>マスタとして設定されていることを知らせるメ"
+"ッセージが表示されます。"
#: server_replication.php:291
msgid "Slave SQL Thread not running!"
@@ -8224,29 +8215,25 @@ msgid "Runtime Information"
msgstr "ランタイム情報"
#: server_status.php:371
-#, fuzzy
#| msgid "Server Choice"
msgid "Server traffic"
-msgstr "サーバの選択"
+msgstr "サーバのトラフィック"
#: server_status.php:372
msgid "Query statistics"
msgstr "クエリの統計"
#: server_status.php:373
-#, fuzzy
#| msgid "See slave status table"
msgid "All status variables"
-msgstr "スレーブのステータステーブルを閲覧する"
+msgstr "全ての状態変数"
#: server_status.php:383 server_status.php:416
-#, fuzzy
#| msgid "Refresh"
msgid "Refresh rate"
-msgstr "再描画"
+msgstr "再描画間隔"
#: server_status.php:384 server_status.php:417
-#, fuzzy
#| msgid "Second"
msgid "second"
msgstr "秒"
@@ -8255,7 +8242,6 @@ msgstr "秒"
#: server_status.php:388 server_status.php:389 server_status.php:418
#: server_status.php:419 server_status.php:420 server_status.php:421
#: server_status.php:422
-#, fuzzy
#| msgid "Second"
msgid "seconds"
msgstr "秒"
@@ -8263,26 +8249,23 @@ msgstr "秒"
#: server_status.php:390 server_status.php:391 server_status.php:392
#: server_status.php:393 server_status.php:423 server_status.php:424
#: server_status.php:425 server_status.php:426
-#, fuzzy
#| msgid "Minute"
msgid "minutes"
msgstr "分"
#: server_status.php:446
-#, fuzzy
#| msgid "Do not change the password"
msgid "Containing the word:"
-msgstr "パスワードは変更しない"
+msgstr "含まれている文字:"
#: server_status.php:451
-#, fuzzy
#| msgid "Show open tables"
msgid "Show only alert values"
-msgstr "開いているテーブルを表示する"
+msgstr "警告値のみ表示する"
#: server_status.php:455
msgid "Filter by category..."
-msgstr ""
+msgstr "種別によるフィルタ..."
#: server_status.php:468
#, fuzzy
@@ -8315,7 +8298,7 @@ msgstr ""
#: server_status.php:615
#, php-format
msgid "Network traffic since startup: %s"
-msgstr ""
+msgstr "起動してからのネットワークトラフィック:%s"
#: server_status.php:623
#, php-format
@@ -8347,8 +8330,7 @@ msgid ""
"For further information about replication status on the server, please visit "
"the <a href=#replication>replication section</a>."
msgstr ""
-"サーバー上のレプリケーションステータスの詳細については、<a href="
-"\"#replication\">レプリケーションの節</a>を参照してください。"
+"サーバ上のレプリケーションステータスの詳細については、<a href=\"#replication\">レプリケーションの節</a>を参照してください。"
#: server_status.php:649
msgid "Replication status"
@@ -8399,10 +8381,9 @@ msgid "ID"
msgstr "ID"
#: server_status.php:846
-#, fuzzy
#| msgid "Whether to enable SSL for connection to MySQL server."
msgid "The number of failed attempts to connect to the MySQL server."
-msgstr "MySQL サーバに接続するのに SSL を有効にするかどうか。"
+msgstr "MySQL サーバへの接続を試みて失敗した回数。"
#: server_status.php:847
msgid ""
@@ -8420,7 +8401,7 @@ msgstr "一時バイナリログキャッシュを使用したトランザクシ
#: server_status.php:849
msgid ""
"The number of connection attempts (successful or not) to the MySQL server."
-msgstr ""
+msgstr "MySQL サーバへの接続試行回数(成否に関わらず)。"
#: server_status.php:850
msgid ""
@@ -8832,7 +8813,7 @@ msgstr ""
msgid ""
"The maximum number of connections that have been in use simultaneously since "
"the server started."
-msgstr ""
+msgstr "サーバが起動してからの同時接続の最大数。"
#: server_status.php:921
msgid "The number of rows waiting to be written in INSERT DELAYED queues."
@@ -8864,6 +8845,8 @@ msgid ""
"fragmentation issues, which may be solved by issuing a FLUSH QUERY CACHE "
"statement."
msgstr ""
+"クエリキャッシュ内の空きメモリのブロック数。この値が高い場合は 断片化が起こっていることを示しています。FLUSH QUERY CACHE "
+"文を発行することによって解決できるかもしれません。"
#: server_status.php:927
msgid "The amount of free memory for query cache."
@@ -9188,9 +9171,7 @@ msgstr ""
msgid ""
"If your server is also configured to accept HTTPS requests follow [a@%s]this "
"link[/a] to use a secure connection."
-msgstr ""
-"サーバーがHTTPS要求を受け入れるように構成されている場合、[a@%s]このリンク[/a]"
-"をたどり安全な接続を使用するようにしてください。"
+msgstr "サーバが HTTPS 要求を受け入れるように構成されている場合、[a@%s]このリンク[/a]をたどり安全な接続を使用するようにしてください。"
#: setup/frames/index.inc.php:64
msgid "Insecure connection"
@@ -9368,8 +9349,7 @@ msgstr ""
#: setup/lib/index.lib.php:256
#, php-format
msgid "This %soption%s should be enabled if your web server supports it."
-msgstr ""
-"Webサーバでサポートしている場合、この%sオプション%sを有効にするべきです。"
+msgstr "ウェブサーバでサポートしている場合、この%sオプション%sを有効にするべきです。"
#: setup/lib/index.lib.php:258
#, php-format
@@ -9601,14 +9581,13 @@ msgid "Stacked"
msgstr "積み上げ形式"
#: tbl_chart.php:94
-#, fuzzy
#| msgid "Report title:"
msgid "Chart title"
-msgstr "レポートのタイトル:"
+msgstr "グラフの題名"
#: tbl_chart.php:99
msgid "X-Axis:"
-msgstr ""
+msgstr "横軸:"
#: tbl_chart.php:113
#, fuzzy
@@ -9623,28 +9602,24 @@ msgid "The remaining columns"
msgstr "textarea の 1 行の文字数"
#: tbl_chart.php:128
-#, fuzzy
#| msgid "X Axis label"
msgid "X-Axis label:"
-msgstr "横軸のラベル"
+msgstr "横軸のラベル:"
#: tbl_chart.php:128
-#, fuzzy
#| msgid "Value"
msgid "X Values"
-msgstr "値"
+msgstr "横軸の値"
#: tbl_chart.php:129
-#, fuzzy
#| msgid "Y Axis label"
msgid "Y-Axis label:"
-msgstr "縦軸のラベル"
+msgstr "縦軸のラベル:"
#: tbl_chart.php:129
-#, fuzzy
#| msgid "Value"
msgid "Y Values"
-msgstr "値"
+msgstr "縦軸の値"
#: tbl_create.php:56
#, php-format
@@ -9698,7 +9673,7 @@ msgstr ""
#: tbl_indexes.php:249
#, php-format
msgid "Add to index %s column(s)"
-msgstr "インデックスに %s の列を追加しました"
+msgstr "インデックスに %s 個のカラムを追加する"
#: tbl_indexes.php:254 tbl_structure.php:684 tbl_structure.php:695
msgid "Column count has to be larger than zero."
@@ -9736,7 +9711,7 @@ msgstr "(1 回)"
#: tbl_operations.php:293
msgid "Move table to (database<b>.</b>table):"
-msgstr "テーブルの移動先(database<b>.</b>table):"
+msgstr "テーブルを (データベース)<b>.</b>(テーブル) へ移動する:"
#: tbl_operations.php:351
msgid "Table options"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index b5916dd..72eb80d 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -4,8 +4,8 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-15 08:36-0400\n"
-"PO-Revision-Date: 2011-04-14 17:44+0200\n"
-"Last-Translator: <vitorpc.18(a)gmail.com>\n"
+"PO-Revision-Date: 2011-06-15 13:55+0200\n"
+"Last-Translator: Jose Ivan Bezerra Vilarouca Filho <joseivan(a)lavid.ufpb.br>\n"
"Language-Team: brazilian_portuguese <pt_BR(a)li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -489,7 +489,7 @@ msgstr "Usar tabelas"
#: db_qbe.php:662
#, php-format
msgid "SQL query on database <b>%s</b>:"
-msgstr "Consulta no Banco de Dados <b>%s</b>:"
+msgstr "Consulta SQL ao Banco de Dados <b>%s</b>:"
#: db_qbe.php:955 libraries/common.lib.php:1169
msgid "Submit Query"
@@ -638,7 +638,7 @@ msgstr "Soma"
#: db_structure.php:455 libraries/StorageEngine.class.php:351
#, php-format
msgid "%s is the default storage engine on this MySQL server."
-msgstr "%s é o stored engine padrão neste servidor MySQL."
+msgstr "%s é o mecanismo de armazenamento padrão neste servidor MySQL."
#: db_structure.php:483 db_structure.php:500 db_structure.php:501
#: libraries/display_tbl.lib.php:2297 libraries/display_tbl.lib.php:2302
@@ -708,21 +708,18 @@ msgid "Analyze table"
msgstr "Analizar tabela"
#: db_structure.php:521
-#, fuzzy
msgid "Add prefix to table"
-msgstr "Sem bases"
+msgstr "Adicionar prefixo à tabela"
#: db_structure.php:523 libraries/mult_submits.inc.php:246
-#, fuzzy
#| msgid "Replace table data with file"
msgid "Replace table prefix"
-msgstr "Substituir os dados da tabela pelos do arquivo"
+msgstr "Substituir prefixo da tabela"
#: db_structure.php:525 libraries/mult_submits.inc.php:246
-#, fuzzy
#| msgid "Replace table data with file"
msgid "Copy table with prefix"
-msgstr "Substituir os dados da tabela pelos do arquivo"
+msgstr "Copiar tabela com o prefixo"
#: db_structure.php:574 libraries/schema/User_Schema.class.php:387
msgid "Data Dictionary"
@@ -787,7 +784,7 @@ msgstr "Versões"
#: db_tracking.php:135 tbl_tracking.php:409 tbl_tracking.php:676
msgid "Tracking report"
-msgstr "Relatório de rastreamento"
+msgstr "Relatório de monitoramento"
#: db_tracking.php:136 tbl_tracking.php:244 tbl_tracking.php:676
msgid "Structure snapshot"
@@ -800,7 +797,7 @@ msgstr "Tabelas não monitoradas"
#: db_tracking.php:201 db_tracking.php:203 tbl_structure.php:622
#: tbl_structure.php:624
msgid "Track table"
-msgstr "Rastrear tabela"
+msgstr "Monitorar tabela"
#: db_tracking.php:229
msgid "Database Log"
@@ -971,16 +968,14 @@ msgid "You are about to DESTROY a complete database!"
msgstr "Você está prestes à DESTRUIR completamente o Banco de Dados!"
#: js/messages.php:32
-#, fuzzy
#| msgid "You are about to DESTROY a complete database!"
msgid "You are about to DESTROY a complete table!"
-msgstr "Você está prestes à DESTRUIR completamente o Banco de Dados!"
+msgstr "Você está prestes à DESTRUIR completamente a tabela"
#: js/messages.php:33
-#, fuzzy
#| msgid "You are about to DESTROY a complete database!"
msgid "You are about to TRUNCATE a complete table!"
-msgstr "Você está prestes à DESTRUIR completamente o Banco de Dados!"
+msgstr "Você está prestes à TRUNCAR completamente uma tabela!"
#: js/messages.php:34
msgid "Dropping Event"
@@ -988,7 +983,7 @@ msgstr "Remoção de eventos"
#: js/messages.php:35
msgid "Dropping Procedure"
-msgstr "Remoção de Procedures"
+msgstr "Remoção de procedimentos"
#: js/messages.php:37
msgid "Deleting tracking data"
@@ -1004,7 +999,7 @@ msgstr "Esta operação pode ser demorada. Deseja prosseguir?"
#: js/messages.php:42
msgid "You are about to DISABLE a BLOB Repository!"
-msgstr "Você está prestes a desativar um repositório BLOB."
+msgstr "Você está prestes a DESATIVAR um repositório BLOB."
#: js/messages.php:43
#, php-format
@@ -10361,7 +10356,7 @@ msgstr "Você não tem direitos suficientes para estar aqui agora!"
#: user_password.php:110
msgid "The profile has been updated."
-msgstr "A configuração foi atualizada."
+msgstr "O perfíl foi atualizado."
#: view_create.php:141
msgid "VIEW name"
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3670-gf9550ae
by Marc Delisle 15 Jun '11
by Marc Delisle 15 Jun '11
15 Jun '11
The branch, master has been updated
via f9550ae3e2808ecc8d82b7528b7a9a3ee92249db (commit)
via 131e9caa5f8682ba36808279dbea81417e554d54 (commit)
via 81ebc00206d6aee95900b1c28b0212ee79d3bb25 (commit)
via 161f8977fa8c053af5585dc79cacb8a0c8a6e60a (commit)
via b18be4eaec8321c40659ec5683f49698551d8d76 (commit)
via 09fad13dcb1bbeb269d7dad6e5cf1a8e82aa754d (commit)
via 8bb5946a907ea85e51e31bd07a791b689b9be2e0 (commit)
via 2be90c39071327412677d74c67b1b8b0e662266c (commit)
via 8b2439f4a71507c9c43ca58f844ce8e14c2e1d7b (commit)
via af73dd335d86302e0be30e95ed39262a4e3b5caa (commit)
via f2588c536df0510f1de28e7a033da2199aa7ebfa (commit)
via b53ac0870cd2845dfb4b214ca1fe6583c636c444 (commit)
from 84a92c03f4f82bbce4313bd2bcbce3ed87754f07 (commit)
- Log -----------------------------------------------------------------
commit f9550ae3e2808ecc8d82b7528b7a9a3ee92249db
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 09:13:00 2011 -0400
ChangeLog entry for Thilanka Kaushalya's latest new feature
commit 131e9caa5f8682ba36808279dbea81417e554d54
Merge: 84a92c03f4f82bbce4313bd2bcbce3ed87754f07 81ebc00206d6aee95900b1c28b0212ee79d3bb25
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 09:09:23 2011 -0400
Merge commit '81ebc00206d6aee95900b1c28b0212ee79d3bb25'
commit 81ebc00206d6aee95900b1c28b0212ee79d3bb25
Merge: 161f8977fa8c053af5585dc79cacb8a0c8a6e60a 551cc9a465269ab1208438d81fc0d492ce797366
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Wed Jun 15 11:36:40 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 161f8977fa8c053af5585dc79cacb8a0c8a6e60a
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Wed Jun 15 11:35:59 2011 +0530
Fixed the delay at dialog load in table insert
commit b18be4eaec8321c40659ec5683f49698551d8d76
Merge: 09fad13dcb1bbeb269d7dad6e5cf1a8e82aa754d 25dc50a5dd8a69f435272d37f7febafffc1d0ff0
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Tue Jun 14 21:53:12 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 09fad13dcb1bbeb269d7dad6e5cf1a8e82aa754d
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Tue Jun 14 21:51:21 2011 +0530
Added the update row count in db structure
commit 8bb5946a907ea85e51e31bd07a791b689b9be2e0
Merge: 2be90c39071327412677d74c67b1b8b0e662266c d0974bd61f2b228338e5a2af7f5967bcc7037d08
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Mon Jun 13 18:12:17 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 2be90c39071327412677d74c67b1b8b0e662266c
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Mon Jun 13 18:11:00 2011 +0530
Added update the tablesForm in db insert
commit 8b2439f4a71507c9c43ca58f844ce8e14c2e1d7b
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Sun Jun 12 23:02:32 2011 +0530
added the buttonYes click actions
commit af73dd335d86302e0be30e95ed39262a4e3b5caa
Merge: f2588c536df0510f1de28e7a033da2199aa7ebfa 54c062c0ad19db67250fde19eff7f44f31429e74
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Fri Jun 10 22:55:31 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit f2588c536df0510f1de28e7a033da2199aa7ebfa
Merge: b53ac0870cd2845dfb4b214ca1fe6583c636c444 cd5cddb2e4324094eae365e01422e8d165d372e8
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Fri Jun 10 22:15:57 2011 +0530
Merge branch 'master' of git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit b53ac0870cd2845dfb4b214ca1fe6583c636c444
Author: Thilanka Kaushalya <lgtkaushalya(a)gmail.com>
Date: Fri Jun 10 11:06:36 2011 +0530
Apply ajax behavior to the insert to table option in db structure
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
db_structure.php | 5 +-
js/db_structure.js | 136 +++++++++++++++++++++++++++++++++++++++++++++++++---
tbl_replace.php | 3 +-
4 files changed, 135 insertions(+), 10 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index daa1a62..e648e2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
+ [interface] Changed way of generating charts.
+ rfe #939233 [interface] Flexible column width
+ [interface] Mouse-based column reordering in query results
++ AJAX for Insert to a table from database Structure page
3.4.3.0 (not yet released)
- bug #3311170 [sync] Missing helper icons in Synchronize
diff --git a/db_structure.php b/db_structure.php
index 864a668..b49b417 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -12,6 +12,7 @@ require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
$GLOBALS['js_include'][] = 'db_structure.js';
+$GLOBALS['js_include'][] = 'tbl_change.js';
/**
* Prepares the tables list if the user where not redirected to this script
@@ -354,8 +355,8 @@ foreach ($tables as $keyname => $each_table) {
<?php echo $titles['Structure']; ?></a></td>
<td align="center"><?php echo $search_table; ?></td>
<?php if (! $db_is_information_schema) { ?>
- <td align="center">
- <a href="tbl_change.php?<?php echo $tbl_url_query; ?>">
+ <td align="center" class="insert_table">
+ <a <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'class="ajax"' : ''); ?> href="tbl_change.php?<?php echo $tbl_url_query; ?>">
<?php echo $titles['Insert']; ?></a></td>
<td align="center"><?php echo $empty_table; ?></td>
<td align="center">
diff --git a/js/db_structure.js b/js/db_structure.js
index 4affd75..92dae86 100644
--- a/js/db_structure.js
+++ b/js/db_structure.js
@@ -10,7 +10,7 @@
/**
* AJAX scripts for db_structure.php
- *
+ *
* Actions ajaxified here:
* Drop Database
* Truncate Table
@@ -33,7 +33,7 @@ function PMA_adjustTotals($this_anchor) {
// (not really needed in case we are dropping the table)
$rows_td.text('0');
// set size to unknown (not sure how to get the exact
- // value here, as an empty InnoDB table would have a size)
+ // value here, as an empty InnoDB table would have a size)
$size_td.text('-');
// try to compute a new total row number
@@ -51,6 +51,128 @@ function PMA_adjustTotals($this_anchor) {
}
$(document).ready(function() {
+ /**
+ * Ajax Event handler for 'Insert Table'
+ *
+ * @uses PMA_ajaxShowMessage()
+ * @see $cfg['AjaxEnable']
+ */
+ var currrent_insert_table;
+ $("td.insert_table a.ajax").live('click', function(event){
+ event.preventDefault();
+ currrent_insert_table = $(this);
+ var url = $(this).attr("href");
+ if (url.substring(0, 15) == "tbl_change.php?") {
+ url = url.substring(15);
+ }
+
+ var div = $('<div id="insert_table_dialog"></div>');
+ var target = "tbl_change.php";
+
+ /**
+ * @var button_options Object that stores the options passed to jQueryUI
+ * dialog
+ */
+ var button_options = {};
+ // in the following function we need to use $(this)
+ button_options[PMA_messages['strCancel']] = function() {$(this).parent().dialog('close').remove();}
+
+ var button_options_error = {};
+ button_options_error[PMA_messages['strOK']] = function() {$(this).parent().dialog('close').remove();}
+
+ var $msgbox = PMA_ajaxShowMessage();
+
+ $.get( target , url+"&ajax_request=true" , function(data) {
+ //in the case of an error, show the error message returned.
+ if (data.success != undefined && data.success == false) {
+ div
+ .append(data.error)
+ .dialog({
+ title: PMA_messages['strInsertTable'],
+ height: 230,
+ width: 900,
+ open: PMA_verifyTypeOfAllColumns,
+ buttons : button_options_error
+ })// end dialog options
+ } else {
+ div
+ .append(data)
+ .dialog({
+ title: PMA_messages['strInsertTable'],
+ height: 600,
+ width: 900,
+ open: PMA_verifyTypeOfAllColumns,
+ buttons : button_options
+ })
+ //Remove the top menu container from the dialog
+ .find("#topmenucontainer").hide()
+ ; // end dialog options
+ $(".insertRowTable").addClass("ajax");
+ $("#buttonYes").addClass("ajax");
+ }
+ PMA_ajaxRemoveMessage($msgbox);
+ }) // end $.get()
+
+ });
+
+ $("#insertForm .insertRowTable.ajax input[value=Go]").live('click', function(event) {
+ event.preventDefault();
+ /**
+ * @var the_form object referring to the insert form
+ */
+ var $form = $("#insertForm");
+ $("#result_query").remove();
+ PMA_prepareForAjaxRequest($form);
+ //User wants to submit the form
+ $.post($form.attr('action'), $form.serialize() , function(data) {
+ if(data.success == true) {
+ PMA_ajaxShowMessage(data.message);
+ } else {
+ PMA_ajaxShowMessage(data.error);
+ }
+ if ($("#insert_table_dialog").length > 0) {
+ $("#insert_table_dialog").dialog("close").remove();
+ }
+ /**Update the row count at the tableForm*/
+ currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
+ }) // end $.post()
+ }) // end insert table button "Go"
+
+ $("#buttonYes.ajax").live('click', function(event){
+ event.preventDefault();
+ /**
+ * @var the_form object referring to the insert form
+ */
+ var $form = $("#insertForm");
+ /**Get the submit type and the after insert type in the form*/
+ var selected_submit_type = $("#insertForm").find("#actions_panel .control_at_footer option:selected").attr('value');
+ var selected_after_insert = $("#insertForm").find("#actions_panel select[name=after_insert] option:selected").attr('value');
+ $("#result_query").remove();
+ PMA_prepareForAjaxRequest($form);
+ //User wants to submit the form
+ $.post($form.attr('action'), $form.serialize() , function(data) {
+ if(data.success == true) {
+ PMA_ajaxShowMessage(data.message);
+ if (selected_submit_type == "showinsert") {
+ $(data.sql_query).insertAfter("#topmenucontainer");
+ $("#result_query .notice").remove();
+ $("#result_query").prepend((data.message));
+ }
+ if (selected_after_insert == "new_insert") {
+ /**Trigger the insert dialog for new_insert option*/
+ currrent_insert_table.trigger('click');
+ }
+
+ } else {
+ PMA_ajaxShowMessage(data.error);
+ }
+ if ($("#insert_table_dialog").length > 0) {
+ $("#insert_table_dialog").dialog("close").remove();
+ }
+ /**Update the row count at the tableForm*/
+ currrent_insert_table.closest('tr').find('.value.tbl_rows').html(data.row_count);
+ }) // end $.post()
+ });
/**
* Ajax Event handler for 'Truncate Table'
@@ -149,7 +271,7 @@ $(document).ready(function() {
/**
* Ajax Event handler for 'Drop Event'
- *
+ *
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
@@ -188,7 +310,7 @@ $(document).ready(function() {
/**
* Ajax Event handler for 'Drop Procedure'
- *
+ *
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
@@ -220,10 +342,10 @@ $(document).ready(function() {
}) // end $.get()
}) // end $.PMA_confirm()
}) //end Drop Procedure
-
+
/**
* Ajax Event handler for 'Drop tracking'
- *
+ *
* @uses $.PMA_confirm()
* @uses PMA_ajaxShowMessage()
* @see $cfg['AjaxEnable']
@@ -261,7 +383,7 @@ $(document).ready(function() {
//Calculate Real End for InnoDB
/**
* Ajax Event handler for calculatig the real end for a InnoDB table
- *
+ *
* @uses $.PMA_confirm
*/
$('#real_end_input').live('click', function(event) {
diff --git a/tbl_replace.php b/tbl_replace.php
index d23482e..e08dafb 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -424,7 +424,8 @@ if (! empty($error_messages)) {
unset($error_messages, $warning_messages, $total_affected_rows, $last_messages, $last_message);
if($GLOBALS['is_ajax_request'] == true) {
-
+ /**Get the total row count of the table*/
+ $extra_data['row_count'] = PMA_Table::countRecords($_REQUEST['db'],$_REQUEST['table']);
$extra_data['sql_query'] = PMA_showMessage(NULL, $GLOBALS['display_query']);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3657-g42f0468
by Marc Delisle 15 Jun '11
by Marc Delisle 15 Jun '11
15 Jun '11
The branch, master has been updated
via 42f04687c39dd1bae0f58270900dff3924453efb (commit)
via 0e5c8a9497ee30c62863191ee82490b3bbf51c37 (commit)
via b3faf9cf42c98de53c1722c15208554a81ff62cf (commit)
via ff5e4c83612ce9de4feadea570389499a66a824d (commit)
via d28d7daba1a15b184cebaadc94dad787170260e5 (commit)
via 5bf85368313d488b57d0edce531de8b172dba8f3 (commit)
via 2d8932b95e848741f387af9b4fb0998b5e96570e (commit)
via c1f6904eba56f816b203049a7bf2a529903da1e3 (commit)
via 3750dcbb2fddc1e513c3ededf94acce95f549d12 (commit)
via 73b9166240e1ed5cca413499825bf096d87d1536 (commit)
via 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e (commit)
via 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1 (commit)
via ff292800be9d276c06949ae4dc79c373de3099f7 (commit)
via 916db6a9362418d7cb4ee6ee3f9491f379febc8f (commit)
via 84ad2a865c82dac2924c04299952d5e87bf71ae9 (commit)
via 823decbaf4fbbf2feab9f2af2dc42324742226f5 (commit)
via 8493052a2f24c9a8213af50359632e2efd6d6945 (commit)
via 467e6beaf7e9c58bbba7d809bbc654829f8439b6 (commit)
via 4d27d21e80ef895990c919a5164fac535c9283d4 (commit)
via cf64d5282be2c3c20d323256c8aa9fc295fd5ee8 (commit)
via c89e0aa2ab2629eb9b47255b070eb14eef75aa19 (commit)
via 039d56f97534f2c720df73f4e5325f3a9c838023 (commit)
via 2397b6f06f4056a8c3e9bd189adf2cc52646116b (commit)
via fcc2f82fa5bbdb3552cae6f15d60246a19442303 (commit)
via 78e7565cfd9779065e98ffc1bf8078d73d9a709d (commit)
via 83f7170304de06b1789e32105424bdf216bd3227 (commit)
via 7c18b8106a8f8b72dbc2b7a2de8da11fec0f975c (commit)
via 5814064b81cff9c581a83e773ff7f78fd026eebc (commit)
via 169686bccfd6466c631e38c40133227171fee3cb (commit)
via eb7c64dfad5203de7c51e87e096b1d677f2dc5ca (commit)
via b81ae2e6cc04f004192c127ae6955d11d4356191 (commit)
via 031e5c97714f62f39c15fe63cb512d1a6d4e67ce (commit)
via fcf671b382eb2c9956fe5d46abccc86fd2da314f (commit)
via 0ea798b7940a8ffdb7d4aade42679d860f45e9a1 (commit)
via 07c067a83225dc5edab572b3f113915fdae3cff8 (commit)
via d37b0fa24609cc4abd9c5c605179519be3c68e5f (commit)
via 3ba2aa446336c5bdf48eebf8e116830c2e350f40 (commit)
via d7f8b537e32920b6822dd5cdc89a947ffa5d6079 (commit)
via 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a (commit)
via 46e360de1e827c396a01c26fab0c25b79370d6dd (commit)
via 0b933d261484ceb095b47e8aa5ffcb71c362bd54 (commit)
via 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0 (commit)
via 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd (commit)
via 803b4639bd4e036c246d40b545ff9eb573f1181a (commit)
via aad9a55b81635ec2c6e25b6f79e0f989508436f6 (commit)
via 082345bdfa6b0661a3a6196269ead832e01cd862 (commit)
via d0e41349ee45d0d46b32a8fac0856470233097e1 (commit)
via c2b78975ab87a7848004c7b211ae8df2b843b92f (commit)
via c991a19ceb32493ff0cb27a69a2843546d39ddba (commit)
via e9c055c5bc7a94636d7b6cd5801f2044bca86cca (commit)
via 5ed509bd89bd363e09b2c6593fc6ea4e6a03dab7 (commit)
via 3e3234b156a300e5517d1239755ff49270f24000 (commit)
via d64685c25afe282eabe73f23ba5ba2cbfcb541e0 (commit)
via ff5544d1c7ecd8efec1a52931f4bb113780118f2 (commit)
via e16b77c0a5198b0f79175018e77909037826ae22 (commit)
via 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f (commit)
via 1a66a483cf127c216fad038c9299520442e49b95 (commit)
via b0717ff8d5aa263b572746711acc50f7996ea87d (commit)
via 86d787267ddca21ee3f478662d46aafd2c8736b4 (commit)
via 0e73a2e1b3edae033a8a1ffd86b20a54237b070d (commit)
via e1d0b67af6a178e7674b3377435fcb4df4ed1362 (commit)
via 13bcc44628d42991818bb8d0e1504f33a52f5721 (commit)
via 0cca021b23384898dd96839288176fb749047273 (commit)
via dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402 (commit)
via ce359e7506533803b97f287d77abd0ef935e2841 (commit)
via 88c89b2329fd2474050a73cdb6b1c9b383c0e154 (commit)
via 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec (commit)
via 8b8917ff747592e4ae72a5f7c7eda3f735102d57 (commit)
via 9fbbafdf7cbd5d06af0d37142724faa809799b51 (commit)
via dc81db3c76ba47e467a563b6fb4393589f9318e0 (commit)
via 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6 (commit)
via 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4 (commit)
via 40c325c4442985ea86345015f852f774bea44f58 (commit)
via 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9 (commit)
via 3cf69dfbb89b5476de32828a636dd3e27e912a50 (commit)
via 3b7f35d5c9f2c25c4fe5d7322fbe79c181637764 (commit)
via 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5 (commit)
via d174e8b41c6df7b8e38900e2fc4d8560b1501bd5 (commit)
via 9ac5173788e174c76865394257c535cf69ecf4b6 (commit)
via 67d8f469d24580ae8ad623ad2a175ae017acf193 (commit)
via c4c57b86c32647c1a1dcb0b9125d35fbced18aac (commit)
via 80981154486608cc154d6ab461847e999336566e (commit)
via 159696ba69d85fc59e4f82a343c3ad7a45f1636f (commit)
via 6b69e631d72bf08eb32e36c52d99d87db6cf4912 (commit)
via f4b47d4cf0a846f394570673429a9759eb5f4991 (commit)
via 566851d210104cb44ec536dc195b05707e0496c8 (commit)
via 25ae3e2387ca8936434d427fb5eb1f2d0a4f6d13 (commit)
via 36680cff27ab43da1051b3877f9134b06ad2873f (commit)
via 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b (commit)
via c40fed887e27558aa0d07ca10ce69534c4636813 (commit)
via ad6e109e0ee20b61fc5b1107856387cd09aeb2d0 (commit)
via 9ae87854ed6474e111a4d77a0d747215e1cff9f6 (commit)
from 551cc9a465269ab1208438d81fc0d492ce797366 (commit)
- Log -----------------------------------------------------------------
commit 42f04687c39dd1bae0f58270900dff3924453efb
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 08:12:58 2011 -0400
ChangeLog entries for Aris Feryanto's latest new features
commit 0e5c8a9497ee30c62863191ee82490b3bbf51c37
Merge: 551cc9a465269ab1208438d81fc0d492ce797366 b3faf9cf42c98de53c1722c15208554a81ff62cf
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 08:06:30 2011 -0400
Merge commit 'b3faf9cf42c98de53c1722c15208554a81ff62cf'
commit b3faf9cf42c98de53c1722c15208554a81ff62cf
Merge: ff5e4c83612ce9de4feadea570389499a66a824d 5bf85368313d488b57d0edce531de8b172dba8f3
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 15 07:23:37 2011 +0700
Merge branch 'tablesort' into aris
commit ff5e4c83612ce9de4feadea570389499a66a824d
Merge: d28d7daba1a15b184cebaadc94dad787170260e5 2d8932b95e848741f387af9b4fb0998b5e96570e
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 15 07:23:32 2011 +0700
Merge branch 'colresize' into aris
commit d28d7daba1a15b184cebaadc94dad787170260e5
Merge: 73b9166240e1ed5cca413499825bf096d87d1536 25dc50a5dd8a69f435272d37f7febafffc1d0ff0
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 15 07:23:06 2011 +0700
Fix merge conflict with origin/master
commit 5bf85368313d488b57d0edce531de8b172dba8f3
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 15 07:10:16 2011 +0700
Fix bug in 'Remember Sorting': modified caused error in PHP
commit 2d8932b95e848741f387af9b4fb0998b5e96570e
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 23:38:30 2011 +0700
Better column order remembering AJAX
commit c1f6904eba56f816b203049a7bf2a529903da1e3
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 22:57:47 2011 +0700
Change PMA_isBrowsing to PMA_isSelect
commit 3750dcbb2fddc1e513c3ededf94acce95f549d12
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 22:47:19 2011 +0700
Column resizing & reordering: better support without javascript
commit 73b9166240e1ed5cca413499825bf096d87d1536
Merge: 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 11:56:06 2011 +0700
Merge branch 'colresize' into aris
commit 770b1c7dd39c979cfafb018e0ecd46bbfc975d0e
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 11:55:35 2011 +0700
Fix: column resizing & reordering under db_search.php (also enable inline edit support)
commit 8a87d944a56d64073cfc840ea43a5f61d9d0cbe1
Merge: ff292800be9d276c06949ae4dc79c373de3099f7 916db6a9362418d7cb4ee6ee3f9491f379febc8f
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 09:44:10 2011 +0700
Merge branch 'tablesort' into aris
commit ff292800be9d276c06949ae4dc79c373de3099f7
Merge: 467e6beaf7e9c58bbba7d809bbc654829f8439b6 84ad2a865c82dac2924c04299952d5e87bf71ae9
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 09:44:05 2011 +0700
Merge branch 'colresize' into aris
commit 916db6a9362418d7cb4ee6ee3f9491f379febc8f
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 09:41:32 2011 +0700
Remember sorting: Fix criteria for browsing, following PMA_isBrowsing
commit 84ad2a865c82dac2924c04299952d5e87bf71ae9
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 09:38:34 2011 +0700
Fix PMA_isBrowsing criteria
commit 823decbaf4fbbf2feab9f2af2dc42324742226f5
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 09:37:51 2011 +0700
Add 'Click to mark' hint
commit 8493052a2f24c9a8213af50359632e2efd6d6945
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 14 08:40:04 2011 +0700
Fix column resizing and reordering compatibility with IE
commit 467e6beaf7e9c58bbba7d809bbc654829f8439b6
Merge: 2397b6f06f4056a8c3e9bd189adf2cc52646116b 4d27d21e80ef895990c919a5164fac535c9283d4
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 13 13:49:12 2011 +0700
Merge branch 'colresize' into aris
commit 4d27d21e80ef895990c919a5164fac535c9283d4
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 13 13:46:18 2011 +0700
No reorder column for table with only 1 column
commit cf64d5282be2c3c20d323256c8aa9fc295fd5ee8
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 13 12:08:17 2011 +0700
Remember column order only in 'Browse' tab
commit c89e0aa2ab2629eb9b47255b070eb14eef75aa19
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 13 11:21:09 2011 +0700
Merge hint for column sorting
commit 039d56f97534f2c720df73f4e5325f3a9c838023
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 13 08:28:21 2011 +0700
Better CSS unit
commit 2397b6f06f4056a8c3e9bd189adf2cc52646116b
Merge: 169686bccfd6466c631e38c40133227171fee3cb fcc2f82fa5bbdb3552cae6f15d60246a19442303
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 11:12:23 2011 +0700
Merge branch 'colresize' into aris
commit fcc2f82fa5bbdb3552cae6f15d60246a19442303
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 11:11:03 2011 +0700
Change column reordering text
commit 78e7565cfd9779065e98ffc1bf8078d73d9a709d
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 10:58:15 2011 +0700
Fix bug in column reordering tooltip
commit 83f7170304de06b1789e32105424bdf216bd3227
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 10:51:53 2011 +0700
Preloading of column pointer arrow
commit 7c18b8106a8f8b72dbc2b7a2de8da11fec0f975c
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 10:29:15 2011 +0700
Better jQuery animation for column reordering popup balloon
commit 5814064b81cff9c581a83e773ff7f78fd026eebc
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sun Jun 12 09:38:34 2011 +0700
Compress col_pointer images
commit 169686bccfd6466c631e38c40133227171fee3cb
Merge: 031e5c97714f62f39c15fe63cb512d1a6d4e67ce eb7c64dfad5203de7c51e87e096b1d677f2dc5ca
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sat Jun 11 10:23:11 2011 +0700
Merge branch 'colresize' into aris
commit eb7c64dfad5203de7c51e87e096b1d677f2dc5ca
Merge: b81ae2e6cc04f004192c127ae6955d11d4356191 54c062c0ad19db67250fde19eff7f44f31429e74
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sat Jun 11 10:19:10 2011 +0700
Merge remote-tracking branch 'origin/master' into colresize
commit b81ae2e6cc04f004192c127ae6955d11d4356191
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Sat Jun 11 10:17:58 2011 +0700
Add column dragging hint & some css prettifier
commit 031e5c97714f62f39c15fe63cb512d1a6d4e67ce
Merge: 0ea798b7940a8ffdb7d4aade42679d860f45e9a1 fcf671b382eb2c9956fe5d46abccc86fd2da314f
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 17:29:03 2011 +0700
Merge branch 'colresize' into aris
commit fcf671b382eb2c9956fe5d46abccc86fd2da314f
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 17:27:11 2011 +0700
Use __() for string in 'Restore column order' button, change javascript code style
commit 0ea798b7940a8ffdb7d4aade42679d860f45e9a1
Merge: d37b0fa24609cc4abd9c5c605179519be3c68e5f 07c067a83225dc5edab572b3f113915fdae3cff8
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 09:33:24 2011 +0700
Merge branch 'colresize' into aris
commit 07c067a83225dc5edab572b3f113915fdae3cff8
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 09:32:39 2011 +0700
Fix for 'Restore column order'
commit d37b0fa24609cc4abd9c5c605179519be3c68e5f
Merge: d7f8b537e32920b6822dd5cdc89a947ffa5d6079 3ba2aa446336c5bdf48eebf8e116830c2e350f40
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 08:48:41 2011 +0700
Merge branch 'colresize' into aris
commit 3ba2aa446336c5bdf48eebf8e116830c2e350f40
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 08:47:47 2011 +0700
Fix: remove system's drag and drop when dragging table header link
commit d7f8b537e32920b6822dd5cdc89a947ffa5d6079
Merge: 46e360de1e827c396a01c26fab0c25b79370d6dd 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 08:06:29 2011 +0700
Merge branch 'colresize' into aris
commit 53d7bfa2b1f8261d7ea609ff1ec2d96a3a4c780a
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 10 08:05:37 2011 +0700
Change 'Restore table' button to 'Restore column order'
commit 46e360de1e827c396a01c26fab0c25b79370d6dd
Merge: 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0 0b933d261484ceb095b47e8aa5ffcb71c362bd54
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 9 14:44:10 2011 +0700
Merge branch 'colresize' into aris
commit 0b933d261484ceb095b47e8aa5ffcb71c362bd54
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 9 14:43:34 2011 +0700
Fix more bug: Reordering not work correctly if table structure changed
commit 3ac62ac37f1cab119ef3579e3a8268805ccb8fe0
Merge: 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd 803b4639bd4e036c246d40b545ff9eb573f1181a
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 9 13:04:57 2011 +0700
Merge branch 'colresize' into aris
commit 403e2ed2bfeec79a4bfff4952e3a1499b8c269cd
Merge: aad9a55b81635ec2c6e25b6f79e0f989508436f6 90099b7b5de240e5789ea8bfd29fcb03e867d825
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 9 13:04:53 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 803b4639bd4e036c246d40b545ff9eb573f1181a
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 9 13:04:41 2011 +0700
Fix bug: Remember sorting and Column reordering not work correctly if table structure changed
commit aad9a55b81635ec2c6e25b6f79e0f989508436f6
Merge: 082345bdfa6b0661a3a6196269ead832e01cd862 d0e41349ee45d0d46b32a8fac0856470233097e1
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 8 13:59:42 2011 +0700
Merge branch 'colresize' into aris
commit 082345bdfa6b0661a3a6196269ead832e01cd862
Merge: c2b78975ab87a7848004c7b211ae8df2b843b92f 4333f4c55b40b94f2f8208d1751cf6c743317704
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 8 13:59:38 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit d0e41349ee45d0d46b32a8fac0856470233097e1
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 8 13:58:12 2011 +0700
Add disabled state for 'Restore table' button
commit c2b78975ab87a7848004c7b211ae8df2b843b92f
Merge: c991a19ceb32493ff0cb27a69a2843546d39ddba e9c055c5bc7a94636d7b6cd5801f2044bca86cca
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 18:27:01 2011 +0700
Merge branch 'colresize' into aris
commit c991a19ceb32493ff0cb27a69a2843546d39ddba
Merge: ff5544d1c7ecd8efec1a52931f4bb113780118f2 ca78ac3dc5fe7fe6c35f650430af2c192d666e10
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 18:26:18 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit e9c055c5bc7a94636d7b6cd5801f2044bca86cca
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 18:22:22 2011 +0700
Column reordering: remember the last column order
commit 5ed509bd89bd363e09b2c6593fc6ea4e6a03dab7
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 12:51:22 2011 +0700
Fix column resize bug: wrong resize when RepeatCells work
commit 3e3234b156a300e5517d1239755ff49270f24000
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 12:37:23 2011 +0700
Fix bug: Header not displayed correctly when RowActionLinks = Nowhere, RepeatCells = some value that enough to display repeated header
commit d64685c25afe282eabe73f23ba5ba2cbfcb541e0
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue Jun 7 12:32:14 2011 +0700
Add column reordering compatibility with RepeatCells configuration
commit ff5544d1c7ecd8efec1a52931f4bb113780118f2
Merge: 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f e16b77c0a5198b0f79175018e77909037826ae22
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 16:10:18 2011 +0700
Merge branch 'colresize' into aris
commit e16b77c0a5198b0f79175018e77909037826ae22
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 16:03:08 2011 +0700
Add different column pointer for vertical display
commit 04fbe12ac7f6e3efe1b8f81b3d39fe8d11e4cc1f
Merge: 1a66a483cf127c216fad038c9299520442e49b95 b0717ff8d5aa263b572746711acc50f7996ea87d
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 14:58:27 2011 +0700
Merge branch 'colresize' into aris
commit 1a66a483cf127c216fad038c9299520442e49b95
Merge: 0e73a2e1b3edae033a8a1ffd86b20a54237b070d 8b47a1dbd4a38fa12abe57f0eb0cbf74f1e433de
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 14:58:24 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit b0717ff8d5aa263b572746711acc50f7996ea87d
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 14:54:07 2011 +0700
Inline edit: fix compatibility with custom 'action column' (RowActionLinks) position
commit 86d787267ddca21ee3f478662d46aafd2c8736b4
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Mon Jun 6 12:20:41 2011 +0700
Fix column resizing and reordering compatibility with custom actions column position
commit 0e73a2e1b3edae033a8a1ffd86b20a54237b070d
Merge: 0cca021b23384898dd96839288176fb749047273 e1d0b67af6a178e7674b3377435fcb4df4ed1362
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 3 09:59:56 2011 +0700
Merge branch 'colresize' into aris
commit e1d0b67af6a178e7674b3377435fcb4df4ed1362
Merge: 13bcc44628d42991818bb8d0e1504f33a52f5721 d6b26b2d8f0cdd4b4bfb798e0b34f2974007fa85
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 3 09:59:35 2011 +0700
Fix merge conflict caused by new syntax highlighter
commit 13bcc44628d42991818bb8d0e1504f33a52f5721
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri Jun 3 09:47:25 2011 +0700
Fix bug in firefox 4 / ubuntu 11.04, column resize buggy for the second click on the same column
commit 0cca021b23384898dd96839288176fb749047273
Merge: ce359e7506533803b97f287d77abd0ef935e2841 dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 2 15:02:22 2011 +0700
Merge branch 'colresize' into aris
commit dfc7171d6fbd2ef500b23232b8e2f9baaf3f3402
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 2 15:00:16 2011 +0700
Fix column reordering's compatibility with IE8. No graying table anymore
commit ce359e7506533803b97f287d77abd0ef935e2841
Merge: 88c89b2329fd2474050a73cdb6b1c9b383c0e154 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 2 12:15:30 2011 +0700
Merge branch 'colresize' into aris
commit 88c89b2329fd2474050a73cdb6b1c9b383c0e154
Merge: 8b8917ff747592e4ae72a5f7c7eda3f735102d57 d4892728458b6090a148f1f12dd41c4add336fb8
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 2 12:15:25 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 2e9b5a08d21ae7d97fbc0ec8923c45d5260854ec
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Thu Jun 2 12:09:58 2011 +0700
Add column pointer when reordering and some fixes for Original theme
commit 8b8917ff747592e4ae72a5f7c7eda3f735102d57
Merge: dc81db3c76ba47e467a563b6fb4393589f9318e0 9fbbafdf7cbd5d06af0d37142724faa809799b51
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 23:40:04 2011 +0700
Merge branch 'colresize' into aris
commit 9fbbafdf7cbd5d06af0d37142724faa809799b51
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 23:39:15 2011 +0700
Disable noSelect after drag ended
commit dc81db3c76ba47e467a563b6fb4393589f9318e0
Merge: 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 22:28:12 2011 +0700
Merge branch 'colresize' into aris
commit 1ab6f82e1dd3e7db2e86fd79b238297e5c56d6e6
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 22:25:29 2011 +0700
Fix: restrict action column header to be moved
commit 6c532a3ba33cceb49f64d19a0f4e82e59a5d1ad4
Merge: 40c325c4442985ea86345015f852f774bea44f58 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 18:01:14 2011 +0700
Merge branch 'colresize' into aris
commit 40c325c4442985ea86345015f852f774bea44f58
Merge: 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5 0dbc9f4a3c7fa46baed1477f001e37dad14fc908
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 18:01:00 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 211d76b012cbcf6173de2fd75f4b5fe585e2eeb9
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 17:59:09 2011 +0700
Added new feature: column reordering. Some fixes in column resizing
commit 3cf69dfbb89b5476de32828a636dd3e27e912a50
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 13:11:53 2011 +0700
Some optimization for column resize script
commit 3b7f35d5c9f2c25c4fe5d7322fbe79c181637764
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 12:45:55 2011 +0700
Add makegrid triggering in other files
commit 6bfeb440764226a7bbe8c8a2c3828809ca4b21d5
Merge: 9ac5173788e174c76865394257c535cf69ecf4b6 d174e8b41c6df7b8e38900e2fc4d8560b1501bd5
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 10:40:31 2011 +0700
Merge branch 'colresize' into aris
commit d174e8b41c6df7b8e38900e2fc4d8560b1501bd5
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 10:39:45 2011 +0700
Use of .find for code consistency
commit 9ac5173788e174c76865394257c535cf69ecf4b6
Merge: 67d8f469d24580ae8ad623ad2a175ae017acf193 c4c57b86c32647c1a1dcb0b9125d35fbced18aac
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 10:15:57 2011 +0700
Merge colresize branch into aris
commit 67d8f469d24580ae8ad623ad2a175ae017acf193
Merge: 80981154486608cc154d6ab461847e999336566e 575f265293ffe0625da6a8fc0877a84d595d5322
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Wed Jun 1 09:47:06 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit c4c57b86c32647c1a1dcb0b9125d35fbced18aac
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 11:54:04 2011 +0700
Column resize: fix compatibility with inline edit
commit 80981154486608cc154d6ab461847e999336566e
Merge: 159696ba69d85fc59e4f82a343c3ad7a45f1636f 6b69e631d72bf08eb32e36c52d99d87db6cf4912
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 13:13:27 2011 +0700
Merge branch 'colresize' into aris
commit 159696ba69d85fc59e4f82a343c3ad7a45f1636f
Merge: 36680cff27ab43da1051b3877f9134b06ad2873f b5c1ee65092ebf67537931dfc1e396acfb1b10c2
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 13:13:23 2011 +0700
Merge remote-tracking branch 'origin/master' into aris
commit 6b69e631d72bf08eb32e36c52d99d87db6cf4912
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 11:54:04 2011 +0700
Column resize: fix compatibility with inline edit
commit f4b47d4cf0a846f394570673429a9759eb5f4991
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 10:50:56 2011 +0700
Support column resizing for vertical display mode
commit 566851d210104cb44ec536dc195b05707e0496c8
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 09:46:25 2011 +0700
Add trigger to remake the resizable column when an ajax request is done
commit 25ae3e2387ca8936434d427fb5eb1f2d0a4f6d13
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Tue May 31 09:23:37 2011 +0700
Add checking to first column (actions) span for resizing column
commit 36680cff27ab43da1051b3877f9134b06ad2873f
Merge: 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b 9ae87854ed6474e111a4d77a0d747215e1cff9f6
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri May 27 19:09:38 2011 +0700
Merge branch 'colresize' into aris
commit 518638fa87b73c9fb02d341f47a7a01ddb5e4f5b
Merge: c40fed887e27558aa0d07ca10ce69534c4636813 e4ba1dc06605fd81718d1991ad509d8e47f159fc
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri May 27 19:09:35 2011 +0700
Merge branch 'tablesorting' into aris
commit c40fed887e27558aa0d07ca10ce69534c4636813
Merge: a55873c9871bfb05bac8a3f42b6c30e23c88677d ad6e109e0ee20b61fc5b1107856387cd09aeb2d0
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri May 27 19:09:30 2011 +0700
Merge branch 'recent' into aris
commit ad6e109e0ee20b61fc5b1107856387cd09aeb2d0
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri May 27 19:03:47 2011 +0700
Fix RecentTable class -> PMA_RecentTable, some fix on documentation
commit 9ae87854ed6474e111a4d77a0d747215e1cff9f6
Author: Aris Feryanto <aris_feryanto(a)yahoo.com>
Date: Fri May 27 14:05:45 2011 +0700
Add ability to resize column when browsing tables
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 +
Documentation.html | 2 +-
db_search.php | 2 +
db_sql.php | 1 +
js/db_search.js | 10 +-
js/makegrid.js | 617 +++++++++++++++++++++++++++++++
js/sql.js | 121 +++++--
js/tbl_select.js | 1 +
libraries/RecentTable.class.php | 10 +-
libraries/Table.class.php | 118 +++++-
libraries/common.lib.php | 16 +
libraries/display_tbl.lib.php | 91 +++++-
libraries/header.inc.php | 2 +-
navigation.php | 4 +-
server_sql.php | 1 +
sql.php | 23 +-
tbl_replace.php | 1 +
tbl_select.php | 1 +
tbl_sql.php | 1 +
themes/original/css/theme_right.css.php | 65 ++++
themes/original/img/col_pointer.png | Bin 0 -> 121 bytes
themes/original/img/col_pointer_ver.png | Bin 0 -> 128 bytes
themes/pmahomme/css/theme_right.css.php | 69 ++++
themes/pmahomme/img/col_pointer.png | Bin 0 -> 136 bytes
themes/pmahomme/img/col_pointer_ver.png | Bin 0 -> 138 bytes
25 files changed, 1082 insertions(+), 76 deletions(-)
create mode 100644 js/makegrid.js
create mode 100644 themes/original/img/col_pointer.png
create mode 100644 themes/original/img/col_pointer_ver.png
create mode 100644 themes/pmahomme/img/col_pointer.png
create mode 100644 themes/pmahomme/img/col_pointer_ver.png
diff --git a/ChangeLog b/ChangeLog
index 49c7305..daa1a62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,8 @@
+ Patch #3271804 for rfe #3177495, new DisableMultiTableMaintenance directive
+ [interface] Reorganised server status page.
+ [interface] Changed way of generating charts.
++ rfe #939233 [interface] Flexible column width
++ [interface] Mouse-based column reordering in query results
3.4.3.0 (not yet released)
- bug #3311170 [sync] Missing helper icons in Synchronize
diff --git a/Documentation.html b/Documentation.html
index 4db4ec0..d2dea87 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -1073,7 +1073,7 @@ ALTER TABLE `pma_column_comments`
Without configuring the storage, you can still access the recently used tables,
but it will disappear after you logout.<br/><br/>
- To allow the usage of this functionality:
+ To allow the usage of this functionality persistently:
<ul>
<li>set up <a href="#pmadb">pmadb</a> and the phpMyAdmin configuration storage</li>
diff --git a/db_search.php b/db_search.php
index d93fd74..a91bf87 100644
--- a/db_search.php
+++ b/db_search.php
@@ -38,6 +38,8 @@
require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'db_search.js';
+$GLOBALS['js_include'][] = 'sql.js';
+$GLOBALS['js_include'][] = 'makegrid.js';
/**
* Gets some core libraries and send headers
diff --git a/db_sql.php b/db_sql.php
index 08eb5ca..26a6299 100644
--- a/db_sql.php
+++ b/db_sql.php
@@ -14,6 +14,7 @@ require_once './libraries/common.inc.php';
* Runs common work
*/
$GLOBALS['js_include'][] = 'functions.js';
+$GLOBALS['js_include'][] = 'makegrid.js';
$GLOBALS['js_include'][] = 'sql.js';
require './libraries/db_common.inc.php';
diff --git a/js/db_search.js b/js/db_search.js
index 6fff82d..0cb04b7 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -26,7 +26,14 @@ function loadResult(result_path , table_name , link , ajaxEnable){
/** Load the browse results to the page */
$("#table-info").show();
$('#table-link').attr({"href" : 'sql.php?'+link }).text(table_name);
- $('#browse-results').load(result_path + " '"+'#sqlqueryresults' + "'").show();
+ $('#browse-results').load(result_path + " '"+'#sqlqueryresults' + "'", null, function() {
+ // because under db_search, window.parent.table is not defined yet,
+ // we assign it manually from #table-link
+ window.parent.table = $('#table-link').text().trim();
+
+ appendInlineAnchor();
+ $('#table_results').makegrid();
+ }).show();
}
else
{
@@ -173,7 +180,6 @@ $(document).ready(function() {
if (typeof response == 'string') {
// found results
$("#searchresults").html(response);
- $("#sqlqueryresults").trigger('appendAnchor');
$('#togglesearchresultlink')
// always start with the Show message
diff --git a/js/makegrid.js b/js/makegrid.js
new file mode 100644
index 0000000..038300b
--- /dev/null
+++ b/js/makegrid.js
@@ -0,0 +1,617 @@
+(function ($) {
+ $.grid = function(t) {
+ // prepare the grid
+ var g = {
+ // constant
+ minColWidth: 5,
+
+ // variables, assigned with default value, changed later
+ alignment: 'horizontal', // 3 possibilities: vertical, horizontal, horizontalflipped
+ actionSpan: 5,
+ colOrder: new Array(), // array of column order
+ tableCreateTime: null, // table creation time, only available in "Browse tab"
+ hintShown: false, // true if hint balloon is shown, used by updateHint() method
+ reorderHint: '', // string, hint for column reordering
+ sortHint: '', // string, hint for column sorting
+ markHint: '', // string, hint for column marking
+ showReorderHint: false, // boolean, used by showHint() method
+ showSortHint: false, // boolean, used by showHint() method
+ showMarkHint: false,
+ hintIsHiding: false, // true when hint is still shown, but hide() already called
+
+ // functions
+ dragStartRsz: function(e, obj) { // start column resize
+ var n = $(this.cRsz).find('div').index(obj);
+ this.colRsz = {
+ x0: e.pageX,
+ n: n,
+ obj: obj,
+ objLeft: $(obj).position().left,
+ objWidth: this.alignment != 'vertical' ?
+ $(this.t).find('th.draggable:eq(' + n + ') span').outerWidth() :
+ $(this.t).find('tr:first td:eq(' + n + ') span').outerWidth()
+ };
+ $('body').css('cursor', 'col-resize');
+ $('body').noSelect();
+ },
+
+ dragStartMove: function(e, obj) { // start column move
+ // prepare the cCpy and cPointer from the dragged column
+ $(this.cCpy).text($(obj).text());
+ var objPos = $(obj).position();
+ if (this.alignment != 'vertical') {
+ $(this.cCpy).css({
+ top: objPos.top + 20,
+ left: objPos.left,
+ height: $(obj).height(),
+ width: $(obj).width()
+ });
+ $(this.cPointer).css({
+ top: objPos.top
+ });
+ } else { // vertical alignment
+ $(this.cCpy).css({
+ top: objPos.top,
+ left: objPos.left + 30,
+ height: $(obj).height(),
+ width: $(obj).width()
+ });
+ $(this.cPointer).css({
+ top: objPos.top
+ });
+ }
+
+ // get the column index, zero-based
+ var n = this.getHeaderIdx(obj);
+
+ this.colMov = {
+ x0: e.pageX,
+ y0: e.pageY,
+ n: n,
+ newn: n,
+ obj: obj,
+ objTop: objPos.top,
+ objLeft: objPos.left
+ };
+ $('body').css('cursor', 'move');
+ this.hideHint();
+ $('body').noSelect();
+ },
+
+ dragMove: function(e) {
+ if (this.colRsz) {
+ var dx = e.pageX - this.colRsz.x0;
+ if (this.colRsz.objWidth + dx > this.minColWidth)
+ $(this.colRsz.obj).css('left', this.colRsz.objLeft + dx + 'px');
+ } else if (this.colMov) {
+ // dragged column animation
+ if (this.alignment != 'vertical') {
+ var dx = e.pageX - this.colMov.x0;
+ $(this.cCpy)
+ .css('left', this.colMov.objLeft + dx)
+ .show();
+ } else { // vertical alignment
+ var dy = e.pageY - this.colMov.y0;
+ $(this.cCpy)
+ .css('top', this.colMov.objTop + dy)
+ .show();
+ }
+
+ // pointer animation
+ var hoveredCol = this.getHoveredCol(e);
+ if (hoveredCol) {
+ var newn = this.getHeaderIdx(hoveredCol);
+ this.colMov.newn = newn;
+ if (newn != this.colMov.n) {
+ // show the column pointer in the right place
+ var colPos = $(hoveredCol).position();
+ if (this.alignment != 'vertical') {
+ var newleft = newn < this.colMov.n ?
+ colPos.left :
+ colPos.left + $(hoveredCol).outerWidth();
+ $(this.cPointer)
+ .css({
+ left: newleft,
+ visibility: 'visible'
+ });
+ } else { // vertical alignment
+ var newtop = newn < this.colMov.n ?
+ colPos.top :
+ colPos.top + $(hoveredCol).outerHeight();
+ $(this.cPointer)
+ .css({
+ top: newtop,
+ visibility: 'visible'
+ });
+ }
+ } else {
+ // no movement to other column, hide the column pointer
+ $(this.cPointer).css('visibility', 'hidden');
+ }
+ }
+ }
+ },
+
+ dragEnd: function(e) {
+ if (this.colRsz) {
+ var dx = e.pageX - this.colRsz.x0;
+ var nw = this.colRsz.objWidth + dx;
+ if (nw < this.minColWidth) {
+ nw = this.minColWidth;
+ }
+ var n = this.colRsz.n;
+ // do the resizing
+ if (this.alignment != 'vertical') {
+ $(this.t).find('tr').each(function() {
+ $(this).find('th.draggable:eq(' + n + ') span,' +
+ 'td:eq(' + (g.actionSpan + n) + ') span')
+ .css('width', nw);
+ });
+ } else { // vertical alignment
+ $(this.t).find('tr').each(function() {
+ $(this).find('td:eq(' + n + ') span')
+ .css('width', nw);
+ });
+ }
+ $('body').css('cursor', 'default');
+ this.reposRsz();
+ this.colRsz = false;
+ } else if (this.colMov) {
+ // shift columns
+ if (this.colMov.newn != this.colMov.n) {
+ this.shiftCol(this.colMov.n, this.colMov.newn);
+ // assign new position
+ var objPos = $(this.colMov.obj).position();
+ this.colMov.objTop = objPos.top;
+ this.colMov.objLeft = objPos.left;
+ this.colMov.n = this.colMov.newn;
+ // send request to server to remember the column order
+ if (this.tableCreateTime) {
+ this.sendColOrder();
+ }
+ this.refreshRestoreButton();
+ }
+
+ // animate new column position
+ $(this.cCpy).stop(true, true)
+ .animate({
+ top: g.colMov.objTop,
+ left: g.colMov.objLeft
+ }, 'fast')
+ .fadeOut();
+ $(this.cPointer).css('visibility', 'hidden');
+
+ this.colMov = false;
+ }
+ $('body').css('cursor', 'default');
+ $('body').noSelect(false);
+ },
+
+ /**
+ * Reposition column resize bars.
+ */
+ reposRsz: function() {
+ $(this.cRsz).find('div').hide();
+ $firstRowCols = this.alignment != 'vertical' ?
+ $(this.t).find('tr:first th.draggable') :
+ $(this.t).find('tr:first td');
+ for (var n = 0; n < $firstRowCols.length; n++) {
+ $this = $($firstRowCols[n]);
+ $cb = $(g.cRsz).find('div:eq(' + n + ')'); // column border
+ var pad = parseInt($this.css('padding-right'));
+ $cb.css('left', Math.floor($this.position().left + $this.width() + pad))
+ .show();
+ }
+ },
+
+ /**
+ * Shift column from index oldn to newn.
+ */
+ shiftCol: function(oldn, newn) {
+ if (this.alignment != 'vertical') {
+ $(this.t).find('tr').each(function() {
+ if (newn < oldn) {
+ $(this).find('th.draggable:eq(' + newn + '),' +
+ 'td:eq(' + (g.actionSpan + newn) + ')')
+ .before($(this).find('th.draggable:eq(' + oldn + '),' +
+ 'td:eq(' + (g.actionSpan + oldn) + ')'));
+ } else {
+ $(this).find('th.draggable:eq(' + newn + '),' +
+ 'td:eq(' + (g.actionSpan + newn) + ')')
+ .after($(this).find('th.draggable:eq(' + oldn + '),' +
+ 'td:eq(' + (g.actionSpan + oldn) + ')'));
+ }
+ });
+ // reposition the column resize bars
+ this.reposRsz();
+
+ } else { // vertical alignment
+ // shift rows
+ if (newn < oldn) {
+ $(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')')
+ .before($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
+ } else {
+ $(this.t).find('tr:eq(' + (g.actionSpan + newn) + ')')
+ .after($(this.t).find('tr:eq(' + (g.actionSpan + oldn) + ')'));
+ }
+ }
+ // adjust the colOrder
+ var tmp = this.colOrder[oldn];
+ this.colOrder.splice(oldn, 1);
+ this.colOrder.splice(newn, 0, tmp);
+ },
+
+ /**
+ * Find currently hovered table column's header (excluding actions column).
+ * @return the hovered column's th object or undefined if no hovered column found.
+ */
+ getHoveredCol: function(e) {
+ var hoveredCol;
+ $headers = $(this.t).find('th.draggable');
+ if (this.alignment != 'vertical') {
+ $headers.each(function() {
+ var left = $(this).position().left;
+ var right = left + $(this).outerWidth();
+ if (left <= e.pageX && e.pageX <= right) {
+ hoveredCol = this;
+ }
+ });
+ } else { // vertical alignment
+ $headers.each(function() {
+ var top = $(this).position().top;
+ var bottom = top + $(this).height();
+ if (top <= e.pageY && e.pageY <= bottom) {
+ hoveredCol = this;
+ }
+ });
+ }
+ return hoveredCol;
+ },
+
+ /**
+ * Get a zero-based index from a <th class="draggable"> tag in a table.
+ */
+ getHeaderIdx: function(obj) {
+ var n;
+ if (this.alignment != 'vertical') {
+ n = $(obj).parents('tr').find('th.draggable').index(obj);
+ } else {
+ var column_idx = $(obj).index();
+ var $th_in_same_column = $(this.t).find('th.draggable:nth-child(' + (column_idx + 1) + ')');
+ n = $th_in_same_column.index(obj);
+ }
+ return n;
+ },
+
+ /**
+ * Reposition the table back to normal order.
+ */
+ restore: function() {
+ // use insertion sort, since we already have shiftCol function
+ for (var i = 1; i < this.colOrder.length; i++) {
+ var x = this.colOrder[i];
+ var j = i - 1;
+ while (j >= 0 && x < this.colOrder[j]) {
+ j--;
+ }
+ if (j != i - 1) {
+ this.shiftCol(i, j + 1);
+ }
+ }
+ if (this.tableCreateTime) {
+ // send request to server to remember the column order
+ this.sendColOrder();
+ }
+ this.refreshRestoreButton();
+ },
+
+ /**
+ * Send column order to the server.
+ */
+ sendColOrder: function() {
+ $.post('sql.php', {
+ ajax_request: true,
+ db: window.parent.db,
+ table: window.parent.table,
+ token: window.parent.token,
+ set_col_order: true,
+ col_order: this.colOrder.toString(),
+ table_create_time: this.tableCreateTime
+ });
+ },
+
+ /**
+ * Refresh restore button state.
+ * Make restore button disabled if the table is similar with initial state.
+ */
+ refreshRestoreButton: function() {
+ // check if table state is as initial state
+ var isInitial = true;
+ for (var i = 0; i < this.colOrder.length; i++) {
+ if (this.colOrder[i] != i) {
+ isInitial = false;
+ break;
+ }
+ }
+ // enable or disable restore button
+ if (isInitial) {
+ $('.restore_column').hide();
+ } else {
+ $('.restore_column').show();
+ }
+ },
+
+ /**
+ * Show hint with the text supplied.
+ */
+ showHint: function(e) {
+ if (!this.colRsz && !this.colMov) { // if not resizing or dragging
+ var text = '';
+ if (this.showReorderHint) {
+ text += this.reorderHint;
+ }
+ if (this.showSortHint) {
+ text += text.length > 0 ? '<br />' : '';
+ text += this.sortHint;
+ }
+ if (this.showMarkHint) {
+ text += text.length > 0 ? '<br />' : '';
+ text += this.markHint;
+ }
+
+ // hide the hint if no text
+ if (!text) {
+ this.hideHint();
+ return;
+ }
+
+ $(this.dHint).html(text);
+ if (!this.hintShown || this.hintIsHiding) {
+ $(this.dHint)
+ .stop(true, true)
+ .css({
+ top: e.pageY,
+ left: e.pageX + 15
+ })
+ .show('fast');
+ this.hintShown = true;
+ this.hintIsHiding = false;
+ }
+ }
+ },
+
+ /**
+ * Hide the hint.
+ */
+ hideHint: function() {
+ if (this.hintShown) {
+ $(this.dHint)
+ .stop(true, true)
+ .hide(300, function() {
+ g.hintShown = false;
+ g.hintIsHiding = false;
+ });
+ this.hintIsHiding = true;
+ }
+ },
+
+ /**
+ * Update hint position.
+ */
+ updateHint: function(e) {
+ if (this.hintShown) {
+ $(this.dHint).css({
+ top: e.pageY,
+ left: e.pageX + 15
+ });
+ }
+ }
+ }
+
+ g.gDiv = document.createElement('div'); // create global div
+ g.cRsz = document.createElement('div'); // column resizer
+ 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
+ g.dHint = document.createElement('div'); // draggable hint
+
+ // assign the table alignment
+ g.alignment = $("#top_direction_dropdown").val();
+
+ // adjust g.cCpy
+ g.cCpy.className = 'cCpy';
+ $(g.cCpy).hide();
+
+ // adjust g.cPoint
+ g.cPointer.className = g.alignment != 'vertical' ? 'cPointer' : 'cPointerVer';
+ $(g.cPointer).css('visibility', 'hidden');
+
+ // adjust g.dHint
+ g.dHint.className = 'dHint';
+ $(g.dHint).hide();
+
+ // chain table and grid together
+ t.grid = g;
+ g.t = t;
+
+ // get first row data columns
+ var $firstRowCols = g.alignment != 'vertical' ?
+ $(t).find('tr:first th.draggable') :
+ $(t).find('tr:first td');
+
+ // assign first column (actions) span
+ if (! $(t).find('tr:first th:first').hasClass('draggable')) { // action header exist
+ g.actionSpan = g.alignment != 'vertical' ?
+ $(t).find('tr:first th:first').prop('colspan') :
+ $(t).find('tr:first th:first').prop('rowspan');
+ } else {
+ g.actionSpan = 0;
+ }
+
+ // assign table create time
+ // #table_create_time will only available if we are in "Browse" tab
+ g.tableCreateTime = $('#table_create_time').val();
+
+ // assign column reorder & column sort hint
+ g.reorderHint = $('#col_order_hint').val();
+ g.sortHint = $('#sort_hint').val();
+ g.markHint = $('#col_mark_hint').val();
+
+ // determine whether to show the column reordering hint or not
+ g.showReorderHint = $firstRowCols.length > 1;
+
+ // initialize column order
+ $col_order = $('#col_order');
+ if ($col_order.length > 0) {
+ g.colOrder = $col_order.val().split(',');
+ for (var i = 0; i < g.colOrder.length; i++) {
+ g.colOrder[i] = parseInt(g.colOrder[i]);
+ }
+ } else {
+ g.colOrder = new Array();
+ for (var i = 0; i < $firstRowCols.length; i++) {
+ g.colOrder.push(i);
+ }
+ }
+
+ // create column borders
+ $firstRowCols.each(function() {
+ $this = $(this);
+ var cb = document.createElement('div'); // column border
+ var pad = parseInt($this.css('padding-right'));
+ $(cb).css('left', Math.floor($this.position().left + $this.width() + pad));
+ $(cb).addClass('colborder');
+ $(cb).mousedown(function(e) {
+ g.dragStartRsz(e, this);
+ });
+ $(g.cRsz).append(cb);
+ });
+
+ // wrap all data cells, except actions cell, with span
+ $(t).find('th, td:not(:has(span))')
+ .wrapInner('<span />');
+
+ // register events
+ if ($firstRowCols.length > 1) {
+ $(t).find('th.draggable')
+ .css('cursor', 'move')
+ .mousedown(function(e) {
+ g.dragStartMove(e, this);
+ });
+ }
+ $(t).find('th.draggable')
+ .mouseenter(function(e) {
+ g.showMarkHint = !g.showSortHint;
+ g.showHint(e);
+ })
+ .mouseleave(function(e) {
+ g.hideHint();
+ });
+ $(t).find('th.draggable a')
+ .attr('title', '') // hide default tooltip for sorting
+ .mouseenter(function(e) {
+ g.showSortHint = true;
+ g.showMarkHint = false;
+ g.showHint(e);
+ })
+ .mouseleave(function(e) {
+ g.showSortHint = false;
+ g.showMarkHint = true;
+ g.showHint(e);
+ });
+ $(document).mousemove(function(e) {
+ g.dragMove(e);
+ g.updateHint(e);
+ });
+ $(document).mouseup(function(e) {
+ g.dragEnd(e);
+ });
+ $('.restore_column').click(function() {
+ g.restore();
+ });
+
+ // add table class
+ $(t).addClass('pma_table');
+
+ // link all divs
+ $(t).before(g.gDiv);
+ $(g.gDiv).append(t);
+ $(g.gDiv).prepend(g.cRsz);
+ $(g.gDiv).append(g.cCpy);
+ $(g.gDiv).append(g.cPointer);
+ $(g.gDiv).append(g.dHint);
+
+ // some adjustment
+ g.refreshRestoreButton();
+ g.cRsz.className = 'cRsz';
+ $(t).removeClass('data');
+ $(g.gDiv).addClass('data');
+ $(g.cRsz).css('height', $(t).height());
+ $(t).find('th a').bind('dragstart', function() {
+ return false;
+ });
+ };
+
+ // document ready checking
+ var docready = false;
+ $(document).ready(function() {
+ docready = true;
+ });
+
+ // Additional jQuery functions
+ /**
+ * Make resizable, reorderable grid.
+ */
+ $.fn.makegrid = function() {
+ return this.each(function() {
+ if (!docready) {
+ var t = this;
+ $(document).ready(function() {
+ $.grid(t);
+ });
+ } else {
+ $.grid(this);
+ }
+ });
+ };
+ /**
+ * Refresh grid. This must be called after changing the grid's content.
+ */
+ $.fn.refreshgrid = function() {
+ return this.each(function() {
+ if (!docready) {
+ var t = this;
+ $(document).ready(function() {
+ if (t.grid) t.grid.reposRsz();
+ });
+ } else {
+ if (this.grid) this.grid.reposRsz();
+ }
+ });
+ }
+ $.fn.noSelect = function (p) { //no select plugin by Paulo P.Marinas
+ var prevent = (p == null) ? true : p;
+ if (prevent) {
+ return this.each(function () {
+ if ($.browser.msie || $.browser.safari) $(this).bind('selectstart', function () {
+ return false;
+ });
+ else if ($.browser.mozilla) {
+ $(this).css('MozUserSelect', 'none');
+ $('body').trigger('focus');
+ } else if ($.browser.opera) $(this).bind('mousedown', function () {
+ return false;
+ });
+ else $(this).attr('unselectable', 'on');
+ });
+ } else {
+ return this.each(function () {
+ if ($.browser.msie || $.browser.safari) $(this).unbind('selectstart');
+ else if ($.browser.mozilla) $(this).css('MozUserSelect', 'inherit');
+ else if ($.browser.opera) $(this).unbind('mousedown');
+ else $(this).removeAttr('unselectable', 'on');
+ });
+ }
+ }; //end noSelect
+
+})(jQuery);
+
diff --git a/js/sql.js b/js/sql.js
index 65d209a..dfe05da 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -42,12 +42,13 @@ function getFieldName($this_field, disp_mode) {
else {
var this_field_index = $this_field.index();
// ltr or rtl direction does not impact how the DOM was generated
- //
+ // check if the action column in the left exist
+ var leftActionExist = !$('#table_results').find('th:first').hasClass('draggable');
// 5 columns to account for the checkbox, edit, appended inline edit, copy and delete anchors but index is zero-based so substract 4
- var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+') a').text();
+ var field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index - (leftActionExist ? 4 : 0)) + ') a').text();
// happens when just one row (headings contain no a)
if ("" == field_name) {
- field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index-4 )+')').text();
+ field_name = $('#table_results').find('thead').find('th:nth('+ (this_field_index - (leftActionExist ? 4 : 0)) + ')').text();
}
}
@@ -211,6 +212,24 @@ $(document).ready(function() {
$("#sqlqueryresults").live('appendAnchor',function() {
appendInlineAnchor();
})
+
+ /**
+ * Attach the {@link makegrid} function to a custom event, which will be
+ * triggered manually everytime the table of results is reloaded
+ * @memberOf jQuery
+ */
+ $("#sqlqueryresults").live('makegrid', function() {
+ $('#table_results').makegrid();
+ })
+
+ /**
+ * Attach the {@link refreshgrid} function to a custom event, which will be
+ * triggered manually everytime the table of results is manipulated (e.g., by inline edit)
+ * @memberOf jQuery
+ */
+ $("#sqlqueryresults").live('refreshgrid', function() {
+ $('#table_results').refreshgrid();
+ })
/**
* Trigger the appendAnchor event to prepare the first table for inline edit
@@ -324,6 +343,7 @@ $(document).ready(function() {
$('#sqlqueryresults').show();
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
+ $("#sqlqueryresults").trigger('makegrid');
$('#togglequerybox').show();
if($("#togglequerybox").siblings(":visible").length > 0) {
$("#togglequerybox").trigger('click');
@@ -364,6 +384,7 @@ $(document).ready(function() {
$.post($the_form.attr('action'), $the_form.serialize(), function(data) {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
+ $("#sqlqueryresults").trigger('makegrid');
PMA_init_slider();
PMA_ajaxRemoveMessage($msgbox);
@@ -387,6 +408,7 @@ $(document).ready(function() {
$.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
+ $("#sqlqueryresults").trigger('makegrid');
PMA_init_slider();
PMA_ajaxRemoveMessage($msgbox);
}) // end $.post()
@@ -412,7 +434,8 @@ $(document).ready(function() {
$.get($anchor.attr('href'), $anchor.serialize() + '&ajax_request=true', function(data) {
$("#sqlqueryresults")
.html(data)
- .trigger('appendAnchor');
+ .trigger('appendAnchor')
+ .trigger('makegrid');
PMA_ajaxRemoveMessage($msgbox);
}) // end $.get()
})//end Sort results table
@@ -431,7 +454,8 @@ $(document).ready(function() {
$.post($form.attr('action'), $form.serialize() + '&ajax_request=true' , function(data) {
$("#sqlqueryresults")
.html(data)
- .trigger('appendAnchor');
+ .trigger('appendAnchor')
+ .trigger('makegrid');
PMA_init_slider();
}) // end $.post()
})
@@ -517,21 +541,22 @@ $(document).ready(function() {
$this_hide.parent().removeClass("hover noclick");
$this_hide.siblings().removeClass("hover");
- var last_column = $this_hide.siblings().length;
+ var $input_siblings = $this_hide.parent('tr').find('.inline_edit');
var txt = '';
- for(var i = 4; i < last_column; i++) {
- if($this_hide.siblings("td:eq(" + i + ")").hasClass("inline_edit") == false) {
- continue;
+ $input_siblings.each(function() {
+ var $this_hide_siblings = $(this);
+ txt = $this_hide_siblings.data('original_data');
+ if($this_hide_siblings.children('span').children().length != 0) {
+ $this_hide_siblings.children('span').empty();
+ $this_hide_siblings.children('span').append(txt);
}
- txt = $this_hide.siblings("td:eq(" + i + ")").data('original_data');
- if($this_hide.siblings("td:eq(" + i + ")").children().length != 0) {
- $this_hide.siblings("td:eq(" + i + ")").empty();
- $this_hide.siblings("td:eq(" + i + ")").append(txt);
- }
- }
+ });
$(this).prev().prev().remove();
$(this).prev().remove();
$(this).remove();
+
+ // refresh the grid
+ $("#sqlqueryresults").trigger('refreshgrid');
});
} else {
var txt = '';
@@ -539,7 +564,8 @@ $(document).ready(function() {
$('#table_results tbody tr td span a#hide').click(function() {
var $hide_a = $(this);
- var pos = $hide_a.parents('td').index();
+ var $this_hide = $(this).parents('td');
+ var pos = $this_hide.index();
var $this_span = $hide_a.parent();
$this_span.find('a, br').remove();
@@ -547,22 +573,26 @@ $(document).ready(function() {
var $this_row = $this_span.parents('tr');
// changing inline_edit_active to inline_edit_anchor
- $this_row.siblings("tr:eq(3) td:eq(" + pos + ")").removeClass("inline_edit_active").addClass("inline_edit_anchor");
+ $this_hide.removeClass("inline_edit_active").addClass("inline_edit_anchor");
// removing marked and hover classes.
$this_row.parent('tbody').find('tr').find("td:eq(" + pos + ")").removeClass("marked hover");
- for( var i = 6; i <= rows + 2; i++){
+ for( var i = 0; i <= rows + 2; i++){
if( $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").hasClass("inline_edit") == false) {
continue;
}
- txt = $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").data('original_data');
- $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").empty();
- $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")").append(txt);
+ $this_row_siblings = $this_row.siblings("tr:eq(" + i + ") td:eq(" + pos + ")");
+ txt = $this_row_siblings.data('original_data');
+ $this_row_siblings.children('span').empty();
+ $this_row_siblings.children('span').append(txt);
}
$(this).prev().remove();
$(this).prev().remove();
$(this).remove();
+
+ // refresh the grid
+ $("#sqlqueryresults").trigger('refreshgrid');
});
}
@@ -594,7 +624,7 @@ $(document).ready(function() {
/**
* @var data_value Current value of this field
*/
- var data_value = $(this).html();
+ var data_value = $(this).children('span').html();
// We need to retrieve the value from the server for truncated/relation fields
// Find the field name
@@ -604,6 +634,10 @@ $(document).ready(function() {
*/
var $this_field = $(this);
/**
+ * @var this_field_span Object referring to this field's child (<span>)
+ */
+ var $this_field_span = $(this).children('span');
+ /**
* @var field_name String containing the name of this field.
* @see getFieldName()
*/
@@ -620,11 +654,11 @@ $(document).ready(function() {
/**
* @var curr_value String current value of the field (for fields that are of type enum or set).
*/
- var curr_value = $this_field.text();
+ var curr_value = $this_field_span.text();
if($this_field.is(':not(.not_null)')){
// add a checkbox to mark null for all the field that are nullable.
- $this_field.html('<div class="null_div">Null :<input type="checkbox" class="checkbox_null_'+ field_name + '_' + this_row_index +'"></div>');
+ $this_field_span.html('<div class="null_div">Null :<input type="checkbox" class="checkbox_null_'+ field_name + '_' + this_row_index +'"></div>');
// check the 'checkbox_null_<field_name>_<row_index>' if the corresponding value is null
if($this_field.is('.null')) {
$('.checkbox_null_' + field_name + '_' + this_row_index).attr('checked', true);
@@ -671,7 +705,7 @@ $(document).ready(function() {
})
} else {
- $this_field.html('<div class="null_div"></div>');
+ $this_field_span.html('<div class="null_div"></div>');
}
// In each input sibling, wrap the current value in a textarea
@@ -679,7 +713,7 @@ $(document).ready(function() {
if($this_field.is(':not(.truncated, .transformed, .relation, .enum, .set, .null)')) {
// handle non-truncated, non-transformed, non-relation values
// We don't need to get any more data, just wrap the value
- $this_field.append('<textarea>'+data_value+'</textarea>');
+ $this_field_span.append('<textarea>'+data_value+'</textarea>');
$this_field.data('original_data', data_value);
}
else if($this_field.is('.truncated, .transformed')) {
@@ -700,8 +734,9 @@ $(document).ready(function() {
'inline_edit' : true
}, function(data) {
if(data.success == true) {
- $this_field.append('<textarea>'+data.value+'</textarea>');
+ $this_field_span.append('<textarea>'+data.value+'</textarea>');
$this_field.data('original_data', data_value);
+ $("#sqlqueryresults").trigger('refreshgrid');
}
else {
PMA_ajaxShowMessage(data.error);
@@ -727,8 +762,9 @@ $(document).ready(function() {
}
$.post('sql.php', post_params, function(data) {
- $this_field.append(data.dropdown);
+ $this_field_span.append(data.dropdown);
$this_field.data('original_data', data_value);
+ $("#sqlqueryresults").trigger('refreshgrid');
}) // end $.post()
}
else if($this_field.is('.enum')) {
@@ -748,8 +784,9 @@ $(document).ready(function() {
'curr_value' : curr_value
}
$.post('sql.php', post_params, function(data) {
- $this_field.append(data.dropdown);
+ $this_field_span.append(data.dropdown);
$this_field.data('original_data', data_value);
+ $("#sqlqueryresults").trigger('refreshgrid');
}) // end $.post()
}
else if($this_field.is('.set')) {
@@ -770,16 +807,21 @@ $(document).ready(function() {
}
$.post('sql.php', post_params, function(data) {
- $this_field.append(data.select);
+ $this_field_span.append(data.select);
$this_field.data('original_data', data_value);
+ $("#sqlqueryresults").trigger('refreshgrid');
}) // end $.post()
}
else if($this_field.is('.null')) {
//handle null fields
- $this_field.append('<textarea></textarea>');
+ $this_field_span.append('<textarea></textarea>');
$this_field.data('original_data', 'NULL');
}
- })
+ });
+
+ // refresh the grid
+ $("#sqlqueryresults").trigger('refreshgrid');
+
}) // End On click, replace the current field with an input/textarea
/**
@@ -801,7 +843,7 @@ $(document).ready(function() {
* being edited
*
*/
- var $this_td = $(this).parent().parent();
+ var $this_td = $(this).parents('td');
var $test_element = ''; // to test the presence of a element
// Initialize variables
@@ -1043,10 +1085,11 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings,
$input_siblings.each(function() {
// Inline edit post has been successful.
$this_sibling = $(this);
+ $this_sibling_span = $(this).children('span');
var is_null = $this_sibling.find('input:checkbox').is(':checked');
if (is_null) {
- $this_sibling.html('NULL');
+ $this_sibling_span.html('NULL');
$this_sibling.addClass('null');
} else {
$this_sibling.removeClass('null');
@@ -1106,9 +1149,12 @@ function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings,
}
}
}
- $this_sibling.html(new_html);
+ $this_sibling_span.html(new_html);
}
})
+
+ // refresh the grid
+ $("#sqlqueryresults").trigger('refreshgrid');
}
/**
@@ -1155,6 +1201,11 @@ $(document).ready(function() {
$('.column_heading.marker').live('click', function() {
PMA_changeClassForColumn($(this), 'marked');
});
+
+ /**
+ * create resizable table
+ */
+ $("#sqlqueryresults").trigger('makegrid');
});
/*
diff --git a/js/tbl_select.js b/js/tbl_select.js
index 8115245..8d3049a 100644
--- a/js/tbl_select.js
+++ b/js/tbl_select.js
@@ -67,6 +67,7 @@ $(document).ready(function() {
// found results
$("#sqlqueryresults").html(response);
$("#sqlqueryresults").trigger('appendAnchor');
+ $("#sqlqueryresults").trigger('makegrid');
$('#tbl_search_form')
// work around for bug #3168569 - Issue on toggling the "Hide search criteria" in chrome.
.slideToggle()
diff --git a/libraries/RecentTable.class.php b/libraries/RecentTable.class.php
index ebe93f5..b42a0aa 100644
--- a/libraries/RecentTable.class.php
+++ b/libraries/RecentTable.class.php
@@ -14,7 +14,7 @@ require_once './libraries/Message.class.php';
*
* @package phpMyAdmin
*/
-class RecentTable
+class PMA_RecentTable
{
/**
* Defines the internal PMA table which contains recent tables.
@@ -33,9 +33,9 @@ class RecentTable
public $tables;
/**
- * RecentTable instance.
+ * PMA_RecentTable instance.
*
- * @var RecentTable
+ * @var PMA_RecentTable
*/
private static $_instance;
@@ -56,12 +56,12 @@ class RecentTable
/**
* Returns class instance.
*
- * @return RecentTable
+ * @return PMA_RecentTable
*/
public static function getInstance()
{
if (is_null(self::$_instance)) {
- self::$_instance = new RecentTable();
+ self::$_instance = new PMA_RecentTable();
}
return self::$_instance;
}
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index c73eb31..cfc28d6 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -12,9 +12,10 @@
class PMA_Table
{
/**
- * UI preferences property: sorted column
+ * UI preferences properties
*/
const PROP_SORTED_COLUMN = 'sorted_col';
+ const PROP_COLUMN_ORDER = 'col_order';
static $cache = array();
@@ -1196,6 +1197,27 @@ class PMA_Table
}
/**
+ * Get all columns
+ *
+ * returns an array with all columns
+ *
+ * @param boolean whether to quote name with backticks ``
+ * @return array
+ */
+ public function getColumns($backquoted = true)
+ {
+ $sql = 'SHOW COLUMNS FROM ' . $this->getFullName(true);
+ $indexed = PMA_DBI_fetch_result($sql, 'Field', 'Field');
+
+ $return = array();
+ foreach ($indexed as $column) {
+ $return[] = $this->getFullName($backquoted) . '.' . ($backquoted ? PMA_backquote($column) : $column);
+ }
+
+ return $return;
+ }
+
+ /**
* Return UI preferences for this table from phpMyAdmin database.
*
* @uses PMA_query_as_controluser()
@@ -1276,25 +1298,11 @@ class PMA_Table
}
/**
- * Get UI preferences array for this table.
- * If pmadb and table_uiprefs is set, it will get the UI preferences from
- * phpMyAdmin database.
- *
- * @return array
- */
- public function getUiPrefs()
- {
- if (! isset($this->uiprefs)) {
- $this->loadUiPrefs();
- }
- return $this->uiprefs;
- }
-
- /**
* Get a property from UI preferences.
* Return false if the property is not found.
* Available property:
* - PROP_SORTED_COLUMN
+ * - PROP_COLUMN_ORDER
*
* @uses loadUiPrefs()
*
@@ -1306,6 +1314,42 @@ class PMA_Table
if (! isset($this->uiprefs)) {
$this->loadUiPrefs();
}
+ // do checking based on property
+ if ($property == self::PROP_SORTED_COLUMN) {
+ if (isset($this->uiprefs[$property])) {
+ // check if the column name is exist in this table
+ $tmp = explode(' ', $this->uiprefs[$property]);
+ $colname = $tmp[0];
+ $avail_columns = $this->getColumns();
+ foreach ($avail_columns as $each_col) {
+ // check if $each_col ends with $colname
+ if (substr_compare($each_col, $colname,
+ strlen($each_col) - strlen($colname)) === 0) {
+ return $this->uiprefs[$property];
+ }
+ }
+ // remove the property, since it is not exist anymore in database
+ $this->removeUiProp(self::PROP_SORTED_COLUMN);
+ return false;
+ } else {
+ return false;
+ }
+ } else if ($property == self::PROP_COLUMN_ORDER) {
+ if (isset($this->uiprefs[$property])) {
+ // check if the table has not been modified
+ if (self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME') ==
+ $this->uiprefs['CREATE_TIME']) {
+ return $this->uiprefs[$property];
+ } else {
+ // remove the property, since the table has been modified
+ $this->removeUiProp(self::PROP_COLUMN_ORDER);
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ // default behaviour for other property:
return isset($this->uiprefs[$property]) ? $this->uiprefs[$property] : false;
}
@@ -1313,16 +1357,34 @@ class PMA_Table
* Set a property from UI preferences.
* If pmadb and table_uiprefs is set, it will save the UI preferences to
* phpMyAdmin database.
+ * Available property:
+ * - PROP_SORTED_COLUMN
+ * - PROP_COLUMN_ORDER
*
* @param string $property
* @param mixed $value
- * @return true|PMA_Message
+ * @param string $table_create_time Needed for PROP_COLUMN_ORDER
+ * @return boolean|PMA_Message
*/
- public function setUiProp($property, $value)
+ public function setUiProp($property, $value, $table_create_time = NULL)
{
if (! isset($this->uiprefs)) {
$this->loadUiPrefs();
}
+ // we want to save the create time if the property is PROP_COLUMN_ORDER
+ if ($property == self::PROP_COLUMN_ORDER) {
+ $curr_create_time = self::sGetStatusInfo($this->db_name, $this->name, 'CREATE_TIME');
+ if (isset($table_create_time) &&
+ $table_create_time == $curr_create_time) {
+ $this->uiprefs['CREATE_TIME'] = $curr_create_time;
+ } else {
+ // there is no $table_create_time, or
+ // supplied $table_create_time is older than current create time,
+ // so don't save
+ return false;
+ }
+ }
+ // save the value
$this->uiprefs[$property] = $value;
// check if pmadb is set
if (strlen($GLOBALS['cfg']['Server']['pmadb'])
@@ -1331,5 +1393,25 @@ class PMA_Table
}
return true;
}
+
+ /**
+ * Remove a property from UI preferences.
+ *
+ * @param string $property
+ */
+ public function removeUiProp($property)
+ {
+ if (! isset($this->uiprefs)) {
+ $this->loadUiPrefs();
+ }
+ if (isset($this->uiprefs[$property])) {
+ unset($this->uiprefs[$property]);
+ // check if pmadb is set
+ if (strlen($GLOBALS['cfg']['Server']['pmadb'])
+ && strlen($GLOBALS['cfg']['Server']['table_uiprefs'])) {
+ return $this->saveUiprefsToDb();
+ }
+ }
+ }
}
?>
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 037656e..d2c8249 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1032,6 +1032,22 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
// Analyze it
if (isset($parsed_sql)) {
$analyzed_display_query = PMA_SQP_analyze($parsed_sql);
+
+ // Same as below (append LIMIT), append the remembered ORDER BY
+ if ($GLOBALS['cfg']['RememberSorting']
+ && isset($analyzed_display_query[0]['queryflags']['select_from'])
+ && isset($GLOBALS['sql_order_to_append'])) {
+ $query_base = $analyzed_display_query[0]['section_before_limit']
+ . "\n" . $GLOBALS['sql_order_to_append']
+ . $analyzed_display_query[0]['section_after_limit'];
+
+ // Need to reparse query
+ $parsed_sql = PMA_SQP_parse($query_base);
+ // update the $analyzed_display_query
+ $analyzed_display_query[0]['section_before_limit'] .= $GLOBALS['sql_order_to_append'];
+ $analyzed_display_query[0]['order_by_clause'] = $GLOBALS['sorted_col'];
+ }
+
// Here we append the LIMIT added for navigation, to
// enable its display. Adding it higher in the code
// to $sql_query would create a problem when
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 26d362d..84e6f7b 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -185,6 +185,25 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
/**
+ * Return true if we are executing a query in the form of
+ * "SELECT * FROM <a table> ..."
+ *
+ * @return boolean
+ */
+function PMA_isSelect()
+{
+ // global variables set from sql.php
+ global $is_count, $is_export, $is_func, $is_analyse;
+ global $analyzed_sql;
+
+ return ! ($is_count || $is_export || $is_func || $is_analyse)
+ && count($analyzed_sql[0]['select_expr']) == 0
+ && isset($analyzed_sql[0]['queryflags']['select_from'])
+ && count($analyzed_sql[0]['table_ref']) == 1;
+}
+
+
+/**
* Displays a navigation button
*
* @uses $GLOBALS['cfg']['NavigationBarIconic']
@@ -374,6 +393,26 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
);
} // end move toward
?>
+ <td>
+ <input class="restore_column hide" type="submit" value="<?php echo __('Restore column order'); ?>" />
+ <?php
+ if (PMA_isSelect()) {
+ // generate the column order, if it is set
+ $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
+ $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
+ if ($col_order) {
+ echo '<input id="col_order" type="hidden" value="' . implode(',', $col_order) . '" />';
+ }
+ // generate table create time
+ echo '<input id="table_create_time" type="hidden" value="' .
+ PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], 'CREATE_TIME') . '" />';
+ }
+ // generate hints
+ echo '<input id="col_order_hint" type="hidden" value="' . __('Drag to reorder') . '" />';
+ echo '<input id="sort_hint" type="hidden" value="' . __('Click to sort') . '" />';
+ echo '<input id="col_mark_hint" type="hidden" value="' . __('Click to mark/unmark') . '" />';
+ ?>
+ </td>
</tr>
</table>
@@ -695,7 +734,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// ... elseif display an empty column if the actions links are disabled to match the rest of the table
elseif ($GLOBALS['cfg']['RowActionLinks'] == 'none' && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
- echo '<td></td>';
+ echo '<th></th>';
}
// 2. Displays the fields' name
@@ -735,7 +774,17 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
}
}
- for ($i = 0; $i < $fields_cnt; $i++) {
+ if (PMA_isSelect()) {
+ // prepare to get the column order, if available
+ $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
+ $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
+ } else {
+ $col_order = false;
+ }
+
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ // assign $i with appropriate column order
+ $i = $col_order ? $col_order[$j] : $j;
// See if this column should get highlight because it's used in the
// where-query.
if (isset($highlight_columns[$fields_meta[$i]->name]) || isset($highlight_columns[PMA_backquote($fields_meta[$i]->name)])) {
@@ -870,6 +919,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo '<th';
$th_class = array();
+ $th_class[] = 'draggable';
if ($condition_field) {
$th_class[] = 'condition';
}
@@ -888,7 +938,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
echo '>' . $order_link . $comments . '</th>';
}
$vertical_display['desc'][] = ' <th '
- . ($condition_field ? ' class="condition"' : '') . '>' . "\n"
+ . 'class="draggable' . ($condition_field ? ' condition' : '') . '">' . "\n"
. $order_link . $comments . ' </th>' . "\n";
} // end if (2.1)
@@ -897,9 +947,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo '<th';
+ $th_class = array();
+ $th_class[] = 'draggable';
if ($condition_field) {
- echo ' class="condition"';
+ $th_class[] = 'condition';
}
+ echo ' class="' . implode(' ', $th_class) . '"';
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
echo ' valign="bottom"';
}
@@ -917,7 +970,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
echo "\n" . $comments . '</th>';
}
$vertical_display['desc'][] = ' <th '
- . ($condition_field ? ' class="condition"' : '') . '>' . "\n"
+ . 'class="draggable' . ($condition_field ? ' condition"' : '') . '">' . "\n"
. ' ' . htmlspecialchars($fields_meta[$i]->name) . "\n"
. $comments . ' </th>';
} // end else (2.2)
@@ -1150,6 +1203,8 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
if ($vertical_display['emptypre'] > 0) {
echo ' <th colspan="' . $vertical_display['emptypre'] . '">' . "\n"
.' </th>' . "\n";
+ } else if ($GLOBALS['cfg']['RowActionLinks'] == 'none') {
+ echo ' <th></th>' . "\n";
}
foreach ($vertical_display['desc'] as $val) {
@@ -1285,7 +1340,19 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
} // end if (1)
// 2. Displays the rows' values
- for ($i = 0; $i < $fields_cnt; ++$i) {
+
+ if (PMA_isSelect()) {
+ // prepare to get the column order, if available
+ $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
+ $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
+ } else {
+ $col_order = false;
+ }
+
+ for ($j = 0; $j < $fields_cnt; ++$j) {
+ // assign $i with appropriate column order
+ $i = $col_order ? $col_order[$j] : $j;
+
$meta = $fields_meta[$i];
$not_null_class = $meta->not_null ? 'not_null' : '';
$relation_class = isset($map[$meta->name]) ? 'relation' : '';
@@ -1652,8 +1719,18 @@ function PMA_displayVerticalTable()
echo '</tr>' . "\n";
} // end if
+ if (PMA_isSelect()) {
+ // prepare to get the column order, if available
+ $pmatable = new PMA_Table($GLOBALS['table'], $GLOBALS['db']);
+ $col_order = $pmatable->getUiProp(PMA_Table::PROP_COLUMN_ORDER);
+ } else {
+ $col_order = false;
+ }
+
// Displays data
- foreach ($vertical_display['desc'] AS $key => $val) {
+ foreach ($vertical_display['desc'] AS $j => $val) {
+ // assign appropriate key with current column order
+ $key = $col_order ? $col_order[$j] : $j;
echo '<tr>' . "\n";
echo $val;
diff --git a/libraries/header.inc.php b/libraries/header.inc.php
index 4036f86..5c07472 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -19,7 +19,7 @@ require_once './libraries/RecentTable.class.php';
* @param string $table The table name
*/
function PMA_addRecentTable($db, $table) {
- $tmp_result = RecentTable::getInstance()->add($db, $table);
+ $tmp_result = PMA_RecentTable::getInstance()->add($db, $table);
if ($tmp_result === true) {
echo '<span class="hide" id="update_recent_tables"></span>';
} else {
diff --git a/navigation.php b/navigation.php
index 76f5b98..af3f138 100644
--- a/navigation.php
+++ b/navigation.php
@@ -59,7 +59,7 @@ require_once './libraries/RecentTable.class.php';
* Check if it is an ajax request to reload the recent tables list.
*/
if ($GLOBALS['is_ajax_request'] && $_REQUEST['recent_table']) {
- PMA_ajaxResponse('', true, array('options' => RecentTable::getInstance()->getHtmlSelectOption()) );
+ PMA_ajaxResponse('', true, array('options' => PMA_RecentTable::getInstance()->getHtmlSelectOption()) );
}
// keep the offset of the db list in session before closing it
@@ -195,7 +195,7 @@ require './libraries/navigation_header.inc.php';
// display recently used tables
if ($GLOBALS['cfg']['LeftRecentTable'] > 0) {
echo '<div id="recentTableList">';
- echo RecentTable::getInstance()->getHtmlSelect();
+ echo PMA_RecentTable::getInstance()->getHtmlSelect();
echo '</div>';
}
diff --git a/server_sql.php b/server_sql.php
index 243d0bf..f8609f4 100644
--- a/server_sql.php
+++ b/server_sql.php
@@ -14,6 +14,7 @@ require_once './libraries/common.inc.php';
* Does the common work
*/
$GLOBALS['js_include'][] = 'functions.js';
+$GLOBALS['js_include'][] = 'makegrid.js';
$GLOBALS['js_include'][] = 'sql.js';
require_once './libraries/server_common.inc.php';
diff --git a/sql.php b/sql.php
index e8850fb..bd3ff46 100644
--- a/sql.php
+++ b/sql.php
@@ -159,6 +159,17 @@ if(isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) {
$extra_data['select'] = $select;
PMA_ajaxResponse(NULL, true, $extra_data);
}
+
+/**
+ * Check ajax request to set the column order
+ */
+if(isset($_REQUEST['set_col_order']) && $_REQUEST['set_col_order'] == true) {
+ $pmatable = new PMA_Table($table, $db);
+ $col_order = explode(',', $_REQUEST['col_order']);
+ $retval = $pmatable->setUiProp(PMA_Table::PROP_COLUMN_ORDER, $col_order, $_REQUEST['table_create_time']);
+ PMA_ajaxResponse(NULL, ($retval == true));
+}
+
// Default to browse if no query set and we have table
// (needed for browsing from DefaultTabTable)
if (empty($sql_query) && strlen($table) && strlen($db)) {
@@ -363,10 +374,13 @@ if ($is_select) { // see line 141
$is_maint = true;
}
+// assign default full_sql_query
+$full_sql_query = $sql_query;
+
// Handle remembered sorting order, only for single table query
if ($GLOBALS['cfg']['RememberSorting']
- && basename($GLOBALS['PMA_PHP_SELF']) == 'sql.php'
&& ! ($is_count || $is_export || $is_func || $is_analyse)
+ && count($analyzed_sql[0]['select_expr']) == 0
&& isset($analyzed_sql[0]['queryflags']['select_from'])
&& count($analyzed_sql[0]['table_ref']) == 1
) {
@@ -376,7 +390,7 @@ if ($GLOBALS['cfg']['RememberSorting']
if ($sorted_col) {
// retrieve the remembered sorting order for current table
$sql_order_to_append = ' ORDER BY ' . $sorted_col . ' ';
- $sql_query = $analyzed_sql[0]['section_before_limit'] . $sql_order_to_append . $analyzed_sql[0]['section_after_limit'];
+ $full_sql_query = $analyzed_sql[0]['section_before_limit'] . $sql_order_to_append . $analyzed_sql[0]['section_after_limit'];
// update the $analyzed_sql
$analyzed_sql[0]['section_before_limit'] .= $sql_order_to_append;
@@ -412,9 +426,7 @@ if ((! $cfg['ShowAll'] || $_SESSION['tmp_user_values']['max_rows'] != 'all')
}
}
-} else {
- $full_sql_query = $sql_query;
-} // end if...else
+}
if (strlen($db)) {
PMA_DBI_select_db($db);
@@ -846,6 +858,7 @@ else {
} else {
$GLOBALS['js_include'][] = 'functions.js';
+ $GLOBALS['js_include'][] = 'makegrid.js';
$GLOBALS['js_include'][] = 'sql.js';
unset($message);
diff --git a/tbl_replace.php b/tbl_replace.php
index 5b722c6..d23482e 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -65,6 +65,7 @@ PMA_DBI_select_db($GLOBALS['db']);
*/
$goto_include = false;
+$GLOBALS['js_include'][] = 'makegrid.js';
// Needed for generation of Inline Edit anchors
$GLOBALS['js_include'][] = 'sql.js';
diff --git a/tbl_select.php b/tbl_select.php
index 681083a..875182d 100644
--- a/tbl_select.php
+++ b/tbl_select.php
@@ -16,6 +16,7 @@
require_once './libraries/common.inc.php';
require_once './libraries/mysql_charsets.lib.php';
+$GLOBALS['js_include'][] = 'makegrid.js';
$GLOBALS['js_include'][] = 'sql.js';
$GLOBALS['js_include'][] = 'tbl_select.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
diff --git a/tbl_sql.php b/tbl_sql.php
index 70fafc1..0321395 100644
--- a/tbl_sql.php
+++ b/tbl_sql.php
@@ -14,6 +14,7 @@ require_once './libraries/common.inc.php';
* Runs common work
*/
$GLOBALS['js_include'][] = 'functions.js';
+$GLOBALS['js_include'][] = 'makegrid.js';
$GLOBALS['js_include'][] = 'sql.js';
require './libraries/tbl_common.php';
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 94ed5fe..72dec00 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1913,3 +1913,68 @@ span.mysql-separator {
span.mysql-number {
color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>;
}
+
+.colborder {
+ border-right: solid 1px #FFFFFF;
+ cursor: col-resize;
+ height: 100%;
+ margin-left: -3px;
+ position: absolute;
+ width: 5px;
+}
+
+.pma_table th.draggable span, .pma_table tbody td span {
+ display: block;
+ overflow: hidden;
+}
+
+.cRsz {
+ position: absolute;
+}
+
+.draggable {
+ cursor: move;
+}
+
+.cCpy {
+ background: #000;
+ color: #FFF;
+ font-weight: bold;
+ margin: 0.1em;
+ padding: 0.3em;
+ position: absolute;
+}
+
+.cPointer {
+ background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer.png);
+ height: 20px;
+ margin-left: -5px; /* must be minus half of its width */
+ margin-top: -10px;
+ position: absolute;
+ width: 10px;
+}
+
+.cPointerVer { /* cPointer with vertical display mode */
+ background: url(<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>col_pointer_ver.png);
+ height: 10px;
+ margin-left: -5px;
+ margin-top: -5px; /* must be minus half of its height */
+ position: absolute;
+ width: 20px;
+}
+
+.dHint {
+ background: #333;
+ border:1px solid #000;
+ color: #FFF;
+ font-size: 0.8em;
+ font-weight: bold;
+ margin-top: -1em;
+ opacity: 0.8;
+ padding: 0.5em 1em;
+ position: absolute;
+ text-shadow: -1px -1px #000;
+ -moz-border-radius: 0.3em;
+ -webkit-border-radius: 0.3em;
+ border-radius: 0.3em;
+}
diff --git a/themes/original/img/col_pointer.png b/themes/original/img/col_pointer.png
new file mode 100644
index 0000000..7126aef
Binary files /dev/null and b/themes/original/img/col_pointer.png differ
diff --git a/themes/original/img/col_pointer_ver.png b/themes/original/img/col_pointer_ver.png
new file mode 100644
index 0000000..4607912
Binary files /dev/null and b/themes/original/img/col_pointer_ver.png differ
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index c403698..3c9d951 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -2269,3 +2269,72 @@ span.mysql-separator {
span.mysql-number {
color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>;
}
+
+.colborder {
+ border-left: 1px solid #FFF;
+ cursor: col-resize;
+ height: 100%;
+ margin-left: -1px;
+ position: absolute;
+ width: 5px;
+}
+
+.pma_table th.draggable span, .pma_table tbody td span {
+ display: block;
+ overflow: hidden;
+}
+
+.cRsz {
+ position: absolute;
+}
+
+.cCpy {
+ background: #333;
+ color: #FFF;
+ font-weight: bold;
+ margin: 0.1em;
+ padding: 0.3em;
+ position: absolute;
+ text-shadow: -1px -1px #000;
+
+ -moz-box-shadow: 0 0 0.7em #000;
+ -webkit-box-shadow: 0 0 0.7em #000;
+ box-shadow: 0 0 0.7em #000;
+ -moz-border-radius: 0.3em;
+ -webkit-border-radius: 0.3em;
+ border-radius: 0.3em;
+}
+
+.cPointer {
+ background: url(./themes/pmahomme/img/col_pointer.png);
+ height: 20px;
+ margin-left: -5px; /* must be minus half of its width */
+ margin-top: -10px;
+ position: absolute;
+ width: 10px;
+}
+
+.cPointerVer { /* cPointer with vertical display mode */
+ background: url(./themes/pmahomme/img/col_pointer_ver.png);
+ height: 10px;
+ margin-left: -5px;
+ margin-top: -5px; /* must be minus half of its height */
+ position: absolute;
+ width: 20px;
+}
+
+.dHint {
+ background: #333;
+ border:1px solid #000;
+ color: #FFF;
+ font-size: 0.8em;
+ font-weight: bold;
+ margin-top: -1em;
+ opacity: 0.8;
+ padding: 0.5em 1em;
+ position: absolute;
+ text-shadow: -1px -1px #000;
+ -moz-border-radius: 0.3em;
+ -webkit-border-radius: 0.3em;
+ border-radius: 0.3em;
+}
diff --git a/themes/pmahomme/img/col_pointer.png b/themes/pmahomme/img/col_pointer.png
new file mode 100644
index 0000000..8882a2e
Binary files /dev/null and b/themes/pmahomme/img/col_pointer.png differ
diff --git a/themes/pmahomme/img/col_pointer_ver.png b/themes/pmahomme/img/col_pointer_ver.png
new file mode 100644
index 0000000..8964754
Binary files /dev/null and b/themes/pmahomme/img/col_pointer_ver.png differ
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3565-g551cc9a
by Michal Čihař 15 Jun '11
by Michal Čihař 15 Jun '11
15 Jun '11
The branch, master has been updated
via 551cc9a465269ab1208438d81fc0d492ce797366 (commit)
via ba8e434a99e88ff84db5e391004b13df3de6f063 (commit)
via 0d7c2195ffed20f90f516fd0662d2e166f55aba6 (commit)
via 6faabf70f4c95cc0733c6f7abe43701f6b04ae48 (commit)
via 1f6f14a4ef1603ddc9c724d29a32b55f2ed40f7d (commit)
via e122e5ac70e939febb457d2445dcd1c7d0942340 (commit)
via 7ff287e1e045fabd9eb504d90de02634807d3424 (commit)
via 2b949e99d7aebe454280c4fab445afceee30ce39 (commit)
via 95c60e193d8a431712844871fa54edfeaedf8536 (commit)
via 60a2f965929ec35e82f4183265bd2f82e3a6a1af (commit)
via 2ad26bcc604daa46104952f57a3bf4a6a59d8ba2 (commit)
via 45330faa592c05fd6a20a90ea898baf580f9d84d (commit)
via bd731759a7339c7c5256630511da9f9dc1ad20c0 (commit)
via 139ac496c181950dea2ef2b032d718098a6e8db6 (commit)
via 11b8a407f35888c4a1f6b4f4bbef889ea868a5f7 (commit)
via 75bc5fc24a13d7743f8853265c94b10c044d01d1 (commit)
via 7d4841df4951193fd75e1d92df6c8b182f426d97 (commit)
via c4992e568cdc06c1a543a916bc3f021ebe884413 (commit)
via 6544f5f9e78db8b4364589b8cdbe2a80df609bc3 (commit)
via 50ae4412950b96b86562a02c4c8552611453dabd (commit)
via 3a2fd218fcd8c942a7b11188ad147d2e45a4ac0c (commit)
via 7cb695d5020d9b555b19fea60b0f92c2b880ccf0 (commit)
via 972be216dd261f2bc4ccf9a5fd2304936a9fff92 (commit)
via 9179fde0a587b5c722edcbea3a2c35ce60f56a95 (commit)
via 8c0a294dc5acc3fc2926b97706d518504d54b205 (commit)
via e8b26f8e5d11a56e5805c5d48fa79bfb368fce6d (commit)
via 4a09e17af3f1220a36dac61c3b578f9a925bb1b7 (commit)
via 60ad158b0451c3347e5a8813cc39099b40e78b1f (commit)
via fb91a17704339395c51d2027eef6b6ef5de7fc04 (commit)
via 9943ef0275b2f0e880680c4c166fd33f5048b874 (commit)
via 22e8102e3212045c0ab1718d52e69be0fdeebe34 (commit)
via f8dd706ad38113afe6291524f01b8b5e4cd9e8c5 (commit)
via 05235672e67e5856aa688adaeabc97b3780c02ae (commit)
via 2216824c900d18b5f39058c1e97a9b56d4309c99 (commit)
via a3510734b18cf12a77cedabceb76258539565e75 (commit)
via 9409b76db65fd5ab13a71e2d765cbf13c44b49c1 (commit)
from 25dc50a5dd8a69f435272d37f7febafffc1d0ff0 (commit)
- Log -----------------------------------------------------------------
commit 551cc9a465269ab1208438d81fc0d492ce797366
Merge: ba8e434a99e88ff84db5e391004b13df3de6f063 0d7c2195ffed20f90f516fd0662d2e166f55aba6
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 07:50:05 2011 +0200
Merge remote-tracking branch 'pootle/master'
commit ba8e434a99e88ff84db5e391004b13df3de6f063
Merge: 25dc50a5dd8a69f435272d37f7febafffc1d0ff0 2216824c900d18b5f39058c1e97a9b56d4309c99
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 15 07:49:56 2011 +0200
Merge remote-tracking branch 'tyron/master'
Conflicts:
server_status.php
commit 0d7c2195ffed20f90f516fd0662d2e166f55aba6
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:52 2011 +0200
Translation update done using Pootle.
commit 6faabf70f4c95cc0733c6f7abe43701f6b04ae48
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:44 2011 +0200
Translation update done using Pootle.
commit 1f6f14a4ef1603ddc9c724d29a32b55f2ed40f7d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:36 2011 +0200
Translation update done using Pootle.
commit e122e5ac70e939febb457d2445dcd1c7d0942340
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:22 2011 +0200
Translation update done using Pootle.
commit 7ff287e1e045fabd9eb504d90de02634807d3424
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:12 2011 +0200
Translation update done using Pootle.
commit 2b949e99d7aebe454280c4fab445afceee30ce39
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:35:04 2011 +0200
Translation update done using Pootle.
commit 95c60e193d8a431712844871fa54edfeaedf8536
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:55 2011 +0200
Translation update done using Pootle.
commit 60a2f965929ec35e82f4183265bd2f82e3a6a1af
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:49 2011 +0200
Translation update done using Pootle.
commit 2ad26bcc604daa46104952f57a3bf4a6a59d8ba2
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:40 2011 +0200
Translation update done using Pootle.
commit 45330faa592c05fd6a20a90ea898baf580f9d84d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:31 2011 +0200
Translation update done using Pootle.
commit bd731759a7339c7c5256630511da9f9dc1ad20c0
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:20 2011 +0200
Translation update done using Pootle.
commit 139ac496c181950dea2ef2b032d718098a6e8db6
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:34:10 2011 +0200
Translation update done using Pootle.
commit 11b8a407f35888c4a1f6b4f4bbef889ea868a5f7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:58 2011 +0200
Translation update done using Pootle.
commit 75bc5fc24a13d7743f8853265c94b10c044d01d1
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:46 2011 +0200
Translation update done using Pootle.
commit 7d4841df4951193fd75e1d92df6c8b182f426d97
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:37 2011 +0200
Translation update done using Pootle.
commit c4992e568cdc06c1a543a916bc3f021ebe884413
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:28 2011 +0200
Translation update done using Pootle.
commit 6544f5f9e78db8b4364589b8cdbe2a80df609bc3
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:15 2011 +0200
Translation update done using Pootle.
commit 50ae4412950b96b86562a02c4c8552611453dabd
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:33:06 2011 +0200
Translation update done using Pootle.
commit 3a2fd218fcd8c942a7b11188ad147d2e45a4ac0c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:32:52 2011 +0200
Translation update done using Pootle.
commit 7cb695d5020d9b555b19fea60b0f92c2b880ccf0
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:32:40 2011 +0200
Translation update done using Pootle.
commit 972be216dd261f2bc4ccf9a5fd2304936a9fff92
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:32:26 2011 +0200
Translation update done using Pootle.
commit 9179fde0a587b5c722edcbea3a2c35ce60f56a95
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:32:18 2011 +0200
Translation update done using Pootle.
commit 8c0a294dc5acc3fc2926b97706d518504d54b205
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:32:07 2011 +0200
Translation update done using Pootle.
commit e8b26f8e5d11a56e5805c5d48fa79bfb368fce6d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:57 2011 +0200
Translation update done using Pootle.
commit 4a09e17af3f1220a36dac61c3b578f9a925bb1b7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:46 2011 +0200
Translation update done using Pootle.
commit 60ad158b0451c3347e5a8813cc39099b40e78b1f
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:38 2011 +0200
Translation update done using Pootle.
commit fb91a17704339395c51d2027eef6b6ef5de7fc04
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:23 2011 +0200
Translation update done using Pootle.
commit 9943ef0275b2f0e880680c4c166fd33f5048b874
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:16 2011 +0200
Translation update done using Pootle.
commit 22e8102e3212045c0ab1718d52e69be0fdeebe34
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:31:06 2011 +0200
Translation update done using Pootle.
commit f8dd706ad38113afe6291524f01b8b5e4cd9e8c5
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:30:54 2011 +0200
Translation update done using Pootle.
commit 05235672e67e5856aa688adaeabc97b3780c02ae
Author: Marc Delisle <marc(a)infomarc.info>
Date: Wed Jun 15 02:30:40 2011 +0200
Translation update done using Pootle.
commit 2216824c900d18b5f39058c1e97a9b56d4309c99
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Tue Jun 14 20:55:37 2011 +0200
- Newest canvg version from trunk fixing display of hidden elements
- Some attempts to get png export working for IE8 (needs flashcanvas)
commit a3510734b18cf12a77cedabceb76258539565e75
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Tue Jun 14 17:19:40 2011 +0200
merge conflicts
commit 9409b76db65fd5ab13a71e2d765cbf13c44b49c1
Merge: d7fc94529cef1f3bbdb1ec302c2d22dcfd039112 4b73c39775b8234b66fd375aa3ac7387e945d704
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Tue Jun 14 17:16:26 2011 +0200
Merge remote-tracking branch 'origin/master'
Conflicts:
server_status.php
-----------------------------------------------------------------------
Summary of changes:
js/canvg/canvg.js | 304 ++++++++++---
js/canvg/flashcanvas.js | 1093 +++++++++++++++++++++++++++++++++++++++++++
js/canvg/flashcanvas.swf | Bin 0 -> 21235 bytes
js/highcharts/exporting.js | 4 +
js/highcharts/highcharts.js | 2 +-
po/en_GB.po | 85 ++--
server_status.php | 6 +
7 files changed, 1389 insertions(+), 105 deletions(-)
create mode 100644 js/canvg/flashcanvas.js
create mode 100644 js/canvg/flashcanvas.swf
diff --git a/js/canvg/canvg.js b/js/canvg/canvg.js
index 83c91b4..7b7e963 100644
--- a/js/canvg/canvg.js
+++ b/js/canvg/canvg.js
@@ -12,7 +12,6 @@ if(!window.console) {
window.console.dir = function(str) {};
}
-// <3 IE
if(!Array.indexOf){
Array.prototype.indexOf = function(obj){
for(var i=0; i<this.length; i++){
@@ -28,7 +27,7 @@ if(!Array.indexOf){
// canvg(target, s)
// empty parameters: replace all 'svg' elements on page with 'canvas' elements
// target: canvas element or the id of a canvas element
- // s: svg string or url to svg file
+ // s: svg string, url to svg file, or xml document
// opts: optional hash of options
// ignoreMouse: true => ignore mouse events
// ignoreAnimation: true => ignore animations
@@ -75,7 +74,11 @@ if(!Array.indexOf){
svg.opts = opts;
var ctx = target.getContext('2d');
- if (s.substr(0,1) == '<') {
+ if (typeof(s.documentElement) != 'undefined') {
+ // load from xml doc
+ svg.loadXmlDoc(ctx, s);
+ }
+ else if (s.substr(0,1) == '<') {
// load from xml string
svg.loadXml(ctx, s);
}
@@ -89,6 +92,7 @@ if(!Array.indexOf){
var svg = { };
svg.FRAMERATE = 30;
+ svg.MAX_VIRTUAL_PIXELS = 30000;
// globals
svg.init = function(ctx) {
@@ -99,6 +103,7 @@ if(!Array.indexOf){
svg.ctx = ctx;
svg.ViewPort = new (function () {
this.viewPorts = [];
+ this.Clear = function() { this.viewPorts = []; }
this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); }
this.RemoveCurrent = function() { this.viewPorts.pop(); }
this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; }
@@ -551,7 +556,7 @@ if(!Array.indexOf){
}
}
- var data = v.split(/\s(?=[a-z])/);
+ var data = svg.trim(svg.compressSpaces(v)).split(/\s(?=[a-z])/);
for (var i=0; i<data.length; i++) {
var type = data[i].split('(')[0];
var s = data[i].split('(')[1].replace(')','');
@@ -616,7 +621,7 @@ if(!Array.indexOf){
return a;
}
- // get or create style
+ // get or create style, crawls up node tree
this.style = function(name, createIfNotExists) {
var s = this.styles[name];
if (s != null) return s;
@@ -625,6 +630,14 @@ if(!Array.indexOf){
if (a != null && a.hasValue()) {
return a;
}
+
+ var p = this.parent;
+ if (p != null) {
+ var ps = p.style(name);
+ if (ps != null && ps.hasValue()) {
+ return ps;
+ }
+ }
s = new svg.Property(name, '');
if (createIfNotExists == true) this.styles[name] = s;
@@ -635,6 +648,9 @@ if(!Array.indexOf){
this.render = function(ctx) {
// don't render display=none
if (this.attribute('display').value == 'none') return;
+
+ // don't render visibility=hidden
+ if (this.attribute('visibility').value == 'hidden') return;
ctx.save();
this.setContext(ctx);
@@ -681,7 +697,7 @@ if(!Array.indexOf){
}
// add tag styles
- var styles = svg.Styles[this.type];
+ var styles = svg.Styles[node.nodeName];
if (styles != null) {
for (var name in styles) {
this.styles[name] = styles[name];
@@ -698,6 +714,12 @@ if(!Array.indexOf){
this.styles[name] = styles[name];
}
}
+ styles = svg.Styles[node.nodeName+'.'+classes[j]];
+ if (styles != null) {
+ for (var name in styles) {
+ this.styles[name] = styles[name];
+ }
+ }
}
}
@@ -856,7 +878,7 @@ if(!Array.indexOf){
var width = svg.ViewPort.width();
var height = svg.ViewPort.height();
- if (this.attribute('width').hasValue() && this.attribute('height').hasValue()) {
+ if (typeof(this.root) == 'undefined' && this.attribute('width').hasValue() && this.attribute('height').hasValue()) {
width = this.attribute('width').Length.toPixels('x');
height = this.attribute('height').Length.toPixels('y');
@@ -1186,9 +1208,6 @@ if(!Array.indexOf){
pp.reset();
var bb = new svg.BoundingBox();
-
- if(this.attribute('visibility').value=='hidden') return;
-
if (ctx != null) ctx.beginPath();
while (!pp.isEnd()) {
pp.nextCommand();
@@ -1469,6 +1488,37 @@ if(!Array.indexOf){
for (var i=0; i<stopsContainer.stops.length; i++) {
g.addColorStop(stopsContainer.stops[i].offset, stopsContainer.stops[i].color);
}
+
+ if (this.attribute('gradientTransform').hasValue()) {
+ // render as transformed pattern on temporary canvas
+ var rootView = svg.ViewPort.viewPorts[0];
+
+ var rect = new svg.Element.rect();
+ rect.attributes['x'] = new svg.Property('x', -svg.MAX_VIRTUAL_PIXELS/3.0);
+ rect.attributes['y'] = new svg.Property('y', -svg.MAX_VIRTUAL_PIXELS/3.0);
+ rect.attributes['width'] = new svg.Property('width', svg.MAX_VIRTUAL_PIXELS);
+ rect.attributes['height'] = new svg.Property('height', svg.MAX_VIRTUAL_PIXELS);
+
+ var group = new svg.Element.g();
+ group.attributes['transform'] = new svg.Property('transform', this.attribute('gradientTransform').value);
+ group.children = [ rect ];
+
+ var tempSvg = new svg.Element.svg();
+ tempSvg.attributes['x'] = new svg.Property('x', 0);
+ tempSvg.attributes['y'] = new svg.Property('y', 0);
+ tempSvg.attributes['width'] = new svg.Property('width', rootView.width);
+ tempSvg.attributes['height'] = new svg.Property('height', rootView.height);
+ tempSvg.children = [ group ];
+
+ var c = document.createElement('canvas');
+ c.width = rootView.width;
+ c.height = rootView.height;
+ var tempCtx = c.getContext('2d');
+ tempCtx.fillStyle = g;
+ tempSvg.render(tempCtx);
+ return tempCtx.createPattern(c, 'no-repeat');
+ }
+
return g;
}
}
@@ -1494,16 +1544,8 @@ if(!Array.indexOf){
var y2 = (this.gradientUnits == 'objectBoundingBox'
? bb.y() + bb.height() * this.attribute('y2').numValue()
: this.attribute('y2').Length.toPixels('y'));
-
- var p1 = new svg.Point(x1, y1);
- var p2 = new svg.Point(x2, y2);
- if (this.attribute('gradientTransform').hasValue()) {
- var transform = new svg.Transform(this.attribute('gradientTransform').value);
- transform.applyToPoint(p1);
- transform.applyToPoint(p2);
- }
-
- return ctx.createLinearGradient(p1.x, p1.y, p2.x, p2.y);
+
+ return ctx.createLinearGradient(x1, y1, x2, y2);
}
}
svg.Element.linearGradient.prototype = new svg.Element.GradientBase;
@@ -1540,22 +1582,7 @@ if(!Array.indexOf){
? (bb.width() + bb.height()) / 2.0 * this.attribute('r').numValue()
: this.attribute('r').Length.toPixels());
- var c = new svg.Point(cx, cy);
- var f = new svg.Point(fx, fy);
- if (this.attribute('gradientTransform').hasValue()) {
- var transform = new svg.Transform(this.attribute('gradientTransform').value);
- transform.applyToPoint(c);
- transform.applyToPoint(f);
-
- for (var i=0; i<transform.transforms.length; i++) {
- // average the scaling part of the transform, apply to radius
- var scale1 = transform.transforms[i].m[0];
- var scale2 = transform.transforms[i].m[3];
- r = r * ((scale1 + scale2) / 2.0);
- }
- }
-
- return ctx.createRadialGradient(f.x, f.y, 0, c.x, c.y, r);
+ return ctx.createRadialGradient(fx, fy, 0, cx, cy, r);
}
}
svg.Element.radialGradient.prototype = new svg.Element.GradientBase;
@@ -1693,6 +1720,73 @@ if(!Array.indexOf){
}
svg.Element.animateTransform.prototype = new svg.Element.animate;
+ // font element
+ svg.Element.font = function(node) {
+ this.base = svg.Element.ElementBase;
+ this.base(node);
+
+ this.horizAdvX = this.attribute('horiz-adv-x').numValue();
+
+ this.isRTL = false;
+ this.isArabic = false;
+ this.fontFace = null;
+ this.missingGlyph = null;
+ this.glyphs = [];
+ for (var i=0; i<this.children.length; i++) {
+ var child = this.children[i];
+ if (child.type == 'font-face') {
+ this.fontFace = child;
+ if (child.style('font-family').hasValue()) {
+ svg.Definitions[child.style('font-family').value] = this;
+ }
+ }
+ else if (child.type == 'missing-glyph') this.missingGlyph = child;
+ else if (child.type == 'glyph') {
+ if (child.arabicForm != '') {
+ this.isRTL = true;
+ this.isArabic = true;
+ if (typeof(this.glyphs[child.unicode]) == 'undefined') this.glyphs[child.unicode] = [];
+ this.glyphs[child.unicode][child.arabicForm] = child;
+ }
+ else {
+ this.glyphs[child.unicode] = child;
+ }
+ }
+ }
+ }
+ svg.Element.font.prototype = new svg.Element.ElementBase;
+
+ // font-face element
+ svg.Element.fontface = function(node) {
+ this.base = svg.Element.ElementBase;
+ this.base(node);
+
+ this.ascent = this.attribute('ascent').value;
+ this.descent = this.attribute('descent').value;
+ this.unitsPerEm = this.attribute('units-per-em').numValue();
+ }
+ svg.Element.fontface.prototype = new svg.Element.ElementBase;
+
+ // missing-glyph element
+ svg.Element.missingglyph = function(node) {
+ this.base = svg.Element.path;
+ this.base(node);
+
+ this.horizAdvX = 0;
+ }
+ svg.Element.missingglyph.prototype = new svg.Element.path;
+
+ // glyph element
+ svg.Element.glyph = function(node) {
+ this.base = svg.Element.path;
+ this.base(node);
+
+ this.horizAdvX = this.attribute('horiz-adv-x').numValue();
+ this.unicode = this.attribute('unicode').value;
+ this.arabicForm = this.attribute('arabic-form').value;
+ }
+ svg.Element.glyph.prototype = new svg.Element.path;
+
// text element
svg.Element.text = function(node) {
this.base = svg.Element.RenderedElementBase;
@@ -1715,19 +1809,16 @@ if(!Array.indexOf){
this.baseSetContext = this.setContext;
this.setContext = function(ctx) {
this.baseSetContext(ctx);
- if (this.attribute('text-anchor').hasValue()) {
- var textAnchor = this.attribute('text-anchor').value;
+ if (this.style('text-anchor').hasValue()) {
+ var textAnchor = this.style('text-anchor').value;
ctx.textAlign = textAnchor == 'middle' ? 'center' : textAnchor;
}
if (this.attribute('alignment-baseline').hasValue()) ctx.textBaseline = this.attribute('alignment-baseline').value;
}
this.renderChildren = function(ctx) {
- if(this.attribute('visibility').value=='hidden') return;
-
var x = this.attribute('x').Length.toPixels('x');
var y = this.attribute('y').Length.toPixels('y');
-
for (var i=0; i<this.children.length; i++) {
var child = this.children[i];
@@ -1759,8 +1850,63 @@ if(!Array.indexOf){
this.base = svg.Element.RenderedElementBase;
this.base(node);
+ this.getGlyph = function(font, text, i) {
+ var c = text[i];
+ var glyph = null;
+ if (font.isArabic) {
+ var arabicForm = 'isolated';
+ if ((i==0 || text[i-1]==' ') && i<text.length-2 && text[i+1]!=' ') arabicForm = 'terminal';
+ if (i>0 && text[i-1]!=' ' && i<text.length-2 && text[i+1]!=' ') arabicForm = 'medial';
+ if (i>0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial';
+ if (typeof(font.glyphs[c]) != 'undefined') {
+ glyph = font.glyphs[c][arabicForm];
+ if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c];
+ }
+ }
+ else {
+ glyph = font.glyphs[c];
+ }
+ if (glyph == null) glyph = font.missingGlyph;
+ return glyph;
+ }
+
this.renderChildren = function(ctx) {
- ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
+ var customFont = this.parent.style('font-family').Definition.getDefinition();
+ if (customFont != null) {
+ var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
+ var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle);
+ var text = this.getText();
+ if (customFont.isRTL) text = text.split("").reverse().join("");
+
+ if (this.parent.style('text-anchor').value == 'middle') {
+ this.x = this.x - this.measureText(ctx) / 2.0;
+ }
+
+ var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
+ for (var i=0; i<text.length; i++) {
+ var glyph = this.getGlyph(customFont, text, i);
+ var scale = fontSize / customFont.fontFace.unitsPerEm;
+ ctx.translate(this.x, this.y);
+ ctx.scale(scale, -scale);
+ var lw = ctx.lineWidth;
+ ctx.lineWidth = ctx.lineWidth * customFont.fontFace.unitsPerEm / fontSize;
+ if (fontStyle == 'italic') ctx.transform(1, 0, .4, 1, 0, 0);
+ glyph.render(ctx);
+ if (fontStyle == 'italic') ctx.transform(1, 0, -.4, 1, 0, 0);
+ ctx.lineWidth = lw;
+ ctx.scale(1/scale, -1/scale);
+ ctx.translate(-this.x, -this.y);
+
+ this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / customFont.fontFace.unitsPerEm;
+ if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
+ this.x += dx[i];
+ }
+ }
+ return;
+ }
+
+ if (ctx.strokeStyle != '') ctx.strokeText(svg.compressSpaces(this.getText()), this.x, this.y);
+ if (ctx.fillStyle != '') ctx.fillText(svg.compressSpaces(this.getText()), this.x, this.y);
}
this.getText = function() {
@@ -1768,6 +1914,23 @@ if(!Array.indexOf){
}
this.measureText = function(ctx) {
+ var customFont = this.parent.style('font-family').Definition.getDefinition();
+ if (customFont != null) {
+ var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize);
+ var measure = 0;
+ var text = this.getText();
+ if (customFont.isRTL) text = text.split("").reverse().join("");
+ var dx = svg.ToNumberArray(this.parent.attribute('dx').value);
+ for (var i=0; i<text.length; i++) {
+ var glyph = this.getGlyph(customFont, text, i);
+ measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;
+ if (typeof(dx[i]) != 'undefined' && !isNaN(dx[i])) {
+ measure += dx[i];
+ }
+ }
+ return measure;
+ }
+
var textToMeasure = svg.compressSpaces(this.getText());
if (!ctx.measureText) return textToMeasure.length * 10;
return ctx.measureText(textToMeasure).width;
@@ -1780,8 +1943,9 @@ if(!Array.indexOf){
this.base = svg.Element.TextElementBase;
this.base(node);
- // TEXT ELEMENT
- this.text = node.nodeType == 3 ? node.nodeValue : node.childNodes[0].nodeValue;
+ this.text = node.nodeType == 3 ? node.nodeValue : // text
+ node.childNodes.length > 0 ? node.childNodes[0].nodeValue : // element
+ node.text;
this.getText = function() {
return this.text;
}
@@ -1931,8 +2095,9 @@ if(!Array.indexOf){
this.base = svg.Element.ElementBase;
this.base(node);
- var css = node.childNodes[0].nodeValue;
- css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(\/\/.*)/gm, ''); // remove comments
+ // text, or spaces then CDATA
+ var css = node.childNodes[0].nodeValue + (node.childNodes.length > 1 ? node.childNodes[1].nodeValue : '');
+ css = css.replace(/(\/\*([^*]|[\r\n]|(\*+([^*\/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm, ''); // remove comments
css = svg.compressSpaces(css); // replace whitespace
var cssDefs = css.split('}');
for (var i=0; i<cssDefs.length; i++) {
@@ -1945,14 +2110,31 @@ if(!Array.indexOf){
if (cssClass != '') {
var props = {};
for (var k=0; k<cssProps.length; k++) {
- var prop = cssProps[k].split(':');
- var name = prop[0];
- var value = prop[1];
+ var prop = cssProps[k].indexOf(':');
+ var name = cssProps[k].substr(0, prop);
+ var value = cssProps[k].substr(prop + 1, cssProps[k].length - prop);
if (name != null && value != null) {
- props[svg.trim(prop[0])] = new svg.Property(svg.trim(prop[0]), svg.trim(prop[1]));
+ props[svg.trim(name)] = new svg.Property(svg.trim(name), svg.trim(value));
}
}
svg.Styles[cssClass] = props;
+ if (cssClass == '@font-face') {
+ var fontFamily = props['font-family'].value.replace(/"/g,'');
+ var srcs = props['src'].value.split(',');
+ for (var s=0; s<srcs.length; s++) {
+ if (srcs[s].indexOf('format("svg")') > 0) {
+ var urlStart = srcs[s].indexOf('url');
+ var urlEnd = srcs[s].indexOf(')', urlStart);
+ var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6);
+ var doc = svg.parseXml(svg.ajax(url));
+ var fonts = doc.getElementsByTagName('font');
+ for (var f=0; f<fonts.length; f++) {
+ var font = svg.CreateElement(fonts[f]);
+ svg.Definitions[fontFamily] = font;
+ }
+ }
+ }
+ }
}
}
}
@@ -2004,6 +2186,10 @@ if(!Array.indexOf){
}
}
}
+
+ this.render = function(ctx) {
+ // NO RENDER
+ }
}
svg.Element.clipPath.prototype = new svg.Element.ElementBase;
@@ -2024,7 +2210,8 @@ if(!Array.indexOf){
// element factory
svg.CreateElement = function(node) {
- var className = node.nodeName.replace(/^[^:]+:/,'');
+ var className = node.nodeName.replace(/^[^:]+:/,''); // remove namespace
+ className = className.replace(/\-/g,''); // remove dashes
var e = null;
if (typeof(svg.Element[className]) != 'undefined') {
e = new svg.Element[className](node);
@@ -2044,6 +2231,10 @@ if(!Array.indexOf){
// load from xml
svg.loadXml = function(ctx, xml) {
+ svg.loadXmlDoc(ctx, svg.parseXml(xml));
+ }
+
+ svg.loadXmlDoc = function(ctx, dom) {
svg.init(ctx);
var mapXY = function(p) {
@@ -2070,19 +2261,24 @@ if(!Array.indexOf){
};
}
- var dom = svg.parseXml(xml);
var e = svg.CreateElement(dom.documentElement);
+ e.root = true;
// render loop
var isFirstRender = true;
var draw = function() {
+ svg.ViewPort.Clear();
+ if (ctx.canvas.parentNode) svg.ViewPort.SetCurrent(ctx.canvas.parentNode.clientWidth, ctx.canvas.parentNode.clientHeight);
+
if (svg.opts == null || svg.opts['ignoreDimensions'] != true) {
// set canvas size
if (e.style('width').hasValue()) {
- ctx.canvas.width = e.style('width').Length.toPixels(ctx.canvas.parentNode.clientWidth);
+ ctx.canvas.width = e.style('width').Length.toPixels('x');
+ ctx.canvas.style.width = ctx.canvas.width + 'px';
}
if (e.style('height').hasValue()) {
- ctx.canvas.height = e.style('height').Length.toPixels(ctx.canvas.parentNode.clientHeight);
+ ctx.canvas.height = e.style('height').Length.toPixels('y');
+ ctx.canvas.style.height = ctx.canvas.height + 'px';
}
}
svg.ViewPort.SetCurrent(ctx.canvas.clientWidth, ctx.canvas.clientHeight);
diff --git a/js/canvg/flashcanvas.js b/js/canvg/flashcanvas.js
new file mode 100644
index 0000000..6ecaa94
--- /dev/null
+++ b/js/canvg/flashcanvas.js
@@ -0,0 +1,1093 @@
+/*
+ * FlashCanvas
+ *
+ * Copyright (c) 2009 Tim Cameron Ryan
+ * Copyright (c) 2009-2011 FlashCanvas Project
+ * Released under the MIT/X License
+ */
+
+// Reference:
+// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-elem…
+// http://dev.w3.org/html5/spec/the-canvas-element.html
+
+// If the browser is IE and does not support HTML5 Canvas
+if (window["ActiveXObject"] && !window["CanvasRenderingContext2D"]) {
+
+(function(window, document, undefined) {
+
+/*
+ * Constant
+ */
+
+var NULL = null;
+var CANVAS = "canvas";
+var CANVAS_RENDERING_CONTEXT_2D = "CanvasRenderingContext2D";
+var CANVAS_GRADIENT = "CanvasGradient";
+var CANVAS_PATTERN = "CanvasPattern";
+var FLASH_CANVAS = "FlashCanvas";
+var G_VML_CANVAS_MANAGER = "G_vmlCanvasManager";
+var OBJECT_ID_PREFIX = "external";
+var ON_FOCUS = "onfocus";
+var ON_PROPERTY_CHANGE = "onpropertychange";
+var ON_READY_STATE_CHANGE = "onreadystatechange";
+var ON_UNLOAD = "onunload";
+
+var config = window[FLASH_CANVAS + "Options"] || {};
+var BASE_URL = config["swfPath"] || getScriptUrl().replace(/[^\/]+$/, "");
+var SWF_URL = BASE_URL + "flashcanvas.swf";
+
+// DOMException code
+var INDEX_SIZE_ERR = 1;
+var NOT_SUPPORTED_ERR = 9;
+var INVALID_STATE_ERR = 11;
+var SYNTAX_ERR = 12;
+var TYPE_MISMATCH_ERR = 17;
+var SECURITY_ERR = 18;
+
+/**
+ * @constructor
+ */
+function Lookup(array) {
+ for (var i = 0, n = array.length; i < n; i++)
+ this[array[i]] = i;
+}
+
+var properties = new Lookup([
+ // Canvas element
+ "toDataURL",
+
+ // CanvasRenderingContext2D
+ "save",
+ "restore",
+ "scale",
+ "rotate",
+ "translate",
+ "transform",
+ "setTransform",
+ "globalAlpha",
+ "globalCompositeOperation",
+ "strokeStyle",
+ "fillStyle",
+ "createLinearGradient",
+ "createRadialGradient",
+ "createPattern",
+ "lineWidth",
+ "lineCap",
+ "lineJoin",
+ "miterLimit",
+ "shadowOffsetX",
+ "shadowOffsetY",
+ "shadowBlur",
+ "shadowColor",
+ "clearRect",
+ "fillRect",
+ "strokeRect",
+ "beginPath",
+ "closePath",
+ "moveTo",
+ "lineTo",
+ "quadraticCurveTo",
+ "bezierCurveTo",
+ "arcTo",
+ "rect",
+ "arc",
+ "fill",
+ "stroke",
+ "clip",
+ "isPointInPath",
+// "drawFocusRing",
+ "font",
+ "textAlign",
+ "textBaseline",
+ "fillText",
+ "strokeText",
+ "measureText",
+ "drawImage",
+ "createImageData",
+ "getImageData",
+ "putImageData",
+
+ // CanvasGradient
+ "addColorStop",
+
+ // Internal use
+ "direction",
+ "resize"
+]);
+
+// Whether swf is ready for use
+var isReady = {};
+
+// Monitor the number of loading files
+var lock = {};
+
+// Canvas elements
+var canvases = {};
+
+// SPAN element embedded in the canvas
+var spans = {};
+
+/**
+ * 2D context
+ * @constructor
+ */
+var CanvasRenderingContext2D = function(canvas, swf) {
+ // back-reference to the canvas
+ this.canvas = canvas;
+
+ // back-reference to the swf
+ this._swf = swf;
+
+ // unique ID of canvas
+ this._canvasId = swf.id.slice(8);
+
+ // initialize drawing states
+ this._initialize();
+
+ // Count CanvasGradient and CanvasPattern objects
+ this._gradientPatternId = 0;
+
+ // Directionality of the canvas element
+ this._direction = "";
+
+ // frame update interval
+ var self = this;
+ setInterval(function() {
+ if (lock[self._canvasId] === 0) {
+ self._executeCommand();
+ }
+ }, 30);
+};
+
+CanvasRenderingContext2D.prototype = {
+ /*
+ * state
+ */
+
+ save: function() {
+ // write all properties
+ this._setCompositing();
+ this._setShadows();
+ this._setStrokeStyle();
+ this._setFillStyle();
+ this._setLineStyles();
+ this._setFontStyles();
+
+ // push state
+ this._stateStack.push([
+ this._globalAlpha,
+ this._globalCompositeOperation,
+ this._strokeStyle,
+ this._fillStyle,
+ this._lineWidth,
+ this._lineCap,
+ this._lineJoin,
+ this._miterLimit,
+ this._shadowOffsetX,
+ this._shadowOffsetY,
+ this._shadowBlur,
+ this._shadowColor,
+ this._font,
+ this._textAlign,
+ this._textBaseline
+ ]);
+
+ this._queue.push(properties.save);
+ },
+
+ restore: function() {
+ // pop state
+ var stateStack = this._stateStack;
+ if (stateStack.length) {
+ var state = stateStack.pop();
+ this.globalAlpha = state[0];
+ this.globalCompositeOperation = state[1];
+ this.strokeStyle = state[2];
+ this.fillStyle = state[3];
+ this.lineWidth = state[4];
+ this.lineCap = state[5];
+ this.lineJoin = state[6];
+ this.miterLimit = state[7];
+ this.shadowOffsetX = state[8];
+ this.shadowOffsetY = state[9];
+ this.shadowBlur = state[10];
+ this.shadowColor = state[11];
+ this.font = state[12];
+ this.textAlign = state[13];
+ this.textBaseline = state[14];
+ }
+
+ this._queue.push(properties.restore);
+ },
+
+ /*
+ * transformations
+ */
+
+ scale: function(x, y) {
+ this._queue.push(properties.scale, x, y);
+ },
+
+ rotate: function(angle) {
+ this._queue.push(properties.rotate, angle);
+ },
+
+ translate: function(x, y) {
+ this._queue.push(properties.translate, x, y);
+ },
+
+ transform: function(m11, m12, m21, m22, dx, dy) {
+ this._queue.push(properties.transform, m11, m12, m21, m22, dx, dy);
+ },
+
+ setTransform: function(m11, m12, m21, m22, dx, dy) {
+ this._queue.push(properties.setTransform, m11, m12, m21, m22, dx, dy);
+ },
+
+ /*
+ * compositing
+ */
+
+ _setCompositing: function() {
+ var queue = this._queue;
+ if (this._globalAlpha !== this.globalAlpha) {
+ this._globalAlpha = this.globalAlpha;
+ queue.push(properties.globalAlpha, this._globalAlpha);
+ }
+ if (this._globalCompositeOperation !== this.globalCompositeOperation) {
+ this._globalCompositeOperation = this.globalCompositeOperation;
+ queue.push(properties.globalCompositeOperation, this._globalCompositeOperation);
+ }
+ },
+
+ /*
+ * colors and styles
+ */
+
+ _setStrokeStyle: function() {
+ if (this._strokeStyle !== this.strokeStyle) {
+ var style = this._strokeStyle = this.strokeStyle;
+ this._queue.push(properties.strokeStyle, (typeof style === "object") ? style.id : style);
+ }
+ },
+
+ _setFillStyle: function() {
+ if (this._fillStyle !== this.fillStyle) {
+ var style = this._fillStyle = this.fillStyle;
+ this._queue.push(properties.fillStyle, (typeof style === "object") ? style.id : style);
+ }
+ },
+
+ createLinearGradient: function(x0, y0, x1, y1) {
+ // If any of the arguments are not finite numbers, throws a
+ // NOT_SUPPORTED_ERR exception.
+ if (!(isFinite(x0) && isFinite(y0) && isFinite(x1) && isFinite(y1))) {
+ throwException(NOT_SUPPORTED_ERR);
+ }
+
+ this._queue.push(properties.createLinearGradient, x0, y0, x1, y1);
+ return new CanvasGradient(this);
+ },
+
+ createRadialGradient: function(x0, y0, r0, x1, y1, r1) {
+ // If any of the arguments are not finite numbers, throws a
+ // NOT_SUPPORTED_ERR exception.
+ if (!(isFinite(x0) && isFinite(y0) && isFinite(r0) &&
+ isFinite(x1) && isFinite(y1) && isFinite(r1))) {
+ throwException(NOT_SUPPORTED_ERR);
+ }
+
+ // If either of the radii are negative, throws an INDEX_SIZE_ERR
+ // exception.
+ if (r0 < 0 || r1 < 0) {
+ throwException(INDEX_SIZE_ERR);
+ }
+
+ this._queue.push(properties.createRadialGradient, x0, y0, r0, x1, y1, r1);
+ return new CanvasGradient(this);
+ },
+
+ createPattern: function(image, repetition) {
+ // If the image is null, the implementation must raise a
+ // TYPE_MISMATCH_ERR exception.
+ if (!image) {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+
+ var tagName = image.tagName, src;
+ var canvasId = this._canvasId;
+
+ // If the first argument isn't an img, canvas, or video element,
+ // throws a TYPE_MISMATCH_ERR exception.
+ if (tagName) {
+ tagName = tagName.toLowerCase();
+ if (tagName === "img") {
+ src = image.getAttribute("src", 2);
+ } else if (tagName === CANVAS || tagName === "video") {
+ // For now, only HTMLImageElement is supported.
+ return;
+ } else {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+ }
+
+ // Additionally, we accept any object that has a src property.
+ // This is useful when you'd like to specify a long data URI.
+ else if (image.src) {
+ src = image.src;
+ } else {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+
+ // If the second argument isn't one of the allowed values, throws a
+ // SYNTAX_ERR exception.
+ if (!(repetition === "repeat" || repetition === "no-repeat" ||
+ repetition === "repeat-x" || repetition === "repeat-y" ||
+ repetition === "" || repetition === NULL)) {
+ throwException(SYNTAX_ERR);
+ }
+
+ // Special characters in the filename need escaping.
+ this._queue.push(properties.createPattern, encodeXML(src), repetition);
+
+ if (isReady[canvasId]) {
+ this._executeCommand();
+ ++lock[canvasId];
+ }
+
+ return new CanvasPattern(this);
+ },
+
+ /*
+ * line caps/joins
+ */
+
+ _setLineStyles: function() {
+ var queue = this._queue;
+ if (this._lineWidth !== this.lineWidth) {
+ this._lineWidth = this.lineWidth;
+ queue.push(properties.lineWidth, this._lineWidth);
+ }
+ if (this._lineCap !== this.lineCap) {
+ this._lineCap = this.lineCap;
+ queue.push(properties.lineCap, this._lineCap);
+ }
+ if (this._lineJoin !== this.lineJoin) {
+ this._lineJoin = this.lineJoin;
+ queue.push(properties.lineJoin, this._lineJoin);
+ }
+ if (this._miterLimit !== this.miterLimit) {
+ this._miterLimit = this.miterLimit;
+ queue.push(properties.miterLimit, this._miterLimit);
+ }
+ },
+
+ /*
+ * shadows
+ */
+
+ _setShadows: function() {
+ var queue = this._queue;
+ if (this._shadowOffsetX !== this.shadowOffsetX) {
+ this._shadowOffsetX = this.shadowOffsetX;
+ queue.push(properties.shadowOffsetX, this._shadowOffsetX);
+ }
+ if (this._shadowOffsetY !== this.shadowOffsetY) {
+ this._shadowOffsetY = this.shadowOffsetY;
+ queue.push(properties.shadowOffsetY, this._shadowOffsetY);
+ }
+ if (this._shadowBlur !== this.shadowBlur) {
+ this._shadowBlur = this.shadowBlur;
+ queue.push(properties.shadowBlur, this._shadowBlur);
+ }
+ if (this._shadowColor !== this.shadowColor) {
+ this._shadowColor = this.shadowColor;
+ queue.push(properties.shadowColor, this._shadowColor);
+ }
+ },
+
+ /*
+ * rects
+ */
+
+ clearRect: function(x, y, w, h) {
+ this._queue.push(properties.clearRect, x, y, w, h);
+ },
+
+ fillRect: function(x, y, w, h) {
+ this._setCompositing();
+ this._setShadows();
+ this._setFillStyle();
+ this._queue.push(properties.fillRect, x, y, w, h);
+ },
+
+ strokeRect: function(x, y, w, h) {
+ this._setCompositing();
+ this._setShadows();
+ this._setStrokeStyle();
+ this._setLineStyles();
+ this._queue.push(properties.strokeRect, x, y, w, h);
+ },
+
+ /*
+ * path API
+ */
+
+ beginPath: function() {
+ this._queue.push(properties.beginPath);
+ },
+
+ closePath: function() {
+ this._queue.push(properties.closePath);
+ },
+
+ moveTo: function(x, y) {
+ this._queue.push(properties.moveTo, x, y);
+ },
+
+ lineTo: function(x, y) {
+ this._queue.push(properties.lineTo, x, y);
+ },
+
+ quadraticCurveTo: function(cpx, cpy, x, y) {
+ this._queue.push(properties.quadraticCurveTo, cpx, cpy, x, y);
+ },
+
+ bezierCurveTo: function(cp1x, cp1y, cp2x, cp2y, x, y) {
+ this._queue.push(properties.bezierCurveTo, cp1x, cp1y, cp2x, cp2y, x, y);
+ },
+
+ arcTo: function(x1, y1, x2, y2, radius) {
+ // Throws an INDEX_SIZE_ERR exception if the given radius is negative.
+ if (radius < 0 && isFinite(radius)) {
+ throwException(INDEX_SIZE_ERR);
+ }
+
+ this._queue.push(properties.arcTo, x1, y1, x2, y2, radius);
+ },
+
+ rect: function(x, y, w, h) {
+ this._queue.push(properties.rect, x, y, w, h);
+ },
+
+ arc: function(x, y, radius, startAngle, endAngle, anticlockwise) {
+ // Throws an INDEX_SIZE_ERR exception if the given radius is negative.
+ if (radius < 0 && isFinite(radius)) {
+ throwException(INDEX_SIZE_ERR);
+ }
+
+ this._queue.push(properties.arc, x, y, radius, startAngle, endAngle, anticlockwise ? 1 : 0);
+ },
+
+ fill: function() {
+ this._setCompositing();
+ this._setShadows();
+ this._setFillStyle();
+ this._queue.push(properties.fill);
+ },
+
+ stroke: function() {
+ this._setCompositing();
+ this._setShadows();
+ this._setStrokeStyle();
+ this._setLineStyles();
+ this._queue.push(properties.stroke);
+ },
+
+ clip: function() {
+ this._queue.push(properties.clip);
+ },
+
+ isPointInPath: function(x, y) {
+ // TODO: Implement
+ },
+
+ /*
+ * text
+ */
+
+ _setFontStyles: function() {
+ var queue = this._queue;
+ if (this._font !== this.font) {
+ try {
+ var span = spans[this._canvasId];
+ span.style.font = this._font = this.font;
+
+ var style = span.currentStyle;
+ var fontSize = span.offsetHeight;
+ var font = [style.fontStyle, style.fontWeight, fontSize, style.fontFamily].join(" ");
+ queue.push(properties.font, font);
+ } catch(e) {
+ // If this.font cannot be parsed as a CSS font value, then it
+ // must be ignored.
+ }
+ }
+ if (this._textAlign !== this.textAlign) {
+ this._textAlign = this.textAlign;
+ queue.push(properties.textAlign, this._textAlign);
+ }
+ if (this._textBaseline !== this.textBaseline) {
+ this._textBaseline = this.textBaseline;
+ queue.push(properties.textBaseline, this._textBaseline);
+ }
+ if (this._direction !== this.canvas.currentStyle.direction) {
+ this._direction = this.canvas.currentStyle.direction;
+ queue.push(properties.direction, this._direction);
+ }
+ },
+
+ fillText: function(text, x, y, maxWidth) {
+ this._setCompositing();
+ this._setFillStyle();
+ this._setShadows();
+ this._setFontStyles();
+ this._queue.push(properties.fillText, encodeXML(text), x, y,
+ maxWidth === undefined ? Infinity : maxWidth);
+ },
+
+ strokeText: function(text, x, y, maxWidth) {
+ this._setCompositing();
+ this._setStrokeStyle();
+ this._setShadows();
+ this._setFontStyles();
+ this._queue.push(properties.strokeText, encodeXML(text), x, y,
+ maxWidth === undefined ? Infinity : maxWidth);
+ },
+
+ measureText: function(text) {
+ var span = spans[this._canvasId];
+ try {
+ span.style.font = this.font;
+ } catch(e) {
+ // If this.font cannot be parsed as a CSS font value, then it must
+ // be ignored.
+ }
+
+ // Replace space characters with tab characters because innerText
+ // removes trailing white spaces.
+ span.innerText = text.replace(/[ \n\f\r]/g, "\t");
+
+ return new TextMetrics(span.offsetWidth);
+ },
+
+ /*
+ * drawing images
+ */
+
+ drawImage: function(image, x1, y1, w1, h1, x2, y2, w2, h2) {
+ // If the image is null, the implementation must raise a
+ // TYPE_MISMATCH_ERR exception.
+ if (!image) {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+
+ var tagName = image.tagName, src, argc = arguments.length;
+ var canvasId = this._canvasId;
+
+ // If the first argument isn't an img, canvas, or video element,
+ // throws a TYPE_MISMATCH_ERR exception.
+ if (tagName) {
+ tagName = tagName.toLowerCase();
+ if (tagName === "img") {
+ src = image.getAttribute("src", 2);
+ } else if (tagName === CANVAS || tagName === "video") {
+ // For now, only HTMLImageElement is supported.
+ return;
+ } else {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+ }
+
+ // Additionally, we accept any object that has a src property.
+ // This is useful when you'd like to specify a long data URI.
+ else if (image.src) {
+ src = image.src;
+ } else {
+ throwException(TYPE_MISMATCH_ERR);
+ }
+
+ this._setCompositing();
+ this._setShadows();
+
+ // Special characters in the filename need escaping.
+ src = encodeXML(src);
+
+ if (argc === 3) {
+ this._queue.push(properties.drawImage, argc, src, x1, y1);
+ } else if (argc === 5) {
+ this._queue.push(properties.drawImage, argc, src, x1, y1, w1, h1);
+ } else if (argc === 9) {
+ // If one of the sw or sh arguments is zero, the implementation
+ // must raise an INDEX_SIZE_ERR exception.
+ if (w1 === 0 || h1 === 0) {
+ throwException(INDEX_SIZE_ERR);
+ }
+
+ this._queue.push(properties.drawImage, argc, src, x1, y1, w1, h1, x2, y2, w2, h2);
+ } else {
+ return;
+ }
+
+ if (isReady[canvasId]) {
+ this._executeCommand();
+ ++lock[canvasId];
+ }
+ },
+
+ /*
+ * pixel manipulation
+ */
+
+ // ImageData createImageData(in float sw, in float sh);
+ // ImageData createImageData(in ImageData imagedata);
+ createImageData: function() {
+ // TODO: Implement
+ },
+
+ // ImageData getImageData(in float sx, in float sy, in float sw, in float sh);
+ getImageData: function(sx, sy, sw, sh) {
+ // TODO: Implement
+ },
+
+ // void putImageData(in ImageData imagedata, in float dx, in float dy, [Optional] in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight);
+ putImageData: function(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) {
+ // TODO: Implement
+ },
+
+ /*
+ * private methods
+ */
+
+ _initialize: function() {
+ // compositing
+ this.globalAlpha = this._globalAlpha = 1.0;
+ this.globalCompositeOperation = this._globalCompositeOperation = "source-over";
+
+ // colors and styles
+ this.strokeStyle = this._strokeStyle = "#000000";
+ this.fillStyle = this._fillStyle = "#000000";
+
+ // line caps/joins
+ this.lineWidth = this._lineWidth = 1.0;
+ this.lineCap = this._lineCap = "butt";
+ this.lineJoin = this._lineJoin = "miter";
+ this.miterLimit = this._miterLimit = 10.0;
+
+ // shadows
+ this.shadowOffsetX = this._shadowOffsetX = 0;
+ this.shadowOffsetY = this._shadowOffsetY = 0;
+ this.shadowBlur = this._shadowBlur = 0;
+ this.shadowColor = this._shadowColor = "rgba(0, 0, 0, 0.0)";
+
+ // text
+ this.font = this._font = "10px sans-serif";
+ this.textAlign = this._textAlign = "start";
+ this.textBaseline = this._textBaseline = "alphabetic";
+
+ // command queue
+ this._queue = [];
+
+ // stack of drawing states
+ this._stateStack = [];
+ },
+
+ _flush: function() {
+ var queue = this._queue;
+ this._queue = [];
+ return queue;
+ },
+
+ _executeCommand: function() {
+ // execute commands
+ var commands = this._flush();
+ if (commands.length > 0) {
+ return eval(this._swf.CallFunction(
+ '<invoke name="executeCommand" returntype="javascript"><arguments><string>'
+ + commands.join("�") + "</string></arguments></invoke>"
+ ));
+ }
+ },
+
+ _resize: function(width, height) {
+ // Flush commands in the queue
+ this._executeCommand();
+
+ // Clear back to the initial state
+ this._initialize();
+
+ // Adjust the size of Flash to that of the canvas
+ if (width > 0) {
+ this._swf.width = width;
+ }
+ if (height > 0) {
+ this._swf.height = height;
+ }
+
+ // Execute a resize command at the start of the next frame
+ this._queue.push(properties.resize, width, height);
+ }
+};
+
+/**
+ * CanvasGradient stub
+ * @constructor
+ */
+var CanvasGradient = function(ctx) {
+ this._ctx = ctx;
+ this.id = ctx._gradientPatternId++;
+};
+
+CanvasGradient.prototype = {
+ addColorStop: function(offset, color) {
+ // Throws an INDEX_SIZE_ERR exception if the offset is out of range.
+ if (isNaN(offset) || offset < 0 || offset > 1) {
+ throwException(INDEX_SIZE_ERR);
+ }
+
+ this._ctx._queue.push(properties.addColorStop, this.id, offset, color);
+ }
+};
+
+/**
+ * CanvasPattern stub
+ * @constructor
+ */
+var CanvasPattern = function(ctx) {
+ this.id = ctx._gradientPatternId++;
+};
+
+/**
+ * TextMetrics stub
+ * @constructor
+ */
+var TextMetrics = function(width) {
+ this.width = width;
+};
+
+/**
+ * DOMException
+ * @constructor
+ */
+var DOMException = function(code) {
+ this.code = code;
+ this.message = DOMExceptionNames[code];
+};
+
+DOMException.prototype = new Error;
+
+var DOMExceptionNames = {
+ 1: "INDEX_SIZE_ERR",
+ 9: "NOT_SUPPORTED_ERR",
+ 11: "INVALID_STATE_ERR",
+ 12: "SYNTAX_ERR",
+ 17: "TYPE_MISMATCH_ERR",
+ 18: "SECURITY_ERR"
+};
+
+/*
+ * Event handlers
+ */
+
+function onReadyStateChange() {
+ if (document.readyState === "complete") {
+ document.detachEvent(ON_READY_STATE_CHANGE, onReadyStateChange);
+
+ var canvases = document.getElementsByTagName(CANVAS);
+ for (var i = 0, n = canvases.length; i < n; ++i) {
+ FlashCanvas.initElement(canvases[i]);
+ }
+ }
+}
+
+function onFocus() {
+ // forward the event to the parent
+ var swf = event.srcElement, canvas = swf.parentNode;
+ swf.blur();
+ canvas.focus();
+}
+
+function onPropertyChange() {
+ var prop = event.propertyName;
+ if (prop === "width" || prop === "height") {
+ var canvas = event.srcElement;
+ var value = canvas[prop];
+ var number = parseInt(value, 10);
+
+ if (isNaN(number) || number < 0) {
+ number = (prop === "width") ? 300 : 150;
+ }
+
+ if (value === number) {
+ canvas.style[prop] = number + "px";
+ canvas.getContext("2d")._resize(canvas.width, canvas.height);
+ } else {
+ canvas[prop] = number;
+ }
+ }
+}
+
+function onUnload() {
+ window.detachEvent(ON_UNLOAD, onUnload);
+
+ for (var canvasId in canvases) {
+ var canvas = canvases[canvasId], swf = canvas.firstChild, prop;
+
+ // clean up the references of swf.executeCommand and swf.resize
+ for (prop in swf) {
+ if (typeof swf[prop] === "function") {
+ swf[prop] = NULL;
+ }
+ }
+
+ // clean up the references of canvas.getContext and canvas.toDataURL
+ for (prop in canvas) {
+ if (typeof canvas[prop] === "function") {
+ canvas[prop] = NULL;
+ }
+ }
+
+ // remove event listeners
+ swf.detachEvent(ON_FOCUS, onFocus);
+ canvas.detachEvent(ON_PROPERTY_CHANGE, onPropertyChange);
+ }
+
+ // delete exported symbols
+ window[CANVAS_RENDERING_CONTEXT_2D] = NULL;
+ window[CANVAS_GRADIENT] = NULL;
+ window[CANVAS_PATTERN] = NULL;
+ window[FLASH_CANVAS] = NULL;
+ window[G_VML_CANVAS_MANAGER] = NULL;
+}
+
+/*
+ * FlashCanvas API
+ */
+
+var FlashCanvas = {
+ initElement: function(canvas) {
+ // Check whether the initialization is required or not.
+ if (canvas.getContext) {
+ return canvas;
+ }
+
+ // initialize lock
+ var canvasId = getUniqueId();
+ var objectId = OBJECT_ID_PREFIX + canvasId;
+ isReady[canvasId] = false;
+ lock[canvasId] = 1;
+
+ // Set the width and height attributes.
+ setCanvasSize(canvas);
+
+ // embed swf and SPAN element
+ canvas.innerHTML =
+ '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"' +
+ ' codebase="' + location.protocol + '//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"' +
+ ' width="100%" height="100%" id="' + objectId + '">' +
+ '<param name="allowScriptAccess" value="always">' +
+ '<param name="flashvars" value="id=' + objectId + '">' +
+ '<param name="wmode" value="transparent">' +
+ '</object>' +
+ '<span style="margin:0;padding:0;border:0;display:inline-block;position:static;height:1em;overflow:visible;white-space:nowrap">' +
+ '</span>';
+
+ canvases[canvasId] = canvas;
+ var swf = canvas.firstChild;
+ spans[canvasId] = canvas.lastChild;
+
+ // Check whether the canvas element is in the DOM tree
+ var documentContains = document.body.contains;
+ if (documentContains(canvas)) {
+ // Load swf file immediately
+ swf["movie"] = SWF_URL;
+ } else {
+ // Wait until the element is added to the DOM tree
+ var intervalId = setInterval(function() {
+ if (documentContains(canvas)) {
+ clearInterval(intervalId);
+ swf["movie"] = SWF_URL;
+ }
+ }, 0);
+ }
+
+ // If the browser is IE6 or in quirks mode
+ if (document.compatMode === "BackCompat" || !window.XMLHttpRequest) {
+ spans[canvasId].style.overflow = "hidden";
+ }
+
+ // initialize context
+ var ctx = new CanvasRenderingContext2D(canvas, swf);
+
+ // canvas API
+ canvas.getContext = function(contextId) {
+ return contextId === "2d" ? ctx : NULL;
+ };
+
+ canvas.toDataURL = function(type, quality) {
+ if (("" + type).replace(/[A-Z]+/g, toLowerCase) === "image/jpeg") {
+ ctx._queue.push(properties.toDataURL, type,
+ typeof quality === "number" ? quality : "");
+ } else {
+ ctx._queue.push(properties.toDataURL, type);
+ }
+ return ctx._executeCommand();
+ };
+
+ // add event listener
+ swf.attachEvent(ON_FOCUS, onFocus);
+
+ return canvas;
+ },
+
+ saveImage: function(canvas) {
+ var swf = canvas.firstChild;
+ swf.saveImage();
+ },
+
+ setOptions: function(options) {
+ // TODO: Implement
+ },
+
+ trigger: function(canvasId, type) {
+ var canvas = canvases[canvasId];
+ canvas.fireEvent("on" + type);
+ },
+
+ unlock: function(canvasId, ready) {
+ if (lock[canvasId]) {
+ --lock[canvasId];
+ }
+ if (ready) {
+ var canvas = canvases[canvasId];
+ var swf = canvas.firstChild;
+ var width;
+ var height;
+
+ // Set the width and height attributes of the canvas element.
+ setCanvasSize(canvas);
+ width = canvas.width;
+ height = canvas.height;
+
+ canvas.style.width = width + "px";
+ canvas.style.height = height + "px";
+
+ // Adjust the size of Flash to that of the canvas
+ if (width > 0) {
+ swf.width = width;
+ }
+ if (height > 0) {
+ swf.height = height;
+ }
+ swf.resize(width, height);
+
+ // Add event listener
+ canvas.attachEvent(ON_PROPERTY_CHANGE, onPropertyChange);
+
+ // ExternalInterface is now ready for use
+ isReady[canvasId] = true;
+ }
+ }
+};
+
+/*
+ * Utility methods
+ */
+
+// Get the absolute URL of flashcanvas.js
+function getScriptUrl() {
+ var scripts = document.getElementsByTagName("script");
+ var script = scripts[scripts.length - 1];
+
+ // @see http://msdn.microsoft.com/en-us/library/ms536429(VS.85).aspx
+ if (document.documentMode >= 8) {
+ return script.src;
+ } else {
+ return script.getAttribute("src", 4);
+ }
+}
+
+// Get a unique ID composed of alphanumeric characters.
+function getUniqueId() {
+ return Math.random().toString(36).slice(2) || "0";
+}
+
+// Escape characters not permitted in XML.
+function encodeXML(str) {
+ return ("" + str).replace(/&/g, "&").replace(/</g, "<");
+}
+
+function toLowerCase(str) {
+ return str.toLowerCase();
+}
+
+function throwException(code) {
+ throw new DOMException(code);
+}
+
+// The width and height attributes of a canvas element must have values that
+// are valid non-negative integers.
+function setCanvasSize(canvas) {
+ var width = parseInt(canvas.width, 10);
+ var height = parseInt(canvas.height, 10);
+
+ if (isNaN(width) || width < 0) {
+ width = 300;
+ }
+ if (isNaN(height) || height < 0) {
+ height = 150;
+ }
+
+ canvas.width = width;
+ canvas.height = height;
+}
+
+/*
+ * initialization
+ */
+
+// IE HTML5 shiv
+document.createElement(CANVAS);
+
+// setup default CSS
+document.createStyleSheet().cssText =
+ CANVAS + "{display:inline-block;overflow:hidden;width:300px;height:150px}";
+
+// initialize canvas elements
+if (document.readyState === "complete") {
+ onReadyStateChange();
+} else {
+ document.attachEvent(ON_READY_STATE_CHANGE, onReadyStateChange);
+}
+
+// prevent IE6 memory leaks
+window.attachEvent(ON_UNLOAD, onUnload);
+
+// preload SWF file if it's in the same domain
+if (SWF_URL.indexOf(location.protocol + "//" + location.host + "/") === 0) {
+ var req = new ActiveXObject("Microsoft.XMLHTTP");
+ req.open("GET", SWF_URL, false);
+ req.send(NULL);
+}
+
+/*
+ * public API
+ */
+
+window[CANVAS_RENDERING_CONTEXT_2D] = CanvasRenderingContext2D;
+window[CANVAS_GRADIENT] = CanvasGradient;
+window[CANVAS_PATTERN] = CanvasPattern;
+window[FLASH_CANVAS] = FlashCanvas;
+
+// ExplorerCanvas-compatible APIs for convenience
+window[G_VML_CANVAS_MANAGER] = {
+ init: function(){},
+ init_: function(){},
+ initElement: FlashCanvas.initElement
+};
+
+// Prevent Closure Compiler from removing the function.
+keep = CanvasRenderingContext2D.measureText;
+
+})(window, document);
+
+}
diff --git a/js/canvg/flashcanvas.swf b/js/canvg/flashcanvas.swf
new file mode 100644
index 0000000..66ff213
Binary files /dev/null and b/js/canvg/flashcanvas.swf differ
diff --git a/js/highcharts/exporting.js b/js/highcharts/exporting.js
index 4f134d5..036c6ae 100644
--- a/js/highcharts/exporting.js
+++ b/js/highcharts/exporting.js
@@ -308,6 +308,10 @@ extend(Chart.prototype, {
chart = this,
canvas=createElement('canvas');
+ if (typeof FlashCanvas != "undefined") {
+ FlashCanvas.initElement(canvas);
+ }
+
$('body').append(canvas);
$(canvas).hide();
diff --git a/js/highcharts/highcharts.js b/js/highcharts/highcharts.js
index c15862b..4ad0c6c 100644
--- a/js/highcharts/highcharts.js
+++ b/js/highcharts/highcharts.js
@@ -2210,7 +2210,7 @@ SVGRenderer.prototype = {
if (lineNo) {
// Webkit and opera sometimes return 'normal' as the line height. In that
// case, webkit uses offsetHeight, while Opera falls back to 18
- lineHeight = pInt(window.getComputedStyle(lastLine, null).getPropertyValue('line-height'));
+ if(window.getComputedStyle) lineHeight = pInt(window.getComputedStyle(lastLine, null).getPropertyValue('line-height'));
if (isNaN(lineHeight)) {
lineHeight = textLineHeight || lastLine.offsetHeight || 18;
}
diff --git a/po/en_GB.po b/po/en_GB.po
index ec6b80a..2c6d439 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-06-14 17:22+0200\n"
-"PO-Revision-Date: 2011-06-09 22:12+0200\n"
+"PO-Revision-Date: 2011-06-15 02:35+0200\n"
"Last-Translator: Marc Delisle <marc(a)infomarc.info>\n"
"Language-Team: english-gb <en_GB(a)li.org>\n"
"Language: en_GB\n"
@@ -1005,10 +1005,9 @@ msgstr "This is not a number!"
#. l10n: Default description for the y-Axis of Charts
#: js/messages.php:51
-#, fuzzy
#| msgid "Log file count"
msgid "Total count"
-msgstr "Log file count"
+msgstr "Total count"
#: js/messages.php:54
msgid "The host name is empty!"
@@ -1045,24 +1044,22 @@ msgid "Close"
msgstr "Close"
#: js/messages.php:64 server_status.php:393
-#, fuzzy
#| msgid "Server Choice"
msgid "Live traffic chart"
-msgstr "Server Choice"
+msgstr "Live traffic chart"
#: js/messages.php:65 server_status.php:396
msgid "Live conn./process chart"
-msgstr ""
+msgstr "Live conn./process chart"
#: js/messages.php:66 server_status.php:423
-#, fuzzy
#| msgid "Show query chart"
msgid "Live query chart"
-msgstr "Show query chart"
+msgstr "Live query chart"
#: js/messages.php:68
msgid "Static data"
-msgstr ""
+msgstr "Static data"
#. l10n: Total number of queries
#: js/messages.php:70 libraries/build_html_for_db.lib.php:45
@@ -1075,7 +1072,7 @@ msgstr "Total"
#. l10n: Other, small valued, queries
#: js/messages.php:72 server_status.php:586
msgid "Other"
-msgstr ""
+msgstr "Other"
#. l10n: Thousands separator
#: js/messages.php:74 libraries/common.lib.php:1359
@@ -8212,71 +8209,62 @@ msgid "Runtime Information"
msgstr "Runtime Information"
#: server_status.php:367
-#, fuzzy
#| msgid "Server Choice"
msgid "Server traffic"
-msgstr "Server Choice"
+msgstr "Server traffic"
#: server_status.php:368
msgid "Query statistics"
msgstr "Query statistics"
#: server_status.php:369
-#, fuzzy
#| msgid "See slave status table"
msgid "All status variables"
-msgstr "See slave status table"
+msgstr "All status variables"
#: server_status.php:379 server_status.php:410
-#, fuzzy
#| msgid "Refresh"
msgid "Refresh rate"
-msgstr "Refresh"
+msgstr "Refresh rate"
#: server_status.php:380 server_status.php:411
-#, fuzzy
#| msgid "Second"
msgid "second"
-msgstr "Second"
+msgstr "second"
#: server_status.php:381 server_status.php:382 server_status.php:383
#: server_status.php:384 server_status.php:385 server_status.php:412
#: server_status.php:413 server_status.php:414 server_status.php:415
#: server_status.php:416
-#, fuzzy
#| msgid "Second"
msgid "seconds"
-msgstr "Second"
+msgstr "seconds"
#: server_status.php:386 server_status.php:387 server_status.php:388
#: server_status.php:389 server_status.php:417 server_status.php:418
#: server_status.php:419 server_status.php:420
-#, fuzzy
#| msgid "Minute"
msgid "minutes"
-msgstr "Minute"
+msgstr "minutes"
#: server_status.php:440
-#, fuzzy
#| msgid "Do not change the password"
msgid "Containing the word:"
-msgstr "Do not change the password"
+msgstr "Containing the word:"
#: server_status.php:445
-#, fuzzy
#| msgid "Show open tables"
msgid "Show only alert values"
-msgstr "Show open tables"
+msgstr "Show only alert values"
#: server_status.php:449
msgid "Filter by category..."
-msgstr ""
+msgstr "Filter by category..."
#: server_status.php:462
-#, fuzzy
#| msgid "Related Links"
msgid "Related links:"
-msgstr "Related Links"
+msgstr "Related links:"
#: server_status.php:507 server_status.php:539 server_status.php:660
#: server_status.php:705
@@ -8298,12 +8286,12 @@ msgstr "Query type"
#. l10n: # = Amount of queries
#: server_status.php:537
msgid "#"
-msgstr ""
+msgstr "#"
#: server_status.php:609
#, php-format
msgid "Network traffic since startup: %s"
-msgstr ""
+msgstr "Network traffic since startup: %s"
#: server_status.php:617
#, php-format
@@ -8384,10 +8372,9 @@ msgid "ID"
msgstr "ID"
#: server_status.php:840
-#, fuzzy
#| msgid "Whether to enable SSL for connection to MySQL server."
msgid "The number of failed attempts to connect to the MySQL server."
-msgstr "Whether to enable SSL for connection to MySQL server."
+msgstr "The number of failed attempts to connect to the MySQL server."
#: server_status.php:841
msgid ""
@@ -8407,6 +8394,7 @@ msgstr "The number of transactions that used the temporary binary log cache."
msgid ""
"The number of connection attempts (successful or not) to the MySQL server."
msgstr ""
+"The number of connection attempts (successful or not) to the MySQL server."
#: server_status.php:844
msgid ""
@@ -8826,6 +8814,8 @@ msgid ""
"The maximum number of connections that have been in use simultaneously since "
"the server started."
msgstr ""
+"The maximum number of connections that have been in use simultaneously since "
+"the server started."
#: server_status.php:915
msgid "The number of rows waiting to be written in INSERT DELAYED queues."
@@ -8857,6 +8847,9 @@ msgid ""
"fragmentation issues, which may be solved by issuing a FLUSH QUERY CACHE "
"statement."
msgstr ""
+"The number of free memory blocks in query cache. High numbers can indicate "
+"fragmentation issues, which may be solved by issuing a FLUSH QUERY CACHE "
+"statement."
#: server_status.php:921
msgid "The amount of free memory for query cache."
@@ -9583,10 +9576,9 @@ msgid "Line"
msgstr "Line"
#: tbl_chart.php:88
-#, fuzzy
#| msgid "Inline"
msgid "Spline"
-msgstr "Inline"
+msgstr "Spline"
#: tbl_chart.php:89
msgid "Pie"
@@ -9597,50 +9589,43 @@ msgid "Stacked"
msgstr "Stacked"
#: tbl_chart.php:94
-#, fuzzy
#| msgid "Report title:"
msgid "Chart title"
-msgstr "Report title:"
+msgstr "Chart title"
#: tbl_chart.php:99
msgid "X-Axis:"
-msgstr ""
+msgstr "X-Axis:"
#: tbl_chart.php:113
-#, fuzzy
#| msgid "SQL queries"
msgid "Series:"
-msgstr "SQL queries"
+msgstr "Series:"
#: tbl_chart.php:115
-#, fuzzy
#| msgid "Textarea columns"
msgid "The remaining columns"
-msgstr "Textarea columns"
+msgstr "The remaining columns"
#: tbl_chart.php:128
-#, fuzzy
#| msgid "X Axis label"
msgid "X-Axis label:"
-msgstr "X Axis label"
+msgstr "X-Axis label:"
#: tbl_chart.php:128
-#, fuzzy
#| msgid "Value"
msgid "X Values"
-msgstr "Value"
+msgstr "X Values"
#: tbl_chart.php:129
-#, fuzzy
#| msgid "Y Axis label"
msgid "Y-Axis label:"
-msgstr "Y Axis label"
+msgstr "Y-Axis label:"
#: tbl_chart.php:129
-#, fuzzy
#| msgid "Value"
msgid "Y Values"
-msgstr "Value"
+msgstr "Y Values"
#: tbl_create.php:56
#, php-format
diff --git a/server_status.php b/server_status.php
index cba7266..c56eb70 100644
--- a/server_status.php
+++ b/server_status.php
@@ -44,13 +44,16 @@ if (isset($_REQUEST['ajax_request'])) {
cleanDeprecated($queries);
// admin commands are not queries
unset($queries['Com_admin_commands']);
+
$sum=array_sum($queries);
$ret = Array('x'=>(microtime(true)*1000),'y'=>$sum,'pointInfo'=>$queries);
exit(json_encode($ret));
case 'traffic':
$traffic = PMA_DBI_fetch_result('SHOW GLOBAL STATUS WHERE Variable_name="Bytes_received" OR Variable_name="Bytes_sent"', 0, 1);
+
$ret = Array('x'=>(microtime(true)*1000),'y_sent'=>$traffic['Bytes_sent'],'y_received'=>$traffic['Bytes_received']);
exit(json_encode($ret));
+
}
}
}
@@ -73,6 +76,7 @@ $GLOBALS['js_include'][] = 'jquery/jquery.cookie.js'; // For tab persistence
$GLOBALS['js_include'][] = 'highcharts/highcharts.js';
/* Files required for chart exporting */
$GLOBALS['js_include'][] = 'highcharts/exporting.js';
+$GLOBALS['js_include'][] = 'canvg/flashcanvas.js';
$GLOBALS['js_include'][] = 'canvg/canvg.js';
$GLOBALS['js_include'][] = 'canvg/rgbcolor.js';
@@ -394,6 +398,8 @@ echo __('Runtime Information');
</a>
<a class="tabChart liveconnectionsLink" href="#">
<?php echo __('Live conn./process chart'); ?>
+
+
</a>
</div>
<div class="tabInnerContent">
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3528-gd404fd7
by Michal Čihař 14 Jun '11
by Michal Čihař 14 Jun '11
14 Jun '11
The branch, master has been updated
via d404fd72d66cce1cc876fed87c8d9944689f21a4 (commit)
via d7fc94529cef1f3bbdb1ec302c2d22dcfd039112 (commit)
via d26cace15bee541f8af9cac0d1ff157ab9e559db (commit)
from 4b73c39775b8234b66fd375aa3ac7387e945d704 (commit)
- Log -----------------------------------------------------------------
commit d404fd72d66cce1cc876fed87c8d9944689f21a4
Merge: 4b73c39775b8234b66fd375aa3ac7387e945d704 d7fc94529cef1f3bbdb1ec302c2d22dcfd039112
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Jun 14 17:21:30 2011 +0200
Merge remote-tracking branch 'tyron/master'
Conflicts:
server_status.php
commit d7fc94529cef1f3bbdb1ec302c2d22dcfd039112
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Tue Jun 14 17:08:15 2011 +0200
Fix for Live charting stopping when changing tabs in Firefox
commit d26cace15bee541f8af9cac0d1ff157ab9e559db
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Mon Jun 13 23:36:07 2011 +0200
Traffic charting for traffic tab on status page
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 5 +-
js/messages.php | 5 +-
js/server_status.js | 291 ++++++++++++++---------
server_status.php | 19 +-
themes/original/css/theme_right.css.php | 1 +
themes/original/jquery/jquery-ui-1.8.custom.css | 7 +-
themes/pmahomme/css/theme_right.css.php | 1 +
themes/pmahomme/jquery/jquery-ui-1.8.custom.css | 7 +-
8 files changed, 211 insertions(+), 125 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index 6266ba6..4ad7c77 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1419,8 +1419,6 @@ function PMA_createChart(passedSettings) {
thisChart.options.realtime.timeoutCallBack = function() {
$.get(passedSettings.realtime.url,{ajax_request:1, chart_data:1, type:passedSettings.realtime.type},function(data) {
- if(chart_activeTimeouts[container]==null) return;
-
curValue = jQuery.parseJSON(data);
//if(lastValue==null) lastValue = curValue;
@@ -1433,6 +1431,9 @@ function PMA_createChart(passedSettings) {
lastValue = curValue;
numLoadedPoints++;
+
+ // Timeout has been cleared => don't start a new timeout
+ if(chart_activeTimeouts[container]==null) return;
chart_activeTimeouts[container] = setTimeout(thisChart.options.realtime.timeoutCallBack, thisChart.options.realtime.refreshRate);
});
diff --git a/js/messages.php b/js/messages.php
index a09078e..01aede4 100644
--- a/js/messages.php
+++ b/js/messages.php
@@ -61,7 +61,10 @@ $js_messages['strRemovingSelectedUsers'] = __('Removing Selected Users');
$js_messages['strClose'] = __('Close');
/* for server_status.js */
-$js_messages['strRealtimeChart'] = __('Realtime chart');
+$js_messages['strLiveTrafficChart'] = __('Live traffic chart');
+$js_messages['strLiveConnChart'] = __('Live conn./process chart');
+$js_messages['strLiveQueryChart'] = __('Live query chart');
+
$js_messages['strStaticData'] = __('Static data');
/* l10n: Total number of queries */
$js_messages['strTotal'] = __('Total');
diff --git a/js/server_status.js b/js/server_status.js
index 75894ad..4413c80 100644
--- a/js/server_status.js
+++ b/js/server_status.js
@@ -51,7 +51,7 @@ $(function() {
var tabStatus = new Object();
// Holds the current chart instances for each tab
var tabChart = new Object();
-
+
// Add tabs
$('#serverStatusTabs').tabs({
// Tab persistence
@@ -64,7 +64,10 @@ $(function() {
$(".ui-widget-content:not(.ui-tabs):not(.ui-helper-clearfix)").addClass("ui-helper-clearfix");
// Initialize each tab
- $('div.ui-tabs-panel').each(function() { initTab($(this),null); });
+ $('div.ui-tabs-panel').each(function() {
+ initTab($(this),null);
+ tabStatus[$(this).attr('id')] = 'static';
+ });
$('.statuslinks select').change(function() {
var chart=tabChart[$(this).parents('div.ui-tabs-panel').attr('id')];
@@ -93,83 +96,145 @@ $(function() {
return false;
});
- /** Realtime charting of variables (always the third element) **/
- $('.statuslinks a.tabChart').click(function() {
+
+ /** Realtime charting of variables **/
+
+ // Live traffic charting
+ $('.statuslinks a.livetrafficLink').click(function() {
// ui-tabs-panel class is added by the jquery tabs feature
- var tab=$(this).parents('div.ui-tabs-panel');
+ var $tab=$(this).parents('div.ui-tabs-panel');
+ var tabstat = tabStatus[$tab.attr('id')];
- if(tabStatus[tab.attr('id')]!='realtime') {
- var series, title;
- var settings = new Object();
+ if(tabstat=='static' || tabstat=='liveconnections') {
+ var settings = {
+ series: [{name:'kB sent since last refresh',data:[]},{name:'kB received since last refresh',data:[]}],
+ title: {text:'Server traffic (in kB)'},
+ realtime:{ url:'server_status.php?'+url_query,
+ type: 'traffic',
+ callback: function(chartObj, curVal, lastVal,numLoadedPoints) {
+ if(lastVal==null) return;
+ chartObj.series[0].addPoint(
+ { x:curVal.x, y:(curVal.y_sent-lastVal.y_sent)/1024},
+ false, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
+ );
+ chartObj.series[1].addPoint(
+ { x:curVal.x, y:(curVal.y_received-lastVal.y_received)/1024},
+ true, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
+ );
+ }
+ }
+ }
- switch(tab.attr('id')) {
- case 'statustabs_traffic':
- settings = {
- series: [{name:'Connections since last refresh', data:[]},{name:'Processes', data:[]}],
- title: {text:'Connections / Processes'},
- realtime:{ url:'server_status.php?'+url_query,
- type: 'proc',
- callback: function(chartObj, curVal, lastVal,numLoadedPoints) {
- if(lastVal==null) return;
- chartObj.series[0].addPoint(
- { x:curVal.x, y:curVal.y_conn-lastVal.y_conn },
- false, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
- );
- chartObj.series[1].addPoint(
- { x:curVal.x, y:curVal.y_proc },
- true, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
- );
- }
- }
- };
- break;
- case 'statustabs_queries':
- settings = {
- series: [{name:'Issued queries since last refresh', data:[]}],
- title: {text:'Issued queries'},
- tooltip: { formatter:function() { return this.point.name; } },
- realtime:{ url:'server_status.php?'+url_query,
- type: 'queries',
- callback: function(chartObj, curVal, lastVal,numLoadedPoints) {
- if(lastVal==null) return;
- chartObj.series[0].addPoint(
- { x:curVal.x, y:curVal.y-lastVal.y, name:sortedQueriesPointInfo(curVal,lastVal) },
- true, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
- );
- }
- }
- };
- break;
+ setupLiveChart($tab,this,settings);
+ if(tabstat=='liveconnections') $tab.find('.statuslinks a.liveconnectionsLink').html(PMA_messages['strLiveConnChart']);
+ tabStatus[$tab.attr('id')]='livetraffic';
+ } else {
+ $(this).html(PMA_messages['strLiveTrafficChart']);
+ setupLiveChart($tab,this,null);
+ }
+
+ return false;
+ });
+
+ // Live connection/process charting
+ $('.statuslinks a.liveconnectionsLink').click(function() {
+ var $tab=$(this).parents('div.ui-tabs-panel');
+ var tabstat = tabStatus[$tab.attr('id')];
+
+ if(tabstat=='static' || tabstat=='livetraffic') {
+ var settings = {
+ series: [{name:'Connections since last refresh', data:[]},{name:'Processes', data:[]}],
+ title: {text:'Connections / Processes'},
+ realtime:{ url:'server_status.php?'+url_query,
+ type: 'proc',
+ callback: function(chartObj, curVal, lastVal,numLoadedPoints) {
+ if(lastVal==null) return;
+ chartObj.series[0].addPoint(
+ { x:curVal.x, y:curVal.y_conn-lastVal.y_conn },
+ false, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
+ );
+ chartObj.series[1].addPoint(
+ { x:curVal.x, y:curVal.y_proc },
+ true, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
+ );
+ }
+ }
+ };
+
+ setupLiveChart($tab,this,settings);
+ if(tabstat=='livetraffic') $tab.find('.statuslinks a.livetrafficLink').html(PMA_messages['strLiveTrafficChart']);
+ tabStatus[$tab.attr('id')]='liveconnections';
+ } else {
+ $(this).html(PMA_messages['strLiveConnChart']);
+ setupLiveChart($tab,this,null);
+ }
+
+ return false;
+ });
- default:
- return;
+ // Live query charting
+ $('.statuslinks a.livequeriesLink').click(function() {
+ var $tab=$(this).parents('div.ui-tabs-panel');
+ var settings=null;
+
+ if(tabStatus[$tab.attr('id')]=='static') {
+ settings = {
+ series: [{name:'Issued queries since last refresh', data:[]}],
+ title: {text:'Issued queries'},
+ tooltip: { formatter:function() { return this.point.name; } },
+ realtime:{ url:'server_status.php?'+url_query,
+ type: 'queries',
+ callback: function(chartObj, curVal, lastVal,numLoadedPoints) {
+ if(lastVal==null) return;
+ chartObj.series[0].addPoint(
+ { x:curVal.x, y:curVal.y-lastVal.y, name:sortedQueriesPointInfo(curVal,lastVal) },
+ true, numLoadedPoints >= chartObj.options.realtime.numMaxPoints
+ );
+ }
+ }
+ };
+ } else {
+ $(this).html(PMA_messages['strLiveQueryChart']);
+ }
+
+ setupLiveChart($tab,this,settings);
+ tabStatus[$tab.attr('id')]='livequeries';
+ return false;
+ });
+
+ function setupLiveChart($tab,link,settings) {
+ if(settings!=null) {
+ // Loading a chart with existing chart => remove old chart first
+ if(tabStatus[$tab.attr('id')]!='static') {
+ clearTimeout(chart_activeTimeouts[$tab.attr('id')+"_chart_cnt"]);
+ chart_activeTimeouts[$tab.attr('id')+"_chart_cnt"]=null;
+ tabChart[$tab.attr('id')].destroy();
+ // Also reset the select list
+ $tab.find('.statuslinks select').get(0).selectedIndex=0;
}
-
+
if(!settings.chart) settings.chart = {};
- settings.chart.renderTo=tab.attr('id')+"_chart_cnt";
+ settings.chart.renderTo=$tab.attr('id')+"_chart_cnt";
- tab.find('.tabInnerContent')
+ $tab.find('.tabInnerContent')
.hide()
- .after('<div style="clear:both; min-width:500px; height:400px; padding-bottom:80px;" id="'+tab.attr('id')+'_chart_cnt"></div>');
- tabStatus[tab.attr('id')]='realtime';
- tabChart[tab.attr('id')]=PMA_createChart(settings);
- $(this).html(PMA_messages['strStaticData']);
- tab.find('.statuslinks a.tabRefresh').hide();
- tab.find('.statuslinks select').show();
+ .after('<div style="clear:both; min-width:500px; height:400px; padding-bottom:80px;" id="'+$tab.attr('id')+'_chart_cnt"></div>');
+ tabChart[$tab.attr('id')]=PMA_createChart(settings);
+ $(link).html(PMA_messages['strStaticData']);
+ $tab.find('.statuslinks a.tabRefresh').hide();
+ $tab.find('.statuslinks select').show();
} else {
- clearTimeout(chart_activeTimeouts[tab.attr('id')+"_chart_cnt"]);
- chart_activeTimeouts[tab.attr('id')+"_chart_cnt"]=null;
- tab.find('.tabInnerContent').show();
- tab.find('div#'+tab.attr('id')+'_chart_cnt').remove();
- tabStatus[tab.attr('id')]='data';
- tabChart[tab.attr('id')].destroy();
- $(this).html(PMA_messages['strRealtimeChart']);
- tab.find('.statuslinks a.tabRefresh').show();
- tab.find('.statuslinks select').hide();
+ clearTimeout(chart_activeTimeouts[$tab.attr('id')+"_chart_cnt"]);
+ chart_activeTimeouts[$tab.attr('id')+"_chart_cnt"]=null;
+ $tab.find('.tabInnerContent').show();
+ $tab.find('div#'+$tab.attr('id')+'_chart_cnt').remove();
+ tabStatus[$tab.attr('id')]='static';
+ tabChart[$tab.attr('id')].destroy();
+ $tab.find('.statuslinks a.tabRefresh').show();
+ $tab.find('.statuslinks select').get(0).selectedIndex=0;
+ $tab.find('.statuslinks select').hide();
}
- return false;
- });
-
+ }
/* 3 Filtering functions */
$('#filterAlert').change(function() {
@@ -197,54 +262,54 @@ $(function() {
initTooltips();
break;
case 'statustabs_queries':
- if(data!=null) {
- queryPieChart.destroy();
- tab.find('.tabInnerContent').html(data);
- }
+ if(data!=null) {
+ queryPieChart.destroy();
+ tab.find('.tabInnerContent').html(data);
+ }
- // Build query statistics chart
- var cdata = new Array();
- $.each(jQuery.parseJSON($('#serverstatusquerieschart').html()),function(key,value) {
- cdata.push([key,parseInt(value)]);
- });
-
- queryPieChart=PMA_createChart({
- chart: {
- renderTo: 'serverstatusquerieschart'
-
- },
- title: {
- text:'',
- margin:0
- },
- series: [{
- type:'pie',
- name: 'Query statistics',
- data: cdata
- }],
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- formatter: function() {
- return '<b>'+ this.point.name +'</b><br> '+ Highcharts.numberFormat(this.percentage, 2) +' %';
- }
- }
- }
- },
- tooltip: {
- formatter: function() { return '<b>'+ this.point.name +'</b><br/>'+Highcharts.numberFormat(this.y, 2)+'<br/>('+Highcharts.numberFormat(this.percentage, 2) +' %)'; }
- }
- });
+ // Build query statistics chart
+ var cdata = new Array();
+ $.each(jQuery.parseJSON($('#serverstatusquerieschart').html()),function(key,value) {
+ cdata.push([key,parseInt(value)]);
+ });
+
+ queryPieChart=PMA_createChart({
+ chart: {
+ renderTo: 'serverstatusquerieschart'
+
+ },
+ title: {
+ text:'',
+ margin:0
+ },
+ series: [{
+ type:'pie',
+ name: 'Query statistics',
+ data: cdata
+ }],
+ plotOptions: {
+ pie: {
+ allowPointSelect: true,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: true,
+ formatter: function() {
+ return '<b>'+ this.point.name +'</b><br> '+ Highcharts.numberFormat(this.percentage, 2) +' %';
+ }
+ }
+ }
+ },
+ tooltip: {
+ formatter: function() { return '<b>'+ this.point.name +'</b><br/>'+Highcharts.numberFormat(this.y, 2)+'<br/>('+Highcharts.numberFormat(this.percentage, 2) +' %)'; }
+ }
+ });
break;
-
+
case 'statustabs_allvars':
if(data!=null) {
- tab.find('.tabInnerContent').html(data);
- filterVariables();
- }
+ tab.find('.tabInnerContent').html(data);
+ filterVariables();
+ }
break;
}
diff --git a/server_status.php b/server_status.php
index 0ebfa0f..cba7266 100644
--- a/server_status.php
+++ b/server_status.php
@@ -44,10 +44,12 @@ if (isset($_REQUEST['ajax_request'])) {
cleanDeprecated($queries);
// admin commands are not queries
unset($queries['Com_admin_commands']);
-
$sum=array_sum($queries);
-
- $ret = Array('x'=>(microtime(true)*1000),'y'=>$sum,'pointInfo'=>$queries,'numQueries'=>count($queries));
+ $ret = Array('x'=>(microtime(true)*1000),'y'=>$sum,'pointInfo'=>$queries);
+ exit(json_encode($ret));
+ case 'traffic':
+ $traffic = PMA_DBI_fetch_result('SHOW GLOBAL STATUS WHERE Variable_name="Bytes_received" OR Variable_name="Bytes_sent"', 0, 1);
+ $ret = Array('x'=>(microtime(true)*1000),'y_sent'=>$traffic['Bytes_sent'],'y_received'=>$traffic['Bytes_received']);
exit(json_encode($ret));
}
}
@@ -387,8 +389,11 @@ echo __('Runtime Information');
<option value="600">10 <?php echo __('minutes'); ?></option>
</select>
- <a class="tabChart" href="#">
- <?php echo __('Realtime chart'); ?>
+ <a class="tabChart livetrafficLink" href="#">
+ <?php echo __('Live traffic chart'); ?>
+ </a>
+ <a class="tabChart liveconnectionsLink" href="#">
+ <?php echo __('Live conn./process chart'); ?>
</a>
</div>
<div class="tabInnerContent">
@@ -414,8 +419,8 @@ echo __('Runtime Information');
<option value="300">5 <?php echo __('minutes'); ?></option>
<option value="600">10 <?php echo __('minutes'); ?></option>
</select>
- <a class="tabChart" href="#">
- <?php echo __('Realtime chart'); ?>
+ <a class="tabChart livequeriesLink" href="#">
+ <?php echo __('Live query chart'); ?>
</a>
</div>
<div class="tabInnerContent">
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index f2bbfb8..94ed5fe 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -972,6 +972,7 @@ table#serverstatusqueriesdetails th.headerSortDown img.sortableIcon, table#serve
.statuslinks {
float: <?php echo $right; ?>;
+ white-space: nowrap;
}
/* Also used for the variables page */
diff --git a/themes/original/jquery/jquery-ui-1.8.custom.css b/themes/original/jquery/jquery-ui-1.8.custom.css
index b2ad14f..f9cc5b7 100644
--- a/themes/original/jquery/jquery-ui-1.8.custom.css
+++ b/themes/original/jquery/jquery-ui-1.8.custom.css
@@ -414,7 +414,12 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
+/*.ui-tabs .ui-tabs-hide { display: none !important; }*/
+/* Firefox has issues rendering SVG in display:none elements. See also http://jqueryui.com/demos/tabs/#...my_slider.2C_Google_Map.2C_sIFR_etc._not… */
+.ui-tabs .ui-tabs-hide {
+ position: absolute;
+ left: -10000px;
+}
/* Datepicker
----------------------------------*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index 7092358..c403698 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -1175,6 +1175,7 @@ table#serverstatusqueriesdetails th.headerSortDown img.sortableIcon, table#serve
.statuslinks {
float: <?php echo $right; ?>;
+ white-space: nowrap;
}
/* Also used for the variables page */
diff --git a/themes/pmahomme/jquery/jquery-ui-1.8.custom.css b/themes/pmahomme/jquery/jquery-ui-1.8.custom.css
index d6a599f..9946953 100644
--- a/themes/pmahomme/jquery/jquery-ui-1.8.custom.css
+++ b/themes/pmahomme/jquery/jquery-ui-1.8.custom.css
@@ -414,7 +414,12 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
+/*.ui-tabs .ui-tabs-hide { display: none !important; }*/
+/* Firefox has issues rendering SVG in display:none elements. See also http://jqueryui.com/demos/tabs/#...my_slider.2C_Google_Map.2C_sIFR_etc._not… */
+.ui-tabs .ui-tabs-hide {
+ position: absolute;
+ left: -10000px;
+}
/* Datepicker
----------------------------------*/
.ui-datepicker { width: 17em; padding: .2em .2em 0; }
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3525-g4b73c39
by Michal Čihař 14 Jun '11
by Michal Čihař 14 Jun '11
14 Jun '11
The branch, master has been updated
via 4b73c39775b8234b66fd375aa3ac7387e945d704 (commit)
from b2651b53a350a1bb8104e68ef11801fb138da636 (commit)
- Log -----------------------------------------------------------------
commit 4b73c39775b8234b66fd375aa3ac7387e945d704
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Jun 14 14:21:48 2011 +0200
Always use long <?php tags
-----------------------------------------------------------------------
Summary of changes:
libraries/mult_submits.inc.php | 8 ++--
server_status.php | 106 ++++++++++++++++++++--------------------
sql.php | 6 +-
3 files changed, 60 insertions(+), 60 deletions(-)
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php
index 8038705..74ff20f 100644
--- a/libraries/mult_submits.inc.php
+++ b/libraries/mult_submits.inc.php
@@ -29,7 +29,7 @@ if (! empty($submit_mult)
} else {
$selected = $selected_tbl;
switch ($submit_mult) {
- case 'add_prefix_tbl':
+ case 'add_prefix_tbl':
case 'replace_prefix_tbl':
case 'copy_tbl_change_prefix':
case 'drop_db':
@@ -254,7 +254,7 @@ if (!empty($submit_mult) && !empty($what)) {
</table>
</fieldset>
<fieldset class="tblFooters">
- <button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><? echo __('Submit'); ?></button>
+ <button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><?php echo __('Submit'); ?></button>
</fieldset>
<?php
}
@@ -268,7 +268,7 @@ if (!empty($submit_mult) && !empty($what)) {
</table>
</fieldset>
<fieldset class="tblFooters">
- <button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><? echo __('Submit'); ?></button>
+ <button type="submit" name="mult_btn" value="<?php echo __('Yes'); ?>" id="buttonYes"><?php echo __('Submit'); ?></button>
</fieldset>
<?php
}
@@ -410,7 +410,7 @@ elseif ($mult_btn == __('Yes')) {
. PMA_backquote($selected[$i])
. (($i == $selected_cnt-1) ? ');' : '');
break;
-
+
case 'add_prefix_tbl':
$newtablename = $add_prefix . $selected[$i];
$a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // ADD PREFIX TO TABLE NAME
diff --git a/server_status.php b/server_status.php
index 70bd5d0..0ebfa0f 100644
--- a/server_status.php
+++ b/server_status.php
@@ -17,7 +17,7 @@ if (! defined('PMA_NO_VARIABLES_IMPORT')) {
require_once './libraries/common.inc.php';
-/**
+/**
* Ajax request
*/
@@ -27,7 +27,7 @@ if (isset($_REQUEST['ajax_request'])) {
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header_remove('Last-Modified');
- if (isset($_REQUEST["query_chart"])) {
+ if (isset($_REQUEST["query_chart"])) {
exit(createQueryChart());
}
if(isset($_REQUEST['chart_data'])) {
@@ -36,7 +36,7 @@ if (isset($_REQUEST['ajax_request'])) {
$c = PMA_DBI_fetch_result('SHOW GLOBAL STATUS WHERE Variable_name="Connections"', 0, 1);
$result = PMA_DBI_query('SHOW PROCESSLIST');
$num_procs = PMA_DBI_num_rows($result);
-
+
$ret = Array('x'=>(microtime(true)*1000),'y_proc'=>$num_procs,'y_conn'=>$c['Connections']);
exit(json_encode($ret));
case 'queries':
@@ -44,15 +44,15 @@ if (isset($_REQUEST['ajax_request'])) {
cleanDeprecated($queries);
// admin commands are not queries
unset($queries['Com_admin_commands']);
-
+
$sum=array_sum($queries);
-
+
$ret = Array('x'=>(microtime(true)*1000),'y'=>$sum,'pointInfo'=>$queries,'numQueries'=>count($queries));
exit(json_encode($ret));
}
}
}
-
+
/**
* Replication library
@@ -63,7 +63,7 @@ require_once './libraries/replication_gui.lib.php';
/**
* JS Includes
*/
-
+
$GLOBALS['js_include'][] = 'server_status.js';
$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';
$GLOBALS['js_include'][] = 'jquery/jquery.tablesorter.js';
@@ -176,7 +176,7 @@ if (isset($server_status['Uptime_since_flush_status'])) {
$allocations = array(
// variable name => section
// variable names match when they begin with the given string
-
+
'Com_' => 'com',
'Innodb_' => 'innodb',
'Ndb_' => 'ndb',
@@ -321,7 +321,7 @@ if(isset($_REQUEST['show']) && isset($_REQUEST['ajax_request'])) {
// Prints the variables table
printVariablesTable();
exit();
-
+
default:
break;
}
@@ -330,7 +330,7 @@ if(isset($_REQUEST['show']) && isset($_REQUEST['ajax_request'])) {
/**
* start output
*/
-
+
/**
* Does the common work
*/
@@ -349,14 +349,14 @@ url_query = '<?php echo $url_query;?>';
pma_theme_image = '<?php echo $GLOBALS['pmaThemeImage']; ?>';
</script>
<div id="serverstatus">
- <h2><?
+ <h2><?php
/**
* Displays the sub-page heading
*/
if($GLOBALS['cfg']['MainPageIconic'])
echo '<img class="icon" src="' . $GLOBALS['pmaThemeImage'] . 's_status.png" width="16" height="16" alt="" />';
-
+
echo __('Runtime Information');
?></h2>
@@ -366,7 +366,7 @@ echo __('Runtime Information');
<li><a href="#statustabs_queries"><?php echo __('Query statistics'); ?></a></li>
<li><a href="#statustabs_allvars"><?php echo __('All status variables'); ?></a></li>
</ul>
-
+
<div id="statustabs_traffic">
<div class="statuslinks">
<a class="tabRefresh" href="<?php echo $PMA_PHP_SELF . '?show=server_traffic&' . PMA_generate_common_url(); ?>" >
@@ -386,11 +386,11 @@ echo __('Runtime Information');
<option value="300">5 <?php echo __('minutes'); ?></option>
<option value="600">10 <?php echo __('minutes'); ?></option>
</select>
-
+
<a class="tabChart" href="#">
<?php echo __('Realtime chart'); ?>
</a>
- </div>
+ </div>
<div class="tabInnerContent">
<?php printServerTraffic(); ?>
</div>
@@ -417,7 +417,7 @@ echo __('Runtime Information');
<a class="tabChart" href="#">
<?php echo __('Realtime chart'); ?>
</a>
- </div>
+ </div>
<div class="tabInnerContent">
<?php printQueryStatistics(); ?>
</div>
@@ -437,7 +437,7 @@ echo __('Runtime Information');
</div>
<div class="formelement">
<input type="checkbox" name="filterAlert" id="filterAlert">
- <label for="filterAlert"><?php echo __('Show only alert values'); ?></label>
+ <label for="filterAlert"><?php echo __('Show only alert values'); ?></label>
</div>
<div class="formelement">
<select id="filterCategory" name="filterCategory">
@@ -448,7 +448,7 @@ echo __('Runtime Information');
<option value='<?php echo $section_id; ?>'><?php echo $section_name; ?></option>
<?php
}
-
+
?>
</select>
</div>
@@ -485,9 +485,9 @@ echo __('Runtime Information');
function printQueryStatistics() {
global $server_status, $used_queries, $url_query, $PMA_PHP_SELF;
-
+
$hour_factor = 3600 / $server_status['Uptime'];
-
+
$total_queries = array_sum($used_queries);
?>
@@ -499,17 +499,17 @@ function printQueryStatistics() {
?>
<br>
<span style="font-size:60%; display:inline;">
- ø <?php echo __('per hour'); ?>:
+ ø <?php echo __('per hour'); ?>:
<?php echo PMA_formatNumber($total_queries * $hour_factor, 0); ?><br>
- ø <?php echo __('per minute'); ?>:
+ ø <?php echo __('per minute'); ?>:
<?php echo PMA_formatNumber( $total_queries * 60 / $server_status['Uptime'], 0); ?><br>
<?php if($total_queries / $server_status['Uptime'] >= 1) {
?>
- ø <?php echo __('per second'); ?>:
+ ø <?php echo __('per second'); ?>:
<?php echo PMA_formatNumber( $total_queries / $server_status['Uptime'], 0); ?><br>
-
+
<?php
}
@@ -527,7 +527,7 @@ function printQueryStatistics() {
<col class="valuecol" span="3" />
<thead>
<tr><th><?php echo __('Query type'); ?></th>
- <th><?php
+ <th><?php
/* l10n: # = Amount of queries */
echo __('#');
?>
@@ -548,7 +548,7 @@ function printQueryStatistics() {
// the number of connections is not an item of the Query types
// but is included in Questions. Then the total of the percentages is 100.
$name = str_replace(Array('Com_','_'), Array('',' '), $name);
-
+
if($value < $query_sum * 0.02)
$other_sum += $value;
else $chart_json[$name] = $value;
@@ -556,9 +556,9 @@ function printQueryStatistics() {
<tr class="noclick <?php echo $odd_row ? 'odd' : 'even'; ?>">
<th class="name"><?php echo htmlspecialchars($name); ?></th>
<td class="value"><?php echo PMA_formatNumber($value, 5, 0, true); ?></td>
- <td class="value"><?php echo
+ <td class="value"><?php echo
PMA_formatNumber($value * $hour_factor, 4, 1, true); ?></td>
- <td class="value"><?php echo
+ <td class="value"><?php echo
PMA_formatNumber($value * $perc_factor, 0, 2); ?>%</td>
</tr>
<?php
@@ -566,9 +566,9 @@ function printQueryStatistics() {
?>
</tbody>
</table>
-
+
<div id="serverstatusquerieschart" style="width:500px; height:350px; ">
- <?php
+ <?php
/*// Generate the graph if this is an ajax request
if(isset($_REQUEST['ajax_request'])) {
echo createQueryChart();
@@ -576,12 +576,12 @@ function printQueryStatistics() {
echo '<a href="'.$PMA_PHP_SELF.'?'.$url_query.'&query_chart=1#serverstatusqueries"'
.'title="' . __('Show query chart') . '">['.__('Show query chart').']</a>';
}*/
-
+
if($other_sum>0)
$chart_json[__('Other')] = $other_sum;
-
+
echo json_encode($chart_json);
-
+
?>
</div>
<?php
@@ -590,9 +590,9 @@ function printQueryStatistics() {
function printServerTraffic() {
global $server_status,$PMA_PHP_SELF;
global $server_master_status, $server_slave_status;
-
+
$hour_factor = 3600 / $server_status['Uptime'];
-
+
/**
* starttime calculation
*/
@@ -600,7 +600,7 @@ function printServerTraffic() {
'SELECT UNIX_TIMESTAMP() - ' . $server_status['Uptime']);
?>
- <h3><?php /* echo __('<b>Server traffic</b>: These tables show the network traffic statistics of this MySQL server since its startup.');*/
+ <h3><?php /* echo __('<b>Server traffic</b>: These tables show the network traffic statistics of this MySQL server since its startup.');*/
echo sprintf(__('Network traffic since startup: %s'),
implode(' ', PMA_formatByteDown( $server_status['Bytes_received'] + $server_status['Bytes_sent'], 3, 1))
);
@@ -749,7 +749,7 @@ function printServerTraffic() {
</tr>
</tbody>
</table>
- <?
+ <?php
$url_params = array();
@@ -778,15 +778,15 @@ function printServerTraffic() {
<th><?php echo __('Command'); ?></th>
<th><?php echo __('Time'); ?></th>
<th><?php echo __('Status'); ?></th>
- <th><?php
- echo __('SQL query');
+ <th><?php
+ echo __('SQL query');
if (!PMA_DRIZZLE) { ?>
<a href="<?php echo $full_text_link; ?>"
title="<?php echo empty($full) ? __('Show Full Queries') : __('Truncate Shown Queries'); ?>">
<img src="<?php echo $GLOBALS['pmaThemeImage'] . 's_' . (empty($_REQUEST['full']) ? 'full' : 'partial'); ?>text.png"
alt="<?php echo empty($_REQUEST['full']) ? __('Show Full Queries') : __('Truncate Shown Queries'); ?>" />
</a>
- <? } ?>
+ <?php } ?>
</th>
</tr>
</thead>
@@ -942,7 +942,7 @@ function printVariablesTable() {
'Threads_created' => __('The number of threads created to handle connections. If Threads_created is big, you may want to increase the thread_cache_size value. (Normally this doesn\'t give a notable performance improvement if you have a good thread implementation.)'),
'Threads_running' => __('The number of threads that are not sleeping.')
);
-
+
/**
* define some alerts
*/
@@ -976,7 +976,7 @@ function printVariablesTable() {
'Opened_tables' => 0,
'Table_locks_waited' => 0,
'Qcache_lowmem_prunes' => 0,
-
+
'Qcache_free_blocks' => $server_status['Qcache_total_blocks'] / 5,
'Slow_launch_threads' => 0,
@@ -996,7 +996,7 @@ function printVariablesTable() {
// variable => min value
//'Handler read key' => '> ',
);
-
+
?>
<table class="data sortable" id="serverstatusvariables">
<col class="namecol" />
@@ -1014,10 +1014,10 @@ function printVariablesTable() {
<th colspan="3" class="tblFooters">
</th>
</tr>
- </tfoot>-->
+ </tfoot>-->
<tbody>
- <?
-
+ <?php
+
$odd_row = false;
foreach ($server_status as $name => $value) {
$odd_row = !$odd_row;
@@ -1083,17 +1083,17 @@ function createQueryChart($com_vars=FALSE) {
*/
require_once './libraries/chart.lib.php';
- if(!$com_vars)
+ if(!$com_vars)
$com_vars = PMA_DBI_fetch_result("SHOW GLOBAL STATUS LIKE 'Com\_%'", 0, 1);
-
+
// admin commands are not queries (e.g. they include COM_PING, which is excluded from $server_status['Questions'])
unset($com_vars['Com_admin_commands']);
-
+
arsort($com_vars);
-
+
$merge_minimum = array_sum($com_vars) * 0.005;
$merged_value = 0;
-
+
// remove zero values from the end, as well as merge together every value that is below 0.5%
// variable empty for Drizzle
if ($com_vars) {
@@ -1101,11 +1101,11 @@ function createQueryChart($com_vars=FALSE) {
array_pop($com_vars);
$merged_value += $last_element;
}
-
+
$com_vars['Other'] = $merged_value;
return PMA_chart_status($com_vars);
}
-
+
return '';
}
diff --git a/sql.php b/sql.php
index cb21b20..e8850fb 100644
--- a/sql.php
+++ b/sql.php
@@ -904,7 +904,7 @@ pma_token = '<?php echo $_SESSION[' PMA_token ']; ?>';
url_query = '<?php echo isset($url_query)?$url_query:PMA_generate_common_url($db);?>';
$(document).ready(createProfilingChart);
</script>
-<?
+<?php
echo '<fieldset><legend>' . __('Profiling') . '</legend>' . "\n";
echo '<div style="float: left;">';
echo '<table>' . "\n";
@@ -928,9 +928,9 @@ $(document).ready(createProfilingChart);
//PMA_chart_profiling($profiling_results);
echo json_encode($chart_json);
echo '</div>';
- echo '</fieldset>' . "\n";
+ echo '</fieldset>' . "\n";
}
-
+
// Displays the results in a table
if (empty($disp_mode)) {
// see the "PMA_setDisplayMode()" function in
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2-3524-gb2651b5
by Michal Čihař 14 Jun '11
by Michal Čihař 14 Jun '11
14 Jun '11
The branch, master has been updated
via b2651b53a350a1bb8104e68ef11801fb138da636 (commit)
from 9ac6131328e00b1883007d26919d74792c05337b (commit)
- Log -----------------------------------------------------------------
commit b2651b53a350a1bb8104e68ef11801fb138da636
Author: Michal Čihař <mcihar(a)novell.com>
Date: Tue Jun 14 14:04:27 2011 +0200
Changelog entries
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 60b046b..49c7305 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@
+ rfe #3310562 Wording about Column
+ AJAX for Add a user in Database privileges
+ Patch #3271804 for rfe #3177495, new DisableMultiTableMaintenance directive
++ [interface] Reorganised server status page.
++ [interface] Changed way of generating charts.
3.4.3.0 (not yet released)
- bug #3311170 [sync] Missing helper icons in Synchronize
hooks/post-receive
--
phpMyAdmin
1
0