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 localized documentation branch, master, updated. 647d4a49a086a8b3ad24c8a85e30fb52abfaaf60
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 647d4a49a086a8b3ad24c8a85e30fb52abfaaf60 (commit)
via 55281793cc43c3a6f73931c3e596ca1ba10fc560 (commit)
via 76c5a6ae6fc4f5215d652559fa6c98196ff4797d (commit)
via 0988f8268c6174482ed390ffc07dcd7891cde3ea (commit)
via 84590b5c04236b98c3fa8dbbd380e2ce4f1a4345 (commit)
from ab450ea1dbcad60c755df1d80bb16093010ee0fa (commit)
- Log -----------------------------------------------------------------
commit 647d4a49a086a8b3ad24c8a85e30fb52abfaaf60
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:56:49 2011 +0200
Translation update done using Pootle.
commit 55281793cc43c3a6f73931c3e596ca1ba10fc560
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:56:07 2011 +0200
Translation update done using Pootle.
commit 76c5a6ae6fc4f5215d652559fa6c98196ff4797d
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:55:28 2011 +0200
Translation update done using Pootle.
commit 0988f8268c6174482ed390ffc07dcd7891cde3ea
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:55:16 2011 +0200
Translation update done using Pootle.
commit 84590b5c04236b98c3fa8dbbd380e2ce4f1a4345
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:53:07 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/ja.po | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/po/ja.po b/po/ja.po
index 4521378..47f5dc9 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin-docs VERSION\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-05-30 11:20+0300\n"
-"PO-Revision-Date: 2011-06-02 11:51+0200\n"
+"PO-Revision-Date: 2011-06-02 11:56+0200\n"
"Last-Translator: Yuichiro <yuichiro(a)pop07.odn.ne.jp>\n"
"Language-Team: Japan <jp(a)li.org>\n"
"Language: ja\n"
@@ -5349,15 +5349,14 @@ msgid ""
"and still print them out. The vertical mode sorts each row on a vertical "
"lineup."
msgstr ""
-"表示モードには横並び (horizontal)、横並び縦ヘッダ (horizontalflipped)、縦並び (vertical)の3つがありますが、"
-"どれをデフォルトの表示にするかを定義します。横並びモードでは各行の内容を横一列に並べます。横並び縦ヘッダモードでは、ヘッダを 90 "
+"表示モードには水平 (horizontal)、水平縦ヘッダ (horizontalflipped)、垂直 (vertical)の3つがありますが、どれを"
+"デフォルトの表示にするかを定義します。水平モードでは各行の内容を横一列に並べます。水平縦ヘッダモードでは、ヘッダを 90 "
"度回転させることで、フィールドに小さな値しか入っていない場合でも詳細なヘッダを表示できるようにします。縦並びモードでは各行の内容を縦一列に並べます。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:1956
-#, fuzzy
msgid "$cfg['RememberSorting'] boolean"
-msgstr "$cfg['ThemePerServer'] boolean"
+msgstr "$cfg['RememberSorting'] boolean"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:1957
@@ -5380,7 +5379,7 @@ msgid ""
"good as CSS. The 'auto' option enables CSS transformation when browser "
"supports it and use PHP based one otherwise."
msgstr ""
-"HeaderFlipType に設定できる値は「auto」、「css」、「fake」のいずれかです。「css」の場合、横並び縦ヘッダ "
+"HeaderFlipType に設定できる値は「auto」、「css」、「fake」のいずれかです。「css」の場合、水平縦ヘッダ "
"(horizontalflipped) モードでのヘッダの回転は CSS を通じて行われます。CSS 変形は Internet Explorer "
"のみ機能します。「fake」の場合は PHP が変換を行いますが、もちろんこの場合、CSS "
"ほどの見栄えにはなりません。「auto」オプションは、ブラウザがサポートしている場合は CSS 変形を有効しますが、それ以外では PHP "
@@ -5407,10 +5406,10 @@ msgid ""
"This way you can still effectively edit large number of columns, while "
"having full view on few of them."
msgstr ""
-"テーブルのカラムを修正/新規作成する際、通常はすべてのフィールドが一列に横並びします(デフォルトの「横並び (horizontal)」)。「縦並び (v"
-"ertical)」にすると、各フィールドが上から下へ縦並びになります。こうすると、横幅を大いに節約できるため、スクロールする必要がなくなります。整数を設"
-"定すると、これ以下のカラム数を編集しているときは「縦並び (vertical)」モードで、これを超えたカラム数を編集しているときは「横並び (horiz"
-"ontal)」モードで表示されます。このモードは多くのカラム数を編集するとき効果的で、少数のカラムの場合には自動的に全てが見渡せる表示になります。"
+"テーブルのカラムを修正/新規作成する際、通常はすべてのフィールドが一列に横並びします(デフォルトの「水平 (horizontal)」)。「垂直 (ver"
+"tical)」にすると、各フィールドが上から下へ縦並びになります。こうすると、横幅を大いに節約できるため、スクロールする必要がなくなります。整数を設定す"
+"ると、これ以下のカラム数を編集しているときは「垂直 (vertical)」モードで、これを超えたカラム数を編集しているときは「水平 (horizonta"
+"l)」モードで表示されます。このモードは多くのカラム数を編集するとき効果的で、少数のカラムの場合には自動的に全てが見渡せる表示になります。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:1982
@@ -13123,6 +13122,8 @@ msgid ""
"<a href=\"http://www.wikipedia.org/wiki/Changelog\">Changelog</a> - a log or "
"record of changes made to a project."
msgstr ""
+"<a href=\"http://www.wikipedia.org/wiki/Changelog\">変更履歴</a> - "
+"プロジェクトに加えられた変更の記録"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5008
hooks/post-receive
--
phpMyAdmin localized documentation
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2938-g745877a
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 745877a6a0e59f8433c3b90056858a753da60330 (commit)
via 961f170b51260cf79eda34b700c37730c6d975ef (commit)
via 53431974b1abd36af205e15927b453e447797e49 (commit)
from 469624c23d97848da668c787ae15d75199ac6272 (commit)
- Log -----------------------------------------------------------------
commit 745877a6a0e59f8433c3b90056858a753da60330
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 16:20:37 2011 +0200
Fix clearing the query box for non table based SQL
commit 961f170b51260cf79eda34b700c37730c6d975ef
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 16:09:21 2011 +0200
Whitespace cleanup
commit 53431974b1abd36af205e15927b453e447797e49
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 16:08:25 2011 +0200
Remove obsolete comment
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 26 ++++++++++++++++++--------
js/sql.js | 16 ++++++++--------
libraries/header_scripts.inc.php | 1 -
3 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index 98dbd1d..a8595a1 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -724,15 +724,31 @@ function setSelectOptions(the_form, the_select, do_check)
return true;
} // end of the 'setSelectOptions()' function
+/**
+ * Sets current value for query box.
+ */
+function setQuery(query) {
+ if (codemirror_editor) {
+ codemirror_editor.setValue(query);
+ } else {
+ document.sqlform.sql_query.value = query;
+ }
+}
+
/**
* Create quick sql statements.
*
*/
function insertQuery(queryType) {
+ if (queryType == "clear") {
+ setQuery('');
+ return;
+ }
+
var myQuery = document.sqlform.sql_query;
- var myListBox = document.sqlform.dummy;
var query = "";
+ var myListBox = document.sqlform.dummy;
var table = document.sqlform.table.value;
if (myListBox.options.length > 0) {
@@ -762,14 +778,8 @@ function insertQuery(queryType) {
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
} else if(queryType == "delete") {
query = "DELETE FROM `" + table + "` WHERE 1";
- } else if(queryType == "clear") {
- query = "";
- }
- if (codemirror_editor) {
- codemirror_editor.setValue(query);
- } else {
- document.sqlform.sql_query.value = query;
}
+ setQuery(query);
sql_box_locked = false;
}
}
diff --git a/js/sql.js b/js/sql.js
index b334b5f..e4f8323 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -365,7 +365,7 @@ $(document).ready(function() {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
PMA_init_slider();
-
+
PMA_ajaxRemoveMessage($msgbox);
}) // end $.post()
})// end Paginate results table
@@ -388,7 +388,7 @@ $(document).ready(function() {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
PMA_init_slider();
- PMA_ajaxRemoveMessage($msgbox);
+ PMA_ajaxRemoveMessage($msgbox);
}) // end $.post()
} else {
$the_form.submit();
@@ -456,7 +456,7 @@ $(document).ready(function() {
$edit_td.removeClass('inline_edit_anchor').addClass('inline_edit_active').parent('tr').addClass('noclick');
// Adding submit and hide buttons to inline edit <td>.
- // For "hide" button the original data to be restored is
+ // For "hide" button the original data to be restored is
// kept in the jQuery data element 'original_data' inside the <td>.
// Looping through all columns or rows, to find the required data and then storing it in an array.
@@ -840,7 +840,7 @@ $(document).ready(function() {
*/
var relation_fields = {};
/**
- * @var relational_display string 'K' if relational key, 'D' if relational display column
+ * @var relational_display string 'K' if relational key, 'D' if relational display column
*/
var relational_display = $("#relational_display_K").attr('checked') ? 'K' : 'D';
/**
@@ -858,7 +858,7 @@ $(document).ready(function() {
var sql_query = 'UPDATE `' + window.parent.table + '` SET ';
var need_to_post = false;
-
+
var new_clause = '';
var prev_index = -1;
@@ -930,7 +930,7 @@ $(document).ready(function() {
}
})
- /*
+ /*
* update the where_clause, remove the last appended ' AND '
* */
@@ -1004,10 +1004,10 @@ $(document).ready(function() {
/**
- * Visually put back the row in the state it was before entering Inline edit
+ * Visually put back the row in the state it was before entering Inline edit
*
* (when called in the situation where no posting was done, the data
- * parameter is empty)
+ * parameter is empty)
*/
function PMA_unInlineEditRow($del_hide, $chg_submit, $this_td, $input_siblings, data, disp_mode) {
diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php
index 98b28c4..2e0a9ca 100644
--- a/libraries/header_scripts.inc.php
+++ b/libraries/header_scripts.inc.php
@@ -40,7 +40,6 @@ if (isset($GLOBALS['db'])) {
}
$GLOBALS['js_include'][] = 'messages.php' . PMA_generate_common_url($params);
$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
-/* We should rather use/define MySQL mode here */
$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/**
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2935-g469624c
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 469624c23d97848da668c787ae15d75199ac6272 (commit)
from 12f1bb773e9b429ae9c559d92f7525c6a98b3eea (commit)
- Log -----------------------------------------------------------------
commit 469624c23d97848da668c787ae15d75199ac6272
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 15:48:34 2011 +0200
Add missing overflow
-----------------------------------------------------------------------
Summary of changes:
themes/original/css/theme_right.css.php | 1 +
themes/pmahomme/css/theme_right.css.php | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 880861b..7cd739a 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1780,6 +1780,7 @@ fieldset .disabled-field td {
.CodeMirror-scroll {
height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 1.2); ?>em;
+ overflow: auto;
}
.CodeMirror-gutter {
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index 23de23d..577b864 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -2123,6 +2123,7 @@ fieldset .disabled-field td {
}
.CodeMirror-scroll {
+ overflow: auto;
height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 1.2); ?>em;
}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2934-g12f1bb7
by Piotr Przybylski 02 Jun '11
by Piotr Przybylski 02 Jun '11
02 Jun '11
The branch, master has been updated
via 12f1bb773e9b429ae9c559d92f7525c6a98b3eea (commit)
from 095e0818b8d69722fceae3ad518b74d02b488ed0 (commit)
- Log -----------------------------------------------------------------
commit 12f1bb773e9b429ae9c559d92f7525c6a98b3eea
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Thu Jun 2 15:37:34 2011 +0200
Restore 'DEFAULT CHARACTER SET utf8 COLLATE utf8_bin' for configuration storage tables
-----------------------------------------------------------------------
Summary of changes:
scripts/create_tables.sql | 36 ++++++++++++++++++++++++------------
1 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/scripts/create_tables.sql b/scripts/create_tables.sql
index b98a4e8..5db0de4 100644
--- a/scripts/create_tables.sql
+++ b/scripts/create_tables.sql
@@ -44,7 +44,8 @@ CREATE TABLE IF NOT EXISTS `pma_bookmark` (
`query` text NOT NULL,
PRIMARY KEY (`id`)
)
- ENGINE=MyISAM COMMENT='Bookmarks';
+ ENGINE=MyISAM COMMENT='Bookmarks'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -64,7 +65,8 @@ CREATE TABLE IF NOT EXISTS `pma_column_info` (
PRIMARY KEY (`id`),
UNIQUE KEY `db_name` (`db_name`,`table_name`,`column_name`)
)
- ENGINE=MyISAM COMMENT='Column information for phpMyAdmin';
+ ENGINE=MyISAM COMMENT='Column information for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -82,7 +84,8 @@ CREATE TABLE IF NOT EXISTS `pma_history` (
PRIMARY KEY (`id`),
KEY `username` (`username`,`db`,`table`,`timevalue`)
)
- ENGINE=MyISAM COMMENT='SQL history for phpMyAdmin';
+ ENGINE=MyISAM COMMENT='SQL history for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -97,7 +100,8 @@ CREATE TABLE IF NOT EXISTS `pma_pdf_pages` (
PRIMARY KEY (`page_nr`),
KEY `db_name` (`db_name`)
)
- ENGINE=MyISAM COMMENT='PDF relation pages for phpMyAdmin';
+ ENGINE=MyISAM COMMENT='PDF relation pages for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -110,7 +114,8 @@ CREATE TABLE IF NOT EXISTS `pma_recent` (
`tables` text NOT NULL,
PRIMARY KEY (`username`)
)
- ENGINE=MyISAM COMMENT='Recently accessed tables';
+ ENGINE=MyISAM COMMENT='Recently accessed tables'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -125,7 +130,8 @@ CREATE TABLE IF NOT EXISTS `pma_table_uiprefs` (
`prefs` text NOT NULL,
PRIMARY KEY (`username`,`db_name`,`table_name`)
)
- ENGINE=MyISAM COMMENT='Tables'' UI preferences';
+ ENGINE=MyISAM COMMENT='Tables'' UI preferences'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -143,7 +149,8 @@ CREATE TABLE IF NOT EXISTS `pma_relation` (
PRIMARY KEY (`master_db`,`master_table`,`master_field`),
KEY `foreign_field` (`foreign_db`,`foreign_table`)
)
- ENGINE=MyISAM COMMENT='Relation table';
+ ENGINE=MyISAM COMMENT='Relation table'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -159,7 +166,8 @@ CREATE TABLE IF NOT EXISTS `pma_table_coords` (
`y` float unsigned NOT NULL default '0',
PRIMARY KEY (`db_name`,`table_name`,`pdf_page_number`)
)
- ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output';
+ ENGINE=MyISAM COMMENT='Table coordinates for phpMyAdmin PDF output'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -173,7 +181,8 @@ CREATE TABLE IF NOT EXISTS `pma_table_info` (
`display_field` varchar(64) NOT NULL default '',
PRIMARY KEY (`db_name`,`table_name`)
)
- ENGINE=MyISAM COMMENT='Table information for phpMyAdmin';
+ ENGINE=MyISAM COMMENT='Table information for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -190,7 +199,8 @@ CREATE TABLE IF NOT EXISTS `pma_designer_coords` (
`h` TINYINT,
PRIMARY KEY (`db_name`,`table_name`)
)
- ENGINE=MyISAM COMMENT='Table coordinates for Designer';
+ ENGINE=MyISAM COMMENT='Table coordinates for Designer'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -211,7 +221,8 @@ CREATE TABLE IF NOT EXISTS `pma_tracking` (
`tracking_active` int(1) unsigned NOT NULL default '1',
PRIMARY KEY (`db_name`,`table_name`,`version`)
)
- ENGINE=MyISAM ROW_FORMAT=COMPACT COMMENT='Database changes tracking for phpMyAdmin';
+ ENGINE=MyISAM ROW_FORMAT=COMPACT COMMENT='Database changes tracking for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
-- --------------------------------------------------------
@@ -225,4 +236,5 @@ CREATE TABLE IF NOT EXISTS `pma_userconfig` (
`config_data` text NOT NULL,
PRIMARY KEY (`username`)
)
- ENGINE=MyISAM COMMENT='User preferences storage for phpMyAdmin';
+ ENGINE=MyISAM COMMENT='User preferences storage for phpMyAdmin'
+ DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2933-g095e081
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 095e0818b8d69722fceae3ad518b74d02b488ed0 (commit)
via 3cb40926c04f11342b4f1f2a0ebccd1bd143e9bf (commit)
from 796b81ac995182386ddcc86d872114bccdb569c6 (commit)
- Log -----------------------------------------------------------------
commit 095e0818b8d69722fceae3ad518b74d02b488ed0
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 15:17:27 2011 +0200
Remove div which seems to be leftover from slider removal
commit 3cb40926c04f11342b4f1f2a0ebccd1bd143e9bf
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 15:07:57 2011 +0200
Remove other not needed files
-----------------------------------------------------------------------
Summary of changes:
js/codemirror/mode/mysql/index.html | 68 -----------------------------------
js/codemirror/mode/mysql/mysql.css | 33 -----------------
tbl_structure.php | 4 --
3 files changed, 0 insertions(+), 105 deletions(-)
delete mode 100644 js/codemirror/mode/mysql/index.html
delete mode 100644 js/codemirror/mode/mysql/mysql.css
diff --git a/js/codemirror/mode/mysql/index.html b/js/codemirror/mode/mysql/index.html
deleted file mode 100644
index c9bb251..0000000
--- a/js/codemirror/mode/mysql/index.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>CodeMirror 2: MySQL mode</title>
- <link rel="stylesheet" href="../../lib/codemirror.css">
- <script src="../../lib/codemirror.js"></script>
- <script src="mysql.js"></script>
- <link rel="stylesheet" href="mysql.css">
- <link rel="stylesheet" href="../../css/docs.css">
- <style>.CodeMirror {border: 2px inset #dee;}</style>
- </head>
- <body>
- <h1>CodeMirror 2: MySQL mode</h1>
-
-<form><textarea id="code" name="code">
--- MySQL Code Demo
-/*
- based on PL/SQL, addapted to MySQL by Michal Cihar ( http://cihar.com/ )
- June 2011
-*/
-
-CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
-READS SQL DATA
-BEGIN
- DECLARE v_rentals INT;
- DECLARE v_out INT;
-
- #AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
- #FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
-
- SELECT COUNT(*) INTO v_rentals
- FROM rental
- WHERE inventory_id = p_inventory_id;
-
- IF v_rentals = 0 THEN
- RETURN TRUE;
- END IF;
-
- SELECT COUNT(rental_id) INTO v_out
- FROM inventory LEFT JOIN rental USING(inventory_id)
- WHERE inventory.inventory_id = p_inventory_id
- AND rental.return_date IS NULL;
-
- IF v_out > 0 THEN
- RETURN FALSE;
- ELSE
- RETURN TRUE;
- END IF;
-END
---
-</textarea></form>
-
- <script>
- var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
- lineNumbers: true,
- matchBrackets: true,
- indentUnit: 4,
- mode: "text/x-mysql"
- });
- </script>
-
- <p>
- Simple mode that handles MySQL language.
- </p>
-
- <p><strong>MIME type defined:</strong> <code>text/x-mysql</code>
- (MySQL code)
-</html>
diff --git a/js/codemirror/mode/mysql/mysql.css b/js/codemirror/mode/mysql/mysql.css
deleted file mode 100644
index a03411a..0000000
--- a/js/codemirror/mode/mysql/mysql.css
+++ /dev/null
@@ -1,33 +0,0 @@
-span.mysql-keyword {
- color: blue;
-}
-span.mysql-var {
- color: red;
-}
-span.mysql-comment {
- color: #AA7700;
-}
-span.mysql-string {
- color: green;
-}
-span.mysql-operator {
- color: blue;
-}
-span.mysql-word {
- color: black;
-}
-span.mysql-function {
- color: darkorange;
-}
-span.mysql-sqlplus {
- color: darkorange;
-}
-span.mysql-type {
- color: purple;
-}
-span.mysql-separator {
- color: #666666;
-}
-span.mysql-number {
- color: darkcyan;
-}
diff --git a/tbl_structure.php b/tbl_structure.php
index e2a436d..4f91e16 100644
--- a/tbl_structure.php
+++ b/tbl_structure.php
@@ -706,7 +706,6 @@ if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_type) {
// BEGIN - Calc Table Space
// Get valid statistics whatever is the table type
if ($cfg['ShowStats']) {
- echo '<div id="tablestatistics">';
if (empty($showtable)) {
$showtable = PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], null, true);
}
@@ -925,9 +924,6 @@ if ($cfg['ShowStats']) {
</tbody>
</table>
- <!-- close tablestatistics div -->
- </div>
-
<?php
}
// END - Calc Table Space
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2931-g796b81a
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 796b81ac995182386ddcc86d872114bccdb569c6 (commit)
via e1748cdda936053d8613a38849c8730c5a761427 (commit)
via 05f5ee8efe8510ce5744902f07d953c67c1c86cf (commit)
via e1c3a524bb11cb6b625e2394f8566ed014699815 (commit)
via d203bebe2afd384126fc6a68b4de13402fe4a8ad (commit)
via 3eb0f4cccb0804ebeee855ef36087e0804ac6f90 (commit)
via 1a20d4e3a3d8b0476ec7d18b959b41d2eceda5cc (commit)
via 4be1821a8fc1f6fae3163d685bec598fe7c1599b (commit)
via 896f8debeca0a7adc825de9074322b576639fa93 (commit)
via a6b4e3a4b95a03d9e65bea42a63ec1c73d4d6b8d (commit)
via 4c84ece64d32626fa137bf4b5fb8cd073b00cedd (commit)
via 28f97eb3c14d928e04cd9410dfabc5af85b80812 (commit)
via 0968f5bb60f075e687211891414c32fa1bf372a8 (commit)
from 2da400447c6993d46b969a1c9c863fd81817f67e (commit)
- Log -----------------------------------------------------------------
commit 796b81ac995182386ddcc86d872114bccdb569c6
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 15:01:19 2011 +0200
Make field insert buttons work with CodeMirror
commit e1748cdda936053d8613a38849c8730c5a761427
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:59:08 2011 +0200
Make SQL buttons work with CodeMirror
commit 05f5ee8efe8510ce5744902f07d953c67c1c86cf
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:55:11 2011 +0200
Consistent handling of all SQL butttons
commit e1c3a524bb11cb6b625e2394f8566ed014699815
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:54:23 2011 +0200
Docs
commit d203bebe2afd384126fc6a68b4de13402fe4a8ad
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:50:43 2011 +0200
Make CodeMirror honor theme highlight colors
commit 3eb0f4cccb0804ebeee855ef36087e0804ac6f90
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:46:16 2011 +0200
Make CodeMirror honor TextareaRows
commit 1a20d4e3a3d8b0476ec7d18b959b41d2eceda5cc
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:46:06 2011 +0200
Update CodeMirror2 to latest git for configurable scrolling
commit 4be1821a8fc1f6fae3163d685bec598fe7c1599b
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:42:59 2011 +0200
Remove not needed CodeMirror files
commit 896f8debeca0a7adc825de9074322b576639fa93
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:40:48 2011 +0200
Handle missing attributes
commit a6b4e3a4b95a03d9e65bea42a63ec1c73d4d6b8d
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:37:31 2011 +0200
Use MySQL mode instead of plsql
commit 4c84ece64d32626fa137bf4b5fb8cd073b00cedd
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:37:10 2011 +0200
Initial implementation of MySQL mode in CodeMirror, based on our list of keywords
commit 28f97eb3c14d928e04cd9410dfabc5af85b80812
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 14:24:16 2011 +0200
Hook CodeMirror to SQL editor
commit 0968f5bb60f075e687211891414c32fa1bf372a8
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 13:40:19 2011 +0200
Initial import of complete codemirror
-----------------------------------------------------------------------
Summary of changes:
js/codemirror/LICENSE | 19 +
js/codemirror/lib/codemirror.js | 2035 +++++++++++++++++++++++++++++++
js/codemirror/mode/mysql/index.html | 68 +
js/codemirror/mode/mysql/mysql.css | 33 +
js/codemirror/mode/mysql/mysql.js | 145 +++
js/functions.js | 34 +-
libraries/header_scripts.inc.php | 3 +
themes/original/css/theme_right.css.php | 98 ++
themes/pmahomme/css/theme_right.css.php | 98 ++
9 files changed, 2526 insertions(+), 7 deletions(-)
create mode 100644 js/codemirror/LICENSE
create mode 100644 js/codemirror/lib/codemirror.js
create mode 100644 js/codemirror/mode/mysql/index.html
create mode 100644 js/codemirror/mode/mysql/mysql.css
create mode 100644 js/codemirror/mode/mysql/mysql.js
diff --git a/js/codemirror/LICENSE b/js/codemirror/LICENSE
new file mode 100644
index 0000000..3f7c0bb
--- /dev/null
+++ b/js/codemirror/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2011 by Marijn Haverbeke <marijnh(a)gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/js/codemirror/lib/codemirror.js b/js/codemirror/lib/codemirror.js
new file mode 100644
index 0000000..844c54a
--- /dev/null
+++ b/js/codemirror/lib/codemirror.js
@@ -0,0 +1,2035 @@
+// All functions that need access to the editor's state live inside
+// the CodeMirror function. Below that, at the bottom of the file,
+// some utilities are defined.
+
+// CodeMirror is the only global var we claim
+var CodeMirror = (function() {
+ // This is the function that produces an editor instance. It's
+ // closure is used to store the editor state.
+ function CodeMirror(place, givenOptions) {
+ // Determine effective options based on given values and defaults.
+ var options = {}, defaults = CodeMirror.defaults;
+ for (var opt in defaults)
+ if (defaults.hasOwnProperty(opt))
+ options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
+
+ var targetDocument = options["document"];
+ // The element in which the editor lives.
+ var wrapper = targetDocument.createElement("div");
+ wrapper.className = "CodeMirror";
+ // This mess creates the base DOM structure for the editor.
+ wrapper.innerHTML =
+ '<div style="overflow: hidden; position: relative; width: 1px; height: 0px;">' + // Wraps and hides input textarea
+ '<textarea style="position: absolute; width: 2px;" wrap="off"></textarea></div>' +
+ '<div class="CodeMirror-scroll">' +
+ '<div style="position: relative">' + // Set to the height of the text, causes scrolling
+ '<div style="position: absolute; height: 0; width: 0; overflow: hidden;"></div>' +
+ '<div style="position: relative">' + // Moved around its parent to cover visible view
+ '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
+ // Provides positioning relative to (visible) text origin
+ '<div class="CodeMirror-lines"><div style="position: relative">' +
+ '<pre class="CodeMirror-cursor"> </pre>' + // Absolutely positioned blinky cursor
+ '<div></div>' + // This DIV contains the actual code
+ '</div></div></div></div></div>';
+ if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
+ // I've never seen more elegant code in my life.
+ var inputDiv = wrapper.firstChild, input = inputDiv.firstChild,
+ scroller = wrapper.lastChild, code = scroller.firstChild,
+ measure = code.firstChild, mover = measure.nextSibling,
+ gutter = mover.firstChild, gutterText = gutter.firstChild,
+ lineSpace = gutter.nextSibling.firstChild,
+ cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling;
+ if (options.tabindex != null) input.tabindex = options.tabindex;
+ if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
+
+ // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
+ var poll = new Delayed(), highlight = new Delayed(), blinker;
+
+ // mode holds a mode API object. lines an array of Line objects
+ // (see Line constructor), work an array of lines that should be
+ // parsed, and history the undo history (instance of History
+ // constructor).
+ var mode, lines = [new Line("")], work, history = new History(), focused;
+ loadMode();
+ // The selection. These are always maintained to point at valid
+ // positions. Inverted is used to remember that the user is
+ // selecting bottom-to-top.
+ var sel = {from: {line: 0, ch: 0}, to: {line: 0, ch: 0}, inverted: false};
+ // Selection-related flags. shiftSelecting obviously tracks
+ // whether the user is holding shift. reducedSelection is a hack
+ // to get around the fact that we can't create inverted
+ // selections. See below.
+ var shiftSelecting, reducedSelection, lastDoubleClick;
+ // Variables used by startOperation/endOperation to track what
+ // happened during the operation.
+ var updateInput, changes, textChanged, selectionChanged, leaveInputAlone;
+ // Current visible range (may be bigger than the view window).
+ var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null;
+ // editing will hold an object describing the things we put in the
+ // textarea, to help figure out whether something changed.
+ // bracketHighlighted is used to remember that a backet has been
+ // marked.
+ var editing, bracketHighlighted;
+ // Tracks the maximum line length so that the horizontal scrollbar
+ // can be kept static when scrolling.
+ var maxLine = "";
+
+ // Initialize the content. Somewhat hacky (delayed prepareInput)
+ // to work around browser issues.
+ operation(function(){setValue(options.value || ""); updateInput = false;})();
+ setTimeout(prepareInput, 20);
+
+ // Register our event handlers.
+ connect(scroller, "mousedown", operation(onMouseDown));
+ // Gecko browsers fire contextmenu *after* opening the menu, at
+ // which point we can't mess with it anymore. Context menu is
+ // handled in onMouseDown for Gecko.
+ if (!gecko) connect(scroller, "contextmenu", operation(onContextMenu));
+ connect(code, "dblclick", operation(onDblClick));
+ connect(scroller, "scroll", function() {updateDisplay([]); if (options.onScroll) options.onScroll(instance);});
+ connect(window, "resize", function() {updateDisplay(true);});
+ connect(input, "keyup", operation(onKeyUp));
+ connect(input, "keydown", operation(onKeyDown));
+ connect(input, "keypress", operation(onKeyPress));
+ connect(input, "focus", onFocus);
+ connect(input, "blur", onBlur);
+
+ connect(scroller, "dragenter", function(e){e.stop();});
+ connect(scroller, "dragover", function(e){e.stop();});
+ connect(scroller, "drop", operation(onDrop));
+ connect(scroller, "paste", function(){focusInput(); fastPoll();});
+ connect(input, "paste", function(){fastPoll();});
+ connect(input, "cut", function(){fastPoll();});
+
+ // IE throws unspecified error in certain cases, when
+ // trying to access activeElement before onload
+ var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { }
+ if (hasFocus) onFocus();
+ else onBlur();
+
+ function isLine(l) {return l >= 0 && l < lines.length;}
+ // The instance object that we'll return. Mostly calls out to
+ // local functions in the CodeMirror function. Some do some extra
+ // range checking and/or clipping. operation is used to wrap the
+ // call so that changes it makes are tracked, and the display is
+ // updated afterwards.
+ var instance = {
+ getValue: getValue,
+ setValue: operation(setValue),
+ getSelection: getSelection,
+ replaceSelection: operation(replaceSelection),
+ focus: function(){focusInput(); onFocus(); fastPoll();},
+ setOption: function(option, value) {
+ options[option] = value;
+ if (option == "lineNumbers" || option == "gutter") gutterChanged();
+ else if (option == "mode" || option == "indentUnit") loadMode();
+ else if (option == "readOnly" && value == "nocursor") input.blur();
+ },
+ getOption: function(option) {return options[option];},
+ undo: operation(undo),
+ redo: operation(redo),
+ indentLine: operation(function(n) {if (isLine(n)) indentLine(n, "smart");}),
+ historySize: function() {return {undo: history.done.length, redo: history.undone.length};},
+ matchBrackets: operation(function(){matchBrackets(true);}),
+ getTokenAt: function(pos) {
+ pos = clipPos(pos);
+ return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch);
+ },
+ cursorCoords: function(start){
+ if (start == null) start = sel.inverted;
+ return pageCoords(start ? sel.from : sel.to);
+ },
+ charCoords: function(pos){return pageCoords(clipPos(pos));},
+ coordsChar: function(coords) {
+ var off = eltOffset(lineSpace);
+ var line = clipLine(Math.min(lines.length - 1, showingFrom + Math.floor((coords.y - off.top) / lineHeight())));
+ return clipPos({line: line, ch: charFromX(clipLine(line), coords.x - off.left)});
+ },
+ getSearchCursor: function(query, pos, caseFold) {return new SearchCursor(query, pos, caseFold);},
+ markText: operation(function(a, b, c){return operation(markText(a, b, c));}),
+ setMarker: addGutterMarker,
+ clearMarker: removeGutterMarker,
+ setLineClass: operation(setLineClass),
+ lineInfo: lineInfo,
+ addWidget: function(pos, node, scroll) {
+ var pos = localCoords(clipPos(pos), true);
+ node.style.top = (showingFrom * lineHeight() + pos.yBot + paddingTop()) + "px";
+ node.style.left = (pos.x + paddingLeft()) + "px";
+ code.appendChild(node);
+ if (scroll)
+ scrollIntoView(pos.x, pos.yBot, pos.x + node.offsetWidth, pos.yBot + node.offsetHeight);
+ },
+
+ lineCount: function() {return lines.length;},
+ getCursor: function(start) {
+ if (start == null) start = sel.inverted;
+ return copyPos(start ? sel.from : sel.to);
+ },
+ somethingSelected: function() {return !posEq(sel.from, sel.to);},
+ setCursor: operation(function(line, ch) {
+ if (ch == null && typeof line.line == "number") setCursor(line.line, line.ch);
+ else setCursor(line, ch);
+ }),
+ setSelection: operation(function(from, to) {setSelection(clipPos(from), clipPos(to || from));}),
+ getLine: function(line) {if (isLine(line)) return lines[line].text;},
+ setLine: operation(function(line, text) {
+ if (isLine(line)) replaceRange(text, {line: line, ch: 0}, {line: line, ch: lines[line].text.length});
+ }),
+ removeLine: operation(function(line) {
+ if (isLine(line)) replaceRange("", {line: line, ch: 0}, clipPos({line: line+1, ch: 0}));
+ }),
+ replaceRange: operation(replaceRange),
+ getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},
+
+ operation: function(f){return operation(f)();},
+ refresh: function(){updateDisplay(true);},
+ getInputField: function(){return input;},
+ getWrapperElement: function(){return wrapper;}
+ };
+
+ function setValue(code) {
+ history = null;
+ var top = {line: 0, ch: 0};
+ updateLines(top, {line: lines.length - 1, ch: lines[lines.length-1].text.length},
+ splitLines(code), top, top);
+ history = new History();
+ }
+ function getValue(code) {
+ var text = [];
+ for (var i = 0, l = lines.length; i < l; ++i)
+ text.push(lines[i].text);
+ return text.join("\n");
+ }
+
+ function onMouseDown(e) {
+ var ld = lastDoubleClick; lastDoubleClick = null;
+ // First, see if this is a click in the gutter
+ for (var n = e.target(); n != wrapper; n = n.parentNode)
+ if (n.parentNode == gutterText) {
+ if (options.onGutterClick)
+ options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom);
+ return e.stop();
+ }
+
+ if (gecko && e.button() == 3) onContextMenu(e);
+ if (e.button() != 1) return;
+ // For button 1, if it was clicked inside the editor
+ // (posFromMouse returning non-null), we have to adjust the
+ // selection.
+ var start = posFromMouse(e), last = start, going;
+ if (!start) {if (e.target() == scroller) e.stop(); return;}
+
+ if (!focused) onFocus();
+ e.stop();
+ if (ld && +new Date - ld < 400) return selectLine(start.line);
+
+ setCursor(start.line, start.ch, true);
+ // And then we have to see if it's a drag event, in which case
+ // the dragged-over text must be selected.
+ function end() {
+ focusInput();
+ updateInput = true;
+ move(); up();
+ }
+ function extend(e) {
+ var cur = posFromMouse(e, true);
+ if (cur && !posEq(cur, last)) {
+ if (!focused) onFocus();
+ last = cur;
+ setSelectionUser(start, cur);
+ updateInput = false;
+ var visible = visibleLines();
+ if (cur.line >= visible.to || cur.line < visible.from)
+ going = setTimeout(operation(function(){extend(e);}), 150);
+ }
+ }
+
+ var move = connect(targetDocument, "mousemove", operation(function(e) {
+ clearTimeout(going);
+ e.stop();
+ extend(e);
+ }), true);
+ var up = connect(targetDocument, "mouseup", operation(function(e) {
+ clearTimeout(going);
+ var cur = posFromMouse(e);
+ if (cur) setSelectionUser(start, cur);
+ e.stop();
+ end();
+ }), true);
+ }
+ function onDblClick(e) {
+ var pos = posFromMouse(e);
+ if (!pos) return;
+ selectWordAt(pos);
+ e.stop();
+ lastDoubleClick = +new Date;
+ }
+ function onDrop(e) {
+ var pos = posFromMouse(e, true), files = e.e.dataTransfer.files;
+ if (!pos || options.readOnly) return;
+ if (files && files.length && window.FileReader && window.File) {
+ var n = files.length, text = Array(n), read = 0;
+ for (var i = 0; i < n; ++i) loadFile(files[i], i);
+ function loadFile(file, i) {
+ var reader = new FileReader;
+ reader.onload = function() {
+ text[i] = reader.result;
+ if (++read == n) replaceRange(text.join(""), clipPos(pos), clipPos(pos));
+ };
+ reader.readAsText(file);
+ }
+ }
+ else {
+ try {
+ var text = e.e.dataTransfer.getData("Text");
+ if (text) replaceRange(text, pos, pos);
+ }
+ catch(e){}
+ }
+ }
+ function onKeyDown(e) {
+ if (!focused) onFocus();
+
+ var code = e.e.keyCode;
+ // Tries to detect ctrl on non-mac, cmd on mac.
+ var mod = (mac ? e.e.metaKey : e.e.ctrlKey) && !e.e.altKey, anyMod = e.e.ctrlKey || e.e.altKey || e.e.metaKey;
+ if (code == 16 || e.e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);
+ else shiftSelecting = null;
+ // First give onKeyEvent option a chance to handle this.
+ if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return;
+
+ if (code == 33 || code == 34) {scrollPage(code == 34); return e.stop();} // page up/down
+ if (mod && ((code == 36 || code == 35) || // ctrl-home/end
+ mac && (code == 38 || code == 40))) { // cmd-up/down
+ scrollEnd(code == 36 || code == 38); return e.stop();
+ }
+ if (mod && code == 65) {selectAll(); return e.stop();} // ctrl-a
+ if (!options.readOnly) {
+ if (!anyMod && code == 13) {return;} // enter
+ if (!anyMod && code == 9 && handleTab(e.e.shiftKey)) return e.stop(); // tab
+ if (mod && code == 90) {undo(); return e.stop();} // ctrl-z
+ if (mod && ((e.e.shiftKey && code == 90) || code == 89)) {redo(); return e.stop();} // ctrl-shift-z, ctrl-y
+ }
+
+ // Key id to use in the movementKeys map. We also pass it to
+ // fastPoll in order to 'self learn'. We need this because
+ // reducedSelection, the hack where we collapse the selection to
+ // its start when it is inverted and a movement key is pressed
+ // (and later restore it again), shouldn't be used for
+ // non-movement keys.
+ curKeyId = (mod ? "c" : "") + code;
+ if (sel.inverted && movementKeys.hasOwnProperty(curKeyId)) {
+ var range = selRange(input);
+ if (range) {
+ reducedSelection = {anchor: range.start};
+ setSelRange(input, range.start, range.start);
+ }
+ }
+ fastPoll(curKeyId);
+ }
+ function onKeyUp(e) {
+ if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return;
+ if (reducedSelection) {
+ reducedSelection = null;
+ updateInput = true;
+ }
+ if (e.e.keyCode == 16) shiftSelecting = null;
+ }
+ function onKeyPress(e) {
+ if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return;
+ if (options.electricChars && mode.electricChars) {
+ var ch = String.fromCharCode(e.e.charCode == null ? e.e.keyCode : e.e.charCode);
+ if (mode.electricChars.indexOf(ch) > -1)
+ setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50);
+ }
+ var code = e.e.keyCode;
+ // Re-stop tab and enter. Necessary on some browsers.
+ if (code == 13) {if (!options.readOnly) handleEnter(); e.stop();}
+ else if (!e.e.ctrlKey && !e.e.altKey && !e.e.metaKey && code == 9 && options.tabMode != "default") e.stop();
+ else fastPoll(curKeyId);
+ }
+
+ function onFocus() {
+ if (options.readOnly == "nocursor") return;
+ if (!focused && options.onFocus) options.onFocus(instance);
+ focused = true;
+ slowPoll();
+ if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
+ wrapper.className += " CodeMirror-focused";
+ restartBlink();
+ }
+ function onBlur() {
+ if (focused && options.onBlur) options.onBlur(instance);
+ clearInterval(blinker);
+ shiftSelecting = null;
+ focused = false;
+ wrapper.className = wrapper.className.replace(" CodeMirror-focused", "");
+ }
+
+ // Replace the range from from to to by the strings in newText.
+ // Afterwards, set the selection to selFrom, selTo.
+ function updateLines(from, to, newText, selFrom, selTo) {
+ if (history) {
+ var old = [];
+ for (var i = from.line, e = to.line + 1; i < e; ++i) old.push(lines[i].text);
+ history.addChange(from.line, newText.length, old);
+ while (history.done.length > options.undoDepth) history.done.shift();
+ }
+ updateLinesNoUndo(from, to, newText, selFrom, selTo);
+ }
+ function unredoHelper(from, to) {
+ var change = from.pop();
+ if (change) {
+ var replaced = [], end = change.start + change.added;
+ for (var i = change.start; i < end; ++i) replaced.push(lines[i].text);
+ to.push({start: change.start, added: change.old.length, old: replaced});
+ var pos = clipPos({line: change.start + change.old.length - 1,
+ ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])});
+ updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos);
+ }
+ }
+ function undo() {unredoHelper(history.done, history.undone);}
+ function redo() {unredoHelper(history.undone, history.done);}
+
+ function updateLinesNoUndo(from, to, newText, selFrom, selTo) {
+ var recomputeMaxLength = false, maxLineLength = maxLine.length;
+ for (var i = from.line; i < to.line; ++i) {
+ if (lines[i].text.length == maxLineLength) {recomputeMaxLength = true; break;}
+ }
+
+ var nlines = to.line - from.line, firstLine = lines[from.line], lastLine = lines[to.line];
+ // First adjust the line structure, taking some care to leave highlighting intact.
+ if (firstLine == lastLine) {
+ if (newText.length == 1)
+ firstLine.replace(from.ch, to.ch, newText[0]);
+ else {
+ lastLine = firstLine.split(to.ch, newText[newText.length-1]);
+ var spliceargs = [from.line + 1, nlines];
+ firstLine.replace(from.ch, firstLine.text.length, newText[0]);
+ for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i]));
+ spliceargs.push(lastLine);
+ lines.splice.apply(lines, spliceargs);
+ }
+ }
+ else if (newText.length == 1) {
+ firstLine.replace(from.ch, firstLine.text.length, newText[0] + lastLine.text.slice(to.ch));
+ lines.splice(from.line + 1, nlines);
+ }
+ else {
+ var spliceargs = [from.line + 1, nlines - 1];
+ firstLine.replace(from.ch, firstLine.text.length, newText[0]);
+ lastLine.replace(0, to.ch, newText[newText.length-1]);
+ for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i]));
+ lines.splice.apply(lines, spliceargs);
+ }
+
+
+ for (var i = from.line, e = i + newText.length; i < e; ++i) {
+ var l = lines[i].text;
+ if (l.length > maxLineLength) {
+ maxLine = l; maxLineLength = l.length;
+ recomputeMaxLength = false;
+ }
+ }
+ if (recomputeMaxLength) {
+ maxLineLength = 0;
+ for (var i = 0, e = lines.length; i < e; ++i) {
+ var l = lines[i].text;
+ if (l.length > maxLineLength) {
+ maxLineLength = l.length; maxLine = l;
+ }
+ }
+ }
+
+ // Add these lines to the work array, so that they will be
+ // highlighted. Adjust work lines if lines were added/removed.
+ var newWork = [], lendiff = newText.length - nlines - 1;
+ for (var i = 0, l = work.length; i < l; ++i) {
+ var task = work[i];
+ if (task < from.line) newWork.push(task);
+ else if (task > to.line) newWork.push(task + lendiff);
+ }
+ if (newText.length) newWork.push(from.line);
+ work = newWork;
+ startWorker(100);
+ // Remember that these lines changed, for updating the display
+ changes.push({from: from.line, to: to.line + 1, diff: lendiff});
+ textChanged = {from: from, to: to, text: newText};
+
+ // Update the selection
+ function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}
+ setSelection(selFrom, selTo, updateLine(sel.from.line), updateLine(sel.to.line));
+
+ // Make sure the scroll-size div has the correct height.
+ code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px";
+ }
+
+ function replaceRange(code, from, to) {
+ from = clipPos(from);
+ if (!to) to = from; else to = clipPos(to);
+ code = splitLines(code);
+ function adjustPos(pos) {
+ if (posLess(pos, from)) return pos;
+ if (!posLess(to, pos)) return end;
+ var line = pos.line + code.length - (to.line - from.line) - 1;
+ var ch = pos.ch;
+ if (pos.line == to.line)
+ ch += code[code.length-1].length - (to.ch - (to.line == from.line ? from.ch : 0));
+ return {line: line, ch: ch};
+ }
+ var end;
+ replaceRange1(code, from, to, function(end1) {
+ end = end1;
+ return {from: adjustPos(sel.from), to: adjustPos(sel.to)};
+ });
+ return end;
+ }
+ function replaceSelection(code, collapse) {
+ replaceRange1(splitLines(code), sel.from, sel.to, function(end) {
+ if (collapse == "end") return {from: end, to: end};
+ else if (collapse == "start") return {from: sel.from, to: sel.from};
+ else return {from: sel.from, to: end};
+ });
+ }
+ function replaceRange1(code, from, to, computeSel) {
+ var endch = code.length == 1 ? code[0].length + from.ch : code[code.length-1].length;
+ var newSel = computeSel({line: from.line + code.length - 1, ch: endch});
+ updateLines(from, to, code, newSel.from, newSel.to);
+ }
+
+ function getRange(from, to) {
+ var l1 = from.line, l2 = to.line;
+ if (l1 == l2) return lines[l1].text.slice(from.ch, to.ch);
+ var code = [lines[l1].text.slice(from.ch)];
+ for (var i = l1 + 1; i < l2; ++i) code.push(lines[i].text);
+ code.push(lines[l2].text.slice(0, to.ch));
+ return code.join("\n");
+ }
+ function getSelection() {
+ return getRange(sel.from, sel.to);
+ }
+
+ var pollingFast = false; // Ensures slowPoll doesn't cancel fastPoll
+ function slowPoll() {
+ if (pollingFast) return;
+ poll.set(2000, function() {
+ startOperation();
+ readInput();
+ if (focused) slowPoll();
+ endOperation();
+ });
+ }
+ function fastPoll(keyId) {
+ var missed = false;
+ pollingFast = true;
+ function p() {
+ startOperation();
+ var changed = readInput();
+ if (changed == "moved" && keyId) movementKeys[keyId] = true;
+ if (!changed && !missed) {missed = true; poll.set(80, p);}
+ else {pollingFast = false; slowPoll();}
+ endOperation();
+ }
+ poll.set(20, p);
+ }
+
+ // Inspects the textarea, compares its state (content, selection)
+ // to the data in the editing variable, and updates the editor
+ // content or cursor if something changed.
+ function readInput() {
+ if (leaveInputAlone) return;
+ var changed = false, text = input.value, sr = selRange(input);
+ if (!sr) return false;
+ var changed = editing.text != text, rs = reducedSelection;
+ var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);
+ if (!moved && !rs) return false;
+ if (changed) {
+ shiftSelecting = reducedSelection = null;
+ if (options.readOnly) {updateInput = true; return "changed";}
+ }
+
+ // Compute selection start and end based on start/end offsets in textarea
+ function computeOffset(n, startLine) {
+ var pos = 0;
+ for (;;) {
+ var found = text.indexOf("\n", pos);
+ if (found == -1 || (text.charAt(found-1) == "\r" ? found - 1 : found) >= n)
+ return {line: startLine, ch: n - pos};
+ ++startLine;
+ pos = found + 1;
+ }
+ }
+ var from = computeOffset(sr.start, editing.from),
+ to = computeOffset(sr.end, editing.from);
+ // Here we have to take the reducedSelection hack into account,
+ // so that you can, for example, press shift-up at the start of
+ // your selection and have the right thing happen.
+ if (rs) {
+ from = sr.start == rs.anchor ? to : from;
+ to = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;
+ if (!posLess(from, to)) {
+ reducedSelection = null;
+ sel.inverted = false;
+ var tmp = from; from = to; to = tmp;
+ }
+ }
+
+ // In some cases (cursor on same line as before), we don't have
+ // to update the textarea content at all.
+ if (from.line == to.line && from.line == sel.from.line && from.line == sel.to.line && !shiftSelecting)
+ updateInput = false;
+
+ // Magic mess to extract precise edited range from the changed
+ // string.
+ if (changed) {
+ var start = 0, end = text.length, len = Math.min(end, editing.text.length);
+ var c, line = editing.from, nl = -1;
+ while (start < len && (c = text.charAt(start)) == editing.text.charAt(start)) {
+ ++start;
+ if (c == "\n") {line++; nl = start;}
+ }
+ var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;
+ for (;;) {
+ c = editing.text.charAt(edend);
+ if (c == "\n") endline--;
+ if (text.charAt(end) != c) {++end; ++edend; break;}
+ if (edend <= start || end <= start) break;
+ --end; --edend;
+ }
+ var nl = editing.text.lastIndexOf("\n", edend - 1), endch = nl == -1 ? edend : edend - nl - 1;
+ updateLines({line: line, ch: ch}, {line: endline, ch: endch}, splitLines(text.slice(start, end)), from, to);
+ if (line != endline || from.line != line) updateInput = true;
+ }
+ else setSelection(from, to);
+
+ editing.text = text; editing.start = sr.start; editing.end = sr.end;
+ return changed ? "changed" : moved ? "moved" : false;
+ }
+
+ // Set the textarea content and selection range to match the
+ // editor state.
+ function prepareInput() {
+ var text = [];
+ var from = Math.max(0, sel.from.line - 1), to = Math.min(lines.length, sel.to.line + 2);
+ for (var i = from; i < to; ++i) text.push(lines[i].text);
+ text = input.value = text.join(lineSep);
+ var startch = sel.from.ch, endch = sel.to.ch;
+ for (var i = from; i < sel.from.line; ++i)
+ startch += lineSep.length + lines[i].text.length;
+ for (var i = from; i < sel.to.line; ++i)
+ endch += lineSep.length + lines[i].text.length;
+ editing = {text: text, from: from, to: to, start: startch, end: endch};
+ setSelRange(input, startch, reducedSelection ? startch : endch);
+ }
+ function focusInput() {
+ if (options.readOnly != "nocursor") input.focus();
+ }
+
+ function scrollCursorIntoView() {
+ var cursor = localCoords(sel.inverted ? sel.from : sel.to);
+ return scrollIntoView(cursor.x, cursor.y, cursor.x, cursor.yBot);
+ }
+ function scrollIntoView(x1, y1, x2, y2) {
+ var pl = paddingLeft(), pt = paddingTop(), lh = lineHeight();
+ y1 += pt; y2 += pt; x1 += pl; x2 += pl;
+ var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true;
+ if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1 - 2*lh); scrolled = true;}
+ else if (y2 > screentop + screen) {scroller.scrollTop = y2 + lh - screen; scrolled = true;}
+
+ var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;
+ if (x1 < screenleft) {
+ if (x1 < 50) x1 = 0;
+ scroller.scrollLeft = Math.max(0, x1 - 10);
+ scrolled = true;
+ }
+ else if (x2 > screenw + screenleft) {
+ scroller.scrollLeft = x2 + 10 - screenw;
+ scrolled = true;
+ if (x2 > code.clientWidth) result = false;
+ }
+ if (scrolled && options.onScroll) options.onScroll(instance);
+ return result;
+ }
+
+ function visibleLines() {
+ var lh = lineHeight(), top = scroller.scrollTop - paddingTop();
+ return {from: Math.min(lines.length, Math.max(0, Math.floor(top / lh))),
+ to: Math.min(lines.length, Math.ceil((top + scroller.clientHeight) / lh))};
+ }
+ // Uses a set of changes plus the current scroll position to
+ // determine which DOM updates have to be made, and makes the
+ // updates.
+ function updateDisplay(changes) {
+ if (!scroller.clientWidth) {
+ showingFrom = showingTo = 0;
+ return;
+ }
+ // First create a range of theoretically intact lines, and punch
+ // holes in that using the change info.
+ var intact = changes === true ? [] : [{from: showingFrom, to: showingTo, domStart: 0}];
+ for (var i = 0, l = changes.length || 0; i < l; ++i) {
+ var change = changes[i], intact2 = [], diff = change.diff || 0;
+ for (var j = 0, l2 = intact.length; j < l2; ++j) {
+ var range = intact[j];
+ if (change.to <= range.from)
+ intact2.push({from: range.from + diff, to: range.to + diff, domStart: range.domStart});
+ else if (range.to <= change.from)
+ intact2.push(range);
+ else {
+ if (change.from > range.from)
+ intact2.push({from: range.from, to: change.from, domStart: range.domStart})
+ if (change.to < range.to)
+ intact2.push({from: change.to + diff, to: range.to + diff,
+ domStart: range.domStart + (change.to - range.from)});
+ }
+ }
+ intact = intact2;
+ }
+
+ // Then, determine which lines we'd want to see, and which
+ // updates have to be made to get there.
+ var visible = visibleLines();
+ var from = Math.min(showingFrom, Math.max(visible.from - 3, 0)),
+ to = Math.min(lines.length, Math.max(showingTo, visible.to + 3)),
+ updates = [], domPos = 0, domEnd = showingTo - showingFrom, pos = from, changedLines = 0;
+
+ for (var i = 0, l = intact.length; i < l; ++i) {
+ var range = intact[i];
+ if (range.to <= from) continue;
+ if (range.from >= to) break;
+ if (range.domStart > domPos || range.from > pos) {
+ updates.push({from: pos, to: range.from, domSize: range.domStart - domPos, domStart: domPos});
+ changedLines += range.from - pos;
+ }
+ pos = range.to;
+ domPos = range.domStart + (range.to - range.from);
+ }
+ if (domPos != domEnd || pos != to) {
+ changedLines += Math.abs(to - pos);
+ updates.push({from: pos, to: to, domSize: domEnd - domPos, domStart: domPos});
+ }
+
+ if (!updates.length) return;
+ lineDiv.style.display = "none";
+ // If more than 30% of the screen needs update, just do a full
+ // redraw (which is quicker than patching)
+ if (changedLines > (visible.to - visible.from) * .3)
+ refreshDisplay(from = Math.max(visible.from - 10, 0), to = Math.min(visible.to + 7, lines.length));
+ // Otherwise, only update the stuff that needs updating.
+ else
+ patchDisplay(updates);
+ lineDiv.style.display = "";
+
+ // Position the mover div to align with the lines it's supposed
+ // to be showing (which will cover the visible display)
+ var different = from != showingFrom || to != showingTo || lastHeight != scroller.clientHeight;
+ showingFrom = from; showingTo = to;
+ mover.style.top = (from * lineHeight()) + "px";
+ if (different) {
+ lastHeight = scroller.clientHeight;
+ code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px";
+ updateGutter();
+ }
+
+ var textWidth = stringWidth(maxLine);
+ lineSpace.style.width = textWidth > scroller.clientWidth ? textWidth + "px" : "";
+
+ // Since this is all rather error prone, it is honoured with the
+ // only assertion in the whole file.
+ if (lineDiv.childNodes.length != showingTo - showingFrom)
+ throw new Error("BAD PATCH! " + JSON.stringify(updates) + " size=" + (showingTo - showingFrom) +
+ " nodes=" + lineDiv.childNodes.length);
+ updateCursor();
+ }
+
+ function refreshDisplay(from, to) {
+ var html = [], start = {line: from, ch: 0}, inSel = posLess(sel.from, start) && !posLess(sel.to, start);
+ for (var i = from; i < to; ++i) {
+ var ch1 = null, ch2 = null;
+ if (inSel) {
+ ch1 = 0;
+ if (sel.to.line == i) {inSel = false; ch2 = sel.to.ch;}
+ }
+ else if (sel.from.line == i) {
+ if (sel.to.line == i) {ch1 = sel.from.ch; ch2 = sel.to.ch;}
+ else {inSel = true; ch1 = sel.from.ch;}
+ }
+ html.push(lines[i].getHTML(ch1, ch2, true));
+ }
+ lineDiv.innerHTML = html.join("");
+ }
+ function patchDisplay(updates) {
+ // Slightly different algorithm for IE (badInnerHTML), since
+ // there .innerHTML on PRE nodes is dumb, and discards
+ // whitespace.
+ var sfrom = sel.from.line, sto = sel.to.line, off = 0,
+ scratch = badInnerHTML && targetDocument.createElement("div");
+ for (var i = 0, e = updates.length; i < e; ++i) {
+ var rec = updates[i];
+ var extra = (rec.to - rec.from) - rec.domSize;
+ var nodeAfter = lineDiv.childNodes[rec.domStart + rec.domSize + off] || null;
+ if (badInnerHTML)
+ for (var j = Math.max(-extra, rec.domSize); j > 0; --j)
+ lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
+ else if (extra) {
+ for (var j = Math.max(0, extra); j > 0; --j)
+ lineDiv.insertBefore(targetDocument.createElement("pre"), nodeAfter);
+ for (var j = Math.max(0, -extra); j > 0; --j)
+ lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
+ }
+ var node = lineDiv.childNodes[rec.domStart + off], inSel = sfrom < rec.from && sto >= rec.from;
+ for (var j = rec.from; j < rec.to; ++j) {
+ var ch1 = null, ch2 = null;
+ if (inSel) {
+ ch1 = 0;
+ if (sto == j) {inSel = false; ch2 = sel.to.ch;}
+ }
+ else if (sfrom == j) {
+ if (sto == j) {ch1 = sel.from.ch; ch2 = sel.to.ch;}
+ else {inSel = true; ch1 = sel.from.ch;}
+ }
+ if (badInnerHTML) {
+ scratch.innerHTML = lines[j].getHTML(ch1, ch2, true);
+ lineDiv.insertBefore(scratch.firstChild, nodeAfter);
+ }
+ else {
+ node.innerHTML = lines[j].getHTML(ch1, ch2, false);
+ node.className = lines[j].className || "";
+ node = node.nextSibling;
+ }
+ }
+ off += extra;
+ }
+ }
+
+ function updateGutter() {
+ if (!options.gutter && !options.lineNumbers) return;
+ var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
+ gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
+ var html = [];
+ for (var i = showingFrom; i < showingTo; ++i) {
+ var marker = lines[i].gutterMarker;
+ var text = options.lineNumbers ? i + options.firstLineNumber : null;
+ if (marker && marker.text)
+ text = marker.text.replace("%N%", text != null ? text : "");
+ else if (text == null)
+ text = "\u00a0";
+ html.push((marker && marker.style ? '<pre class="' + marker.style + '">' : "<pre>"), text, "</pre>");
+ }
+ gutter.style.display = "none";
+ gutterText.innerHTML = html.join("");
+ var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = "";
+ while (val.length + pad.length < minwidth) pad += "\u00a0";
+ if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild);
+ gutter.style.display = "";
+ lineSpace.style.marginLeft = gutter.offsetWidth + "px";
+ }
+ function updateCursor() {
+ var head = sel.inverted ? sel.from : sel.to, lh = lineHeight();
+ var x = charX(head.line, head.ch) + "px", y = (head.line - showingFrom) * lh + "px";
+ inputDiv.style.top = (head.line * lh - scroller.scrollTop) + "px";
+ if (posEq(sel.from, sel.to)) {
+ cursor.style.top = y; cursor.style.left = x;
+ cursor.style.display = "";
+ }
+ else cursor.style.display = "none";
+ }
+
+ function setSelectionUser(from, to) {
+ var sh = shiftSelecting && clipPos(shiftSelecting);
+ if (sh) {
+ if (posLess(sh, from)) from = sh;
+ else if (posLess(to, sh)) to = sh;
+ }
+ setSelection(from, to);
+ }
+ // Update the selection. Last two args are only used by
+ // updateLines, since they have to be expressed in the line
+ // numbers before the update.
+ function setSelection(from, to, oldFrom, oldTo) {
+ if (posEq(sel.from, from) && posEq(sel.to, to)) return;
+ if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
+
+ var startEq = posEq(sel.to, to), endEq = posEq(sel.from, from);
+ if (posEq(from, to)) sel.inverted = false;
+ else if (startEq && !endEq) sel.inverted = true;
+ else if (endEq && !startEq) sel.inverted = false;
+
+ // Some ugly logic used to only mark the lines that actually did
+ // see a change in selection as changed, rather than the whole
+ // selected range.
+ if (oldFrom == null) {oldFrom = sel.from.line; oldTo = sel.to.line;}
+ if (posEq(from, to)) {
+ if (!posEq(sel.from, sel.to))
+ changes.push({from: oldFrom, to: oldTo + 1});
+ }
+ else if (posEq(sel.from, sel.to)) {
+ changes.push({from: from.line, to: to.line + 1});
+ }
+ else {
+ if (!posEq(from, sel.from)) {
+ if (from.line < oldFrom)
+ changes.push({from: from.line, to: Math.min(to.line, oldFrom) + 1});
+ else
+ changes.push({from: oldFrom, to: Math.min(oldTo, from.line) + 1});
+ }
+ if (!posEq(to, sel.to)) {
+ if (to.line < oldTo)
+ changes.push({from: Math.max(oldFrom, from.line), to: oldTo + 1});
+ else
+ changes.push({from: Math.max(from.line, oldTo), to: to.line + 1});
+ }
+ }
+ sel.from = from; sel.to = to;
+ selectionChanged = true;
+ }
+ function setCursor(line, ch, user) {
+ var pos = clipPos({line: line, ch: ch || 0});
+ (user ? setSelectionUser : setSelection)(pos, pos);
+ }
+
+ function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));}
+ function clipPos(pos) {
+ if (pos.line < 0) return {line: 0, ch: 0};
+ if (pos.line >= lines.length) return {line: lines.length-1, ch: lines[lines.length-1].text.length};
+ var ch = pos.ch, linelen = lines[pos.line].text.length;
+ if (ch == null || ch > linelen) return {line: pos.line, ch: linelen};
+ else if (ch < 0) return {line: pos.line, ch: 0};
+ else return pos;
+ }
+
+ function scrollPage(down) {
+ var linesPerPage = Math.floor(scroller.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to;
+ setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch, true);
+ }
+ function scrollEnd(top) {
+ var pos = top ? {line: 0, ch: 0} : {line: lines.length - 1, ch: lines[lines.length-1].text.length};
+ setSelectionUser(pos, pos);
+ }
+ function selectAll() {
+ var endLine = lines.length - 1;
+ setSelection({line: 0, ch: 0}, {line: endLine, ch: lines[endLine].text.length});
+ }
+ function selectWordAt(pos) {
+ var line = lines[pos.line].text;
+ var start = pos.ch, end = pos.ch;
+ while (start > 0 && /\w/.test(line.charAt(start - 1))) --start;
+ while (end < line.length && /\w/.test(line.charAt(end))) ++end;
+ setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end});
+ }
+ function selectLine(line) {
+ setSelectionUser({line: line, ch: 0}, {line: line, ch: lines[line].text.length});
+ }
+ function handleEnter() {
+ replaceSelection("\n", "end");
+ if (options.enterMode != "flat")
+ indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart");
+ }
+ function handleTab(shift) {
+ shiftSelecting = null;
+ switch (options.tabMode) {
+ case "default":
+ return false;
+ case "indent":
+ for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, "smart");
+ break;
+ case "classic":
+ if (posEq(sel.from, sel.to)) {
+ if (shift) indentLine(sel.from.line, "smart");
+ else replaceSelection("\t", "end");
+ break;
+ }
+ case "shift":
+ for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, shift ? "subtract" : "add");
+ break;
+ }
+ return true;
+ }
+
+ function indentLine(n, how) {
+ if (how == "smart") {
+ if (!mode.indent) how = "prev";
+ else var state = getStateBefore(n);
+ }
+
+ var line = lines[n], curSpace = line.indentation(), curSpaceString = line.text.match(/^\s*/)[0], indentation;
+ if (how == "prev") {
+ if (n) indentation = lines[n-1].indentation();
+ else indentation = 0;
+ }
+ else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length));
+ else if (how == "add") indentation = curSpace + options.indentUnit;
+ else if (how == "subtract") indentation = curSpace - options.indentUnit;
+ indentation = Math.max(0, indentation);
+ var diff = indentation - curSpace;
+
+ if (!diff) {
+ if (sel.from.line != n && sel.to.line != n) return;
+ var indentString = curSpaceString;
+ }
+ else {
+ var indentString = "", pos = 0;
+ if (options.indentWithTabs)
+ for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";}
+ while (pos < indentation) {++pos; indentString += " ";}
+ }
+
+ replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length});
+ }
+
+ function loadMode() {
+ mode = CodeMirror.getMode(options, options.mode);
+ for (var i = 0, l = lines.length; i < l; ++i)
+ lines[i].stateAfter = null;
+ work = [0];
+ startWorker();
+ }
+ function gutterChanged() {
+ var visible = options.gutter || options.lineNumbers;
+ gutter.style.display = visible ? "" : "none";
+ if (visible) updateGutter();
+ else lineDiv.parentNode.style.marginLeft = 0;
+ }
+
+ function markText(from, to, className) {
+ from = clipPos(from); to = clipPos(to);
+ var accum = [];
+ function add(line, from, to, className) {
+ var line = lines[line], mark = line.addMark(from, to, className);
+ mark.line = line;
+ accum.push(mark);
+ }
+ if (from.line == to.line) add(from.line, from.ch, to.ch, className);
+ else {
+ add(from.line, from.ch, null, className);
+ for (var i = from.line + 1, e = to.line; i < e; ++i)
+ add(i, 0, null, className);
+ add(to.line, 0, to.ch, className);
+ }
+ changes.push({from: from.line, to: to.line + 1});
+ return function() {
+ var start, end;
+ for (var i = 0; i < accum.length; ++i) {
+ var mark = accum[i], found = indexOf(lines, mark.line);
+ mark.line.removeMark(mark);
+ if (found > -1) {
+ if (start == null) start = found;
+ end = found;
+ }
+ }
+ if (start != null) changes.push({from: start, to: end + 1});
+ };
+ }
+
+ function addGutterMarker(line, text, className) {
+ if (typeof line == "number") line = lines[clipLine(line)];
+ line.gutterMarker = {text: text, style: className};
+ updateGutter();
+ return line;
+ }
+ function removeGutterMarker(line) {
+ if (typeof line == "number") line = lines[clipLine(line)];
+ line.gutterMarker = null;
+ updateGutter();
+ }
+ function setLineClass(line, className) {
+ if (typeof line == "number") {
+ var no = line;
+ line = lines[clipLine(line)];
+ }
+ else {
+ var no = indexOf(lines, line);
+ if (no == -1) return null;
+ }
+ if (line.className != className) {
+ line.className = className;
+ changes.push({from: no, to: no + 1});
+ }
+ return line;
+ }
+
+ function lineInfo(line) {
+ if (typeof line == "number") {
+ var n = line;
+ line = lines[line];
+ if (!line) return null;
+ }
+ else {
+ var n = indexOf(lines, line);
+ if (n == -1) return null;
+ }
+ var marker = line.gutterMarker;
+ return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style};
+ }
+
+ function stringWidth(str) {
+ measure.innerHTML = "<pre><span>x</span></pre>";
+ measure.firstChild.firstChild.firstChild.nodeValue = str;
+ return measure.firstChild.firstChild.offsetWidth || 10;
+ }
+ // These are used to go from pixel positions to character
+ // positions, taking varying character widths into account.
+ function charX(line, pos) {
+ if (pos == 0) return 0;
+ measure.innerHTML = "<pre><span>" + lines[line].getHTML(null, null, false, pos) + "</span></pre>";
+ return measure.firstChild.firstChild.offsetWidth;
+ }
+ function charFromX(line, x) {
+ if (x <= 0) return 0;
+ var lineObj = lines[line], text = lineObj.text;
+ function getX(len) {
+ measure.innerHTML = "<pre><span>" + lineObj.getHTML(null, null, false, len) + "</span></pre>";
+ return measure.firstChild.firstChild.offsetWidth;
+ }
+ var from = 0, fromX = 0, to = text.length, toX;
+ // Guess a suitable upper bound for our search.
+ var estimated = Math.min(to, Math.ceil(x / stringWidth("x")));
+ for (;;) {
+ var estX = getX(estimated);
+ if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));
+ else {toX = estX; to = estimated; break;}
+ }
+ if (x > toX) return to;
+ // Try to guess a suitable lower bound as well.
+ estimated = Math.floor(to * 0.8); estX = getX(estimated);
+ if (estX < x) {from = estimated; fromX = estX;}
+ // Do a binary search between these bounds.
+ for (;;) {
+ if (to - from <= 1) return (toX - x > x - fromX) ? from : to;
+ var middle = Math.ceil((from + to) / 2), middleX = getX(middle);
+ if (middleX > x) {to = middle; toX = middleX;}
+ else {from = middle; fromX = middleX;}
+ }
+ }
+
+ function localCoords(pos, inLineWrap) {
+ var lh = lineHeight(), line = pos.line - (inLineWrap ? showingFrom : 0);
+ return {x: charX(pos.line, pos.ch), y: line * lh, yBot: (line + 1) * lh};
+ }
+ function pageCoords(pos) {
+ var local = localCoords(pos, true), off = eltOffset(lineSpace);
+ return {x: off.left + local.x, y: off.top + local.y, yBot: off.top + local.yBot};
+ }
+
+ function lineHeight() {
+ var nlines = lineDiv.childNodes.length;
+ if (nlines) return (lineDiv.offsetHeight / nlines) || 1;
+ measure.innerHTML = "<pre>x</pre>";
+ return measure.firstChild.offsetHeight || 1;
+ }
+ function paddingTop() {return lineSpace.offsetTop;}
+ function paddingLeft() {return lineSpace.offsetLeft;}
+
+ function posFromMouse(e, liberal) {
+ var offW = eltOffset(scroller, true), x = e.e.clientX, y = e.e.clientY;
+ // This is a mess of a heuristic to try and determine whether a
+ // scroll-bar was clicked or not, and to return null if one was
+ // (and !liberal).
+ if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight))
+ return null;
+ var offL = eltOffset(lineSpace, true);
+ var line = showingFrom + Math.floor((y - offL.top) / lineHeight());
+ return clipPos({line: line, ch: charFromX(clipLine(line), x - offL.left)});
+ }
+ function onContextMenu(e) {
+ var pos = posFromMouse(e);
+ if (!pos || window.opera) return; // Opera is difficult.
+ if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
+ setCursor(pos.line, pos.ch);
+
+ var oldCSS = input.style.cssText;
+ input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.pageY() - 1) +
+ "px; left: " + (e.pageX() - 1) + "px; z-index: 1000; background: white; " +
+ "border-width: 0; outline: none; overflow: hidden;";
+ var val = input.value = getSelection();
+ focusInput();
+ setSelRange(input, 0, input.value.length);
+ leaveInputAlone = true;
+ function rehide() {
+ if (input.value != val) operation(replaceSelection)(input.value, "end");
+ input.style.cssText = oldCSS;
+ leaveInputAlone = false;
+ prepareInput();
+ slowPoll();
+ }
+
+ if (gecko) {
+ e.stop()
+ var mouseup = connect(window, "mouseup", function() {
+ mouseup();
+ setTimeout(rehide, 20);
+ }, true);
+ }
+ else {
+ setTimeout(rehide, 50);
+ }
+ }
+
+ // Cursor-blinking
+ function restartBlink() {
+ clearInterval(blinker);
+ var on = true;
+ cursor.style.visibility = "";
+ blinker = setInterval(function() {
+ cursor.style.visibility = (on = !on) ? "" : "hidden";
+ }, 650);
+ }
+
+ var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"};
+ function matchBrackets(autoclear) {
+ var head = sel.inverted ? sel.from : sel.to, line = lines[head.line], pos = head.ch - 1;
+ var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)];
+ if (!match) return;
+ var ch = match.charAt(0), forward = match.charAt(1) == ">", d = forward ? 1 : -1, st = line.styles;
+ for (var off = pos + 1, i = 0, e = st.length; i < e; i+=2)
+ if ((off -= st[i].length) <= 0) {var style = st[i+1]; break;}
+
+ var stack = [line.text.charAt(pos)], re = /[(){}[\]]/;
+ function scan(line, from, to) {
+ if (!line.text) return;
+ var st = line.styles, pos = forward ? 0 : line.text.length - 1, cur;
+ for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) {
+ var text = st[i];
+ if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;}
+ for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) {
+ if (pos >= from && pos < to && re.test(cur = text.charAt(j))) {
+ var match = matching[cur];
+ if (match.charAt(1) == ">" == forward) stack.push(cur);
+ else if (stack.pop() != match.charAt(0)) return {pos: pos, match: false};
+ else if (!stack.length) return {pos: pos, match: true};
+ }
+ }
+ }
+ }
+ for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(-1, i - 50); i != e; i+=d) {
+ var line = lines[i], first = i == head.line;
+ var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
+ if (found) {
+ var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
+ var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),
+ two = markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);
+ var clear = operation(function(){one(); two();});
+ if (autoclear) setTimeout(clear, 800);
+ else bracketHighlighted = clear;
+ break;
+ }
+ }
+ }
+
+ // Finds the line to start with when starting a parse. Tries to
+ // find a line with a stateAfter, so that it can start with a
+ // valid state. If that fails, it returns the line with the
+ // smallest indentation, which tends to need the least context to
+ // parse correctly.
+ function findStartLine(n) {
+ var minindent, minline;
+ for (var search = n, lim = n - 40; search > lim; --search) {
+ if (search == 0) return 0;
+ var line = lines[search-1];
+ if (line.stateAfter) return search;
+ var indented = line.indentation();
+ if (minline == null || minindent > indented) {
+ minline = search;
+ minindent = indented;
+ }
+ }
+ return minline;
+ }
+ function getStateBefore(n) {
+ var start = findStartLine(n), state = start && lines[start-1].stateAfter;
+ if (!state) state = startState(mode);
+ else state = copyState(mode, state);
+ for (var i = start; i < n; ++i) {
+ var line = lines[i];
+ line.highlight(mode, state);
+ line.stateAfter = copyState(mode, state);
+ }
+ if (!lines[n].stateAfter) work.push(n);
+ return state;
+ }
+ function highlightWorker() {
+ var end = +new Date + options.workTime;
+ var didSomething = false;
+ while (work.length) {
+ if (!lines[showingFrom].stateAfter) var task = showingFrom;
+ else var task = work.pop();
+ if (task >= lines.length) continue;
+ didSomething = true;
+ var start = findStartLine(task), state = start && lines[start-1].stateAfter;
+ if (state) state = copyState(mode, state);
+ else state = startState(mode);
+
+ var unchanged = 0;
+ for (var i = start, l = lines.length; i < l; ++i) {
+ var line = lines[i], hadState = line.stateAfter;
+ if (+new Date > end) {
+ work.push(i);
+ startWorker(options.workDelay);
+ changes.push({from: task, to: i});
+ return;
+ }
+ var changed = line.highlight(mode, state);
+ line.stateAfter = copyState(mode, state);
+ if (changed || !hadState) unchanged = 0;
+ else if (++unchanged > 3) break;
+ }
+ changes.push({from: task, to: i});
+ }
+ if (didSomething && options.onHighlightComplete)
+ options.onHighlightComplete(instance);
+ }
+ function startWorker(time) {
+ if (!work.length) return;
+ highlight.set(time, operation(highlightWorker));
+ }
+
+ // Operations are used to wrap changes in such a way that each
+ // change won't have to update the cursor and display (which would
+ // be awkward, slow, and error-prone), but instead updates are
+ // batched and then all combined and executed at once.
+ function startOperation() {
+ updateInput = null; changes = []; textChanged = selectionChanged = false;
+ }
+ function endOperation() {
+ var reScroll = false;
+ if (selectionChanged) reScroll = !scrollCursorIntoView();
+ if (changes.length) updateDisplay(changes);
+ else if (selectionChanged) updateCursor();
+ if (reScroll) scrollCursorIntoView();
+ if (selectionChanged) restartBlink();
+
+ // updateInput can be set to a boolean value to force/prevent an
+ // update.
+ if (!leaveInputAlone && (updateInput === true || (updateInput !== false && selectionChanged)))
+ prepareInput();
+
+ if (selectionChanged && options.matchBrackets)
+ setTimeout(operation(function() {
+ if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
+ matchBrackets(false);
+ }), 20);
+ var tc = textChanged; // textChanged can be reset by cursoractivity callback
+ if (selectionChanged && options.onCursorActivity)
+ options.onCursorActivity(instance);
+ if (tc && options.onChange && instance)
+ options.onChange(instance, tc);
+ }
+ var nestedOperation = 0;
+ function operation(f) {
+ return function() {
+ if (!nestedOperation++) startOperation();
+ try {var result = f.apply(this, arguments);}
+ finally {if (!--nestedOperation) endOperation();}
+ return result;
+ };
+ }
+
+ function SearchCursor(query, pos, caseFold) {
+ this.atOccurrence = false;
+ if (caseFold == null) caseFold = typeof query == "string" && query == query.toLowerCase();
+
+ if (pos && typeof pos == "object") pos = clipPos(pos);
+ else pos = {line: 0, ch: 0};
+ this.pos = {from: pos, to: pos};
+
+ // The matches method is filled in based on the type of query.
+ // It takes a position and a direction, and returns an object
+ // describing the next occurrence of the query, or null if no
+ // more matches were found.
+ if (typeof query != "string") // Regexp match
+ this.matches = function(reverse, pos) {
+ if (reverse) {
+ var line = lines[pos.line].text.slice(0, pos.ch), match = line.match(query), start = 0;
+ while (match) {
+ var ind = line.indexOf(match[0]);
+ start += ind;
+ line = line.slice(ind + 1);
+ var newmatch = line.match(query);
+ if (newmatch) match = newmatch;
+ else break;
+ start++;
+ }
+ }
+ else {
+ var line = lines[pos.line].text.slice(pos.ch), match = line.match(query),
+ start = match && pos.ch + line.indexOf(match[0]);
+ }
+ if (match)
+ return {from: {line: pos.line, ch: start},
+ to: {line: pos.line, ch: start + match[0].length},
+ match: match};
+ };
+ else { // String query
+ if (caseFold) query = query.toLowerCase();
+ var fold = caseFold ? function(str){return str.toLowerCase();} : function(str){return str;};
+ var target = query.split("\n");
+ // Different methods for single-line and multi-line queries
+ if (target.length == 1)
+ this.matches = function(reverse, pos) {
+ var line = fold(lines[pos.line].text), len = query.length, match;
+ if (reverse ? (pos.ch >= len && (match = line.lastIndexOf(query, pos.ch - len)) != -1)
+ : (match = line.indexOf(query, pos.ch)) != -1)
+ return {from: {line: pos.line, ch: match},
+ to: {line: pos.line, ch: match + len}};
+ };
+ else
+ this.matches = function(reverse, pos) {
+ var ln = pos.line, idx = (reverse ? target.length - 1 : 0), match = target[idx], line = fold(lines[ln].text);
+ var offsetA = (reverse ? line.indexOf(match) + match.length : line.lastIndexOf(match));
+ if (reverse ? offsetA >= pos.ch || offsetA != match.length
+ : offsetA <= pos.ch || offsetA != line.length - match.length)
+ return;
+ for (;;) {
+ if (reverse ? !ln : ln == lines.length - 1) return;
+ line = fold(lines[ln += reverse ? -1 : 1].text);
+ match = target[reverse ? --idx : ++idx];
+ if (idx > 0 && idx < target.length - 1) {
+ if (line != match) return;
+ else continue;
+ }
+ var offsetB = (reverse ? line.lastIndexOf(match) : line.indexOf(match) + match.length);
+ if (reverse ? offsetB != line.length - match.length : offsetB != match.length)
+ return;
+ var start = {line: pos.line, ch: offsetA}, end = {line: ln, ch: offsetB};
+ return {from: reverse ? end : start, to: reverse ? start : end};
+ }
+ };
+ }
+ }
+
+ SearchCursor.prototype = {
+ findNext: function() {return this.find(false);},
+ findPrevious: function() {return this.find(true);},
+
+ find: function(reverse) {
+ var self = this, pos = clipPos(reverse ? this.pos.from : this.pos.to);
+ function savePosAndFail(line) {
+ var pos = {line: line, ch: 0};
+ self.pos = {from: pos, to: pos};
+ self.atOccurrence = false;
+ return false;
+ }
+
+ for (;;) {
+ if (this.pos = this.matches(reverse, pos)) {
+ this.atOccurrence = true;
+ return this.pos.match || true;
+ }
+ if (reverse) {
+ if (!pos.line) return savePosAndFail(0);
+ pos = {line: pos.line-1, ch: lines[pos.line-1].text.length};
+ }
+ else {
+ if (pos.line == lines.length - 1) return savePosAndFail(lines.length);
+ pos = {line: pos.line+1, ch: 0};
+ }
+ }
+ },
+
+ from: function() {if (this.atOccurrence) return copyPos(this.pos.from);},
+ to: function() {if (this.atOccurrence) return copyPos(this.pos.to);}
+ };
+
+ return instance;
+ } // (end of function CodeMirror)
+
+ // The default configuration options.
+ CodeMirror.defaults = {
+ value: "",
+ mode: null,
+ indentUnit: 2,
+ indentWithTabs: false,
+ tabMode: "classic",
+ enterMode: "indent",
+ electricChars: true,
+ onKeyEvent: null,
+ lineNumbers: false,
+ gutter: false,
+ firstLineNumber: 1,
+ readOnly: false,
+ onChange: null,
+ onCursorActivity: null,
+ onGutterClick: null,
+ onHighlightComplete: null,
+ onFocus: null, onBlur: null, onScroll: null,
+ matchBrackets: false,
+ workTime: 100,
+ workDelay: 200,
+ undoDepth: 40,
+ tabindex: null,
+ document: window.document
+ };
+
+ // Known modes, by name and by MIME
+ var modes = {}, mimeModes = {};
+ CodeMirror.defineMode = function(name, mode) {
+ if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name;
+ modes[name] = mode;
+ };
+ CodeMirror.defineMIME = function(mime, spec) {
+ mimeModes[mime] = spec;
+ };
+ CodeMirror.getMode = function(options, spec) {
+ if (typeof spec == "string" && mimeModes.hasOwnProperty(spec))
+ spec = mimeModes[spec];
+ if (typeof spec == "string")
+ var mname = spec, config = {};
+ else if (spec != null)
+ var mname = spec.name, config = spec;
+ var mfactory = modes[mname];
+ if (!mfactory) {
+ if (window.console) console.warn("No mode " + mname + " found, falling back to plain text.");
+ return CodeMirror.getMode(options, "text/plain");
+ }
+ return mfactory(options, config || {});
+ }
+ CodeMirror.listModes = function() {
+ var list = [];
+ for (var m in modes)
+ if (modes.propertyIsEnumerable(m)) list.push(m);
+ return list;
+ };
+ CodeMirror.listMIMEs = function() {
+ var list = [];
+ for (var m in mimeModes)
+ if (mimeModes.propertyIsEnumerable(m)) list.push(m);
+ return list;
+ };
+
+ CodeMirror.fromTextArea = function(textarea, options) {
+ if (!options) options = {};
+ options.value = textarea.value;
+ if (!options.tabindex && textarea.tabindex)
+ options.tabindex = textarea.tabindex;
+
+ function save() {textarea.value = instance.getValue();}
+ if (textarea.form) {
+ // Deplorable hack to make the submit method do the right thing.
+ var rmSubmit = connect(textarea.form, "submit", save, true);
+ if (typeof textarea.form.submit == "function") {
+ var realSubmit = textarea.form.submit;
+ function wrappedSubmit() {
+ save();
+ textarea.form.submit = realSubmit;
+ textarea.form.submit();
+ textarea.form.submit = wrappedSubmit;
+ }
+ textarea.form.submit = wrappedSubmit;
+ }
+ }
+
+ textarea.style.display = "none";
+ var instance = CodeMirror(function(node) {
+ textarea.parentNode.insertBefore(node, textarea.nextSibling);
+ }, options);
+ instance.save = save;
+ instance.toTextArea = function() {
+ save();
+ textarea.parentNode.removeChild(instance.getWrapperElement());
+ textarea.style.display = "";
+ if (textarea.form) {
+ rmSubmit();
+ if (typeof textarea.form.submit == "function")
+ textarea.form.submit = realSubmit;
+ }
+ };
+ return instance;
+ };
+
+ // Utility functions for working with state. Exported because modes
+ // sometimes need to do this.
+ function copyState(mode, state) {
+ if (state === true) return state;
+ if (mode.copyState) return mode.copyState(state);
+ var nstate = {};
+ for (var n in state) {
+ var val = state[n];
+ if (val instanceof Array) val = val.concat([]);
+ nstate[n] = val;
+ }
+ return nstate;
+ }
+ CodeMirror.startState = startState;
+ function startState(mode, a1, a2) {
+ return mode.startState ? mode.startState(a1, a2) : true;
+ }
+ CodeMirror.copyState = copyState;
+
+ // The character stream used by a mode's parser.
+ function StringStream(string) {
+ this.pos = this.start = 0;
+ this.string = string;
+ }
+ StringStream.prototype = {
+ eol: function() {return this.pos >= this.string.length;},
+ sol: function() {return this.pos == 0;},
+ peek: function() {return this.string.charAt(this.pos);},
+ next: function() {
+ if (this.pos < this.string.length)
+ return this.string.charAt(this.pos++);
+ },
+ eat: function(match) {
+ var ch = this.string.charAt(this.pos);
+ if (typeof match == "string") var ok = ch == match;
+ else var ok = ch && (match.test ? match.test(ch) : match(ch));
+ if (ok) {++this.pos; return ch;}
+ },
+ eatWhile: function(match) {
+ var start = this.start;
+ while (this.eat(match)){}
+ return this.pos > start;
+ },
+ eatSpace: function() {
+ var start = this.pos;
+ while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
+ return this.pos > start;
+ },
+ skipToEnd: function() {this.pos = this.string.length;},
+ skipTo: function(ch) {
+ var found = this.string.indexOf(ch, this.pos);
+ if (found > -1) {this.pos = found; return true;}
+ },
+ backUp: function(n) {this.pos -= n;},
+ column: function() {return countColumn(this.string, this.start);},
+ indentation: function() {return countColumn(this.string);},
+ match: function(pattern, consume, caseInsensitive) {
+ if (typeof pattern == "string") {
+ function cased(str) {return caseInsensitive ? str.toLowerCase() : str;}
+ if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
+ if (consume !== false) this.pos += pattern.length;
+ return true;
+ }
+ }
+ else {
+ var match = this.string.slice(this.pos).match(pattern);
+ if (match && consume !== false) this.pos += match[0].length;
+ return match;
+ }
+ },
+ current: function(){return this.string.slice(this.start, this.pos);}
+ };
+ CodeMirror.StringStream = StringStream;
+
+ // Line objects. These hold state related to a line, including
+ // highlighting info (the styles array).
+ function Line(text, styles) {
+ this.styles = styles || [text, null];
+ this.stateAfter = null;
+ this.text = text;
+ this.marked = this.gutterMarker = this.className = null;
+ }
+ Line.prototype = {
+ // Replace a piece of a line, keeping the styles around it intact.
+ replace: function(from, to, text) {
+ var st = [], mk = this.marked;
+ copyStyles(0, from, this.styles, st);
+ if (text) st.push(text, null);
+ copyStyles(to, this.text.length, this.styles, st);
+ this.styles = st;
+ this.text = this.text.slice(0, from) + text + this.text.slice(to);
+ this.stateAfter = null;
+ if (mk) {
+ var diff = text.length - (to - from), end = this.text.length;
+ function fix(n) {return n <= Math.min(to, to + diff) ? n : n + diff;}
+ for (var i = 0; i < mk.length; ++i) {
+ var mark = mk[i], del = false;
+ if (mark.from >= end) del = true;
+ else {mark.from = fix(mark.from); if (mark.to != null) mark.to = fix(mark.to);}
+ if (del || mark.from >= mark.to) {mk.splice(i, 1); i--;}
+ }
+ }
+ },
+ // Split a line in two, again keeping styles intact.
+ split: function(pos, textBefore) {
+ var st = [textBefore, null];
+ copyStyles(pos, this.text.length, this.styles, st);
+ return new Line(textBefore + this.text.slice(pos), st);
+ },
+ addMark: function(from, to, style) {
+ var mk = this.marked, mark = {from: from, to: to, style: style};
+ if (this.marked == null) this.marked = [];
+ this.marked.push(mark);
+ this.marked.sort(function(a, b){return a.from - b.from;});
+ return mark;
+ },
+ removeMark: function(mark) {
+ var mk = this.marked;
+ if (!mk) return;
+ for (var i = 0; i < mk.length; ++i)
+ if (mk[i] == mark) {mk.splice(i, 1); break;}
+ },
+ // Run the given mode's parser over a line, update the styles
+ // array, which contains alternating fragments of text and CSS
+ // classes.
+ highlight: function(mode, state) {
+ var stream = new StringStream(this.text), st = this.styles, pos = 0;
+ var changed = false, curWord = st[0], prevWord;
+ if (this.text == "" && mode.blankLine) mode.blankLine(state);
+ while (!stream.eol()) {
+ var style = mode.token(stream, state);
+ var substr = this.text.slice(stream.start, stream.pos);
+ stream.start = stream.pos;
+ if (pos && st[pos-1] == style)
+ st[pos-2] += substr;
+ else if (substr) {
+ if (!changed && (st[pos+1] != style || (pos && st[pos-2] != prevWord))) changed = true;
+ st[pos++] = substr; st[pos++] = style;
+ prevWord = curWord; curWord = st[pos];
+ }
+ // Give up when line is ridiculously long
+ if (stream.pos > 5000) {
+ st[pos++] = this.text.slice(stream.pos); st[pos++] = null;
+ break;
+ }
+ }
+ if (st.length != pos) {st.length = pos; changed = true;}
+ if (pos && st[pos-2] != prevWord) changed = true;
+ // Short lines with simple highlights always count as changed,
+ // because they are likely to highlight the same way in various
+ // contexts.
+ return changed || (st.length < 5 && this.text.length < 10);
+ },
+ // Fetch the parser token for a given character. Useful for hacks
+ // that want to inspect the mode state (say, for completion).
+ getTokenAt: function(mode, state, ch) {
+ var txt = this.text, stream = new StringStream(txt);
+ while (stream.pos < ch && !stream.eol()) {
+ stream.start = stream.pos;
+ var style = mode.token(stream, state);
+ }
+ return {start: stream.start,
+ end: stream.pos,
+ string: stream.current(),
+ className: style || null,
+ state: state};
+ },
+ indentation: function() {return countColumn(this.text);},
+ // Produces an HTML fragment for the line, taking selection,
+ // marking, and highlighting into account.
+ getHTML: function(sfrom, sto, includePre, endAt) {
+ var html = [];
+ if (includePre)
+ html.push(this.className ? '<pre class="' + this.className + '">': "<pre>");
+ function span(text, style) {
+ if (!text) return;
+ if (style) html.push('<span class="', style, '">', htmlEscape(text), "</span>");
+ else html.push(htmlEscape(text));
+ }
+ var st = this.styles, allText = this.text, marked = this.marked;
+ if (sfrom == sto) sfrom = null;
+ var len = allText.length;
+ if (endAt != null) len = Math.min(endAt, len);
+
+ if (!allText && endAt == null)
+ span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null);
+ else if (!marked && sfrom == null)
+ for (var i = 0, ch = 0; ch < len; i+=2) {
+ var str = st[i], l = str.length;
+ if (ch + l > len) str = str.slice(0, len - ch);
+ ch += l;
+ span(str, st[i+1]);
+ }
+ else {
+ var pos = 0, i = 0, text = "", style, sg = 0;
+ var markpos = -1, mark = null;
+ function nextMark() {
+ if (marked) {
+ markpos += 1;
+ mark = (markpos < marked.length) ? marked[markpos] : null;
+ }
+ }
+ nextMark();
+ while (pos < len) {
+ var upto = len;
+ var extraStyle = "";
+ if (sfrom != null) {
+ if (sfrom > pos) upto = sfrom;
+ else if (sto == null || sto > pos) {
+ extraStyle = " CodeMirror-selected";
+ if (sto != null) upto = Math.min(upto, sto);
+ }
+ }
+ while (mark && mark.to != null && mark.to <= pos) nextMark();
+ if (mark) {
+ if (mark.from > pos) upto = Math.min(upto, mark.from);
+ else {
+ extraStyle += " " + mark.style;
+ if (mark.to != null) upto = Math.min(upto, mark.to);
+ }
+ }
+ for (;;) {
+ var end = pos + text.length;
+ var apliedStyle = style;
+ if (extraStyle) apliedStyle = style ? style + extraStyle : extraStyle;
+ span(end > upto ? text.slice(0, upto - pos) : text, apliedStyle);
+ if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
+ pos = end;
+ text = st[i++]; style = st[i++];
+ }
+ }
+ if (sfrom != null && sto == null) span(" ", "CodeMirror-selected");
+ }
+ if (includePre) html.push("</pre>");
+ return html.join("");
+ }
+ };
+ // Utility used by replace and split above
+ function copyStyles(from, to, source, dest) {
+ for (var i = 0, pos = 0, state = 0; pos < to; i+=2) {
+ var part = source[i], end = pos + part.length;
+ if (state == 0) {
+ if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]);
+ if (end >= from) state = 1;
+ }
+ else if (state == 1) {
+ if (end > to) dest.push(part.slice(0, to - pos), source[i+1]);
+ else dest.push(part, source[i+1]);
+ }
+ pos = end;
+ }
+ }
+
+ // The history object 'chunks' changes that are made close together
+ // and at almost the same time into bigger undoable units.
+ function History() {
+ this.time = 0;
+ this.done = []; this.undone = [];
+ }
+ History.prototype = {
+ addChange: function(start, added, old) {
+ this.undone.length = 0;
+ var time = +new Date, last = this.done[this.done.length - 1];
+ if (time - this.time > 400 || !last ||
+ last.start > start + added || last.start + last.added < start - last.added + last.old.length)
+ this.done.push({start: start, added: added, old: old});
+ else {
+ var oldoff = 0;
+ if (start < last.start) {
+ for (var i = last.start - start - 1; i >= 0; --i)
+ last.old.unshift(old[i]);
+ last.added += last.start - start;
+ last.start = start;
+ }
+ else if (last.start < start) {
+ oldoff = start - last.start;
+ added += oldoff;
+ }
+ for (var i = last.added - oldoff, e = old.length; i < e; ++i)
+ last.old.push(old[i]);
+ if (last.added < added) last.added = added;
+ }
+ this.time = time;
+ }
+ };
+
+ // Event stopping compatibility wrapper.
+ function stopEvent() {
+ if (this.preventDefault) {this.preventDefault(); this.stopPropagation();}
+ else {this.returnValue = false; this.cancelBubble = true;}
+ }
+ // Ensure an event has a stop method.
+ function addStop(event) {
+ if (!event.stop) event.stop = stopEvent;
+ return event;
+ }
+
+ // Event wrapper, exposing the few operations we need.
+ function Event(orig) {this.e = orig;}
+ Event.prototype = {
+ stop: function() {stopEvent.call(this.e);},
+ target: function() {return this.e.target || this.e.srcElement;},
+ button: function() {
+ if (this.e.which) return this.e.which;
+ else if (this.e.button & 1) return 1;
+ else if (this.e.button & 2) return 3;
+ else if (this.e.button & 4) return 2;
+ },
+ pageX: function() {
+ if (this.e.pageX != null) return this.e.pageX;
+ var doc = this.target().ownerDocument;
+ return this.e.clientX + doc.body.scrollLeft + doc.documentElement.scrollLeft;
+ },
+ pageY: function() {
+ if (this.e.pageY != null) return this.e.pageY;
+ var doc = this.target().ownerDocument;
+ return this.e.clientY + doc.body.scrollTop + doc.documentElement.scrollTop;
+ }
+ };
+
+ // Event handler registration. If disconnect is true, it'll return a
+ // function that unregisters the handler.
+ function connect(node, type, handler, disconnect) {
+ function wrapHandler(event) {handler(new Event(event || window.event));}
+ if (typeof node.addEventListener == "function") {
+ node.addEventListener(type, wrapHandler, false);
+ if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);};
+ }
+ else {
+ node.attachEvent("on" + type, wrapHandler);
+ if (disconnect) return function() {node.detachEvent("on" + type, wrapHandler);};
+ }
+ }
+
+ function Delayed() {this.id = null;}
+ Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}};
+
+ // Some IE versions don't preserve whitespace when setting the
+ // innerHTML of a PRE tag.
+ var badInnerHTML = (function() {
+ var pre = document.createElement("pre");
+ pre.innerHTML = " "; return !pre.innerHTML;
+ })();
+
+ var gecko = /gecko\/\d{7}/i.test(navigator.userAgent);
+
+ var lineSep = "\n";
+ // Feature-detect whether newlines in textareas are converted to \r\n
+ (function () {
+ var te = document.createElement("textarea");
+ te.value = "foo\nbar";
+ if (te.value.indexOf("\r") > -1) lineSep = "\r\n";
+ }());
+
+ var tabSize = 8;
+ var mac = /Mac/.test(navigator.platform);
+ var movementKeys = {};
+ for (var i = 35; i <= 40; ++i)
+ movementKeys[i] = movementKeys["c" + i] = true;
+
+ // Counts the column offset in a string, taking tabs into account.
+ // Used mostly to find indentation.
+ function countColumn(string, end) {
+ if (end == null) {
+ end = string.search(/[^\s\u00a0]/);
+ if (end == -1) end = string.length;
+ }
+ for (var i = 0, n = 0; i < end; ++i) {
+ if (string.charAt(i) == "\t") n += tabSize - (n % tabSize);
+ else ++n;
+ }
+ return n;
+ }
+
+ // Find the position of an element by following the offsetParent chain.
+ // If screen==true, it returns screen (rather than page) coordinates.
+ function eltOffset(node, screen) {
+ var doc = node.ownerDocument.body;
+ var x = 0, y = 0, hitDoc = false;
+ for (var n = node; n; n = n.offsetParent) {
+ x += n.offsetLeft; y += n.offsetTop;
+ // Fixed-position elements don't have the document in their offset chain
+ if (n == doc) hitDoc = true;
+ }
+ var e = screen && hitDoc ? null : doc;
+ for (var n = node.parentNode; n != e; n = n.parentNode)
+ if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;}
+ return {left: x, top: y};
+ }
+ // Get a node's text content.
+ function eltText(node) {
+ return node.textContent || node.innerText || node.nodeValue || "";
+ }
+
+ // Operations on {line, ch} objects.
+ function posEq(a, b) {return a.line == b.line && a.ch == b.ch;}
+ function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
+ function copyPos(x) {return {line: x.line, ch: x.ch};}
+
+ function htmlEscape(str) {
+ return str.replace(/[<>&]/g, function(str) {
+ return str == "&" ? "&" : str == "<" ? "<" : ">";
+ });
+ }
+ CodeMirror.htmlEscape = htmlEscape;
+
+ // Used to position the cursor after an undo/redo by finding the
+ // last edited character.
+ function editEnd(from, to) {
+ if (!to) return from ? from.length : 0;
+ if (!from) return to.length;
+ for (var i = from.length, j = to.length; i >= 0 && j >= 0; --i, --j)
+ if (from.charAt(i) != to.charAt(j)) break;
+ return j + 1;
+ }
+
+ function indexOf(collection, elt) {
+ if (collection.indexOf) return collection.indexOf(elt);
+ for (var i = 0, e = collection.length; i < e; ++i)
+ if (collection[i] == elt) return i;
+ return -1;
+ }
+
+ // See if "".split is the broken IE version, if so, provide an
+ // alternative way to split lines.
+ if ("\n\nb".split(/\n/).length != 3)
+ var splitLines = function(string) {
+ var pos = 0, nl, result = [];
+ while ((nl = string.indexOf("\n", pos)) > -1) {
+ result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl));
+ pos = nl + 1;
+ }
+ result.push(string.slice(pos));
+ return result;
+ };
+ else
+ var splitLines = function(string){return string.split(/\r?\n/);};
+ CodeMirror.splitLines = splitLines;
+
+ // Sane model of finding and setting the selection in a textarea
+ if (window.getSelection) {
+ var selRange = function(te) {
+ try {return {start: te.selectionStart, end: te.selectionEnd};}
+ catch(e) {return null;}
+ };
+ var setSelRange = function(te, start, end) {
+ try {te.setSelectionRange(start, end);}
+ catch(e) {} // Fails on Firefox when textarea isn't part of the document
+ };
+ }
+ // IE model. Don't ask.
+ else {
+ var selRange = function(te) {
+ try {var range = te.ownerDocument.selection.createRange();}
+ catch(e) {return null;}
+ if (!range || range.parentElement() != te) return null;
+ var val = te.value, len = val.length, localRange = te.createTextRange();
+ localRange.moveToBookmark(range.getBookmark());
+ var endRange = te.createTextRange();
+ endRange.collapse(false);
+
+ if (localRange.compareEndPoints("StartToEnd", endRange) > -1)
+ return {start: len, end: len};
+
+ var start = -localRange.moveStart("character", -len);
+ for (var i = val.indexOf("\r"); i > -1 && i < start; i = val.indexOf("\r", i+1), start++) {}
+
+ if (localRange.compareEndPoints("EndToEnd", endRange) > -1)
+ return {start: start, end: len};
+
+ var end = -localRange.moveEnd("character", -len);
+ for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {}
+ return {start: start, end: end};
+ };
+ var setSelRange = function(te, start, end) {
+ var range = te.createTextRange();
+ range.collapse(true);
+ var endrange = range.duplicate();
+ var newlines = 0, txt = te.value;
+ for (var pos = txt.indexOf("\n"); pos > -1 && pos < start; pos = txt.indexOf("\n", pos + 1))
+ ++newlines;
+ range.move("character", start - newlines);
+ for (; pos > -1 && pos < end; pos = txt.indexOf("\n", pos + 1))
+ ++newlines;
+ endrange.move("character", end - newlines);
+ range.setEndPoint("EndToEnd", endrange);
+ range.select();
+ };
+ }
+
+ CodeMirror.defineMode("null", function() {
+ return {token: function(stream) {stream.skipToEnd();}};
+ });
+ CodeMirror.defineMIME("text/plain", "null");
+
+ return CodeMirror;
+})();
diff --git a/js/codemirror/mode/mysql/index.html b/js/codemirror/mode/mysql/index.html
new file mode 100644
index 0000000..c9bb251
--- /dev/null
+++ b/js/codemirror/mode/mysql/index.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<html>
+ <head>
+ <title>CodeMirror 2: MySQL mode</title>
+ <link rel="stylesheet" href="../../lib/codemirror.css">
+ <script src="../../lib/codemirror.js"></script>
+ <script src="mysql.js"></script>
+ <link rel="stylesheet" href="mysql.css">
+ <link rel="stylesheet" href="../../css/docs.css">
+ <style>.CodeMirror {border: 2px inset #dee;}</style>
+ </head>
+ <body>
+ <h1>CodeMirror 2: MySQL mode</h1>
+
+<form><textarea id="code" name="code">
+-- MySQL Code Demo
+/*
+ based on PL/SQL, addapted to MySQL by Michal Cihar ( http://cihar.com/ )
+ June 2011
+*/
+
+CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
+READS SQL DATA
+BEGIN
+ DECLARE v_rentals INT;
+ DECLARE v_out INT;
+
+ #AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
+ #FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
+
+ SELECT COUNT(*) INTO v_rentals
+ FROM rental
+ WHERE inventory_id = p_inventory_id;
+
+ IF v_rentals = 0 THEN
+ RETURN TRUE;
+ END IF;
+
+ SELECT COUNT(rental_id) INTO v_out
+ FROM inventory LEFT JOIN rental USING(inventory_id)
+ WHERE inventory.inventory_id = p_inventory_id
+ AND rental.return_date IS NULL;
+
+ IF v_out > 0 THEN
+ RETURN FALSE;
+ ELSE
+ RETURN TRUE;
+ END IF;
+END
+--
+</textarea></form>
+
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ lineNumbers: true,
+ matchBrackets: true,
+ indentUnit: 4,
+ mode: "text/x-mysql"
+ });
+ </script>
+
+ <p>
+ Simple mode that handles MySQL language.
+ </p>
+
+ <p><strong>MIME type defined:</strong> <code>text/x-mysql</code>
+ (MySQL code)
+</html>
diff --git a/js/codemirror/mode/mysql/mysql.css b/js/codemirror/mode/mysql/mysql.css
new file mode 100644
index 0000000..a03411a
--- /dev/null
+++ b/js/codemirror/mode/mysql/mysql.css
@@ -0,0 +1,33 @@
+span.mysql-keyword {
+ color: blue;
+}
+span.mysql-var {
+ color: red;
+}
+span.mysql-comment {
+ color: #AA7700;
+}
+span.mysql-string {
+ color: green;
+}
+span.mysql-operator {
+ color: blue;
+}
+span.mysql-word {
+ color: black;
+}
+span.mysql-function {
+ color: darkorange;
+}
+span.mysql-sqlplus {
+ color: darkorange;
+}
+span.mysql-type {
+ color: purple;
+}
+span.mysql-separator {
+ color: #666666;
+}
+span.mysql-number {
+ color: darkcyan;
+}
diff --git a/js/codemirror/mode/mysql/mysql.js b/js/codemirror/mode/mysql/mysql.js
new file mode 100644
index 0000000..704825e
--- /dev/null
+++ b/js/codemirror/mode/mysql/mysql.js
@@ -0,0 +1,145 @@
+CodeMirror.defineMode("mysql", function(config, parserConfig) {
+ var indentUnit = config.indentUnit,
+ keywords = parserConfig.keywords,
+ functions = parserConfig.functions,
+ types = parserConfig.types,
+ attributes = parserConfig.attributes,
+ multiLineStrings = parserConfig.multiLineStrings;
+ var isOperatorChar = /[+\-*&%=<>!?:\/|]/;
+ function chain(stream, state, f) {
+ state.tokenize = f;
+ return f(stream, state);
+ }
+
+ var type;
+ function ret(tp, style) {
+ type = tp;
+ return style;
+ }
+
+ function tokenBase(stream, state) {
+ var ch = stream.next();
+ // start of string?
+ if (ch == '"' || ch == "'" || ch == '`')
+ return chain(stream, state, tokenString(ch));
+ // is it one of the special signs []{}().,;? Seperator?
+ else if (/[\[\]{}\(\),;\.]/.test(ch))
+ return ret(ch);
+ // start of a number value?
+ else if (/\d/.test(ch)) {
+ stream.eatWhile(/[\w\.]/)
+ return ret("number", "mysql-number");
+ }
+ // multi line comment or simple operator?
+ else if (ch == "/") {
+ if (stream.eat("*")) {
+ return chain(stream, state, tokenComment);
+ }
+ else {
+ stream.eatWhile(isOperatorChar);
+ return ret("operator", "mysql-operator");
+ }
+ }
+ // single line comment or simple operator?
+ else if (ch == "-") {
+ if (stream.eat("-")) {
+ stream.skipToEnd();
+ return ret("comment", "mysql-comment");
+ }
+ else {
+ stream.eatWhile(isOperatorChar);
+ return ret("operator", "mysql-operator");
+ }
+ }
+ // pl/sql variable?
+ else if (ch == "@" || ch == "$") {
+ stream.eatWhile(/[\w\d\$_]/);
+ return ret("word", "mysql-var");
+ }
+ // is it a operator?
+ else if (isOperatorChar.test(ch)) {
+ stream.eatWhile(isOperatorChar);
+ return ret("operator", "mysql-operator");
+ }
+ else {
+ // get the whole word
+ stream.eatWhile(/[\w\$_]/);
+ // is it one of the listed keywords?
+ if (keywords && keywords.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "mysql-keyword");
+ // is it one of the listed functions?
+ if (functions && functions.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "mysql-function");
+ // is it one of the listed types?
+ if (types && types.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "mysql-type");
+ // is it one of the listed attributes?
+ if (attributes && attributes.propertyIsEnumerable(stream.current().toLowerCase())) return ret("keyword", "mysql-attribute");
+ // default: just a "word"
+ return ret("word", "mysql-word");
+ }
+ }
+
+ function tokenString(quote) {
+ return function(stream, state) {
+ var escaped = false, next, end = false;
+ while ((next = stream.next()) != null) {
+ if (next == quote && !escaped) {end = true; break;}
+ escaped = !escaped && next == "\\";
+ }
+ if (end || !(escaped || multiLineStrings))
+ state.tokenize = tokenBase;
+ return ret("string", "mysql-string");
+ };
+ }
+
+ function tokenComment(stream, state) {
+ var maybeEnd = false, ch;
+ while (ch = stream.next()) {
+ if (ch == "/" && maybeEnd) {
+ state.tokenize = tokenBase;
+ break;
+ }
+ maybeEnd = (ch == "*");
+ }
+ return ret("comment", "mysql-comment");
+ }
+
+ // Interface
+
+ return {
+ startState: function(basecolumn) {
+ return {
+ tokenize: tokenBase,
+ indented: 0,
+ startOfLine: true
+ };
+ },
+
+ token: function(stream, state) {
+ if (stream.eatSpace()) return null;
+ var style = state.tokenize(stream, state);
+ return style;
+ }
+ };
+});
+
+(function() {
+ function keywords(str) {
+ var obj = {}, words = str.split(" ");
+ for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
+ return obj;
+ }
+ var cKeywords = "accessible action add after against aggregate algorithm all alter analyse analyze and as asc autocommit auto_increment avg_row_length backup begin between binlog both by cascade case change changed charset check checksum collate collation column columns comment commit committed compressed concurrent constraint contains convert create cross current_timestamp database databases day day_hour day_minute day_second definer delayed delay_key_write delete desc describe deterministic distinct distinctrow div do drop dumpfile duplicate dynamic else enclosed end engine engines escape escaped events execute exists explain extended fast fields file first fixed flush for force foreign from full fulltext function gemini gemini_spin_retries global grant grants group having heap high_priority hosts hour hour_minute hour_second identified if ignore in index indexes infile inner insert insert_id insert_method interval into invoker is isolation join key keys kill last_insert_id leading left like limit linear lines load local lock locks logs low_priority maria master master_connect_retry master_host master_log_file master_log_pos master_password master_port master_user match max_connections_per_hour max_queries_per_hour max_rows max_updates_per_hour max_user_connections medium merge minute minute_second min_rows mode modify month mrg_myisam myisam names natural no not null offset on open optimize option optionally or order outer outfile pack_keys page page_checksum partial partition partitions password primary privileges procedure process processlist purge quick raid0 raid_chunks raid_chunksize raid_type range read read_only read_write references regexp reload rename repair repeatable replace replication reset restore restrict return returns revoke right rlike rollback row rows row_format second security select separator serializable session share show shutdown slave soname sounds sql sql_auto_is_null sql_big_result sql_big_selects sql_big_tables sql_buffer_result sql_cache sql_calc_found_rows sql_log_bin sql_log _off sql_log_update sql_low_priority_updates sql_max_join_size sql_no_cache sql_quote_show_create sql_safe_updates sql_select_limit sql_slave_skip_counter sql_small_result sql_warnings start starting status stop storage straight_join string striped super table tables temporary terminated then to trailing transactional truncate type types uncommitted union unique unlock update usage use using values variables view when where with work write xor year_month";
+
+ var cFunctions = "abs acos adddate addtime aes_decrypt aes_encrypt area asbinary ascii asin astext atan atan2 avg bdmpolyfromtext bdmpolyfromwkb bdpolyfromtext bdpolyfromwkb benchmark bin bit_and bit_count bit_length bit_or bit_xor boundary buffer cast ceil ceiling centroid char character_length charset char_length coalesce coercibility collation compress concat concat_ws connection_id contains conv convert convert_tz convexhull cos cot count crc32 crosses curdate current_date current_time current_timestamp current_user curtime database date datediff date_add date_diff date_format date_sub day dayname dayofmonth dayofweek dayofyear decode default degrees des_decrypt des_encrypt difference dimension disjoint distance elt encode encrypt endpoint envelope equals exp export_set exteriorring extract extractvalue field find_in_set floor format found_rows from_days from_unixtime geomcollfromtext geomcollfromwkb geometrycollection geometrycollectionfromtext geometrycollectionfromwkb geometryfromtext geometryfromwkb geometryn geometrytype geomfromtext geomfromwkb get_format get_lock glength greatest group_concat group_unique_users hex hour if ifnull inet_aton inet_ntoa insert instr interiorringn intersection intersects interval isclosed isempty isnull isring issimple is_free_lock is_used_lock last_day last_insert_id lcase least left length linefromtext linefromwkb linestring linestringfromtext linestringfromwkb ln load_file localtime localtimestamp locate log log10 log2 lower lpad ltrim makedate maketime make_set master_pos_wait max mbrcontains mbrdisjoint mbrequal mbrintersects mbroverlaps mbrtouches mbrwithin md5 microsecond mid min minute mlinefromtext mlinefromwkb mod month monthname mpointfromtext mpointfromwkb mpolyfromtext mpolyfromwkb multilinestring multilinestringfromtext multilinestringfromwkb multipoint multipointfromtext multipointfromwkb multipolygon multipolygonfromtext multipolygonfromwkb name_const now nullif numgeometries numinteriorrings numpoints oct octet_length old_password ord overlaps password p eriod_add period_diff pi point pointfromtext pointfromwkb pointn pointonsurface polyfromtext polyfromwkb polygon polygonfromtext polygonfromwkb position pow power quarter quote radians rand related release_lock repeat replace reverse right round row_count rpad rtrim schema second sec_to_time session_user sha sha1 sign sin sleep soundex space sqrt srid startpoint std stddev stddev_pop stddev_samp strcmp str_to_date subdate substr substring substring_index subtime sum symdifference sysdate system_user tan time timediff timestamp timestampadd timestampdiff time_format time_to_sec touches to_days trim truncate ucase uncompress uncompressed_length unhex unique_users unix_timestamp updatexml upper user utc_date utc_time utc_timestamp uuid variance var_pop var_samp version week weekday weekofyear within x y year yearweek";
+
+ var cTypes = "bigint binary bit blob bool boolean char character date datetime dec decimal double enum float float4 float8 geometry geometrycollection int int1 int2 int3 int4 int8 integer linestring long longblob longtext mediumblob mediumint mediumtext middleint multilinestring multipoint multipolygon nchar numeric point polygon real serial set smallint text time timestamp tinyblob tinyint tinytext varbinary varchar year";
+
+ var cAttributes = "archive ascii auto_increment bdb berkeleydb binary blackhole csv default example federated heap innobase innodb isam maria memory merge mrg_isam mrg_myisam myisam national ndb ndbcluster precision undefined unicode unsigned varying zerofill";
+
+ CodeMirror.defineMIME("text/x-mysql", {
+ name: "mysql",
+ keywords: keywords(cKeywords),
+ functions: keywords(cFunctions),
+ types: keywords(cTypes),
+ attributes: keywords(cAttributes)
+ });
+}());
diff --git a/js/functions.js b/js/functions.js
index be5a8bb..98dbd1d 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -21,6 +21,11 @@ var only_once_elements = new Array();
var ajax_message_init = false;
/**
+ * @var codemirror_editor object containing CodeMirror editor
+ */
+var codemirror_editor = false;
+
+/**
* Add a hidden field to the form to indicate that this will be an
* Ajax request (only if this hidden field does not exist)
*
@@ -757,8 +762,14 @@ function insertQuery(queryType) {
query = "UPDATE `" + table + "` SET " + editDis + " WHERE 1";
} else if(queryType == "delete") {
query = "DELETE FROM `" + table + "` WHERE 1";
+ } else if(queryType == "clear") {
+ query = "";
+ }
+ if (codemirror_editor) {
+ codemirror_editor.setValue(query);
+ } else {
+ document.sqlform.sql_query.value = query;
}
- document.sqlform.sql_query.value = query;
sql_box_locked = false;
}
}
@@ -785,8 +796,11 @@ function insertValueQuery() {
}
}
+ /* CodeMirror support */
+ if (codemirror_editor) {
+ codemirror_editor.replaceSelection(chaineAj);
//IE support
- if (document.selection) {
+ } else if (document.selection) {
myQuery.focus();
sel = document.selection.createRange();
sel.text = chaineAj;
@@ -1147,11 +1161,7 @@ $(document).ready(function(){
});
$('.sqlbutton').click(function(evt){
- if (evt.target.id == 'clear') {
- $('#sqlquery').val('');
- } else {
- insertQuery(evt.target.id);
- }
+ insertQuery(evt.target.id);
return false;
});
@@ -2370,3 +2380,13 @@ $(document).ready(function() {
}); // end $.PMA_confirm()
}); //end of Drop Table Ajax action
}) // end of $(document).ready() for Drop Table
+
+/**
+ * Attach CodeMirror2 editor to SQL edit area.
+ */
+$(document).ready(function() {
+ var elm = $('#sqlquery');
+ if (elm) {
+ codemirror_editor = CodeMirror.fromTextArea(elm[0], {lineNumbers: true, matchBrackets: true, indentUnit: 4, mode: "text/x-mysql"});
+ }
+})
diff --git a/libraries/header_scripts.inc.php b/libraries/header_scripts.inc.php
index c25aa99..98b28c4 100644
--- a/libraries/header_scripts.inc.php
+++ b/libraries/header_scripts.inc.php
@@ -39,6 +39,9 @@ if (isset($GLOBALS['db'])) {
$params['db'] = $GLOBALS['db'];
}
$GLOBALS['js_include'][] = 'messages.php' . PMA_generate_common_url($params);
+$GLOBALS['js_include'][] = 'codemirror/lib/codemirror.js';
+/* We should rather use/define MySQL mode here */
+$GLOBALS['js_include'][] = 'codemirror/mode/mysql/mysql.js';
/**
* Here we add a timestamp when loading the file, so that users who
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 406dc9d..880861b 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1771,3 +1771,101 @@ fieldset .disabled-field td {
-webkit-box-sizing: border-box;
}
+.CodeMirror {
+ line-height: 1em;
+ font-family: monospace;
+ background: white;
+ border: 1px solid black;
+}
+
+.CodeMirror-scroll {
+ height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 1.2); ?>em;
+}
+
+.CodeMirror-gutter {
+ position: absolute; left: 0; top: 0;
+ background-color: #f7f7f7;
+ border-right: 1px solid #eee;
+ min-width: 2em;
+ height: 100%;
+}
+.CodeMirror-gutter-text {
+ color: #aaa;
+ text-align: right;
+ padding: .4em .2em .4em .4em;
+}
+.CodeMirror-lines {
+ padding: .4em;
+}
+
+.CodeMirror pre {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ -o-border-radius: 0;
+ border-radius: 0;
+ border-width: 0; margin: 0; padding: 0; background: transparent;
+ font-family: inherit;
+ font-size: inherit;
+ padding: 0; margin: 0;
+}
+
+.CodeMirror textarea {
+ font-family: inherit !important;
+ font-size: inherit !important;
+}
+
+.CodeMirror-cursor {
+ z-index: 10;
+ position: absolute;
+ visibility: hidden;
+ border-left: 1px solid black !important;
+}
+.CodeMirror-focused .CodeMirror-cursor {
+ visibility: visible;
+}
+
+span.CodeMirror-selected {
+ background: #ccc !important;
+ color: HighlightText !important;
+}
+.CodeMirror-focused span.CodeMirror-selected {
+ background: Highlight !important;
+}
+
+.CodeMirror-matchingbracket {color: #0f0 !important;}
+.CodeMirror-nonmatchingbracket {color: #f22 !important;}
+
+
+span.mysql-keyword {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_reservedWord']; ?>;
+}
+span.mysql-var {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier']; ?>;
+}
+span.mysql-comment {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['comment']; ?>;
+}
+span.mysql-string {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['quote']; ?>;
+}
+span.mysql-operator {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['punct']; ?>;
+}
+span.mysql-word {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha']; ?>;
+}
+span.mysql-function {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_functionName']; ?>;
+}
+span.mysql-type {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnType']; ?>;
+}
+span.mysql-attribute {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnAttrib']; ?>;
+}
+span.mysql-separator {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['punct']; ?>;
+}
+span.mysql-number {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>;
+}
diff --git a/themes/pmahomme/css/theme_right.css.php b/themes/pmahomme/css/theme_right.css.php
index 5d6c66b..23de23d 100644
--- a/themes/pmahomme/css/theme_right.css.php
+++ b/themes/pmahomme/css/theme_right.css.php
@@ -2115,3 +2115,101 @@ fieldset .disabled-field td {
margin: 0 6px;
}
+.CodeMirror {
+ line-height: 1em;
+ font-family: monospace;
+ background: white;
+ border: 1px solid black;
+}
+
+.CodeMirror-scroll {
+ height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 1.2); ?>em;
+}
+
+.CodeMirror-gutter {
+ position: absolute; left: 0; top: 0;
+ background-color: #f7f7f7;
+ border-right: 1px solid #eee;
+ min-width: 2em;
+ height: 100%;
+}
+.CodeMirror-gutter-text {
+ color: #aaa;
+ text-align: right;
+ padding: .4em .2em .4em .4em;
+}
+.CodeMirror-lines {
+ padding: .4em;
+}
+
+.CodeMirror pre {
+ -moz-border-radius: 0;
+ -webkit-border-radius: 0;
+ -o-border-radius: 0;
+ border-radius: 0;
+ border-width: 0; margin: 0; padding: 0; background: transparent;
+ font-family: inherit;
+ font-size: inherit;
+ padding: 0; margin: 0;
+}
+
+.CodeMirror textarea {
+ font-family: inherit !important;
+ font-size: inherit !important;
+}
+
+.CodeMirror-cursor {
+ z-index: 10;
+ position: absolute;
+ visibility: hidden;
+ border-left: 1px solid black !important;
+}
+.CodeMirror-focused .CodeMirror-cursor {
+ visibility: visible;
+}
+
+span.CodeMirror-selected {
+ background: #ccc !important;
+ color: HighlightText !important;
+}
+.CodeMirror-focused span.CodeMirror-selected {
+ background: Highlight !important;
+}
+
+.CodeMirror-matchingbracket {color: #0f0 !important;}
+.CodeMirror-nonmatchingbracket {color: #f22 !important;}
+
+
+span.mysql-keyword {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_reservedWord']; ?>;
+}
+span.mysql-var {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_identifier']; ?>;
+}
+span.mysql-comment {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['comment']; ?>;
+}
+span.mysql-string {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['quote']; ?>;
+}
+span.mysql-operator {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['punct']; ?>;
+}
+span.mysql-word {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha']; ?>;
+}
+span.mysql-function {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_functionName']; ?>;
+}
+span.mysql-type {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnType']; ?>;
+}
+span.mysql-attribute {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['alpha_columnAttrib']; ?>;
+}
+span.mysql-separator {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['punct']; ?>;
+}
+span.mysql-number {
+ color: <?php echo $GLOBALS['cfg']['SQP']['fmtColor']['digit_integer']; ?>;
+}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2918-g2da4004
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 2da400447c6993d46b969a1c9c863fd81817f67e (commit)
from 834cefc2fda28d4d3e8a219a85759a5fb0e888d6 (commit)
- Log -----------------------------------------------------------------
commit 2da400447c6993d46b969a1c9c863fd81817f67e
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 11:52:51 2011 +0200
Update Czech translation
-----------------------------------------------------------------------
Summary of changes:
po/cs.po | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/po/cs.po b/po/cs.po
index eb4febf..9b8ceb9 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -2208,17 +2208,15 @@ msgstr "Obojí"
#: libraries/config.values.php:47
msgid "Nowhere"
-msgstr ""
+msgstr "Nikde"
#: libraries/config.values.php:47
msgid "Left"
-msgstr ""
+msgstr "Nalevo"
#: libraries/config.values.php:47
-#, fuzzy
-#| msgid "Height"
msgid "Right"
-msgstr "Výška"
+msgstr "Napravo"
#: libraries/config.values.php:75
msgid "Open"
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin localized documentation branch, master, updated. ab450ea1dbcad60c755df1d80bb16093010ee0fa
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via ab450ea1dbcad60c755df1d80bb16093010ee0fa (commit)
via e5e682d51c1e4bd0a182424fe08dcfa42de2455c (commit)
via 55e798dfd6fde949355b1e97b66f498af3d934dc (commit)
via f08f63b56dc9cb72f09845a8cfd15261efb8d577 (commit)
via 059352f2d3390f2dde8b2ba10c9492c52d42b010 (commit)
via 0afa932c5c80970028c2cf5d7b46df6ae51a466e (commit)
via 9855847f9e4a27ac72592930295fb0c2cd1017a7 (commit)
via 036d1a972ff403d78612d0605caec4ef6638c199 (commit)
via 1a1f0601a630d8d51a615da68b54f77ba1a99e0c (commit)
via e8ce773da0eb043ea35679c2717f86084c773c4a (commit)
via 320024125e7619757e071ca4104657018b38978e (commit)
via f48a1dccbb0b07bd2481e9f89af145c9daea4054 (commit)
via f1c234f8f74ac36ae3b5abc4f1056bc3b049cb1f (commit)
via 3c8afb03ed17149c5229a20b57b931d5b21621d8 (commit)
via a33747e692d9c459fd2715071c13ab19f84b9c79 (commit)
via b367106135f89a1486170d065b93401576daec2d (commit)
via 6aa82791b91ecb360d4899b75d03209e88fcc8f5 (commit)
via 3c468d0a3ada1f85ca562363e7829a0d9b67d904 (commit)
via e7045c7a958ab88147e02e4b658b445134af741a (commit)
via d373d7e55d8fa1289cc7436b1f868559361137ea (commit)
via fe5424535734d2e4245e5ad819ca5b43b496cc40 (commit)
via 61bd72b7c21f43c3ab045c23384dc670d8cc82fd (commit)
via b03eb78094cbd276e237bde487d277795bb268fa (commit)
via e3eaccd0e6bd20143e125311e172b6912c3818ab (commit)
via 10b435a19ae929e639d714f74707fee067d9573e (commit)
via 0ba53967c94addf052b1f18fd9baa13a8794318c (commit)
via 57873ba869ad04cd9264aa5ddb8998573468eae8 (commit)
via 1f2b4f324f8b41c573ed56b64bef351440cee437 (commit)
via 6ea40f2e83f117d359a68e58d6c4eaca0a4a5b79 (commit)
via b1c88bcd4f020e73d506d5f4f41cb888893159c7 (commit)
via 8e40e5cbde8347f1a3885be75304be72429b5b92 (commit)
via 9326aef2934c2cc371671cf77dc6198f0896c6f0 (commit)
via 0f80d7d8d4f8927270fa49fb6c93be65a0e0bf5b (commit)
via 8ecf4fdef357d42abc6c03eec4240e161ac4b73c (commit)
via 9e4844a579b65ae76b2c1a8545c8a3be57892453 (commit)
via debfb76b3908c6a8cc05744a15241cfed1f2ede9 (commit)
via a4c5fad5d0875f28dea3b215d910bfe555a33104 (commit)
via b6b0b4b353fb898a4d1aa07be1f456f64b8ec327 (commit)
via fb74887fd49bc3ec6960f23f4ca1e608478884eb (commit)
via fcbc1f25ec6fcc34da5d01c7975fd60b7878147a (commit)
via 400f5b631d102c3464dc8a169e50211f47997bd7 (commit)
via c3aa206e39f8c2beea1935539101771971a15918 (commit)
via 2d92f266fa667fc0de0d5a2b47506fbfe05990ba (commit)
via 42585ad4d9447ac5267829b9f5587f8adf391b89 (commit)
via 0010d03a1feaab1603167be830f57095ea82e257 (commit)
via bbb5ec6377843185dcfaf9d7e8661a56999deafb (commit)
from ad8f73c17a81ab82d5cbfae2151529177e971001 (commit)
- Log -----------------------------------------------------------------
commit ab450ea1dbcad60c755df1d80bb16093010ee0fa
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:51:21 2011 +0200
Translation update done using Pootle.
commit e5e682d51c1e4bd0a182424fe08dcfa42de2455c
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:50:41 2011 +0200
Translation update done using Pootle.
commit 55e798dfd6fde949355b1e97b66f498af3d934dc
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:50:14 2011 +0200
Translation update done using Pootle.
commit f08f63b56dc9cb72f09845a8cfd15261efb8d577
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:49:45 2011 +0200
Translation update done using Pootle.
commit 059352f2d3390f2dde8b2ba10c9492c52d42b010
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:48:56 2011 +0200
Translation update done using Pootle.
commit 0afa932c5c80970028c2cf5d7b46df6ae51a466e
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:48:38 2011 +0200
Translation update done using Pootle.
commit 9855847f9e4a27ac72592930295fb0c2cd1017a7
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:48:21 2011 +0200
Translation update done using Pootle.
commit 036d1a972ff403d78612d0605caec4ef6638c199
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:47:58 2011 +0200
Translation update done using Pootle.
commit 1a1f0601a630d8d51a615da68b54f77ba1a99e0c
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:47:14 2011 +0200
Translation update done using Pootle.
commit e8ce773da0eb043ea35679c2717f86084c773c4a
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:46:37 2011 +0200
Translation update done using Pootle.
commit 320024125e7619757e071ca4104657018b38978e
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:46:15 2011 +0200
Translation update done using Pootle.
commit f48a1dccbb0b07bd2481e9f89af145c9daea4054
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:46:02 2011 +0200
Translation update done using Pootle.
commit f1c234f8f74ac36ae3b5abc4f1056bc3b049cb1f
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:45:19 2011 +0200
Translation update done using Pootle.
commit 3c8afb03ed17149c5229a20b57b931d5b21621d8
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:44:58 2011 +0200
Translation update done using Pootle.
commit a33747e692d9c459fd2715071c13ab19f84b9c79
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:44:42 2011 +0200
Translation update done using Pootle.
commit b367106135f89a1486170d065b93401576daec2d
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:44:22 2011 +0200
Translation update done using Pootle.
commit 6aa82791b91ecb360d4899b75d03209e88fcc8f5
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:43:50 2011 +0200
Translation update done using Pootle.
commit 3c468d0a3ada1f85ca562363e7829a0d9b67d904
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:43:00 2011 +0200
Translation update done using Pootle.
commit e7045c7a958ab88147e02e4b658b445134af741a
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:42:31 2011 +0200
Translation update done using Pootle.
commit d373d7e55d8fa1289cc7436b1f868559361137ea
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:42:06 2011 +0200
Translation update done using Pootle.
commit fe5424535734d2e4245e5ad819ca5b43b496cc40
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:41:28 2011 +0200
Translation update done using Pootle.
commit 61bd72b7c21f43c3ab045c23384dc670d8cc82fd
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:40:47 2011 +0200
Translation update done using Pootle.
commit b03eb78094cbd276e237bde487d277795bb268fa
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:40:25 2011 +0200
Translation update done using Pootle.
commit e3eaccd0e6bd20143e125311e172b6912c3818ab
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:40:00 2011 +0200
Translation update done using Pootle.
commit 10b435a19ae929e639d714f74707fee067d9573e
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:39:18 2011 +0200
Translation update done using Pootle.
commit 0ba53967c94addf052b1f18fd9baa13a8794318c
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:38:47 2011 +0200
Translation update done using Pootle.
commit 57873ba869ad04cd9264aa5ddb8998573468eae8
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:38:15 2011 +0200
Translation update done using Pootle.
commit 1f2b4f324f8b41c573ed56b64bef351440cee437
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:37:49 2011 +0200
Translation update done using Pootle.
commit 6ea40f2e83f117d359a68e58d6c4eaca0a4a5b79
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:37:17 2011 +0200
Translation update done using Pootle.
commit b1c88bcd4f020e73d506d5f4f41cb888893159c7
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:36:40 2011 +0200
Translation update done using Pootle.
commit 8e40e5cbde8347f1a3885be75304be72429b5b92
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:36:13 2011 +0200
Translation update done using Pootle.
commit 9326aef2934c2cc371671cf77dc6198f0896c6f0
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:35:46 2011 +0200
Translation update done using Pootle.
commit 0f80d7d8d4f8927270fa49fb6c93be65a0e0bf5b
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:35:13 2011 +0200
Translation update done using Pootle.
commit 8ecf4fdef357d42abc6c03eec4240e161ac4b73c
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:34:36 2011 +0200
Translation update done using Pootle.
commit 9e4844a579b65ae76b2c1a8545c8a3be57892453
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:33:10 2011 +0200
Translation update done using Pootle.
commit debfb76b3908c6a8cc05744a15241cfed1f2ede9
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:31:51 2011 +0200
Translation update done using Pootle.
commit a4c5fad5d0875f28dea3b215d910bfe555a33104
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:31:24 2011 +0200
Translation update done using Pootle.
commit b6b0b4b353fb898a4d1aa07be1f456f64b8ec327
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:30:52 2011 +0200
Translation update done using Pootle.
commit fb74887fd49bc3ec6960f23f4ca1e608478884eb
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:30:23 2011 +0200
Translation update done using Pootle.
commit fcbc1f25ec6fcc34da5d01c7975fd60b7878147a
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:29:22 2011 +0200
Translation update done using Pootle.
commit 400f5b631d102c3464dc8a169e50211f47997bd7
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:28:58 2011 +0200
Translation update done using Pootle.
commit c3aa206e39f8c2beea1935539101771971a15918
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:26:45 2011 +0200
Translation update done using Pootle.
commit 2d92f266fa667fc0de0d5a2b47506fbfe05990ba
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:26:01 2011 +0200
Translation update done using Pootle.
commit 42585ad4d9447ac5267829b9f5587f8adf391b89
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:25:29 2011 +0200
Translation update done using Pootle.
commit 0010d03a1feaab1603167be830f57095ea82e257
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:24:19 2011 +0200
Translation update done using Pootle.
commit bbb5ec6377843185dcfaf9d7e8661a56999deafb
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Thu Jun 2 11:22:19 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/ja.po | 278 ++++++++++++++++++++++++++++----------------------------------
1 files changed, 124 insertions(+), 154 deletions(-)
diff --git a/po/ja.po b/po/ja.po
index b1e5968..4521378 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin-docs VERSION\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-05-30 11:20+0300\n"
-"PO-Revision-Date: 2011-05-31 12:02+0200\n"
+"PO-Revision-Date: 2011-06-02 11:51+0200\n"
"Last-Translator: Yuichiro <yuichiro(a)pop07.odn.ne.jp>\n"
"Language-Team: Japan <jp(a)li.org>\n"
"Language: ja\n"
@@ -718,9 +718,8 @@ msgid ""
"has read and write access to it. <a href=\"#faq1_26\">FAQ 1.26</a> can help "
"with this."
msgstr ""
-"他のプラットフォームでは、単純にフォルダを作成し、Web サーバに対して読み書き"
-"アクセス権があるか確認します。<a href=\"#faq1_26\">FAQ 1.26</a> も役立つで"
-"しょう。"
+"他のプラットフォームでは、単純にフォルダを作成し、ウェブサーバに対して読み書きアクセス権があるか確認します。<a href=\"#faq1_26\">FAQ "
+"1.26</a> も役立つでしょう。"
#. type: Content of: <html><body><div><ol><li><ul><li>
#: orig-docs/Documentation.html:269
@@ -834,13 +833,11 @@ msgid ""
"code> file which can help you achieve this in <code>contrib</code> directory "
"in phpMyAdmin."
msgstr ""
-"一般的には、インストールしている phpMyAdmin を公開されている場合、検索エンジ"
-"ンロボットに自動的に収集されないようにするために、それらからのアクセスに対し"
-"てを保護することをお勧めします。そのためには、<code>robots.txt</code> ファイ"
-"ルを Web サーバのルートに置くか、もしくは、Web サーバの設定によりアクセス制限"
-"を行います。phpMyAdmin の <code>contrib</code> ディレクトリ内に、<code>."
-"htaccess</code> ファイルのサンプルがあります。これは、その設定を行うための参"
-"考になるでしょう。"
+"一般的には、インストールしている phpMyAdmin を公開されている場合、検索エンジンロボットに自動的に収集されないようにするために、それらからのア"
+"クセスに対してを保護することをお勧めします。そのためには、<code>robots.txt</code> "
+"ファイルをウェブサーバのルートに置くか、もしくは、ウェブサーバの設定によりアクセス制限を行います。phpMyAdmin の "
+"<code>contrib</code> ディレクトリ内に、<code>.htaccess</code> "
+"ファイルのサンプルがあります。これは、その設定を行うための参考になるでしょう。"
#. type: Content of: <html><body><div><h3>
#: orig-docs/Documentation.html:324
@@ -1405,9 +1402,7 @@ msgstr "Swekey 認証"
msgid ""
"The Swekey is a low cost authentication USB key that can be used in web "
"applications."
-msgstr ""
-"Swekey は、Web アプリケーションで使用することができる低コストの USB 認証キー"
-"です。"
+msgstr "Swekey は、ウェブアプリケーションで使用することができる低コストの USB 認証キーです。"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:545
@@ -1442,11 +1437,10 @@ msgid ""
"etc</tt>). A self documented sample file is provided in the <tt>contrib</tt> "
"directory. Feel free to use it with your own users' information."
msgstr ""
-"その後、各ユーザと Swekey ID が関連付けられている <tt>swekey.conf</tt> ファイ"
-"ルを作成する必要があります。このファイルを Web サーバのドキュメントルート外に"
-"置いておくことが重要です(上の例では、<tt>/etc</tt> にあります)。これのサン"
-"プルファイルが <tt>contrib</tt> ディレクトリにあります。これらはユーザ情報で"
-"はありますが、管理者が見たりしても特に問題はありません。"
+"その後、各ユーザと Swekey ID が関連付けられている <tt>swekey.conf</tt> "
+"ファイルを作成する必要があります。このファイルをウェブサーバのドキュメントルート外に置いておくことが重要です(上の例では、<tt>/etc</tt> "
+"にあります)。これのサンプルファイルが <tt>contrib</tt> "
+"ディレクトリにあります。これらはユーザ情報ではありますが、管理者が見たりしても特に問題はありません。"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:560
@@ -5975,6 +5969,8 @@ msgid ""
"state. A value of <tt>'open'</tt> does the reverse. To completely disable "
"all visual sliders, use <tt>'disabled'</tt>."
msgstr ""
+"<tt>「closed」</tt>に設定されている場合、折り畳みのデフォルトは閉じた状態です。<tt>「open」</tt>はその逆です。全ての折り畳み"
+"を完全に無効にするには、<tt>「disabled」</tt>にします。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2214
@@ -6014,7 +6010,7 @@ msgstr "$cfg['TitleDefault'] 文字列"
msgid ""
"Allows you to specify window's title bar. You can use <a href="
"\"#faq6_27\">format string expansion</a>."
-msgstr ""
+msgstr "ウィンドウのタイトルバーを指定することができます。<a href=\"#faq6_27\">書式の拡張</a>が使用できます。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2227
@@ -6069,13 +6065,12 @@ msgstr "$cfg['ThemeManager'] boolean"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2242
-#, fuzzy
msgid ""
"Enables user-selectable themes. See <a href=\"#faqthemes\"> <abbr title="
"\"Frequently Asked Questions\">FAQ</abbr> 2.7</a>."
msgstr ""
-"ユーザがテーマを選択できるようにします。<a href=\"#faqthemes\">FAQ 2.7</a> を"
-"ご覧ください。"
+"ユーザがテーマを選択できるようにします。<a href=\"#faqthemes\"> <abbr title=\"よくある質問\">FAQ</abbr> "
+"2.7</a> をご覧ください。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2245
@@ -6120,6 +6115,8 @@ msgid ""
"specify any. You can use standard <a href=\"#faq6_27\">format string "
"expansion</a>."
msgstr ""
+"ユーザが指定しなかった時の、クエリボックスに表示されるデフォルトのクエリ。標準の<a "
+"href=\"#faq6_27\">書式の拡張</a>を使用することができます。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2259
@@ -6128,16 +6125,15 @@ msgstr "$cfg['SQP']['fmtType'] 文字列 [<tt>html</tt>|<tt>none</tt>]"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2261
-#, fuzzy
msgid ""
"The main use of the new <abbr title=\"structured query language\">SQL</abbr> "
"Parser is to pretty-print <abbr title=\"structured query language\">SQL</"
"abbr> queries. By default we use HTML to format the query, but you can "
"disable this by setting this variable to <tt>'none'</tt>."
msgstr ""
-"新しい SQL パーサの主な用途は SQL クエリを読みやすくすることです。デフォルト"
-"では HTML を使ってクエリを整形しますが、この変数を <tt>「none」</tt> にすると"
-"この機能を無効にできます。"
+"新しい <abbr title=\"structured query language\">SQL</abbr> パーサの主な用途は <abbr "
+"title=\"structured query language\">SQL</abbr> クエリを読みやすくすることです。デフォルトでは HTML "
+"を使ってクエリを整形しますが、この変数を <tt>「none」</tt> にするとこの機能を無効にできます。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2266
@@ -6155,16 +6151,16 @@ msgstr ""
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2268
-#, fuzzy
msgid ""
"For the pretty-printing of <abbr title=\"structured query language\">SQL</"
"abbr> queries, under some cases the part of a query inside a bracket is "
"indented. By changing <tt>$cfg['SQP']['fmtInd']</tt> you can change the "
"amount of this indent."
msgstr ""
-"SQL クエリを読みやすくするために、場合によってはブラケット( [ ] )に囲まれた"
-"クエリの一部がインデントされるのですが、<tt>$cfg['SQP']['fmtInd']</tt> を変更"
-"すると、このインデントの量を変更できます。"
+"<abbr title=\"structured query language\">SQL</abbr> "
+"クエリを読みやすくするために、場合によってはブラケット( [ ] "
+")で囲まれたクエリの一部がインデントされるのですが、<tt>$cfg['SQP']['fmtInd']</tt> "
+"を変更することで、このインデントの量を変更することができます。"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2271
@@ -6178,18 +6174,17 @@ msgstr ""
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2275
msgid "$cfg['SQP']['fmtColor'] array of string tuples"
-msgstr "$cfg['SQP']['fmtColor'] string 組の array"
+msgstr "$cfg['SQP']['fmtColor'] 文字列の連想配列"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2276
-#, fuzzy
msgid ""
"This array is used to define the colours for each type of element of the "
"pretty-printed <abbr title=\"structured query language\">SQL</abbr> queries. "
"The tuple format is"
msgstr ""
-"SQL クエリを読みやすくするために各要素につける色の定義に利用します。色を定義"
-"するペア文字列の書式は次の通りです。"
+"<abbr title=\"structured query language\">SQL</abbr> "
+"クエリを読みやすくするために各要素の色定義に、この配列を使用します。色を定義するペア文字列の書式は次の通りです。"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2278
@@ -6312,11 +6307,12 @@ msgstr "<b>alpha_reservedWord</b> その他の予約語に一致する識別子"
#. type: Content of: <html><body><div><dl><dd><ul><li>
#: orig-docs/Documentation.html:2302
-#, fuzzy
msgid ""
"<b>alpha_variable</b> Identifiers matching a <abbr title=\"structured query "
"language\">SQL</abbr> variable <tt>\"@foo\"</tt>"
-msgstr "<b>alpha_variable</b> SQL 変数 <tt>「 @foo 」</tt>に一致する識別子"
+msgstr ""
+"<b>alpha_variable</b> <abbr title=\"structured query language\">SQL</abbr> 変数 "
+"<tt>「 @foo 」</tt>に一致する識別子"
#. type: Content of: <html><body><div><dl><dd><ul><li>
#: orig-docs/Documentation.html:2303
@@ -6355,28 +6351,26 @@ msgstr "$cfg['SQLValidator']['use'] boolean"
#. type: Content of: <html><body><div><dl><dd><dl><dd>
#: orig-docs/Documentation.html:2313
-#, fuzzy
msgid ""
"phpMyAdmin now supports use of the <a href=\"http://developer.mimer.com/"
"validator/index.htm\">Mimer <abbr title=\"structured query language\">SQL</"
"abbr> Validator</a> service, as originally published on <a href=\"http://"
"developers.slashdot.org/article.pl?sid=02/02/19/1720246\">Slashdot</a>."
msgstr ""
-"phpMyAdmin は <a href=\"http://developer.mimer.com/validator/index.htm"
-"\">Mimer SQL Validator</a> サービスをサポートするようになりました。これは当"
-"初 <a href=\"http://developers.slashdot.org/article.pl?"
-"sid=02/02/19/1720246\">Slashdot</a> で公開されていたものです。"
+"phpMyAdmin は <a href=\"http://developer.mimer.com/validator/index.htm\">Mimer "
+"<abbr title=\"structured query language\">SQL</abbr> "
+"検証</a>サービスをサポートするようになりました。これは当初 <a href=\"http://developers.slashdot.org/arti"
+"cle.pl?sid=02/02/19/1720246\">Slashdot</a> で公開されていたものです。"
#. type: Content of: <html><body><div><dl><dd><dl><dd>
#: orig-docs/Documentation.html:2317
-#, fuzzy
msgid ""
"For help in setting up your system to use the service, see the <a href="
"\"#faqsqlvalidator\"><abbr title=\"Frequently Asked Questions\">FAQ</abbr> "
"6.14</a>."
msgstr ""
-"このサービスをお使いのシステムに設定する方法については、<a href="
-"\"#faqsqlvalidator\">FAQ 6.14</a> をご覧ください。"
+"このサービスをお使いのシステムに設定する方法については、<a href=\"#faqsqlvalidator\"><abbr "
+"title=\"よくある質問\">FAQ</abbr> 6.14</a> をご覧ください。"
#. type: Content of: <html><body><div><dl><dd><dl><dt>
#: orig-docs/Documentation.html:2321
@@ -6394,17 +6388,15 @@ msgstr ""
#. type: Content of: <html><body><div><dl><dd><dl><dd>
#: orig-docs/Documentation.html:2323
-#, fuzzy
msgid ""
"The SOAP service allows you to log in with <tt>anonymous</tt> and any "
"password, so we use those by default. Instead, if you have an account with "
"them, you can put your login details here, and it will be used in place of "
"the anonymous login."
msgstr ""
-"SOAP サービスを使うと <tt>anonymous</tt> (匿名)ユーザでもパスワードによらず"
-"ログインできるため、デフォルトではそのようになっていますが、SQL Validator の"
-"アカウントがあるなら、ログイン情報をここに記入すると、匿名でログインするかわ"
-"りにその情報でログインするようになります。"
+"SOAP サービスを使うと <tt>anonymous</tt> "
+"(匿名)ユーザでパスワードによらずログインできるため、デフォルトではそのようになっています。SQL "
+"検証のアカウントをお持ちであれば、ログイン情報をここに記入することで、匿名でログインする代わりにその情報でログインするようになります。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2330
@@ -6426,7 +6418,7 @@ msgstr "$cfg['DBG']['sql'] boolean"
msgid ""
"Enable logging queries and execution times to be displayed in the bottom of "
"main page (right frame)."
-msgstr ""
+msgstr "メインページ(右フレーム)の下部に、クエリと実行時間の表示を有効にします。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2338
@@ -6490,14 +6482,14 @@ msgstr "$cfg['RestrictFunctions'] 配列"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2355
-#, fuzzy
msgid ""
"Functions preferred for column meta types as defined in <a href="
"\"#cfg_RestrictColumnTypes\" class=\"configrule\">$cfg['RestrictColumnTypes']"
"</a>. In most cases you don't need to edit this."
msgstr ""
-"<code>$cfg['RestrictColumnTypes']</code> で定義されたカラムのメタ種別が利用す"
-"る関数一覧です。ほとんどの場合、この値を修正する必要はありません。"
+"<a href=\"#cfg_RestrictColumnTypes\" "
+"class=\"configrule\">$cfg['RestrictColumnTypes']</a> "
+"で定義されたカラムのメタ種別が利用する関数一覧です。ほとんどの場合、この値を修正する必要はありません。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2359
@@ -6506,7 +6498,6 @@ msgstr "$cfg['DefaultFunctions'] 配列"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2360
-#, fuzzy
msgid ""
"Functions selected by default when inserting/changing row, Functions are "
"defined for meta types from <a href=\"#cfg_RestrictColumnTypes\" class="
@@ -6514,10 +6505,10 @@ msgid ""
"<code>first_timestamp</code>, which is used for first timestamp column in "
"table."
msgstr ""
-"行を挿入/修正するときにデフォルトで選択される関数です。この関数は <code>$cfg"
-"['RestrictColumnTypes']</code> のメタ種別ごとに定義します。"
-"<code>first_timestamp</code> については、テーブル内の最初の timestamp カラム"
-"に適用されます。"
+"行を挿入/修正するときにデフォルトで選択される関数です。この関数は <a href=\"#cfg_RestrictColumnTypes\" "
+"class=\"configrule\">$cfg['RestrictColumnTypes']</a> "
+"のメタ種別ごとに定義します。<code>first_timestamp</code> については、テーブル内の最初の timestamp "
+"カラムに適用されます。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2366
@@ -6536,15 +6527,13 @@ msgstr "$cfg['TextOperators'] 配列"
#. type: Content of: <html><body><div><dl><dd>
#: orig-docs/Documentation.html:2371
-#, fuzzy
msgid ""
"Operators available for search operations on character columns. Note that "
"we put <code>LIKE</code> by default instead of <code>LIKE %...%</code>, to "
"avoid unintended performance problems in case of huge tables."
msgstr ""
-"文字フィールドの検索に利用できる演算子です。 なお、デフォルトは <code>LIKE "
-"%...%</code> ではなく <code>LIKE</code> としてあります。これはテーブルが巨大"
-"な場合に不用意にパフォーマンスの問題を起こさないようにするためです。"
+"文字カラムの検索に利用できる演算子です。 なお、デフォルトは <code>LIKE %...%</code> ではなく "
+"<code>LIKE</code> としてあります。これはテーブルが巨大な場合に不用意にパフォーマンスの問題を起こさないようにするためです。"
#. type: Content of: <html><body><div><dl><dt>
#: orig-docs/Documentation.html:2376
@@ -6566,7 +6555,7 @@ msgstr "$cfg['NullOperators'] 配列"
msgid ""
"Additional operators available for search operations when the column can be "
"null."
-msgstr "カラムがヌル (null) になりうるときに利用できる追加の検索用演算子です。"
+msgstr "カラムが NULL になりうるときに利用できる追加の検索用演算子です。"
#. type: Content of: <html><body><div><h2>
#: orig-docs/Documentation.html:2386
@@ -6616,7 +6605,6 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2403
-#, fuzzy
msgid ""
"Say you have a column 'filename' which contains a filename. Normally you "
"would see in phpMyAdmin only this filename. Using transformations you can "
@@ -6626,24 +6614,21 @@ msgid ""
"strings to append/prepend to a string or the format you want the output "
"stored in."
msgstr ""
-"たとえば、ファイル名を入れる「filename」というフィールドがあるとします。ふつ"
-"う phpMyAdmin ではこのファイル名しか表示されませんが、変換機能を使うと、この"
-"ファイル名を HTML リンクに変換できます。phpMyAdmin システムの内部でそのフィー"
-"ルドのリンクをクリックすると、新しいブラウザウインドウにそのファイルが表示さ"
-"れます。変換オプションを使えば、その文字列の前後に付け加える文字列や、出力を"
+"たとえば、ファイル名を入れる「filename」というカラムがあるとします。ふつう phpMyAdmin "
+"ではこのファイル名しか表示されませんが、変換機能を使うと、このファイル名を HTML リンクに変換できます。phpMyAdmin システムの内部でそのカ"
+"ラムのリンクをクリックすると、新しいブラウザウインドウにそのファイルが表示されます。変換オプションを使えば、その文字列の前後に付け加える文字列や、出力を"
"保存する形式も指定できます。"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2410
-#, fuzzy
msgid ""
"For a general overview of all available transformations and their options, "
"you can consult your <i><www.your-host.com>/<your-install-dir>/"
"transformation_overview.php</i> installation."
msgstr ""
-"利用できるすべての変換機能とそのオプションについての概略は <i><お使いのホ"
-"スト>/<インストールしたディレクトリ>/libraries/transformations/"
-"overview.php</i> をご覧ください。"
+"利用できるすべての変換機能とそのオプションについての概略は "
+"<i><お使いのホスト>/<インストールしたディレクトリ>/transformation_overview.php</i> "
+"をご覧ください。"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2415
@@ -6663,7 +6648,6 @@ msgstr "2. 使い方"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2421
-#, fuzzy
msgid ""
"Go to your <i>tbl_structure.php</i> page (i.e. reached through clicking on "
"the 'Structure' link for a table). There click on "Change" (or "
@@ -6671,25 +6655,19 @@ msgid ""
"They are called 'MIME-type', 'Browser transformation' and 'Transformation "
"options'."
msgstr ""
-"<i>tbl_properties.inc.php</i> ページに行きます(テーブルの「プロパティ"
-"(properties)」リンクをクリックしていけばたどり着きます)。「修正"
-"(Change)」(あるいは修正アイコン)をクリックすると、行末に新しいフィールド"
-"が 3 つ表示されます。それぞれ「MIME タイプ(MIME-type)」、「ブラウザ変換"
-"(Browser transformation)」、「変換オプション(Transformation options)」と"
-"いう名がついています。"
+"<i>tbl_structure.php</i> ページに行きます(テーブルの「構造」リンクをクリックでたどり着きます)。「変更」(あるいは変更アイコン"
+")をクリックすると、項目の最後の方に新しいフィールドが 3 つ表示されます。それぞれ「MIME "
+"タイプ」、「ブラウザ変換」、「変換オプション」という名がついています。"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:2428
-#, fuzzy
msgid ""
"The field 'MIME-type' is a drop-down field. Select the MIME-type that "
"corresponds to the column's contents. Please note that transformations are "
"inactive as long as no MIME-type is selected."
msgstr ""
-"「MIME タイプ(MIME-type)」フィールドはドロップダウンになっています。選択肢"
-"としては、フィールドを空にしておくか、「auto」にできます[この機能はまだ実装さ"
-"れていません]。ご注意ください。MIME タイプ(MIME-type)を選択しないと変換機能"
-"は有効になりません。"
+"「MIME タイプ」フィールドはドロップダウンになっています。カラムの内容に対応した MIME タイプを選択してください。なお、MIME "
+"タイプを選択しないと変換機能は有効になりませんので注意ください。"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:2432
@@ -6835,7 +6813,7 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2485
msgid "There are 5 possible file names:"
-msgstr "ファイル名には 5 通りの可能性があります:"
+msgstr "ファイル名には 5 通りの可能性があります。"
#. type: Content of: <html><body><div><ol><li>
#: orig-docs/Documentation.html:2487
@@ -7255,7 +7233,6 @@ msgstr "<a href=\"#faq1_3\">1.3 (該当しなくなったため取り下げ)。<
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:2653
-#, fuzzy
msgid ""
"<a href=\"#faq1_4\">1.4 Using phpMyAdmin on <abbr title=\"Internet "
"Information Services\">IIS</abbr>, I'm displayed the error message: ""
@@ -7263,22 +7240,24 @@ msgid ""
"application misbehaved by not returning a complete set of <abbr title="
"\"HyperText Transfer Protocol\">HTTP</abbr> headers ...".</a>"
msgstr ""
-"[<a href=\"#faq1_4\">1.4</a>] phpMyAdmin を IIS 上で使うと、「The specified "
-"CGI application misbehaved by not returning a complete set of HTTP headers..."
-"(指定した CGI にはエラーがあります。HTTP ヘッダが不完全です)」というエラー"
-"メッセージが表示されます。"
+"<a href=\"#faq1_4\">1.4 phpMyAdmin を <abbr title=\"Internet Information "
+"Services\">IIS</abbr> 上で使うと、「The specified <abbr title=\"Common Gateway "
+"Interface\">CGI</abbr> application misbehaved by not returning a complete set "
+"of <abbr title=\"HyperText Transfer Protocol\">HTTP</abbr> headers ...(指定した "
+"<abbr title=\"Common Gateway Interface\">CGI</abbr> にはエラーがあります。<abbr "
+"title=\"HyperText Transfer Protocol\">HTTP</abbr> "
+"ヘッダが不完全です。)」というエラーメッセージが表示されます。</a>"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2660
-#, fuzzy
msgid ""
"You just forgot to read the <i>install.txt</i> file from the php "
"distribution. Have a look at the last message in this <a href=\"http://bugs."
"php.net/bug.php?id=12061\">bug report</a> from the official PHP bug database."
msgstr ""
-"php の配布ファイルに入っている <i>install.txt</i> を読み忘れたのでしょう。こ"
-"ちらの<a href=\"http://bugs.php.net/bug.php?id=12061\">バグレポート</a>の最後"
-"のメッセージをご覧ください。出典は PHP のオフィシャルバグデータベースです。"
+"PHP の配布ファイルに入っている <i>install.txt</i> を読み忘れたのでしょう。こちらの<a "
+"href=\"http://bugs.php.net/bug.php?id=12061\">バグレポート</a>の最後のメッセージをご覧ください。出典は "
+"PHP のオフィシャルバグデータベースです。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:2666
@@ -7317,7 +7296,6 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2679
-#, fuzzy
msgid ""
"This seems to be a PWS bug. Filippo Simoncini found a workaround (at this "
"time there is no better fix): remove or comment the <tt>DOCTYPE</tt> "
@@ -7325,10 +7303,10 @@ msgid ""
"<i>libraries/header_printview.inc.php</i>, <i>index.php</i>, <i>navigation."
"php</i> and <i>libraries/common.lib.php</i>."
msgstr ""
-"PWS のバグのようです。Filippo Simoncini が回避策を見つけています(現時点では"
-"これ以上の対応策はありません)。<i>header.inc.php</i>、<i>header_printview."
-"inc.php</i>、<i>index.php</i>、<i>left.php</i>、<i>libraries/common.lib.php</"
-"i> の <tt>DOCTYPE</tt> 宣言(2 行)を削除するか、コメントにしてください。"
+"PWS のバグのようです。Filippo Simoncini が次に述べる回避策を見つけています(現時点ではこれ以上の対応策はありません)。<i>lib"
+"raries/header.inc.php</i>、<i>libraries/header_printview.inc.php</i>、<i>index"
+".php</i>、<i>navigation.php</i>、<i>libraries/common.lib.php</i> の "
+"<tt>DOCTYPE</tt> 宣言(2 行)を削除するかコメントにしてください。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:2686
@@ -7379,9 +7357,8 @@ msgid ""
"We recommend the following setup for Apache servers running in safe mode, to "
"enable uploads of files while being reasonably secure:"
msgstr ""
-"Apache サーバをセーフモードで走らせる場合は次のようにセットアップすることをお"
-"すすめします。こうすると、ファイルのアップロードを可能にしながらある程度のセ"
-"キュリティも確保できます:"
+"Apache サーバをセーフモードで走らせる場合は次のようにセットアップすることをお勧めします。こうすると、ファイルのアップロードを可能にしながらある程"
+"度のセキュリティも確保できます。"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:2705
@@ -7461,7 +7438,6 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:2732
-#, fuzzy
msgid ""
"Since version 2.2.4, phpMyAdmin supports servers with open_basedir "
"restrictions. However you need to create temporary directory and configure "
@@ -7469,12 +7445,11 @@ msgid ""
"The uploaded files will be moved there, and after execution of your <abbr "
"title=\"structured query language\">SQL</abbr> commands, removed."
msgstr ""
-"バージョン 2.2.4 以降、phpMyAdmin はサーバの open_basedir 制限をサポートして"
-"います。この制限下でもカレントディレクトリ(「.」)にあるファイルが開けるよう"
-"なら、必要なのは phpMyAdmin をインストールしたディレクトリに「一時」ディレク"
-"トリを作って、パーミッションを 777 にし、phpMyAdmin のディレクトリと同じオー"
-"ナーにすることだけです。アップロードしたファイルはそこに移され、SQL コマンド"
-"の実行が終わったら削除されます。"
+"バージョン 2.2.4 以降、phpMyAdmin はサーバの open_basedir "
+"制限をサポートしています。しかしながら、一時ディレクトリを作成して、<a href=\"#cfg_TempDir\" "
+"class=\"configrule\">$cfg['TempDir']</a> "
+"にそのディレクトリを設定する必要があります。アップロードしたファイルはそこに移され、<abbr title=\"structured query "
+"language\">SQL</abbr> コマンドの実行が終わったら削除されます。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:2739
@@ -8407,6 +8382,8 @@ msgid ""
"then my connection is redirected back to http. What can cause this behavior?"
"</a>"
msgstr ""
+"<a href=\"#faq1_39\">1.39 https を経由して接続すると、ログインすることはできますが、接続が http "
+"にリダイレクトされてしまいます。何が原因でこの現象が発生するのですか?</a>"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3104
@@ -8416,6 +8393,10 @@ msgid ""
"mod/mod_ssl.html#ssloptions\">http://httpd.apache.org/docs/2.0/mod/mod_ssl."
"html#ssloptions</a>."
msgstr ""
+"Apache の設定で <tt>SSLOptions</tt> と <tt>StdEnvVars</tt> "
+"が有効になっていることを確認してください。<a href=\"http://httpd.apache.org/docs/2.0/mod/mod_ssl.h"
+"tml#ssloptions\">http://httpd.apache.org/docs/2.0/mod/mod_ssl.html#ssloptions"
+"</a>を参照してください。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3108
@@ -8491,13 +8472,11 @@ msgstr ""
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3135
-#, fuzzy
msgid ""
"<a href=\"#faq1_41\">1.41 When I view a database and ask to see its "
"privileges, I get an error about an unknown column.</a>"
msgstr ""
-"[<a href=\"#faq1_29\">1.29</a>] テーブルを作成したりフィールドを修正したりす"
-"ると、エラーが出てフィールドが複製されてしまいます。"
+"<a href=\"#faq1_41\">1.41 データベースを表示しその権限を参照しようとすると、未知のカラムに関するエラーが表示されます。</a>"
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3138
@@ -8505,6 +8484,8 @@ msgid ""
"The MySQL server's privilege tables are not up to date, you need to run the "
"<tt>mysql_upgrade</tt> command on the server."
msgstr ""
+"MySQL サーバの権限テーブルが最新の状態にされていないません。サーバ上で <tt>mysql_upgrade</tt> "
+"コマンドを実行する必要があります。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3145
@@ -8665,14 +8646,13 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3202
-#, fuzzy
msgid ""
"Have also a look at the <a href=\"http://dev.mysql.com/doc/en/can-not-"
"connect-to-server.html\"> corresponding section of the MySQL documentation</"
"a>."
msgstr ""
-"また、<a href=\"http://www.mysql.com/doc/C/a/Can_not_connect_to_server.html"
-"\" target=\"_blank\">MySQL 文書の該当セクション</a>もご覧ください。"
+"また、<a href=\"http://dev.mysql.com/doc/refman/4.1/ja/can-not-connect-to-"
+"server.html\">MySQL ドキュメントの該当セクション</a>もご覧ください。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3207
@@ -8913,7 +8893,7 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3291
msgid "Here are a few points to check:"
-msgstr "確認すべき点はいくつかあります:"
+msgstr "確認すべき点はいくつかあります。"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:3293
@@ -9036,7 +9016,6 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3344
-#, fuzzy
msgid ""
"Compressed dumps are built in memory and because of this are limited to "
"php's memory limit. For GZip/BZip2 exports this can be overcome since 2.5.4 "
@@ -9045,11 +9024,10 @@ msgid ""
"this way, so if you need Zip files for larger dump, you have to use another "
"way."
msgstr ""
-"圧縮されたダンプがメモリ上に生成されるのが php のメモリ制限にひっかかる原因で"
-"す。GZip/BZip2 エクスポートについては 2.5.4 以降 <tt>$cfg['CompressOnFly']</"
-"tt> を使うとこの問題を克服できます(デフォルトで有効になっています)。Zip エ"
-"クスポートはオン・ザ・フライ生成できませんので、大きめのダンプの Zip ファイル"
-"が必要な場合、別の方法をとる必要があります。"
+"圧縮されたダンプがメモリ上に生成されるために、PHP のメモリ制限にひっかかるのが原因です。GZip/BZip2 エクスポートについては 2.5.4 "
+"以降 <a href=\"#cfg_CompressOnFly\" class=\"configrule\">$cfg['CompressOnFly']</a> "
+"(逐次圧縮)を使うとこの問題を克服できます(デフォルトで有効になっています)。Zip エクスポートではこの方法が行えませんので、大きめのダンプの "
+"Zip ファイルが必要な場合、別の方法をとる必要があります。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3352
@@ -9219,7 +9197,6 @@ msgstr ""
#. type: Content of: <html><body><div><p>
#: orig-docs/Documentation.html:3419
-#, fuzzy
msgid ""
"Due to a surrounding form-container (for multi-row delete checkboxes), no "
"nested forms can be put inside the table where phpMyAdmin displays the "
@@ -9231,15 +9208,12 @@ msgid ""
"effectively use transformations, see our <a href=\"http://www.phpmyadmin.net/"
"home_page/docs.php\">Link section</a> on the official phpMyAdmin-homepage."
msgstr ""
-"phpMyAdmin が結果を表示するテーブルは(複数列削除チェックボックス用の)フォー"
-"ムコンテナに囲まれているため、そのなかにネストするフォームを置くことはできま"
-"せん。ただし、tbl_row_delete.php を対象とした親フォームのコンテナはそのまま残"
-"して、そのなかに独自の入力要素のみ加えるようにすれば、どんなフォームでもテー"
-"ブルのなかに入れられます。送信用の input フィールドをカスタマイズするとフォー"
-"ムのデータは表示しているページに再送されますので、変換機能のなかで "
-"$HTTP_POST_VARS を有効にしてください。 変換機能の効果的な使い方のチュートリア"
-"ルについては phpMyAdmin のオフィシャルホームページの <a href=\"http://www."
-"phpmyadmin.net/home_page/docs.php\">Link セクション</a>をご覧ください。"
+"phpMyAdmin が結果を表示するテーブルは(複数列削除チェックボックス用の)フォームコンテナに囲まれているため、その中に入れ子にするフォームを置く"
+"ことはできません。ただし、tbl_row_delete.php "
+"を対象とした親フォームのコンテナはそのまま残して、その中に独自の入力要素のみ加えるようにすれば、どんなフォームでもテーブルの中に入れられます。送信用の "
+"input フィールドをカスタマイズするとフォームのデータは表示しているページに再送されますので、変換機能のなかで $HTTP_POST_VARS "
+"を有効にしてください。 変換機能の効果的な使い方のチュートリアルについては phpMyAdmin のオフィシャルホームページの <a "
+"href=\"http://www.phpmyadmin.net/home_page/docs.php\">Link セクション</a>をご覧ください。"
#. type: Content of: <html><body><div><h4>
#: orig-docs/Documentation.html:3432
@@ -13117,11 +13091,9 @@ msgid ""
"text, images, and other information typically located on a web page at a "
"website on the World Wide Web."
msgstr ""
-"<a href=\"http://ja.wikipedia.org/wiki/"
-"%E3%82%A6%E3%82%A7%E3%83%96%E3%83%96%E3%83%A9%E3%82%A6%E3%82%B6\">ブラウザ"
-"(ウェブブラウザ)</a> - World Wide Web 上の Web サイトで Web ページに一般的"
-"に置かれているテキスト、画像、その他の情報をユーザに対して表示や双方向通信す"
-"ることができるアプリケーション"
+"<a href=\"http://ja.wikipedia.org/wiki/%E3%82%A6%E3%82%A7%E3%83%96%E3%83%96%"
+"E3%83%A9%E3%82%A6%E3%82%B6\">ブラウザ(ウェブブラウザ)</a> - World Wide Web "
+"上のウェブサイトでウェブページに一般的に置かれているテキスト、画像、その他の情報をユーザに対して表示や双方向通信することができるアプリケーション"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5000
@@ -13141,10 +13113,9 @@ msgid ""
"</a> - an important World Wide Web technology that enables a client web "
"browser to request data from a program executed on the Web server."
msgstr ""
-"<a href=\"http://ja.wikipedia.org/wiki/Common_Gateway_Interface\">CGI "
-"(Common Gateway Interface)</a> - Web サーバー上で実行されるプログラムでクライ"
-"アントの Web ブラウザのデータを要求に応えることができる重要な World Wide Web "
-"技術"
+"<a href=\"http://ja.wikipedia.org/wiki/Common_Gateway_Interface\">CGI (Common "
+"Gateway Interface)</a> - "
+"ウェブサーバー上で実行されるプログラムでクライアントのウェブブラウザのデータを要求に応えることができる重要な World Wide Web 技術"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5006
@@ -13280,7 +13251,7 @@ msgstr ""
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5038
msgid "GD2 - look at <a href=\"#gd\">GD Graphics Library</a>."
-msgstr "GD2 - → <a href=\"#gd\">GD Graphics Library</a>"
+msgstr "GD2 - → <a href=\"#gd\">GD グラフィックライブラリ</a>"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5039
@@ -13572,10 +13543,9 @@ msgid ""
"used mainly for developing server-side applications and dynamic web content, "
"and more recently, a broader range of software applications."
msgstr ""
-"<a href=\"http://ja.wikipedia.org/wiki/PHP:_Hypertext_Preprocessor\">PHP</a> "
-"- 「PHP: Hypertext Preprocessor」の略称。オープンソース。主にサーバ側のアプリ"
-"ケーション開発と動的な Web コンテンツのために使用されるリフレクションプログラ"
-"ミング言語。最近では、ソフトウェアアプリケーションの広い範囲で使われている。"
+"<a href=\"http://ja.wikipedia.org/wiki/PHP:_Hypertext_Preprocessor\">PHP</a> - "
+"「PHP: Hypertext Preprocessor」の略称。オープンソース。主にサーバ側のアプリケーション開発と動的なウェブコンテンツのために使"
+"用されるリフレクションプログラミング言語。最近では、ソフトウェアアプリケーションの広い範囲で使われている。"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5114
@@ -13724,9 +13694,9 @@ msgid ""
"computer (program) that is responsible for accepting HTTP requests from "
"clients and serving them Web pages."
msgstr ""
-"<a href=\"http://ja.wikipedia.org/wiki/Web%E3%82%B5%E3%83%BC%E3%83%90\">ウェ"
-"ブサーバ</a> - クライアントからの HTTP 要求の受け入れおよびそれらに対する "
-"Web ページの提供を行っているコンピュータ(プログラム)"
+"<a href=\"http://ja.wikipedia.org/wiki/Web%E3%82%B5%E3%83%BC%E3%83%"
+"90\">ウェブサーバ</a> - クライアントからの HTTP "
+"要求の受け入れおよびそれらに対するウェブページの提供を行っているコンピュータ(プログラム)"
#. type: Content of: <html><body><div><ul><li>
#: orig-docs/Documentation.html:5154
@@ -13910,7 +13880,7 @@ msgstr "バージョン @@VER@@"
#. type: Plain text
#: orig-docs/README:7
msgid "A set of PHP-scripts to manage MySQL over the web."
-msgstr "Web 上で MySQL を管理することができる PHP プログラムです。"
+msgstr "ウェブ上で MySQL を管理することができる PHP プログラムです。"
#. type: Plain text
#: orig-docs/README:9
@@ -13986,8 +13956,8 @@ msgid ""
"phpMyAdmin is intended to handle the administration of MySQL over the web. "
"For a summary of features, please see the Documentation.txt/.html file."
msgstr ""
-"phpMyAdmin は Web 上で MySQL の管理を処理するためのものです。機能の概要につい"
-"ては、Documentation.txt/.html ファイルをご覧ください。"
+"phpMyAdmin はウェブ上で MySQL の管理を処理するためのものです。機能の概要については、Documentation.txt/.html "
+"ファイルをご覧ください。"
#. type: Title -
#: orig-docs/README:57
hooks/post-receive
--
phpMyAdmin localized documentation
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2916-g78b6f3d
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 78b6f3d6bade0c066f7a4916932c795b0eeaf471 (commit)
via d5f18d4e7f12fa656423b00594315e44ec1d82f7 (commit)
via 860250f02026360caf2291b27c8b51a0ca7e3cb2 (commit)
from 604c57631365736bdc8378b27f06d84c1855e5b6 (commit)
- Log -----------------------------------------------------------------
commit 78b6f3d6bade0c066f7a4916932c795b0eeaf471
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 11:43:12 2011 +0200
Mark directories as such in .gitignore
commit d5f18d4e7f12fa656423b00594315e44ec1d82f7
Merge: 604c57631365736bdc8378b27f06d84c1855e5b6 860250f02026360caf2291b27c8b51a0ca7e3cb2
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 11:41:31 2011 +0200
Merge branch 'integration'
Conflicts:
libraries/config/setup.forms.php
libraries/config/user_preferences.forms.php
commit 860250f02026360caf2291b27c8b51a0ca7e3cb2
Author: Rouslan Placella <rouslan(a)placella.com>
Date: Fri May 20 17:17:52 2011 +0100
Fix bug #3302961 - Row check boxes missing when table row links are disabled
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 14 +++---
Documentation.html | 10 ++--
js/sql.js | 2 +-
libraries/config.default.php | 18 ++----
libraries/config.values.php | 1 +
libraries/config/messages.inc.php | 5 +-
libraries/config/setup.forms.php | 3 +-
libraries/config/user_preferences.forms.php | 3 +-
libraries/display_tbl.lib.php | 77 ++++++++++++++++++---------
9 files changed, 75 insertions(+), 58 deletions(-)
diff --git a/.gitignore b/.gitignore
index b492910..dda2e0e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,14 +1,14 @@
# Directory for creating releases
-release
+/release/
# Configuration files
config.inc.php
config.header.inc.php
config.footer.inc.php
# Upload/save dirs
-upload
-save
+/upload/
+/save/
# For setup script
-config
+/config/
# ctags
tags
# Editor files
@@ -22,12 +22,12 @@ phpmyadmin.wpj
.idea
*.sw[op]
# Locales
-locale
+/locale/
# Backups
*~
# Javascript sources
-sources
+/sources/
# API documentation
-apidoc
+/apidoc/
# Demo server
revision-info.php
diff --git a/Documentation.html b/Documentation.html
index 2ff0881..ed6a5ca 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -1934,14 +1934,12 @@ $cfg['TrustedProxies'] =
<dd>Maximum number of characters shown in any non-numeric field on browse view.
Can be turned off by a toggle button on the browse page.</dd>
- <dt><span id="cfg_ModifyDeleteAtLeft">$cfg['ModifyDeleteAtLeft'] </span>boolean
- <span id="cfg_ModifyDeleteAtRight">$cfg['ModifyDeleteAtRight'] </span>boolean
+ <dt><span id="cfg_RowActionLinks">$cfg['RowActionLinks'] </span>string
</dt>
<dd>Defines the place where table row links (Edit, Inline edit, Copy,
- Delete) would be put when
- tables contents are displayed (you may have them displayed both at the
- left and at the right).
- "Left" and "right" are parsed as "top"
+ Delete) would be put when tables contents are displayed (you may
+ have them displayed at the left side, right side, both sides or nowhere).
+ "left" and "right" are parsed as "top"
and "bottom" with vertical display mode.</dd>
<dt id="cfg_DefaultDisplay">$cfg['DefaultDisplay'] string</dt>
diff --git a/js/sql.js b/js/sql.js
index 32a5bba..b334b5f 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -66,7 +66,7 @@ function appendInlineAnchor() {
if (disp_mode == 'vertical') {
// there can be one or two tr containing this class, depending
- // on the ModifyDeleteAtLeft and ModifyDeleteAtRight cfg parameters
+ // on the RowActionLinks cfg parameter
$('#table_results tr')
.find('.edit_row_anchor')
.removeClass('edit_row_anchor')
diff --git a/libraries/config.default.php b/libraries/config.default.php
index aa883d2..c804dcc 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -2249,20 +2249,14 @@ $cfg['CharTextareaRows'] = 2;
$cfg['LimitChars'] = 50;
/**
- * show edit/delete links on left side of browse
- * (or at the top with vertical browse)
+ * Where to show the edit/inline_edit/delete links in browse mode
+ * Possible values are 'left', 'right', 'both' and 'none';
+ * which will be interpreted as 'top', 'bottom', 'both' and 'none'
+ * respectively for vertical display mode
*
- * @global boolean $cfg['ModifyDeleteAtLeft']
+ * @global string $cfg['RowActionLinks']
*/
-$cfg['ModifyDeleteAtLeft'] = true;
-
-/**
- * show edit/delete links on right side of browse
- * (or at the bottom with vertical browse)
- *
- * @global boolean $cfg['ModifyDeleteAtRight']
- */
-$cfg['ModifyDeleteAtRight'] = false;
+$cfg['RowActionLinks'] = 'left';
/**
* default display direction (horizontal|vertical|horizontalflipped)
diff --git a/libraries/config.values.php b/libraries/config.values.php
index d884e59..0e72064 100644
--- a/libraries/config.values.php
+++ b/libraries/config.values.php
@@ -44,6 +44,7 @@ $cfg_db['LeftFrameDBSeparator'] = 'short_string';
$cfg_db['LeftFrameTableSeparator'] = 'short_string';
$cfg_db['NavigationBarIconic'] = array(true => __('Yes'), false => __('No'), 'both' => __('Both'));
$cfg_db['Order'] = array('ASC', 'DESC', 'SMART');
+$cfg_db['RowActionLinks'] = array('none' => __('Nowhere'), 'left' => __('Left'), 'right' => __('Right'), 'both' => __('Both'));
$cfg_db['ProtectBinary'] = array(false, 'blob', 'all');
$cfg_db['DefaultDisplay'] = array('horizontal', 'vertical', 'horizontalflipped');
$cfg_db['CharEditing'] = array('input', 'textarea');
diff --git a/libraries/config/messages.inc.php b/libraries/config/messages.inc.php
index 034214c..e76b52e 100644
--- a/libraries/config/messages.inc.php
+++ b/libraries/config/messages.inc.php
@@ -314,9 +314,8 @@ $strConfigMcryptDisableWarning_desc = __('Disable the default warning that is di
$strConfigMcryptDisableWarning_name = __('mcrypt warning');
$strConfigMemoryLimit_desc = __('The number of bytes a script is allowed to allocate, eg. [kbd]32M[/kbd] ([kbd]0[/kbd] for no limit)');
$strConfigMemoryLimit_name = __('Memory limit');
-$strConfigModifyDeleteAtLeft_desc = __('These are Edit, Inline edit, Copy and Delete links');
-$strConfigModifyDeleteAtLeft_name = __('Show table row links on left side');
-$strConfigModifyDeleteAtRight_name = __('Show table row links on right side');
+$strConfigRowActionLinks_desc = __('These are Edit, Inline edit, Copy and Delete links');
+$strConfigRowActionLinks_name = __('Where to show the table row links');
$strConfigNaturalOrder_desc = __('Use natural order for sorting table and database names');
$strConfigNaturalOrder_name = __('Natural order');
$strConfigNavigationBarIconic_desc = __('Use only icons, only text or both');
diff --git a/libraries/config/setup.forms.php b/libraries/config/setup.forms.php
index 5cf5111..0754091 100644
--- a/libraries/config/setup.forms.php
+++ b/libraries/config/setup.forms.php
@@ -199,8 +199,7 @@ $forms['Main_frame']['Browse'] = array(
'BrowseMarkerEnable',
'RepeatCells',
'LimitChars',
- 'ModifyDeleteAtLeft',
- 'ModifyDeleteAtRight',
+ 'RowActionLinks',
'DefaultDisplay',
'RememberSorting');
$forms['Main_frame']['Edit'] = array(
diff --git a/libraries/config/user_preferences.forms.php b/libraries/config/user_preferences.forms.php
index 68619c9..003f508 100644
--- a/libraries/config/user_preferences.forms.php
+++ b/libraries/config/user_preferences.forms.php
@@ -109,8 +109,7 @@ $forms['Main_frame']['Browse'] = array(
'BrowseMarkerEnable',
'RepeatCells',
'LimitChars',
- 'ModifyDeleteAtLeft',
- 'ModifyDeleteAtRight',
+ 'RowActionLinks',
'DefaultDisplay',
'RememberSorting');
$forms['Main_frame']['Edit'] = array(
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index ca8041b..c9e04f3 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -661,7 +661,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// ... at the left column of the result table header if possible
// and required
- elseif ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && $is_display['text_btn'] == '1') {
+ elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && $is_display['text_btn'] == '1') {
$vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 0;
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
@@ -677,7 +678,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
}
// ... elseif no button, displays empty(ies) col(s) if required
- elseif ($GLOBALS['cfg']['ModifyDeleteAtLeft']
+ elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
&& ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')) {
$vertical_display['emptypre'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 0;
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
@@ -691,6 +692,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
} // end vertical mode
}
+ // ... 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>';
+ }
+
// 2. Displays the fields' name
// 2.0 If sorting links should be used, checks if the query is a "JOIN"
// statement (see 2.1.3)
@@ -912,9 +919,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// 3. Displays the needed checkboxes at the right
// column of the result table header if possible and required...
- if ($GLOBALS['cfg']['ModifyDeleteAtRight']
- && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')
- && $is_display['text_btn'] == '1') {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && ($is_display['edit_lnk'] != 'nn' || $is_display['del_lnk'] != 'nn')
+ && $is_display['text_btn'] == '1') {
$vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 1;
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
|| $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped') {
@@ -933,7 +940,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// ... elseif no button, displays empty columns if required
// (unless coming from Browse mode print view)
- elseif ($GLOBALS['cfg']['ModifyDeleteAtRight']
+ elseif (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
&& ($is_display['edit_lnk'] == 'nn' && $is_display['del_lnk'] == 'nn')
&& (!$GLOBALS['is_header_sent'])) {
$vertical_display['emptyafter'] = ($is_display['edit_lnk'] != 'nn' && $is_display['del_lnk'] != 'nn') ? 4 : 1;
@@ -1249,13 +1256,20 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
} // end if (1.2.2)
// 1.3 Displays the links at left if required
- if ($GLOBALS['cfg']['ModifyDeleteAtLeft']
- && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
- || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+ || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
if (! isset($js_conf)) {
$js_conf = '';
}
echo PMA_generateCheckboxAndLinks('left', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'l', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf);
+ } else if (($GLOBALS['cfg']['RowActionLinks'] == 'none')
+ && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+ || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+ if (! isset($js_conf)) {
+ $js_conf = '';
+ }
+ echo PMA_generateCheckboxAndLinks('none', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'l', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf);
} // end if (1.3)
} // end if (1)
@@ -1465,13 +1479,13 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
} // end for (2)
// 3. Displays the modify/delete links on the right if required
- if ($GLOBALS['cfg']['ModifyDeleteAtRight']
- && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
- || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
- if (! isset($js_conf)) {
- $js_conf = '';
- }
- echo PMA_generateCheckboxAndLinks('right', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'r', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf);
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
+ || $_SESSION['tmp_user_values']['disp_direction'] == 'horizontalflipped')) {
+ if (! isset($js_conf)) {
+ $js_conf = '';
+ }
+ echo PMA_generateCheckboxAndLinks('right', $del_url, $is_display, $row_no, $where_clause, $where_clause_html, $del_query, 'r', $edit_url, $copy_url, $edit_anchor_class, $edit_str, $copy_str, $del_str, $js_conf);
} // end if (3)
if ($_SESSION['tmp_user_values']['disp_direction'] == 'horizontal'
@@ -1551,15 +1565,19 @@ function PMA_displayVerticalTable()
global $vertical_display;
// Displays "multi row delete" link at top if required
- if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] != 'right')
+ && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
+ if ($GLOBALS['cfg']['RowActionLinks'] == 'none') {
+ // if we are not showing the RowActionLinks, then we need to show the Multi-Row-Action checkboxes
+ echo '<th></th>' . "\n";
+ }
echo $vertical_display['textbtn'];
$foo_counter = 0;
foreach ($vertical_display['row_delete'] as $val) {
if (($foo_counter != 0) && ($_SESSION['tmp_user_values']['repeat_cells'] != 0) && !($foo_counter % $_SESSION['tmp_user_values']['repeat_cells'])) {
echo '<th></th>' . "\n";
}
-
echo str_replace('[%_PMA_CHECKBOX_DIR_%]', '_left', $val);
$foo_counter++;
} // end while
@@ -1567,7 +1585,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "edit" link at top if required
- if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -1585,7 +1604,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "copy" link at top if required
- if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -1603,7 +1623,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "delete" link at top if required
- if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'left' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -1640,7 +1661,8 @@ function PMA_displayVerticalTable()
} // end while
// Displays "multi row delete" link at bottom if required
- if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['row_delete']) && (count($vertical_display['row_delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
echo $vertical_display['textbtn'];
$foo_counter = 0;
@@ -1656,7 +1678,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "edit" link at bottom if required
- if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -1674,7 +1697,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "copy" link at bottom if required
- if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -1692,7 +1716,8 @@ function PMA_displayVerticalTable()
} // end if
// Displays "delete" link at bottom if required
- if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
+ if (($GLOBALS['cfg']['RowActionLinks'] == 'right' || $GLOBALS['cfg']['RowActionLinks'] == 'both')
+ && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
@@ -2680,6 +2705,8 @@ function PMA_generateCheckboxAndLinks($position, $del_url, $is_display, $row_no,
$ret .= PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $where_clause_html, '');
$ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $del_query, $id_suffix='_right', '', '', '');
+ } else { // $position == 'none'
+ $ret .= PMA_generateCheckboxForMulti($del_url, $is_display, $row_no, $where_clause_html, $del_query, $id_suffix='_left', '', '', '');
}
return $ret;
}
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_1-2913-g604c576
by Michal Čihař 02 Jun '11
by Michal Čihař 02 Jun '11
02 Jun '11
The branch, master has been updated
via 604c57631365736bdc8378b27f06d84c1855e5b6 (commit)
via fd6c41216dec3521cde053d3c3f14bc4edd878d6 (commit)
via 9b421d5c054fc7b09a8a2656a1bf9815f9340537 (commit)
via 80ce84d35731bfc0f54b365813eb89ec26777162 (commit)
via 8ce04eccc9b2f793dc3743b3ba115fb4dadfa4b7 (commit)
via 2e1e5175be119fd11a5461287f8b3f265b0e47ba (commit)
via ce8849c1c1fa7962bda7650c5d75e3ac4b761bd2 (commit)
via 73b2a3ba45368a0e3b0d34e7a0205e8c2c58adb4 (commit)
via 588b26e0ba37e0137694b6d94875959d21d70f3e (commit)
via 04891dd9f3bf768eef159a650d096199d0249493 (commit)
via 8aaa7796801f498760f3d3ed576c862b79d04154 (commit)
via 0186b3b2d490731b17a988ab12811abacdc55350 (commit)
from e41623789455b13994b044ad382b07bfc81dbf1c (commit)
- Log -----------------------------------------------------------------
commit 604c57631365736bdc8378b27f06d84c1855e5b6
Merge: e41623789455b13994b044ad382b07bfc81dbf1c fd6c41216dec3521cde053d3c3f14bc4edd878d6
Author: Michal Čihař <mcihar(a)novell.com>
Date: Thu Jun 2 10:34:48 2011 +0200
Merge remote-tracking branch 'pootle/master'
commit fd6c41216dec3521cde053d3c3f14bc4edd878d6
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:34:34 2011 +0200
Translation update done using Pootle.
commit 9b421d5c054fc7b09a8a2656a1bf9815f9340537
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:34:09 2011 +0200
Translation update done using Pootle.
commit 80ce84d35731bfc0f54b365813eb89ec26777162
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:34:00 2011 +0200
Translation update done using Pootle.
commit 8ce04eccc9b2f793dc3743b3ba115fb4dadfa4b7
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:33:35 2011 +0200
Translation update done using Pootle.
commit 2e1e5175be119fd11a5461287f8b3f265b0e47ba
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:33:04 2011 +0200
Translation update done using Pootle.
commit ce8849c1c1fa7962bda7650c5d75e3ac4b761bd2
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:32:14 2011 +0200
Translation update done using Pootle.
commit 73b2a3ba45368a0e3b0d34e7a0205e8c2c58adb4
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:31:45 2011 +0200
Translation update done using Pootle.
commit 588b26e0ba37e0137694b6d94875959d21d70f3e
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:31:22 2011 +0200
Translation update done using Pootle.
commit 04891dd9f3bf768eef159a650d096199d0249493
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:30:59 2011 +0200
Translation update done using Pootle.
commit 8aaa7796801f498760f3d3ed576c862b79d04154
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:30:51 2011 +0200
Translation update done using Pootle.
commit 0186b3b2d490731b17a988ab12811abacdc55350
Author: Michal Čihař <michal(a)cihar.com>
Date: Thu Jun 2 10:30:35 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/cs.po | 31 +++++++++++++------------------
1 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/po/cs.po b/po/cs.po
index fd23e47..6d44213 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -7,7 +7,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-05-31 17:50+0200\n"
-"PO-Revision-Date: 2011-05-31 17:53+0200\n"
+"PO-Revision-Date: 2011-06-02 10:34+0200\n"
"Last-Translator: Michal Čihař <michal(a)cihar.com>\n"
"Language-Team: czech <cs(a)li.org>\n"
"Language: cs\n"
@@ -1615,10 +1615,9 @@ msgstr[1] "Vloženy %1$d řádky."
msgstr[2] "Vloženo %1$d řádek."
#: libraries/RecentTable.class.php:113
-#, fuzzy
#| msgid "Could not save configuration"
msgid "Could not save recent table"
-msgstr "Nepodařilo se uložit nastavení"
+msgstr "Nepodařilo se uložit nedávnou tabulku"
#: libraries/RecentTable.class.php:148
#| msgid "Count tables"
@@ -1626,10 +1625,9 @@ msgid "Recent tables"
msgstr "Nedávné tabulky"
#: libraries/RecentTable.class.php:154
-#, fuzzy
#| msgid "There are no configured servers"
msgid "There are no recent tables"
-msgstr "Žádné servery nejsou nastaveny"
+msgstr "Nebyly nalezeny žádné nedávné tabulky"
#: libraries/StorageEngine.class.php:194
msgid ""
@@ -1671,7 +1669,7 @@ msgstr "Tabulka %s byla přejmenována na %s"
#: libraries/Table.class.php:1250
msgid "Could not save table UI preferences"
-msgstr ""
+msgstr "Nepodařilo se uložit nastavení prohlížení tabulky"
#: libraries/Theme.class.php:160
#, php-format
@@ -3324,10 +3322,10 @@ msgid "Enable highlighting"
msgstr "Povolit zvýrazňování"
#: libraries/config/messages.inc.php:286
-#, fuzzy
#| msgid "Maximum number of tables displayed in table list"
msgid "Maximum number of recently used tables; set 0 to disable"
-msgstr "Nejvyšší počet tabulek zobrazených v seznamu tabulek"
+msgstr ""
+"Nejvyšší počet tabulek v seznamu nedávných tabulek; nastavte 0 pro vypnutí"
#: libraries/config/messages.inc.php:287
#| msgid "Untracked tables"
@@ -3619,7 +3617,7 @@ msgstr "Nástroje pro konverzi znakových sad"
#: libraries/config/messages.inc.php:349
msgid "When browsing tables, the sorting of each table is remembered"
-msgstr ""
+msgstr "Při procházení tabulek se pro každou uloží nastavené řazení"
#: libraries/config/messages.inc.php:350
#| msgid "Rename table to"
@@ -3902,7 +3900,6 @@ msgid "Server port"
msgstr "Port serveru"
#: libraries/config/messages.inc.php:408
-#, fuzzy
#| msgid ""
#| "Leave blank for no user preferences storage in database, suggested: [kbd]"
#| "pma_config[/kbd]"
@@ -3910,8 +3907,8 @@ msgid ""
"Leave blank for no \"persistent\" recently used tables across sessions, "
"suggested: [kbd]pma_recent[/kbd]"
msgstr ""
-"Nechte prázdné pro vypnutí podpory pro uživatelské nastavení v databázi, "
-"výchozí nastavení: [kbd]pma_config[/kbd]"
+"Nechte prázdné pro vypnutí \"trvalého\" ukládání nedávných tabulek, výchozí "
+"nastavení: [kbd]pma_recent[/kbd]"
#: libraries/config/messages.inc.php:409
#| msgid "Recall user name"
@@ -3995,7 +3992,6 @@ msgid "Display columns table"
msgstr "Tabulka s popisem polí"
#: libraries/config/messages.inc.php:425
-#, fuzzy
#| msgid ""
#| "Leave blank for no user preferences storage in database, suggested: [kbd]"
#| "pma_config[/kbd]"
@@ -4003,8 +3999,8 @@ msgid ""
"Leave blank for no \"persistent\" tables'UI preferences across sessions, "
"suggested: [kbd]pma_table_uiprefs[/kbd]"
msgstr ""
-"Nechte prázdné pro vypnutí podpory pro uživatelské nastavení v databázi, "
-"výchozí nastavení: [kbd]pma_config[/kbd]"
+"Nechte prázdné pro vypnutí podpory pro \"trvalé\" ukládání nastavení "
+"procházení tabulek, výchozí nastavení: [kbd]pma_uiprefs[/kbd]"
#: libraries/config/messages.inc.php:426
#| msgid "User preferences storage table"
@@ -6222,14 +6218,13 @@ msgid "SQL history"
msgstr "SQL historie"
#: libraries/relation.lib.php:143
-#, fuzzy
#| msgid "Persistent connections"
msgid "Persistent recently used tables"
-msgstr "Trvalé připojení"
+msgstr "Trvalé nedávné tabulky"
#: libraries/relation.lib.php:147
msgid "Persistent tables' UI preferences"
-msgstr ""
+msgstr "Trvalé nastavení procházení"
#: libraries/relation.lib.php:155
msgid "User preferences"
hooks/post-receive
--
phpMyAdmin
1
0