Git
Threads by month
- ----- 2026 -----
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 9 participants
- 39111 discussions
[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
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-265-g7838925
by Marc Delisle 25 Mar '10
by Marc Delisle 25 Mar '10
25 Mar '10
The branch, master has been updated
via 783892518ce82c32374a6a643396244eff4c0ad3 (commit)
from 719d6dd9f0c634fe49c121b4775f77a6953a954b (commit)
- Log -----------------------------------------------------------------
commit 783892518ce82c32374a6a643396244eff4c0ad3
Author: Marc Delisle <marc(a)infomarc.info>
Date: Thu Mar 25 13:27:58 2010 -0400
Replace MooRainbow with a jQuery color picker
-----------------------------------------------------------------------
Summary of changes:
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 ++-
13 files changed, 38 insertions(+), 707 deletions(-)
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/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, gettext, updated. RELEASE_3_3_1RC1-839-g9608b08
by Michal Čihař 25 Mar '10
by Michal Čihař 25 Mar '10
25 Mar '10
The branch, gettext has been updated
via 9608b0805e0c928904069277c3b7958d4c50c8d8 (commit)
from bc0251c0a0556ae38e93b9a3f338d870f843a02d (commit)
- Log -----------------------------------------------------------------
commit 9608b0805e0c928904069277c3b7958d4c50c8d8
Author: veeven <veeven(a)gmail.com>
Date: Wed Mar 24 16:47:29 2010 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/te.po | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/po/te.po b/po/te.po
index cda7558..d7c175d 100644
--- a/po/te.po
+++ b/po/te.po
@@ -7,8 +7,8 @@ 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-12 09:48+0100\n"
-"PO-Revision-Date: 2010-03-19 19:10+0200\n"
-"Last-Translator: చక్రవర్తి <varthy(a)gmail.com>\n"
+"PO-Revision-Date: 2010-03-24 16:47+0200\n"
+"Last-Translator: <veeven(a)gmail.com>\n"
"Language-Team: Telugu <te(a)li.org>\n"
"Language: te\n"
"MIME-Version: 1.0\n"
@@ -166,7 +166,7 @@ msgstr "డిసెం"
#. l10n: See http://www.php.net/manual/en/function.strftime.php to define the format string
#: libraries/messages.inc.php:26
msgid "%B %d, %Y at %I:%M %p"
-msgstr ""
+msgstr "%B %d, %Y at %I:%M %p"
#: libraries/messages.inc.php:27
#, possible-php-format
hooks/post-receive
--
phpMyAdmin
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin localized documentation branch, master, updated. c43dbf32dfc211e5364191e085fc645b50d9932a
by Michal Čihař 25 Mar '10
by Michal Čihař 25 Mar '10
25 Mar '10
The branch, master has been updated
via c43dbf32dfc211e5364191e085fc645b50d9932a (commit)
from 147c31cd9c80b622835c5bc886e111fc27bdb842 (commit)
- Log -----------------------------------------------------------------
commit c43dbf32dfc211e5364191e085fc645b50d9932a
Author: Maurício Meneghini Fauth <mauriciofauth(a)gmail.com>
Date: Thu Mar 25 02:09:48 2010 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/pt_BR.po | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 3c4ca71..d518235 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin-docs VERSION\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2010-03-22 23:58+0100\n"
-"PO-Revision-Date: 2010-03-12 01:10+0200\n"
+"PO-Revision-Date: 2010-03-25 02:09+0200\n"
"Last-Translator: Maurício Meneghini Fauth <mauriciofauth(a)gmail.com>\n"
"Language-Team: none\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Pootle 2.0.1\n"
@@ -9628,13 +9628,12 @@ msgstr ""
#. type: Content of: <html><body><div><ol><li>
#: ../phpmyadmin/Documentation.html:4346
-#, fuzzy
msgid ""
"<tt>git clone git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/"
"phpmyadmin</tt>"
msgstr ""
-"<tt>svn co https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/"
-"phpMyAdmin</tt>"
+"<tt>git clone "
+"git://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin</tt>"
#. type: Content of: <html><body><div><ol><li>
#: ../phpmyadmin/Documentation.html:4349
hooks/post-receive
--
phpMyAdmin localized documentation
1
0
[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_1RC1-264-g719d6dd
by Michal Čihař 24 Mar '10
by Michal Čihař 24 Mar '10
24 Mar '10
The branch, master has been updated
via 719d6dd9f0c634fe49c121b4775f77a6953a954b (commit)
via 459fe9e905be784bcb0d3ce8ad54486c906be938 (commit)
via cdef72f707e0f2a5ebf0a6a897811795f7dea165 (commit)
via c70bd771719efa2fd1711f163e2aabb6bb304325 (commit)
via 9f155b618c65ba2bf49f8a6dbf51d7e6f562087c (commit)
from f9e1592958310191f97def4306d27f695de40245 (commit)
- Log -----------------------------------------------------------------
commit 719d6dd9f0c634fe49c121b4775f77a6953a954b
Merge: f9e1592958310191f97def4306d27f695de40245 459fe9e905be784bcb0d3ce8ad54486c906be938
Author: Michal Čihař <michal(a)cihar.com>
Date: Wed Mar 24 11:10:52 2010 +0100
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
lang/belarusian_latin-utf-8.inc.php | 66 ++++++++++++++--------------------
1 files changed, 27 insertions(+), 39 deletions(-)
diff --git a/lang/belarusian_latin-utf-8.inc.php b/lang/belarusian_latin-utf-8.inc.php
index 4ac9ed6..b17405d 100644
--- a/lang/belarusian_latin-utf-8.inc.php
+++ b/lang/belarusian_latin-utf-8.inc.php
@@ -21,18 +21,6 @@ $month = array('Stu', 'Lut', 'Sak', 'Kra', 'Tra', 'Čer', 'Lip', 'Žni', 'Vier',
$datefmt = '%d %B %Y, %H:%M';
$timespanfmt = '%s dzion, %s hadzinaŭ, %s chvilinaŭ i %s sekundaŭ';
-kali łaska, praviercie kanfihuracyju PHP';
-Heta moža adbycca ŭ vypadku, kali PHP znojdzie syntaksyčnuju pamyłku ŭ im abo kali PHP nia moža znajści fajł.
-Kali łaska, zahruzicie kanfihuracyjny fajł niepasredna, vykarystoŭvajučy spasyłku, pryviedzienuju nižej, i pračytajcie paviedamleńni PHP pra pamyłki. U bolšaści vypadkaŭ, niedzie prapuščany apostraf abo kropka z koskaj.
-Kali vy atrymajecie čystuju staronku, značyć, usio dobra.';
-
-Kali łaska, spytajcie aŭtara, što robić %s.';
-Kali vam treba ŭžyć zvarotny słeš ("\") abo apostraf ("\'") u hetych značeńniach, ustaŭcie zvarotny słeš pierad imi (naprykład, \'\\\\xyz\' abo \'a\\\'b\').';
-
-Kali vam patrebna ŭžyć zvarotny słeš ("\") abo apostraf ("\'") siarod hetych značeńniaŭ, pastaŭcie pierad imi zvarotny słeš (naprykład, \'\\\\xyz\' abo \'a\\\'b\').';
-
-hetaje pole nia moža być adredagavanaje ';
-
$strAbortedClients = 'Spyniena';
$strAccessDeniedCreateConfig = 'Imavierna, pryčyna hetaha ŭ tym, što nia stvorany kanfihuracyjny fajł. Kab jaho stvaryć, možna vykarystać %1$snaładačny skrypt%2$s.';
$strAccessDeniedExplanation = 'phpMyAdmin pasprabavaŭ padłučycca da servera MySQL, ale server adchiliŭ złučeńnie. Praviercie imia chostu, karystalnika i parol u config.inc.php i ŭpeŭniciesia, što jany adpaviadajuć infarmacyi, jakuju daŭ administratar MySQL-servera.';
@@ -124,7 +112,7 @@ $strCancel = 'Skasavać';
$strCanNotLoadExportPlugins = 'Niemahčyma zahruzić płahiny ekspartavańnia, kali łaska, praviercie ŭstalavanyja fajły!';
$strCanNotLoadImportPlugins = 'Niemahčyma zahruzić płahiny impartavańnia, kali łaska, praviercie ŭstaloŭku!';
$strCannotLogin = 'Niemahčyma załahavacca na server MySQL';
-$strCantLoad = 'niemahčyma zahruzić pašyreńnie %s;
+$strCantLoad = 'niemahčyma zahruzić pašyreńnie %s; kali łaska, praviercie kanfihuracyju PHP';
$strCantLoadRecodeIconv = 'Niemahčyma zahruzić pašyreńnie iconv abo pašyreńnie recode, nieabchodnyja dla pierakadavańnia symbalaŭ. Naładźcie PHP na vykarystańnie hetych pašyreńniaŭ abo ŭvohule adklučycie pierakadavańnie symbalaŭ u phpMyAdmin.';
$strCantRenameIdxToPrimary = 'Niemahčyma pierajmienavać indeks u PRIMARY!';
$strCantUseRecodeIconv = 'Niemahčyma vykarystać ni funkcyju iconv, ni libiconvr, ni recode_string u toj čas, jak pašyreńnie paviedamlaje, što jano zahružanaje. Praviercie vašuju kanfihuracyju PHP.';
@@ -164,7 +152,7 @@ $strCompleteInserts = 'Poŭnaja ŭstaŭka';
$strCompression = 'Ścisk';
$strCompressionWillBeDetected = 'Metad ścisku impartavanaha fajła budzie vyznačanaja aŭtamatyčna z: %s';
$strConfigDefaultFileError = 'Niemahčyma zahruzić kanfihuracyju pa zmoŭčańni z: "%1$s"';
-$strConfigFileError = 'phpMyAdmin nia moža pračytać kanfihuracyjny fajł!
+$strConfigFileError = 'phpMyAdmin nia moža pračytać kanfihuracyjny fajł! Heta moža adbycca ŭ vypadku, kali PHP znojdzie syntaksyčnuju pamyłku ŭ im abo kali PHP nia moža znajści fajł. Kali łaska, zahruzicie kanfihuracyjny fajł niepasredna, vykarystoŭvajučy spasyłku, pryviedzienuju nižej, i pračytajcie paviedamleńni PHP pra pamyłki. U bolšaści vypadkaŭ, niedzie prapuščany apostraf abo kropka z koskaj. Kali vy atrymajecie čystuju staronku, značyć, usio dobra.';
$strConfigureTableCoord = 'Kali łaska, skanfihurujcie kaardynaty dla tablicy %s';
$strConnectionError = 'Niemahčyma padłučycca: niapravilnyja nałady.';
$strConnections = 'Padłučeńni';
@@ -352,13 +340,13 @@ $strHaveToShow = 'Vam nieabchodna vybrać prynamsi adnu kalonku dla adlustravań
$strHebrew = 'Habrejskaja';
$strHelp = 'Dapamoha';
$strHexForBLOB = 'Šasnaccatkovyja značeńni dla polaŭ typu BLOB';
-$strHide = 'Schavać';
$strHideShowAll = 'Schavać/pakazać usie tablicy';
$strHideShowNoRelation = 'Schavać/pakazać tablicy biaz suviaziaŭ';
+$strHide = 'Schavać';
$strHome = 'Da pačatku';
$strHomepageOfficial = 'Aficyjnaja staronka phpMyAdmin';
-$strHost = 'Chost';
$strHostEmpty = 'Pustoje imia chostu!';
+$strHost = 'Chost';
$strHTMLExcel = 'Microsoft Excel 2000';
$strHTMLWord = 'Microsoft Word 2000';
$strHungarian = 'Vuhorskaja';
@@ -387,8 +375,8 @@ $strInnoDBAutoextendIncrementDesc = ' Pamier pryraščeńnia dla pašyreńnia pa
$strInnoDBBufferPoolSizeDesc = 'Pamier buferu ŭ pamiaci, jaki InnoDB vykarystoŭvaje dla kešavańnia dadzienych i indeksaŭ tablic.';
$strInnoDBBufferPoolSize = 'Pamier pułu buferu';
$strInnoDBDataFilePath = 'Fajły dadzienych';
-$strInnoDBDataHomeDir = 'Chatniaja tečka dadzienych';
$strInnoDBDataHomeDirDesc = 'Ahulnaja častka šlachu tečki da ŭsich fajłaŭ dadzienych InnoDB.';
+$strInnoDBDataHomeDir = 'Chatniaja tečka dadzienych';
$strInnoDBPages = 'staronak';
$strInnodbStat = 'Stan InnoDB';
$strInsecureMySQL = 'Vaš kanfihuracyjny fajł utrymlivaje nałady (karystalnik root biez parolu), jakija adpaviadajuć pryvilejavanamu karystalniku MySQL pa zmoŭčańni. Vaš server MySQL pracuje z hetaj naładaj pa zmoŭčańni i źjaŭlajecca adkrytym dla źniešniaha ŭryvańnia, i tamu vam abaviazkova treba vypravić hetuju chibu ŭ biaśpiecy.';
@@ -431,7 +419,6 @@ $strKorean = 'Karejskaja';
$strLandscape = 'Krajavid';
$strLanguage = 'Mova';
$strLanguageUnknown = 'Nieviadomaja mova: %1$s.';
-$strLatchedPages = 'Fiksavanyja staronki';
$strLatexCaption = 'Zahałovak tablicy';
$strLatexContent = 'Źmieściva tablicy __TABLE__';
$strLatexContinuedCaption = 'Praciahnuty zahałovak tablicy';
@@ -440,6 +427,7 @@ $strLatexIncludeCaption = 'Uklučyć zahałovak tablicy';
$strLatexLabel = 'Kluč mietki';
$strLaTeX = 'LaTeX';
$strLatexStructure = 'Struktura tablicy __TABLE__';
+$strLatchedPages = 'Fiksavanyja staronki';
$strLatvian = 'Łatvijskaja';
$strLDI = 'CSV z vykarystańniem LOAD DATA';
$strLDILocal = 'Vykarystoŭvać klučavoje słova LOCAL';
@@ -468,9 +456,9 @@ $strMIME_available_mime = 'Dastupnyja MIME-typy';
$strMIME_available_transform = 'Dastupnyja pieraŭtvareńni';
$strMIME_description = 'Apisańnie';
$strMIME_MIMEtype = 'MIME-typ';
-$strMIME_nodescription = 'Niama dastupnych apisańniaŭ dla hetaha pieraŭtvareńnia.
+$strMIME_nodescription = 'Niama dastupnych apisańniaŭ dla hetaha pieraŭtvareńnia. Kali łaska, spytajcie aŭtara, što robić %s.';
$strMIME_transformation_note = 'Dla atrymańnia śpisu dastupnych opcyjaŭ transfarmacyi i pieraŭtvareńniaŭ ichnych MIME-typaŭ, naciśnicie na %sapisańni pieraŭtvareńniaŭ%s';
-$strMIME_transformation_options_note = 'Kali łaska, uvodźcie značeńni opcyjaŭ pieraŭtvareńnia vykarystoŭvajučy hety farmat: \'a\', 100, b,\'c\'...
+$strMIME_transformation_options_note = 'Kali łaska, uvodźcie značeńni opcyjaŭ pieraŭtvareńnia vykarystoŭvajučy hety farmat: \'a\', 100, b,\'c\'... Kali vam treba ŭžyć zvarotny słeš ("\") abo apostraf ("\'") u hetych značeńniach, ustaŭcie zvarotny słeš pierad imi (naprykład, \'\\\\xyz\' abo \'a\\\'b\').';
$strMIME_transformation_options = 'Opcyi pieraŭtvareńnia';
$strMIME_transformation = 'Pieraŭtvareńnie MIME-typu braŭzeram';
$strMIMETypesForTable = 'MIME-typy tablicy';
@@ -776,7 +764,7 @@ $strServerVars = 'Nałady i źmiennyja servera';
$strServerVersion = 'Versija servera';
$strSessionStartupErrorGeneral = 'Niemahčyma biez pamyłak raspačać sesiju. Kali łaska, praviercie pamyłki ŭ vašym łogu PHP i, mahčyma, taksama ŭ łogu web-servera i skanfihurujcie PHP pravilna.';
$strSessionValue = 'Značeńnie sesii';
-$strSetEnumVal = 'Kali typ pola "enum" abo "set", kali łaska, uvodźcie značeńni vykarystoŭvajučy hety farmat: \'a\',\'b\',\'c\'...
+$strSetEnumVal = 'Kali typ pola "enum" abo "set", kali łaska, uvodźcie značeńni vykarystoŭvajučy hety farmat: \'a\',\'b\',\'c\'... Kali vam patrebna ŭžyć zvarotny słeš ("\") abo apostraf ("\'") siarod hetych značeńniaŭ, pastaŭcie pierad imi zvarotny słeš (naprykład, \'\\\\xyz\' abo \'a\\\'b\').';
$strShowAll = 'Pakazać usie';
$strShowColor = 'Pakazać koler';
$strShowDatadictAs = 'Farmat słoŭnika dadzienych';
@@ -928,9 +916,9 @@ $strSQPBugInvalidIdentifer = 'Niapravilny identyfikatar';
$strSQPBugUnclosedQuote = 'Niezakrytaje dvukośsie';
$strSQPBugUnknownPunctuation = 'Nieviadomy symbal punktuacyi';
$strStandInStructureForView = 'Zamianialnaja struktura dla prahladu';
-$strStatCheckTime = 'Apošniaja pravierka';
$strStatCreateTime = 'Stvoranaja';
$strStatement = 'Vyrazy';
+$strStatCheckTime = 'Apošniaja pravierka';
$strStatisticsOverrun = 'Na zahružanym servery bajtavyja ličylniki mohuć pieraskokvać koła, tamu statystyka, jakuju pakazvaje MySQL-server, moža być niapravilnaj.';
$strStatUpdateTime = 'Apošniaje abnaŭleńnie';
$strStatus = 'Stan';
@@ -975,7 +963,7 @@ $strTable = 'Tablica';
$strTakeIt = 'hetaja';
$strTblPrivileges = 'Pryvilei, specyfičnyja dla tablicy';
$strTempData = 'Časovyja dadzienyja';
-$strTextAreaLength = ' Z-za vialikaj daŭžyni,
+$strTextAreaLength = ' Z-za vialikaj daŭžyni, hetaje pole nia moža być adredagavanaje ';
$strTexyText = 'Tekst Texy!';
$strThai = 'Tajlandzkaja';
$strThemeDefaultNotFound = 'Tema pa zmoŭčańni %s nia znojdzienaja!';
@@ -1111,7 +1099,7 @@ $strCouldNotConnectTarget = 'Could not connect to the target'; //to translate
$strCreateUserDatabasePrivileges = 'Grant all privileges on database "%s"'; //to translate
$strCurrentServer = 'Current server'; //to translate
-$strDatabaseNotExisting = '\'%s\' database does not exist.'; //to translate
+$strDatabaseNotExisting = '\'%s\' database does not exist.'; //to translate
$strDatabase_src = 'Source database'; //to translate
$strDatabase_trg = 'Target database'; //to translate
$strDataDiff = 'Data Difference'; //to translate
@@ -1166,11 +1154,11 @@ $strRemoteServer = 'Remote server'; //to translate
$strRemoveCRLF = 'Remove CRLF characters within fields'; //to translate
$strReplicationAddLines = 'Now, add the following lines at the end of your my.cnf and please restart the MySQL server afterwards.'; //to translate
$strReplicationAddSlaveUser = 'Add slave replication user'; //to translate
-$strReplicationChangedSuccesfully = 'Master server changed succesfully to %s'; //to translate
$strReplicationConfiguredMaster = 'This server is configured as master in a replication process.'; //to translate
$strReplicationControlSlave = 'Control slave:'; //to translate
$strReplicationErrorGetPosition = 'Unable to read master log position. Possible privilege problem on master.'; //to translate
$strReplicationErrorMasterConnect = 'Unable to connect to master %s.'; //to translate
+$strReplicationChangedSuccesfully = 'Master server changed succesfully to %s'; //to translate
$strReplicationMasterChooseAll = 'Replicate all databases; Ignore:'; //to translate
$strReplicationMasterChooseIgn = 'Ignore all databases; Replicate:'; //to translate
$strReplicationMasterChooseMode = 'This server is not configured as master server in a replication process. You can choose from either replicating all databases and ignoring certain (useful if you want to replicate majority of databases) or you can choose to ignore all databases by default and allow only certain databases to be replicated. Please select the mode:'; //to translate
@@ -1183,10 +1171,10 @@ $strReplicationShowConnectedSlavesNote = 'Only slaves started with the --report-
$strReplicationShowConnectedSlaves = 'Show connected slaves'; //to translate
$strReplicationShowMasterStatus = 'Show master status'; //to translate
$strReplicationSkippingErrorWarn = 'Skipping error(s) might lead into unsynchronized master and slave!'; //to translate
-$strReplicationSlaveChangeMaster = 'Change or reconfigure master server'; //to translate
$strReplicationSlaveConfiguration = 'Slave configuration'; //to translate
$strReplicationSlaveConfigured = 'Server is configured as slave in a replication process. Would you like to:'; //to translate
$strReplicationSlaveErrorManagement = 'Error management:'; //to translate
+$strReplicationSlaveChangeMaster = 'Change or reconfigure master server'; //to translate
$strReplicationSlaveIOThread = 'IO Thread %s only'; //to translate
$strReplicationSlaveNotConfigured = 'This server is not configured as slave in a replication process. Would you like to <a href="%s">configure</a> it?'; //to translate
$strReplicationSlaveReset = 'Reset slave'; //to translate
@@ -1225,13 +1213,6 @@ $strSetupBZipDump_name = 'Bzip2'; //to translate
$strSetupBZipDumpWarning = '[a@?page=form&formset=features#tab_Import_export]Bzip2 compression and decompression[/a] requires functions (%s) which are unavailable on this system.'; //to translate
$strSetupCannotLoadConfig = 'Cannot load or save configuration'; //to translate
$strSetupCannotLoadConfigMsg = 'Please create web server writable folder [em]config[/em] in phpMyAdmin top level directory as described in [a@../Documentation.html#setup_script]documentation[/a]. Otherwise you will be only able to download or display it.'; //to translate
-$strSetupCharEditing_desc = 'Defines which type of editing controls should be used for CHAR and VARCHAR fields; [kbd]input[/kbd] - allows limiting of input length, [kbd]textarea[/kbd] - allows newlines in fields'; //to translate
-$strSetupCharEditing_name = 'CHAR fields editing'; //to translate
-$strSetupCharTextareaCols_desc = 'Number of columns for CHAR/VARCHAR textareas'; //to translate
-$strSetupCharTextareaCols_name = 'CHAR textarea columns'; //to translate
-$strSetupCharTextareaRows_desc = 'Number of rows for CHAR/VARCHAR textareas'; //to translate
-$strSetupCharTextareaRows_name = 'CHAR textarea rows'; //to translate
-$strSetupCheckConfigurationPermissions_name = 'Check config file permissions'; //to translate
$strSetupClear = 'Clear'; //to translate
$strSetupCompressOnFly_desc = 'Compress gzip/bzip2 exports on the fly without the need for much memory; if you encounter problems with created gzip/bzip2 files disable this feature'; //to translate
$strSetupCompressOnFly_name = 'Compress on the fly'; //to translate
@@ -1273,12 +1254,12 @@ $strSetuperror_nan_p = 'Not a positive number'; //to translate
$strSetupExecTimeLimit_desc = 'Set the number of seconds a script is allowed to run ([kbd]0[/kbd] for no limit)'; //to translate
$strSetupExecTimeLimit_name = 'Maximum execution time'; //to translate
$strSetupExport_asfile_name = 'Save as file'; //to translate
-$strSetupExport_charset_name = 'Character set of the file'; //to translate
$strSetupExport_compression_name = 'Compression'; //to translate
$strSetupExport_file_template_database_name = 'Database name template'; //to translate
$strSetupExport_file_template_server_name = 'Server name template'; //to translate
$strSetupExport_file_template_table_name = 'Table name template'; //to translate
$strSetupExport_format_name = 'Format'; //to translate
+$strSetupExport_charset_name = 'Character set of the file'; //to translate
$strSetupExport_onserver_name = 'Save on server'; //to translate
$strSetupExport_onserver_overwrite_name = 'Overwrite existing file(s)'; //to translate
$strSetupExport_remember_file_template_name = 'Remember file name template'; //to translate
@@ -1341,6 +1322,13 @@ $strSetupGZipDump_desc = 'Enable [a@http://en.wikipedia.org/wiki/Gzip]gzip[/a] c
$strSetupGZipDump_name = 'GZip'; //to translate
$strSetupGZipDumpWarning = '[a@?page=form&formset=features#tab_Import_export]GZip compression and decompression[/a] requires functions (%s) which are unavailable on this system.'; //to translate
$strSetupHomepageLink = 'phpMyAdmin homepage'; //to translate
+$strSetupCharEditing_desc = 'Defines which type of editing controls should be used for CHAR and VARCHAR fields; [kbd]input[/kbd] - allows limiting of input length, [kbd]textarea[/kbd] - allows newlines in fields'; //to translate
+$strSetupCharEditing_name = 'CHAR fields editing'; //to translate
+$strSetupCharTextareaCols_desc = 'Number of columns for CHAR/VARCHAR textareas'; //to translate
+$strSetupCharTextareaCols_name = 'CHAR textarea columns'; //to translate
+$strSetupCharTextareaRows_desc = 'Number of rows for CHAR/VARCHAR textareas'; //to translate
+$strSetupCharTextareaRows_name = 'CHAR textarea rows'; //to translate
+$strSetupCheckConfigurationPermissions_name = 'Check config file permissions'; //to translate
$strSetupIconvExtraParams_name = 'Extra parameters for iconv'; //to translate
$strSetupIgnoreErrors = 'Ignore errors'; //to translate
$strSetupIgnoreMultiSubmitErrors_desc = 'If enabled, phpMyAdmin continues computing multiple-statement queries even if one of the queries failed'; //to translate
@@ -1388,10 +1376,10 @@ $strSetupLoginCookieStore_name = 'Login cookie store'; //to translate
$strSetupLoginCookieValidity_desc = 'Define how long (in seconds) a login cookie is valid'; //to translate
$strSetupLoginCookieValidityMsg = '[a@?page=form&formset=features#tab_Security]Login cookie validity[/a] should be should be set to 1800 seconds (30 minutes) at most. Values larger than 1800 may pose a security risk such as impersonation.'; //to translate
$strSetupLoginCookieValidity_name = 'Login cookie validity'; //to translate
-$strSetupMaxCharactersInDisplayedSQL_desc = 'Maximum number of characters used when a SQL query is displayed'; //to translate
-$strSetupMaxCharactersInDisplayedSQL_name = 'Maximum displayed SQL length'; //to translate
$strSetupMaxDbList_desc = 'Maximum number of databases displayed in left frame and database list'; //to translate
$strSetupMaxDbList_name = 'Maximum databases'; //to translate
+$strSetupMaxCharactersInDisplayedSQL_desc = 'Maximum number of characters used when a SQL query is displayed'; //to translate
+$strSetupMaxCharactersInDisplayedSQL_name = 'Maximum displayed SQL length'; //to translate
$strSetupMaxRows_desc = 'Number of rows displayed when browsing a result set. If the result set contains more rows, "Previous" and "Next" links will be shown.'; //to translate
$strSetupMaxRows_name = 'Maximum number of rows to display'; //to translate
$strSetupMaxTableList_desc = 'Maximum number of tables displayed in table list'; //to translate
@@ -1498,20 +1486,20 @@ $strSetupServers_table_info_desc = 'Table to describe the display fields, leave
$strSetupServers_table_info_name = 'Display fields table'; //to translate
$strSetupServers_user_desc = 'Leave empty if not using config auth'; //to translate
$strSetupServers_user_name = 'User for config auth'; //to translate
+$strSetupServers_verbose_desc = 'A user-friendly description of this server. Leave blank to display the hostname instead.'; //to translate
$strSetupServers_verbose_check_desc = 'Disable if you know that your pma_* tables are up to date. This prevents compatibility checks and thereby increases performance'; //to translate
$strSetupServers_verbose_check_name = 'Verbose check'; //to translate
-$strSetupServers_verbose_desc = 'A user-friendly description of this server. Leave blank to display the hostname instead.'; //to translate
$strSetupServers_verbose_name = 'Verbose name of this server'; //to translate
$strSetupSetValue = 'Set value: %s'; //to translate
$strSetupShowAll_desc = 'Whether a user should be displayed a "show all (records)" button'; //to translate
$strSetupShowAll_name = 'Allow to display all the rows'; //to translate
-$strSetupShowChgPassword_desc = 'Please note that enabling this has no effect with [kbd]config[/kbd] authentication mode because the password is hard coded in the configuration file; this does not limit the ability to execute the same command directly'; //to translate
-$strSetupShowChgPassword_name = 'Show password change form'; //to translate
$strSetupShowCreateDb_name = 'Show create database form'; //to translate
$strSetupShowForm = 'Show form'; //to translate
$strSetupShowFunctionFields_desc = 'Display the function fields in edit/insert mode'; //to translate
$strSetupShowFunctionFields_name = 'Show function fields'; //to translate
$strSetupShowHiddenMessages = 'Show hidden messages (#MSG_COUNT)'; //to translate
+$strSetupShowChgPassword_desc = 'Please note that enabling this has no effect with [kbd]config[/kbd] authentication mode because the password is hard coded in the configuration file; this does not limit the ability to execute the same command directly'; //to translate
+$strSetupShowChgPassword_name = 'Show password change form'; //to translate
$strSetupShowPhpInfo_desc = 'Shows link to [a@http://php.net/manual/function.phpinfo.php]phpinfo()[/a] output'; //to translate
$strSetupShowPhpInfo_name = 'Show phpinfo() link'; //to translate
$strSetupShowServerInfo_name = 'Show detailed MySQL server information'; //to translate
hooks/post-receive
--
phpMyAdmin
1
0