Git
Threads by month
- ----- 2025 -----
- 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
March 2010
- 4 participants
- 212 discussions

[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-881-g465ec50
by Michal Čihař 29 Mar '10
by Michal Čihař 29 Mar '10
29 Mar '10
The branch, gettext has been updated
via 465ec50efae8d6294f2ca356dbd848c4308270a9 (commit)
via 8fac76138004d6d811cf464b5f224382d287391d (commit)
via ee1ac10531a0d4e154ba80cbb52b4efeafeb1bd4 (commit)
via 37dec40c527f88ca06c161d049ed81d3985fdbcb (commit)
via e775610205daadf61f1fe443d2b1dca1c3372291 (commit)
via ca2b8520e52775f7e2515e5cf953de8d0a323834 (commit)
via ec7f2ee94c824b2ec6dd6407aa008e698d75df81 (commit)
via 46afd9d410cdaa3d471eaf40c308f12196840a76 (commit)
via a7b4d9c4c051456b9fffce793ef9789611bd7cf5 (commit)
via 252d7f92335dc57015a6adcf1eb7238b5a3afe4d (commit)
via b78fe06b38e6095cc3424fb7ef467b465c10ef3b (commit)
via 6a0ef059c675091b91e3340a2d98fd6b5aba7e15 (commit)
via 1b691149825d2eb5e64e2932b58b3734ddbe3fe6 (commit)
via 9fc19bc0568c53ee2a86cf433390dec209e1c84b (commit)
via 435931457115e5673b1c79d61e4a3de5a6af667c (commit)
via 5b7d44ca5472938101b8ffe0065adeca92b35bd6 (commit)
via e7a1705b6df83d52c4e26a7f09cd8db367151b81 (commit)
via b774459169467ca5c0980f308358330dac950ba4 (commit)
via 3459098babee9b911107a6776e87cbdf569816ec (commit)
via 775d2ce26417a2c52b42f719a0dbccc3e63e468b (commit)
via d8765ad5fb3e773361a68b788c53a231790e84b2 (commit)
via 031d315b3c1d7507a1f39e52bf93f7917dbe7eee (commit)
via 605727dd9857edafcea279e5f6384f75a145ac48 (commit)
via f3286a0d214c0ed03e04350dbf17369686963b84 (commit)
via e58626c1888f22027d26df749be475fc28800086 (commit)
via a0fb4c04b96da4ca82968b355a271614d5e7bde5 (commit)
via f7418693d783d1ae694cf392e19e0ff7dfe0d95d (commit)
via 6ff307b546471fd556cdfe3ac924a89217134e5d (commit)
from 1ce73794ea669c0a37ad65a83c14a1286b7b2371 (commit)
- Log -----------------------------------------------------------------
commit 465ec50efae8d6294f2ca356dbd848c4308270a9
Merge: 8fac76138004d6d811cf464b5f224382d287391d ee1ac10531a0d4e154ba80cbb52b4efeafeb1bd4
Author: Michal Čihař <mcihar(a)novell.com>
Date: Mon Mar 29 09:06:32 2010 +0200
Merge remote branch 'pootle/gettext' into gettext
commit 8fac76138004d6d811cf464b5f224382d287391d
Merge: 1ce73794ea669c0a37ad65a83c14a1286b7b2371 775d2ce26417a2c52b42f719a0dbccc3e63e468b
Author: Michal Čihař <mcihar(a)novell.com>
Date: Mon Mar 29 09:06:15 2010 +0200
Merge branch 'master' into gettext
commit ee1ac10531a0d4e154ba80cbb52b4efeafeb1bd4
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:26:56 2010 +0200
Translation update done using Pootle.
commit 37dec40c527f88ca06c161d049ed81d3985fdbcb
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:26:11 2010 +0200
Translation update done using Pootle.
commit e775610205daadf61f1fe443d2b1dca1c3372291
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:25:20 2010 +0200
Translation update done using Pootle.
commit ca2b8520e52775f7e2515e5cf953de8d0a323834
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:24:34 2010 +0200
Translation update done using Pootle.
commit ec7f2ee94c824b2ec6dd6407aa008e698d75df81
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:24:08 2010 +0200
Translation update done using Pootle.
commit 46afd9d410cdaa3d471eaf40c308f12196840a76
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:23:56 2010 +0200
Translation update done using Pootle.
commit a7b4d9c4c051456b9fffce793ef9789611bd7cf5
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:23:51 2010 +0200
Translation update done using Pootle.
commit 252d7f92335dc57015a6adcf1eb7238b5a3afe4d
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:23:23 2010 +0200
Translation update done using Pootle.
commit b78fe06b38e6095cc3424fb7ef467b465c10ef3b
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:23:16 2010 +0200
Translation update done using Pootle.
commit 6a0ef059c675091b91e3340a2d98fd6b5aba7e15
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:22:45 2010 +0200
Translation update done using Pootle.
commit 1b691149825d2eb5e64e2932b58b3734ddbe3fe6
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:22:06 2010 +0200
Translation update done using Pootle.
commit 9fc19bc0568c53ee2a86cf433390dec209e1c84b
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:21:54 2010 +0200
Translation update done using Pootle.
commit 435931457115e5673b1c79d61e4a3de5a6af667c
Author: rebeluca <rebeluca(a)gmail.com>
Date: Mon Mar 29 00:21:28 2010 +0200
Translation update done using Pootle.
commit 5b7d44ca5472938101b8ffe0065adeca92b35bd6
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 13:56:28 2010 +0200
Translation update done using Pootle.
commit e7a1705b6df83d52c4e26a7f09cd8db367151b81
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 13:55:45 2010 +0200
Translation update done using Pootle.
commit b774459169467ca5c0980f308358330dac950ba4
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 13:54:34 2010 +0200
Translation update done using Pootle.
commit 3459098babee9b911107a6776e87cbdf569816ec
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 13:54:08 2010 +0200
Translation update done using Pootle.
commit d8765ad5fb3e773361a68b788c53a231790e84b2
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 07:24:32 2010 +0200
Translation update done using Pootle.
commit 031d315b3c1d7507a1f39e52bf93f7917dbe7eee
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 07:04:15 2010 +0200
Translation update done using Pootle.
commit 605727dd9857edafcea279e5f6384f75a145ac48
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 07:02:24 2010 +0200
Translation update done using Pootle.
commit f3286a0d214c0ed03e04350dbf17369686963b84
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 05:06:37 2010 +0200
Translation update done using Pootle.
commit e58626c1888f22027d26df749be475fc28800086
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 05:06:18 2010 +0200
Translation update done using Pootle.
commit a0fb4c04b96da4ca82968b355a271614d5e7bde5
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 05:04:19 2010 +0200
Translation update done using Pootle.
commit f7418693d783d1ae694cf392e19e0ff7dfe0d95d
Author: Azhari Harahap <azhari.harahap(a)yahoo.com>
Date: Sun Mar 28 05:03:57 2010 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
js/main_custom_color.js | 28 +++++++++++++
libraries/config.default.php | 3 +-
main.php | 52 ++++++------------------
po/id.po | 24 +++++-----
po/it.po | 31 +++++++-------
themes/darkblue_orange/css/theme_right.css.php | 5 ++
themes/original/css/theme_right.css.php | 5 ++
7 files changed, 80 insertions(+), 68 deletions(-)
create mode 100644 js/main_custom_color.js
diff --git a/js/main_custom_color.js b/js/main_custom_color.js
new file mode 100644
index 0000000..eacc5b7
--- /dev/null
+++ b/js/main_custom_color.js
@@ -0,0 +1,28 @@
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * for main custom color
+ *
+ */
+$(document).ready(function() {
+ $('#li_custom_color').show();
+ // Choosing another id does not work!
+ $('#colorSelector').ColorPicker({
+ color: '#0000ff',
+ onShow: function (colpkr) {
+ $(colpkr).fadeIn(500);
+ return false;
+ },
+ onHide: function (colpkr) {
+ $(colpkr).fadeOut(500);
+ return false;
+ },
+ onChange: function(hsb, hex, rgb) {
+ top.frame_content.document.body.style.backgroundColor = '#' + hex;
+ top.frame_navigation.document.body.style.backgroundColor = '#' + hex;
+ },
+ onSubmit: function(hsb, hex, rgb) {
+ $('#custom_color').val('#' + hex);
+ $('#colorform').submit();
+ }
+ });
+});
diff --git a/libraries/config.default.php b/libraries/config.default.php
index 653fc53..35f603d 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -578,7 +578,8 @@ $cfg['ShowSQL'] = true;
$cfg['AllowUserDropDatabase'] = false;
/**
- * confirm 'DROP TABLE' & 'DROP DATABASE'
+ * confirm some commands that can result in loss of data
+ * (see "need_confirm" in the parser)
*
* @global boolean $cfg['Confirm']
*/
diff --git a/main.php b/main.php
index 8c65bc5..f942b40 100644
--- a/main.php
+++ b/main.php
@@ -14,6 +14,7 @@ require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
$GLOBALS['js_include'][] = 'colorpicker/js/colorpicker.js';
+$GLOBALS['js_include'][] = 'main_custom_color.js';
// Handles some variables that may have been sent by the calling script
$GLOBALS['db'] = '';
@@ -153,45 +154,18 @@ if ($GLOBALS['cfg']['ThemeManager']) {
echo '<li id="li_select_theme">';
echo $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
echo '</li>';
-?>
- <script type="text/javascript">
- //<![CDATA[
- document.write('<li id="li_custom_color">');
- document.write('<?php echo PMA_escapeJsString($strCustomColor) . ': '; ?>');
- document.write('<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">');
- document.write('<?php echo PMA_generate_common_hidden_inputs(); ?>');
- document.write('<input type="hidden" id="custom_color" name="custom_color" value="" />');
- document.write('<input type="submit" name="custom_color_reset" value="<?php echo $strReset; ?>" />');
- document.write('</form>');
- document.write('<div id="colorSelector">');
- document.write('</div>');
- document.write('</li>');
-
- $(document).ready(function() {
- // Choosing another id does not work!
- $('#colorSelector').ColorPicker({
- color: '#0000ff',
- onShow: function (colpkr) {
- $(colpkr).fadeIn(500);
- return false;
- },
- onHide: function (colpkr) {
- $(colpkr).fadeOut(500);
- return false;
- },
- onChange: function(hsb, hex, rgb) {
- top.frame_content.document.body.style.backgroundColor = '#' + hex;
- top.frame_navigation.document.body.style.backgroundColor = '#' + hex;
- },
- onSubmit: function(hsb, hex, rgb) {
- $('#custom_color').val('#' + hex);
- $('#colorform').submit();
- }
- });
- });
- //]]>
- </script>
- <?php
+
+ // see js/main_custom_color.js
+ echo '<li id="li_custom_color" class="hide">';
+ echo PMA_escapeJsString($strCustomColor) . ': ';
+ echo '<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">';
+ echo PMA_generate_common_hidden_inputs();
+ echo '<input type="hidden" id="custom_color" name="custom_color" value="" />';
+ echo '<input type="submit" name="custom_color_reset" value="' . $strReset . '" />';
+ echo '</form>';
+ echo '<div id="colorSelector">';
+ echo '</div>';
+ echo '</li>';
}
echo '<li id="li_select_fontsize">';
echo PMA_Config::getFontsizeForm();
diff --git a/po/id.po b/po/id.po
index fa1e604..6fc979d 100644
--- a/po/id.po
+++ b/po/id.po
@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.4.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2010-03-19 00:28+0100\n"
-"PO-Revision-Date: 2010-03-24 04:59+0200\n"
+"PO-Revision-Date: 2010-03-28 13:56+0200\n"
"Last-Translator: Azhari Harahap <azhari.harahap(a)yahoo.com>\n"
"Language-Team: indonesian <id(a)li.org>\n"
"Language: id\n"
@@ -6520,7 +6520,7 @@ msgstr "Pemeliharaan tabel"
#: libraries/messages.inc.php:1455
msgid "Table name"
-msgstr ""
+msgstr "Nama tabel"
#: libraries/messages.inc.php:1456
msgid "Table of contents"
@@ -6674,16 +6674,16 @@ msgstr "Jumlah"
#: libraries/messages.inc.php:1490
#, php-format
msgid "Tracking of %s.%s is activated."
-msgstr ""
+msgstr "Pelacakan dari %s.%s diaktifkan"
#: libraries/messages.inc.php:1491
msgid "Activate now"
-msgstr ""
+msgstr "Aktifkan sekarang"
#: libraries/messages.inc.php:1492
#, php-format
msgid "Activate tracking for %s.%s"
-msgstr ""
+msgstr "Aktifkan pelacakan untuk %s.%s"
#: libraries/messages.inc.php:1493
msgid "Comment out these two lines if you do not need them."
@@ -6726,32 +6726,32 @@ msgstr "Nonaktifkan pelacakan untuk %s.%s"
#: libraries/messages.inc.php:1502
#, php-format
msgid "Export as %s"
-msgstr ""
+msgstr "Ekspor sebagai %s"
#: libraries/messages.inc.php:1503
msgid "Tracking is active."
-msgstr ""
+msgstr "Pelacakan aktif"
#: libraries/messages.inc.php:1504
msgid "Tracking is not active."
-msgstr ""
+msgstr "Pelacakan tidak aktif."
#: libraries/messages.inc.php:1505
msgid "Tracking Mechanism"
-msgstr ""
+msgstr "Mekanisme pelacakan"
#: libraries/messages.inc.php:1506
msgid "Close"
-msgstr ""
+msgstr "Tutup"
#: libraries/messages.inc.php:1507
#, php-format
msgid "Tracking report for table `%s`"
-msgstr ""
+msgstr "Laporan pelacakan untuk table '%s'"
#: libraries/messages.inc.php:1508
msgid "Tracking report"
-msgstr ""
+msgstr "Laporan pelacakan"
#: libraries/messages.inc.php:1509
#, php-format
diff --git a/po/it.po b/po/it.po
index 4d74005..36cf40a 100644
--- a/po/it.po
+++ b/po/it.po
@@ -4,13 +4,15 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.4.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2010-03-19 00:28+0100\n"
-"PO-Revision-Date: 2010-03-12 09:16+0100\n"
-"Last-Translator: Automatically generated\n"
+"PO-Revision-Date: 2010-03-29 00:26+0200\n"
+"Last-Translator: <rebeluca(a)gmail.com>\n"
"Language-Team: italian <it(a)li.org>\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Translate Toolkit 1.5.3\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Pootle 2.0.1\n"
#: libraries/auth/config.auth.lib.php:107
#, php-format
@@ -35,10 +37,9 @@ msgstr ""
#. l10n: Language to use for MySQL 5.1 documentation
#: libraries/common.lib.php:411
-#, fuzzy
msgctxt "$mysql_5_1_doc_lang"
msgid "en"
-msgstr "Spediti"
+msgstr "en"
#. l10n: Language to use for MySQL 5.0 documentation
#: libraries/common.lib.php:415
@@ -347,7 +348,7 @@ msgstr "Qualsiasi utente"
#: libraries/messages.inc.php:68
msgid "Apply Selected Changes"
-msgstr ""
+msgstr "Applica i cambiamenti selezionati"
#: libraries/messages.inc.php:69
msgid ""
@@ -446,7 +447,7 @@ msgstr "ID del server"
#: libraries/messages.inc.php:93
msgid "BLOB Repository"
-msgstr ""
+msgstr "Repository BLOB"
#: libraries/messages.inc.php:94
msgid "Damaged"
@@ -456,9 +457,9 @@ msgstr "Danneggiato"
#, php-format
msgid "Are you sure you want to disable all BLOB references for database %s?"
msgstr ""
+"Sei sicuro di voler disabilitare tutte le referenze BLOB per il database %s?"
#: libraries/messages.inc.php:96
-#, fuzzy
msgctxt "$strBLOBRepositoryDisabled"
msgid "Disabled"
msgstr "Disabilitato"
@@ -469,10 +470,9 @@ msgstr "Disabilita"
#: libraries/messages.inc.php:98
msgid "You are about to DISABLE a BLOB Repository!"
-msgstr ""
+msgstr "Stai per DISABILITARE una repository BLOB!"
#: libraries/messages.inc.php:99
-#, fuzzy
msgctxt "$strBLOBRepositoryEnabled"
msgid "Enabled"
msgstr "Abilitato"
@@ -483,17 +483,16 @@ msgstr "Abilita"
#: libraries/messages.inc.php:101
msgid "Remove BLOB Repository Reference"
-msgstr ""
+msgstr "Rimuovi le referenze al REPOSITORY BLOB"
#: libraries/messages.inc.php:102
-#, fuzzy
msgctxt "$strBLOBRepositoryRepair"
msgid "Repair"
msgstr "Ripara"
#: libraries/messages.inc.php:103
msgid "Upload to BLOB repository"
-msgstr ""
+msgstr "Carica nella repository BLOB"
#: libraries/messages.inc.php:104
msgid "Let every user access this bookmark"
@@ -518,7 +517,7 @@ msgstr "Query SQL aggiunte ai preferiti"
#: libraries/messages.inc.php:109
msgid "Replace existing bookmark of same name"
-msgstr "Sostituzione dei segnalibri esistenti con lo stesso nome"
+msgstr "Sostituisci segnalibro esistente se con lo stesso nome"
#: libraries/messages.inc.php:110
msgid "Bookmark this SQL query"
@@ -538,7 +537,7 @@ msgstr "Naviga tra i valori DISTINCT"
#: libraries/messages.inc.php:114
msgid "Browse foreign values"
-msgstr "Sfoglia le opzioni straniere"
+msgstr "Naviga tra i valori esterni"
#: libraries/messages.inc.php:115
msgid "Buffer Pool Activity"
@@ -578,7 +577,7 @@ msgstr "Pagine occupate"
#: libraries/messages.inc.php:124
msgid "\"bzipped\""
-msgstr "\"compresso con bzip2\""
+msgstr "\"compresso con bzip\""
#: libraries/messages.inc.php:126
msgid "Calendar"
diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php
index b3641b3..7fafa15 100644
--- a/themes/darkblue_orange/css/theme_right.css.php
+++ b/themes/darkblue_orange/css/theme_right.css.php
@@ -1227,6 +1227,11 @@ code.sql {
margin-top: 0;
}
+/* for elements that should be revealed only via js */
+.hide {
+ display: none;
+}
+
#li_select_server {
padding-bottom: 0.3em;
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 0a5ae35..b550fab 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1178,6 +1178,11 @@ code.sql {
margin-top: 0;
}
+/* for elements that should be revealed only via js */
+.hide {
+ display: none;
+}
+
#li_select_server {
padding-bottom: 0.3em;
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-272-g775d2ce
by Marc Delisle 28 Mar '10
by Marc Delisle 28 Mar '10
28 Mar '10
The branch, master has been updated
via 775d2ce26417a2c52b42f719a0dbccc3e63e468b (commit)
from 6ff307b546471fd556cdfe3ac924a89217134e5d (commit)
- Log -----------------------------------------------------------------
commit 775d2ce26417a2c52b42f719a0dbccc3e63e468b
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sun Mar 28 07:26:05 2010 -0400
clarify the effect of the Confirm directive
-----------------------------------------------------------------------
Summary of changes:
libraries/config.default.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libraries/config.default.php b/libraries/config.default.php
index 653fc53..35f603d 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -578,7 +578,8 @@ $cfg['ShowSQL'] = true;
$cfg['AllowUserDropDatabase'] = false;
/**
- * confirm 'DROP TABLE' & 'DROP DATABASE'
+ * confirm some commands that can result in loss of data
+ * (see "need_confirm" in the parser)
*
* @global boolean $cfg['Confirm']
*/
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-271-g6ff307b
by Marc Delisle 27 Mar '10
by Marc Delisle 27 Mar '10
27 Mar '10
The branch, master has been updated
via 6ff307b546471fd556cdfe3ac924a89217134e5d (commit)
from bbad02a5a1c78b56210c6f9cd85261106ff29aef (commit)
- Log -----------------------------------------------------------------
commit 6ff307b546471fd556cdfe3ac924a89217134e5d
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sat Mar 27 15:01:13 2010 -0400
remove inline js from main.php
-----------------------------------------------------------------------
Summary of changes:
js/main_custom_color.js | 28 +++++++++++++
main.php | 52 ++++++------------------
themes/darkblue_orange/css/theme_right.css.php | 5 ++
themes/original/css/theme_right.css.php | 5 ++
4 files changed, 51 insertions(+), 39 deletions(-)
create mode 100644 js/main_custom_color.js
diff --git a/js/main_custom_color.js b/js/main_custom_color.js
new file mode 100644
index 0000000..eacc5b7
--- /dev/null
+++ b/js/main_custom_color.js
@@ -0,0 +1,28 @@
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * for main custom color
+ *
+ */
+$(document).ready(function() {
+ $('#li_custom_color').show();
+ // Choosing another id does not work!
+ $('#colorSelector').ColorPicker({
+ color: '#0000ff',
+ onShow: function (colpkr) {
+ $(colpkr).fadeIn(500);
+ return false;
+ },
+ onHide: function (colpkr) {
+ $(colpkr).fadeOut(500);
+ return false;
+ },
+ onChange: function(hsb, hex, rgb) {
+ top.frame_content.document.body.style.backgroundColor = '#' + hex;
+ top.frame_navigation.document.body.style.backgroundColor = '#' + hex;
+ },
+ onSubmit: function(hsb, hex, rgb) {
+ $('#custom_color').val('#' + hex);
+ $('#colorform').submit();
+ }
+ });
+});
diff --git a/main.php b/main.php
index 8c65bc5..f942b40 100644
--- a/main.php
+++ b/main.php
@@ -14,6 +14,7 @@ require_once './libraries/common.inc.php';
$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
$GLOBALS['js_include'][] = 'colorpicker/js/colorpicker.js';
+$GLOBALS['js_include'][] = 'main_custom_color.js';
// Handles some variables that may have been sent by the calling script
$GLOBALS['db'] = '';
@@ -153,45 +154,18 @@ if ($GLOBALS['cfg']['ThemeManager']) {
echo '<li id="li_select_theme">';
echo $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
echo '</li>';
-?>
- <script type="text/javascript">
- //<![CDATA[
- document.write('<li id="li_custom_color">');
- document.write('<?php echo PMA_escapeJsString($strCustomColor) . ': '; ?>');
- document.write('<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">');
- document.write('<?php echo PMA_generate_common_hidden_inputs(); ?>');
- document.write('<input type="hidden" id="custom_color" name="custom_color" value="" />');
- document.write('<input type="submit" name="custom_color_reset" value="<?php echo $strReset; ?>" />');
- document.write('</form>');
- document.write('<div id="colorSelector">');
- document.write('</div>');
- document.write('</li>');
-
- $(document).ready(function() {
- // Choosing another id does not work!
- $('#colorSelector').ColorPicker({
- color: '#0000ff',
- onShow: function (colpkr) {
- $(colpkr).fadeIn(500);
- return false;
- },
- onHide: function (colpkr) {
- $(colpkr).fadeOut(500);
- return false;
- },
- onChange: function(hsb, hex, rgb) {
- top.frame_content.document.body.style.backgroundColor = '#' + hex;
- top.frame_navigation.document.body.style.backgroundColor = '#' + hex;
- },
- onSubmit: function(hsb, hex, rgb) {
- $('#custom_color').val('#' + hex);
- $('#colorform').submit();
- }
- });
- });
- //]]>
- </script>
- <?php
+
+ // see js/main_custom_color.js
+ echo '<li id="li_custom_color" class="hide">';
+ echo PMA_escapeJsString($strCustomColor) . ': ';
+ echo '<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">';
+ echo PMA_generate_common_hidden_inputs();
+ echo '<input type="hidden" id="custom_color" name="custom_color" value="" />';
+ echo '<input type="submit" name="custom_color_reset" value="' . $strReset . '" />';
+ echo '</form>';
+ echo '<div id="colorSelector">';
+ echo '</div>';
+ echo '</li>';
}
echo '<li id="li_select_fontsize">';
echo PMA_Config::getFontsizeForm();
diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php
index b3641b3..7fafa15 100644
--- a/themes/darkblue_orange/css/theme_right.css.php
+++ b/themes/darkblue_orange/css/theme_right.css.php
@@ -1227,6 +1227,11 @@ code.sql {
margin-top: 0;
}
+/* for elements that should be revealed only via js */
+.hide {
+ display: none;
+}
+
#li_select_server {
padding-bottom: 0.3em;
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php
index 0a5ae35..b550fab 100644
--- a/themes/original/css/theme_right.css.php
+++ b/themes/original/css/theme_right.css.php
@@ -1178,6 +1178,11 @@ code.sql {
margin-top: 0;
}
+/* for elements that should be revealed only via js */
+.hide {
+ display: none;
+}
+
#li_select_server {
padding-bottom: 0.3em;
border-bottom: 0.3em solid <?php echo $GLOBALS['cfg']['ThBackground']; ?>;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-853-g1ce7379
by Michal Čihař 27 Mar '10
by Michal Čihař 27 Mar '10
27 Mar '10
The branch, gettext has been updated
via 1ce73794ea669c0a37ad65a83c14a1286b7b2371 (commit)
via 46c6b06617d3a2a41477972ac6e89b13d5e6205a (commit)
via bbad02a5a1c78b56210c6f9cd85261106ff29aef (commit)
via 9785bbc561db3d64cd53a8cf86823d37eac6fafb (commit)
via f6e3ae57c50edb17dad905ca47827e7de1f63b15 (commit)
via 291f2a1d1d97299b3b47dc2b9871e3646ae7d3f8 (commit)
via 4c8addeee277e63c8801d0a447a3006ec307f213 (commit)
via dcb6cf7cde8f20c79e57c90ede35889c59f6182a (commit)
via 2a567fdf155fef796388f7e7358ccafb8ef420e6 (commit)
via 4e4f5f7eaf4be5cc5b1a2b6d72b47eea97ed13ae (commit)
from d2a521f369de842a3130bfeafd3816a6d24614fa (commit)
- Log -----------------------------------------------------------------
commit 1ce73794ea669c0a37ad65a83c14a1286b7b2371
Merge: 46c6b06617d3a2a41477972ac6e89b13d5e6205a 4c8addeee277e63c8801d0a447a3006ec307f213
Author: Michal Čihař <michal(a)cihar.com>
Date: Sat Mar 27 00:31:53 2010 +0100
Merge remote branch 'pootle/gettext' into gettext
commit 46c6b06617d3a2a41477972ac6e89b13d5e6205a
Merge: d2a521f369de842a3130bfeafd3816a6d24614fa bbad02a5a1c78b56210c6f9cd85261106ff29aef
Author: Michal Čihař <michal(a)cihar.com>
Date: Sat Mar 27 00:30:38 2010 +0100
Merge branch 'master' into gettext
commit 4c8addeee277e63c8801d0a447a3006ec307f213
Author: rink <rink(a)initfour.nl>
Date: Fri Mar 26 15:46:23 2010 +0200
Translation update done using Pootle.
commit dcb6cf7cde8f20c79e57c90ede35889c59f6182a
Author: rink <rink(a)initfour.nl>
Date: Fri Mar 26 15:42:54 2010 +0200
Translation update done using Pootle.
commit 2a567fdf155fef796388f7e7358ccafb8ef420e6
Author: rink <rink(a)initfour.nl>
Date: Fri Mar 26 15:42:02 2010 +0200
Translation update done using Pootle.
commit 4e4f5f7eaf4be5cc5b1a2b6d72b47eea97ed13ae
Author: rink <rink(a)initfour.nl>
Date: Fri Mar 26 15:41:44 2010 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 ++
libraries/List_Database.class.php | 2 +-
libraries/Table.class.php | 14 +++++++-------
libraries/common.lib.php | 11 ++++++++---
libraries/display_tbl.lib.php | 19 +++++++++----------
libraries/display_tbl_links.lib.php | 2 +-
libraries/header.inc.php | 2 +-
libraries/header_printview.inc.php | 4 ++--
libraries/tbl_links.inc.php | 1 +
libraries/tbl_properties.inc.php | 6 +++---
libraries/tbl_replace_fields.inc.php | 8 ++++----
main.php | 1 -
navigation.php | 2 +-
pdf_pages.php | 2 +-
po/nl.po | 9 +++------
sql.php | 8 ++++----
tbl_addfield.php | 6 +++---
tbl_alter.php | 2 +-
tbl_change.php | 6 +++---
tbl_create.php | 6 +++---
tbl_replace.php | 3 ++-
tbl_row_action.php | 4 ++--
tbl_structure.php | 4 ++--
transformation_wrapper.php | 2 +-
24 files changed, 65 insertions(+), 61 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69a860d..51febbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2967565 [insert] UNHEX not selected by default when inserting BINARY
- [navi] Changed link to git repository on main page
- bug #2972232 [menu] Import menu tab not present on main page
+- patch #2976790 [menu] Go to the upper level after table DROP,
+ thanks to Kaarel Nummert - kaarelnu
3.3.1.0 (2010-03-16)
- bug #2941037 [core] Database structure not sorted by table correctly
diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php
index 8997790..34e4cb6 100644
--- a/libraries/List_Database.class.php
+++ b/libraries/List_Database.class.php
@@ -295,7 +295,7 @@ require_once './libraries/List.class.php';
}
foreach ($this->getLimitedItems($offset, $count) as $key => $db) {
- // garvin: Get comments from PMA comments table
+ // Get comments from PMA comments table
$db_tooltip = '';
if (isset($db_tooltips[$db])) {
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 25e3709..9e80660 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -720,7 +720,7 @@ class PMA_Table
$GLOBALS['sql_query'] .= "\n" . $drop_query . ';';
- // garvin: If an existing table gets deleted, maintain any
+ // If an existing table gets deleted, maintain any
// entries for the PMA_* tables
$maintain_relations = true;
}
@@ -800,7 +800,7 @@ class PMA_Table
$sql_drop_query .= ' ' . $source;
PMA_DBI_query($sql_drop_query);
- // garvin: Move old entries from PMA-DBs to new table
+ // Move old entries from PMA-DBs to new table
if ($GLOBALS['cfgRelation']['commwork']) {
$remove_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['column_info'])
. ' SET table_name = \'' . PMA_sqlAddslashes($target_table) . '\', '
@@ -811,7 +811,7 @@ class PMA_Table
unset($remove_query);
}
- // garvin: updating bookmarks is not possible since only a single table is moved,
+ // updating bookmarks is not possible since only a single table is moved,
// and not the whole DB.
if ($GLOBALS['cfgRelation']['displaywork']) {
@@ -843,7 +843,7 @@ class PMA_Table
}
/**
- * @todo garvin: Can't get moving PDFs the right way. The page numbers
+ * @todo Can't get moving PDFs the right way. The page numbers
* always get screwed up independently from duplication because the
* numbers do not seem to be stored on a per-database basis. Would
* the author of pdf support please have a look at it?
@@ -890,7 +890,7 @@ class PMA_Table
// end if ($move)
} else {
// we are copying
- // garvin: Create new entries as duplicates from old PMA DBs
+ // Create new entries as duplicates from old PMA DBs
if ($what != 'dataonly' && !isset($maintain_relations)) {
if ($GLOBALS['cfgRelation']['commwork']) {
// Get all comments and MIME-Types for current table
@@ -951,7 +951,7 @@ class PMA_Table
PMA_Table::duplicateInfo('designerwork', 'designer_coords', $get_fields, $where_fields, $new_fields);
/**
- * @todo garvin: Can't get duplicating PDFs the right way. The
+ * @todo Can't get duplicating PDFs the right way. The
* page numbers always get screwed up independently from
* duplication because the numbers do not seem to be stored on a
* per-database basis. Would the author of pdf support please
@@ -1057,7 +1057,7 @@ class PMA_Table
/**
* @todo move into extra function PMA_Relation::renameTable($new_name, $old_name, $new_db, $old_db)
*/
- // garvin: Move old entries from comments to new table
+ // Move old entries from comments to new table
require_once './libraries/relation.lib.php';
$GLOBALS['cfgRelation'] = PMA_getRelationsParam();
if ($GLOBALS['cfgRelation']['commwork']) {
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index d103d06..a2ce680 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -591,7 +591,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$error_msg_output .= '<br />' . "\n";
}
// ---
- // modified to show me the help on sql errors (Michael Keck)
+ // modified to show the help on sql errors
$error_msg_output .= ' <p><strong>' . $GLOBALS['strSQLQuery'] . ':</strong>' . "\n";
if (strstr(strtolower($formatted_sql), 'select')) { // please show me help to the error on select
$error_msg_output .= PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
@@ -628,7 +628,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$error_message = htmlspecialchars($error_message);
$error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message);
}
- // modified to show me the help on error-returns (Michael Keck)
+ // modified to show the help on error-returns
// (now error-messages-server)
$error_msg_output .= '<p>' . "\n"
. ' <strong>' . $GLOBALS['strMySQLSaid'] . '</strong>'
@@ -1583,6 +1583,11 @@ function PMA_generate_html_tab($tab, $url_params = array())
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
}
+ // If there are any tab specific URL parameters, merge those with the general URL parameters
+ if(! empty($tab['url_params']) && is_array($tab['url_params'])) {
+ $url_params = array_merge($url_params, $tab['url_params']);
+ }
+
// build the link
if (!empty($tab['link'])) {
$tab['link'] = htmlentities($tab['link']);
@@ -2140,7 +2145,7 @@ function PMA_pageselector($url, $rows, $pageNow = 1, $nbTotalPage = 1,
$pages[] = $i;
}
- // garvin: Based on the number of results we add the specified
+ // Based on the number of results we add the specified
// $percent percentage to each page number,
// so that we have a representing page number every now and then to
// immediately jump to specific pages.
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index acc08c8..13eb093 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -173,7 +173,7 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
// so don't test this number here, it would remove the possibility
// of sorting VIEW results.
if (isset($unlim_num_rows) && $unlim_num_rows < 2 && ! PMA_Table::isView($db, $table)) {
- // garvin: force display of navbar for vertical/horizontal display-choice.
+ // force display of navbar for vertical/horizontal display-choice.
// $do_display['nav_bar'] = (string) '0';
$do_display['sort_lnk'] = (string) '0';
}
@@ -723,8 +723,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$select_expr = $analyzed_sql[0]['select_expr_clause'];
}
- // garvin: See if we have to highlight any header fields of a WHERE query.
- // Uses SQL-Parser results.
+ // See if we have to highlight any header fields of a WHERE query.
+ // Uses SQL-Parser results.
$highlight_columns = array();
if (isset($analyzed_sql) && isset($analyzed_sql[0]) &&
isset($analyzed_sql[0]['where_clause_identifiers'])) {
@@ -738,7 +738,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
}
for ($i = 0; $i < $fields_cnt; $i++) {
- // garvin: See if this column should get highlight because it's used in the
+ // See if this column should get highlight because it's used in the
// where-query.
if (isset($highlight_columns[$fields_meta[$i]->name]) || isset($highlight_columns[PMA_backquote($fields_meta[$i]->name)])) {
$condition_field = true;
@@ -841,8 +841,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_url = 'sql.php' . PMA_generate_common_url($_url_params);
// 2.1.5 Displays the sorting URL
- // added 20004-06-09: Michael Keck <mail(a)michaelkeck.de>
- // enable sort order swapping for image
+ // enable sort order swapping for image
$order_link_params = array();
if (isset($order_img) && $order_img!='') {
if (strstr($order_img, 'asc')) {
@@ -1191,7 +1190,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
for ($i = 0; $i < $fields_cnt; ++$i) {
$meta = $fields_meta[$i];
$pointer = $i;
- // garvin: See if this column should get highlight because it's used in the
+ // See if this column should get highlight because it's used in the
// where-query.
if (isset($highlight_columns) && (isset($highlight_columns[$meta->name]) || isset($highlight_columns[PMA_backquote($meta->name)]))) {
$condition_field = true;
@@ -1212,7 +1211,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
}// end if
- // garvin: Wrap MIME-transformations. [MIME]
+ // Wrap MIME-transformations. [MIME]
$default_function = 'default_function'; // default_function
$transform_function = $default_function;
$transform_options = array();
@@ -1334,7 +1333,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
if (!isset($row[$i]) || is_null($row[$i])) {
$vertical_display['data'][$row_no][$i] = ' <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '"><i>NULL</i></td>' . "\n";
} elseif ($row[$i] != '') {
- // garvin: if a transform function for blob is set, none of these replacements will be made
+ // if a transform function for blob is set, none of these replacements will be made
if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P') {
$row[$i] = PMA_substr($row[$i], 0, $GLOBALS['cfg']['LimitChars']) . '...';
}
@@ -1385,7 +1384,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
}
- // garvin: transform functions may enable no-wrapping:
+ // transform functions may enable no-wrapping:
$function_nowrap = $transform_function . '_nowrap';
$bool_nowrap = (($default_function != $transform_function && function_exists($function_nowrap)) ? $function_nowrap($transform_options) : false);
diff --git a/libraries/display_tbl_links.lib.php b/libraries/display_tbl_links.lib.php
index 8d904c0..40a3fd1 100644
--- a/libraries/display_tbl_links.lib.php
+++ b/libraries/display_tbl_links.lib.php
@@ -1,7 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * modified 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
+ *
* - bugfix for select all checkboxes
* - copy right to left (or left to right) if user click on a check box
* - reversed the right modify links: 1. drop, 2. edit, 3. checkbox
diff --git a/libraries/header.inc.php b/libraries/header.inc.php
index 24423a5..18a327b 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -22,7 +22,7 @@ if (empty($GLOBALS['is_header_sent'])) {
require_once './libraries/ob.lib.php';
PMA_outBufferPre();
- // garvin: For re-usability, moved http-headers and stylesheets
+ // For re-usability, moved http-headers and stylesheets
// to a seperate file. It can now be included by header.inc.php,
// querywindow.php.
diff --git a/libraries/header_printview.inc.php b/libraries/header_printview.inc.php
index 6c37db0..962c590 100644
--- a/libraries/header_printview.inc.php
+++ b/libraries/header_printview.inc.php
@@ -21,8 +21,8 @@ PMA_outBufferPre();
PMA_checkParameters(array('db', 'full_sql_query'));
-// garvin: For re-usability, moved http-headers
-// to a seperate file. It can now be included by libraries/header.inc.php,
+// For re-usability, moved http-headers
+// to a separate file. It can now be included by libraries/header.inc.php,
// querywindow.php.
require_once './libraries/header_http.inc.php';
diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php
index 13dbaf8..4f7b631 100644
--- a/libraries/tbl_links.inc.php
+++ b/libraries/tbl_links.inc.php
@@ -123,6 +123,7 @@ if ($tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_sc
if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
$tabs['drop']['icon'] = 'b_deltbl.png';
$tabs['drop']['link'] = 'sql.php';
+ $tabs['drop']['url_params'] = array('table' => NULL);
$tabs['drop']['text'] = $strDrop;
$tabs['drop']['args']['reload'] = 1;
$tabs['drop']['args']['purge'] = 1;
diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php
index 30d4717..3688f2f 100644
--- a/libraries/tbl_properties.inc.php
+++ b/libraries/tbl_properties.inc.php
@@ -146,9 +146,9 @@ if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
. PMA_showHint($strMIME_transformation_options_note . $hint);
}
-// garvin: workaround for field_fulltext, because its submitted indizes contain
-// the index as a value, not a key. Inserted here for easier maintaineance
-// and less code to change in existing files.
+// workaround for field_fulltext, because its submitted indizes contain
+// the index as a value, not a key. Inserted here for easier maintaineance
+// and less code to change in existing files.
if (isset($field_fulltext) && is_array($field_fulltext)) {
foreach ($field_fulltext as $fulltext_nr => $fulltext_indexkey) {
$submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey;
diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php
index bd34ae2..2d5b8e7 100644
--- a/libraries/tbl_replace_fields.inc.php
+++ b/libraries/tbl_replace_fields.inc.php
@@ -3,16 +3,16 @@
/**
* handle field values (possibly uploaded from a file)
*
- * garvin: original if-clause checked, whether input was stored in a possible
+ * original if-clause checked, whether input was stored in a possible
* fields_upload_XX var. Now check, if the field is set. If it is empty or a
* malicious file, do not alter fields contents. If an empty or invalid file is
* specified, the binary data gets deleter. Maybe a nice new text-variable is
* appropriate to document this behaviour.
*
- * garvin: security cautions! You could trick the form and submit any file the
+ * security cautions! You could trick the form and submit any file the
* webserver has access to for upload to a binary field. Shouldn't be that easy! ;)
*
- * garvin: default is to advance to the field-value parsing. Will only be set to
+ * default is to advance to the field-value parsing. Will only be set to
* true when a binary file is uploaded, thus bypassing further manipulation of $val.
*
* note: grab_globals has extracted the fields from _FILES or HTTP_POST_FILES
@@ -93,7 +93,7 @@ if (false !== $possibly_uploaded_val) {
// fields array, so we do not change the field value
// but we can still handle field upload
- // garvin: when in UPDATE mode, do not alter field's contents. When in INSERT
+ // when in UPDATE mode, do not alter field's contents. When in INSERT
// mode, insert empty field because no values were submitted. If protected
// blobs where set, insert original fields content.
if (! empty($prot_row[$me_fields_name[$key]])) {
diff --git a/main.php b/main.php
index 36a8125..8c65bc5 100644
--- a/main.php
+++ b/main.php
@@ -147,7 +147,6 @@ if (empty($cfg['Lang'])) {
echo '</li>';
}
-// added by Michael Keck <mail_at_michaelkeck_dot_de>
// ThemeManager if available
if ($GLOBALS['cfg']['ThemeManager']) {
diff --git a/navigation.php b/navigation.php
index 864456e..cb031ed 100644
--- a/navigation.php
+++ b/navigation.php
@@ -124,7 +124,7 @@ require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
/**
- * garvin: For re-usability, moved http-headers to a seperate file.
+ * For re-usability, moved http-headers to a seperate file.
* It can now be included by libraries/header.inc.php, querywindow.php.
*/
require_once './libraries/header_http.inc.php';
diff --git a/pdf_pages.php b/pdf_pages.php
index aff7385..b7f93c5 100644
--- a/pdf_pages.php
+++ b/pdf_pages.php
@@ -332,7 +332,7 @@ while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
$array_sh_page[] = $temp_sh_page;
}
-// garvin: Display WYSIWYG-PDF parts?
+// Display WYSIWYG-PDF parts?
if ($cfg['WYSIWYG-PDF']) {
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
$with_field_names = TRUE;
diff --git a/po/nl.po b/po/nl.po
index a00ecc7..e32c5e9 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.4.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2010-03-19 00:28+0100\n"
-"PO-Revision-Date: 2010-03-12 12:22+0200\n"
-"Last-Translator: <rink(a)initfour.nl>\n"
+"PO-Revision-Date: 2010-03-26 15:46+0200\n"
+"Last-Translator: <rink(a)initfour.nl>\n"
"Language-Team: dutch <nl(a)li.org>\n"
+"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: nl\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.1\n"
@@ -37,7 +37,6 @@ msgstr ""
#. l10n: Language to use for MySQL 5.1 documentation
#: libraries/common.lib.php:411
-#, fuzzy
msgctxt "$mysql_5_1_doc_lang"
msgid "en"
msgstr "en"
@@ -474,7 +473,6 @@ msgid "You are about to DISABLE a BLOB Repository!"
msgstr "U staat op het punt om een BLOB Bewaarplaats UIT TE SCHAKELEN!"
#: libraries/messages.inc.php:99
-#, fuzzy
msgctxt "$strBLOBRepositoryEnabled"
msgid "Enabled"
msgstr "Ingeschakeld"
@@ -488,7 +486,6 @@ msgid "Remove BLOB Repository Reference"
msgstr "Verwijder BLOB Bewaarplaats Referentie"
#: libraries/messages.inc.php:102
-#, fuzzy
msgctxt "$strBLOBRepositoryRepair"
msgid "Repair"
msgstr "Repareer"
diff --git a/sql.php b/sql.php
index 4da90d1..864034c 100644
--- a/sql.php
+++ b/sql.php
@@ -302,7 +302,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
session_write_close();
}
- // garvin: Measure query time.
+ // Measure query time.
// TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23…
$querytime_before = array_sum(explode(' ', microtime()));
@@ -458,7 +458,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
$unlim_num_rows = 0;
} // end rows total count
- // garvin: if a table or database gets dropped, check column comments.
+ // if a table or database gets dropped, check column comments.
if (isset($purge) && $purge == '1') {
/**
* Cleanup relations.
@@ -470,11 +470,11 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
} elseif (strlen($db)) {
PMA_relationsCleanupDatabase($db);
} else {
- // garvin: VOID. No DB/Table gets deleted.
+ // VOID. No DB/Table gets deleted.
} // end if relation-stuff
} // end if ($purge)
- // garvin: If a column gets dropped, do relation magic.
+ // If a column gets dropped, do relation magic.
if (isset($cpurge) && $cpurge == '1' && isset($purgekey)
&& strlen($db) && strlen($table) && !empty($purgekey)) {
require_once './libraries/relation_cleanup.lib.php';
diff --git a/tbl_addfield.php b/tbl_addfield.php
index cfa25f5..c5d6ce9 100644
--- a/tbl_addfield.php
+++ b/tbl_addfield.php
@@ -166,11 +166,11 @@ if (isset($_REQUEST['do_save_data'])) {
$result = PMA_DBI_try_query($sql_query);
if ($result === true) {
- // garvin: If comments were sent, enable relation stuff
+ // If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
- // garvin: Update comment table for mime types [MIME]
+ // Update comment table for mime types [MIME]
if (isset($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& $cfg['BrowseMIME']) {
@@ -193,7 +193,7 @@ if (isset($_REQUEST['do_save_data'])) {
require './tbl_structure.php';
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
diff --git a/tbl_alter.php b/tbl_alter.php
index a399073..bd82396 100644
--- a/tbl_alter.php
+++ b/tbl_alter.php
@@ -139,7 +139,7 @@ if (isset($_REQUEST['do_save_data'])) {
require './tbl_structure.php';
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
if (isset($_REQUEST['orig_field'])) {
diff --git a/tbl_change.php b/tbl_change.php
index 0c89a17..263e4ab 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -507,7 +507,7 @@ foreach ($rows as $row_id => $vrow) {
<?php
$selected = '';
- // garvin: Find the current type in the RestrictColumnTypes. Will result in 'FUNC_CHAR'
+ // Find the current type in the RestrictColumnTypes. Will result in 'FUNC_CHAR'
// or something similar. Then directly look up the entry in the RestrictFunctions array,
// which will then reveal the available dropdown options
if (isset($cfg['RestrictColumnTypes'][strtoupper($field['True_Type'])])
@@ -550,7 +550,7 @@ foreach ($rows as $row_id => $vrow) {
$default_function = 'UNHEX';
}
- // garvin: loop on the dropdown array and print all available options for that field.
+ // loop on the dropdown array and print all available options for that field.
foreach ($dropdown as $each_dropdown){
echo '<option';
if ($default_function === $each_dropdown) {
@@ -561,7 +561,7 @@ foreach ($rows as $row_id => $vrow) {
$op_spacing_needed = TRUE;
}
- // garvin: For compatibility's sake, do not let out all other functions. Instead
+ // For compatibility's sake, do not let out all other functions. Instead
// print a separator (blank) and then show ALL functions which weren't shown
// yet.
$cnt_functions = count($cfg['Functions']);
diff --git a/tbl_create.php b/tbl_create.php
index 5fcecb7..b83955a 100644
--- a/tbl_create.php
+++ b/tbl_create.php
@@ -228,11 +228,11 @@ if (isset($_REQUEST['do_save_data'])) {
if ($result) {
- // garvin: If comments were sent, enable relation stuff
+ // If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
- // garvin: Update comment table for mime types [MIME]
+ // Update comment table for mime types [MIME]
if (isset($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& $cfg['BrowseMIME']) {
@@ -266,7 +266,7 @@ if (isset($_REQUEST['do_save_data'])) {
exit;
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
diff --git a/tbl_replace.php b/tbl_replace.php
index 4e3e7ca..ef6973a 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -430,7 +430,8 @@ if (isset($return_to_sql_query)) {
$GLOBALS['js_include'][] = 'tbl_change.js';
$GLOBALS['js_include'][] = 'functions.js';
// in case we call sql.php which needs those:
-$GLOBALS['js_include'][] = 'mootools-more.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.min.js';
$active_page = $goto_include;
diff --git a/tbl_row_action.php b/tbl_row_action.php
index efcc74d..5cc5033 100644
--- a/tbl_row_action.php
+++ b/tbl_row_action.php
@@ -79,7 +79,7 @@ require_once './libraries/header.inc.php';
if (!empty($submit_mult)) {
switch($submit_mult) {
case 'row_edit':
- // garvin: As we got the fields to be edited from the
+ // As we got the fields to be edited from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
@@ -96,7 +96,7 @@ if (!empty($submit_mult)) {
// Needed to allow SQL export
$single_table = TRUE;
- // garvin: As we got the fields to be edited from the
+ // As we got the fields to be edited from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
diff --git a/tbl_structure.php b/tbl_structure.php
index 01c12a5..0f3aae2 100644
--- a/tbl_structure.php
+++ b/tbl_structure.php
@@ -282,7 +282,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$field_charset = '';
}
- // garvin: Display basic mimetype [MIME]
+ // Display basic mimetype [MIME]
if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
$type_mime = '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
} else {
@@ -326,7 +326,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$field_name = htmlspecialchars($row['Field']);
$displayed_field_name = $field_name;
- // garvin: underline commented fields and display a hover-title (CSS only)
+ // underline commented fields and display a hover-title (CSS only)
$comment_style = '';
if (isset($comments_map[$row['Field']])) {
diff --git a/transformation_wrapper.php b/transformation_wrapper.php
index 011effe..a231d49 100644
--- a/transformation_wrapper.php
+++ b/transformation_wrapper.php
@@ -56,7 +56,7 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
}
}
-// garvin: For re-usability, moved http-headers and stylesheets
+// For re-usability, moved http-headers and stylesheets
// to a seperate file. It can now be included by libraries/header.inc.php,
// querywindow.php.
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-270-gbbad02a
by Marc Delisle 26 Mar '10
by Marc Delisle 26 Mar '10
26 Mar '10
The branch, master has been updated
via bbad02a5a1c78b56210c6f9cd85261106ff29aef (commit)
from 9785bbc561db3d64cd53a8cf86823d37eac6fafb (commit)
- Log -----------------------------------------------------------------
commit bbad02a5a1c78b56210c6f9cd85261106ff29aef
Author: Marc Delisle <marc(a)infomarc.info>
Date: Fri Mar 26 18:03:06 2010 -0400
fit with new sql.php jQuery
-----------------------------------------------------------------------
Summary of changes:
tbl_replace.php | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/tbl_replace.php b/tbl_replace.php
index 4e3e7ca..ef6973a 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -430,7 +430,8 @@ if (isset($return_to_sql_query)) {
$GLOBALS['js_include'][] = 'tbl_change.js';
$GLOBALS['js_include'][] = 'functions.js';
// in case we call sql.php which needs those:
-$GLOBALS['js_include'][] = 'mootools-more.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
+$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.min.js';
$active_page = $goto_include;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-269-g9785bbc
by Marc Delisle 26 Mar '10
by Marc Delisle 26 Mar '10
26 Mar '10
The branch, master has been updated
via 9785bbc561db3d64cd53a8cf86823d37eac6fafb (commit)
from f6e3ae57c50edb17dad905ca47827e7de1f63b15 (commit)
- Log -----------------------------------------------------------------
commit 9785bbc561db3d64cd53a8cf86823d37eac6fafb
Author: Marc Delisle <marc(a)infomarc.info>
Date: Fri Mar 26 17:44:10 2010 -0400
remove author names
-----------------------------------------------------------------------
Summary of changes:
libraries/List_Database.class.php | 2 +-
libraries/Table.class.php | 14 +++++++-------
libraries/common.lib.php | 6 +++---
libraries/display_tbl.lib.php | 19 +++++++++----------
libraries/display_tbl_links.lib.php | 2 +-
libraries/header.inc.php | 2 +-
libraries/header_printview.inc.php | 4 ++--
libraries/tbl_properties.inc.php | 6 +++---
libraries/tbl_replace_fields.inc.php | 8 ++++----
main.php | 1 -
navigation.php | 2 +-
pdf_pages.php | 2 +-
sql.php | 8 ++++----
tbl_addfield.php | 6 +++---
tbl_alter.php | 2 +-
tbl_change.php | 6 +++---
tbl_create.php | 6 +++---
tbl_row_action.php | 4 ++--
tbl_structure.php | 4 ++--
transformation_wrapper.php | 2 +-
20 files changed, 52 insertions(+), 54 deletions(-)
diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php
index 8997790..34e4cb6 100644
--- a/libraries/List_Database.class.php
+++ b/libraries/List_Database.class.php
@@ -295,7 +295,7 @@ require_once './libraries/List.class.php';
}
foreach ($this->getLimitedItems($offset, $count) as $key => $db) {
- // garvin: Get comments from PMA comments table
+ // Get comments from PMA comments table
$db_tooltip = '';
if (isset($db_tooltips[$db])) {
diff --git a/libraries/Table.class.php b/libraries/Table.class.php
index 25e3709..9e80660 100644
--- a/libraries/Table.class.php
+++ b/libraries/Table.class.php
@@ -720,7 +720,7 @@ class PMA_Table
$GLOBALS['sql_query'] .= "\n" . $drop_query . ';';
- // garvin: If an existing table gets deleted, maintain any
+ // If an existing table gets deleted, maintain any
// entries for the PMA_* tables
$maintain_relations = true;
}
@@ -800,7 +800,7 @@ class PMA_Table
$sql_drop_query .= ' ' . $source;
PMA_DBI_query($sql_drop_query);
- // garvin: Move old entries from PMA-DBs to new table
+ // Move old entries from PMA-DBs to new table
if ($GLOBALS['cfgRelation']['commwork']) {
$remove_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($GLOBALS['cfgRelation']['column_info'])
. ' SET table_name = \'' . PMA_sqlAddslashes($target_table) . '\', '
@@ -811,7 +811,7 @@ class PMA_Table
unset($remove_query);
}
- // garvin: updating bookmarks is not possible since only a single table is moved,
+ // updating bookmarks is not possible since only a single table is moved,
// and not the whole DB.
if ($GLOBALS['cfgRelation']['displaywork']) {
@@ -843,7 +843,7 @@ class PMA_Table
}
/**
- * @todo garvin: Can't get moving PDFs the right way. The page numbers
+ * @todo Can't get moving PDFs the right way. The page numbers
* always get screwed up independently from duplication because the
* numbers do not seem to be stored on a per-database basis. Would
* the author of pdf support please have a look at it?
@@ -890,7 +890,7 @@ class PMA_Table
// end if ($move)
} else {
// we are copying
- // garvin: Create new entries as duplicates from old PMA DBs
+ // Create new entries as duplicates from old PMA DBs
if ($what != 'dataonly' && !isset($maintain_relations)) {
if ($GLOBALS['cfgRelation']['commwork']) {
// Get all comments and MIME-Types for current table
@@ -951,7 +951,7 @@ class PMA_Table
PMA_Table::duplicateInfo('designerwork', 'designer_coords', $get_fields, $where_fields, $new_fields);
/**
- * @todo garvin: Can't get duplicating PDFs the right way. The
+ * @todo Can't get duplicating PDFs the right way. The
* page numbers always get screwed up independently from
* duplication because the numbers do not seem to be stored on a
* per-database basis. Would the author of pdf support please
@@ -1057,7 +1057,7 @@ class PMA_Table
/**
* @todo move into extra function PMA_Relation::renameTable($new_name, $old_name, $new_db, $old_db)
*/
- // garvin: Move old entries from comments to new table
+ // Move old entries from comments to new table
require_once './libraries/relation.lib.php';
$GLOBALS['cfgRelation'] = PMA_getRelationsParam();
if ($GLOBALS['cfgRelation']['commwork']) {
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 16c3dfb..a9333ad 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -596,7 +596,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$error_msg_output .= '<br />' . "\n";
}
// ---
- // modified to show me the help on sql errors (Michael Keck)
+ // modified to show the help on sql errors
$error_msg_output .= ' <p><strong>' . $GLOBALS['strSQLQuery'] . ':</strong>' . "\n";
if (strstr(strtolower($formatted_sql), 'select')) { // please show me help to the error on select
$error_msg_output .= PMA_showMySQLDocu('SQL-Syntax', 'SELECT');
@@ -633,7 +633,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
$error_message = htmlspecialchars($error_message);
$error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message);
}
- // modified to show me the help on error-returns (Michael Keck)
+ // modified to show the help on error-returns
// (now error-messages-server)
$error_msg_output .= '<p>' . "\n"
. ' <strong>' . $GLOBALS['strMySQLSaid'] . '</strong>'
@@ -2150,7 +2150,7 @@ function PMA_pageselector($url, $rows, $pageNow = 1, $nbTotalPage = 1,
$pages[] = $i;
}
- // garvin: Based on the number of results we add the specified
+ // Based on the number of results we add the specified
// $percent percentage to each page number,
// so that we have a representing page number every now and then to
// immediately jump to specific pages.
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index acc08c8..13eb093 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -173,7 +173,7 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total)
// so don't test this number here, it would remove the possibility
// of sorting VIEW results.
if (isset($unlim_num_rows) && $unlim_num_rows < 2 && ! PMA_Table::isView($db, $table)) {
- // garvin: force display of navbar for vertical/horizontal display-choice.
+ // force display of navbar for vertical/horizontal display-choice.
// $do_display['nav_bar'] = (string) '0';
$do_display['sort_lnk'] = (string) '0';
}
@@ -723,8 +723,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$select_expr = $analyzed_sql[0]['select_expr_clause'];
}
- // garvin: See if we have to highlight any header fields of a WHERE query.
- // Uses SQL-Parser results.
+ // See if we have to highlight any header fields of a WHERE query.
+ // Uses SQL-Parser results.
$highlight_columns = array();
if (isset($analyzed_sql) && isset($analyzed_sql[0]) &&
isset($analyzed_sql[0]['where_clause_identifiers'])) {
@@ -738,7 +738,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
}
for ($i = 0; $i < $fields_cnt; $i++) {
- // garvin: See if this column should get highlight because it's used in the
+ // See if this column should get highlight because it's used in the
// where-query.
if (isset($highlight_columns[$fields_meta[$i]->name]) || isset($highlight_columns[PMA_backquote($fields_meta[$i]->name)])) {
$condition_field = true;
@@ -841,8 +841,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
$order_url = 'sql.php' . PMA_generate_common_url($_url_params);
// 2.1.5 Displays the sorting URL
- // added 20004-06-09: Michael Keck <mail(a)michaelkeck.de>
- // enable sort order swapping for image
+ // enable sort order swapping for image
$order_link_params = array();
if (isset($order_img) && $order_img!='') {
if (strstr($order_img, 'asc')) {
@@ -1191,7 +1190,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
for ($i = 0; $i < $fields_cnt; ++$i) {
$meta = $fields_meta[$i];
$pointer = $i;
- // garvin: See if this column should get highlight because it's used in the
+ // See if this column should get highlight because it's used in the
// where-query.
if (isset($highlight_columns) && (isset($highlight_columns[$meta->name]) || isset($highlight_columns[PMA_backquote($meta->name)]))) {
$condition_field = true;
@@ -1212,7 +1211,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
}// end if
- // garvin: Wrap MIME-transformations. [MIME]
+ // Wrap MIME-transformations. [MIME]
$default_function = 'default_function'; // default_function
$transform_function = $default_function;
$transform_options = array();
@@ -1334,7 +1333,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
if (!isset($row[$i]) || is_null($row[$i])) {
$vertical_display['data'][$row_no][$i] = ' <td' . $mouse_events . ' class="' . $class . ($condition_field ? ' condition' : '') . '"><i>NULL</i></td>' . "\n";
} elseif ($row[$i] != '') {
- // garvin: if a transform function for blob is set, none of these replacements will be made
+ // if a transform function for blob is set, none of these replacements will be made
if (PMA_strlen($row[$i]) > $GLOBALS['cfg']['LimitChars'] && $_SESSION['tmp_user_values']['display_text'] == 'P') {
$row[$i] = PMA_substr($row[$i], 0, $GLOBALS['cfg']['LimitChars']) . '...';
}
@@ -1385,7 +1384,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
}
- // garvin: transform functions may enable no-wrapping:
+ // transform functions may enable no-wrapping:
$function_nowrap = $transform_function . '_nowrap';
$bool_nowrap = (($default_function != $transform_function && function_exists($function_nowrap)) ? $function_nowrap($transform_options) : false);
diff --git a/libraries/display_tbl_links.lib.php b/libraries/display_tbl_links.lib.php
index 8d904c0..40a3fd1 100644
--- a/libraries/display_tbl_links.lib.php
+++ b/libraries/display_tbl_links.lib.php
@@ -1,7 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
- * modified 2004-05-08 by Michael Keck <mail_at_michaelkeck_dot_de>
+ *
* - bugfix for select all checkboxes
* - copy right to left (or left to right) if user click on a check box
* - reversed the right modify links: 1. drop, 2. edit, 3. checkbox
diff --git a/libraries/header.inc.php b/libraries/header.inc.php
index 24423a5..18a327b 100644
--- a/libraries/header.inc.php
+++ b/libraries/header.inc.php
@@ -22,7 +22,7 @@ if (empty($GLOBALS['is_header_sent'])) {
require_once './libraries/ob.lib.php';
PMA_outBufferPre();
- // garvin: For re-usability, moved http-headers and stylesheets
+ // For re-usability, moved http-headers and stylesheets
// to a seperate file. It can now be included by header.inc.php,
// querywindow.php.
diff --git a/libraries/header_printview.inc.php b/libraries/header_printview.inc.php
index 6c37db0..962c590 100644
--- a/libraries/header_printview.inc.php
+++ b/libraries/header_printview.inc.php
@@ -21,8 +21,8 @@ PMA_outBufferPre();
PMA_checkParameters(array('db', 'full_sql_query'));
-// garvin: For re-usability, moved http-headers
-// to a seperate file. It can now be included by libraries/header.inc.php,
+// For re-usability, moved http-headers
+// to a separate file. It can now be included by libraries/header.inc.php,
// querywindow.php.
require_once './libraries/header_http.inc.php';
diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php
index 30d4717..3688f2f 100644
--- a/libraries/tbl_properties.inc.php
+++ b/libraries/tbl_properties.inc.php
@@ -146,9 +146,9 @@ if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
. PMA_showHint($strMIME_transformation_options_note . $hint);
}
-// garvin: workaround for field_fulltext, because its submitted indizes contain
-// the index as a value, not a key. Inserted here for easier maintaineance
-// and less code to change in existing files.
+// workaround for field_fulltext, because its submitted indizes contain
+// the index as a value, not a key. Inserted here for easier maintaineance
+// and less code to change in existing files.
if (isset($field_fulltext) && is_array($field_fulltext)) {
foreach ($field_fulltext as $fulltext_nr => $fulltext_indexkey) {
$submit_fulltext[$fulltext_indexkey] = $fulltext_indexkey;
diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php
index bd34ae2..2d5b8e7 100644
--- a/libraries/tbl_replace_fields.inc.php
+++ b/libraries/tbl_replace_fields.inc.php
@@ -3,16 +3,16 @@
/**
* handle field values (possibly uploaded from a file)
*
- * garvin: original if-clause checked, whether input was stored in a possible
+ * original if-clause checked, whether input was stored in a possible
* fields_upload_XX var. Now check, if the field is set. If it is empty or a
* malicious file, do not alter fields contents. If an empty or invalid file is
* specified, the binary data gets deleter. Maybe a nice new text-variable is
* appropriate to document this behaviour.
*
- * garvin: security cautions! You could trick the form and submit any file the
+ * security cautions! You could trick the form and submit any file the
* webserver has access to for upload to a binary field. Shouldn't be that easy! ;)
*
- * garvin: default is to advance to the field-value parsing. Will only be set to
+ * default is to advance to the field-value parsing. Will only be set to
* true when a binary file is uploaded, thus bypassing further manipulation of $val.
*
* note: grab_globals has extracted the fields from _FILES or HTTP_POST_FILES
@@ -93,7 +93,7 @@ if (false !== $possibly_uploaded_val) {
// fields array, so we do not change the field value
// but we can still handle field upload
- // garvin: when in UPDATE mode, do not alter field's contents. When in INSERT
+ // when in UPDATE mode, do not alter field's contents. When in INSERT
// mode, insert empty field because no values were submitted. If protected
// blobs where set, insert original fields content.
if (! empty($prot_row[$me_fields_name[$key]])) {
diff --git a/main.php b/main.php
index 36a8125..8c65bc5 100644
--- a/main.php
+++ b/main.php
@@ -147,7 +147,6 @@ if (empty($cfg['Lang'])) {
echo '</li>';
}
-// added by Michael Keck <mail_at_michaelkeck_dot_de>
// ThemeManager if available
if ($GLOBALS['cfg']['ThemeManager']) {
diff --git a/navigation.php b/navigation.php
index 864456e..cb031ed 100644
--- a/navigation.php
+++ b/navigation.php
@@ -124,7 +124,7 @@ require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
/**
- * garvin: For re-usability, moved http-headers to a seperate file.
+ * For re-usability, moved http-headers to a seperate file.
* It can now be included by libraries/header.inc.php, querywindow.php.
*/
require_once './libraries/header_http.inc.php';
diff --git a/pdf_pages.php b/pdf_pages.php
index aff7385..b7f93c5 100644
--- a/pdf_pages.php
+++ b/pdf_pages.php
@@ -332,7 +332,7 @@ while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
$array_sh_page[] = $temp_sh_page;
}
-// garvin: Display WYSIWYG-PDF parts?
+// Display WYSIWYG-PDF parts?
if ($cfg['WYSIWYG-PDF']) {
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
$with_field_names = TRUE;
diff --git a/sql.php b/sql.php
index 4da90d1..864034c 100644
--- a/sql.php
+++ b/sql.php
@@ -302,7 +302,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
session_write_close();
}
- // garvin: Measure query time.
+ // Measure query time.
// TODO-Item http://sourceforge.net/tracker/index.php?func=detail&aid=571934&group_id=23…
$querytime_before = array_sum(explode(' ', microtime()));
@@ -458,7 +458,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
$unlim_num_rows = 0;
} // end rows total count
- // garvin: if a table or database gets dropped, check column comments.
+ // if a table or database gets dropped, check column comments.
if (isset($purge) && $purge == '1') {
/**
* Cleanup relations.
@@ -470,11 +470,11 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
} elseif (strlen($db)) {
PMA_relationsCleanupDatabase($db);
} else {
- // garvin: VOID. No DB/Table gets deleted.
+ // VOID. No DB/Table gets deleted.
} // end if relation-stuff
} // end if ($purge)
- // garvin: If a column gets dropped, do relation magic.
+ // If a column gets dropped, do relation magic.
if (isset($cpurge) && $cpurge == '1' && isset($purgekey)
&& strlen($db) && strlen($table) && !empty($purgekey)) {
require_once './libraries/relation_cleanup.lib.php';
diff --git a/tbl_addfield.php b/tbl_addfield.php
index cfa25f5..c5d6ce9 100644
--- a/tbl_addfield.php
+++ b/tbl_addfield.php
@@ -166,11 +166,11 @@ if (isset($_REQUEST['do_save_data'])) {
$result = PMA_DBI_try_query($sql_query);
if ($result === true) {
- // garvin: If comments were sent, enable relation stuff
+ // If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
- // garvin: Update comment table for mime types [MIME]
+ // Update comment table for mime types [MIME]
if (isset($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& $cfg['BrowseMIME']) {
@@ -193,7 +193,7 @@ if (isset($_REQUEST['do_save_data'])) {
require './tbl_structure.php';
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
diff --git a/tbl_alter.php b/tbl_alter.php
index a399073..bd82396 100644
--- a/tbl_alter.php
+++ b/tbl_alter.php
@@ -139,7 +139,7 @@ if (isset($_REQUEST['do_save_data'])) {
require './tbl_structure.php';
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
if (isset($_REQUEST['orig_field'])) {
diff --git a/tbl_change.php b/tbl_change.php
index 0c89a17..263e4ab 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -507,7 +507,7 @@ foreach ($rows as $row_id => $vrow) {
<?php
$selected = '';
- // garvin: Find the current type in the RestrictColumnTypes. Will result in 'FUNC_CHAR'
+ // Find the current type in the RestrictColumnTypes. Will result in 'FUNC_CHAR'
// or something similar. Then directly look up the entry in the RestrictFunctions array,
// which will then reveal the available dropdown options
if (isset($cfg['RestrictColumnTypes'][strtoupper($field['True_Type'])])
@@ -550,7 +550,7 @@ foreach ($rows as $row_id => $vrow) {
$default_function = 'UNHEX';
}
- // garvin: loop on the dropdown array and print all available options for that field.
+ // loop on the dropdown array and print all available options for that field.
foreach ($dropdown as $each_dropdown){
echo '<option';
if ($default_function === $each_dropdown) {
@@ -561,7 +561,7 @@ foreach ($rows as $row_id => $vrow) {
$op_spacing_needed = TRUE;
}
- // garvin: For compatibility's sake, do not let out all other functions. Instead
+ // For compatibility's sake, do not let out all other functions. Instead
// print a separator (blank) and then show ALL functions which weren't shown
// yet.
$cnt_functions = count($cfg['Functions']);
diff --git a/tbl_create.php b/tbl_create.php
index 5fcecb7..b83955a 100644
--- a/tbl_create.php
+++ b/tbl_create.php
@@ -228,11 +228,11 @@ if (isset($_REQUEST['do_save_data'])) {
if ($result) {
- // garvin: If comments were sent, enable relation stuff
+ // If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
- // garvin: Update comment table for mime types [MIME]
+ // Update comment table for mime types [MIME]
if (isset($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& $cfg['BrowseMIME']) {
@@ -266,7 +266,7 @@ if (isset($_REQUEST['do_save_data'])) {
exit;
} else {
PMA_mysqlDie('', '', '', $err_url, false);
- // garvin: An error happened while inserting/updating a table definition.
+ // An error happened while inserting/updating a table definition.
// to prevent total loss of that data, we embed the form once again.
// The variable $regenerate will be used to restore data in libraries/tbl_properties.inc.php
$num_fields = $_REQUEST['orig_num_fields'];
diff --git a/tbl_row_action.php b/tbl_row_action.php
index efcc74d..5cc5033 100644
--- a/tbl_row_action.php
+++ b/tbl_row_action.php
@@ -79,7 +79,7 @@ require_once './libraries/header.inc.php';
if (!empty($submit_mult)) {
switch($submit_mult) {
case 'row_edit':
- // garvin: As we got the fields to be edited from the
+ // As we got the fields to be edited from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
@@ -96,7 +96,7 @@ if (!empty($submit_mult)) {
// Needed to allow SQL export
$single_table = TRUE;
- // garvin: As we got the fields to be edited from the
+ // As we got the fields to be edited from the
// 'rows_to_delete' checkbox, we use the index of it as the
// indicating WHERE clause. Then we build the array which is used
// for the tbl_change.php script.
diff --git a/tbl_structure.php b/tbl_structure.php
index 01c12a5..0f3aae2 100644
--- a/tbl_structure.php
+++ b/tbl_structure.php
@@ -282,7 +282,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$field_charset = '';
}
- // garvin: Display basic mimetype [MIME]
+ // Display basic mimetype [MIME]
if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
$type_mime = '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
} else {
@@ -326,7 +326,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$field_name = htmlspecialchars($row['Field']);
$displayed_field_name = $field_name;
- // garvin: underline commented fields and display a hover-title (CSS only)
+ // underline commented fields and display a hover-title (CSS only)
$comment_style = '';
if (isset($comments_map[$row['Field']])) {
diff --git a/transformation_wrapper.php b/transformation_wrapper.php
index 011effe..a231d49 100644
--- a/transformation_wrapper.php
+++ b/transformation_wrapper.php
@@ -56,7 +56,7 @@ if ($cfgRelation['commwork'] && $cfgRelation['mimework']) {
}
}
-// garvin: For re-usability, moved http-headers and stylesheets
+// For re-usability, moved http-headers and stylesheets
// to a seperate file. It can now be included by libraries/header.inc.php,
// querywindow.php.
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-268-gf6e3ae5
by Marc Delisle 26 Mar '10
by Marc Delisle 26 Mar '10
26 Mar '10
The branch, master has been updated
via f6e3ae57c50edb17dad905ca47827e7de1f63b15 (commit)
via 291f2a1d1d97299b3b47dc2b9871e3646ae7d3f8 (commit)
from b994ec6934cef1b02d944969b05ace1f991dbaa7 (commit)
- Log -----------------------------------------------------------------
commit f6e3ae57c50edb17dad905ca47827e7de1f63b15
Merge: b994ec6934cef1b02d944969b05ace1f991dbaa7 291f2a1d1d97299b3b47dc2b9871e3646ae7d3f8
Author: Marc Delisle <marc(a)infomarc.info>
Date: Fri Mar 26 13:02:45 2010 -0400
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 ++
libraries/common.lib.php | 5 +++++
libraries/tbl_links.inc.php | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69a860d..51febbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2967565 [insert] UNHEX not selected by default when inserting BINARY
- [navi] Changed link to git repository on main page
- bug #2972232 [menu] Import menu tab not present on main page
+- patch #2976790 [menu] Go to the upper level after table DROP,
+ thanks to Kaarel Nummert - kaarelnu
3.3.1.0 (2010-03-16)
- bug #2941037 [core] Database structure not sorted by table correctly
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index d00b615..16c3dfb 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1588,6 +1588,11 @@ function PMA_generate_html_tab($tab, $url_params = array())
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
}
+ // If there are any tab specific URL parameters, merge those with the general URL parameters
+ if(! empty($tab['url_params']) && is_array($tab['url_params'])) {
+ $url_params = array_merge($url_params, $tab['url_params']);
+ }
+
// build the link
if (!empty($tab['link'])) {
$tab['link'] = htmlentities($tab['link']);
diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php
index 13dbaf8..4f7b631 100644
--- a/libraries/tbl_links.inc.php
+++ b/libraries/tbl_links.inc.php
@@ -123,6 +123,7 @@ if ($tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_sc
if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
$tabs['drop']['icon'] = 'b_deltbl.png';
$tabs['drop']['link'] = 'sql.php';
+ $tabs['drop']['url_params'] = array('table' => NULL);
$tabs['drop']['text'] = $strDrop;
$tabs['drop']['args']['reload'] = 1;
$tabs['drop']['args']['purge'] = 1;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, QA_3_3, updated. RELEASE_3_3_1RC1-75-g291f2a1
by Marc Delisle 26 Mar '10
by Marc Delisle 26 Mar '10
26 Mar '10
The branch, QA_3_3 has been updated
via 291f2a1d1d97299b3b47dc2b9871e3646ae7d3f8 (commit)
from 459fe9e905be784bcb0d3ce8ad54486c906be938 (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 2 ++
libraries/common.lib.php | 5 +++++
libraries/tbl_links.inc.php | 1 +
3 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5140d2e..807fe76 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2967565 [insert] UNHEX not selected by default when inserting BINARY
- [navi] Changed link to git repository on main page
- bug #2972232 [menu] Import menu tab not present on main page
+- patch #2976790 [menu] Go to the upper level after table DROP,
+ thanks to Kaarel Nummert - kaarelnu
3.3.1.0 (2010-03-16)
- bug #2941037 [core] Database structure not sorted by table correctly
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 522a224..d9ff7c5 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -1591,6 +1591,11 @@ function PMA_generate_html_tab($tab, $url_params = array())
$tab['attr'] .= ' title="' . htmlspecialchars($tab['warning']) . '"';
}
+ // If there are any tab specific URL parameters, merge those with the general URL parameters
+ if(! empty($tab['url_params']) && is_array($tab['url_params'])) {
+ $url_params = array_merge($url_params, $tab['url_params']);
+ }
+
// build the link
if (!empty($tab['link'])) {
$tab['link'] = htmlentities($tab['link']);
diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php
index b6c9121..4731501 100644
--- a/libraries/tbl_links.inc.php
+++ b/libraries/tbl_links.inc.php
@@ -114,6 +114,7 @@ if (! $tbl_is_view && ! (isset($db_is_information_schema) && $db_is_information_
if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
$tabs['drop']['icon'] = 'b_deltbl.png';
$tabs['drop']['link'] = 'sql.php';
+ $tabs['drop']['url_params'] = array('table' => NULL);
$tabs['drop']['text'] = $strDrop;
$tabs['drop']['args']['reload'] = 1;
$tabs['drop']['args']['purge'] = 1;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, gettext, updated. RELEASE_3_3_1RC1-843-gd2a521f
by Michal Čihař 26 Mar '10
by Michal Čihař 26 Mar '10
26 Mar '10
The branch, gettext has been updated
via d2a521f369de842a3130bfeafd3816a6d24614fa (commit)
via b994ec6934cef1b02d944969b05ace1f991dbaa7 (commit)
via 783892518ce82c32374a6a643396244eff4c0ad3 (commit)
via 719d6dd9f0c634fe49c121b4775f77a6953a954b (commit)
from 9608b0805e0c928904069277c3b7958d4c50c8d8 (commit)
- Log -----------------------------------------------------------------
commit d2a521f369de842a3130bfeafd3816a6d24614fa
Merge: 9608b0805e0c928904069277c3b7958d4c50c8d8 b994ec6934cef1b02d944969b05ace1f991dbaa7
Author: Michal Čihař <michal(a)cihar.com>
Date: Fri Mar 26 08:28:21 2010 +0100
Merge branch 'master' into gettext
-----------------------------------------------------------------------
Summary of changes:
js/colorpicker/css/colorpicker.css | 161 ++++++
js/colorpicker/css/layout.css | 218 +++++++++
js/colorpicker/images/blank.gif | Bin 0 -> 49 bytes
js/colorpicker/images/colorpicker_background.png | Bin 0 -> 1897 bytes
js/colorpicker/images/colorpicker_hex.png | Bin 0 -> 532 bytes
js/colorpicker/images/colorpicker_hsb_b.png | Bin 0 -> 970 bytes
js/colorpicker/images/colorpicker_hsb_h.png | Bin 0 -> 1012 bytes
js/colorpicker/images/colorpicker_hsb_s.png | Bin 0 -> 1171 bytes
js/colorpicker/images/colorpicker_indic.gif | Bin 0 -> 86 bytes
js/colorpicker/images/colorpicker_overlay.png | Bin 0 -> 10355 bytes
js/colorpicker/images/colorpicker_rgb_b.png | Bin 0 -> 970 bytes
js/colorpicker/images/colorpicker_rgb_g.png | Bin 0 -> 1069 bytes
js/colorpicker/images/colorpicker_rgb_r.png | Bin 0 -> 1066 bytes
js/colorpicker/images/colorpicker_select.gif | Bin 0 -> 78 bytes
js/colorpicker/images/colorpicker_submit.png | Bin 0 -> 984 bytes
js/colorpicker/images/custom_background.png | Bin 0 -> 1916 bytes
js/colorpicker/images/custom_hex.png | Bin 0 -> 562 bytes
js/colorpicker/images/custom_hsb_b.png | Bin 0 -> 1097 bytes
js/colorpicker/images/custom_hsb_h.png | Bin 0 -> 970 bytes
js/colorpicker/images/custom_hsb_s.png | Bin 0 -> 1168 bytes
js/colorpicker/images/custom_indic.gif | Bin 0 -> 86 bytes
js/colorpicker/images/custom_rgb_b.png | Bin 0 -> 1008 bytes
js/colorpicker/images/custom_rgb_g.png | Bin 0 -> 1069 bytes
js/colorpicker/images/custom_rgb_r.png | Bin 0 -> 1018 bytes
js/colorpicker/images/custom_submit.png | Bin 0 -> 997 bytes
js/colorpicker/images/select.png | Bin 0 -> 506 bytes
js/colorpicker/images/select2.png | Bin 0 -> 518 bytes
js/colorpicker/images/slider.png | Bin 0 -> 315 bytes
js/colorpicker/js/colorpicker.js | 484 +++++++++++++++++++
js/mooRainbow/images/blank.gif | Bin 43 -> 0 bytes
js/mooRainbow/images/moor_arrows.gif | Bin 94 -> 0 bytes
js/mooRainbow/images/moor_boverlay.png | Bin 799 -> 0 bytes
js/mooRainbow/images/moor_cursor.gif | Bin 80 -> 0 bytes
js/mooRainbow/images/moor_slider.png | Bin 590 -> 0 bytes
js/mooRainbow/images/moor_woverlay.png | Bin 768 -> 0 bytes
js/mooRainbow/images/rainbow.png | Bin 794 -> 0 bytes
js/mooRainbow/mooRainbow.css | 114 -----
js/mooRainbow/mooRainbow.js | 563 ----------------------
js/mootools-domready-rainbow.js | 16 -
libraries/common.inc.php | 2 -
libraries/header_meta_style.inc.php | 11 +-
main.php | 39 ++-
42 files changed, 901 insertions(+), 707 deletions(-)
create mode 100644 js/colorpicker/css/colorpicker.css
create mode 100644 js/colorpicker/css/layout.css
create mode 100644 js/colorpicker/images/blank.gif
create mode 100644 js/colorpicker/images/colorpicker_background.png
create mode 100644 js/colorpicker/images/colorpicker_hex.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_b.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_h.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_s.png
create mode 100644 js/colorpicker/images/colorpicker_indic.gif
create mode 100644 js/colorpicker/images/colorpicker_overlay.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_b.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_g.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_r.png
create mode 100644 js/colorpicker/images/colorpicker_select.gif
create mode 100644 js/colorpicker/images/colorpicker_submit.png
create mode 100644 js/colorpicker/images/custom_background.png
create mode 100644 js/colorpicker/images/custom_hex.png
create mode 100644 js/colorpicker/images/custom_hsb_b.png
create mode 100644 js/colorpicker/images/custom_hsb_h.png
create mode 100644 js/colorpicker/images/custom_hsb_s.png
create mode 100644 js/colorpicker/images/custom_indic.gif
create mode 100644 js/colorpicker/images/custom_rgb_b.png
create mode 100644 js/colorpicker/images/custom_rgb_g.png
create mode 100644 js/colorpicker/images/custom_rgb_r.png
create mode 100644 js/colorpicker/images/custom_submit.png
create mode 100644 js/colorpicker/images/select.png
create mode 100644 js/colorpicker/images/select2.png
create mode 100644 js/colorpicker/images/slider.png
create mode 100644 js/colorpicker/js/colorpicker.js
delete mode 100644 js/mooRainbow/images/blank.gif
delete mode 100644 js/mooRainbow/images/moor_arrows.gif
delete mode 100644 js/mooRainbow/images/moor_boverlay.png
delete mode 100644 js/mooRainbow/images/moor_cursor.gif
delete mode 100644 js/mooRainbow/images/moor_slider.png
delete mode 100644 js/mooRainbow/images/moor_woverlay.png
delete mode 100644 js/mooRainbow/images/rainbow.png
delete mode 100644 js/mooRainbow/mooRainbow.css
delete mode 100644 js/mooRainbow/mooRainbow.js
delete mode 100644 js/mootools-domready-rainbow.js
diff --git a/js/colorpicker/css/colorpicker.css b/js/colorpicker/css/colorpicker.css
new file mode 100644
index 0000000..05b02b4
--- /dev/null
+++ b/js/colorpicker/css/colorpicker.css
@@ -0,0 +1,161 @@
+.colorpicker {
+ width: 356px;
+ height: 176px;
+ overflow: hidden;
+ position: absolute;
+ background: url(../images/colorpicker_background.png);
+ font-family: Arial, Helvetica, sans-serif;
+ display: none;
+}
+.colorpicker_color {
+ width: 150px;
+ height: 150px;
+ left: 14px;
+ top: 13px;
+ position: absolute;
+ background: #f00;
+ overflow: hidden;
+ cursor: crosshair;
+}
+.colorpicker_color div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 150px;
+ height: 150px;
+ background: url(../images/colorpicker_overlay.png);
+}
+.colorpicker_color div div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 11px;
+ height: 11px;
+ overflow: hidden;
+ background: url(../images/colorpicker_select.gif);
+ margin: -5px 0 0 -5px;
+}
+.colorpicker_hue {
+ position: absolute;
+ top: 13px;
+ left: 171px;
+ width: 35px;
+ height: 150px;
+ cursor: n-resize;
+}
+.colorpicker_hue div {
+ position: absolute;
+ width: 35px;
+ height: 9px;
+ overflow: hidden;
+ background: url(../images/colorpicker_indic.gif) left top;
+ margin: -4px 0 0 0;
+ left: 0px;
+}
+.colorpicker_new_color {
+ position: absolute;
+ width: 60px;
+ height: 30px;
+ left: 213px;
+ top: 13px;
+ background: #f00;
+}
+.colorpicker_current_color {
+ position: absolute;
+ width: 60px;
+ height: 30px;
+ left: 283px;
+ top: 13px;
+ background: #f00;
+}
+.colorpicker input {
+ background-color: transparent;
+ border: 1px solid transparent;
+ position: absolute;
+ font-size: 10px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #898989;
+ top: 4px;
+ right: 11px;
+ text-align: right;
+ margin: 0;
+ padding: 0;
+ height: 11px;
+}
+.colorpicker_hex {
+ position: absolute;
+ width: 72px;
+ height: 22px;
+ background: url(../images/colorpicker_hex.png) top;
+ left: 212px;
+ top: 142px;
+}
+.colorpicker_hex input {
+ right: 6px;
+}
+.colorpicker_field {
+ height: 22px;
+ width: 62px;
+ background-position: top;
+ position: absolute;
+}
+.colorpicker_field span {
+ position: absolute;
+ width: 12px;
+ height: 22px;
+ overflow: hidden;
+ top: 0;
+ right: 0;
+ cursor: n-resize;
+}
+.colorpicker_rgb_r {
+ background-image: url(../images/colorpicker_rgb_r.png);
+ top: 52px;
+ left: 212px;
+}
+.colorpicker_rgb_g {
+ background-image: url(../images/colorpicker_rgb_g.png);
+ top: 82px;
+ left: 212px;
+}
+.colorpicker_rgb_b {
+ background-image: url(../images/colorpicker_rgb_b.png);
+ top: 112px;
+ left: 212px;
+}
+.colorpicker_hsb_h {
+ background-image: url(../images/colorpicker_hsb_h.png);
+ top: 52px;
+ left: 282px;
+}
+.colorpicker_hsb_s {
+ background-image: url(../images/colorpicker_hsb_s.png);
+ top: 82px;
+ left: 282px;
+}
+.colorpicker_hsb_b {
+ background-image: url(../images/colorpicker_hsb_b.png);
+ top: 112px;
+ left: 282px;
+}
+.colorpicker_submit {
+ position: absolute;
+ width: 22px;
+ height: 22px;
+ background: url(../images/colorpicker_submit.png) top;
+ left: 322px;
+ top: 142px;
+ overflow: hidden;
+}
+.colorpicker_focus {
+ background-position: center;
+}
+.colorpicker_hex.colorpicker_focus {
+ background-position: bottom;
+}
+.colorpicker_submit.colorpicker_focus {
+ background-position: bottom;
+}
+.colorpicker_slider {
+ background-position: bottom;
+}
diff --git a/js/colorpicker/css/layout.css b/js/colorpicker/css/layout.css
new file mode 100644
index 0000000..396e671
--- /dev/null
+++ b/js/colorpicker/css/layout.css
@@ -0,0 +1,218 @@
+/*body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
+ margin:0;
+ padding:0;
+}
+table {
+ border-collapse:collapse;
+ border-spacing:0;
+}
+fieldset,img {
+ border:0;
+}
+address,caption,cite,code,dfn,em,strong,th,var {
+ font-style:normal;
+ font-weight:normal;
+}
+ol,ul {
+ list-style:none;
+}
+caption,th {
+ text-align:left;
+}
+h1,h2,h3,h4,h5,h6 {
+ font-size:100%;
+ font-weight:normal;
+}
+q:before,q:after {
+ content:'';
+}
+abbr,acronym { border:0;
+}
+html, body {
+ background-color: #fff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ line-height: 18px;
+ color: #52697E;
+}
+body {
+ text-align: center;
+ overflow: auto;
+}
+.wrapper {
+ width: 700px;
+ margin: 0 auto;
+ text-align: left;
+}
+h1 {
+ font-size: 21px;
+ height: 47px;
+ line-height: 47px;
+ text-transform: uppercase;
+}
+.navigationTabs {
+ height: 23px;
+ line-height: 23px;
+ border-bottom: 1px solid #ccc;
+}
+.navigationTabs li {
+ float: left;
+ height: 23px;
+ line-height: 23px;
+ padding-right: 3px;
+}
+.navigationTabs li a{
+ float: left;
+ dispaly: block;
+ height: 23px;
+ line-height: 23px;
+ padding: 0 10px;
+ overflow: hidden;
+ color: #52697E;
+ background-color: #eee;
+ position: relative;
+ text-decoration: none;
+}
+.navigationTabs li a:hover {
+ background-color: #f0f0f0;
+}
+.navigationTabs li a.active {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ border-bottom: 0px solid;
+}
+.tabsContent {
+ border: 1px solid #ccc;
+ border-top: 0px solid;
+ width: 698px;
+ overflow: hidden;
+}
+.tab {
+ padding: 16px;
+ display: none;
+}
+.tab h2 {
+ font-weight: bold;
+ font-size: 16px;
+}
+.tab h3 {
+ font-weight: bold;
+ font-size: 14px;
+ margin-top: 20px;
+}
+.tab p {
+ margin-top: 16px;
+ clear: both;
+}
+.tab ul {
+ margin-top: 16px;
+ list-style: disc;
+}
+.tab li {
+ margin: 10px 0 0 35px;
+}
+.tab a {
+ color: #8FB0CF;
+}
+.tab strong {
+ font-weight: bold;
+}
+.tab pre {
+ font-size: 11px;
+ margin-top: 20px;
+ width: 668px;
+ overflow: auto;
+ clear: both;
+}
+.tab table {
+ width: 100%;
+}
+.tab table td {
+ padding: 6px 10px 6px 0;
+ vertical-align: top;
+}
+.tab dt {
+ margin-top: 16px;
+}
+*/
+#colorSelector {
+ position: relative;
+ width: 36px;
+ height: 36px;
+ background: url(../images/select.png);
+}
+#colorSelector div {
+ position: absolute;
+ top: 3px;
+ left: 3px;
+ width: 30px;
+ height: 30px;
+ background: url(../images/select.png) center;
+}
+#colorSelector2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 36px;
+ height: 36px;
+ background: url(../images/select2.png);
+}
+#colorSelector2 div {
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ width: 28px;
+ height: 28px;
+ background: url(../images/select2.png) center;
+}
+#colorpickerHolder2 {
+ top: 32px;
+ left: 0;
+ width: 356px;
+ height: 0;
+ overflow: hidden;
+ position: absolute;
+}
+#colorpickerHolder2 .colorpicker {
+ background-image: url(../images/custom_background.png);
+ position: absolute;
+ bottom: 0;
+ left: 0;
+}
+#colorpickerHolder2 .colorpicker_hue div {
+ background-image: url(../images/custom_indic.gif);
+}
+#colorpickerHolder2 .colorpicker_hex {
+ background-image: url(../images/custom_hex.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_r {
+ background-image: url(../images/custom_rgb_r.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_g {
+ background-image: url(../images/custom_rgb_g.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_b {
+ background-image: url(../images/custom_rgb_b.png);
+}
+#colorpickerHolder2 .colorpicker_hsb_s {
+ background-image: url(../images/custom_hsb_s.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_hsb_h {
+ background-image: url(../images/custom_hsb_h.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_hsb_b {
+ background-image: url(../images/custom_hsb_b.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_submit {
+ background-image: url(../images/custom_submit.png);
+}
+#colorpickerHolder2 .colorpicker input {
+ color: #778398;
+}
+#customWidget {
+ position: relative;
+ height: 36px;
+}
diff --git a/js/colorpicker/images/blank.gif b/js/colorpicker/images/blank.gif
new file mode 100644
index 0000000..75b945d
Binary files /dev/null and b/js/colorpicker/images/blank.gif differ
diff --git a/js/colorpicker/images/colorpicker_background.png b/js/colorpicker/images/colorpicker_background.png
new file mode 100644
index 0000000..8401572
Binary files /dev/null and b/js/colorpicker/images/colorpicker_background.png differ
diff --git a/js/colorpicker/images/colorpicker_hex.png b/js/colorpicker/images/colorpicker_hex.png
new file mode 100644
index 0000000..4e532d7
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hex.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_b.png b/js/colorpicker/images/colorpicker_hsb_b.png
new file mode 100644
index 0000000..dfac595
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_b.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_h.png b/js/colorpicker/images/colorpicker_hsb_h.png
new file mode 100644
index 0000000..3977ed9
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_h.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_s.png b/js/colorpicker/images/colorpicker_hsb_s.png
new file mode 100644
index 0000000..a2a6997
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_s.png differ
diff --git a/js/colorpicker/images/colorpicker_indic.gif b/js/colorpicker/images/colorpicker_indic.gif
new file mode 100644
index 0000000..f9fa95e
Binary files /dev/null and b/js/colorpicker/images/colorpicker_indic.gif differ
diff --git a/js/colorpicker/images/colorpicker_overlay.png b/js/colorpicker/images/colorpicker_overlay.png
new file mode 100644
index 0000000..561cdd9
Binary files /dev/null and b/js/colorpicker/images/colorpicker_overlay.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_b.png b/js/colorpicker/images/colorpicker_rgb_b.png
new file mode 100644
index 0000000..dfac595
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_b.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_g.png b/js/colorpicker/images/colorpicker_rgb_g.png
new file mode 100644
index 0000000..72b3276
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_g.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_r.png b/js/colorpicker/images/colorpicker_rgb_r.png
new file mode 100644
index 0000000..4855fe0
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_r.png differ
diff --git a/js/colorpicker/images/colorpicker_select.gif b/js/colorpicker/images/colorpicker_select.gif
new file mode 100644
index 0000000..599f7f1
Binary files /dev/null and b/js/colorpicker/images/colorpicker_select.gif differ
diff --git a/js/colorpicker/images/colorpicker_submit.png b/js/colorpicker/images/colorpicker_submit.png
new file mode 100644
index 0000000..7f4c082
Binary files /dev/null and b/js/colorpicker/images/colorpicker_submit.png differ
diff --git a/js/colorpicker/images/custom_background.png b/js/colorpicker/images/custom_background.png
new file mode 100644
index 0000000..cf55ffd
Binary files /dev/null and b/js/colorpicker/images/custom_background.png differ
diff --git a/js/colorpicker/images/custom_hex.png b/js/colorpicker/images/custom_hex.png
new file mode 100644
index 0000000..888f444
Binary files /dev/null and b/js/colorpicker/images/custom_hex.png differ
diff --git a/js/colorpicker/images/custom_hsb_b.png b/js/colorpicker/images/custom_hsb_b.png
new file mode 100644
index 0000000..2f99dae
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_b.png differ
diff --git a/js/colorpicker/images/custom_hsb_h.png b/js/colorpicker/images/custom_hsb_h.png
new file mode 100644
index 0000000..a217e92
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_h.png differ
diff --git a/js/colorpicker/images/custom_hsb_s.png b/js/colorpicker/images/custom_hsb_s.png
new file mode 100644
index 0000000..7826b41
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_s.png differ
diff --git a/js/colorpicker/images/custom_indic.gif b/js/colorpicker/images/custom_indic.gif
new file mode 100644
index 0000000..222fb94
Binary files /dev/null and b/js/colorpicker/images/custom_indic.gif differ
diff --git a/js/colorpicker/images/custom_rgb_b.png b/js/colorpicker/images/custom_rgb_b.png
new file mode 100644
index 0000000..80764e5
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_b.png differ
diff --git a/js/colorpicker/images/custom_rgb_g.png b/js/colorpicker/images/custom_rgb_g.png
new file mode 100644
index 0000000..fc9778b
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_g.png differ
diff --git a/js/colorpicker/images/custom_rgb_r.png b/js/colorpicker/images/custom_rgb_r.png
new file mode 100644
index 0000000..91b0cd4
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_r.png differ
diff --git a/js/colorpicker/images/custom_submit.png b/js/colorpicker/images/custom_submit.png
new file mode 100644
index 0000000..cd202cd
Binary files /dev/null and b/js/colorpicker/images/custom_submit.png differ
diff --git a/js/colorpicker/images/select.png b/js/colorpicker/images/select.png
new file mode 100644
index 0000000..21213bf
Binary files /dev/null and b/js/colorpicker/images/select.png differ
diff --git a/js/colorpicker/images/select2.png b/js/colorpicker/images/select2.png
new file mode 100644
index 0000000..2cd2cab
Binary files /dev/null and b/js/colorpicker/images/select2.png differ
diff --git a/js/colorpicker/images/slider.png b/js/colorpicker/images/slider.png
new file mode 100644
index 0000000..8b03da9
Binary files /dev/null and b/js/colorpicker/images/slider.png differ
diff --git a/js/colorpicker/js/colorpicker.js b/js/colorpicker/js/colorpicker.js
new file mode 100644
index 0000000..10a2b22
--- /dev/null
+++ b/js/colorpicker/js/colorpicker.js
@@ -0,0 +1,484 @@
+/**
+ *
+ * Color picker
+ * Author: Stefan Petre www.eyecon.ro
+ *
+ * Dual licensed under the MIT and GPL licenses
+ *
+ */
+(function ($) {
+ var ColorPicker = function () {
+ var
+ ids = {},
+ inAction,
+ charMin = 65,
+ visible,
+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
+ defaults = {
+ eventName: 'click',
+ onShow: function () {},
+ onBeforeShow: function(){},
+ onHide: function () {},
+ onChange: function () {},
+ onSubmit: function () {},
+ color: 'ff0000',
+ livePreview: true,
+ flat: false
+ },
+ fillRGBFields = function (hsb, cal) {
+ var rgb = HSBToRGB(hsb);
+ $(cal).data('colorpicker').fields
+ .eq(1).val(rgb.r).end()
+ .eq(2).val(rgb.g).end()
+ .eq(3).val(rgb.b).end();
+ },
+ fillHSBFields = function (hsb, cal) {
+ $(cal).data('colorpicker').fields
+ .eq(4).val(hsb.h).end()
+ .eq(5).val(hsb.s).end()
+ .eq(6).val(hsb.b).end();
+ },
+ fillHexFields = function (hsb, cal) {
+ $(cal).data('colorpicker').fields
+ .eq(0).val(HSBToHex(hsb)).end();
+ },
+ setSelector = function (hsb, cal) {
+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
+ $(cal).data('colorpicker').selectorIndic.css({
+ left: parseInt(150 * hsb.s/100, 10),
+ top: parseInt(150 * (100-hsb.b)/100, 10)
+ });
+ },
+ setHue = function (hsb, cal) {
+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
+ },
+ setCurrentColor = function (hsb, cal) {
+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
+ },
+ setNewColor = function (hsb, cal) {
+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
+ },
+ keyDown = function (ev) {
+ var pressedKey = ev.charCode || ev.keyCode || -1;
+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
+ return false;
+ }
+ var cal = $(this).parent().parent();
+ if (cal.data('colorpicker').livePreview === true) {
+ change.apply(this);
+ }
+ },
+ change = function (ev) {
+ var cal = $(this).parent().parent(), col;
+ if (this.parentNode.className.indexOf('_hex') > 0) {
+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
+ } else if (this.parentNode.className.indexOf('_hsb') > 0) {
+ cal.data('colorpicker').color = col = fixHSB({
+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
+ });
+ } else {
+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
+ }));
+ }
+ if (ev) {
+ fillRGBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ }
+ setSelector(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
+ },
+ blur = function (ev) {
+ var cal = $(this).parent().parent();
+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+ },
+ focus = function () {
+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+ $(this).parent().addClass('colorpicker_focus');
+ },
+ downIncrement = function (ev) {
+ var field = $(this).parent().find('input').focus();
+ var current = {
+ el: $(this).parent().addClass('colorpicker_slider'),
+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
+ y: ev.pageY,
+ field: field,
+ val: parseInt(field.val(), 10),
+ preview: $(this).parent().parent().data('colorpicker').livePreview
+ };
+ $(document).bind('mouseup', current, upIncrement);
+ $(document).bind('mousemove', current, moveIncrement);
+ },
+ moveIncrement = function (ev) {
+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
+ if (ev.data.preview) {
+ change.apply(ev.data.field.get(0), [true]);
+ }
+ return false;
+ },
+ upIncrement = function (ev) {
+ change.apply(ev.data.field.get(0), [true]);
+ ev.data.el.removeClass('colorpicker_slider').find('input').focus();
+ $(document).unbind('mouseup', upIncrement);
+ $(document).unbind('mousemove', moveIncrement);
+ return false;
+ },
+ downHue = function (ev) {
+ var current = {
+ cal: $(this).parent(),
+ y: $(this).offset().top
+ };
+ current.preview = current.cal.data('colorpicker').livePreview;
+ $(document).bind('mouseup', current, upHue);
+ $(document).bind('mousemove', current, moveHue);
+ },
+ moveHue = function (ev) {
+ change.apply(
+ ev.data.cal.data('colorpicker')
+ .fields
+ .eq(4)
+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
+ .get(0),
+ [ev.data.preview]
+ );
+ return false;
+ },
+ upHue = function (ev) {
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ $(document).unbind('mouseup', upHue);
+ $(document).unbind('mousemove', moveHue);
+ return false;
+ },
+ downSelector = function (ev) {
+ var current = {
+ cal: $(this).parent(),
+ pos: $(this).offset()
+ };
+ current.preview = current.cal.data('colorpicker').livePreview;
+ $(document).bind('mouseup', current, upSelector);
+ $(document).bind('mousemove', current, moveSelector);
+ },
+ moveSelector = function (ev) {
+ change.apply(
+ ev.data.cal.data('colorpicker')
+ .fields
+ .eq(6)
+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
+ .end()
+ .eq(5)
+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
+ .get(0),
+ [ev.data.preview]
+ );
+ return false;
+ },
+ upSelector = function (ev) {
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ $(document).unbind('mouseup', upSelector);
+ $(document).unbind('mousemove', moveSelector);
+ return false;
+ },
+ enterSubmit = function (ev) {
+ $(this).addClass('colorpicker_focus');
+ },
+ leaveSubmit = function (ev) {
+ $(this).removeClass('colorpicker_focus');
+ },
+ clickSubmit = function (ev) {
+ var cal = $(this).parent();
+ var col = cal.data('colorpicker').color;
+ cal.data('colorpicker').origColor = col;
+ setCurrentColor(col, cal.get(0));
+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
+ },
+ show = function (ev) {
+ var cal = $('#' + $(this).data('colorpickerId'));
+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
+ var pos = $(this).offset();
+ var viewPort = getViewport();
+ var top = pos.top + this.offsetHeight;
+ var left = pos.left;
+ if (top + 176 > viewPort.t + viewPort.h) {
+ top -= this.offsetHeight + 176;
+ }
+ if (left + 356 > viewPort.l + viewPort.w) {
+ left -= 356;
+ }
+ cal.css({left: left + 'px', top: top + 'px'});
+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
+ cal.show();
+ }
+ $(document).bind('mousedown', {cal: cal}, hide);
+ return false;
+ },
+ hide = function (ev) {
+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
+ if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
+ ev.data.cal.hide();
+ }
+ $(document).unbind('mousedown', hide);
+ }
+ },
+ isChildOf = function(parentEl, el, container) {
+ if (parentEl == el) {
+ return true;
+ }
+ if (parentEl.contains) {
+ return parentEl.contains(el);
+ }
+ if ( parentEl.compareDocumentPosition ) {
+ return !!(parentEl.compareDocumentPosition(el) & 16);
+ }
+ var prEl = el.parentNode;
+ while(prEl && prEl != container) {
+ if (prEl == parentEl)
+ return true;
+ prEl = prEl.parentNode;
+ }
+ return false;
+ },
+ getViewport = function () {
+ var m = document.compatMode == 'CSS1Compat';
+ return {
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
+ };
+ },
+ fixHSB = function (hsb) {
+ return {
+ h: Math.min(360, Math.max(0, hsb.h)),
+ s: Math.min(100, Math.max(0, hsb.s)),
+ b: Math.min(100, Math.max(0, hsb.b))
+ };
+ },
+ fixRGB = function (rgb) {
+ return {
+ r: Math.min(255, Math.max(0, rgb.r)),
+ g: Math.min(255, Math.max(0, rgb.g)),
+ b: Math.min(255, Math.max(0, rgb.b))
+ };
+ },
+ fixHex = function (hex) {
+ var len = 6 - hex.length;
+ if (len > 0) {
+ var o = [];
+ for (var i=0; i<len; i++) {
+ o.push('0');
+ }
+ o.push(hex);
+ hex = o.join('');
+ }
+ return hex;
+ },
+ HexToRGB = function (hex) {
+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
+ },
+ HexToHSB = function (hex) {
+ return RGBToHSB(HexToRGB(hex));
+ },
+ RGBToHSB = function (rgb) {
+ var hsb = {
+ h: 0,
+ s: 0,
+ b: 0
+ };
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
+ var delta = max - min;
+ hsb.b = max;
+ if (max != 0) {
+
+ }
+ hsb.s = max != 0 ? 255 * delta / max : 0;
+ if (hsb.s != 0) {
+ if (rgb.r == max) {
+ hsb.h = (rgb.g - rgb.b) / delta;
+ } else if (rgb.g == max) {
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
+ } else {
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
+ }
+ } else {
+ hsb.h = -1;
+ }
+ hsb.h *= 60;
+ if (hsb.h < 0) {
+ hsb.h += 360;
+ }
+ hsb.s *= 100/255;
+ hsb.b *= 100/255;
+ return hsb;
+ },
+ HSBToRGB = function (hsb) {
+ var rgb = {};
+ var h = Math.round(hsb.h);
+ var s = Math.round(hsb.s*255/100);
+ var v = Math.round(hsb.b*255/100);
+ if(s == 0) {
+ rgb.r = rgb.g = rgb.b = v;
+ } else {
+ var t1 = v;
+ var t2 = (255-s)*v/255;
+ var t3 = (t1-t2)*(h%60)/60;
+ if(h==360) h = 0;
+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
+ else {rgb.r=0; rgb.g=0; rgb.b=0}
+ }
+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
+ },
+ RGBToHex = function (rgb) {
+ var hex = [
+ rgb.r.toString(16),
+ rgb.g.toString(16),
+ rgb.b.toString(16)
+ ];
+ $.each(hex, function (nr, val) {
+ if (val.length == 1) {
+ hex[nr] = '0' + val;
+ }
+ });
+ return hex.join('');
+ },
+ HSBToHex = function (hsb) {
+ return RGBToHex(HSBToRGB(hsb));
+ },
+ restoreOriginal = function () {
+ var cal = $(this).parent();
+ var col = cal.data('colorpicker').origColor;
+ cal.data('colorpicker').color = col;
+ fillRGBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ setSelector(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ };
+ return {
+ init: function (opt) {
+ opt = $.extend({}, defaults, opt||{});
+ if (typeof opt.color == 'string') {
+ opt.color = HexToHSB(opt.color);
+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
+ opt.color = RGBToHSB(opt.color);
+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
+ opt.color = fixHSB(opt.color);
+ } else {
+ return this;
+ }
+ return this.each(function () {
+ if (!$(this).data('colorpickerId')) {
+ var options = $.extend({}, opt);
+ options.origColor = opt.color;
+ var id = 'collorpicker_' + parseInt(Math.random() * 1000);
+ $(this).data('colorpickerId', id);
+ var cal = $(tpl).attr('id', id);
+ if (options.flat) {
+ cal.appendTo(this).show();
+ } else {
+ cal.appendTo(document.body);
+ }
+ options.fields = cal
+ .find('input')
+ .bind('keyup', keyDown)
+ .bind('change', change)
+ .bind('blur', blur)
+ .bind('focus', focus);
+ cal
+ .find('span').bind('mousedown', downIncrement).end()
+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
+ options.selectorIndic = options.selector.find('div div');
+ options.el = this;
+ options.hue = cal.find('div.colorpicker_hue div');
+ cal.find('div.colorpicker_hue').bind('mousedown', downHue);
+ options.newColor = cal.find('div.colorpicker_new_color');
+ options.currentColor = cal.find('div.colorpicker_current_color');
+ cal.data('colorpicker', options);
+ cal.find('div.colorpicker_submit')
+ .bind('mouseenter', enterSubmit)
+ .bind('mouseleave', leaveSubmit)
+ .bind('click', clickSubmit);
+ fillRGBFields(options.color, cal.get(0));
+ fillHSBFields(options.color, cal.get(0));
+ fillHexFields(options.color, cal.get(0));
+ setHue(options.color, cal.get(0));
+ setSelector(options.color, cal.get(0));
+ setCurrentColor(options.color, cal.get(0));
+ setNewColor(options.color, cal.get(0));
+ if (options.flat) {
+ cal.css({
+ position: 'relative',
+ display: 'block'
+ });
+ } else {
+ $(this).bind(options.eventName, show);
+ }
+ }
+ });
+ },
+ showPicker: function() {
+ return this.each( function () {
+ if ($(this).data('colorpickerId')) {
+ show.apply(this);
+ }
+ });
+ },
+ hidePicker: function() {
+ return this.each( function () {
+ if ($(this).data('colorpickerId')) {
+ $('#' + $(this).data('colorpickerId')).hide();
+ }
+ });
+ },
+ setColor: function(col) {
+ if (typeof col == 'string') {
+ col = HexToHSB(col);
+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
+ col = RGBToHSB(col);
+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
+ col = fixHSB(col);
+ } else {
+ return this;
+ }
+ return this.each(function(){
+ if ($(this).data('colorpickerId')) {
+ var cal = $('#' + $(this).data('colorpickerId'));
+ cal.data('colorpicker').color = col;
+ cal.data('colorpicker').origColor = col;
+ fillRGBFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setSelector(col, cal.get(0));
+ setCurrentColor(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ }
+ });
+ }
+ };
+ }();
+ $.fn.extend({
+ ColorPicker: ColorPicker.init,
+ ColorPickerHide: ColorPicker.hidePicker,
+ ColorPickerShow: ColorPicker.showPicker,
+ ColorPickerSetColor: ColorPicker.setColor
+ });
+})(jQuery)
\ No newline at end of file
diff --git a/js/mooRainbow/images/blank.gif b/js/mooRainbow/images/blank.gif
deleted file mode 100644
index c9c195f..0000000
Binary files a/js/mooRainbow/images/blank.gif and /dev/null differ
diff --git a/js/mooRainbow/images/moor_arrows.gif b/js/mooRainbow/images/moor_arrows.gif
deleted file mode 100644
index c57addc..0000000
Binary files a/js/mooRainbow/images/moor_arrows.gif and /dev/null differ
diff --git a/js/mooRainbow/images/moor_boverlay.png b/js/mooRainbow/images/moor_boverlay.png
deleted file mode 100644
index 7ac228b..0000000
Binary files a/js/mooRainbow/images/moor_boverlay.png and /dev/null differ
diff --git a/js/mooRainbow/images/moor_cursor.gif b/js/mooRainbow/images/moor_cursor.gif
deleted file mode 100644
index 9515a38..0000000
Binary files a/js/mooRainbow/images/moor_cursor.gif and /dev/null differ
diff --git a/js/mooRainbow/images/moor_slider.png b/js/mooRainbow/images/moor_slider.png
deleted file mode 100644
index 9f4c47b..0000000
Binary files a/js/mooRainbow/images/moor_slider.png and /dev/null differ
diff --git a/js/mooRainbow/images/moor_woverlay.png b/js/mooRainbow/images/moor_woverlay.png
deleted file mode 100644
index c3f3e96..0000000
Binary files a/js/mooRainbow/images/moor_woverlay.png and /dev/null differ
diff --git a/js/mooRainbow/images/rainbow.png b/js/mooRainbow/images/rainbow.png
deleted file mode 100644
index a62ec90..0000000
Binary files a/js/mooRainbow/images/rainbow.png and /dev/null differ
diff --git a/js/mooRainbow/mooRainbow.css b/js/mooRainbow/mooRainbow.css
deleted file mode 100644
index 764664e..0000000
--- a/js/mooRainbow/mooRainbow.css
+++ /dev/null
@@ -1,114 +0,0 @@
-/***
- * - mooRainbow: defaultCSS
- * author: w00fz <w00fzIT(a)gmail.com>
- */
-
-#mooRainbow { font-size: 11px; color: #000; }
-
-.moor-box {
- width: 390px;
- height: 310px;
- border: 1px solid #636163;
- background-color: #f9f9f9;
-}
-.moor-overlayBox {
- width: 256px; /* Width and Height of the overlay must be setted here: default 256x256 */
- height: 256px;
- margin-top: 9px;
- margin-left: 9px;
- border: 1px solid #000;
-}
-.moor-slider {
- border: 1px solid #000;
- margin-top: 9px;
- margin-left: 280px;
- width: 19px; /* if you want a bigger or smaller slider... */
- height: 256px;
-}
-.moor-colorBox {
- border: 1px solid #000;
- width: 59px;
- height: 68px;
- margin-top: 20px;
- margin-left: 315px;
-}
-.moor-currentColor { /* Bottom Box Color, the backup one */
- margin-top: 55px;
- margin-left: 316px;
- width: 59px;
- height: 34px;
-}
-.moor-okButton {
- font-family: Tahoma;
- font-weight: bold;
- font-size: 11px;
- margin-top: 278px;
- margin-left: 8px;
- background: #e6e6e6;
- height: 23px;
- border: 1px solid #d6d6d6;
- border-left-color: #f5f5f5;
- border-top-color: #f5f5f5;
-}
-#mooRainbow label {
- font-family: mono;
-}
-/* Following are just <label> */
-.moor-rLabel {
- margin-top: 100px;
- margin-left: 315px;
-}
-.moor-gLabel {
- margin-top: 125px;
- margin-left: 315px;
-}
-.moor-bLabel {
- margin-top: 150px;
- margin-left: 315px;
-}
-.moor-HueLabel {
- margin-top: 190px;
- margin-left: 315px;
-}
-span.moor-ballino { /* Style hue � (degree) !! */
- margin-top: 190px;
- margin-left: 370px;
-}
-.moor-SatuLabel {
- margin-top: 215px;
- margin-left: 315px;
-}
-.moor-BrighLabel {
- margin-top: 240px;
- margin-left: 315px;
-}
-.moor-hexLabel {
- margin-top: 275px;
- margin-left: 280px;
-}
-
-/* <input> */
-.moor-rInput, .moor-gInput, .moor-bInput, .moor-HueInput, .moor-SatuInput, .moor-BrighInput {
- width: 30px;
-}
-.moor-hexInput {
- width: 55px;
-}
-.moor-cursor {
- background-image: url(images/moor_cursor.gif);
- width: 12px;
- height: 12px;
-}
-.moor-arrows {
- background-image: url(images/moor_arrows.gif);
- top: 9px;
- left: 270px;
- width: 41px;
- height: 9px;
-}
-.moor-chooseColor { /* Top Box Color, the choosen one */
- margin-top: 21px;
- margin-left: 316px;
- width: 59px;
- height: 34px;
-}
\ No newline at end of file
diff --git a/js/mooRainbow/mooRainbow.js b/js/mooRainbow/mooRainbow.js
deleted file mode 100644
index c355a73..0000000
--- a/js/mooRainbow/mooRainbow.js
+++ /dev/null
@@ -1,563 +0,0 @@
-/***
- * MooRainbow
- *
- * @version 1.2b1
- * @license MIT-style license
- * @author Djamil Legato (w00fz) - < w00fzIT [at] gmail.com >
- * @infos http://moorainbow.woolly-sheep.net
- * @copyright Author
- *
- * includes a fix for mootools 1.2 by Piotr Przybylski
- */
-
-var MooRainbow = new Class({
- Implements: [Options, Events],
- options: {
- id: 'mooRainbow',
- prefix: 'moor-',
- imgPath: 'images/',
- startColor: [255, 0, 0],
- wheel: false,
- onComplete: Class.empty,
- onChange: Class.empty,
- selectText: 'Select'
- },
-
- initialize: function(el, options) {
- this.element = $(el); if (!this.element) return;
- this.setOptions(options);
-
- this.sliderPos = 0;
- this.pickerPos = {x: 0, y: 0};
- this.backupColor = this.options.startColor;
- this.currentColor = this.options.startColor;
- this.sets = {
- rgb: [],
- hsb: [],
- hex: []
- };
- this.pickerClick = this.sliderClick = false;
- if (!this.layout) this.doLayout();
- this.OverlayEvents();
- this.sliderEvents();
- this.backupEvent();
- if (this.options.wheel) this.wheelEvents();
- this.element.addEvent('click', function(e) { this.toggle(e); }.bind(this));
-
- this.layout.overlay.setStyle('background-color', this.options.startColor.rgbToHex());
- this.layout.backup.setStyle('background-color', this.backupColor.rgbToHex());
-
- this.pickerPos.x = this.snippet('curPos').l + this.snippet('curSize', 'int').w;
- this.pickerPos.y = this.snippet('curPos').t + this.snippet('curSize', 'int').h;
-
- this.manualSet(this.options.startColor);
-
- this.pickerPos.x = this.snippet('curPos').l + this.snippet('curSize', 'int').w;
- this.pickerPos.y = this.snippet('curPos').t + this.snippet('curSize', 'int').h;
- this.sliderPos = this.snippet('arrPos') - this.snippet('arrSize', 'int');
-
- if (Browser.Engine.webkit) this.hide();
- },
-
- toggle: function() {
- this[this.visible ? 'hide' : 'show']()
- },
-
- show: function() {
- this.rePosition();
- this.layout.setStyle('display', 'block');
- this.visible = true;
- },
-
- hide: function() {
- this.layout.setStyles({'display': 'none'});
- this.visible = false;
- },
-
- manualSet: function(color, type) {
- if (!type || (type != 'hsb' && type != 'hex')) type = 'rgb';
- var rgb, hsb, hex;
-
- if (type == 'rgb') { rgb = color; hsb = color.rgbToHsb(); hex = color.rgbToHex(); }
- else if (type == 'hsb') { hsb = color; rgb = color.hsbToRgb(); hex = rgb.rgbToHex(); }
- else { hex = color; rgb = color.hexToRgb(true); hsb = rgb.rgbToHsb(); }
-
- this.setMooRainbow(rgb);
- this.autoSet(hsb);
- },
-
- autoSet: function(hsb) {
- var curH = this.snippet('curSize', 'int').h;
- var curW = this.snippet('curSize', 'int').w;
- var oveH = this.layout.overlay.height;
- var oveW = this.layout.overlay.width;
- var sliH = this.layout.slider.height;
- var arwH = this.snippet('arrSize', 'int');
- var hue;
-
- var posx = Math.round(((oveW * hsb[1]) / 100) - curW);
- var posy = Math.round(- ((oveH * hsb[2]) / 100) + oveH - curH);
-
- var c = Math.round(((sliH * hsb[0]) / 360)); c = (c == 360) ? 0 : c;
- var position = sliH - c + this.snippet('slider') - arwH;
- hue = [this.sets.hsb[0], 100, 100].hsbToRgb().rgbToHex();
-
- this.layout.cursor.setStyles({'top': posy, 'left': posx});
- this.layout.arrows.setStyle('top', position);
- this.layout.overlay.setStyle('background-color', hue);
- this.sliderPos = this.snippet('arrPos') - arwH;
- this.pickerPos.x = this.snippet('curPos').l + curW;
- this.pickerPos.y = this.snippet('curPos').t + curH;
- },
-
- setMooRainbow: function(color, type) {
- if (!type || (type != 'hsb' && type != 'hex')) type = 'rgb';
- var rgb, hsb, hex;
-
- if (type == 'rgb') { rgb = color; hsb = color.rgbToHsb(); hex = color.rgbToHex(); }
- else if (type == 'hsb') { hsb = color; rgb = color.hsbToRgb(); hex = rgb.rgbToHex(); }
- else { hex = color; rgb = color.hexToRgb(); hsb = rgb.rgbToHsb(); }
-
- this.sets = {
- rgb: rgb,
- hsb: hsb,
- hex: hex
- };
-
- if (!$chk(this.pickerPos.x))
- this.autoSet(hsb);
-
- this.RedInput.value = rgb[0];
- this.GreenInput.value = rgb[1];
- this.BlueInput.value = rgb[2];
- this.HueInput.value = hsb[0];
- this.SatuInput.value = hsb[1];
- this.BrighInput.value = hsb[2];
- this.hexInput.value = hex;
-
- this.currentColor = rgb;
-
- this.chooseColor.setStyle('background-color', rgb.rgbToHex());
- },
-
- parseColors: function(x, y, z) {
- var s = Math.round((x * 100) / this.layout.overlay.width);
- var b = 100 - Math.round((y * 100) / this.layout.overlay.height);
- var h = 360 - Math.round((z * 360) / this.layout.slider.height) + this.snippet('slider') - this.snippet('arrSize', 'int');
- h -= this.snippet('arrSize', 'int');
- h = (h >= 360) ? 0 : (h < 0) ? 0 : h;
- s = (s > 100) ? 100 : (s < 0) ? 0 : s;
- b = (b > 100) ? 100 : (b < 0) ? 0 : b;
-
- return [h, s, b];
- },
-
- OverlayEvents: function() {
- var lim, curH, curW, inputs;
- curH = this.snippet('curSize', 'int').h;
- curW = this.snippet('curSize', 'int').w;
- inputs = $A(this.arrRGB).concat(this.arrHSB, this.hexInput);
-
- document.addEvent('click', function() {
- if(this.visible) this.hide(this.layout);
- }.bind(this));
-
- inputs.each(function(el) {
- if(el) {
- el.addEvent('keydown', this.eventKeydown.bindWithEvent(this, el));
- el.addEvent('keyup', this.eventKeyup.bindWithEvent(this, el));
- }
- }, this);
- [this.element, this.layout].each(function(el) {
- el.addEvents({
- 'click': function(e) { new Event(e).stop();},
- 'keyup': function(e) {
- e = new Event(e);
- if(e.key == 'esc' && this.visible) this.hide(this.layout);
- }.bind(this)
- }, this);
- }, this);
-
- lim = {
- x: [0 - curW, (this.layout.overlay.width - curW)],
- y: [0 - curH, (this.layout.overlay.height - curH)]
- };
-
- this.layout.drag = new Drag(this.layout.cursor, {
- limit: lim,
- onStart: this.overlayDrag.bind(this),
- onDrag: this.overlayDrag.bind(this),
- snap: 0
- });
-
- this.layout.overlay2.addEvent('mousedown', function(e){
- e = new Event(e);
- this.layout.cursor.setStyles({
- 'top': e.page.y - this.layout.overlay.getPosition().y - curH,
- 'left': e.page.x - this.layout.overlay.getPosition().x - curW
- });
- this.overlayDrag();
- this.layout.drag.start(e);
- }.bind(this));
-
- this.okButton.addEvent('click', function() {
- if(this.currentColor == this.options.startColor) {
- this.hide();
- this.fireEvent('onComplete', [this.sets, this]);
- }
- else {
- this.backupColor = this.currentColor;
- this.layout.backup.setStyle('background-color', this.backupColor.rgbToHex());
- this.hide();
- this.fireEvent('onComplete', [this.sets, this]);
- }
- }.bind(this));
- },
-
- overlayDrag: function() {
- var curH = this.snippet('curSize', 'int').h;
- var curW = this.snippet('curSize', 'int').w;
- this.pickerPos.x = this.snippet('curPos').l + curW;
- this.pickerPos.y = this.snippet('curPos').t + curH;
-
- this.setMooRainbow(this.parseColors(this.pickerPos.x, this.pickerPos.y, this.sliderPos), 'hsb');
- this.fireEvent('onChange', [this.sets, this]);
- },
-
- sliderEvents: function() {
- var arwH = this.snippet('arrSize', 'int'), lim;
-
- lim = [0 + this.snippet('slider') - arwH, this.layout.slider.height - arwH + this.snippet('slider')];
- this.layout.sliderDrag = new Drag(this.layout.arrows, {
- limit: {y: lim},
- modifiers: {x: false},
- onStart: this.sliderDrag.bind(this),
- onDrag: this.sliderDrag.bind(this),
- snap: 0
- });
-
- this.layout.slider.addEvent('mousedown', function(e){
- e = new Event(e);
-
- this.layout.arrows.setStyle(
- 'top', e.page.y - this.layout.slider.getPosition().y + this.snippet('slider') - arwH
- );
- this.sliderDrag();
- this.layout.sliderDrag.start(e);
- }.bind(this));
- },
-
- sliderDrag: function() {
- var arwH = this.snippet('arrSize', 'int'), hue;
-
- this.sliderPos = this.snippet('arrPos') - arwH;
- this.setMooRainbow(this.parseColors(this.pickerPos.x, this.pickerPos.y, this.sliderPos), 'hsb');
- hue = [this.sets.hsb[0], 100, 100].hsbToRgb().rgbToHex();
- this.layout.overlay.setStyle('background-color', hue);
- this.fireEvent('onChange', [this.sets, this]);
- },
-
- backupEvent: function() {
- this.layout.backup.addEvent('click', function() {
- this.manualSet(this.backupColor);
- this.fireEvent('onChange', [this.sets, this]);
- }.bind(this));
- },
-
- wheelEvents: function() {
- var arrColors = $A(this.arrRGB).extend(this.arrHSB);
-
- arrColors.each(function(el) {
- el.addEvents({
- 'mousewheel': this.eventKeys.bindWithEvent(this, el),
- 'keydown': this.eventKeys.bindWithEvent(this, el)
- });
- }, this);
-
- [this.layout.arrows, this.layout.slider].each(function(el) {
- el.addEvents({
- 'mousewheel': this.eventKeys.bindWithEvent(this, [this.arrHSB[0], 'slider']),
- 'keydown': this.eventKeys.bindWithEvent(this, [this.arrHSB[0], 'slider'])
- });
- }, this);
- },
-
- eventKeys: function(e, el, id) {
- var wheel, type;
- id = (!id) ? el.id : this.arrHSB[0];
-
- if (e.type == 'keydown') {
- if (e.key == 'up') wheel = 1;
- else if (e.key == 'down') wheel = -1;
- else return;
- } else if (e.type == Element.Events.mousewheel.base) wheel = (e.wheel > 0) ? 1 : -1;
-
- if (this.arrRGB.contains(el)) type = 'rgb';
- else if (this.arrHSB.contains(el)) type = 'hsb';
- else type = 'hsb';
-
- if (type == 'rgb') {
- var rgb = this.sets.rgb, hsb = this.sets.hsb, prefix = this.options.prefix, pass;
- var value = (el.value.toInt() || 0) + wheel;
- value = (value > 255) ? 255 : (value < 0) ? 0 : value;
-
- switch(el.className) {
- case prefix + 'rInput': pass = [value, rgb[1], rgb[2]]; break;
- case prefix + 'gInput': pass = [rgb[0], value, rgb[2]]; break;
- case prefix + 'bInput': pass = [rgb[0], rgb[1], value]; break;
- default : pass = rgb;
- }
- this.manualSet(pass);
- this.fireEvent('onChange', [this.sets, this]);
- } else {
- var rgb = this.sets.rgb, hsb = this.sets.hsb, prefix = this.options.prefix, pass;
- var value = (el.value.toInt() || 0) + wheel;
-
- if (el.className.test(/(HueInput)/)) value = (value > 359) ? 0 : (value < 0) ? 0 : value;
- else value = (value > 100) ? 100 : (value < 0) ? 0 : value;
-
- switch(el.className) {
- case prefix + 'HueInput': pass = [value, hsb[1], hsb[2]]; break;
- case prefix + 'SatuInput': pass = [hsb[0], value, hsb[2]]; break;
- case prefix + 'BrighInput': pass = [hsb[0], hsb[1], value]; break;
- default : pass = hsb;
- }
-
- this.manualSet(pass, 'hsb');
- this.fireEvent('onChange', [this.sets, this]);
- }
- e.stop();
- },
-
- eventKeydown: function(e, el) {
- var n = e.code, k = e.key;
-
- if ((!el.className.test(/hexInput/) && !(n >= 48 && n <= 57)) &&
- (k!='backspace' && k!='tab' && k !='delete' && k!='left' && k!='right'))
- e.stop();
- },
-
- eventKeyup: function(e, el) {
- var n = e.code, k = e.key, pass, prefix, chr = el.value.charAt(0);
-
- if (!$chk(el.value)) return;
- if (el.className.test(/hexInput/)) {
- if (chr != "#" && el.value.length != 6) return;
- if (chr == '#' && el.value.length != 7) return;
- } else {
- if (!(n >= 48 && n <= 57) && (!['backspace', 'tab', 'delete', 'left', 'right'].contains(k)) && el.value.length > 3) return;
- }
-
- prefix = this.options.prefix;
-
- if (el.className.test(/(rInput|gInput|bInput)/)) {
- if (el.value < 0 || el.value > 255) return;
- switch(el.className){
- case prefix + 'rInput': pass = [el.value, this.sets.rgb[1], this.sets.rgb[2]]; break;
- case prefix + 'gInput': pass = [this.sets.rgb[0], el.value, this.sets.rgb[2]]; break;
- case prefix + 'bInput': pass = [this.sets.rgb[0], this.sets.rgb[1], el.value]; break;
- default : pass = this.sets.rgb;
- }
- this.manualSet(pass);
- this.fireEvent('onChange', [this.sets, this]);
- }
- else if (!el.className.test(/hexInput/)) {
- if (el.className.test(/HueInput/) && el.value < 0 || el.value > 360) return;
- else if (el.className.test(/HueInput/) && el.value == 360) el.value = 0;
- else if (el.className.test(/(SatuInput|BrighInput)/) && el.value < 0 || el.value > 100) return;
- switch(el.className){
- case prefix + 'HueInput': pass = [el.value, this.sets.hsb[1], this.sets.hsb[2]]; break;
- case prefix + 'SatuInput': pass = [this.sets.hsb[0], el.value, this.sets.hsb[2]]; break;
- case prefix + 'BrighInput': pass = [this.sets.hsb[0], this.sets.hsb[1], el.value]; break;
- default : pass = this.sets.hsb;
- }
- this.manualSet(pass, 'hsb');
- this.fireEvent('onChange', [this.sets, this]);
- } else {
- pass = el.value.hexToRgb(true);
- if (isNaN(pass[0])||isNaN(pass[1])||isNaN(pass[2])) return;
-
- if ($chk(pass)) {
- this.manualSet(pass);
- this.fireEvent('onChange', [this.sets, this]);
- }
- }
-
- },
-
- doLayout: function() {
- var id = this.options.id, prefix = this.options.prefix;
- var idPrefix = id + ' .' + prefix;
-
- this.layout = new Element('div', {
- 'styles': {'display': 'block', 'position': 'absolute'},
- 'id': id
- }).inject(document.body);
-
- var box = new Element('div', {
- 'styles': {'position': 'relative'},
- 'class': prefix + 'box'
- }).inject(this.layout);
-
- var div = new Element('div', {
- 'styles': {'position': 'absolute', 'overflow': 'hidden'},
- 'class': prefix + 'overlayBox'
- }).inject(box);
-
- var ar = new Element('div', {
- 'styles': {'position': 'absolute', 'zIndex': 1},
- 'class': prefix + 'arrows'
- }).inject(box);
- ar.width = ar.getStyle('width').toInt();
- ar.height = ar.getStyle('height').toInt();
-
- var ov = new Element('img', {
- 'styles': {'background-color': '#fff', 'position': 'relative', 'zIndex': 2},
- 'src': this.options.imgPath + 'moor_woverlay.png',
- 'class': prefix + 'overlay'
- }).inject(div);
-
- var ov2 = new Element('img', {
- 'styles': {'position': 'absolute', 'top': 0, 'left': 0, 'zIndex': 2},
- 'src': this.options.imgPath + 'moor_boverlay.png',
- 'class': prefix + 'overlay'
- }).inject(div);
-
- if (Browser.Engine.trident4) {
- div.setStyle('overflow', '');
- var src = ov.src;
- ov.src = this.options.imgPath + 'blank.gif';
- ov.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
- src = ov2.src;
- ov2.src = this.options.imgPath + 'blank.gif';
- ov2.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
- }
- ov.width = ov2.width = div.getStyle('width').toInt();
- ov.height = ov2.height = div.getStyle('height').toInt();
-
- var cr = new Element('div', {
- 'styles': {'overflow': 'hidden', 'position': 'absolute', 'zIndex': 2},
- 'class': prefix + 'cursor'
- }).inject(div);
- cr.width = cr.getStyle('width').toInt();
- cr.height = cr.getStyle('height').toInt();
-
- var sl = new Element('img', {
- 'styles': {'position': 'absolute', 'z-index': 2},
- 'src': this.options.imgPath + 'moor_slider.png',
- 'class': prefix + 'slider'
- }).inject(box);
- this.layout.slider = sl;
- sl.width = sl.getStyle('width').toInt();
- sl.height = sl.getStyle('height').toInt();
-
- new Element('div', {
- 'styles': {'position': 'absolute'},
- 'class': prefix + 'colorBox'
- }).inject(box);
-
- new Element('div', {
- 'styles': {'zIndex': 2, 'position': 'absolute'},
- 'class': prefix + 'chooseColor'
- }).inject(box);
-
- this.layout.backup = new Element('div', {
- 'styles': {'zIndex': 2, 'position': 'absolute', 'cursor': 'pointer'},
- 'class': prefix + 'currentColor'
- }).inject(box);
-
- var R = new Element('label').inject(box).setStyle('position', 'absolute');
- var G = R.clone().inject(box).addClass(prefix + 'gLabel').set('html', 'G: ');
- var B = R.clone().inject(box).addClass(prefix + 'bLabel').set('html', 'B: ');
- R.set('html', 'R: ').addClass(prefix + 'rLabel');
-
- var inputR = new Element('input');
- var inputG = inputR.clone().inject(G).addClass(prefix + 'gInput');
- var inputB = inputR.clone().inject(B).addClass(prefix + 'bInput');
- inputR.inject(R).addClass(prefix + 'rInput');
-
- var HU = new Element('label').inject(box).setStyle('position', 'absolute');
- var SA = HU.clone().inject(box).addClass(prefix + 'SatuLabel').set('html', 'S: ');
- var BR = HU.clone().inject(box).addClass(prefix + 'BrighLabel').set('html', 'B: ');
- HU.set('html', 'H: ').addClass(prefix + 'HueLabel');
-
- var inputHU = new Element('input');
- var inputSA = inputHU.clone().inject(SA).addClass(prefix + 'SatuInput');
- var inputBR = inputHU.clone().inject(BR).addClass(prefix + 'BrighInput');
- inputHU.inject(HU).addClass(prefix + 'HueInput');
- SA.innerHTML += " %"; BR.innerHTML += " %";
- SP = new Element('span', {'styles': {'position': 'absolute'}, 'class': prefix + 'ballino'})
- SP.innerHTML = " °"
- SP.inject(HU,'after');
-
- var hex = new Element('label').inject(box).setStyle('position', 'absolute').addClass(prefix + 'hexLabel').set('html', '#hex: ').adopt(new Element('input').addClass(prefix + 'hexInput'));
-
- var ok = new Element('input', {
- 'styles': {'position': 'absolute'},
- 'type': 'button',
- 'value': this.options.selectText,
- 'class': prefix + 'okButton'
- }).inject(box);
-
- this.rePosition();
-
- var overlays = $$('#' + id + ' .' + prefix + 'overlay');
- this.layout.overlay = overlays[0];
- this.layout.overlay2 = overlays[1];
- this.layout.cursor = cr;
- this.layout.arrows = ar;
- this.chooseColor = this.layout.getElement('.' + prefix + 'chooseColor');
- this.RedInput = inputR;
- this.GreenInput = inputG;
- this.BlueInput = inputB;
- this.HueInput = inputHU;
- this.SatuInput = this.layout.getElement('.' + prefix + 'SatuInput');
- this.BrighInput = this.layout.getElement('.' + prefix + 'BrighInput');
- this.hexInput = this.layout.getElement('.' + prefix + 'hexInput');;
-
- this.arrRGB = [this.RedInput, this.GreenInput, this.BlueInput];
- this.arrHSB = [this.HueInput, this.SatuInput, this.BrighInput];
- this.okButton = ok;
-
- if (!Browser.Engine.webkit419) this.hide();
- },
- rePosition: function() {
- var coords = this.element.getCoordinates();
- this.layout.setStyles({
- 'left': coords.left,
- 'top': coords.top + coords.height + 1
- });
- },
-
- snippet: function(mode, type) {
- var size; type = (type) ? type : 'none';
-
- switch(mode) {
- case 'arrPos':
- var t = this.layout.arrows.getStyle('top').toInt();
- size = t;
- break;
- case 'arrSize':
- var h = this.layout.arrows.height;
- h = (type == 'int') ? (h/2).toInt() : h;
- size = h;
- break;
- case 'curPos':
- var l = this.layout.cursor.getStyle('left').toInt();
- var t = this.layout.cursor.getStyle('top').toInt();
- size = {'l': l, 't': t};
- break;
- case 'slider':
- var t = this.layout.slider.getStyle('marginTop').toInt();
- size = t;
- break;
- default :
- var h = this.layout.cursor.height;
- var w = this.layout.cursor.width;
- h = (type == 'int') ? (h/2).toInt() : h;
- w = (type == 'int') ? (w/2).toInt() : w;
- size = {w: w, h: h};
- };
- return size;
- }
-});
diff --git a/js/mootools-domready-rainbow.js b/js/mootools-domready-rainbow.js
deleted file mode 100644
index 40041df..0000000
--- a/js/mootools-domready-rainbow.js
+++ /dev/null
@@ -1,16 +0,0 @@
-window.addEvent('domready', function() {
- var r = new MooRainbow('myRainbow', {
- 'startColor': [58, 142, 246],
- 'imgPath': 'js/mooRainbow/images/',
- 'onChange': function(color) {
- top.frame_navigation.document.getElementById('body_leftFrame').style.backgroundColor = color.hex;
- top.frame_navigation.document.getElementById('pmalogo').style.backgroundColor = color.hex;
- top.frame_content.document.body.style.backgroundColor = color.hex;
- },
- 'onComplete': function(color) {
- top.frame_content.document.getElementById('rainbowform').custom_color.value = color.hex;
- top.frame_content.document.getElementById('rainbowform').custom_color_rgb.value = color.rgb;
- top.frame_content.document.getElementById('rainbowform').submit();
- }
- });
-});
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 11c5f8b..5a4afc4 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -666,10 +666,8 @@ unset($default_server);
if (isset($_REQUEST['custom_color_reset'])) {
unset($_SESSION['tmp_user_values']['custom_color']);
- unset($_SESSION['tmp_user_values']['custom_color_rgb']);
} elseif (isset($_REQUEST['custom_color'])) {
$_SESSION['tmp_user_values']['custom_color'] = $_REQUEST['custom_color'];
- $_SESSION['tmp_user_values']['custom_color_rgb'] = $_REQUEST['custom_color_rgb'];
}
/**
* @global PMA_Theme_Manager $_SESSION['PMA_Theme_Manager']
diff --git a/libraries/header_meta_style.inc.php b/libraries/header_meta_style.inc.php
index 5413be6..c6c6f96 100644
--- a/libraries/header_meta_style.inc.php
+++ b/libraries/header_meta_style.inc.php
@@ -46,11 +46,14 @@ if ($GLOBALS['text_dir'] == 'ltr') {
echo 'phpMyAdmin';
}
?></title>
- <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>&nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
-<?php if (defined('PMA_MOORAINBOW')) { ?>
- <link rel="stylesheet" type="text/css" href="js/mooRainbow/mooRainbow.css" />
+<?php
+// goes before our themed CSS
+ if (defined('PMA_COLORPICKER')) { ?>
+ <link rel="stylesheet" type="text/css" href="js/colorpicker/css/colorpicker.css" />
+ <link rel="stylesheet" media="screen" type="text/css" href="js/colorpicker/css/layout.css" />
<?php
- }
+ }
?>
+ <link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>phpmyadmin.css.php?<?php echo PMA_generate_common_url(); ?>&js_frame=<?php echo isset($print_view) ? 'print' : 'right'; ?>&nocache=<?php echo $GLOBALS['PMA_Config']->getThemeUniqueValue(); ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo defined('PMA_PATH_TO_BASEDIR') ? PMA_PATH_TO_BASEDIR : ''; ?>print.css" media="print" />
<meta name="robots" content="noindex,nofollow" />
diff --git a/main.php b/main.php
index ef9c6b5..36a8125 100644
--- a/main.php
+++ b/main.php
@@ -9,11 +9,11 @@
/**
* Gets some core libraries and displays a top message if required
*/
-define('PMA_MOORAINBOW', true);
+define('PMA_COLORPICKER', true);
require_once './libraries/common.inc.php';
-$GLOBALS['js_include'][] = 'mootools-more.js';
-$GLOBALS['js_include'][] = 'mooRainbow/mooRainbow.js';
-$GLOBALS['js_include'][] = 'mootools-domready-rainbow.js';
+
+$GLOBALS['js_include'][] = 'jquery/jquery-1.4.2-min.js';
+$GLOBALS['js_include'][] = 'colorpicker/js/colorpicker.js';
// Handles some variables that may have been sent by the calling script
$GLOBALS['db'] = '';
@@ -159,14 +159,37 @@ if ($GLOBALS['cfg']['ThemeManager']) {
//<![CDATA[
document.write('<li id="li_custom_color">');
document.write('<?php echo PMA_escapeJsString($strCustomColor) . ': '; ?>');
- document.write('<img id="myRainbow" src="js/mooRainbow/images/rainbow.png" alt="[r]" width="16" height="16" />');
- document.write('<form name="rainbowform" id="rainbowform" method="post" action="index.php" target="_parent">');
+ document.write('<form name="colorform" id="colorform" method="post" action="index.php" target="_parent">');
document.write('<?php echo PMA_generate_common_hidden_inputs(); ?>');
- document.write('<input type="hidden" name="custom_color" />');
- document.write('<input type="hidden" name="custom_color_rgb" />');
+ document.write('<input type="hidden" id="custom_color" name="custom_color" value="" />');
document.write('<input type="submit" name="custom_color_reset" value="<?php echo $strReset; ?>" />');
document.write('</form>');
+ document.write('<div id="colorSelector">');
+ document.write('</div>');
document.write('</li>');
+
+ $(document).ready(function() {
+ // Choosing another id does not work!
+ $('#colorSelector').ColorPicker({
+ color: '#0000ff',
+ onShow: function (colpkr) {
+ $(colpkr).fadeIn(500);
+ return false;
+ },
+ onHide: function (colpkr) {
+ $(colpkr).fadeOut(500);
+ return false;
+ },
+ onChange: function(hsb, hex, rgb) {
+ top.frame_content.document.body.style.backgroundColor = '#' + hex;
+ top.frame_navigation.document.body.style.backgroundColor = '#' + hex;
+ },
+ onSubmit: function(hsb, hex, rgb) {
+ $('#custom_color').val('#' + hex);
+ $('#colorform').submit();
+ }
+ });
+ });
//]]>
</script>
<?php
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-266-gb994ec6
by Marc Delisle 25 Mar '10
by Marc Delisle 25 Mar '10
25 Mar '10
The branch, master has been updated
via b994ec6934cef1b02d944969b05ace1f991dbaa7 (commit)
from 783892518ce82c32374a6a643396244eff4c0ad3 (commit)
- Log -----------------------------------------------------------------
commit b994ec6934cef1b02d944969b05ace1f991dbaa7
Author: Marc Delisle <marc(a)infomarc.info>
Date: Thu Mar 25 17:03:18 2010 -0400
forgot to add this
-----------------------------------------------------------------------
Summary of changes:
js/colorpicker/css/colorpicker.css | 161 +++++++
js/colorpicker/css/layout.css | 218 ++++++++++
js/colorpicker/images/blank.gif | Bin 0 -> 49 bytes
js/colorpicker/images/colorpicker_background.png | Bin 0 -> 1897 bytes
js/colorpicker/images/colorpicker_hex.png | Bin 0 -> 532 bytes
js/colorpicker/images/colorpicker_hsb_b.png | Bin 0 -> 970 bytes
js/colorpicker/images/colorpicker_hsb_h.png | Bin 0 -> 1012 bytes
js/colorpicker/images/colorpicker_hsb_s.png | Bin 0 -> 1171 bytes
js/colorpicker/images/colorpicker_indic.gif | Bin 0 -> 86 bytes
js/colorpicker/images/colorpicker_overlay.png | Bin 0 -> 10355 bytes
js/colorpicker/images/colorpicker_rgb_b.png | Bin 0 -> 970 bytes
js/colorpicker/images/colorpicker_rgb_g.png | Bin 0 -> 1069 bytes
js/colorpicker/images/colorpicker_rgb_r.png | Bin 0 -> 1066 bytes
js/colorpicker/images/colorpicker_select.gif | Bin 0 -> 78 bytes
js/colorpicker/images/colorpicker_submit.png | Bin 0 -> 984 bytes
js/colorpicker/images/custom_background.png | Bin 0 -> 1916 bytes
js/colorpicker/images/custom_hex.png | Bin 0 -> 562 bytes
js/colorpicker/images/custom_hsb_b.png | Bin 0 -> 1097 bytes
js/colorpicker/images/custom_hsb_h.png | Bin 0 -> 970 bytes
js/colorpicker/images/custom_hsb_s.png | Bin 0 -> 1168 bytes
js/colorpicker/images/custom_indic.gif | Bin 0 -> 86 bytes
js/colorpicker/images/custom_rgb_b.png | Bin 0 -> 1008 bytes
js/colorpicker/images/custom_rgb_g.png | Bin 0 -> 1069 bytes
js/colorpicker/images/custom_rgb_r.png | Bin 0 -> 1018 bytes
js/colorpicker/images/custom_submit.png | Bin 0 -> 997 bytes
js/colorpicker/images/select.png | Bin 0 -> 506 bytes
js/colorpicker/images/select2.png | Bin 0 -> 518 bytes
js/colorpicker/images/slider.png | Bin 0 -> 315 bytes
js/colorpicker/js/colorpicker.js | 484 ++++++++++++++++++++++
29 files changed, 863 insertions(+), 0 deletions(-)
create mode 100644 js/colorpicker/css/colorpicker.css
create mode 100644 js/colorpicker/css/layout.css
create mode 100644 js/colorpicker/images/blank.gif
create mode 100644 js/colorpicker/images/colorpicker_background.png
create mode 100644 js/colorpicker/images/colorpicker_hex.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_b.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_h.png
create mode 100644 js/colorpicker/images/colorpicker_hsb_s.png
create mode 100644 js/colorpicker/images/colorpicker_indic.gif
create mode 100644 js/colorpicker/images/colorpicker_overlay.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_b.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_g.png
create mode 100644 js/colorpicker/images/colorpicker_rgb_r.png
create mode 100644 js/colorpicker/images/colorpicker_select.gif
create mode 100644 js/colorpicker/images/colorpicker_submit.png
create mode 100644 js/colorpicker/images/custom_background.png
create mode 100644 js/colorpicker/images/custom_hex.png
create mode 100644 js/colorpicker/images/custom_hsb_b.png
create mode 100644 js/colorpicker/images/custom_hsb_h.png
create mode 100644 js/colorpicker/images/custom_hsb_s.png
create mode 100644 js/colorpicker/images/custom_indic.gif
create mode 100644 js/colorpicker/images/custom_rgb_b.png
create mode 100644 js/colorpicker/images/custom_rgb_g.png
create mode 100644 js/colorpicker/images/custom_rgb_r.png
create mode 100644 js/colorpicker/images/custom_submit.png
create mode 100644 js/colorpicker/images/select.png
create mode 100644 js/colorpicker/images/select2.png
create mode 100644 js/colorpicker/images/slider.png
create mode 100644 js/colorpicker/js/colorpicker.js
diff --git a/js/colorpicker/css/colorpicker.css b/js/colorpicker/css/colorpicker.css
new file mode 100644
index 0000000..05b02b4
--- /dev/null
+++ b/js/colorpicker/css/colorpicker.css
@@ -0,0 +1,161 @@
+.colorpicker {
+ width: 356px;
+ height: 176px;
+ overflow: hidden;
+ position: absolute;
+ background: url(../images/colorpicker_background.png);
+ font-family: Arial, Helvetica, sans-serif;
+ display: none;
+}
+.colorpicker_color {
+ width: 150px;
+ height: 150px;
+ left: 14px;
+ top: 13px;
+ position: absolute;
+ background: #f00;
+ overflow: hidden;
+ cursor: crosshair;
+}
+.colorpicker_color div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 150px;
+ height: 150px;
+ background: url(../images/colorpicker_overlay.png);
+}
+.colorpicker_color div div {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 11px;
+ height: 11px;
+ overflow: hidden;
+ background: url(../images/colorpicker_select.gif);
+ margin: -5px 0 0 -5px;
+}
+.colorpicker_hue {
+ position: absolute;
+ top: 13px;
+ left: 171px;
+ width: 35px;
+ height: 150px;
+ cursor: n-resize;
+}
+.colorpicker_hue div {
+ position: absolute;
+ width: 35px;
+ height: 9px;
+ overflow: hidden;
+ background: url(../images/colorpicker_indic.gif) left top;
+ margin: -4px 0 0 0;
+ left: 0px;
+}
+.colorpicker_new_color {
+ position: absolute;
+ width: 60px;
+ height: 30px;
+ left: 213px;
+ top: 13px;
+ background: #f00;
+}
+.colorpicker_current_color {
+ position: absolute;
+ width: 60px;
+ height: 30px;
+ left: 283px;
+ top: 13px;
+ background: #f00;
+}
+.colorpicker input {
+ background-color: transparent;
+ border: 1px solid transparent;
+ position: absolute;
+ font-size: 10px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #898989;
+ top: 4px;
+ right: 11px;
+ text-align: right;
+ margin: 0;
+ padding: 0;
+ height: 11px;
+}
+.colorpicker_hex {
+ position: absolute;
+ width: 72px;
+ height: 22px;
+ background: url(../images/colorpicker_hex.png) top;
+ left: 212px;
+ top: 142px;
+}
+.colorpicker_hex input {
+ right: 6px;
+}
+.colorpicker_field {
+ height: 22px;
+ width: 62px;
+ background-position: top;
+ position: absolute;
+}
+.colorpicker_field span {
+ position: absolute;
+ width: 12px;
+ height: 22px;
+ overflow: hidden;
+ top: 0;
+ right: 0;
+ cursor: n-resize;
+}
+.colorpicker_rgb_r {
+ background-image: url(../images/colorpicker_rgb_r.png);
+ top: 52px;
+ left: 212px;
+}
+.colorpicker_rgb_g {
+ background-image: url(../images/colorpicker_rgb_g.png);
+ top: 82px;
+ left: 212px;
+}
+.colorpicker_rgb_b {
+ background-image: url(../images/colorpicker_rgb_b.png);
+ top: 112px;
+ left: 212px;
+}
+.colorpicker_hsb_h {
+ background-image: url(../images/colorpicker_hsb_h.png);
+ top: 52px;
+ left: 282px;
+}
+.colorpicker_hsb_s {
+ background-image: url(../images/colorpicker_hsb_s.png);
+ top: 82px;
+ left: 282px;
+}
+.colorpicker_hsb_b {
+ background-image: url(../images/colorpicker_hsb_b.png);
+ top: 112px;
+ left: 282px;
+}
+.colorpicker_submit {
+ position: absolute;
+ width: 22px;
+ height: 22px;
+ background: url(../images/colorpicker_submit.png) top;
+ left: 322px;
+ top: 142px;
+ overflow: hidden;
+}
+.colorpicker_focus {
+ background-position: center;
+}
+.colorpicker_hex.colorpicker_focus {
+ background-position: bottom;
+}
+.colorpicker_submit.colorpicker_focus {
+ background-position: bottom;
+}
+.colorpicker_slider {
+ background-position: bottom;
+}
diff --git a/js/colorpicker/css/layout.css b/js/colorpicker/css/layout.css
new file mode 100644
index 0000000..396e671
--- /dev/null
+++ b/js/colorpicker/css/layout.css
@@ -0,0 +1,218 @@
+/*body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
+ margin:0;
+ padding:0;
+}
+table {
+ border-collapse:collapse;
+ border-spacing:0;
+}
+fieldset,img {
+ border:0;
+}
+address,caption,cite,code,dfn,em,strong,th,var {
+ font-style:normal;
+ font-weight:normal;
+}
+ol,ul {
+ list-style:none;
+}
+caption,th {
+ text-align:left;
+}
+h1,h2,h3,h4,h5,h6 {
+ font-size:100%;
+ font-weight:normal;
+}
+q:before,q:after {
+ content:'';
+}
+abbr,acronym { border:0;
+}
+html, body {
+ background-color: #fff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ line-height: 18px;
+ color: #52697E;
+}
+body {
+ text-align: center;
+ overflow: auto;
+}
+.wrapper {
+ width: 700px;
+ margin: 0 auto;
+ text-align: left;
+}
+h1 {
+ font-size: 21px;
+ height: 47px;
+ line-height: 47px;
+ text-transform: uppercase;
+}
+.navigationTabs {
+ height: 23px;
+ line-height: 23px;
+ border-bottom: 1px solid #ccc;
+}
+.navigationTabs li {
+ float: left;
+ height: 23px;
+ line-height: 23px;
+ padding-right: 3px;
+}
+.navigationTabs li a{
+ float: left;
+ dispaly: block;
+ height: 23px;
+ line-height: 23px;
+ padding: 0 10px;
+ overflow: hidden;
+ color: #52697E;
+ background-color: #eee;
+ position: relative;
+ text-decoration: none;
+}
+.navigationTabs li a:hover {
+ background-color: #f0f0f0;
+}
+.navigationTabs li a.active {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ border-bottom: 0px solid;
+}
+.tabsContent {
+ border: 1px solid #ccc;
+ border-top: 0px solid;
+ width: 698px;
+ overflow: hidden;
+}
+.tab {
+ padding: 16px;
+ display: none;
+}
+.tab h2 {
+ font-weight: bold;
+ font-size: 16px;
+}
+.tab h3 {
+ font-weight: bold;
+ font-size: 14px;
+ margin-top: 20px;
+}
+.tab p {
+ margin-top: 16px;
+ clear: both;
+}
+.tab ul {
+ margin-top: 16px;
+ list-style: disc;
+}
+.tab li {
+ margin: 10px 0 0 35px;
+}
+.tab a {
+ color: #8FB0CF;
+}
+.tab strong {
+ font-weight: bold;
+}
+.tab pre {
+ font-size: 11px;
+ margin-top: 20px;
+ width: 668px;
+ overflow: auto;
+ clear: both;
+}
+.tab table {
+ width: 100%;
+}
+.tab table td {
+ padding: 6px 10px 6px 0;
+ vertical-align: top;
+}
+.tab dt {
+ margin-top: 16px;
+}
+*/
+#colorSelector {
+ position: relative;
+ width: 36px;
+ height: 36px;
+ background: url(../images/select.png);
+}
+#colorSelector div {
+ position: absolute;
+ top: 3px;
+ left: 3px;
+ width: 30px;
+ height: 30px;
+ background: url(../images/select.png) center;
+}
+#colorSelector2 {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 36px;
+ height: 36px;
+ background: url(../images/select2.png);
+}
+#colorSelector2 div {
+ position: absolute;
+ top: 4px;
+ left: 4px;
+ width: 28px;
+ height: 28px;
+ background: url(../images/select2.png) center;
+}
+#colorpickerHolder2 {
+ top: 32px;
+ left: 0;
+ width: 356px;
+ height: 0;
+ overflow: hidden;
+ position: absolute;
+}
+#colorpickerHolder2 .colorpicker {
+ background-image: url(../images/custom_background.png);
+ position: absolute;
+ bottom: 0;
+ left: 0;
+}
+#colorpickerHolder2 .colorpicker_hue div {
+ background-image: url(../images/custom_indic.gif);
+}
+#colorpickerHolder2 .colorpicker_hex {
+ background-image: url(../images/custom_hex.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_r {
+ background-image: url(../images/custom_rgb_r.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_g {
+ background-image: url(../images/custom_rgb_g.png);
+}
+#colorpickerHolder2 .colorpicker_rgb_b {
+ background-image: url(../images/custom_rgb_b.png);
+}
+#colorpickerHolder2 .colorpicker_hsb_s {
+ background-image: url(../images/custom_hsb_s.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_hsb_h {
+ background-image: url(../images/custom_hsb_h.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_hsb_b {
+ background-image: url(../images/custom_hsb_b.png);
+ display: none;
+}
+#colorpickerHolder2 .colorpicker_submit {
+ background-image: url(../images/custom_submit.png);
+}
+#colorpickerHolder2 .colorpicker input {
+ color: #778398;
+}
+#customWidget {
+ position: relative;
+ height: 36px;
+}
diff --git a/js/colorpicker/images/blank.gif b/js/colorpicker/images/blank.gif
new file mode 100644
index 0000000..75b945d
Binary files /dev/null and b/js/colorpicker/images/blank.gif differ
diff --git a/js/colorpicker/images/colorpicker_background.png b/js/colorpicker/images/colorpicker_background.png
new file mode 100644
index 0000000..8401572
Binary files /dev/null and b/js/colorpicker/images/colorpicker_background.png differ
diff --git a/js/colorpicker/images/colorpicker_hex.png b/js/colorpicker/images/colorpicker_hex.png
new file mode 100644
index 0000000..4e532d7
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hex.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_b.png b/js/colorpicker/images/colorpicker_hsb_b.png
new file mode 100644
index 0000000..dfac595
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_b.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_h.png b/js/colorpicker/images/colorpicker_hsb_h.png
new file mode 100644
index 0000000..3977ed9
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_h.png differ
diff --git a/js/colorpicker/images/colorpicker_hsb_s.png b/js/colorpicker/images/colorpicker_hsb_s.png
new file mode 100644
index 0000000..a2a6997
Binary files /dev/null and b/js/colorpicker/images/colorpicker_hsb_s.png differ
diff --git a/js/colorpicker/images/colorpicker_indic.gif b/js/colorpicker/images/colorpicker_indic.gif
new file mode 100644
index 0000000..f9fa95e
Binary files /dev/null and b/js/colorpicker/images/colorpicker_indic.gif differ
diff --git a/js/colorpicker/images/colorpicker_overlay.png b/js/colorpicker/images/colorpicker_overlay.png
new file mode 100644
index 0000000..561cdd9
Binary files /dev/null and b/js/colorpicker/images/colorpicker_overlay.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_b.png b/js/colorpicker/images/colorpicker_rgb_b.png
new file mode 100644
index 0000000..dfac595
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_b.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_g.png b/js/colorpicker/images/colorpicker_rgb_g.png
new file mode 100644
index 0000000..72b3276
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_g.png differ
diff --git a/js/colorpicker/images/colorpicker_rgb_r.png b/js/colorpicker/images/colorpicker_rgb_r.png
new file mode 100644
index 0000000..4855fe0
Binary files /dev/null and b/js/colorpicker/images/colorpicker_rgb_r.png differ
diff --git a/js/colorpicker/images/colorpicker_select.gif b/js/colorpicker/images/colorpicker_select.gif
new file mode 100644
index 0000000..599f7f1
Binary files /dev/null and b/js/colorpicker/images/colorpicker_select.gif differ
diff --git a/js/colorpicker/images/colorpicker_submit.png b/js/colorpicker/images/colorpicker_submit.png
new file mode 100644
index 0000000..7f4c082
Binary files /dev/null and b/js/colorpicker/images/colorpicker_submit.png differ
diff --git a/js/colorpicker/images/custom_background.png b/js/colorpicker/images/custom_background.png
new file mode 100644
index 0000000..cf55ffd
Binary files /dev/null and b/js/colorpicker/images/custom_background.png differ
diff --git a/js/colorpicker/images/custom_hex.png b/js/colorpicker/images/custom_hex.png
new file mode 100644
index 0000000..888f444
Binary files /dev/null and b/js/colorpicker/images/custom_hex.png differ
diff --git a/js/colorpicker/images/custom_hsb_b.png b/js/colorpicker/images/custom_hsb_b.png
new file mode 100644
index 0000000..2f99dae
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_b.png differ
diff --git a/js/colorpicker/images/custom_hsb_h.png b/js/colorpicker/images/custom_hsb_h.png
new file mode 100644
index 0000000..a217e92
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_h.png differ
diff --git a/js/colorpicker/images/custom_hsb_s.png b/js/colorpicker/images/custom_hsb_s.png
new file mode 100644
index 0000000..7826b41
Binary files /dev/null and b/js/colorpicker/images/custom_hsb_s.png differ
diff --git a/js/colorpicker/images/custom_indic.gif b/js/colorpicker/images/custom_indic.gif
new file mode 100644
index 0000000..222fb94
Binary files /dev/null and b/js/colorpicker/images/custom_indic.gif differ
diff --git a/js/colorpicker/images/custom_rgb_b.png b/js/colorpicker/images/custom_rgb_b.png
new file mode 100644
index 0000000..80764e5
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_b.png differ
diff --git a/js/colorpicker/images/custom_rgb_g.png b/js/colorpicker/images/custom_rgb_g.png
new file mode 100644
index 0000000..fc9778b
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_g.png differ
diff --git a/js/colorpicker/images/custom_rgb_r.png b/js/colorpicker/images/custom_rgb_r.png
new file mode 100644
index 0000000..91b0cd4
Binary files /dev/null and b/js/colorpicker/images/custom_rgb_r.png differ
diff --git a/js/colorpicker/images/custom_submit.png b/js/colorpicker/images/custom_submit.png
new file mode 100644
index 0000000..cd202cd
Binary files /dev/null and b/js/colorpicker/images/custom_submit.png differ
diff --git a/js/colorpicker/images/select.png b/js/colorpicker/images/select.png
new file mode 100644
index 0000000..21213bf
Binary files /dev/null and b/js/colorpicker/images/select.png differ
diff --git a/js/colorpicker/images/select2.png b/js/colorpicker/images/select2.png
new file mode 100644
index 0000000..2cd2cab
Binary files /dev/null and b/js/colorpicker/images/select2.png differ
diff --git a/js/colorpicker/images/slider.png b/js/colorpicker/images/slider.png
new file mode 100644
index 0000000..8b03da9
Binary files /dev/null and b/js/colorpicker/images/slider.png differ
diff --git a/js/colorpicker/js/colorpicker.js b/js/colorpicker/js/colorpicker.js
new file mode 100644
index 0000000..10a2b22
--- /dev/null
+++ b/js/colorpicker/js/colorpicker.js
@@ -0,0 +1,484 @@
+/**
+ *
+ * Color picker
+ * Author: Stefan Petre www.eyecon.ro
+ *
+ * Dual licensed under the MIT and GPL licenses
+ *
+ */
+(function ($) {
+ var ColorPicker = function () {
+ var
+ ids = {},
+ inAction,
+ charMin = 65,
+ visible,
+ tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
+ defaults = {
+ eventName: 'click',
+ onShow: function () {},
+ onBeforeShow: function(){},
+ onHide: function () {},
+ onChange: function () {},
+ onSubmit: function () {},
+ color: 'ff0000',
+ livePreview: true,
+ flat: false
+ },
+ fillRGBFields = function (hsb, cal) {
+ var rgb = HSBToRGB(hsb);
+ $(cal).data('colorpicker').fields
+ .eq(1).val(rgb.r).end()
+ .eq(2).val(rgb.g).end()
+ .eq(3).val(rgb.b).end();
+ },
+ fillHSBFields = function (hsb, cal) {
+ $(cal).data('colorpicker').fields
+ .eq(4).val(hsb.h).end()
+ .eq(5).val(hsb.s).end()
+ .eq(6).val(hsb.b).end();
+ },
+ fillHexFields = function (hsb, cal) {
+ $(cal).data('colorpicker').fields
+ .eq(0).val(HSBToHex(hsb)).end();
+ },
+ setSelector = function (hsb, cal) {
+ $(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
+ $(cal).data('colorpicker').selectorIndic.css({
+ left: parseInt(150 * hsb.s/100, 10),
+ top: parseInt(150 * (100-hsb.b)/100, 10)
+ });
+ },
+ setHue = function (hsb, cal) {
+ $(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
+ },
+ setCurrentColor = function (hsb, cal) {
+ $(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
+ },
+ setNewColor = function (hsb, cal) {
+ $(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
+ },
+ keyDown = function (ev) {
+ var pressedKey = ev.charCode || ev.keyCode || -1;
+ if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
+ return false;
+ }
+ var cal = $(this).parent().parent();
+ if (cal.data('colorpicker').livePreview === true) {
+ change.apply(this);
+ }
+ },
+ change = function (ev) {
+ var cal = $(this).parent().parent(), col;
+ if (this.parentNode.className.indexOf('_hex') > 0) {
+ cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
+ } else if (this.parentNode.className.indexOf('_hsb') > 0) {
+ cal.data('colorpicker').color = col = fixHSB({
+ h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
+ s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
+ b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
+ });
+ } else {
+ cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
+ r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
+ g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
+ b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
+ }));
+ }
+ if (ev) {
+ fillRGBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ }
+ setSelector(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
+ },
+ blur = function (ev) {
+ var cal = $(this).parent().parent();
+ cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+ },
+ focus = function () {
+ charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
+ $(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
+ $(this).parent().addClass('colorpicker_focus');
+ },
+ downIncrement = function (ev) {
+ var field = $(this).parent().find('input').focus();
+ var current = {
+ el: $(this).parent().addClass('colorpicker_slider'),
+ max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
+ y: ev.pageY,
+ field: field,
+ val: parseInt(field.val(), 10),
+ preview: $(this).parent().parent().data('colorpicker').livePreview
+ };
+ $(document).bind('mouseup', current, upIncrement);
+ $(document).bind('mousemove', current, moveIncrement);
+ },
+ moveIncrement = function (ev) {
+ ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
+ if (ev.data.preview) {
+ change.apply(ev.data.field.get(0), [true]);
+ }
+ return false;
+ },
+ upIncrement = function (ev) {
+ change.apply(ev.data.field.get(0), [true]);
+ ev.data.el.removeClass('colorpicker_slider').find('input').focus();
+ $(document).unbind('mouseup', upIncrement);
+ $(document).unbind('mousemove', moveIncrement);
+ return false;
+ },
+ downHue = function (ev) {
+ var current = {
+ cal: $(this).parent(),
+ y: $(this).offset().top
+ };
+ current.preview = current.cal.data('colorpicker').livePreview;
+ $(document).bind('mouseup', current, upHue);
+ $(document).bind('mousemove', current, moveHue);
+ },
+ moveHue = function (ev) {
+ change.apply(
+ ev.data.cal.data('colorpicker')
+ .fields
+ .eq(4)
+ .val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
+ .get(0),
+ [ev.data.preview]
+ );
+ return false;
+ },
+ upHue = function (ev) {
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ $(document).unbind('mouseup', upHue);
+ $(document).unbind('mousemove', moveHue);
+ return false;
+ },
+ downSelector = function (ev) {
+ var current = {
+ cal: $(this).parent(),
+ pos: $(this).offset()
+ };
+ current.preview = current.cal.data('colorpicker').livePreview;
+ $(document).bind('mouseup', current, upSelector);
+ $(document).bind('mousemove', current, moveSelector);
+ },
+ moveSelector = function (ev) {
+ change.apply(
+ ev.data.cal.data('colorpicker')
+ .fields
+ .eq(6)
+ .val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
+ .end()
+ .eq(5)
+ .val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
+ .get(0),
+ [ev.data.preview]
+ );
+ return false;
+ },
+ upSelector = function (ev) {
+ fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
+ $(document).unbind('mouseup', upSelector);
+ $(document).unbind('mousemove', moveSelector);
+ return false;
+ },
+ enterSubmit = function (ev) {
+ $(this).addClass('colorpicker_focus');
+ },
+ leaveSubmit = function (ev) {
+ $(this).removeClass('colorpicker_focus');
+ },
+ clickSubmit = function (ev) {
+ var cal = $(this).parent();
+ var col = cal.data('colorpicker').color;
+ cal.data('colorpicker').origColor = col;
+ setCurrentColor(col, cal.get(0));
+ cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
+ },
+ show = function (ev) {
+ var cal = $('#' + $(this).data('colorpickerId'));
+ cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
+ var pos = $(this).offset();
+ var viewPort = getViewport();
+ var top = pos.top + this.offsetHeight;
+ var left = pos.left;
+ if (top + 176 > viewPort.t + viewPort.h) {
+ top -= this.offsetHeight + 176;
+ }
+ if (left + 356 > viewPort.l + viewPort.w) {
+ left -= 356;
+ }
+ cal.css({left: left + 'px', top: top + 'px'});
+ if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
+ cal.show();
+ }
+ $(document).bind('mousedown', {cal: cal}, hide);
+ return false;
+ },
+ hide = function (ev) {
+ if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
+ if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
+ ev.data.cal.hide();
+ }
+ $(document).unbind('mousedown', hide);
+ }
+ },
+ isChildOf = function(parentEl, el, container) {
+ if (parentEl == el) {
+ return true;
+ }
+ if (parentEl.contains) {
+ return parentEl.contains(el);
+ }
+ if ( parentEl.compareDocumentPosition ) {
+ return !!(parentEl.compareDocumentPosition(el) & 16);
+ }
+ var prEl = el.parentNode;
+ while(prEl && prEl != container) {
+ if (prEl == parentEl)
+ return true;
+ prEl = prEl.parentNode;
+ }
+ return false;
+ },
+ getViewport = function () {
+ var m = document.compatMode == 'CSS1Compat';
+ return {
+ l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
+ t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
+ w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
+ h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
+ };
+ },
+ fixHSB = function (hsb) {
+ return {
+ h: Math.min(360, Math.max(0, hsb.h)),
+ s: Math.min(100, Math.max(0, hsb.s)),
+ b: Math.min(100, Math.max(0, hsb.b))
+ };
+ },
+ fixRGB = function (rgb) {
+ return {
+ r: Math.min(255, Math.max(0, rgb.r)),
+ g: Math.min(255, Math.max(0, rgb.g)),
+ b: Math.min(255, Math.max(0, rgb.b))
+ };
+ },
+ fixHex = function (hex) {
+ var len = 6 - hex.length;
+ if (len > 0) {
+ var o = [];
+ for (var i=0; i<len; i++) {
+ o.push('0');
+ }
+ o.push(hex);
+ hex = o.join('');
+ }
+ return hex;
+ },
+ HexToRGB = function (hex) {
+ var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
+ return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
+ },
+ HexToHSB = function (hex) {
+ return RGBToHSB(HexToRGB(hex));
+ },
+ RGBToHSB = function (rgb) {
+ var hsb = {
+ h: 0,
+ s: 0,
+ b: 0
+ };
+ var min = Math.min(rgb.r, rgb.g, rgb.b);
+ var max = Math.max(rgb.r, rgb.g, rgb.b);
+ var delta = max - min;
+ hsb.b = max;
+ if (max != 0) {
+
+ }
+ hsb.s = max != 0 ? 255 * delta / max : 0;
+ if (hsb.s != 0) {
+ if (rgb.r == max) {
+ hsb.h = (rgb.g - rgb.b) / delta;
+ } else if (rgb.g == max) {
+ hsb.h = 2 + (rgb.b - rgb.r) / delta;
+ } else {
+ hsb.h = 4 + (rgb.r - rgb.g) / delta;
+ }
+ } else {
+ hsb.h = -1;
+ }
+ hsb.h *= 60;
+ if (hsb.h < 0) {
+ hsb.h += 360;
+ }
+ hsb.s *= 100/255;
+ hsb.b *= 100/255;
+ return hsb;
+ },
+ HSBToRGB = function (hsb) {
+ var rgb = {};
+ var h = Math.round(hsb.h);
+ var s = Math.round(hsb.s*255/100);
+ var v = Math.round(hsb.b*255/100);
+ if(s == 0) {
+ rgb.r = rgb.g = rgb.b = v;
+ } else {
+ var t1 = v;
+ var t2 = (255-s)*v/255;
+ var t3 = (t1-t2)*(h%60)/60;
+ if(h==360) h = 0;
+ if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
+ else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
+ else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
+ else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
+ else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
+ else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
+ else {rgb.r=0; rgb.g=0; rgb.b=0}
+ }
+ return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
+ },
+ RGBToHex = function (rgb) {
+ var hex = [
+ rgb.r.toString(16),
+ rgb.g.toString(16),
+ rgb.b.toString(16)
+ ];
+ $.each(hex, function (nr, val) {
+ if (val.length == 1) {
+ hex[nr] = '0' + val;
+ }
+ });
+ return hex.join('');
+ },
+ HSBToHex = function (hsb) {
+ return RGBToHex(HSBToRGB(hsb));
+ },
+ restoreOriginal = function () {
+ var cal = $(this).parent();
+ var col = cal.data('colorpicker').origColor;
+ cal.data('colorpicker').color = col;
+ fillRGBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ setSelector(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ };
+ return {
+ init: function (opt) {
+ opt = $.extend({}, defaults, opt||{});
+ if (typeof opt.color == 'string') {
+ opt.color = HexToHSB(opt.color);
+ } else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
+ opt.color = RGBToHSB(opt.color);
+ } else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
+ opt.color = fixHSB(opt.color);
+ } else {
+ return this;
+ }
+ return this.each(function () {
+ if (!$(this).data('colorpickerId')) {
+ var options = $.extend({}, opt);
+ options.origColor = opt.color;
+ var id = 'collorpicker_' + parseInt(Math.random() * 1000);
+ $(this).data('colorpickerId', id);
+ var cal = $(tpl).attr('id', id);
+ if (options.flat) {
+ cal.appendTo(this).show();
+ } else {
+ cal.appendTo(document.body);
+ }
+ options.fields = cal
+ .find('input')
+ .bind('keyup', keyDown)
+ .bind('change', change)
+ .bind('blur', blur)
+ .bind('focus', focus);
+ cal
+ .find('span').bind('mousedown', downIncrement).end()
+ .find('>div.colorpicker_current_color').bind('click', restoreOriginal);
+ options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
+ options.selectorIndic = options.selector.find('div div');
+ options.el = this;
+ options.hue = cal.find('div.colorpicker_hue div');
+ cal.find('div.colorpicker_hue').bind('mousedown', downHue);
+ options.newColor = cal.find('div.colorpicker_new_color');
+ options.currentColor = cal.find('div.colorpicker_current_color');
+ cal.data('colorpicker', options);
+ cal.find('div.colorpicker_submit')
+ .bind('mouseenter', enterSubmit)
+ .bind('mouseleave', leaveSubmit)
+ .bind('click', clickSubmit);
+ fillRGBFields(options.color, cal.get(0));
+ fillHSBFields(options.color, cal.get(0));
+ fillHexFields(options.color, cal.get(0));
+ setHue(options.color, cal.get(0));
+ setSelector(options.color, cal.get(0));
+ setCurrentColor(options.color, cal.get(0));
+ setNewColor(options.color, cal.get(0));
+ if (options.flat) {
+ cal.css({
+ position: 'relative',
+ display: 'block'
+ });
+ } else {
+ $(this).bind(options.eventName, show);
+ }
+ }
+ });
+ },
+ showPicker: function() {
+ return this.each( function () {
+ if ($(this).data('colorpickerId')) {
+ show.apply(this);
+ }
+ });
+ },
+ hidePicker: function() {
+ return this.each( function () {
+ if ($(this).data('colorpickerId')) {
+ $('#' + $(this).data('colorpickerId')).hide();
+ }
+ });
+ },
+ setColor: function(col) {
+ if (typeof col == 'string') {
+ col = HexToHSB(col);
+ } else if (col.r != undefined && col.g != undefined && col.b != undefined) {
+ col = RGBToHSB(col);
+ } else if (col.h != undefined && col.s != undefined && col.b != undefined) {
+ col = fixHSB(col);
+ } else {
+ return this;
+ }
+ return this.each(function(){
+ if ($(this).data('colorpickerId')) {
+ var cal = $('#' + $(this).data('colorpickerId'));
+ cal.data('colorpicker').color = col;
+ cal.data('colorpicker').origColor = col;
+ fillRGBFields(col, cal.get(0));
+ fillHSBFields(col, cal.get(0));
+ fillHexFields(col, cal.get(0));
+ setHue(col, cal.get(0));
+ setSelector(col, cal.get(0));
+ setCurrentColor(col, cal.get(0));
+ setNewColor(col, cal.get(0));
+ }
+ });
+ }
+ };
+ }();
+ $.fn.extend({
+ ColorPicker: ColorPicker.init,
+ ColorPickerHide: ColorPicker.hidePicker,
+ ColorPickerShow: ColorPicker.showPicker,
+ ColorPickerSetColor: ColorPicker.setColor
+ });
+})(jQuery)
\ No newline at end of file
hooks/post-receive
--
phpMyAdmin
1
0