Version Notes
Public Version 1.0
version supports magento community version form 1.5.0.0 to 1.7.0.0
Download this release
Release Info
Developer | Tonbo Team |
Extension | TonboColorPicker |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit.php +44 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit/Tab/Options.php +143 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit/Tabs.php +57 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form.php +57 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/AllowedAfter.php +240 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/AllowedList.php +100 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/ZoomImage.php +46 -0
- app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Upload/Form.php +85 -0
- app/code/community/Tonbo/ColorPicker/Block/Catalog/Layer/Filter/Attribute.php +60 -0
- app/code/community/Tonbo/ColorPicker/Block/Catalog/Layer/State.php +70 -0
- app/code/community/Tonbo/ColorPicker/Block/Catalog/Product/Configurable.php +162 -0
- app/code/community/Tonbo/ColorPicker/Block/Checkout/Cart/Item/Renderer/Configurable.php +74 -0
- app/code/community/Tonbo/ColorPicker/Block/Search/Layer/Filter/Attribute.php +61 -0
- app/code/community/Tonbo/ColorPicker/Helper/Data.php +339 -0
- app/code/community/Tonbo/ColorPicker/LICENSE.txt +48 -0
- app/code/community/Tonbo/ColorPicker/Model/Adminhtml/AllowedList.php +141 -0
- app/code/community/Tonbo/ColorPicker/Model/Adminhtml/ListSave.php +58 -0
- app/code/community/Tonbo/ColorPicker/Model/Catalog/Product/Type/Configurable.php +87 -0
- app/code/community/Tonbo/ColorPicker/Model/Color/Image.php +382 -0
- app/code/community/Tonbo/ColorPicker/Model/Color/Value.php +132 -0
- app/code/community/Tonbo/ColorPicker/Model/Library/Abstract.php +100 -0
- app/code/community/Tonbo/ColorPicker/Model/Library/Color.php +51 -0
- app/code/community/Tonbo/ColorPicker/Model/Library/Interface.php +68 -0
- app/code/community/Tonbo/ColorPicker/Model/Library/Option.php +51 -0
- app/code/community/Tonbo/ColorPicker/Model/Mapper.php +127 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Catalog/Eav/Mysql4/Attribute.php +261 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Color/Value.php +74 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Color/Value/Collection.php +53 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Translate.php +38 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Translation.php +54 -0
- app/code/community/Tonbo/ColorPicker/Model/Resource/Translation/Collection.php +56 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate.php +49 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/Entity.php +119 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/EntityInterface.php +58 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/Register.php +140 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Abstract.php +106 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Color.php +76 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Option.php +108 -0
- app/code/community/Tonbo/ColorPicker/Model/Translate/SourceInterface.php +39 -0
- app/code/community/Tonbo/ColorPicker/Model/Translation.php +39 -0
- app/code/community/Tonbo/ColorPicker/controllers/Adminhtml/TonboController.php +150 -0
- app/code/community/Tonbo/ColorPicker/etc/config.xml +158 -0
- app/code/community/Tonbo/ColorPicker/etc/libraries/color_lib.xml +46 -0
- app/code/community/Tonbo/ColorPicker/etc/libraries/option_lib.xml +2124 -0
- app/code/community/Tonbo/ColorPicker/etc/system.xml +80 -0
- app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-data-upgrade-1.0.0.0-1.0.0.1.php +29 -0
- app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-data-upgrade-1.0.0.1-1.0.0.2.php +28 -0
- app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-install-1.0.0.0.php +62 -0
- app/design/adminhtml/default/default/layout/colorpicker.xml +32 -0
- app/design/adminhtml/default/default/template/tonbo_colorpicker/allowed_after.phtml +164 -0
- app/design/adminhtml/default/default/template/tonbo_colorpicker/color_picker.phtml +432 -0
- app/design/adminhtml/default/default/template/tonbo_colorpicker/options.phtml +312 -0
- app/design/adminhtml/default/default/template/tonbo_colorpicker/upload_form.phtml +24 -0
- app/design/adminhtml/default/default/template/tonbo_colorpicker/zoom_image_after.phtml +157 -0
- app/design/frontend/base/default/layout/colorpicker.xml +30 -0
- app/design/frontend/base/default/template/tonbo_colorpicker/cart_item_default.phtml +314 -0
- app/design/frontend/base/default/template/tonbo_colorpicker/catalog_layer_filter.phtml +99 -0
- app/design/frontend/base/default/template/tonbo_colorpicker/catalog_layer_sate.phtml +76 -0
- app/design/frontend/base/default/template/tonbo_colorpicker/options_configurable.phtml +240 -0
- app/etc/modules/Tonbo_ColorPicker.xml +35 -0
- app/locale/de_DE/Tonbo_ColorPicker.csv +44 -0
- app/locale/en_CA/Tonbo_ColorPicker.csv +44 -0
- app/locale/en_GB/Tonbo_ColorPicker.csv +44 -0
- app/locale/en_US/Tonbo_ColorPicker.csv +44 -0
- app/locale/es_AR/Tonbo_ColorPicker.csv +44 -0
- app/locale/es_CO/Tonbo_ColorPicker.csv +44 -0
- app/locale/es_ES/Tonbo_ColorPicker.csv +44 -0
- app/locale/es_MX/Tonbo_ColorPicker.csv +44 -0
- app/locale/fr_CA/Tonbo_ColorPicker.csv +44 -0
- app/locale/fr_FR/Tonbo_ColorPicker.csv +44 -0
- app/locale/it_IT/Tonbo_ColorPicker.csv +44 -0
- app/locale/nl_NL/Tonbo_ColorPicker.csv +44 -0
- app/locale/pt_BR/Tonbo_ColorPicker.csv +44 -0
- app/locale/pt_PT/Tonbo_ColorPicker.csv +44 -0
- app/locale/ru_RU/Tonbo_ColorPicker.csv +44 -0
- app/locale/uk_UA/Tonbo_ColorPicker.csv +44 -0
- js/colorpicker/colormethods.js +266 -0
- js/colorpicker/colorpicker.js +626 -0
- js/colorpicker/colorvaluepicker.js +182 -0
- js/colorpicker/slider.js +274 -0
- package.xml +20 -0
- skin/adminhtml/default/default/images/colorpicker/bar-blue-bl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-blue-br.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-blue-tl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-blue-tr.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-brightness.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-green-bl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-green-br.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-green-tl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-green-tr.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-hue.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-red-bl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-red-br.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-red-tl.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-red-tr.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/bar-saturation.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/blank.gif +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-blue-max.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-blue-min.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-brightness.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-green-max.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-green-min.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-hue.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-red-max.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-red-min.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-saturation-overlay.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/map-saturation.png +0 -0
- skin/adminhtml/default/default/images/colorpicker/mappoint.gif +0 -0
- skin/adminhtml/default/default/images/colorpicker/rangearrows.gif +0 -0
- skin/adminhtml/default/default/images/colorpicker/warning.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/close.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/edit.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/editRetina.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/error.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/errorRetina.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/full-arrow-left.gif +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/full-arrow.gif +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/leopard.jpg +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/leopard_small.jpg +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/newAttrRetina.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/success.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/successRetina.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/img/tnb_delete_btn.png +0 -0
- skin/adminhtml/default/default/tonbo-colorpicker/styles.css +415 -0
- skin/frontend/base/default/tonbo-colorpicker/css/styles.css +155 -0
- skin/frontend/base/default/tonbo-colorpicker/img/empty.png +0 -0
- skin/frontend/base/default/tonbo-colorpicker/img/empty_small.png +0 -0
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Product attribute edit page
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit
|
30 |
+
extends Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* @return Mage_Core_Block_Abstract
|
34 |
+
*/
|
35 |
+
protected function _prepareLayout()
|
36 |
+
{
|
37 |
+
$this->getLayout()->getBlock('head')->addItem('skin_css', 'tonbo-colorpicker/styles.css');
|
38 |
+
$this->getLayout()->getBlock('head')->addJs('colorpicker/colormethods.js');
|
39 |
+
$this->getLayout()->getBlock('head')->addJs('colorpicker/colorvaluepicker.js');
|
40 |
+
$this->getLayout()->getBlock('head')->addJs('colorpicker/slider.js');
|
41 |
+
$this->getLayout()->getBlock('head')->addJs('colorpicker/colorpicker.js');
|
42 |
+
return parent::_prepareLayout();
|
43 |
+
}
|
44 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit/Tab/Options.php
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Product attribute add/edit form options tab
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tab_Options
|
30 |
+
extends Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Init custom template
|
34 |
+
*/
|
35 |
+
public function __construct()
|
36 |
+
{
|
37 |
+
parent::__construct();
|
38 |
+
/** @var $helper Tonbo_ColorPicker_Helper_Data */
|
39 |
+
$helper = Mage::helper('colorpicker');
|
40 |
+
if ($this->getAttributeObject()->getId()
|
41 |
+
&& in_array($this->getAttributeObject()->getId(), $helper->getAssignedAttributes())
|
42 |
+
) {
|
43 |
+
$this->setTemplate('tonbo_colorpicker/options.phtml');
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get color picker helper
|
49 |
+
*
|
50 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
51 |
+
*/
|
52 |
+
public function getColorPickerHelper()
|
53 |
+
{
|
54 |
+
return Mage::helper('colorpicker');
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Preparing layout, adding color picker element
|
59 |
+
*
|
60 |
+
* @return Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tab_Options
|
61 |
+
*/
|
62 |
+
protected function _prepareLayout()
|
63 |
+
{
|
64 |
+
$this->getLayout()->addBlock('adminhtml/template', 'color_picker')
|
65 |
+
->setTemplate('tonbo_colorpicker/color_picker.phtml');
|
66 |
+
return parent::_prepareLayout();
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get color picker value type
|
71 |
+
*
|
72 |
+
* @param bool|Tonbo_ColorPicker_Model_Color_Value $item
|
73 |
+
* @return int
|
74 |
+
*/
|
75 |
+
public function getValueType($item = false)
|
76 |
+
{
|
77 |
+
if ($item instanceof Tonbo_ColorPicker_Model_Color_Value) {
|
78 |
+
$result = $item->getColorType();
|
79 |
+
} else {
|
80 |
+
$result = Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE;
|
81 |
+
}
|
82 |
+
return $result;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Get options values
|
87 |
+
*
|
88 |
+
* @return array
|
89 |
+
*/
|
90 |
+
public function getOptionValues()
|
91 |
+
{
|
92 |
+
$attributes = $this->getAttributeObject();
|
93 |
+
if (!$attributes->getId()) {
|
94 |
+
return parent::getOptionValues();
|
95 |
+
}
|
96 |
+
$this->_initColorValueCollection($attributes);
|
97 |
+
$values = parent::getOptionValues();
|
98 |
+
foreach ($values as $option) {
|
99 |
+
/** @var $colorAttribute Tonbo_ColorPicker_Model_Color_Value */
|
100 |
+
$colorAttribute = $this->getColorPickerHelper()->getColorItemByOption($option->getId());
|
101 |
+
$typeId = $this->getValueType($colorAttribute);
|
102 |
+
$option->setValueType($typeId);
|
103 |
+
$option->setIsDetected(!$colorAttribute ? $this->getColorPickerHelper()->getWarningImage() : '');
|
104 |
+
|
105 |
+
switch ($typeId) {
|
106 |
+
case Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE:
|
107 |
+
try {
|
108 |
+
$option->setColorValueImage(
|
109 |
+
$colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute)
|
110 |
+
);
|
111 |
+
$option->setColorImage($colorAttribute->getColorImage());
|
112 |
+
$option->setColorValue($colorAttribute ? $colorAttribute->getColorValue() : '');
|
113 |
+
} catch (Exception $e) {
|
114 |
+
$option->setValueType(Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE);
|
115 |
+
$option->setIsDetected($this->getColorPickerHelper()->getWarningImage());
|
116 |
+
}
|
117 |
+
break;
|
118 |
+
case Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE:
|
119 |
+
$option->setColorValue($colorAttribute ? $colorAttribute->getColorValue() : '');
|
120 |
+
break;
|
121 |
+
default:
|
122 |
+
Mage::throwException('Color value type was not recognized:' . ' ' . $typeId);
|
123 |
+
break;
|
124 |
+
}
|
125 |
+
}
|
126 |
+
return $values;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Initialize color value collection
|
131 |
+
*
|
132 |
+
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
133 |
+
* @return $this
|
134 |
+
*/
|
135 |
+
protected function _initColorValueCollection(Mage_Catalog_Model_Resource_Eav_Attribute $attribute)
|
136 |
+
{
|
137 |
+
/** @var Tonbo_ColorPicker_Model_Resource_Color_Value_Collection $collection */
|
138 |
+
$collection = Mage::getModel('colorpicker_resource/color_value_collection');
|
139 |
+
$colorValues = $collection->loadCollectionByAttribute($attribute);
|
140 |
+
$this->getColorPickerHelper()->setColorCollection($colorValues);
|
141 |
+
return $this;
|
142 |
+
}
|
143 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Catalog/Product/Attribute/Edit/Tabs.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Product attribute options tab block
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tabs
|
30 |
+
extends Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tabs
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Parent method overridden to make it possible to active options tab
|
34 |
+
*
|
35 |
+
* @return Mage_Core_Block_Abstract
|
36 |
+
*/
|
37 |
+
protected function _beforeToHtml()
|
38 |
+
{
|
39 |
+
$isOpenedOptionTab = (bool)$this->getRequest()->getParam('open_options_tab', false);
|
40 |
+
$this->addTab('main', array(
|
41 |
+
'label' => Mage::helper('catalog')->__('Properties'),
|
42 |
+
'title' => Mage::helper('catalog')->__('Properties'),
|
43 |
+
'content' => $this->getLayout()
|
44 |
+
->createBlock('adminhtml/catalog_product_attribute_edit_tab_main')->toHtml(),
|
45 |
+
'active' => !$isOpenedOptionTab
|
46 |
+
));
|
47 |
+
|
48 |
+
$this->addTab('labels', array(
|
49 |
+
'label' => Mage::helper('catalog')->__('Manage Label / Options'),
|
50 |
+
'title' => Mage::helper('catalog')->__('Manage Label / Options'),
|
51 |
+
'content' => $this->getLayout()
|
52 |
+
->createBlock('adminhtml/catalog_product_attribute_edit_tab_options')->toHtml(),
|
53 |
+
'active' => $isOpenedOptionTab
|
54 |
+
));
|
55 |
+
return Mage_Adminhtml_Block_Widget_Tabs::_beforeToHtml();
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attribute config form element renderer
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form
|
30 |
+
extends Mage_Adminhtml_Block_System_Config_Form
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Add additional elements
|
34 |
+
*
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
protected function _getAdditionalElementTypes()
|
38 |
+
{
|
39 |
+
return array(
|
40 |
+
'attribute_list' => Mage::getConfig()
|
41 |
+
->getBlockClassName('colorpicker/adminhtml_system_config_form_attribute_allowedList'),
|
42 |
+
'zoom_image' => Mage::getConfig()
|
43 |
+
->getBlockClassName('colorpicker/adminhtml_system_config_form_attribute_zoomImage'),
|
44 |
+
) + parent::_getAdditionalElementTypes();
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Preparing global layout
|
49 |
+
*
|
50 |
+
* @return Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form
|
51 |
+
*/
|
52 |
+
protected function _prepareLayout()
|
53 |
+
{
|
54 |
+
$this->getLayout()->getBlock('head')->addItem('skin_css', 'tonbo-colorpicker/styles.css');
|
55 |
+
return parent::_prepareLayout();
|
56 |
+
}
|
57 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/AllowedAfter.php
ADDED
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes selector element
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedAfter extends Mage_Core_Block_Template
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Assigned element list
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
protected $_assignedList = array();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Allowed elements list
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
protected $_allowedList = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Allowed list html id
|
47 |
+
*/
|
48 |
+
const LIST_ALLOWED_ID = 'allowed_list';
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Assigned list html id
|
52 |
+
*/
|
53 |
+
const LIST_ASSIGNED_ID = 'assigned_list';
|
54 |
+
|
55 |
+
/**
|
56 |
+
* List element id prefix
|
57 |
+
*/
|
58 |
+
const LIST_ELEMENT_ID_PREFIX = 'list_element_';
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Parent control element
|
62 |
+
*
|
63 |
+
* @var Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedList
|
64 |
+
*/
|
65 |
+
protected $_parentElement;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Init list of elements
|
69 |
+
*/
|
70 |
+
public function _construct()
|
71 |
+
{
|
72 |
+
$this->setTemplate('tonbo_colorpicker/allowed_after.phtml');
|
73 |
+
parent::_construct();
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Create list of elements to manipulate with
|
78 |
+
*
|
79 |
+
* @return string
|
80 |
+
*/
|
81 |
+
protected function _createManipulationList()
|
82 |
+
{
|
83 |
+
$assignedList = $this->getValue();
|
84 |
+
if (!is_array($assignedList)) {
|
85 |
+
$assignedList = explode(',', $assignedList);
|
86 |
+
}
|
87 |
+
|
88 |
+
$allowedList = $this->getValues();
|
89 |
+
|
90 |
+
foreach ($allowedList as $option) {
|
91 |
+
if (in_array((string)$option['value'], $assignedList)) {
|
92 |
+
$this->_assignedList[] = $option;
|
93 |
+
} else {
|
94 |
+
$this->_allowedList[] = $option;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Allowed list id
|
102 |
+
*
|
103 |
+
* @return string
|
104 |
+
*/
|
105 |
+
public function getAllowedListId()
|
106 |
+
{
|
107 |
+
return self::LIST_ALLOWED_ID;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Assigned list id
|
112 |
+
*
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public function getAssignedListId()
|
116 |
+
{
|
117 |
+
return self::LIST_ASSIGNED_ID;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Element id prefix
|
122 |
+
*
|
123 |
+
* @return string
|
124 |
+
*/
|
125 |
+
public function getListElementPrefixId()
|
126 |
+
{
|
127 |
+
return self::LIST_ELEMENT_ID_PREFIX;
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Element initialization
|
132 |
+
*
|
133 |
+
* @return Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedAfter
|
134 |
+
*/
|
135 |
+
public function initData()
|
136 |
+
{
|
137 |
+
$this->_createManipulationList();
|
138 |
+
return $this;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Get available elements list (elements that are not assigned)
|
143 |
+
*
|
144 |
+
* @return array
|
145 |
+
*/
|
146 |
+
public function getAllowedList()
|
147 |
+
{
|
148 |
+
return $this->_allowedList;
|
149 |
+
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Get list of assigned attributes
|
153 |
+
*
|
154 |
+
* @return array
|
155 |
+
*/
|
156 |
+
public function getAssignedList()
|
157 |
+
{
|
158 |
+
return $this->_assignedList;
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Get element values
|
163 |
+
*
|
164 |
+
* @return array
|
165 |
+
*/
|
166 |
+
public function getValues()
|
167 |
+
{
|
168 |
+
return $this->getParentElement()->getValues();
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Get selected value
|
173 |
+
*
|
174 |
+
* @return string
|
175 |
+
*/
|
176 |
+
public function getValue()
|
177 |
+
{
|
178 |
+
return $this->getParentElement()->getValue();
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Get html element id
|
183 |
+
*
|
184 |
+
* @return int|string
|
185 |
+
*/
|
186 |
+
public function getHtmlId()
|
187 |
+
{
|
188 |
+
return $this->getParentElement()->getHtmlId();
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Get parent element
|
193 |
+
*
|
194 |
+
* @return \Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedList
|
195 |
+
*/
|
196 |
+
public function getParentElement()
|
197 |
+
{
|
198 |
+
if (null === $this->_parentElement) {
|
199 |
+
Mage::throwException('Parent element has not been set');
|
200 |
+
}
|
201 |
+
return $this->_parentElement;
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* Set parent element
|
206 |
+
*
|
207 |
+
* @param \Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedList $parentElement
|
208 |
+
* @return \Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedAfter
|
209 |
+
*/
|
210 |
+
public function setParentElement($parentElement)
|
211 |
+
{
|
212 |
+
$this->_parentElement = $parentElement;
|
213 |
+
return $this;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Get edit attribute url
|
218 |
+
*
|
219 |
+
* @param int $attributeId
|
220 |
+
* @return string
|
221 |
+
*/
|
222 |
+
public function getOptionEditUrl($attributeId)
|
223 |
+
{
|
224 |
+
return Mage::getSingleton('adminhtml/url')->getUrl('*/catalog_product_attribute/edit', array(
|
225 |
+
'attribute_id' => $attributeId,
|
226 |
+
'open_options_tab' => 1
|
227 |
+
));
|
228 |
+
}
|
229 |
+
|
230 |
+
/**
|
231 |
+
* Get attribute option status
|
232 |
+
*
|
233 |
+
* @param int $attributeId
|
234 |
+
* @return string
|
235 |
+
*/
|
236 |
+
public function getAttributeStatus($attributeId)
|
237 |
+
{
|
238 |
+
return Mage::helper('colorpicker')->isOptionsMapped($attributeId) ? 'options-detected' : 'options-not-detected';
|
239 |
+
}
|
240 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/AllowedList.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes selector element
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedList
|
30 |
+
extends Varien_Data_Form_Element_Multiselect
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Auto assign flag
|
34 |
+
*
|
35 |
+
* @var bool
|
36 |
+
*/
|
37 |
+
protected $_autoAssignFlag = false;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Get element html attributes
|
41 |
+
*
|
42 |
+
* @return array
|
43 |
+
*/
|
44 |
+
public function getHtmlAttributes()
|
45 |
+
{
|
46 |
+
return array_merge(parent::getHtmlAttributes(), array('hidden', 'type'));
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get element html
|
51 |
+
*
|
52 |
+
* @return string
|
53 |
+
*/
|
54 |
+
public function getElementHtml()
|
55 |
+
{
|
56 |
+
$this->_autoAssign()->setHidden('true')->setCanBeEmpty(true);
|
57 |
+
return parent::getElementHtml();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get after element html
|
62 |
+
*
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function getAfterElementHtml()
|
66 |
+
{
|
67 |
+
$html = Mage::app()->getLayout()->createBlock(
|
68 |
+
'colorpicker/adminhtml_system_config_form_attribute_allowedAfter',
|
69 |
+
'allowed_after'
|
70 |
+
)->setParentElement($this)->initData()->toHtml();
|
71 |
+
return $html . parent::getAfterElementHtml();
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Auto assign attributes if no attribute was set
|
76 |
+
*
|
77 |
+
* @return \Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedList
|
78 |
+
*/
|
79 |
+
protected function _autoAssign()
|
80 |
+
{
|
81 |
+
if ('' === trim($this->getValue())) {
|
82 |
+
$autoMapResult = Mage::getModel('colorpicker/adminhtml_allowedList')->getMappedAttributes();
|
83 |
+
if (count($autoMapResult)) {
|
84 |
+
$this->_autoAssignFlag = true;
|
85 |
+
$this->setValue(implode(',', array_keys($autoMapResult)));
|
86 |
+
}
|
87 |
+
}
|
88 |
+
return $this;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Get auto assign flag
|
93 |
+
*
|
94 |
+
* @return boolean
|
95 |
+
*/
|
96 |
+
public function isAutoAssign()
|
97 |
+
{
|
98 |
+
return $this->_autoAssignFlag;
|
99 |
+
}
|
100 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/System/Config/Form/Attribute/ZoomImage.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color zoom image display option selector
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_ZoomImage
|
30 |
+
extends Varien_Data_Form_Element_Select
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Get after element html
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function getAfterElementHtml()
|
38 |
+
{
|
39 |
+
$html = Mage::app()->getLayout()->createBlock(
|
40 |
+
'core/template',
|
41 |
+
'zoom_after'
|
42 |
+
)->setTemplate('tonbo_colorpicker/zoom_image_after.phtml')
|
43 |
+
->setParentElement($this)->toHtml();
|
44 |
+
return $html . parent::getAfterElementHtml();
|
45 |
+
}
|
46 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Adminhtml/Upload/Form.php
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Upload From Block
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Adminhtml_Upload_Form extends Mage_Adminhtml_Block_Template
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Block template
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
protected $_template = 'tonbo_colorpicker/upload_form.phtml';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get form fields
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
public function getFormData()
|
44 |
+
{
|
45 |
+
$form = new Varien_Data_Form();
|
46 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend' => $this->__('Upload Information')));
|
47 |
+
|
48 |
+
$fieldset->addField('option_id', 'hidden', array(
|
49 |
+
'name' => 'option_id',
|
50 |
+
));
|
51 |
+
|
52 |
+
$fieldset->addField('attribute_id', 'hidden', array(
|
53 |
+
'name' => 'attribute_id',
|
54 |
+
));
|
55 |
+
|
56 |
+
$fieldset->addField('image_path', 'hidden', array(
|
57 |
+
'name' => 'image_path',
|
58 |
+
'value' => $this->getImagePath()
|
59 |
+
));
|
60 |
+
|
61 |
+
$fieldset->addField('image_url', 'hidden', array(
|
62 |
+
'name' => 'image_url',
|
63 |
+
'value' => $this->getImageUrl()
|
64 |
+
));
|
65 |
+
|
66 |
+
$fieldset->addField('color_image', 'file', array(
|
67 |
+
'name' => 'color_image',
|
68 |
+
'label' => $this->__('File to upload'),
|
69 |
+
'title' => $this->__('File to upload'),
|
70 |
+
));
|
71 |
+
|
72 |
+
$fieldset->addField('form_key', 'hidden', array(
|
73 |
+
'name' => 'form_key',
|
74 |
+
'value' => $this->getFormKey()
|
75 |
+
));
|
76 |
+
|
77 |
+
$fieldset->addField('error_message', 'hidden', array(
|
78 |
+
'name' => 'error_message',
|
79 |
+
'value' => $this->getErrorMessage(),
|
80 |
+
'disabled' => true
|
81 |
+
));
|
82 |
+
|
83 |
+
return $form->toHtml();
|
84 |
+
}
|
85 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Catalog/Layer/Filter/Attribute.php
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker catalog filter attribute block
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Catalog_Layer_Filter_Attribute extends Mage_Catalog_Block_Layer_Filter_Attribute
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Retrieve block html
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getHtml()
|
37 |
+
{
|
38 |
+
if ($this->getColorPickerHelper()->isActive()
|
39 |
+
&& $this->getColorPickerHelper()->isColorAttribute($this->getAttributeModel())
|
40 |
+
) {
|
41 |
+
/** @var $collection Tonbo_ColorPicker_Model_Resource_Color_Value_Collection */
|
42 |
+
$collection = Mage::getModel('colorpicker_resource/color_value_collection');
|
43 |
+
$collection->loadCollectionByAttribute($this->getAttributeModel());
|
44 |
+
|
45 |
+
$this->getColorPickerHelper()->setColorCollection($collection);
|
46 |
+
$this->setTemplate('tonbo_colorpicker/catalog_layer_filter.phtml');
|
47 |
+
}
|
48 |
+
return parent::_toHtml();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get color picker helper
|
53 |
+
*
|
54 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
55 |
+
*/
|
56 |
+
public function getColorPickerHelper()
|
57 |
+
{
|
58 |
+
return Mage::helper('colorpicker');
|
59 |
+
}
|
60 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Catalog/Layer/State.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker catalog filter attribute block
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Catalog_Layer_State extends Mage_Catalog_Block_Layer_State
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Initialize Layer State template
|
33 |
+
*
|
34 |
+
*/
|
35 |
+
public function __construct()
|
36 |
+
{
|
37 |
+
parent::__construct();
|
38 |
+
if ($this->getColorPickerHelper()->isActive()) {
|
39 |
+
$this->setTemplate('tonbo_colorpicker/catalog_layer_sate.phtml');
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Get color picker helper
|
45 |
+
*
|
46 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
47 |
+
*/
|
48 |
+
public function getColorPickerHelper()
|
49 |
+
{
|
50 |
+
return Mage::helper('colorpicker');
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get color value object
|
55 |
+
*
|
56 |
+
* @param int|string $attributeId
|
57 |
+
* @param int|string $optionId
|
58 |
+
* @return Tonbo_ColorPicker_Model_Color_Value
|
59 |
+
*/
|
60 |
+
public function getColorValueObject($attributeId, $optionId)
|
61 |
+
{
|
62 |
+
if (!$attributeId || !$optionId) {
|
63 |
+
Mage::throwException('Attribute id or option id has been missed in request');
|
64 |
+
}
|
65 |
+
return Mage::getModel('colorpicker/color_value', array(
|
66 |
+
'option_id' => $optionId,
|
67 |
+
'attribute_id' => $attributeId,
|
68 |
+
));
|
69 |
+
}
|
70 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Catalog/Product/Configurable.php
ADDED
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker catalog product configurable
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Catalog_Product_Configurable extends Mage_Catalog_Block_Product_View_Type_Configurable
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Color picker configuration
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
protected $_colorPickerData;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Is options flag
|
40 |
+
*
|
41 |
+
* @var bool
|
42 |
+
*/
|
43 |
+
protected $_isOptions;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Product options config
|
47 |
+
*
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
protected $_optionsConfig;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Check weather product has configurable options
|
54 |
+
*
|
55 |
+
* @return bool
|
56 |
+
*/
|
57 |
+
public function isOptions()
|
58 |
+
{
|
59 |
+
if (null === $this->_isOptions) {
|
60 |
+
$this->_isOptions = $this->getBlockAlias() == 'options_configurable';
|
61 |
+
}
|
62 |
+
return $this->_isOptions;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Is color picker module active
|
67 |
+
*
|
68 |
+
* @return bool
|
69 |
+
*/
|
70 |
+
protected function _isColorPickerActive()
|
71 |
+
{
|
72 |
+
/** @var $helper Tonbo_ColorPicker_Helper_Data */
|
73 |
+
$helper = Mage::helper('colorpicker');
|
74 |
+
return $helper->isActive();
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Render block to html string
|
79 |
+
*
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
protected function _toHtml()
|
83 |
+
{
|
84 |
+
if ($this->_isColorPickerActive() && $this->isOptions()) {
|
85 |
+
$this->setTemplate('tonbo_colorpicker/options_configurable.phtml');
|
86 |
+
}
|
87 |
+
return parent::_toHtml();
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get product options configuration as json
|
92 |
+
*
|
93 |
+
* @return string
|
94 |
+
*/
|
95 |
+
public function getJsonConfig()
|
96 |
+
{
|
97 |
+
if ($this->_isColorPickerActive() && $this->isOptions()) {
|
98 |
+
if (null === $this->_optionsConfig) {
|
99 |
+
$this->_optionsConfig = parent::getJsonConfig();
|
100 |
+
}
|
101 |
+
return $this->_optionsConfig;
|
102 |
+
} else {
|
103 |
+
return parent::getJsonConfig();
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Prepare data for color picker
|
109 |
+
*
|
110 |
+
* @param array $config
|
111 |
+
* @return array
|
112 |
+
*/
|
113 |
+
protected function _prepareColorPicker($config)
|
114 |
+
{
|
115 |
+
if (empty($config['attributes'])) {
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
foreach ($config['attributes'] as $attributeId => $attribute) {
|
119 |
+
foreach ($attribute['options'] as $option) {
|
120 |
+
// check is attribute has select type or not
|
121 |
+
$this->_colorPickerData[$attributeId][] = array(
|
122 |
+
'option_id' => $option['id'],
|
123 |
+
'label' => $option['label'],
|
124 |
+
'color_object' => $this->_getColorImageObject($attributeId, $option['id'])->loadByAttributeData()
|
125 |
+
);
|
126 |
+
}
|
127 |
+
}
|
128 |
+
return $this->_colorPickerData;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Color Picker Data
|
133 |
+
*
|
134 |
+
* @return array
|
135 |
+
*/
|
136 |
+
public function getColorPickerData()
|
137 |
+
{
|
138 |
+
if (null === $this->_colorPickerData) {
|
139 |
+
$this->_prepareColorPicker(Mage::helper('core')->jsonDecode($this->getJsonConfig()));
|
140 |
+
}
|
141 |
+
return $this->_colorPickerData;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Get color picker object
|
146 |
+
*
|
147 |
+
* @param int|string $attributeId
|
148 |
+
* @param int|string $optionId
|
149 |
+
* @return Tonbo_ColorPicker_Model_Color_Value
|
150 |
+
*/
|
151 |
+
protected function _getColorImageObject($attributeId, $optionId)
|
152 |
+
{
|
153 |
+
if (!$attributeId || !$optionId) {
|
154 |
+
Mage::throwException('Attribute id or option id has been missed in request');
|
155 |
+
}
|
156 |
+
|
157 |
+
return Mage::getModel('colorpicker/color_value', array(
|
158 |
+
'option_id' => $optionId,
|
159 |
+
'attribute_id' => $attributeId,
|
160 |
+
));
|
161 |
+
}
|
162 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Checkout/Cart/Item/Renderer/Configurable.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Checkout Cart Configurable Product Renderer
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Checkout_Cart_Item_Renderer_Configurable
|
30 |
+
extends Mage_Checkout_Block_Cart_Item_Renderer_Configurable
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Retrieve block html
|
34 |
+
*
|
35 |
+
* @return string
|
36 |
+
*/
|
37 |
+
public function _toHtml()
|
38 |
+
{
|
39 |
+
if ($this->getColorPickerHelper()->isActive()
|
40 |
+
&& $this->getRenderedBlock() instanceof Mage_Checkout_Block_Cart
|
41 |
+
) {
|
42 |
+
$this->setTemplate('tonbo_colorpicker/cart_item_default.phtml');
|
43 |
+
}
|
44 |
+
return parent::_toHtml();
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Get color picker helper
|
49 |
+
*
|
50 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
51 |
+
*/
|
52 |
+
public function getColorPickerHelper()
|
53 |
+
{
|
54 |
+
return Mage::helper('colorpicker');
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* Get color value object
|
59 |
+
*
|
60 |
+
* @param int|string $attributeId
|
61 |
+
* @param int|string $optionId
|
62 |
+
* @return Tonbo_ColorPicker_Model_Color_Value
|
63 |
+
*/
|
64 |
+
public function getColorValueObject($attributeId, $optionId)
|
65 |
+
{
|
66 |
+
if (!$attributeId || !$optionId) {
|
67 |
+
Mage::throwException('Attribute id or option id has been missed in request');
|
68 |
+
}
|
69 |
+
return Mage::getModel('colorpicker/color_value', array(
|
70 |
+
'option_id' => $optionId,
|
71 |
+
'attribute_id' => $attributeId,
|
72 |
+
));
|
73 |
+
}
|
74 |
+
}
|
app/code/community/Tonbo/ColorPicker/Block/Search/Layer/Filter/Attribute.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker catalog search filter attribute block
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Block_Search_Layer_Filter_Attribute extends Mage_CatalogSearch_Block_Layer_Filter_Attribute
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Retrieve block html
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getHtml()
|
37 |
+
{
|
38 |
+
if ($this->getColorPickerHelper()->isActive()
|
39 |
+
&& $this->getColorPickerHelper()->isColorAttribute($this->getAttributeModel())
|
40 |
+
) {
|
41 |
+
/** @var $collection Tonbo_ColorPicker_Model_Resource_Color_Value_Collection */
|
42 |
+
$collection = Mage::getModel('colorpicker_resource/color_value_collection');
|
43 |
+
$collection->loadCollectionByAttribute($this->getAttributeModel());
|
44 |
+
|
45 |
+
$this->getColorPickerHelper()->setColorCollection($collection);
|
46 |
+
$this->setTemplate('tonbo_colorpicker/catalog_layer_filter.phtml');
|
47 |
+
}
|
48 |
+
return parent::_toHtml();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get color picker helper
|
53 |
+
*
|
54 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
55 |
+
*/
|
56 |
+
public function getColorPickerHelper()
|
57 |
+
{
|
58 |
+
return Mage::helper('colorpicker');
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
app/code/community/Tonbo/ColorPicker/Helper/Data.php
ADDED
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color picker default helper
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Helper_Data extends Mage_Core_Helper_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* @var Tonbo_ColorPicker_Model_Resource_Color_Value_Collection
|
33 |
+
*/
|
34 |
+
protected $_colorCollection;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Assigned attributes config path
|
38 |
+
*/
|
39 |
+
const CONFIG_PATH_ASSIGNED_ATTRIBUTES = 'colorpicker/attribute_list';
|
40 |
+
|
41 |
+
/**
|
42 |
+
* @var array
|
43 |
+
*/
|
44 |
+
protected $_systemLocales;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
+
protected $_assignedAttributes = array();
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Store collection
|
53 |
+
*
|
54 |
+
* @var Mage_Core_Model_Mysql4_Store_Collection
|
55 |
+
*/
|
56 |
+
protected $_storeCollection;
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Get system locales
|
60 |
+
*
|
61 |
+
* @return array
|
62 |
+
*/
|
63 |
+
public function getSystemLocales()
|
64 |
+
{
|
65 |
+
if (null === $this->_systemLocales) {
|
66 |
+
$this->_systemLocales = array();
|
67 |
+
/** @var $configModel Mage_Core_Model_Mysql4_Config_Data_Collection */
|
68 |
+
$configModel = Mage::getModel('core/config_data')->getResourceCollection();
|
69 |
+
$configModel->addFieldToFilter('path', array('eq' => Mage_Core_Model_Locale::XML_PATH_DEFAULT_LOCALE));
|
70 |
+
foreach ($configModel as $locale) {
|
71 |
+
$this->_systemLocales[] = $locale->getValue();
|
72 |
+
}
|
73 |
+
}
|
74 |
+
return $this->_systemLocales;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Get all assigned attributes from all scopes
|
79 |
+
*
|
80 |
+
* @return array
|
81 |
+
*/
|
82 |
+
public function getAssignedAttributes()
|
83 |
+
{
|
84 |
+
if (empty($this->_assignedAttributes)) {
|
85 |
+
$value = Mage::getStoreConfig(self::CONFIG_PATH_ASSIGNED_ATTRIBUTES);
|
86 |
+
if (!is_array($value)) {
|
87 |
+
$value = explode(',', $value);
|
88 |
+
}
|
89 |
+
$this->_assignedAttributes = $value;
|
90 |
+
|
91 |
+
}
|
92 |
+
return $this->_assignedAttributes;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Get color value collection
|
97 |
+
*
|
98 |
+
* @return Tonbo_ColorPicker_Model_Resource_Color_Value_Collection
|
99 |
+
*/
|
100 |
+
public function getColorCollection()
|
101 |
+
{
|
102 |
+
if (null === $this->_colorCollection) {
|
103 |
+
Mage::throwException('Color collection was not initialized');
|
104 |
+
}
|
105 |
+
return $this->_colorCollection;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Set color value collection
|
110 |
+
|
111 |
+
* @param Tonbo_ColorPicker_Model_Resource_Color_Value_Collection $colorCollection
|
112 |
+
* @return $this
|
113 |
+
*/
|
114 |
+
public function setColorCollection(Tonbo_ColorPicker_Model_Resource_Color_Value_Collection $colorCollection)
|
115 |
+
{
|
116 |
+
$this->_colorCollection = $colorCollection;
|
117 |
+
return $this;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Get color value from collection by option
|
122 |
+
*
|
123 |
+
* @param string $optionId
|
124 |
+
* @return bool|Tonbo_ColorPicker_Model_Resource_Color_Value
|
125 |
+
*/
|
126 |
+
public function getColorItemByOption($optionId)
|
127 |
+
{
|
128 |
+
$result = false;
|
129 |
+
foreach ($this->getColorCollection()->getItems() as $item) {
|
130 |
+
if ($item->getOptionId() == $optionId) {
|
131 |
+
$result = $item;
|
132 |
+
break;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
return $result;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Check is color picker supported attribute
|
140 |
+
*
|
141 |
+
* @param Mage_Core_Model_Abstract $object
|
142 |
+
* @return bool
|
143 |
+
*/
|
144 |
+
public function isColorAttribute($object)
|
145 |
+
{
|
146 |
+
if (!$this->isActive()) {
|
147 |
+
return false;
|
148 |
+
}
|
149 |
+
if ($object instanceof Mage_Core_Model_Abstract
|
150 |
+
&& $object->getFrontendInput() === 'select'
|
151 |
+
&& in_array($object->getAttributeId(), $this->getAssignedAttributes())
|
152 |
+
) {
|
153 |
+
return true;
|
154 |
+
}
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Get warning image
|
160 |
+
*
|
161 |
+
* @return string
|
162 |
+
*/
|
163 |
+
public function getWarningImage()
|
164 |
+
{
|
165 |
+
return Mage::getDesign()->getSkinUrl('tonbo-colorpicker/img/errorRetina.png');
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Is module enabled
|
170 |
+
*
|
171 |
+
* @return bool
|
172 |
+
*/
|
173 |
+
public function isActive()
|
174 |
+
{
|
175 |
+
return (bool)Mage::getStoreConfig('colorpicker/is_active');
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Is zoom image enabled
|
180 |
+
*
|
181 |
+
* @return bool
|
182 |
+
*/
|
183 |
+
public function isZoomEnabled()
|
184 |
+
{
|
185 |
+
return (bool)Mage::getStoreConfig('colorpicker/zoom_image');
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Set color value collection by attribute id
|
190 |
+
*
|
191 |
+
* @param int $attributeId
|
192 |
+
* @return $this
|
193 |
+
*/
|
194 |
+
public function setCollectionByAttributeId($attributeId)
|
195 |
+
{
|
196 |
+
/** @var Tonbo_ColorPicker_Model_Resource_Color_Value_Collection $collection */
|
197 |
+
$collection = Mage::getModel('colorpicker_resource/color_value_collection');
|
198 |
+
$collection->addFieldToFilter('attribute_id', $attributeId);
|
199 |
+
$this->setColorCollection($collection);
|
200 |
+
return $this;
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Is all options mapped
|
205 |
+
*
|
206 |
+
* @param int $attributeId
|
207 |
+
* @return bool
|
208 |
+
*/
|
209 |
+
public function isOptionsMapped($attributeId)
|
210 |
+
{
|
211 |
+
return $this->getOptionCollection($attributeId)->count() === $this->setCollectionByAttributeId($attributeId)
|
212 |
+
->getColorCollection()->count();
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Map color options for given attribute ids
|
217 |
+
*
|
218 |
+
* @param int $attributeIds
|
219 |
+
* @return $this
|
220 |
+
*/
|
221 |
+
public function mapOptionsByAttributeIds($attributeIds)
|
222 |
+
{
|
223 |
+
foreach ($attributeIds as $attributeId) {
|
224 |
+
if (!is_numeric($attributeId)) {
|
225 |
+
continue;
|
226 |
+
}
|
227 |
+
$this->setCollectionByAttributeId($attributeId);
|
228 |
+
$optionsToMap = $this->getAttributeOptions($attributeId);
|
229 |
+
$optionIds = array_keys($optionsToMap);
|
230 |
+
foreach ($optionIds as $optionId) {
|
231 |
+
if ($this->getColorItemByOption($optionId) !== false) {
|
232 |
+
unset($optionsToMap[$optionId]);
|
233 |
+
}
|
234 |
+
}
|
235 |
+
if (!empty($optionsToMap)) {
|
236 |
+
$mappedData = $this->mapColorOptions($optionsToMap);
|
237 |
+
foreach ($mappedData as $entity) {
|
238 |
+
/** @var Tonbo_ColorPicker_Model_Color_Value $colorValueModel */
|
239 |
+
$colorValueModel = Mage::getModel('colorpicker/color_value');
|
240 |
+
$colorValueModel->setData(array(
|
241 |
+
'attribute_id' => $attributeId,
|
242 |
+
'option_id' => current($entity),
|
243 |
+
'color_value' => key($entity),
|
244 |
+
'color_type' => Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE
|
245 |
+
))->save();
|
246 |
+
}
|
247 |
+
}
|
248 |
+
}
|
249 |
+
return $this;
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Map color options
|
254 |
+
*
|
255 |
+
* @param array $optionsToMap
|
256 |
+
* @return array
|
257 |
+
*/
|
258 |
+
public function mapColorOptions($optionsToMap)
|
259 |
+
{
|
260 |
+
/** @var $colorLibrary Tonbo_ColorPicker_Model_Library_Option */
|
261 |
+
$colorLibrary = Mage::getModel('colorpicker/library_option', $optionsToMap);
|
262 |
+
/** @var $stringMapper Tonbo_ColorPicker_Model_Mapper */
|
263 |
+
$stringMapper = Mage::getModel('colorpicker/mapper');
|
264 |
+
return $stringMapper->mapData($colorLibrary);
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Get option collection
|
269 |
+
*
|
270 |
+
* @param int $attributeId
|
271 |
+
* @return Mage_Eav_Model_Mysql4_Entity_Attribute_Option_Collection
|
272 |
+
*/
|
273 |
+
public function getOptionCollection($attributeId)
|
274 |
+
{
|
275 |
+
return Mage::getResourceModel('eav/entity_attribute_option_collection')
|
276 |
+
->setAttributeFilter($attributeId)
|
277 |
+
->setPositionOrder('desc', true)
|
278 |
+
->load();
|
279 |
+
}
|
280 |
+
|
281 |
+
/**
|
282 |
+
* Get attribute options array per store
|
283 |
+
*
|
284 |
+
* @param int $attributeId
|
285 |
+
* @return array
|
286 |
+
*/
|
287 |
+
public function getAttributeOptions($attributeId)
|
288 |
+
{
|
289 |
+
$optionCollection = $this->getOptionCollection($attributeId);
|
290 |
+
|
291 |
+
$values = array();
|
292 |
+
foreach ($optionCollection as $option) {
|
293 |
+
foreach ($this->getStores() as $store) {
|
294 |
+
$storeValues = $this->getStoreOptionValues($store->getId(), $attributeId);
|
295 |
+
if (isset($storeValues[$option->getId()])) {
|
296 |
+
$values[$option->getId()][] = $storeValues[$option->getId()];
|
297 |
+
}
|
298 |
+
}
|
299 |
+
}
|
300 |
+
return $values;
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Retrieve stores collection with default store
|
305 |
+
*
|
306 |
+
* @return Mage_Core_Model_Mysql4_Store_Collection
|
307 |
+
*/
|
308 |
+
public function getStores()
|
309 |
+
{
|
310 |
+
if (null === $this->_storeCollection) {
|
311 |
+
$stores = Mage::getModel('core/store')
|
312 |
+
->getResourceCollection()
|
313 |
+
->setLoadDefault(true)
|
314 |
+
->load();
|
315 |
+
$this->_storeCollection = $stores;
|
316 |
+
}
|
317 |
+
return $this->_storeCollection;
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Retrieve attribute option values for given store id
|
322 |
+
*
|
323 |
+
* @param int $storeId
|
324 |
+
* @param int $attributeId
|
325 |
+
* @return array
|
326 |
+
*/
|
327 |
+
public function getStoreOptionValues($storeId, $attributeId)
|
328 |
+
{
|
329 |
+
$values = array();
|
330 |
+
$valuesCollection = Mage::getResourceModel('eav/entity_attribute_option_collection')
|
331 |
+
->setAttributeFilter($attributeId)
|
332 |
+
->setStoreFilter($storeId, false)
|
333 |
+
->load();
|
334 |
+
foreach ($valuesCollection as $item) {
|
335 |
+
$values[$item->getId()] = $item->getValue();
|
336 |
+
}
|
337 |
+
return $values;
|
338 |
+
}
|
339 |
+
}
|
app/code/community/Tonbo/ColorPicker/LICENSE.txt
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
Open Software License ("OSL") v. 3.0
|
3 |
+
|
4 |
+
This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work:
|
5 |
+
|
6 |
+
Licensed under the Open Software License version 3.0
|
7 |
+
|
8 |
+
1. Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following:
|
9 |
+
|
10 |
+
1. to reproduce the Original Work in copies, either alone or as part of a collective work;
|
11 |
+
|
12 |
+
2. to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work;
|
13 |
+
|
14 |
+
3. to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License;
|
15 |
+
|
16 |
+
4. to perform the Original Work publicly; and
|
17 |
+
|
18 |
+
5. to display the Original Work publicly.
|
19 |
+
|
20 |
+
2. Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works.
|
21 |
+
|
22 |
+
3. Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work.
|
23 |
+
|
24 |
+
4. Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license.
|
25 |
+
|
26 |
+
5. External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c).
|
27 |
+
|
28 |
+
6. Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work.
|
29 |
+
|
30 |
+
7. Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer.
|
31 |
+
|
32 |
+
8. Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation.
|
33 |
+
|
34 |
+
9. Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including 'fair use' or 'fair dealing'). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c).
|
35 |
+
|
36 |
+
10. Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware.
|
37 |
+
|
38 |
+
11. Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License.
|
39 |
+
|
40 |
+
12. Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License.
|
41 |
+
|
42 |
+
13. Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable.
|
43 |
+
|
44 |
+
14. Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
45 |
+
|
46 |
+
15. Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You.
|
47 |
+
|
48 |
+
16. Modification of This License. This License is Copyright � 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under <insert your license name here>" or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process.
|
app/code/community/Tonbo/ColorPicker/Model/Adminhtml/AllowedList.php
ADDED
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes data source
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Adminhtml_AllowedList
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* @var string
|
33 |
+
*/
|
34 |
+
protected $_attributeTypeId;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Get color attributes as options array
|
38 |
+
*
|
39 |
+
* @return array
|
40 |
+
*/
|
41 |
+
public function toOptionArray()
|
42 |
+
{
|
43 |
+
$result = array();
|
44 |
+
foreach ($this->_getColorAttributesCollection() as $attribute) {
|
45 |
+
$result[] = array(
|
46 |
+
'value' => $attribute->getAttributeId(),
|
47 |
+
'label' => $attribute->getFrontendLabel()
|
48 |
+
);
|
49 |
+
}
|
50 |
+
return $result;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Get full list of system attributes as id => label
|
55 |
+
*
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
public function getAttributeLabels()
|
59 |
+
{
|
60 |
+
$result = array();
|
61 |
+
foreach ($this->_getColorAttributesCollection() as $attribute) {
|
62 |
+
$result[$attribute->getAttributeId()] = $this->getLabelValues($attribute->getAttributeId());
|
63 |
+
}
|
64 |
+
return $result;
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Retrieve frontend labels of attribute for each store
|
69 |
+
*
|
70 |
+
* @param int $attributeId
|
71 |
+
* @return array
|
72 |
+
*/
|
73 |
+
public function getLabelValues($attributeId)
|
74 |
+
{
|
75 |
+
$attributeModel = $this->getAttributeObject();
|
76 |
+
$attributeModel->load($attributeId);
|
77 |
+
$values = array();
|
78 |
+
$values[0] = $attributeModel->getFrontend()->getLabel();
|
79 |
+
$storeLabels = $attributeModel->getStoreLabels();
|
80 |
+
$stores = Mage::getModel('core/store')->getResourceCollection()->setLoadDefault(true)->load();
|
81 |
+
foreach ($stores as $store) {
|
82 |
+
if ($store->getId() != 0) {
|
83 |
+
if (empty($storeLabels[$store->getId()])) {
|
84 |
+
continue;
|
85 |
+
}
|
86 |
+
$values[$store->getId()] = $storeLabels[$store->getId()];
|
87 |
+
}
|
88 |
+
}
|
89 |
+
return array_unique($values, SORT_STRING);
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @return Mage_Eav_Model_Entity_Attribute_Abstract
|
94 |
+
*/
|
95 |
+
public function getAttributeObject()
|
96 |
+
{
|
97 |
+
return Mage::getModel('catalog/resource_eav_attribute')->setEntityTypeId($this->_getProductTypeId());
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* @return string
|
102 |
+
*/
|
103 |
+
protected function _getProductTypeId()
|
104 |
+
{
|
105 |
+
if (null === $this->_attributeTypeId) {
|
106 |
+
$this->_attributeTypeId = Mage::getModel('eav/entity')->setType('catalog_product')->getTypeId();
|
107 |
+
}
|
108 |
+
return $this->_attributeTypeId;
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection
|
113 |
+
*/
|
114 |
+
protected function _getColorAttributesCollection()
|
115 |
+
{
|
116 |
+
/** @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Collection */
|
117 |
+
$collection = Mage::getResourceModel('catalog/product_attribute_collection')
|
118 |
+
->addVisibleFilter();
|
119 |
+
$collection->addFieldToFilter('frontend_input', array('eq' => 'select'))
|
120 |
+
->addOrder('frontend_label', Varien_Data_Collection::SORT_ORDER_ASC);
|
121 |
+
return $collection;
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Get mapped color attributes as id => label
|
126 |
+
*
|
127 |
+
* @return array
|
128 |
+
*/
|
129 |
+
public function getMappedAttributes()
|
130 |
+
{
|
131 |
+
/** @var $colorLibrary Tonbo_ColorPicker_Model_Library_Color */
|
132 |
+
$colorLibrary = Mage::getModel('colorpicker/library_color', $this->getAttributeLabels());
|
133 |
+
/** @var $stringMapper Tonbo_ColorPicker_Model_Mapper */
|
134 |
+
$stringMapper = Mage::getModel('colorpicker/mapper');
|
135 |
+
$result = array();
|
136 |
+
foreach ($stringMapper->mapData($colorLibrary) as $parsedData) {
|
137 |
+
$result[array_shift($parsedData)] = true;
|
138 |
+
}
|
139 |
+
return $result;
|
140 |
+
}
|
141 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Adminhtml/ListSave.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes data save model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Adminhtml_ListSave extends Mage_Core_Model_Config_Data
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Auto detect color values
|
33 |
+
*
|
34 |
+
*/
|
35 |
+
protected function _afterSave()
|
36 |
+
{
|
37 |
+
parent::_afterSave();
|
38 |
+
if ($this->isValueChanged()) {
|
39 |
+
$attributeIds = array_diff(
|
40 |
+
$this->_valueToArray($this->getValue()),
|
41 |
+
$this->_valueToArray($this->getOldValue())
|
42 |
+
);
|
43 |
+
Mage::helper('colorpicker')->mapOptionsByAttributeIds($attributeIds);
|
44 |
+
}
|
45 |
+
return $this;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Convert string value to array
|
50 |
+
*/
|
51 |
+
protected function _valueToArray($value)
|
52 |
+
{
|
53 |
+
if (!is_array($value)) {
|
54 |
+
$value = explode(',', $value);
|
55 |
+
}
|
56 |
+
return $value;
|
57 |
+
}
|
58 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Catalog/Product/Type/Configurable.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Tonbo Color Picker Configurable Product Model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Catalog_Product_Type_Configurable extends Mage_Catalog_Model_Product_Type_Configurable
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Retrieve Selected Attributes info
|
33 |
+
*
|
34 |
+
* @param Mage_Catalog_Model_Product $product
|
35 |
+
* @return array
|
36 |
+
*/
|
37 |
+
public function getSelectedAttributesInfo($product = null)
|
38 |
+
{
|
39 |
+
if (!$this->getColorPickerHelper()->isActive()) {
|
40 |
+
return parent::getSelectedAttributesInfo($product);
|
41 |
+
}
|
42 |
+
$attributes = array();
|
43 |
+
Varien_Profiler::start('CONFIGURABLE:' . __METHOD__);
|
44 |
+
$attributesOption = $this->getProduct($product)->getCustomOption('attributes');
|
45 |
+
if ($attributesOption) {
|
46 |
+
$data = unserialize($attributesOption->getValue());
|
47 |
+
$this->getUsedProductAttributeIds($product);
|
48 |
+
|
49 |
+
$usedAttributes = $this->getProduct($product)->getData($this->_usedAttributes);
|
50 |
+
|
51 |
+
foreach ($data as $attributeId => $attributeValue) {
|
52 |
+
if (isset($usedAttributes[$attributeId])) {
|
53 |
+
$attribute = $usedAttributes[$attributeId];
|
54 |
+
if ($attribute->getProductAttribute()) {
|
55 |
+
$attribute->getProductAttribute()->getStoreLabels();
|
56 |
+
}
|
57 |
+
$label = $attribute->getLabel() ?: $attribute->getData('label');
|
58 |
+
$value = $attribute->getProductAttribute();
|
59 |
+
if ($value->getSourceModel()) {
|
60 |
+
$value = $value->getSource()->getOptionText($attributeValue);
|
61 |
+
} else {
|
62 |
+
$value = '';
|
63 |
+
}
|
64 |
+
|
65 |
+
$attributes[] = array(
|
66 |
+
'label' => $label,
|
67 |
+
'value' => $value,
|
68 |
+
'attribute_model' => $attribute->getProductAttribute(),
|
69 |
+
'option_id' => $attributeValue,
|
70 |
+
);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
Varien_Profiler::stop('CONFIGURABLE:' . __METHOD__);
|
75 |
+
return $attributes;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Get color picker helper
|
80 |
+
*
|
81 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
82 |
+
*/
|
83 |
+
public function getColorPickerHelper()
|
84 |
+
{
|
85 |
+
return Mage::helper('colorpicker');
|
86 |
+
}
|
87 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Color/Image.php
ADDED
@@ -0,0 +1,382 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Image model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Color_Image
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Minimal image height
|
33 |
+
*/
|
34 |
+
const MIN_HEIGHT = 260;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Minimal image width
|
38 |
+
*/
|
39 |
+
const MIN_WIDTH = 260;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Media directory
|
43 |
+
*/
|
44 |
+
const IMAGE_MEDIA_DIR = 'tonbo_colorpicker';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Is upload initialized flag
|
48 |
+
*
|
49 |
+
* @var bool
|
50 |
+
*/
|
51 |
+
protected $_isUploadInitialized = false;
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Option id
|
55 |
+
*
|
56 |
+
* @var int
|
57 |
+
*/
|
58 |
+
protected $_optionId;
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Attribute id
|
62 |
+
*
|
63 |
+
* @var int
|
64 |
+
*/
|
65 |
+
protected $_attributeId;
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Array of file info
|
69 |
+
*
|
70 |
+
* @var array
|
71 |
+
*/
|
72 |
+
protected $_fileInfo;
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Initialize upload
|
76 |
+
*
|
77 |
+
* @param int $optionId
|
78 |
+
* @param int $attributeId
|
79 |
+
* @return $this
|
80 |
+
*/
|
81 |
+
public function initUpload($optionId, $attributeId)
|
82 |
+
{
|
83 |
+
if (!is_numeric($optionId)) {
|
84 |
+
Mage::throwException('Option id was not recognized: ' . $optionId);
|
85 |
+
}
|
86 |
+
if (!is_numeric($attributeId)) {
|
87 |
+
Mage::throwException('Attribute id was not recognized: ' . $attributeId);
|
88 |
+
}
|
89 |
+
$this->_optionId = $optionId;
|
90 |
+
$this->_attributeId = $attributeId;
|
91 |
+
$this->_isUploadInitialized = true;
|
92 |
+
return $this;
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Clear upload initialization
|
97 |
+
*
|
98 |
+
* @return $this
|
99 |
+
*/
|
100 |
+
public function clearInitialization()
|
101 |
+
{
|
102 |
+
$this->_optionId = $this->_attributeId = $this->_isUploadInitialized = $this->_fileInfo = null;
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Get is upload initialized flag
|
108 |
+
*
|
109 |
+
* @return bool
|
110 |
+
*/
|
111 |
+
public function isUploadInitialized()
|
112 |
+
{
|
113 |
+
return $this->_isUploadInitialized;
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Get image media path
|
118 |
+
*
|
119 |
+
* @return string
|
120 |
+
*/
|
121 |
+
public function getMediaPath()
|
122 |
+
{
|
123 |
+
return Mage::getBaseDir('media') . DS . self::IMAGE_MEDIA_DIR;
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Upload image
|
128 |
+
*
|
129 |
+
* @param string $imageParam
|
130 |
+
* @return string
|
131 |
+
*/
|
132 |
+
public function uploadImage($imageParam)
|
133 |
+
{
|
134 |
+
if (!$this->isUploadInitialized()) {
|
135 |
+
Mage::throwException('Image upload object was not initialized');
|
136 |
+
}
|
137 |
+
|
138 |
+
$upload = new Zend_File_Transfer_Adapter_Http();
|
139 |
+
$dimensions = array(
|
140 |
+
'minheight' => Tonbo_ColorPicker_Model_Color_Image::MIN_HEIGHT,
|
141 |
+
'minwidth' => Tonbo_ColorPicker_Model_Color_Image::MIN_WIDTH
|
142 |
+
);
|
143 |
+
$upload->addValidator('ImageSize', false, $dimensions);
|
144 |
+
$upload->addValidator('Extension', false, $this->getAllowedExtensions());
|
145 |
+
if (!$upload->isUploaded($imageParam) && !$upload->isValid($imageParam)) {
|
146 |
+
$this->_handelUploadErrors($upload);
|
147 |
+
}
|
148 |
+
|
149 |
+
$fileInfo = $upload->getFileInfo($imageParam);
|
150 |
+
$this->_fileInfo = $fileInfo[$imageParam];
|
151 |
+
$fileName = Varien_File_Uploader::getCorrectFileName($this->_fileInfo['name']);
|
152 |
+
$filePath = $this->getFullFileUploadDir();
|
153 |
+
$this->_createWritableDir($filePath);
|
154 |
+
$upload->setDestination($filePath);
|
155 |
+
$upload->addFilter('Rename', array(
|
156 |
+
'target' => $filePath . DS . $fileName,
|
157 |
+
'overwrite' => true
|
158 |
+
));
|
159 |
+
if (!$upload->receive($imageParam)) {
|
160 |
+
$this->_handelUploadErrors($upload);
|
161 |
+
}
|
162 |
+
$result = $this->getFileUploadDir() . DS . $fileName;
|
163 |
+
$this->_resizeImage($fileName, self::MIN_WIDTH, self::MIN_HEIGHT);
|
164 |
+
$this->clearInitialization();
|
165 |
+
return $result;
|
166 |
+
}
|
167 |
+
|
168 |
+
/**
|
169 |
+
* Get file path directory
|
170 |
+
*
|
171 |
+
* @return string
|
172 |
+
*/
|
173 |
+
public function getFileUploadDir()
|
174 |
+
{
|
175 |
+
return $this->_attributeId . DS . $this->_optionId;
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Get full file upload dir from media
|
180 |
+
*
|
181 |
+
* @return string
|
182 |
+
*/
|
183 |
+
public function getFullFileUploadDir()
|
184 |
+
{
|
185 |
+
return $this->getMediaPath() . DS . $this->getFileUploadDir();
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Process upload errors
|
190 |
+
*
|
191 |
+
* @param Zend_File_Transfer_Adapter_Http $upload
|
192 |
+
*/
|
193 |
+
protected function _handelUploadErrors($upload)
|
194 |
+
{
|
195 |
+
if ($upload->getErrors()) {
|
196 |
+
$errors = array();
|
197 |
+
foreach ($upload->getMessages() as $errorCode => $errorMessage) {
|
198 |
+
if ($errorCode == Zend_Validate_File_Extension::FALSE_EXTENSION) {
|
199 |
+
$errors[] = $errorMessage . ". \n" . Mage::helper('colorpicker')
|
200 |
+
->__('Only %s extensions are allowed', implode(', ', $this->getAllowedExtensions()));
|
201 |
+
} elseif ($errorCode == Zend_Validate_File_ImageSize::WIDTH_TOO_SMALL
|
202 |
+
|| $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_SMALL
|
203 |
+
) {
|
204 |
+
$errors[] = Mage::helper('colorpicker')
|
205 |
+
->__('Minimum allowed image size is %sx%s px.', self::MIN_WIDTH, self::MIN_HEIGHT);
|
206 |
+
}
|
207 |
+
}
|
208 |
+
if (count($errors)) {
|
209 |
+
Mage::throwException(implode("\n", $errors) );
|
210 |
+
}
|
211 |
+
}
|
212 |
+
Mage::throwException(Mage::helper('colorpicker')->__('File was not uploaded'));
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* Get array of allowed extensions
|
217 |
+
*
|
218 |
+
* @return array
|
219 |
+
*/
|
220 |
+
public function getAllowedExtensions()
|
221 |
+
{
|
222 |
+
return array('jpg', 'jpeg', 'png');
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* Create writable directory if it doesn't exist
|
227 |
+
*
|
228 |
+
* @param string Absolute directory path
|
229 |
+
* @return null
|
230 |
+
*/
|
231 |
+
protected function _createWritableDir($path)
|
232 |
+
{
|
233 |
+
$fileIo = $this->_getFileIo();
|
234 |
+
if (!$fileIo->isWriteable($path) && !$fileIo->mkdir($path, 0777, true)) {
|
235 |
+
Mage::throwException("Cannot create directory '{$path}'.");
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Return Url for media image
|
241 |
+
*
|
242 |
+
* @param string $image
|
243 |
+
* @return string
|
244 |
+
*/
|
245 |
+
public function getMediaUrl($image = '')
|
246 |
+
{
|
247 |
+
$image = trim($image);
|
248 |
+
$result = Mage::getBaseUrl('media') . self::IMAGE_MEDIA_DIR;
|
249 |
+
|
250 |
+
if ($image) {
|
251 |
+
if (strpos($image, '/') !== 0) {
|
252 |
+
$image = '/' . $image;
|
253 |
+
}
|
254 |
+
$result .= $image;
|
255 |
+
}
|
256 |
+
return $result;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Delete image from file system
|
261 |
+
*
|
262 |
+
* @return $this
|
263 |
+
*/
|
264 |
+
public function delete()
|
265 |
+
{
|
266 |
+
if (!$this->isUploadInitialized()) {
|
267 |
+
Mage::throwException('Image upload object was not initialized');
|
268 |
+
}
|
269 |
+
$path = $this->getFullFileUploadDir();
|
270 |
+
if ($this->_getFileIo()->fileExists($path, false) && !$this->_getFileIo()->rmdir($path, true)) {
|
271 |
+
Mage::throwException('Cannot delete directory ' . $path);
|
272 |
+
}
|
273 |
+
return $this;
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
* Get color image with requested size
|
278 |
+
*
|
279 |
+
* @param Tonbo_ColorPicker_Model_Color_Value $colorValue
|
280 |
+
* @param int $width
|
281 |
+
* @param int $height
|
282 |
+
* @return string
|
283 |
+
*/
|
284 |
+
public function getImageWithSize(Tonbo_ColorPicker_Model_Color_Value $colorValue,
|
285 |
+
$width = self::MIN_WIDTH, $height = self::MIN_HEIGHT
|
286 |
+
) {
|
287 |
+
$fileName = basename($colorValue->getColorImage());
|
288 |
+
$originalImage = $this->initUpload($colorValue->getOptionId(), $colorValue->getAttributeId())
|
289 |
+
->getFullFileUploadDir() . DS . $fileName;
|
290 |
+
|
291 |
+
if (!$this->_getFileIo()->fileExists($originalImage)) {
|
292 |
+
return '';
|
293 |
+
}
|
294 |
+
$destinationImage = $this->_getDirForResize($fileName, $width, $height);
|
295 |
+
if ($this->_getFileIo()->fileExists($destinationImage)) {
|
296 |
+
return $this->getResizedImageUrl($fileName, $width, $height);
|
297 |
+
}
|
298 |
+
|
299 |
+
$image = new Varien_Image($originalImage);
|
300 |
+
|
301 |
+
if (($width != $image->getOriginalWidth()) || ($height != $image->getOriginalHeight())) {
|
302 |
+
$image->keepTransparency(true);
|
303 |
+
$image->keepFrame(true);
|
304 |
+
$image->keepAspectRatio(true);
|
305 |
+
$image->backgroundColor(array(255, 255, 255));
|
306 |
+
$image->resize($width, $height);
|
307 |
+
$image->save($destinationImage);
|
308 |
+
}
|
309 |
+
return $this->getResizedImageUrl($fileName, $width, $height);
|
310 |
+
}
|
311 |
+
|
312 |
+
/**
|
313 |
+
* Resize image
|
314 |
+
*
|
315 |
+
* @param string $fileName
|
316 |
+
* @param int $width
|
317 |
+
* @param int $height
|
318 |
+
* @return bool
|
319 |
+
*/
|
320 |
+
protected function _resizeImage($fileName, $width, $height)
|
321 |
+
{
|
322 |
+
$fileName = basename($fileName);
|
323 |
+
$originalImage = $this->getFullFileUploadDir() . DS . $fileName;
|
324 |
+
|
325 |
+
if (!$this->_getFileIo()->fileExists($originalImage)) {
|
326 |
+
return false;
|
327 |
+
}
|
328 |
+
$destinationImage = $this->_getDirForResize($fileName, $width, $height);
|
329 |
+
|
330 |
+
$image = new Varien_Image($originalImage);
|
331 |
+
if (($width != $image->getOriginalWidth()) || ($height != $image->getOriginalHeight())) {
|
332 |
+
$image->keepTransparency(true);
|
333 |
+
$image->keepFrame(true);
|
334 |
+
$image->keepAspectRatio(true);
|
335 |
+
$image->backgroundColor(array(255, 255, 255));
|
336 |
+
$image->resize($width, $height);
|
337 |
+
$image->save($destinationImage);
|
338 |
+
} else {
|
339 |
+
$this->_getFileIo()->cp($originalImage, $destinationImage);
|
340 |
+
}
|
341 |
+
return true;
|
342 |
+
}
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Get destination dir for requested image size
|
346 |
+
*
|
347 |
+
* @param string $file
|
348 |
+
* @param int|string $width
|
349 |
+
* @param int|string $height
|
350 |
+
* @return string
|
351 |
+
*/
|
352 |
+
protected function _getDirForResize($file, $width, $height)
|
353 |
+
{
|
354 |
+
$uploadDir = $this->getFullFileUploadDir() . DS . $width . '_' . $height;
|
355 |
+
if (!$this->_getFileIo()->isWriteable($uploadDir) && !$this->_getFileIo()->mkdir($uploadDir, 0777, true)) {
|
356 |
+
Mage::throwException("Cannot create directory '{$uploadDir}'.");
|
357 |
+
}
|
358 |
+
return $uploadDir . DS . $file;
|
359 |
+
}
|
360 |
+
|
361 |
+
/**
|
362 |
+
* @return Varien_Io_File
|
363 |
+
*/
|
364 |
+
protected function _getFileIo()
|
365 |
+
{
|
366 |
+
return new Varien_Io_File();
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Get resized file url
|
371 |
+
*
|
372 |
+
* @param string $file
|
373 |
+
* @param int|string $width
|
374 |
+
* @param int|string $height
|
375 |
+
* @return string
|
376 |
+
*/
|
377 |
+
public function getResizedImageUrl($file, $width, $height)
|
378 |
+
{
|
379 |
+
$fileUrl = str_replace(DS, '/', $this->getFileUploadDir()) . '/' . $width . '_' . $height . '/' . $file;
|
380 |
+
return $this->getMediaUrl($fileUrl);
|
381 |
+
}
|
382 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Color/Value.php
ADDED
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color value model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Color_Value extends Mage_Core_Model_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Image color type
|
33 |
+
*/
|
34 |
+
const COLOR_TYPE_IMAGE = 1;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Value color type
|
38 |
+
*/
|
39 |
+
const COLOR_TYPE_VALUE = 2;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Image upload model
|
43 |
+
*
|
44 |
+
* @var Tonbo_ColorPicker_Model_Color_Image
|
45 |
+
*/
|
46 |
+
protected $_imageUploadModel;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Model constructor
|
50 |
+
*/
|
51 |
+
protected function _construct()
|
52 |
+
{
|
53 |
+
parent::_construct();
|
54 |
+
$this->_init('colorpicker/color_value');
|
55 |
+
$this->_imageUploadModel = Mage::getModel('colorpicker/color_image');
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Load object data
|
60 |
+
*
|
61 |
+
* @param int $modelId
|
62 |
+
* @param null|string $field
|
63 |
+
* @return Tonbo_ColorPicker_Model_Color_Value
|
64 |
+
*/
|
65 |
+
public function load($modelId, $field = null)
|
66 |
+
{
|
67 |
+
parent::load($modelId, $field);
|
68 |
+
if ($this->getOptionId() && $this->getAttributeId()) {
|
69 |
+
$this->getImageUploadModel()->initUpload($this->getOptionId(), $this->getAttributeId());
|
70 |
+
}
|
71 |
+
return $this;
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Get image upload model
|
76 |
+
*
|
77 |
+
* @return Tonbo_ColorPicker_Model_Color_Image
|
78 |
+
*/
|
79 |
+
public function getImageUploadModel()
|
80 |
+
{
|
81 |
+
return $this->_imageUploadModel;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Save image
|
86 |
+
*/
|
87 |
+
public function saveImage()
|
88 |
+
{
|
89 |
+
$this->_getResource()->insertImageOnDuplicate($this);
|
90 |
+
return $this;
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Delete uploaded image if any
|
95 |
+
*
|
96 |
+
* @return Mage_Core_Model_Abstract
|
97 |
+
*/
|
98 |
+
protected function _afterDelete()
|
99 |
+
{
|
100 |
+
$this->getImageUploadModel()->delete();
|
101 |
+
return parent::_afterDelete();
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Load by attribute_is and option_id
|
106 |
+
*
|
107 |
+
* @return $this
|
108 |
+
*/
|
109 |
+
public function loadByAttributeData()
|
110 |
+
{
|
111 |
+
return $this->load($this->_getResource()->loadIdByAttributeData($this));
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Destruct object
|
116 |
+
*/
|
117 |
+
public function __destruct()
|
118 |
+
{
|
119 |
+
$this->unsetData();
|
120 |
+
unset($this->_imageUploadModel);
|
121 |
+
}
|
122 |
+
|
123 |
+
/**
|
124 |
+
* Is zoom image enabled
|
125 |
+
*
|
126 |
+
* @return bool
|
127 |
+
*/
|
128 |
+
public function isZoomEnabled()
|
129 |
+
{
|
130 |
+
return Mage::helper('colorpicker')->isZoomEnabled();
|
131 |
+
}
|
132 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Library/Abstract.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Abstract mapper library model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
abstract class Tonbo_ColorPicker_Model_Library_Abstract implements Tonbo_ColorPicker_Model_Library_Interface
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Data to map
|
33 |
+
*
|
34 |
+
* @var array
|
35 |
+
*/
|
36 |
+
protected $_dataToMap = array();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* String to map
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
protected $_stringToMap;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Init data to map
|
47 |
+
*
|
48 |
+
* @param array $dataToMap
|
49 |
+
*/
|
50 |
+
public function __construct($dataToMap)
|
51 |
+
{
|
52 |
+
$this->_dataToMap = $dataToMap;
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Get locale
|
57 |
+
*
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
public function getLocale()
|
61 |
+
{
|
62 |
+
return array();
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Do mapping
|
67 |
+
*
|
68 |
+
* @param string $string
|
69 |
+
* @param array $data
|
70 |
+
* @return bool|string
|
71 |
+
*/
|
72 |
+
public function doMapping($string, $data)
|
73 |
+
{
|
74 |
+
$this->_stringToMap = $string;
|
75 |
+
$result = array_filter($data, array($this, '_filterData'));
|
76 |
+
return !empty($result);
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Get data to map
|
81 |
+
*
|
82 |
+
* @return array
|
83 |
+
*/
|
84 |
+
public function getDataToMap()
|
85 |
+
{
|
86 |
+
return $this->_dataToMap;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Unset data to map by id
|
91 |
+
*
|
92 |
+
* @param string $stringId
|
93 |
+
* @return $this
|
94 |
+
*/
|
95 |
+
public function unsetDataToMap($stringId)
|
96 |
+
{
|
97 |
+
unset($this->_dataToMap[$stringId]);
|
98 |
+
return $this;
|
99 |
+
}
|
100 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Library/Color.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes mapper library model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Library_Color extends Tonbo_ColorPicker_Model_Library_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Get translate type
|
33 |
+
*
|
34 |
+
* @return int
|
35 |
+
*/
|
36 |
+
public function getTranslateType()
|
37 |
+
{
|
38 |
+
return Tonbo_ColorPicker_Model_Translate::TRANSLATE_TYPE_COLOR_ATTRIBUTE;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Filter data
|
43 |
+
*
|
44 |
+
* @param string $value
|
45 |
+
* @return bool
|
46 |
+
*/
|
47 |
+
protected function _filterData($value)
|
48 |
+
{
|
49 |
+
return strpos(strtolower($value), strtolower($this->_stringToMap)) !== false;
|
50 |
+
}
|
51 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Library/Interface.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* String mapper interface
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
interface Tonbo_ColorPicker_Model_Library_Interface
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Get locale
|
33 |
+
*
|
34 |
+
* @return array
|
35 |
+
*/
|
36 |
+
public function getLocale();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get translate type
|
40 |
+
*
|
41 |
+
* @return int
|
42 |
+
*/
|
43 |
+
public function getTranslateType();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get data to map
|
47 |
+
*
|
48 |
+
* @return array
|
49 |
+
*/
|
50 |
+
public function getDataToMap();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Do mapping
|
54 |
+
*
|
55 |
+
* @param string $string
|
56 |
+
* @param mixed $data data to map
|
57 |
+
* @return bool
|
58 |
+
*/
|
59 |
+
public function doMapping($string, $data);
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Unset data to map by id
|
63 |
+
*
|
64 |
+
* @param string $stringId
|
65 |
+
* @return $this
|
66 |
+
*/
|
67 |
+
public function unsetDataToMap($stringId);
|
68 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Library/Option.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color option mapper library model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Library_Option extends Tonbo_ColorPicker_Model_Library_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Get translate type
|
33 |
+
*
|
34 |
+
* @return int
|
35 |
+
*/
|
36 |
+
public function getTranslateType()
|
37 |
+
{
|
38 |
+
return Tonbo_ColorPicker_Model_Translate::TRANSLATE_TYPE_COLOR_OPTION;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Filter data
|
43 |
+
*
|
44 |
+
* @param string $value
|
45 |
+
* @return bool
|
46 |
+
*/
|
47 |
+
protected function _filterData($value)
|
48 |
+
{
|
49 |
+
return strcmp(strtolower($value), strtolower($this->_stringToMap)) === 0;
|
50 |
+
}
|
51 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Mapper.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* String mapper model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Mapper
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Default locale
|
33 |
+
*/
|
34 |
+
const DEFAULT_LOCALE = 'en_US';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Requested locales array
|
38 |
+
*
|
39 |
+
* @var array
|
40 |
+
*/
|
41 |
+
protected $_locale = array();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Translate collection
|
45 |
+
*
|
46 |
+
* @var Tonbo_ColorPicker_Model_Resource_Translation_Collection
|
47 |
+
*/
|
48 |
+
protected $_translateCollection;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Map data
|
52 |
+
*
|
53 |
+
* @param Tonbo_ColorPicker_Model_Library_Interface $library
|
54 |
+
* @return array
|
55 |
+
*/
|
56 |
+
public function mapData(Tonbo_ColorPicker_Model_Library_Interface $library)
|
57 |
+
{
|
58 |
+
$this->_prepareMapping($library);
|
59 |
+
$result = array();
|
60 |
+
foreach ($this->_translateCollection->getData() as $translation) {
|
61 |
+
foreach ($library->getDataToMap() as $valueId => $valueStrings) {
|
62 |
+
$mapResult = $library->doMapping($translation['translation_value'], $valueStrings);
|
63 |
+
if (false !== $mapResult) {
|
64 |
+
$result[][$translation['translate_value']] = $valueId;
|
65 |
+
$library->unsetDataToMap($valueId);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
return $result;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Prepare mapping
|
74 |
+
*
|
75 |
+
* @param Tonbo_ColorPicker_Model_Library_Interface $library
|
76 |
+
* @return $this
|
77 |
+
*/
|
78 |
+
protected function _prepareMapping($library)
|
79 |
+
{
|
80 |
+
$this->_setLocale($library)->_prepareCollection($library);
|
81 |
+
return $this;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Prepare translation collection
|
86 |
+
*
|
87 |
+
* @param Tonbo_ColorPicker_Model_Library_Interface $library
|
88 |
+
* @return $this
|
89 |
+
*/
|
90 |
+
protected function _prepareCollection($library)
|
91 |
+
{
|
92 |
+
$this->_translateCollection = Mage::getModel('colorpicker_resource/translation_collection');
|
93 |
+
$this->_translateCollection->addFieldToSelect(array('translation_value'))
|
94 |
+
->joinTranslateData()
|
95 |
+
->addFieldToFilter('translate_type', $library->getTranslateType())
|
96 |
+
->addFieldToFilter('translation_language', array('in' => $this->_locale));
|
97 |
+
return $this;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Get locale
|
102 |
+
*
|
103 |
+
* @param Tonbo_ColorPicker_Model_Library_Interface $library
|
104 |
+
* @return this
|
105 |
+
*/
|
106 |
+
protected function _setLocale($library)
|
107 |
+
{
|
108 |
+
$locales = $library->getLocale();
|
109 |
+
if (!empty($locales)) {
|
110 |
+
$this->_locale = $locales;
|
111 |
+
} else {
|
112 |
+
$locales = Mage::helper('colorpicker')->getSystemLocales();
|
113 |
+
$this->_locale = array_unique(array_merge($this->_getDefaultLocale(), $locales), SORT_STRING);
|
114 |
+
}
|
115 |
+
return $this;
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Default locale
|
120 |
+
*
|
121 |
+
* @return string
|
122 |
+
*/
|
123 |
+
protected function _getDefaultLocale()
|
124 |
+
{
|
125 |
+
return array(self::DEFAULT_LOCALE);
|
126 |
+
}
|
127 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Catalog/Eav/Mysql4/Attribute.php
ADDED
@@ -0,0 +1,261 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color attributes data save model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Catalog_Eav_Mysql4_Attribute
|
30 |
+
extends Mage_Catalog_Model_Resource_Eav_Mysql4_Attribute
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Save option
|
34 |
+
*
|
35 |
+
* Save option with color if select type of attribute
|
36 |
+
*
|
37 |
+
* @param Mage_Core_Model_Abstract $object
|
38 |
+
* @return Tonbo_ColorPicker_Model_Resource_Catalog_Eav_Attribute
|
39 |
+
*/
|
40 |
+
protected function _saveOption(Mage_Core_Model_Abstract $object)
|
41 |
+
{
|
42 |
+
if ($this->getColorPickerHelper()->isColorAttribute($object)) {
|
43 |
+
return $this->_saveOptionWithColorAttribute($object);
|
44 |
+
} else {
|
45 |
+
return parent::_saveOption($object);
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* Get color picker helper
|
51 |
+
*
|
52 |
+
* @return \Tonbo_ColorPicker_Helper_Data
|
53 |
+
*/
|
54 |
+
public function getColorPickerHelper()
|
55 |
+
{
|
56 |
+
return Mage::helper('colorpicker');
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Save options with color attribute if any
|
61 |
+
*
|
62 |
+
* @param Mage_Core_Model_Abstract $object
|
63 |
+
* @return $this
|
64 |
+
*/
|
65 |
+
protected function _saveOptionWithColorAttribute(Mage_Core_Model_Abstract $object)
|
66 |
+
{
|
67 |
+
$option = $object->getOption();
|
68 |
+
if (is_array($option)) {
|
69 |
+
$write = $this->_getWriteAdapter();
|
70 |
+
$optionTable = $this->getTable('attribute_option');
|
71 |
+
$optionValueTable = $this->getTable('attribute_option_value');
|
72 |
+
|
73 |
+
$stores = Mage::getModel('core/store')
|
74 |
+
->getResourceCollection()
|
75 |
+
->setLoadDefault(true)
|
76 |
+
->load();
|
77 |
+
|
78 |
+
if (isset($option['value'])) {
|
79 |
+
$attrDefaultValue = array();
|
80 |
+
if (!is_array($object->getDefault())) {
|
81 |
+
$object->setDefault(array());
|
82 |
+
}
|
83 |
+
|
84 |
+
foreach ($option['value'] as $optionId => $values) {
|
85 |
+
// Default value
|
86 |
+
if (!isset($values[0])) {
|
87 |
+
Mage::throwException(Mage::helper('eav')->__('Default option value is not defined.'));
|
88 |
+
}
|
89 |
+
|
90 |
+
$intOptionId = (int)$optionId;
|
91 |
+
if (!empty($option['delete'][$optionId])) {
|
92 |
+
if ($intOptionId) {
|
93 |
+
$condition = $write->quoteInto('option_id=?', $intOptionId);
|
94 |
+
$write->delete($optionTable, $condition);
|
95 |
+
/** @var $colorAttribute Tonbo_ColorPicker_Model_Color_Value */
|
96 |
+
$colorAttribute = Mage::getModel('colorpicker/color_value', array(
|
97 |
+
'option_id' => $intOptionId,
|
98 |
+
'attribute_id' => $object->getId(),
|
99 |
+
));
|
100 |
+
try {
|
101 |
+
$colorAttribute->loadByAttributeData()->getImageUploadModel()->delete();
|
102 |
+
} catch (Exception $e) {
|
103 |
+
Mage::logException($e);
|
104 |
+
}
|
105 |
+
unset($colorAttribute);
|
106 |
+
}
|
107 |
+
continue;
|
108 |
+
}
|
109 |
+
|
110 |
+
if (!$intOptionId) {
|
111 |
+
$data = array(
|
112 |
+
'attribute_id' => $object->getId(),
|
113 |
+
'sort_order' => isset($option['order'][$optionId]) ? $option['order'][$optionId] : 0,
|
114 |
+
);
|
115 |
+
$write->insert($optionTable, $data);
|
116 |
+
$intOptionId = $write->lastInsertId();
|
117 |
+
$this->_insertColorRecord($option, $optionId, $intOptionId, $object->getId());
|
118 |
+
} else {
|
119 |
+
$data = array(
|
120 |
+
'sort_order' => isset($option['order'][$optionId]) ? $option['order'][$optionId] : 0,
|
121 |
+
);
|
122 |
+
$write->update($optionTable, $data, $write->quoteInto('option_id=?', $intOptionId));
|
123 |
+
$this->_updateColorRecordFromData($option, $optionId, $intOptionId, $object->getId());
|
124 |
+
}
|
125 |
+
|
126 |
+
if (in_array($optionId, $object->getDefault())) {
|
127 |
+
$attrDefaultValue = array($intOptionId);
|
128 |
+
}
|
129 |
+
|
130 |
+
$write->delete($optionValueTable, $write->quoteInto('option_id=?', $intOptionId));
|
131 |
+
foreach ($stores as $store) {
|
132 |
+
if (isset($values[$store->getId()])
|
133 |
+
&& (!empty($values[$store->getId()]) || $values[$store->getId()] == '0')
|
134 |
+
) {
|
135 |
+
$data = array(
|
136 |
+
'option_id' => $intOptionId,
|
137 |
+
'store_id' => $store->getId(),
|
138 |
+
'value' => $values[$store->getId()],
|
139 |
+
);
|
140 |
+
$write->insert($optionValueTable, $data);
|
141 |
+
}
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
$write->update($this->getMainTable(), array(
|
146 |
+
'default_value' => implode(',', $attrDefaultValue)
|
147 |
+
), $write->quoteInto($this->getIdFieldName() . '=?', $object->getId()));
|
148 |
+
}
|
149 |
+
}
|
150 |
+
return $this;
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Validate color record
|
155 |
+
*
|
156 |
+
* @param array $option
|
157 |
+
* @param int $optionId
|
158 |
+
* @param int $attributeId
|
159 |
+
* @return bool
|
160 |
+
*/
|
161 |
+
protected function _validateColorRecord($option, $optionId, $attributeId)
|
162 |
+
{
|
163 |
+
if (empty($option['color_picker']['value'][$optionId])) {
|
164 |
+
return false;
|
165 |
+
}
|
166 |
+
if (!$attributeId) {
|
167 |
+
Mage::throwException('Attribute id was missed');
|
168 |
+
}
|
169 |
+
if (empty($option['color_picker']['type'][$optionId])) {
|
170 |
+
Mage::throwException('Color type missed');
|
171 |
+
}
|
172 |
+
return true;
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Update or insert color value from data
|
177 |
+
*
|
178 |
+
* @param array $option
|
179 |
+
* @param int $optionId
|
180 |
+
* @param int $intOptionId
|
181 |
+
* @param int $attributeId
|
182 |
+
* @return $this
|
183 |
+
*/
|
184 |
+
protected function _updateColorRecordFromData($option, $optionId, $intOptionId, $attributeId)
|
185 |
+
{
|
186 |
+
if ($this->_getColorValueCount($intOptionId)) {
|
187 |
+
$this->_updateColorRecord($option, $optionId, $intOptionId, $attributeId);
|
188 |
+
} else {
|
189 |
+
$this->_insertColorRecord($option, $optionId, $intOptionId, $attributeId);
|
190 |
+
}
|
191 |
+
return $this;
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Get color value count
|
196 |
+
*
|
197 |
+
* @param int $intOptionId
|
198 |
+
* @return string
|
199 |
+
*/
|
200 |
+
protected function _getColorValueCount($intOptionId)
|
201 |
+
{
|
202 |
+
$read = $this->_getReadAdapter();
|
203 |
+
$colorValueTable = $this->getTable('colorpicker/value');
|
204 |
+
$select = $read->select()
|
205 |
+
->from(array('main_table' => $colorValueTable), 'COUNT(*)')
|
206 |
+
->where('option_id=?', $intOptionId);
|
207 |
+
$valueCount = $read->fetchOne($select);
|
208 |
+
return $valueCount;
|
209 |
+
}
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Insert color value record
|
213 |
+
*
|
214 |
+
* @param array $option
|
215 |
+
* @param int $optionId
|
216 |
+
* @param int $intOptionId
|
217 |
+
* @param int $attributeId
|
218 |
+
* @return $this
|
219 |
+
*/
|
220 |
+
protected function _insertColorRecord($option, $optionId, $intOptionId, $attributeId)
|
221 |
+
{
|
222 |
+
if (!$this->_validateColorRecord($option, $optionId, $attributeId)) {
|
223 |
+
return $this;
|
224 |
+
}
|
225 |
+
$colorValueTable = $this->getTable('colorpicker/value');
|
226 |
+
$write = $this->_getWriteAdapter();
|
227 |
+
$colorData = array(
|
228 |
+
'option_id' => $intOptionId,
|
229 |
+
'attribute_id' => $attributeId,
|
230 |
+
'color_value' => $option['color_picker']['value'][$optionId],
|
231 |
+
'color_type' => $option['color_picker']['type'][$optionId]
|
232 |
+
);
|
233 |
+
$write->insert($colorValueTable, $colorData);
|
234 |
+
return $this;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Update color value record
|
239 |
+
*
|
240 |
+
* @param array $option
|
241 |
+
* @param int $optionId
|
242 |
+
* @param int $intOptionId
|
243 |
+
* @param int $attributeId
|
244 |
+
* @return $this
|
245 |
+
*/
|
246 |
+
protected function _updateColorRecord($option, $optionId, $intOptionId, $attributeId)
|
247 |
+
{
|
248 |
+
if (!$this->_validateColorRecord($option, $optionId, $attributeId)) {
|
249 |
+
return $this;
|
250 |
+
}
|
251 |
+
$colorValueTable = $this->getTable('colorpicker/value');
|
252 |
+
$write = $this->_getWriteAdapter();
|
253 |
+
$colorData = array(
|
254 |
+
'attribute_id' => $attributeId,
|
255 |
+
'color_value' => $option['color_picker']['value'][$optionId],
|
256 |
+
'color_type' => $option['color_picker']['type'][$optionId]
|
257 |
+
);
|
258 |
+
$write->update($colorValueTable, $colorData, $write->quoteInto('option_id=?', $intOptionId));
|
259 |
+
return $this;
|
260 |
+
}
|
261 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Color/Value.php
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color value resource model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Color_Value extends Mage_Core_Model_Mysql4_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Constructor, setting table and index field
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->_init('colorpicker/value', 'color_id');
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Save record or update if exists
|
41 |
+
*
|
42 |
+
* @param Tonbo_ColorPicker_Model_Color_Value $colorValue
|
43 |
+
* @return $this
|
44 |
+
*/
|
45 |
+
public function insertImageOnDuplicate(Tonbo_ColorPicker_Model_Color_Value $colorValue)
|
46 |
+
{
|
47 |
+
$newData = array(
|
48 |
+
'attribute_id' => $colorValue->getAttributeId(),
|
49 |
+
'option_id' => $colorValue->getOptionId(),
|
50 |
+
'color_image' => $colorValue->getColorImage(),
|
51 |
+
'color_type' => $colorValue->getColorType()
|
52 |
+
);
|
53 |
+
|
54 |
+
$this->_getWriteAdapter()->insertOnDuplicate(
|
55 |
+
$this->getMainTable(), $newData, array('color_image', 'color_type')
|
56 |
+
);
|
57 |
+
return $this;
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Load id by attribute data
|
62 |
+
*
|
63 |
+
* @param Tonbo_ColorPicker_Model_Color_Value $colorValue
|
64 |
+
* @return string
|
65 |
+
*/
|
66 |
+
public function loadIdByAttributeData(Tonbo_ColorPicker_Model_Color_Value $colorValue)
|
67 |
+
{
|
68 |
+
$bind = array(':attribute_id' => $colorValue->getAttributeId(), ':option_id' => $colorValue->getOptionId());
|
69 |
+
|
70 |
+
$select = $this->_getWriteAdapter()->select()->from($this->getMainTable(), array($this->getIdFieldName()))
|
71 |
+
->where('attribute_id=:attribute_id AND option_id=:option_id');
|
72 |
+
return $this->_getWriteAdapter()->fetchOne($select, $bind);
|
73 |
+
}
|
74 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Color/Value/Collection.php
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color value resource collection
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Color_Value_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Internal constructor
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->_init('colorpicker/color_value');
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Load Color collection by attribute object
|
41 |
+
*
|
42 |
+
* @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
|
43 |
+
* @return $this
|
44 |
+
*/
|
45 |
+
public function loadCollectionByAttribute(Mage_Catalog_Model_Resource_Eav_Attribute $attribute)
|
46 |
+
{
|
47 |
+
if (!$attribute->getId()) {
|
48 |
+
Mage::throwException('Attribute id missed');
|
49 |
+
}
|
50 |
+
$this->addFieldToFilter('attribute_id', $attribute->getId());
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Translate.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate resource model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Translate extends Mage_Core_Model_Mysql4_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Constructor, setting table and index field
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->_init('colorpicker/translate', 'translate_id');
|
37 |
+
}
|
38 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Translation.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translation resource model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Translation extends Mage_Core_Model_Mysql4_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Constructor, setting table and index field
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->_init('colorpicker/translation', 'translation_id');
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Data array to insert
|
41 |
+
*
|
42 |
+
* @param array $data
|
43 |
+
* @return $this
|
44 |
+
*/
|
45 |
+
public function insertData($data)
|
46 |
+
{
|
47 |
+
$this->_getWriteAdapter()->insertArray(
|
48 |
+
$this->getMainTable(),
|
49 |
+
array('translate_id', 'translation_value', 'translation_language'),
|
50 |
+
$data
|
51 |
+
);
|
52 |
+
return $this;
|
53 |
+
}
|
54 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Resource/Translation/Collection.php
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translation resource collection
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Resource_Translation_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Internal constructor
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
$this->_init('colorpicker/translation');
|
37 |
+
}
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Join translate data
|
41 |
+
*
|
42 |
+
* @return $this
|
43 |
+
*/
|
44 |
+
public function joinTranslateData()
|
45 |
+
{
|
46 |
+
if (!$this->getFlag('translate_data_joined')) {
|
47 |
+
$this->getSelect()->joinInner(
|
48 |
+
array('t' => $this->getTable('colorpicker/translate')),
|
49 |
+
't.translate_id = main_table.translate_id',
|
50 |
+
array('translate_value')
|
51 |
+
);
|
52 |
+
$this->setFlag('translate_data_joined', true);
|
53 |
+
}
|
54 |
+
return $this;
|
55 |
+
}
|
56 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translate extends Mage_Core_Model_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Translate type color attribute
|
33 |
+
*/
|
34 |
+
const TRANSLATE_TYPE_COLOR_ATTRIBUTE = 1;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Translate type color option
|
38 |
+
*/
|
39 |
+
const TRANSLATE_TYPE_COLOR_OPTION = 2;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Model constructor
|
43 |
+
*/
|
44 |
+
protected function _construct()
|
45 |
+
{
|
46 |
+
parent::_construct();
|
47 |
+
$this->_init('colorpicker/translate');
|
48 |
+
}
|
49 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/Entity.php
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate entity model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translate_Entity implements Tonbo_ColorPicker_Model_Translate_EntityInterface
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Translate value
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
protected $_translateValue;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Translate type
|
40 |
+
*
|
41 |
+
* @var string
|
42 |
+
*/
|
43 |
+
protected $_translateType;
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Translation value
|
47 |
+
*
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
protected $_translationValue;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Translation language
|
54 |
+
*
|
55 |
+
* @var string
|
56 |
+
*/
|
57 |
+
protected $_translationLanguage;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Init translate entity
|
61 |
+
*
|
62 |
+
* @param array $data
|
63 |
+
*/
|
64 |
+
public function __construct($data)
|
65 |
+
{
|
66 |
+
if (!is_array($data)
|
67 |
+
|| empty($data['translate_value'])
|
68 |
+
|| empty($data['translation_value'])
|
69 |
+
|| empty($data['translate_type'])
|
70 |
+
|| empty($data['translation_language'])
|
71 |
+
) {
|
72 |
+
Mage::throwException('Translate entity has invalid arguments');
|
73 |
+
}
|
74 |
+
$this->_translateValue = trim($data['translate_value']);
|
75 |
+
$this->_translateType = trim($data['translate_type']);
|
76 |
+
$this->_translationValue = trim($data['translation_value']);
|
77 |
+
$this->_translationLanguage = trim($data['translation_language']);
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Get get translate value
|
82 |
+
*
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
public function getTranslateValue()
|
86 |
+
{
|
87 |
+
return $this->_translateValue;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Get translate type
|
92 |
+
*
|
93 |
+
* @return int
|
94 |
+
*/
|
95 |
+
public function getTranslateType()
|
96 |
+
{
|
97 |
+
return $this->_translateType;
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Get get translation value
|
102 |
+
*
|
103 |
+
* @return string
|
104 |
+
*/
|
105 |
+
public function getTranslationValue()
|
106 |
+
{
|
107 |
+
return $this->_translationValue;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Get get translation language
|
112 |
+
*
|
113 |
+
* @return string
|
114 |
+
*/
|
115 |
+
public function getTranslationLanguage()
|
116 |
+
{
|
117 |
+
return $this->_translationLanguage;
|
118 |
+
}
|
119 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/EntityInterface.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate register interface
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
interface Tonbo_ColorPicker_Model_Translate_EntityInterface
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Get get translate value
|
33 |
+
*
|
34 |
+
* @return string
|
35 |
+
*/
|
36 |
+
public function getTranslateValue();
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Get get translate type
|
40 |
+
*
|
41 |
+
* @return int
|
42 |
+
*/
|
43 |
+
public function getTranslateType();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get get translation value
|
47 |
+
*
|
48 |
+
* @return string
|
49 |
+
*/
|
50 |
+
public function getTranslationValue();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Get get translation language
|
54 |
+
*
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
+
public function getTranslationLanguage();
|
58 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/Register.php
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate register model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translate_Register
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Registration strategy
|
33 |
+
*
|
34 |
+
* @var Tonbo_ColorPicker_Model_Translate_EntityInterface
|
35 |
+
*/
|
36 |
+
protected $_source;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Translation data to register
|
40 |
+
*
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
protected $_translationData = array();
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Translate data to register
|
47 |
+
*
|
48 |
+
* @var array
|
49 |
+
*/
|
50 |
+
protected $_translateData = array();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Init registration
|
54 |
+
*
|
55 |
+
* @param Tonbo_ColorPicker_Model_Translate_SourceInterface $strategy
|
56 |
+
*/
|
57 |
+
public function __construct(Tonbo_ColorPicker_Model_Translate_SourceInterface $strategy)
|
58 |
+
{
|
59 |
+
$this->_source = $strategy;
|
60 |
+
$this->_validateData()->_registerData();
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Read source and prepare data for save
|
65 |
+
* @return $this
|
66 |
+
*/
|
67 |
+
protected function _registerData()
|
68 |
+
{
|
69 |
+
$dataSource = $this->_source->getTranslateData();
|
70 |
+
|
71 |
+
/** @var $entity Tonbo_ColorPicker_Model_Translate_EntityInterface */
|
72 |
+
foreach ($dataSource as $entity) {
|
73 |
+
$this->_translationData[] = array(
|
74 |
+
$this->_getTranslateId($entity),
|
75 |
+
$entity->getTranslationValue(),
|
76 |
+
$entity->getTranslationLanguage()
|
77 |
+
);
|
78 |
+
if (count($this->_translationData) > 10) {
|
79 |
+
$this->_saveTranslations();
|
80 |
+
}
|
81 |
+
}
|
82 |
+
$this->_saveTranslations();
|
83 |
+
return $this;
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Save translations
|
88 |
+
*
|
89 |
+
* @return $this
|
90 |
+
*/
|
91 |
+
protected function _saveTranslations()
|
92 |
+
{
|
93 |
+
if (!count($this->_translationData)) {
|
94 |
+
return $this;
|
95 |
+
}
|
96 |
+
/** @var $translationModel Tonbo_ColorPicker_Model_Resource_Translation */
|
97 |
+
$translationModel = Mage::getModel('colorpicker_resource/translation');
|
98 |
+
$translationModel->insertData($this->_translationData);
|
99 |
+
$this->_translationData = array();
|
100 |
+
return $this;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Validate data source
|
105 |
+
*
|
106 |
+
* @throws Mage_Core_Exception
|
107 |
+
* @return this
|
108 |
+
*/
|
109 |
+
protected function _validateData()
|
110 |
+
{
|
111 |
+
if (!count($this->_source->getTranslateData())) {
|
112 |
+
Mage::throwException('Source data is empty');
|
113 |
+
}
|
114 |
+
foreach ($this->_source->getTranslateData() as $entity) {
|
115 |
+
if (!$entity instanceof Tonbo_ColorPicker_Model_Translate_EntityInterface) {
|
116 |
+
Mage::throwException('Source content is not valid');
|
117 |
+
}
|
118 |
+
}
|
119 |
+
return $this;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Get translate id from value
|
124 |
+
*
|
125 |
+
* @param Tonbo_ColorPicker_Model_Translate_EntityInterface $entity
|
126 |
+
* @return int
|
127 |
+
*/
|
128 |
+
protected function _getTranslateId($entity)
|
129 |
+
{
|
130 |
+
if (empty($this->_translateData[$entity->getTranslateValue()])) {
|
131 |
+
/** @var $translateModel Tonbo_ColorPicker_Model_Translate */
|
132 |
+
$translateModel = Mage::getModel('colorpicker/translate');
|
133 |
+
$translateModel->setTranslateValue($entity->getTranslateValue())
|
134 |
+
->setTranslateType($entity->getTranslateType());
|
135 |
+
$translateModel->save();
|
136 |
+
$this->_translateData[$entity->getTranslateValue()] = $translateModel->getId();
|
137 |
+
}
|
138 |
+
return $this->_translateData[$entity->getTranslateValue()];
|
139 |
+
}
|
140 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Abstract.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Abstract source model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
abstract class Tonbo_ColorPicker_Model_Translate_Source_Abstract
|
30 |
+
implements Tonbo_ColorPicker_Model_Translate_SourceInterface
|
31 |
+
{
|
32 |
+
/**
|
33 |
+
* Library file name
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
+
*/
|
37 |
+
protected $_libFileName;
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Library simplexml object
|
41 |
+
*
|
42 |
+
* @var Varien_Simplexml_Element
|
43 |
+
*/
|
44 |
+
protected $_libXml;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Prepared source data
|
48 |
+
*
|
49 |
+
* @var array
|
50 |
+
*/
|
51 |
+
protected $_data = array();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Prepare source data
|
55 |
+
*
|
56 |
+
* @return Tonbo_ColorPicker_Model_Translate_Source_Abstract
|
57 |
+
*/
|
58 |
+
abstract protected function _prepareSource();
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get library folder path
|
62 |
+
*
|
63 |
+
* @return string
|
64 |
+
*/
|
65 |
+
public function getLibPath()
|
66 |
+
{
|
67 |
+
return Mage::getModuleDir('etc', 'Tonbo_ColorPicker') . DIRECTORY_SEPARATOR . 'libraries';
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Get library file
|
72 |
+
*
|
73 |
+
* @return string
|
74 |
+
*/
|
75 |
+
protected function _getSource()
|
76 |
+
{
|
77 |
+
if (empty($this->_libFileName)) {
|
78 |
+
Mage::throwException('Library source was not defined');
|
79 |
+
}
|
80 |
+
return $this->getLibPath() . DIRECTORY_SEPARATOR . $this->_libFileName;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Read xml library file
|
85 |
+
*
|
86 |
+
* @return Varien_Simplexml_Element
|
87 |
+
*/
|
88 |
+
protected function _readXml()
|
89 |
+
{
|
90 |
+
if (null === $this->_libXml) {
|
91 |
+
$this->_libXml = simplexml_load_file($this->_getSource(), 'Varien_Simplexml_Element');
|
92 |
+
}
|
93 |
+
return $this->_libXml;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Get get translate values
|
98 |
+
*
|
99 |
+
* @return array
|
100 |
+
*/
|
101 |
+
public function getTranslateData()
|
102 |
+
{
|
103 |
+
$this->_prepareSource();
|
104 |
+
return $this->_data;
|
105 |
+
}
|
106 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Color.php
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color library source model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translate_Source_Color extends Tonbo_ColorPicker_Model_Translate_Source_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Default destination color value
|
33 |
+
*/
|
34 |
+
const COLOR_DEFAULT_TRANSLATION = 'color';
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Library file name
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
protected $_libFileName = 'color_lib.xml';
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Prepare data
|
45 |
+
*
|
46 |
+
* @return Tonbo_ColorPicker_Model_Translate_Source_Color
|
47 |
+
*/
|
48 |
+
protected function _prepareSource()
|
49 |
+
{
|
50 |
+
if (count($this->_data)) {
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
|
54 |
+
if (!$this->_readXml()->hasChildren()) {
|
55 |
+
Mage::throwException($this->_libFileName . ' library has broken structure');
|
56 |
+
return $this;
|
57 |
+
}
|
58 |
+
/** @var $nodeList Varien_Simplexml_Element */
|
59 |
+
foreach ($this->_readXml()->children() as $nodeList) {
|
60 |
+
if (!$nodeList->hasChildren()) {
|
61 |
+
Mage::throwException($this->_libFileName . ' library has broken structure:'
|
62 |
+
. ' broken node name: ' . $nodeList->getName());
|
63 |
+
}
|
64 |
+
/** @var $translation Varien_Simplexml_Element */
|
65 |
+
foreach ($nodeList->children() as $translation) {
|
66 |
+
$this->_data[] = Mage::getModel('colorpicker/translate_entity', array(
|
67 |
+
'translate_value' => self::COLOR_DEFAULT_TRANSLATION,
|
68 |
+
'translate_type' => Tonbo_ColorPicker_Model_Translate::TRANSLATE_TYPE_COLOR_ATTRIBUTE,
|
69 |
+
'translation_value' => (string)$translation,
|
70 |
+
'translation_language' => $nodeList->getName()
|
71 |
+
));
|
72 |
+
}
|
73 |
+
}
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/Source/Option.php
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color options library source model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translate_Source_Option extends Tonbo_ColorPicker_Model_Translate_Source_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Library file name
|
33 |
+
*
|
34 |
+
* @var string
|
35 |
+
*/
|
36 |
+
protected $_libFileName = 'option_lib.xml';
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Prepare data
|
40 |
+
*
|
41 |
+
* @return Tonbo_ColorPicker_Model_Translate_Source_Color
|
42 |
+
*/
|
43 |
+
protected function _prepareSource()
|
44 |
+
{
|
45 |
+
if (count($this->_data)) {
|
46 |
+
return $this;
|
47 |
+
}
|
48 |
+
|
49 |
+
if (!$this->_readXml()->hasChildren()) {
|
50 |
+
Mage::throwException($this->_libFileName . ' library has broken structure');
|
51 |
+
return $this;
|
52 |
+
}
|
53 |
+
/** @var $nodeList Varien_Simplexml_Element */
|
54 |
+
foreach ($this->_readXml()->children() as $nodeList) {
|
55 |
+
if (!$nodeList->hasChildren()) {
|
56 |
+
Mage::throwException($this->_libFileName . ' library has broken structure:'
|
57 |
+
. ' broken node name: ' . $nodeList->getName());
|
58 |
+
}
|
59 |
+
/** @var $translation Varien_Simplexml_Element */
|
60 |
+
foreach ($nodeList->children() as $translation) {
|
61 |
+
$translationLanguage = $this->_getTranslationLanguage($translation);
|
62 |
+
foreach ($translationLanguage as $language) {
|
63 |
+
$translations = explode('|', (string)$translation);
|
64 |
+
foreach ($translations as $translationValue) {
|
65 |
+
$this->_data[] = Mage::getModel('colorpicker/translate_entity', array(
|
66 |
+
'translate_value' => $this->_prepareTranslateValue($nodeList),
|
67 |
+
'translate_type' => Tonbo_ColorPicker_Model_Translate::TRANSLATE_TYPE_COLOR_OPTION,
|
68 |
+
'translation_value' => $translationValue,
|
69 |
+
'translation_language' => $language
|
70 |
+
));
|
71 |
+
}
|
72 |
+
}
|
73 |
+
}
|
74 |
+
}
|
75 |
+
return $this;
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Prepare translate value
|
80 |
+
*
|
81 |
+
* @param Varien_Simplexml_Element $node
|
82 |
+
* @return string
|
83 |
+
*/
|
84 |
+
protected function _prepareTranslateValue(Varien_Simplexml_Element $node)
|
85 |
+
{
|
86 |
+
$value = $node->getAttribute('value');
|
87 |
+
if (empty($value) || strlen($value)!== 7 || substr_compare($value, '#', 0, 1) !== 0) {
|
88 |
+
Mage::throwException('Broken translate value');
|
89 |
+
}
|
90 |
+
return substr($value, 1);
|
91 |
+
}
|
92 |
+
|
93 |
+
/**
|
94 |
+
* Get translation language
|
95 |
+
*
|
96 |
+
* @param Varien_Simplexml_Element $translation
|
97 |
+
* @return array
|
98 |
+
*/
|
99 |
+
protected function _getTranslationLanguage(Varien_Simplexml_Element $translation)
|
100 |
+
{
|
101 |
+
$value = $translation->getAttribute('language');
|
102 |
+
$value = explode('|', $value);
|
103 |
+
if (empty($value)) {
|
104 |
+
Mage::throwException('Broken translate language');
|
105 |
+
}
|
106 |
+
return $value;
|
107 |
+
}
|
108 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translate/SourceInterface.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translate register interface
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
interface Tonbo_ColorPicker_Model_Translate_SourceInterface
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Get get translate values
|
33 |
+
*
|
34 |
+
* Should be array of Tonbo_ColorPicker_Model_Translate_Entity
|
35 |
+
*
|
36 |
+
* @return array
|
37 |
+
*/
|
38 |
+
public function getTranslateData();
|
39 |
+
}
|
app/code/community/Tonbo/ColorPicker/Model/Translation.php
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Translation model
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Model_Translation extends Mage_Core_Model_Abstract
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* Model constructor
|
33 |
+
*/
|
34 |
+
protected function _construct()
|
35 |
+
{
|
36 |
+
parent::_construct();
|
37 |
+
$this->_init('colorpicker/translation');
|
38 |
+
}
|
39 |
+
}
|
app/code/community/Tonbo/ColorPicker/controllers/Adminhtml/TonboController.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Color Picker Adminhtml Tonbo controller
|
24 |
+
*
|
25 |
+
* @category Tonbo
|
26 |
+
* @package Tonbo_ColorPicker
|
27 |
+
* @author Tonbo Inc Team <info@tonboinc.com>
|
28 |
+
*/
|
29 |
+
class Tonbo_ColorPicker_Adminhtml_TonboController extends Mage_Adminhtml_Controller_Action
|
30 |
+
{
|
31 |
+
/**
|
32 |
+
* @var Tonbo_ColorPicker_Model_Color_Value
|
33 |
+
*/
|
34 |
+
protected $_imageObject;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Upload image form
|
38 |
+
*/
|
39 |
+
public function uploadFormAction()
|
40 |
+
{
|
41 |
+
$this->getResponse()->setBody(
|
42 |
+
$this->loadLayout(false)->getLayout()->getBlock('root')->toHtml()
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Color picker image upload action
|
48 |
+
*/
|
49 |
+
public function uploadAction()
|
50 |
+
{
|
51 |
+
try {
|
52 |
+
$errorMessage = '';
|
53 |
+
$imagePath = $this->_loadImageObject()->loadByAttributeData()->getImageUploadModel()
|
54 |
+
->uploadImage('color_image');
|
55 |
+
$this->_loadImageObject()->setColorImage($imagePath)
|
56 |
+
->setColorType(Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE)->saveImage();
|
57 |
+
$this->_loadImageObject()->getImageUploadModel()->getImageWithSize($this->_loadImageObject());
|
58 |
+
} catch (Exception $e) {
|
59 |
+
$errorMessage = $e->getMessage();
|
60 |
+
Mage::logException($e);
|
61 |
+
$imagePath = '';
|
62 |
+
}
|
63 |
+
$this->getResponse()->setBody(
|
64 |
+
$this->loadLayout(false)->getLayout()->getBlock('root')
|
65 |
+
->setImageUrl($this->_loadImageObject()->getImageUploadModel()->getMediaUrl($imagePath))
|
66 |
+
->setImagePath($imagePath)
|
67 |
+
->setErrorMessage($errorMessage)
|
68 |
+
->toHtml()
|
69 |
+
);
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Delete option action
|
74 |
+
*/
|
75 |
+
public function deleteOptionAction()
|
76 |
+
{
|
77 |
+
try {
|
78 |
+
$this->_loadImageObject()->loadByAttributeData()->delete();
|
79 |
+
$result = array('success' => true);
|
80 |
+
} catch (Exception $e) {
|
81 |
+
$result = array('error' => $e->getMessage());
|
82 |
+
Mage::logException($e);
|
83 |
+
}
|
84 |
+
|
85 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Detect option action
|
90 |
+
*/
|
91 |
+
public function detectOptionAction()
|
92 |
+
{
|
93 |
+
try {
|
94 |
+
$isNew = $this->getRequest()->getParam('is_new', '1');
|
95 |
+
$optionId = $this->getRequest()->getParam('option_id', false);
|
96 |
+
$attributeId = $this->getRequest()->getParam('attribute_id', false);
|
97 |
+
$colorName = $this->getRequest()->getParam('value', false);
|
98 |
+
if (!$colorName || !$optionId || !$attributeId) {
|
99 |
+
Mage::throwException('Required parameters were missed');
|
100 |
+
}
|
101 |
+
$mappedData = Mage::helper('colorpicker')->mapColorOptions(array($optionId => array($colorName)));
|
102 |
+
$colorValue = null;
|
103 |
+
foreach ($mappedData as $entity) {
|
104 |
+
$colorValue = key($entity);
|
105 |
+
if (!$isNew) {
|
106 |
+
/** @var Tonbo_ColorPicker_Model_Color_Value $colorValueModel */
|
107 |
+
$colorValueModel = Mage::getModel('colorpicker/color_value');
|
108 |
+
$colorValueModel->setData(array(
|
109 |
+
'attribute_id' => $attributeId,
|
110 |
+
'option_id' => current($entity),
|
111 |
+
'color_value' => $colorValue,
|
112 |
+
'color_type' => Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE
|
113 |
+
))->save();
|
114 |
+
}
|
115 |
+
break;
|
116 |
+
}
|
117 |
+
$result = array('success' => true);
|
118 |
+
if ($colorValue) {
|
119 |
+
$result['color'] = $colorValue;
|
120 |
+
}
|
121 |
+
} catch (Exception $e) {
|
122 |
+
$result = array('error' => $e->getMessage());
|
123 |
+
Mage::logException($e);
|
124 |
+
}
|
125 |
+
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Load image object by request data
|
130 |
+
*
|
131 |
+
* @return Tonbo_ColorPicker_Model_Color_Value
|
132 |
+
*/
|
133 |
+
protected function _loadImageObject()
|
134 |
+
{
|
135 |
+
if (null !== $this->_imageObject) {
|
136 |
+
return $this->_imageObject;
|
137 |
+
}
|
138 |
+
$optionId = $this->getRequest()->getParam('option_id', false);
|
139 |
+
$attributeId = $this->getRequest()->getParam('attribute_id', false);
|
140 |
+
|
141 |
+
if (!$attributeId || !$optionId) {
|
142 |
+
Mage::throwException('Attribute id or option id has been missed in request');
|
143 |
+
}
|
144 |
+
|
145 |
+
return $this->_imageObject = Mage::getModel('colorpicker/color_value', array(
|
146 |
+
'option_id' => $optionId,
|
147 |
+
'attribute_id' => $attributeId,
|
148 |
+
));
|
149 |
+
}
|
150 |
+
}
|
app/code/community/Tonbo/ColorPicker/etc/config.xml
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<Tonbo_ColorPicker>
|
26 |
+
<version>1.0.0.2</version>
|
27 |
+
</Tonbo_ColorPicker>
|
28 |
+
</modules>
|
29 |
+
<global>
|
30 |
+
<resources>
|
31 |
+
<colorpicker_setup>
|
32 |
+
<setup>
|
33 |
+
<module>Tonbo_ColorPicker</module>
|
34 |
+
<class>Mage_Core_Model_Resource_Setup</class>
|
35 |
+
</setup>
|
36 |
+
</colorpicker_setup>
|
37 |
+
</resources>
|
38 |
+
<models>
|
39 |
+
<colorpicker>
|
40 |
+
<class>Tonbo_ColorPicker_Model</class>
|
41 |
+
<resourceModel>colorpicker_resource</resourceModel>
|
42 |
+
</colorpicker>
|
43 |
+
<colorpicker_resource>
|
44 |
+
<class>Tonbo_ColorPicker_Model_Resource</class>
|
45 |
+
<entities>
|
46 |
+
<value><table>tonbo_color_value</table></value>
|
47 |
+
<translate><table>tonbo_translate</table></translate>
|
48 |
+
<translation><table>tonbo_translation</table></translation>
|
49 |
+
</entities>
|
50 |
+
</colorpicker_resource>
|
51 |
+
<catalog_resource_eav_mysql4>
|
52 |
+
<rewrite>
|
53 |
+
<attribute>Tonbo_ColorPicker_Model_Resource_Catalog_Eav_Mysql4_Attribute</attribute>
|
54 |
+
</rewrite>
|
55 |
+
</catalog_resource_eav_mysql4>
|
56 |
+
<catalog>
|
57 |
+
<rewrite>
|
58 |
+
<product_type_configurable>Tonbo_ColorPicker_Model_Catalog_Product_Type_Configurable</product_type_configurable>
|
59 |
+
</rewrite>
|
60 |
+
</catalog>
|
61 |
+
</models>
|
62 |
+
<blocks>
|
63 |
+
<colorpicker>
|
64 |
+
<class>Tonbo_ColorPicker_Block</class>
|
65 |
+
</colorpicker>
|
66 |
+
<adminhtml>
|
67 |
+
<rewrite>
|
68 |
+
<catalog_product_attribute_edit_tabs>Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tabs</catalog_product_attribute_edit_tabs>
|
69 |
+
<catalog_product_attribute_edit_tab_options>Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tab_Options</catalog_product_attribute_edit_tab_options>
|
70 |
+
<catalog_product_attribute_edit>Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit</catalog_product_attribute_edit>
|
71 |
+
</rewrite>
|
72 |
+
</adminhtml>
|
73 |
+
<catalog>
|
74 |
+
<rewrite>
|
75 |
+
<layer_filter_attribute>Tonbo_ColorPicker_Block_Catalog_Layer_Filter_Attribute</layer_filter_attribute>
|
76 |
+
<layer_state>Tonbo_ColorPicker_Block_Catalog_Layer_State</layer_state>
|
77 |
+
<product_view_type_configurable>Tonbo_ColorPicker_Block_Catalog_Product_Configurable</product_view_type_configurable>
|
78 |
+
</rewrite>
|
79 |
+
</catalog>
|
80 |
+
<checkout>
|
81 |
+
<rewrite>
|
82 |
+
<cart_item_renderer_configurable>Tonbo_ColorPicker_Block_Checkout_Cart_Item_Renderer_Configurable</cart_item_renderer_configurable>
|
83 |
+
</rewrite>
|
84 |
+
</checkout>
|
85 |
+
<catalogsearch>
|
86 |
+
<rewrite>
|
87 |
+
<layer_filter_attribute>Tonbo_ColorPicker_Block_Search_Layer_Filter_Attribute</layer_filter_attribute>
|
88 |
+
</rewrite>
|
89 |
+
</catalogsearch>
|
90 |
+
</blocks>
|
91 |
+
<helpers>
|
92 |
+
<colorpicker>
|
93 |
+
<class>Tonbo_ColorPicker_Helper</class>
|
94 |
+
</colorpicker>
|
95 |
+
</helpers>
|
96 |
+
</global>
|
97 |
+
<admin>
|
98 |
+
<routers>
|
99 |
+
<adminhtml>
|
100 |
+
<args>
|
101 |
+
<modules>
|
102 |
+
<colorpicker before="Mage_Adminhtml">Tonbo_ColorPicker_Adminhtml</colorpicker>
|
103 |
+
</modules>
|
104 |
+
</args>
|
105 |
+
</adminhtml>
|
106 |
+
</routers>
|
107 |
+
</admin>
|
108 |
+
<adminhtml>
|
109 |
+
<layout>
|
110 |
+
<updates>
|
111 |
+
<tonbo_colorpicker>
|
112 |
+
<file>colorpicker.xml</file>
|
113 |
+
</tonbo_colorpicker>
|
114 |
+
</updates>
|
115 |
+
</layout>
|
116 |
+
<translate>
|
117 |
+
<modules>
|
118 |
+
<Tonbo_ColorPicker>
|
119 |
+
<files>
|
120 |
+
<default>Tonbo_ColorPicker.csv</default>
|
121 |
+
</files>
|
122 |
+
</Tonbo_ColorPicker>
|
123 |
+
</modules>
|
124 |
+
</translate>
|
125 |
+
</adminhtml>
|
126 |
+
<frontend>
|
127 |
+
<layout>
|
128 |
+
<updates>
|
129 |
+
<tonbo_colorpicker>
|
130 |
+
<file>colorpicker.xml</file>
|
131 |
+
</tonbo_colorpicker>
|
132 |
+
</updates>
|
133 |
+
</layout>
|
134 |
+
<translate>
|
135 |
+
<modules>
|
136 |
+
<Tonbo_ColorPicker>
|
137 |
+
<files>
|
138 |
+
<default>Tonbo_ColorPicker.csv</default>
|
139 |
+
</files>
|
140 |
+
</Tonbo_ColorPicker>
|
141 |
+
</modules>
|
142 |
+
</translate>
|
143 |
+
</frontend>
|
144 |
+
<default>
|
145 |
+
<design>
|
146 |
+
<colorpicker>
|
147 |
+
<is_active>0</is_active>
|
148 |
+
</colorpicker>
|
149 |
+
</design>
|
150 |
+
<system>
|
151 |
+
<media_storage_configuration>
|
152 |
+
<allowed_resources>
|
153 |
+
<colorpicker_images_folder>tonbo_colorpicker</colorpicker_images_folder>
|
154 |
+
</allowed_resources>
|
155 |
+
</media_storage_configuration>
|
156 |
+
</system>
|
157 |
+
</default>
|
158 |
+
</config>
|
app/code/community/Tonbo/ColorPicker/etc/libraries/color_lib.xml
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<lib>
|
24 |
+
<en_US>
|
25 |
+
<item>color</item>
|
26 |
+
<item>colour</item>
|
27 |
+
</en_US>
|
28 |
+
<ru_RU>
|
29 |
+
<item>Цвет</item>
|
30 |
+
</ru_RU>
|
31 |
+
<uk_UA>
|
32 |
+
<item>колір</item>
|
33 |
+
</uk_UA>
|
34 |
+
<pt_PT>
|
35 |
+
<item>Cor</item>
|
36 |
+
</pt_PT>
|
37 |
+
<de_DE>
|
38 |
+
<item>farbe</item>
|
39 |
+
</de_DE>
|
40 |
+
<fr_FR>
|
41 |
+
<item>Couleur</item>
|
42 |
+
</fr_FR>
|
43 |
+
<nl_NL>
|
44 |
+
<item>Kleur</item>
|
45 |
+
</nl_NL>
|
46 |
+
</lib>
|
app/code/community/Tonbo/ColorPicker/etc/libraries/option_lib.xml
ADDED
@@ -0,0 +1,2124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<lib>
|
24 |
+
<color value="#5D8AA8">
|
25 |
+
<item language="en_GB|en_US|en_CA|en_AU">Air Force Blue</item>
|
26 |
+
<item language="ru_RU">Военновоздушный синий</item>
|
27 |
+
<item language="uk_UA">Військово-Воздушний синій</item>
|
28 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul de fuerza aérea</item>
|
29 |
+
<item language="pt_PT|pt_BR">Força Aérea Azul</item>
|
30 |
+
<item language="de_DE">Air Force Blue</item>
|
31 |
+
<item language="fr_FR|fr_CA">Air Force Blue</item>
|
32 |
+
<item language="nl_NL">Air Force Blue</item>
|
33 |
+
</color>
|
34 |
+
<color value="#F0F8FF">
|
35 |
+
<item language="en_GB|en_US|en_CA|en_AU">Alice Blue</item>
|
36 |
+
<item language="ru_RU">Синяя Элис</item>
|
37 |
+
<item language="uk_UA">Синя Еліс</item>
|
38 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Alice Blue|Azul de Alicia</item>
|
39 |
+
<item language="pt_PT|pt_BR">Alice Blue|Alice azul</item>
|
40 |
+
<item language="de_DE">Alice Blue</item>
|
41 |
+
<item language="fr_FR|fr_CA">Alice Blue</item>
|
42 |
+
<item language="nl_NL">Alice Blue</item>
|
43 |
+
</color>
|
44 |
+
<color value="#E32636">
|
45 |
+
<item language="en_GB|en_US|en_CA|en_AU">Alizarin Crimson</item>
|
46 |
+
<item language="ru_RU">Ализариновый красный</item>
|
47 |
+
<item language="uk_UA">Алізариновий червоний</item>
|
48 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Alizarina carmesí</item>
|
49 |
+
<item language="pt_PT|pt_BR">Alizarin Crimson|vermelho de alizarina</item>
|
50 |
+
<item language="de_DE">Alizarinkarmesin</item>
|
51 |
+
<item language="fr_FR|fr_CA">Alizarine cramoisie</item>
|
52 |
+
<item language="nl_NL">Alizarin Crimson|alizarinerood</item>
|
53 |
+
</color>
|
54 |
+
<color value="#EFDECD">
|
55 |
+
<item language="en_GB|en_US|en_CA|en_AU">Almond</item>
|
56 |
+
<item language="ru_RU">Миндаль</item>
|
57 |
+
<item language="uk_UA">Мигдаль</item>
|
58 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Almendra</item>
|
59 |
+
<item language="pt_PT|pt_BR">Amêndoa</item>
|
60 |
+
<item language="de_DE">Mandel</item>
|
61 |
+
<item language="fr_FR|fr_CA">Amande</item>
|
62 |
+
<item language="nl_NL">Amandel</item>
|
63 |
+
</color>
|
64 |
+
<color value="#E52B50">
|
65 |
+
<item language="en_GB|en_US|en_CA|en_AU">Amaranth</item>
|
66 |
+
<item language="ru_RU">Амарантовый</item>
|
67 |
+
<item language="uk_UA">Амарантовий</item>
|
68 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Amaranto</item>
|
69 |
+
<item language="pt_PT|pt_BR">Amaranto</item>
|
70 |
+
<item language="de_DE">Amarant</item>
|
71 |
+
<item language="fr_FR|fr_CA">Amarante</item>
|
72 |
+
<item language="nl_NL">Amarant</item>
|
73 |
+
</color>
|
74 |
+
<color value="#FFBF00">
|
75 |
+
<item language="en_GB|en_US|en_CA|en_AU">Amber</item>
|
76 |
+
<item language="ru_RU">Янтарный</item>
|
77 |
+
<item language="uk_UA">Бурштиновий</item>
|
78 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Ámbar</item>
|
79 |
+
<item language="pt_PT|pt_BR">Âmbar</item>
|
80 |
+
<item language="de_DE">Bernstein</item>
|
81 |
+
<item language="fr_FR|fr_CA">Ambre</item>
|
82 |
+
<item language="nl_NL">Amber</item>
|
83 |
+
</color>
|
84 |
+
<color value="#FF033E">
|
85 |
+
<item language="en_GB|en_US|en_CA|en_AU">American Rose</item>
|
86 |
+
<item language="ru_RU">Американская роза</item>
|
87 |
+
<item language="uk_UA">Американська троянда</item>
|
88 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rosa Americana</item>
|
89 |
+
<item language="pt_PT|pt_BR">American Rose|rosa americano</item>
|
90 |
+
<item language="de_DE">American Rose|Amerikaner rose</item>
|
91 |
+
<item language="fr_FR|fr_CA">American Rose|américain rose</item>
|
92 |
+
<item language="nl_NL">Amerikaanse Rose</item>
|
93 |
+
</color>
|
94 |
+
<color value="#9966CC">
|
95 |
+
<item language="en_GB|en_US|en_CA|en_AU">Amethyst</item>
|
96 |
+
<item language="ru_RU">Аметистовый</item>
|
97 |
+
<item language="uk_UA">Аметистовий</item>
|
98 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Amatista</item>
|
99 |
+
<item language="pt_PT|pt_BR">Ametista</item>
|
100 |
+
<item language="de_DE">Amethyst</item>
|
101 |
+
<item language="fr_FR|fr_CA">Améthyste</item>
|
102 |
+
<item language="nl_NL">Amethist</item>
|
103 |
+
</color>
|
104 |
+
<color value="#F2F3F4">
|
105 |
+
<item language="en_GB|en_US|en_CA|en_AU">Anti-flash White</item>
|
106 |
+
<item language="ru_RU">Матовый белый</item>
|
107 |
+
<item language="uk_UA">Матовий білий</item>
|
108 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Anti-flash Blanco</item>
|
109 |
+
<item language="pt_PT|pt_BR">Anti-flash Branco|Branco Tapete</item>
|
110 |
+
<item language="de_DE">Anti-Flash-Weiß</item>
|
111 |
+
<item language="fr_FR|fr_CA">Anti-éclair blanc</item>
|
112 |
+
<item language="nl_NL">Anti-flash White</item>
|
113 |
+
</color>
|
114 |
+
<color value="#FAEBD7">
|
115 |
+
<item language="en_GB|en_US|en_CA|en_AU">Antique White</item>
|
116 |
+
<item language="ru_RU">Античный белый</item>
|
117 |
+
<item language="uk_UA">Античний білий</item>
|
118 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Blanco Antiguo</item>
|
119 |
+
<item language="pt_PT|pt_BR">Antique White</item>
|
120 |
+
<item language="de_DE">Antique White</item>
|
121 |
+
<item language="fr_FR|fr_CA">Blanc Antique</item>
|
122 |
+
<item language="nl_NL">Antiek wit</item>
|
123 |
+
</color>
|
124 |
+
<color value="#8DB600">
|
125 |
+
<item language="en_GB|en_US|en_CA|en_AU">Apple Green</item>
|
126 |
+
<item language="ru_RU">Яблочно-зеленый</item>
|
127 |
+
<item language="uk_UA">Яблучно-зелений</item>
|
128 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde Manzana</item>
|
129 |
+
<item language="pt_PT|pt_BR">Maçã verde</item>
|
130 |
+
<item language="de_DE">Green Apple|grün apfel</item>
|
131 |
+
<item language="fr_FR|fr_CA">Vert pomme</item>
|
132 |
+
<item language="nl_NL">Green Apple|Appelgroen</item>
|
133 |
+
</color>
|
134 |
+
<color value="#7BA05B">
|
135 |
+
<item language="en_GB|en_US|en_CA|en_AU">Asparagus</item>
|
136 |
+
<item language="ru_RU">Спаржа</item>
|
137 |
+
<item language="uk_UA">Спаржа</item>
|
138 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Espárragos</item>
|
139 |
+
<item language="pt_PT|pt_BR">Espargos</item>
|
140 |
+
<item language="de_DE">Spargel</item>
|
141 |
+
<item language="fr_FR|fr_CA">Asperges</item>
|
142 |
+
<item language="nl_NL">Asperge</item>
|
143 |
+
</color>
|
144 |
+
<color value="#00FFFF">
|
145 |
+
<item language="en_GB|en_US|en_CA|en_AU">Aqua</item>
|
146 |
+
<item language="ru_RU">Цвет морской волны</item>
|
147 |
+
<item language="uk_UA">Колір морської хвилі</item>
|
148 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Agua</item>
|
149 |
+
<item language="pt_PT|pt_BR">Água</item>
|
150 |
+
<item language="de_DE">Wasser</item>
|
151 |
+
<item language="fr_FR|fr_CA">Aqua</item>
|
152 |
+
<item language="nl_NL">Aqua</item>
|
153 |
+
</color>
|
154 |
+
<color value="#7FFFD4">
|
155 |
+
<item language="en_GB|en_US|en_CA|en_AU">Aquamarine</item>
|
156 |
+
<item language="ru_RU">Аквамариновый</item>
|
157 |
+
<item language="uk_UA">Аквамариновий</item>
|
158 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Aguamarina</item>
|
159 |
+
<item language="pt_PT|pt_BR">Água-marinha</item>
|
160 |
+
<item language="de_DE">Aquamarin</item>
|
161 |
+
<item language="fr_FR|fr_CA">Aigue-marine</item>
|
162 |
+
<item language="nl_NL">Aquamarijn</item>
|
163 |
+
</color>
|
164 |
+
<color value="#4B5320">
|
165 |
+
<item language="en_GB|en_US|en_CA|en_AU">Army Green</item>
|
166 |
+
<item language="ru_RU">Армейский зеленый</item>
|
167 |
+
<item language="uk_UA">Армійський зелений</item>
|
168 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Ejército Verde</item>
|
169 |
+
<item language="pt_PT|pt_BR">Exército Verde</item>
|
170 |
+
<item language="de_DE">Army Green</item>
|
171 |
+
<item language="fr_FR|fr_CA">Army Green</item>
|
172 |
+
<item language="nl_NL">Army Green</item>
|
173 |
+
</color>
|
174 |
+
<color value="#3B444B">
|
175 |
+
<item language="en_GB|en_US|en_CA|en_AU">Arsenic</item>
|
176 |
+
<item language="ru_RU">Мышьяковый</item>
|
177 |
+
<item language="uk_UA">Миш'яковий</item>
|
178 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Arsénico</item>
|
179 |
+
<item language="pt_PT|pt_BR">Arsênico</item>
|
180 |
+
<item language="de_DE">Arsen</item>
|
181 |
+
<item language="fr_FR|fr_CA">Arsenic</item>
|
182 |
+
<item language="nl_NL">Arsenicum</item>
|
183 |
+
</color>
|
184 |
+
<color value="#007FFF">
|
185 |
+
<item language="en_GB|en_US|en_CA|en_AU">Azure</item>
|
186 |
+
<item language="ru_RU">Лазурный|Азур</item>
|
187 |
+
<item language="uk_UA">Лазурний|Азур</item>
|
188 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azur</item>
|
189 |
+
<item language="pt_PT|pt_BR">Azul</item>
|
190 |
+
<item language="de_DE">Azurblau</item>
|
191 |
+
<item language="fr_FR|fr_CA">Azur</item>
|
192 |
+
<item language="nl_NL">Azuur</item>
|
193 |
+
</color>
|
194 |
+
<color value="#848482">
|
195 |
+
<item language="en_GB|en_US|en_CA|en_AU">Battleship Grey</item>
|
196 |
+
<item language="ru_RU">Голубовато-серый цвет</item>
|
197 |
+
<item language="uk_UA">Блакитно-сірий колір</item>
|
198 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Battleship Grey|color gris azulado|gris de acorazado</item>
|
199 |
+
<item language="pt_PT|pt_BR">Combate Cinza</item>
|
200 |
+
<item language="de_DE">Schlachtschiff Grau</item>
|
201 |
+
<item language="fr_FR|fr_CA">Battleship Grey|Bleu-gris</item>
|
202 |
+
<item language="nl_NL">Battleship Grey</item>
|
203 |
+
</color>
|
204 |
+
<color value="#F5F5DC">
|
205 |
+
<item language="en_GB|en_US|en_CA|en_AU">Beige</item>
|
206 |
+
<item language="ru_RU">Беж|бежевый</item>
|
207 |
+
<item language="uk_UA">Беж|бежевий</item>
|
208 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Beige</item>
|
209 |
+
<item language="pt_PT|pt_BR">Bege</item>
|
210 |
+
<item language="de_DE">Beige</item>
|
211 |
+
<item language="fr_FR|fr_CA">Beige</item>
|
212 |
+
<item language="nl_NL">Beige</item>
|
213 |
+
</color>
|
214 |
+
<color value="#3D2B1F">
|
215 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bistre</item>
|
216 |
+
<item language="ru_RU">Бистр</item>
|
217 |
+
<item language="uk_UA">Бістр</item>
|
218 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bistre</item>
|
219 |
+
<item language="pt_PT|pt_BR">Bistre</item>
|
220 |
+
<item language="de_DE">Bistre</item>
|
221 |
+
<item language="fr_FR|fr_CA">Bistre</item>
|
222 |
+
<item language="nl_NL">Roetbruin</item>
|
223 |
+
</color>
|
224 |
+
<color value="#FE6F5E">
|
225 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bittersweet</item>
|
226 |
+
<item language="ru_RU">Горькая радость</item>
|
227 |
+
<item language="uk_UA">Гірка радість</item>
|
228 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Agridulce</item>
|
229 |
+
<item language="pt_PT|pt_BR">Agridoce</item>
|
230 |
+
<item language="de_DE">Bittersüß</item>
|
231 |
+
<item language="fr_FR|fr_CA">Aigre-doux</item>
|
232 |
+
<item language="nl_NL">Bitterzoet</item>
|
233 |
+
</color>
|
234 |
+
<color value="#000000">
|
235 |
+
<item language="en_GB|en_US|en_CA|en_AU">Black</item>
|
236 |
+
<item language="ru_RU">Черный</item>
|
237 |
+
<item language="uk_UA">Чорний</item>
|
238 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Negro</item>
|
239 |
+
<item language="pt_PT|pt_BR">Preto</item>
|
240 |
+
<item language="de_DE">Schwarz</item>
|
241 |
+
<item language="fr_FR|fr_CA">Noir</item>
|
242 |
+
<item language="nl_NL">Zwart</item>
|
243 |
+
</color>
|
244 |
+
<color value="#FAF0BE">
|
245 |
+
<item language="en_GB|en_US|en_CA|en_AU">Blond</item>
|
246 |
+
<item language="ru_RU">Белокурый</item>
|
247 |
+
<item language="uk_UA">Білявий</item>
|
248 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rubio</item>
|
249 |
+
<item language="pt_PT|pt_BR">Loiro</item>
|
250 |
+
<item language="de_DE">Blond</item>
|
251 |
+
<item language="fr_FR|fr_CA">Blond</item>
|
252 |
+
<item language="nl_NL">Blond</item>
|
253 |
+
</color>
|
254 |
+
<color value="#0000FF">
|
255 |
+
<item language="en_GB|en_US|en_CA|en_AU">Blue</item>
|
256 |
+
<item language="ru_RU">Синий</item>
|
257 |
+
<item language="uk_UA">Синій</item>
|
258 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul</item>
|
259 |
+
<item language="pt_PT|pt_BR">Azul</item>
|
260 |
+
<item language="de_DE">Blau</item>
|
261 |
+
<item language="fr_FR|fr_CA">Bleu</item>
|
262 |
+
<item language="nl_NL">Blauw</item>
|
263 |
+
</color>
|
264 |
+
<color value="#0095B6">
|
265 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bondi Blue</item>
|
266 |
+
<item language="ru_RU">Вода пляжа Бонди</item>
|
267 |
+
<item language="uk_UA">Вода пляжу Бонді</item>
|
268 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bondi Azul</item>
|
269 |
+
<item language="pt_PT|pt_BR">Bondi Azul</item>
|
270 |
+
<item language="de_DE">Bondi Blue</item>
|
271 |
+
<item language="fr_FR|fr_CA">Bondi Blue</item>
|
272 |
+
<item language="nl_NL">Bondi Blue</item>
|
273 |
+
</color>
|
274 |
+
<color value="#CC0000">
|
275 |
+
<item language="en_GB|en_US|en_CA|en_AU">Boston University Red</item>
|
276 |
+
<item language="ru_RU">Красный Университета Бостона</item>
|
277 |
+
<item language="uk_UA">Червоний Університету Бостона</item>
|
278 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Universidad de Boston Red</item>
|
279 |
+
<item language="pt_PT|pt_BR">Universidade de Boston Red</item>
|
280 |
+
<item language="de_DE">Boston University Red</item>
|
281 |
+
<item language="fr_FR|fr_CA">L'Université de Boston Red</item>
|
282 |
+
<item language="nl_NL">Boston University Red</item>
|
283 |
+
</color>
|
284 |
+
<color value="#B5A642">
|
285 |
+
<item language="en_GB|en_US|en_CA|en_AU">Brass</item>
|
286 |
+
<item language="ru_RU">Латунный</item>
|
287 |
+
<item language="uk_UA">Латунний</item>
|
288 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Latón</item>
|
289 |
+
<item language="pt_PT|pt_BR">Bronze</item>
|
290 |
+
<item language="de_DE">Messing</item>
|
291 |
+
<item language="fr_FR|fr_CA">Laiton</item>
|
292 |
+
<item language="nl_NL">Messing</item>
|
293 |
+
</color>
|
294 |
+
<color value="#66FF00">
|
295 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bright green</item>
|
296 |
+
<item language="ru_RU">Ярко-зеленый</item>
|
297 |
+
<item language="uk_UA">Яскраво-зелений</item>
|
298 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde intenso</item>
|
299 |
+
<item language="pt_PT|pt_BR">Verde brilhante</item>
|
300 |
+
<item language="de_DE">Leuchtend grüne</item>
|
301 |
+
<item language="fr_FR|fr_CA">Vert clair</item>
|
302 |
+
<item language="nl_NL">Heldergroene</item>
|
303 |
+
</color>
|
304 |
+
<color value="#08E8DE">
|
305 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bright turquoise</item>
|
306 |
+
<item language="ru_RU">Ярко-бирюзовый</item>
|
307 |
+
<item language="uk_UA">Яскраво-бірюзовий</item>
|
308 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Turquesa brillante</item>
|
309 |
+
<item language="pt_PT|pt_BR">Turquesa brilhante</item>
|
310 |
+
<item language="de_DE">Helle Türkis</item>
|
311 |
+
<item language="fr_FR|fr_CA">Turquoise vif</item>
|
312 |
+
<item language="nl_NL">Bright turquoise</item>
|
313 |
+
</color>
|
314 |
+
<color value="#CD00CD">
|
315 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bright violet</item>
|
316 |
+
<item language="ru_RU">Ярко-фиолетовый</item>
|
317 |
+
<item language="uk_UA">Яскраво-фіолетовий</item>
|
318 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Violeta brillante</item>
|
319 |
+
<item language="pt_PT|pt_BR">Violeta brilhante</item>
|
320 |
+
<item language="de_DE">Leuchtend violett</item>
|
321 |
+
<item language="fr_FR|fr_CA">Violet vif</item>
|
322 |
+
<item language="nl_NL">Fel paars</item>
|
323 |
+
</color>
|
324 |
+
<color value="#CD7F32">
|
325 |
+
<item language="en_GB|en_US|en_CA|en_AU">Bronze</item>
|
326 |
+
<item language="ru_RU">Бронзовый</item>
|
327 |
+
<item language="uk_UA">Бронзовий</item>
|
328 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bronce</item>
|
329 |
+
<item language="pt_PT|pt_BR">Bronze</item>
|
330 |
+
<item language="de_DE">Bronze</item>
|
331 |
+
<item language="fr_FR|fr_CA">Bronze</item>
|
332 |
+
<item language="nl_NL">Bronzen</item>
|
333 |
+
</color>
|
334 |
+
<color value="#964B00">
|
335 |
+
<item language="en_GB|en_US|en_CA|en_AU">Brown</item>
|
336 |
+
<item language="ru_RU">Коричневый</item>
|
337 |
+
<item language="uk_UA">Коричневий</item>
|
338 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Marrón</item>
|
339 |
+
<item language="pt_PT|pt_BR">Marrom</item>
|
340 |
+
<item language="de_DE">Braun</item>
|
341 |
+
<item language="fr_FR|fr_CA">Brun</item>
|
342 |
+
<item language="nl_NL">Bruin</item>
|
343 |
+
</color>
|
344 |
+
<color value="#F0DC82">
|
345 |
+
<item language="en_GB|en_US|en_CA|en_AU">Buff</item>
|
346 |
+
<item language="ru_RU">Кожа буйвола|палевый</item>
|
347 |
+
<item language="uk_UA">Шкіра буйвола|палевий</item>
|
348 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pulir</item>
|
349 |
+
<item language="pt_PT|pt_BR">Tapa</item>
|
350 |
+
<item language="de_DE">Polieren</item>
|
351 |
+
<item language="fr_FR|fr_CA">Chamois</item>
|
352 |
+
<item language="nl_NL">Polijsten</item>
|
353 |
+
</color>
|
354 |
+
<color value="#900020">
|
355 |
+
<item language="en_GB|en_US|en_CA|en_AU">Burgundy</item>
|
356 |
+
<item language="ru_RU">Бургундский</item>
|
357 |
+
<item language="uk_UA">Бургундський</item>
|
358 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Borgoña</item>
|
359 |
+
<item language="pt_PT|pt_BR">Borgonha</item>
|
360 |
+
<item language="de_DE">Burgund</item>
|
361 |
+
<item language="fr_FR|fr_CA">Bourgogne</item>
|
362 |
+
<item language="nl_NL">Bourgondië</item>
|
363 |
+
</color>
|
364 |
+
<color value="#CC5500">
|
365 |
+
<item language="en_GB|en_US|en_CA|en_AU">Burnt Orange</item>
|
366 |
+
<item language="ru_RU">Выгоревший оранжевый</item>
|
367 |
+
<item language="uk_UA">Вигорілий помаранчевий</item>
|
368 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Burnt Orange|naranja quemado</item>
|
369 |
+
<item language="pt_PT|pt_BR">Laranja queimado</item>
|
370 |
+
<item language="de_DE">Burnt Orange</item>
|
371 |
+
<item language="fr_FR|fr_CA">Burnt Orange</item>
|
372 |
+
<item language="nl_NL">Burnt Orange</item>
|
373 |
+
</color>
|
374 |
+
<color value="#E97451">
|
375 |
+
<item language="en_GB|en_US|en_CA|en_AU">Burnt Sienna</item>
|
376 |
+
<item language="ru_RU">Сиена жженая</item>
|
377 |
+
<item language="uk_UA">Сієна палена</item>
|
378 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Burnt Sienna|quemado tierra de siena</item>
|
379 |
+
<item language="pt_PT|pt_BR">Sienna queimado</item>
|
380 |
+
<item language="de_DE">Burnt Sienna</item>
|
381 |
+
<item language="fr_FR|fr_CA">Terre de Sienne brûlée</item>
|
382 |
+
<item language="nl_NL">Burnt Sienna</item>
|
383 |
+
</color>
|
384 |
+
<color value="#8A3324">
|
385 |
+
<item language="en_GB|en_US|en_CA|en_AU">Burnt umber</item>
|
386 |
+
<item language="ru_RU">Коричневый|умбра жженая</item>
|
387 |
+
<item language="uk_UA">Коричневий|умбра палена</item>
|
388 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Sombra de Venecia quemada</item>
|
389 |
+
<item language="pt_PT|pt_BR">Carmim queimado</item>
|
390 |
+
<item language="de_DE">Gebrannte Umbra</item>
|
391 |
+
<item language="fr_FR|fr_CA">Terre d'ombre brûlée</item>
|
392 |
+
<item language="nl_NL">Gebrande omber</item>
|
393 |
+
</color>
|
394 |
+
<color value="#78866B">
|
395 |
+
<item language="en_GB|en_US|en_CA|en_AU">Camouflage green</item>
|
396 |
+
<item language="ru_RU">Хаки</item>
|
397 |
+
<item language="uk_UA">Хакі</item>
|
398 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Camuflaje verde</item>
|
399 |
+
<item language="pt_PT|pt_BR">Camuflagem verde</item>
|
400 |
+
<item language="de_DE">Camouflage grün</item>
|
401 |
+
<item language="fr_FR|fr_CA">Camouflage vert</item>
|
402 |
+
<item language="nl_NL">Camouflage groen</item>
|
403 |
+
</color>
|
404 |
+
<color value="#C41E3A">
|
405 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cardinal</item>
|
406 |
+
<item language="ru_RU">Темно-красный|кардинал</item>
|
407 |
+
<item language="uk_UA">Темно-червоний|кардинал</item>
|
408 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cardenal</item>
|
409 |
+
<item language="pt_PT|pt_BR">Cardeal</item>
|
410 |
+
<item language="de_DE">Kardinal</item>
|
411 |
+
<item language="fr_FR|fr_CA">Cardinal</item>
|
412 |
+
<item language="nl_NL">Kardinaal</item>
|
413 |
+
</color>
|
414 |
+
<color value="#960018">
|
415 |
+
<item language="en_GB|en_US|en_CA|en_AU">Carmine</item>
|
416 |
+
<item language="ru_RU">Карминово-красный</item>
|
417 |
+
<item language="uk_UA">Карміново-червоний</item>
|
418 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Carmín</item>
|
419 |
+
<item language="pt_PT|pt_BR">Carmim</item>
|
420 |
+
<item language="de_DE">Karminrot</item>
|
421 |
+
<item language="fr_FR|fr_CA">Carmin</item>
|
422 |
+
<item language="nl_NL">Karmijn</item>
|
423 |
+
</color>
|
424 |
+
<color value="#ED9121">
|
425 |
+
<item language="en_GB|en_US|en_CA|en_AU">Carrot</item>
|
426 |
+
<item language="ru_RU">Морковный</item>
|
427 |
+
<item language="uk_UA">Морквяний</item>
|
428 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Zanahoria</item>
|
429 |
+
<item language="pt_PT|pt_BR">Cenoura</item>
|
430 |
+
<item language="de_DE">Karotte</item>
|
431 |
+
<item language="fr_FR|fr_CA">Carotte</item>
|
432 |
+
<item language="nl_NL">Wortel</item>
|
433 |
+
</color>
|
434 |
+
<color value="#ACE1AF">
|
435 |
+
<item language="en_GB|en_US|en_CA|en_AU">Celadon</item>
|
436 |
+
<item language="ru_RU">Селадоновый</item>
|
437 |
+
<item language="uk_UA">Селадоновий</item>
|
438 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Celadon</item>
|
439 |
+
<item language="pt_PT|pt_BR">Celadon</item>
|
440 |
+
<item language="de_DE">Celadon</item>
|
441 |
+
<item language="fr_FR|fr_CA">Céladon</item>
|
442 |
+
<item language="nl_NL">Celadon</item>
|
443 |
+
</color>
|
444 |
+
<color value="#DE3163">
|
445 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cerise</item>
|
446 |
+
<item language="ru_RU">Светлая вишня</item>
|
447 |
+
<item language="uk_UA">Світла вишня</item>
|
448 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cerise</item>
|
449 |
+
<item language="pt_PT|pt_BR">Cerise</item>
|
450 |
+
<item language="de_DE">Cerise</item>
|
451 |
+
<item language="fr_FR|fr_CA">Cerise</item>
|
452 |
+
<item language="nl_NL">Kers</item>
|
453 |
+
</color>
|
454 |
+
<color value="#007BA7">
|
455 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cerulean</item>
|
456 |
+
<item language="ru_RU">Лазурный</item>
|
457 |
+
<item language="uk_UA">Лазурний</item>
|
458 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cerulean</item>
|
459 |
+
<item language="pt_PT|pt_BR">Cerúleo</item>
|
460 |
+
<item language="de_DE">Zweckhaft</item>
|
461 |
+
<item language="fr_FR|fr_CA">Azuré</item>
|
462 |
+
<item language="nl_NL">Hemelsblauw</item>
|
463 |
+
</color>
|
464 |
+
<color value="#2A52BE">
|
465 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cerulean blue</item>
|
466 |
+
<item language="ru_RU">Лазурно-синий</item>
|
467 |
+
<item language="uk_UA">Блакитно-синій</item>
|
468 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cerulean azul</item>
|
469 |
+
<item language="pt_PT|pt_BR">Azul cerúleo</item>
|
470 |
+
<item language="de_DE">Himmelblau</item>
|
471 |
+
<item language="fr_FR|fr_CA">Bleu céruléen</item>
|
472 |
+
<item language="nl_NL">Cerulean blue</item>
|
473 |
+
</color>
|
474 |
+
<color value="#7FFF00">
|
475 |
+
<item language="en_GB|en_US|en_CA|en_AU">Chartreuse</item>
|
476 |
+
<item language="ru_RU">Салатовый цвет|шартрез</item>
|
477 |
+
<item language="uk_UA">Салатовий колір|шартрез</item>
|
478 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Chartreuse</item>
|
479 |
+
<item language="pt_PT|pt_BR">Cor verde-amarelada</item>
|
480 |
+
<item language="de_DE">Kartause</item>
|
481 |
+
<item language="fr_FR|fr_CA">Chartreuse</item>
|
482 |
+
<item language="nl_NL">Chartreuse</item>
|
483 |
+
</color>
|
484 |
+
<color value="#CD5C5C">
|
485 |
+
<item language="en_GB|en_US|en_CA|en_AU">Chestnut</item>
|
486 |
+
<item language="ru_RU">Каштановый</item>
|
487 |
+
<item language="uk_UA">Каштановий</item>
|
488 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Castaño</item>
|
489 |
+
<item language="pt_PT|pt_BR">Castanha</item>
|
490 |
+
<item language="de_DE">Kastanie</item>
|
491 |
+
<item language="fr_FR|fr_CA">Châtaigne</item>
|
492 |
+
<item language="nl_NL">Kastanje</item>
|
493 |
+
</color>
|
494 |
+
<color value="#D2691E">
|
495 |
+
<item language="en_GB|en_US|en_CA|en_AU">Chocolate</item>
|
496 |
+
<item language="ru_RU">Шоколадный</item>
|
497 |
+
<item language="uk_UA">Шоколадний</item>
|
498 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Chocolate</item>
|
499 |
+
<item language="pt_PT|pt_BR">Chocolate</item>
|
500 |
+
<item language="de_DE">Schokolade</item>
|
501 |
+
<item language="fr_FR|fr_CA">Chocolat</item>
|
502 |
+
<item language="nl_NL">Chocolade</item>
|
503 |
+
</color>
|
504 |
+
<color value="#7B3F00">
|
505 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cinnamon</item>
|
506 |
+
<item language="ru_RU">Коричный</item>
|
507 |
+
<item language="uk_UA">Коричний</item>
|
508 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Canela</item>
|
509 |
+
<item language="pt_PT|pt_BR">Canela</item>
|
510 |
+
<item language="de_DE">Zimt</item>
|
511 |
+
<item language="fr_FR|fr_CA">Cannelle</item>
|
512 |
+
<item language="nl_NL">Kaneel</item>
|
513 |
+
</color>
|
514 |
+
<color value="#0047AB">
|
515 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cobalt</item>
|
516 |
+
<item language="ru_RU">Кобальт синий</item>
|
517 |
+
<item language="uk_UA">Кобальт синій</item>
|
518 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cobalto</item>
|
519 |
+
<item language="pt_PT|pt_BR">Cobalto</item>
|
520 |
+
<item language="de_DE">Kobalt</item>
|
521 |
+
<item language="fr_FR|fr_CA">Cobalt</item>
|
522 |
+
<item language="nl_NL">Kobalt</item>
|
523 |
+
</color>
|
524 |
+
<color value="#B87333">
|
525 |
+
<item language="en_GB|en_US|en_CA|en_AU">Copper</item>
|
526 |
+
<item language="ru_RU">Медный</item>
|
527 |
+
<item language="uk_UA">Мідний</item>
|
528 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cobre</item>
|
529 |
+
<item language="pt_PT|pt_BR">Cobre</item>
|
530 |
+
<item language="de_DE">Kupfer</item>
|
531 |
+
<item language="fr_FR|fr_CA">Cuivre</item>
|
532 |
+
<item language="nl_NL">Koper</item>
|
533 |
+
</color>
|
534 |
+
<color value="#FF7F50">
|
535 |
+
<item language="en_GB|en_US|en_CA|en_AU">Coral</item>
|
536 |
+
<item language="ru_RU">Коралловый|кораллово-красный</item>
|
537 |
+
<item language="uk_UA">Кораловий|коралово-червоний</item>
|
538 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Coral</item>
|
539 |
+
<item language="pt_PT|pt_BR">Coral</item>
|
540 |
+
<item language="de_DE">Koralle</item>
|
541 |
+
<item language="fr_FR|fr_CA">Corail</item>
|
542 |
+
<item language="nl_NL">Koraal</item>
|
543 |
+
</color>
|
544 |
+
<color value="#FBEC5D">
|
545 |
+
<item language="en_GB|en_US|en_CA|en_AU">Corn</item>
|
546 |
+
<item language="ru_RU">Кукурузный</item>
|
547 |
+
<item language="uk_UA">Кукурудзяний</item>
|
548 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Maíz</item>
|
549 |
+
<item language="pt_PT|pt_BR">Milho</item>
|
550 |
+
<item language="de_DE">Mais</item>
|
551 |
+
<item language="fr_FR|fr_CA">Maïs</item>
|
552 |
+
<item language="nl_NL">Maïs</item>
|
553 |
+
</color>
|
554 |
+
<color value="#6495ED">
|
555 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cornflower blue</item>
|
556 |
+
<item language="ru_RU">Васильковый</item>
|
557 |
+
<item language="uk_UA">Волошковий</item>
|
558 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cornflower azul|azul aciano</item>
|
559 |
+
<item language="pt_PT|pt_BR">Cornflower azul</item>
|
560 |
+
<item language="de_DE">Kornblumenblau</item>
|
561 |
+
<item language="fr_FR|fr_CA">Bleuet bleu</item>
|
562 |
+
<item language="nl_NL">Korenblauw</item>
|
563 |
+
</color>
|
564 |
+
<color value="#FFFDD0">
|
565 |
+
<item language="en_GB|en_US|en_CA|en_AU">Cream</item>
|
566 |
+
<item language="ru_RU">Кремовый</item>
|
567 |
+
<item language="uk_UA">Кремовий</item>
|
568 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Crema</item>
|
569 |
+
<item language="pt_PT|pt_BR">Creme</item>
|
570 |
+
<item language="de_DE">Sahne</item>
|
571 |
+
<item language="fr_FR|fr_CA">Crème</item>
|
572 |
+
<item language="nl_NL">Crème</item>
|
573 |
+
</color>
|
574 |
+
<color value="#DC143C">
|
575 |
+
<item language="en_GB|en_US|en_CA|en_AU">Crimson</item>
|
576 |
+
<item language="ru_RU">Темно-красный|кровавый|кармазин</item>
|
577 |
+
<item language="uk_UA">Темно-червоний|кривавий|кармазин</item>
|
578 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Carmesí</item>
|
579 |
+
<item language="pt_PT|pt_BR">Carmesim</item>
|
580 |
+
<item language="de_DE">Purpur</item>
|
581 |
+
<item language="fr_FR|fr_CA">Cramoisi</item>
|
582 |
+
<item language="nl_NL">Karmozijn</item>
|
583 |
+
</color>
|
584 |
+
<color value="#00FFFF">
|
585 |
+
<item language="en_GB|en_US|en_CA|en_AU">Aqua|Cyan</item>
|
586 |
+
<item language="ru_RU">Цвет морской волны|Циан|васильковый</item>
|
587 |
+
<item language="uk_UA">Колір морської хвилі|Ціан|волошковий</item>
|
588 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Agua|Cian</item>
|
589 |
+
<item language="pt_PT|pt_BR">Água|Ciano</item>
|
590 |
+
<item language="de_DE">Wasser|Cyan</item>
|
591 |
+
<item language="fr_FR|fr_CA">Aqua|Cyan</item>
|
592 |
+
<item language="nl_NL">Aqua|Cyaan</item>
|
593 |
+
</color>
|
594 |
+
<color value="#00008B">
|
595 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark blue</item>
|
596 |
+
<item language="ru_RU">Темно-синий</item>
|
597 |
+
<item language="uk_UA">Темно-синій</item>
|
598 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul oscuro</item>
|
599 |
+
<item language="pt_PT|pt_BR">Azul escuro</item>
|
600 |
+
<item language="de_DE">Dunkelblau</item>
|
601 |
+
<item language="fr_FR|fr_CA">Bleu foncé</item>
|
602 |
+
<item language="nl_NL">Donkerblauw</item>
|
603 |
+
</color>
|
604 |
+
<color value="#654321">
|
605 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark brown</item>
|
606 |
+
<item language="ru_RU">Темно-коричневый</item>
|
607 |
+
<item language="uk_UA">Темно-коричневий</item>
|
608 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Marrón oscuro</item>
|
609 |
+
<item language="pt_PT|pt_BR">Marrom escuro</item>
|
610 |
+
<item language="de_DE">Dunkelbraun</item>
|
611 |
+
<item language="fr_FR|fr_CA">Brun foncé</item>
|
612 |
+
<item language="nl_NL">Donker bruin</item>
|
613 |
+
</color>
|
614 |
+
<color value="#08457E">
|
615 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark cerulean</item>
|
616 |
+
<item language="ru_RU">Темно-лазурный</item>
|
617 |
+
<item language="uk_UA">Темно-блакитний</item>
|
618 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro cerúleo</item>
|
619 |
+
<item language="pt_PT|pt_BR">Cerulean escuro</item>
|
620 |
+
<item language="de_DE">Dunkle cerulean</item>
|
621 |
+
<item language="fr_FR|fr_CA">Sombre céruléen</item>
|
622 |
+
<item language="nl_NL">Dark cerulean</item>
|
623 |
+
</color>
|
624 |
+
<color value="#986960">
|
625 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark chestnut</item>
|
626 |
+
<item language="ru_RU">Темно-каштановый</item>
|
627 |
+
<item language="uk_UA">Темно-каштановий</item>
|
628 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Castaño oscuro</item>
|
629 |
+
<item language="pt_PT|pt_BR">Castanho escuro</item>
|
630 |
+
<item language="de_DE">Dunkelfuchs</item>
|
631 |
+
<item language="fr_FR|fr_CA">Châtain foncé</item>
|
632 |
+
<item language="nl_NL">Dark chestnut</item>
|
633 |
+
</color>
|
634 |
+
<color value="#CD5B45">
|
635 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark coral</item>
|
636 |
+
<item language="ru_RU">Темно-коралловый</item>
|
637 |
+
<item language="uk_UA">Темно-кораловий</item>
|
638 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Coral oscuro</item>
|
639 |
+
<item language="pt_PT|pt_BR">Coral escuro</item>
|
640 |
+
<item language="de_DE">Dunkle Korallen</item>
|
641 |
+
<item language="fr_FR|fr_CA">Corail foncé</item>
|
642 |
+
<item language="nl_NL">Dark koraal</item>
|
643 |
+
</color>
|
644 |
+
<color value="#B8860B">
|
645 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark goldenrod</item>
|
646 |
+
<item language="ru_RU">Темно-золотой</item>
|
647 |
+
<item language="uk_UA">Темно-золотий</item>
|
648 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro vara de oro</item>
|
649 |
+
<item language="pt_PT|pt_BR">Goldenrod escuro</item>
|
650 |
+
<item language="de_DE">Dunkle Goldrute</item>
|
651 |
+
<item language="fr_FR|fr_CA">Foncé d'or</item>
|
652 |
+
<item language="nl_NL">Dark guldenroede</item>
|
653 |
+
</color>
|
654 |
+
<color value="#013220">
|
655 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark green</item>
|
656 |
+
<item language="ru_RU">Темно-зеленый</item>
|
657 |
+
<item language="uk_UA">Темно-зелений</item>
|
658 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde oscuro</item>
|
659 |
+
<item language="pt_PT|pt_BR">Verde escuro</item>
|
660 |
+
<item language="de_DE">Dunkelgrün</item>
|
661 |
+
<item language="fr_FR|fr_CA">Vert foncé</item>
|
662 |
+
<item language="nl_NL">Donkergroen</item>
|
663 |
+
</color>
|
664 |
+
<color value="#310062">
|
665 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Indigo</item>
|
666 |
+
<item language="ru_RU">Темный индиго|индиго</item>
|
667 |
+
<item language="uk_UA">Темний індиго|індиго</item>
|
668 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro Indigo</item>
|
669 |
+
<item language="pt_PT|pt_BR">Índigo escuro</item>
|
670 |
+
<item language="de_DE">Dark Indigo</item>
|
671 |
+
<item language="fr_FR|fr_CA">Dark Indigo</item>
|
672 |
+
<item language="nl_NL">Dark Indigo</item>
|
673 |
+
</color>
|
674 |
+
<color value="#BDB76B">
|
675 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Khaki</item>
|
676 |
+
<item language="ru_RU">Темный хаки|хаки</item>
|
677 |
+
<item language="uk_UA">Темний хакі|хакі</item>
|
678 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Dark Khaki</item>
|
679 |
+
<item language="pt_PT|pt_BR">Escuro Khaki</item>
|
680 |
+
<item language="de_DE">Dark Khaki</item>
|
681 |
+
<item language="fr_FR|fr_CA">Dark Khaki</item>
|
682 |
+
<item language="nl_NL">Dark Khaki</item>
|
683 |
+
</color>
|
684 |
+
<color value="#556832">
|
685 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Olive</item>
|
686 |
+
<item language="ru_RU">Темно-оливковый</item>
|
687 |
+
<item language="uk_UA">Темно-оливковий</item>
|
688 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Dark Olive</item>
|
689 |
+
<item language="pt_PT|pt_BR">Azeitona escuro</item>
|
690 |
+
<item language="de_DE">Dark Olive</item>
|
691 |
+
<item language="fr_FR|fr_CA">Dark Olive</item>
|
692 |
+
<item language="nl_NL">Dark Olive</item>
|
693 |
+
</color>
|
694 |
+
<color value="#03C03C">
|
695 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark pastel green</item>
|
696 |
+
<item language="ru_RU">Темный пастельно-зеленый</item>
|
697 |
+
<item language="uk_UA">Темний пастельно-зелений</item>
|
698 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde oscuro pastel</item>
|
699 |
+
<item language="pt_PT|pt_BR">Escuro verde pastel</item>
|
700 |
+
<item language="de_DE">Dunkle lindgrün</item>
|
701 |
+
<item language="fr_FR|fr_CA">Sombre vert pastel</item>
|
702 |
+
<item language="nl_NL">Donker pastelgroen</item>
|
703 |
+
</color>
|
704 |
+
<color value="#FFDAB9">
|
705 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Peach</item>
|
706 |
+
<item language="ru_RU">Темно-персиковый</item>
|
707 |
+
<item language="uk_UA">Темно-персиковий</item>
|
708 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Peach Oscuro</item>
|
709 |
+
<item language="pt_PT|pt_BR">Peach escuro</item>
|
710 |
+
<item language="de_DE">Dunkle Peach</item>
|
711 |
+
<item language="fr_FR|fr_CA">Pêche foncée</item>
|
712 |
+
<item language="nl_NL">Dark Peach</item>
|
713 |
+
</color>
|
714 |
+
<color value="#E75480">
|
715 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark pink</item>
|
716 |
+
<item language="ru_RU">Темно-розовый</item>
|
717 |
+
<item language="uk_UA">Темно-рожевий</item>
|
718 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Fucsia</item>
|
719 |
+
<item language="pt_PT|pt_BR">Rosa escuro</item>
|
720 |
+
<item language="de_DE">Dunkelrosa</item>
|
721 |
+
<item language="fr_FR|fr_CA">Rose foncé</item>
|
722 |
+
<item language="nl_NL">Donker roze</item>
|
723 |
+
</color>
|
724 |
+
<color value="#E9967A">
|
725 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark salmon</item>
|
726 |
+
<item language="ru_RU">Темная лососина</item>
|
727 |
+
<item language="uk_UA">Темна лососина</item>
|
728 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Salmón oscuro</item>
|
729 |
+
<item language="pt_PT|pt_BR">Salmão escuro</item>
|
730 |
+
<item language="de_DE">Dunkle Lachse</item>
|
731 |
+
<item language="fr_FR|fr_CA">Saumon foncé</item>
|
732 |
+
<item language="nl_NL">Dark zalm</item>
|
733 |
+
</color>
|
734 |
+
<color value="#560319">
|
735 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Scarlet</item>
|
736 |
+
<item language="ru_RU">Темно-алый</item>
|
737 |
+
<item language="uk_UA">Темно-червоний</item>
|
738 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro Scarlet</item>
|
739 |
+
<item language="pt_PT|pt_BR">Scarlet escuro</item>
|
740 |
+
<item language="de_DE">Dunkle Scarlet</item>
|
741 |
+
<item language="fr_FR|fr_CA">Scarlet foncé</item>
|
742 |
+
<item language="nl_NL">Dark Scarlet</item>
|
743 |
+
</color>
|
744 |
+
<color value="#2F4F4F">
|
745 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark slate gray</item>
|
746 |
+
<item language="ru_RU">Темно-аспидный серый|аспидно-серый</item>
|
747 |
+
<item language="uk_UA">Темно-аспідний сірий|аспідно-сірий</item>
|
748 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pizarra gris oscuro</item>
|
749 |
+
<item language="pt_PT|pt_BR">Ardósia cinza escuro</item>
|
750 |
+
<item language="de_DE">Dunkle schiefergrau</item>
|
751 |
+
<item language="fr_FR|fr_CA">Ardoise gris foncé</item>
|
752 |
+
<item language="nl_NL">Donker leigrijs</item>
|
753 |
+
</color>
|
754 |
+
<color value="#177245">
|
755 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark spring green</item>
|
756 |
+
<item language="ru_RU">Темный весенне-зеленый</item>
|
757 |
+
<item language="uk_UA">Темний весняно-зелений</item>
|
758 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde oscuro primavera</item>
|
759 |
+
<item language="pt_PT|pt_BR">Escuro verde primavera</item>
|
760 |
+
<item language="de_DE">Dunkle spring green</item>
|
761 |
+
<item language="fr_FR|fr_CA">Sombre vert printemps</item>
|
762 |
+
<item language="nl_NL">Donker lentegroen</item>
|
763 |
+
</color>
|
764 |
+
<color value="#918151">
|
765 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark tan</item>
|
766 |
+
<item language="ru_RU">Темный желто-коричневый</item>
|
767 |
+
<item language="uk_UA">Темний жовто-коричневий</item>
|
768 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro bronceado</item>
|
769 |
+
<item language="pt_PT|pt_BR">Bronzeado</item>
|
770 |
+
<item language="de_DE">Dark as</item>
|
771 |
+
<item language="fr_FR|fr_CA">Dark Tan</item>
|
772 |
+
<item language="nl_NL">Dark tan</item>
|
773 |
+
</color>
|
774 |
+
<color value="#FFA812">
|
775 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark tangerine</item>
|
776 |
+
<item language="ru_RU">Темно-мандариновый</item>
|
777 |
+
<item language="uk_UA">Темно-мандариновий</item>
|
778 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oscuro mandarina</item>
|
779 |
+
<item language="pt_PT|pt_BR">Tangerina escuro</item>
|
780 |
+
<item language="de_DE">Dunkle tangerine</item>
|
781 |
+
<item language="fr_FR|fr_CA">Sombre mandarine</item>
|
782 |
+
<item language="nl_NL">Dark mandarijn</item>
|
783 |
+
</color>
|
784 |
+
<color value="#BADBAD">
|
785 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark Tea Green</item>
|
786 |
+
<item language="ru_RU">Темный зеленый чай</item>
|
787 |
+
<item language="uk_UA">Темний зелений чай</item>
|
788 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Té Verde Oscuro</item>
|
789 |
+
<item language="pt_PT|pt_BR">Chá verde escuro</item>
|
790 |
+
<item language="de_DE">Dark Green Tea|Dunkle grünem Tee</item>
|
791 |
+
<item language="fr_FR|fr_CA">Thé vert foncé</item>
|
792 |
+
<item language="nl_NL">Dark Green Tea</item>
|
793 |
+
</color>
|
794 |
+
<color value="#116062">
|
795 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark turquoise</item>
|
796 |
+
<item language="ru_RU">Темно-бирюзовый</item>
|
797 |
+
<item language="uk_UA">Темно-бірюзовий</item>
|
798 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Turquesa oscuro</item>
|
799 |
+
<item language="pt_PT|pt_BR">Turquesa escura</item>
|
800 |
+
<item language="de_DE">Dunkeltürkis</item>
|
801 |
+
<item language="fr_FR|fr_CA">Turquoise foncé</item>
|
802 |
+
<item language="nl_NL">Dark turquoise</item>
|
803 |
+
</color>
|
804 |
+
<color value="#423189">
|
805 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dark violet</item>
|
806 |
+
<item language="ru_RU">Темно-фиолетовый</item>
|
807 |
+
<item language="uk_UA">Темно-фіолетовий</item>
|
808 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Violeta oscuro</item>
|
809 |
+
<item language="pt_PT|pt_BR">Violeta escuro</item>
|
810 |
+
<item language="de_DE">Dunkelviolett</item>
|
811 |
+
<item language="fr_FR|fr_CA">Violet foncé</item>
|
812 |
+
<item language="nl_NL">Donkerpaars</item>
|
813 |
+
</color>
|
814 |
+
<color value="#FF1493">
|
815 |
+
<item language="en_GB|en_US|en_CA|en_AU">Deep pink</item>
|
816 |
+
<item language="ru_RU">Глубокий розовый</item>
|
817 |
+
<item language="uk_UA">Глибокий рожевий</item>
|
818 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Profundo color rosa</item>
|
819 |
+
<item language="pt_PT|pt_BR">Rosa profundo</item>
|
820 |
+
<item language="de_DE">Dunkelrosa</item>
|
821 |
+
<item language="fr_FR|fr_CA">Rose foncé</item>
|
822 |
+
<item language="nl_NL">Diep roze</item>
|
823 |
+
</color>
|
824 |
+
<color value="#00BFFF">
|
825 |
+
<item language="en_GB|en_US|en_CA|en_AU">Deep sky blue</item>
|
826 |
+
<item language="ru_RU">Голубой</item>
|
827 |
+
<item language="uk_UA">Блакитний</item>
|
828 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Deep blue sky</item>
|
829 |
+
<item language="pt_PT|pt_BR">Profundo céu azul</item>
|
830 |
+
<item language="de_DE">Deep blue sky</item>
|
831 |
+
<item language="fr_FR|fr_CA">Ciel bleu profond</item>
|
832 |
+
<item language="nl_NL">Deep blue sky</item>
|
833 |
+
</color>
|
834 |
+
<color value="#1560BD">
|
835 |
+
<item language="en_GB|en_US|en_CA|en_AU">Denim</item>
|
836 |
+
<item language="ru_RU">Джинсовый синий</item>
|
837 |
+
<item language="uk_UA">Джинсовий синій</item>
|
838 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Tela vaquera</item>
|
839 |
+
<item language="pt_PT|pt_BR">Brim</item>
|
840 |
+
<item language="de_DE">Denim</item>
|
841 |
+
<item language="fr_FR|fr_CA">Toile de jean</item>
|
842 |
+
<item language="nl_NL">Denim|jean</item>
|
843 |
+
</color>
|
844 |
+
<color value="#1E90FF">
|
845 |
+
<item language="en_GB|en_US|en_CA|en_AU">Dodger blue</item>
|
846 |
+
<item language="ru_RU">Защитно-синий</item>
|
847 |
+
<item language="uk_UA">Захисно-синій</item>
|
848 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul de los Dodgers</item>
|
849 |
+
<item language="pt_PT|pt_BR">Dodger azul</item>
|
850 |
+
<item language="de_DE">Dodger blau</item>
|
851 |
+
<item language="fr_FR|fr_CA">Dodger bleu</item>
|
852 |
+
<item language="nl_NL">Dodger blauw</item>
|
853 |
+
</color>
|
854 |
+
<color value="#50C878">
|
855 |
+
<item language="en_GB|en_US|en_CA|en_AU">Emerald</item>
|
856 |
+
<item language="ru_RU">Изумрудный</item>
|
857 |
+
<item language="uk_UA">Смарагдовий</item>
|
858 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Esmeralda</item>
|
859 |
+
<item language="pt_PT|pt_BR">Esmeralda</item>
|
860 |
+
<item language="de_DE">Smaragd</item>
|
861 |
+
<item language="fr_FR|fr_CA">Émeraude</item>
|
862 |
+
<item language="nl_NL">Smaragd</item>
|
863 |
+
</color>
|
864 |
+
<color value="#990066">
|
865 |
+
<item language="en_GB|en_US|en_CA|en_AU">Eggplant</item>
|
866 |
+
<item language="ru_RU">Баклажановый</item>
|
867 |
+
<item language="uk_UA">Баклажановий</item>
|
868 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Berenjena</item>
|
869 |
+
<item language="pt_PT|pt_BR">Berinjela</item>
|
870 |
+
<item language="de_DE">Aubergine</item>
|
871 |
+
<item language="fr_FR|fr_CA">Aubergine</item>
|
872 |
+
<item language="nl_NL">Aubergine</item>
|
873 |
+
</color>
|
874 |
+
<color value="#4F7942">
|
875 |
+
<item language="en_GB|en_US|en_CA|en_AU">Fern green</item>
|
876 |
+
<item language="ru_RU">Зеленый папоротник</item>
|
877 |
+
<item language="uk_UA">Зелена папороть</item>
|
878 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde del helecho</item>
|
879 |
+
<item language="pt_PT|pt_BR">Verde Fern</item>
|
880 |
+
<item language="de_DE">Farngrün</item>
|
881 |
+
<item language="fr_FR|fr_CA">Vert fougère</item>
|
882 |
+
<item language="nl_NL">Fern green|groene varen</item>
|
883 |
+
</color>
|
884 |
+
<color value="#B22222">
|
885 |
+
<item language="en_GB|en_US|en_CA|en_AU">Fire brick</item>
|
886 |
+
<item language="ru_RU">Кирпичный</item>
|
887 |
+
<item language="uk_UA">Цегляний</item>
|
888 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Fuego ladrillo</item>
|
889 |
+
<item language="pt_PT|pt_BR">Tijolo de fogo</item>
|
890 |
+
<item language="de_DE">Schamotte</item>
|
891 |
+
<item language="fr_FR|fr_CA">Brique réfractaire</item>
|
892 |
+
<item language="nl_NL">Vuurvaste steen</item>
|
893 |
+
</color>
|
894 |
+
<color value="#EEDC82">
|
895 |
+
<item language="en_GB|en_US|en_CA|en_AU">Flax</item>
|
896 |
+
<item language="ru_RU">Льняной</item>
|
897 |
+
<item language="uk_UA">Льняний</item>
|
898 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Lino</item>
|
899 |
+
<item language="pt_PT|pt_BR">Linho</item>
|
900 |
+
<item language="de_DE">Flachs</item>
|
901 |
+
<item language="fr_FR|fr_CA">Lin</item>
|
902 |
+
<item language="nl_NL">Vlas</item>
|
903 |
+
</color>
|
904 |
+
<color value="#FF00FF">
|
905 |
+
<item language="en_GB|en_US|en_CA|en_AU">Fuchsia</item>
|
906 |
+
<item language="ru_RU">Фуксия</item>
|
907 |
+
<item language="uk_UA">Фуксія</item>
|
908 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Fucsia</item>
|
909 |
+
<item language="pt_PT|pt_BR">Fúcsia</item>
|
910 |
+
<item language="de_DE">Fuchsie</item>
|
911 |
+
<item language="fr_FR|fr_CA">Fuchsia</item>
|
912 |
+
<item language="nl_NL">Fuchsia</item>
|
913 |
+
</color>
|
914 |
+
<color value="#E49B0F">
|
915 |
+
<item language="en_GB|en_US|en_CA|en_AU">Gamboge</item>
|
916 |
+
<item language="ru_RU">Гуммигут</item>
|
917 |
+
<item language="uk_UA">Гуммігут</item>
|
918 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Gambogia</item>
|
919 |
+
<item language="pt_PT|pt_BR">Gamboge</item>
|
920 |
+
<item language="de_DE">Gamboge</item>
|
921 |
+
<item language="fr_FR|fr_CA">Gomme-gutte</item>
|
922 |
+
<item language="nl_NL">Guttegom</item>
|
923 |
+
</color>
|
924 |
+
<color value="#FFD700">
|
925 |
+
<item language="en_GB|en_US|en_CA|en_AU">Gold</item>
|
926 |
+
<item language="ru_RU">Золотой</item>
|
927 |
+
<item language="uk_UA">Золотий</item>
|
928 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oro</item>
|
929 |
+
<item language="pt_PT|pt_BR">Ouro</item>
|
930 |
+
<item language="de_DE">Gold</item>
|
931 |
+
<item language="fr_FR|fr_CA">Or</item>
|
932 |
+
<item language="nl_NL">Goud</item>
|
933 |
+
</color>
|
934 |
+
<color value="#DAA520">
|
935 |
+
<item language="en_GB|en_US|en_CA|en_AU">Goldenrod</item>
|
936 |
+
<item language="ru_RU">Золотисто-березовый</item>
|
937 |
+
<item language="uk_UA">Золотисто-березовий</item>
|
938 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Goldenrod</item>
|
939 |
+
<item language="pt_PT|pt_BR">Goldenrod</item>
|
940 |
+
<item language="de_DE">Goldenrod</item>
|
941 |
+
<item language="fr_FR|fr_CA">Verge d'or</item>
|
942 |
+
<item language="nl_NL">Goldenrod</item>
|
943 |
+
</color>
|
944 |
+
<color value="#808080">
|
945 |
+
<item language="en_GB|en_US|en_CA|en_AU">Gray</item>
|
946 |
+
<item language="ru_RU">Серый</item>
|
947 |
+
<item language="uk_UA">Сірий</item>
|
948 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Gris</item>
|
949 |
+
<item language="pt_PT|pt_BR">Cinza</item>
|
950 |
+
<item language="de_DE">Grau</item>
|
951 |
+
<item language="fr_FR|fr_CA">Gris</item>
|
952 |
+
<item language="nl_NL">Grijs</item>
|
953 |
+
</color>
|
954 |
+
<color value="#465945">
|
955 |
+
<item language="en_GB|en_US|en_CA|en_AU">Gray-asparagus</item>
|
956 |
+
<item language="ru_RU">Серая спаржа</item>
|
957 |
+
<item language="uk_UA">Сіра спаржа</item>
|
958 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Gray-espárragos</item>
|
959 |
+
<item language="pt_PT|pt_BR">Cinza aspargo</item>
|
960 |
+
<item language="de_DE">Gray-Spargel</item>
|
961 |
+
<item language="fr_FR|fr_CA">Gris-asperges</item>
|
962 |
+
<item language="nl_NL">Gray-asperges</item>
|
963 |
+
</color>
|
964 |
+
<color value="#CADABA">
|
965 |
+
<item language="en_GB|en_US|en_CA|en_AU">Gray-Tea Green</item>
|
966 |
+
<item language="ru_RU">Зелено-серый чай</item>
|
967 |
+
<item language="uk_UA">Зелено-сірий чай</item>
|
968 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Gray-Té Verde</item>
|
969 |
+
<item language="pt_PT|pt_BR">Gray-Chá Verde</item>
|
970 |
+
<item language="de_DE">Gray-Green Tea</item>
|
971 |
+
<item language="fr_FR|fr_CA">Gray-Thé Vert</item>
|
972 |
+
<item language="nl_NL">Grijs-Groene Thee</item>
|
973 |
+
</color>
|
974 |
+
<color value="#00FF00">
|
975 |
+
<item language="en_GB|en_US|en_CA|en_AU">Green</item>
|
976 |
+
<item language="ru_RU">Зеленый</item>
|
977 |
+
<item language="uk_UA">Зелений</item>
|
978 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde</item>
|
979 |
+
<item language="pt_PT|pt_BR">Verde</item>
|
980 |
+
<item language="de_DE">Grün</item>
|
981 |
+
<item language="fr_FR|fr_CA">Vert</item>
|
982 |
+
<item language="nl_NL">Groen</item>
|
983 |
+
</color>
|
984 |
+
<color value="#ADFF2F">
|
985 |
+
<item language="en_GB|en_US|en_CA|en_AU">Green-yellow</item>
|
986 |
+
<item language="ru_RU">Желто-зеленый</item>
|
987 |
+
<item language="uk_UA">Жовто-зелений</item>
|
988 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde-amarillo</item>
|
989 |
+
<item language="pt_PT|pt_BR">Verde-amarelo</item>
|
990 |
+
<item language="de_DE">Grün-gelb</item>
|
991 |
+
<item language="fr_FR|fr_CA">Vert-jaune</item>
|
992 |
+
<item language="nl_NL">Groen-geel</item>
|
993 |
+
</color>
|
994 |
+
<color value="#DF73FF">
|
995 |
+
<item language="en_GB|en_US|en_CA|en_AU">Heliotrope</item>
|
996 |
+
<item language="ru_RU">Гелиотроп</item>
|
997 |
+
<item language="uk_UA">Геліотроп</item>
|
998 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Heliotropo</item>
|
999 |
+
<item language="pt_PT|pt_BR">Heliotrópio</item>
|
1000 |
+
<item language="de_DE">Heliotrop</item>
|
1001 |
+
<item language="fr_FR|fr_CA">Héliotrope</item>
|
1002 |
+
<item language="nl_NL">Heliotroop</item>
|
1003 |
+
</color>
|
1004 |
+
<color value="#FC0FC0">
|
1005 |
+
<item language="en_GB|en_US|en_CA|en_AU">Hot pink</item>
|
1006 |
+
<item language="ru_RU">Ярко-розовый</item>
|
1007 |
+
<item language="uk_UA">Яскраво-рожевий</item>
|
1008 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Hot pink|rojo brillante</item>
|
1009 |
+
<item language="pt_PT|pt_BR">Rosa quente</item>
|
1010 |
+
<item language="de_DE">Hot pink</item>
|
1011 |
+
<item language="fr_FR|fr_CA">Hot pink|rose vif</item>
|
1012 |
+
<item language="nl_NL">Hot pink|Helder roze</item>
|
1013 |
+
</color>
|
1014 |
+
<color value="#4B0082">
|
1015 |
+
<item language="en_GB|en_US|en_CA|en_AU">Indigo</item>
|
1016 |
+
<item language="ru_RU">Индиго</item>
|
1017 |
+
<item language="uk_UA">Індиго</item>
|
1018 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Añil</item>
|
1019 |
+
<item language="pt_PT|pt_BR">Índigo</item>
|
1020 |
+
<item language="de_DE">Indigo</item>
|
1021 |
+
<item language="fr_FR|fr_CA">Indigo</item>
|
1022 |
+
<item language="nl_NL">Indigo</item>
|
1023 |
+
</color>
|
1024 |
+
<color value="#FF4F00">
|
1025 |
+
<item language="en_GB|en_US|en_CA|en_AU">International orange|Safety orange</item>
|
1026 |
+
<item language="ru_RU">Международный оранжевый|сигнальный оранжевый</item>
|
1027 |
+
<item language="uk_UA">Міжнародний помаранчевий|сигнальний помаранчевий</item>
|
1028 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Internacional naranja|naranja Seguridad</item>
|
1029 |
+
<item language="pt_PT|pt_BR">Laranja internacional|Segurança laranja</item>
|
1030 |
+
<item language="de_DE">Internationale orange|orange Sicherheit</item>
|
1031 |
+
<item language="fr_FR|fr_CA">Orange international|la sécurité d'orange</item>
|
1032 |
+
<item language="nl_NL">International Orange|Safety Orange|internationale oranje|Veiligheid Oranje</item>
|
1033 |
+
</color>
|
1034 |
+
<color value="#CD5C5C">
|
1035 |
+
<item language="en_GB|en_US|en_CA|en_AU">Chestnut</item>
|
1036 |
+
<item language="ru_RU">Каштановый</item>
|
1037 |
+
<item language="uk_UA">Каштановий</item>
|
1038 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Castaño</item>
|
1039 |
+
<item language="pt_PT|pt_BR">Castanha</item>
|
1040 |
+
<item language="de_DE">Kastanie</item>
|
1041 |
+
<item language="fr_FR|fr_CA">Châtaigne</item>
|
1042 |
+
<item language="nl_NL">Kastanje</item>
|
1043 |
+
</color>
|
1044 |
+
<color value="#00A86B">
|
1045 |
+
<item language="en_GB|en_US|en_CA|en_AU">Jade</item>
|
1046 |
+
<item language="ru_RU">Нефритовый</item>
|
1047 |
+
<item language="uk_UA">Нефритовий</item>
|
1048 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Jade</item>
|
1049 |
+
<item language="pt_PT|pt_BR">Jade</item>
|
1050 |
+
<item language="de_DE">Jade</item>
|
1051 |
+
<item language="fr_FR|fr_CA">Jade</item>
|
1052 |
+
<item language="nl_NL">Jade</item>
|
1053 |
+
</color>
|
1054 |
+
<color value="#C3B091">
|
1055 |
+
<item language="en_GB|en_US|en_CA|en_AU">Khaki</item>
|
1056 |
+
<item language="ru_RU">Хаки</item>
|
1057 |
+
<item language="uk_UA">Хакі</item>
|
1058 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Caqui</item>
|
1059 |
+
<item language="pt_PT|pt_BR">Caqui</item>
|
1060 |
+
<item language="de_DE">Khaki</item>
|
1061 |
+
<item language="fr_FR|fr_CA">Kaki</item>
|
1062 |
+
<item language="nl_NL">Khaki</item>
|
1063 |
+
</color>
|
1064 |
+
<color value="#3A75C4">
|
1065 |
+
<item language="en_GB|en_US|en_CA|en_AU">Klein Blue</item>
|
1066 |
+
<item language="ru_RU">Синий Клейна</item>
|
1067 |
+
<item language="uk_UA">Синій Клейна</item>
|
1068 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Klein Blue</item>
|
1069 |
+
<item language="pt_PT|pt_BR">Klein Blue|Klein Azul</item>
|
1070 |
+
<item language="de_DE">Klein Blue</item>
|
1071 |
+
<item language="fr_FR|fr_CA">Klein Blue</item>
|
1072 |
+
<item language="nl_NL">Klein Blue</item>
|
1073 |
+
</color>
|
1074 |
+
<color value="#E6E6FA">
|
1075 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lavender</item>
|
1076 |
+
<item language="ru_RU">Лаванда|лавандово-синий</item>
|
1077 |
+
<item language="uk_UA">Лаванда|лавандово-синій</item>
|
1078 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Lavanda</item>
|
1079 |
+
<item language="pt_PT|pt_BR">Lavanda</item>
|
1080 |
+
<item language="de_DE">Lavendel</item>
|
1081 |
+
<item language="fr_FR|fr_CA">Lavande</item>
|
1082 |
+
<item language="nl_NL">Lavendel</item>
|
1083 |
+
</color>
|
1084 |
+
<color value="#FFF0F5">
|
1085 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lavender Blush</item>
|
1086 |
+
<item language="ru_RU">Розово-лавандовый</item>
|
1087 |
+
<item language="uk_UA">Рожево-лавандовий</item>
|
1088 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Blush Lavender|Rosa y lavanda</item>
|
1089 |
+
<item language="pt_PT|pt_BR">Blush lavanda</item>
|
1090 |
+
<item language="de_DE">Lavender Blush</item>
|
1091 |
+
<item language="fr_FR|fr_CA">Blush lavande</item>
|
1092 |
+
<item language="nl_NL">Lavendel Blush</item>
|
1093 |
+
</color>
|
1094 |
+
<color value="#FDE910">
|
1095 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lemon</item>
|
1096 |
+
<item language="ru_RU">Лимонный</item>
|
1097 |
+
<item language="uk_UA">Лимонний</item>
|
1098 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Limón</item>
|
1099 |
+
<item language="pt_PT|pt_BR">Limão</item>
|
1100 |
+
<item language="de_DE">Zitrone</item>
|
1101 |
+
<item language="fr_FR|fr_CA">Citron</item>
|
1102 |
+
<item language="nl_NL">Citroen</item>
|
1103 |
+
</color>
|
1104 |
+
<color value="#FFFACD">
|
1105 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lemon Cream</item>
|
1106 |
+
<item language="ru_RU">Лимонно-кремовый</item>
|
1107 |
+
<item language="uk_UA">Лимонно-кремовий</item>
|
1108 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Crema de limón</item>
|
1109 |
+
<item language="pt_PT|pt_BR">Creme de limão</item>
|
1110 |
+
<item language="de_DE">Zitronencreme</item>
|
1111 |
+
<item language="fr_FR|fr_CA">Crème au citron</item>
|
1112 |
+
<item language="nl_NL">Lemon Cream</item>
|
1113 |
+
</color>
|
1114 |
+
<color value="#CD853F">
|
1115 |
+
<item language="en_GB|en_US|en_CA|en_AU">Light brown</item>
|
1116 |
+
<item language="ru_RU">Светло-коричневый</item>
|
1117 |
+
<item language="uk_UA">Світло-коричневий</item>
|
1118 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Marrón claro</item>
|
1119 |
+
<item language="pt_PT|pt_BR">Castanho claro</item>
|
1120 |
+
<item language="de_DE">Hellbraun</item>
|
1121 |
+
<item language="fr_FR|fr_CA">Brun clair</item>
|
1122 |
+
<item language="nl_NL">Licht bruin</item>
|
1123 |
+
</color>
|
1124 |
+
<color value="#C8A2C8">
|
1125 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lilac</item>
|
1126 |
+
<item language="ru_RU">Сиреневый</item>
|
1127 |
+
<item language="uk_UA">Бузковий</item>
|
1128 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Lila</item>
|
1129 |
+
<item language="pt_PT|pt_BR">Lilás</item>
|
1130 |
+
<item language="de_DE">Flieder</item>
|
1131 |
+
<item language="fr_FR|fr_CA">Lilas</item>
|
1132 |
+
<item language="nl_NL">Lila</item>
|
1133 |
+
</color>
|
1134 |
+
<color value="#CCFF00">
|
1135 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lime</item>
|
1136 |
+
<item language="ru_RU">Лайм</item>
|
1137 |
+
<item language="uk_UA">Лайм</item>
|
1138 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cal</item>
|
1139 |
+
<item language="pt_PT|pt_BR">Cal</item>
|
1140 |
+
<item language="de_DE">Kalk</item>
|
1141 |
+
<item language="fr_FR|fr_CA">Chaux</item>
|
1142 |
+
<item language="nl_NL">Kalk</item>
|
1143 |
+
</color>
|
1144 |
+
<color value="#FAF0E6">
|
1145 |
+
<item language="en_GB|en_US|en_CA|en_AU">Linen</item>
|
1146 |
+
<item language="ru_RU">Льняной</item>
|
1147 |
+
<item language="uk_UA">Льняний</item>
|
1148 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Lino</item>
|
1149 |
+
<item language="pt_PT|pt_BR">Linho</item>
|
1150 |
+
<item language="de_DE">Leinen</item>
|
1151 |
+
<item language="fr_FR|fr_CA">Lin</item>
|
1152 |
+
<item language="nl_NL">Linnen</item>
|
1153 |
+
</color>
|
1154 |
+
<color value="#7CFC00">
|
1155 |
+
<item language="en_GB|en_US|en_CA|en_AU">Lawn Green</item>
|
1156 |
+
<item language="ru_RU">Зеленая лужайка</item>
|
1157 |
+
<item language="uk_UA">Зелена галявина</item>
|
1158 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Césped verde</item>
|
1159 |
+
<item language="pt_PT|pt_BR">Gramado verde</item>
|
1160 |
+
<item language="de_DE">Green Lawn</item>
|
1161 |
+
<item language="fr_FR|fr_CA">Green Lawn</item>
|
1162 |
+
<item language="nl_NL">Green Lawn</item>
|
1163 |
+
</color>
|
1164 |
+
<color value="#FF00FF">
|
1165 |
+
<item language="en_GB|en_US|en_CA|en_AU">Fuchsia|Magenta</item>
|
1166 |
+
<item language="ru_RU">Фуксия|Малиновый</item>
|
1167 |
+
<item language="uk_UA">Фуксія|Малиновий</item>
|
1168 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Fucsia|Magenta</item>
|
1169 |
+
<item language="pt_PT|pt_BR">Fúcsia|Magenta</item>
|
1170 |
+
<item language="de_DE">Fuchsie|Magenta</item>
|
1171 |
+
<item language="fr_FR|fr_CA">Fuchsia|Magenta</item>
|
1172 |
+
<item language="nl_NL">Fuchsia|Magenta</item>
|
1173 |
+
</color>
|
1174 |
+
<color value="#0BDA51">
|
1175 |
+
<item language="en_GB|en_US|en_CA|en_AU">Malachite</item>
|
1176 |
+
<item language="ru_RU">Малахитовая зелень|малахитовый</item>
|
1177 |
+
<item language="uk_UA">Малахітова зелень|малахітовий</item>
|
1178 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Malaquita</item>
|
1179 |
+
<item language="pt_PT|pt_BR">Malaquita</item>
|
1180 |
+
<item language="de_DE">Malachit</item>
|
1181 |
+
<item language="fr_FR|fr_CA">Malachite</item>
|
1182 |
+
<item language="nl_NL">Malachiet</item>
|
1183 |
+
</color>
|
1184 |
+
<color value="#800000">
|
1185 |
+
<item language="en_GB|en_US|en_CA|en_AU">Maroon</item>
|
1186 |
+
<item language="ru_RU">Коричнево-малиновый</item>
|
1187 |
+
<item language="uk_UA">Коричнево-малиновий</item>
|
1188 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Granate</item>
|
1189 |
+
<item language="pt_PT|pt_BR">Foquete</item>
|
1190 |
+
<item language="de_DE">Kastanienbraun</item>
|
1191 |
+
<item language="fr_FR|fr_CA">Bordeaux</item>
|
1192 |
+
<item language="nl_NL">Kastanjebruin</item>
|
1193 |
+
</color>
|
1194 |
+
<color value="#993366">
|
1195 |
+
<item language="en_GB|en_US|en_CA|en_AU">Mauve</item>
|
1196 |
+
<item language="ru_RU">Розовато-лиловый</item>
|
1197 |
+
<item language="uk_UA">Рожево-ліловий</item>
|
1198 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Color de malva</item>
|
1199 |
+
<item language="pt_PT|pt_BR">Cor de malva</item>
|
1200 |
+
<item language="de_DE">Mauve</item>
|
1201 |
+
<item language="fr_FR|fr_CA">Mauve</item>
|
1202 |
+
<item language="nl_NL">Mauve</item>
|
1203 |
+
</color>
|
1204 |
+
<color value="#003366">
|
1205 |
+
<item language="en_GB|en_US|en_CA|en_AU">Midnight Blue</item>
|
1206 |
+
<item language="ru_RU">Полуночно-синий</item>
|
1207 |
+
<item language="uk_UA">Опівнічно-синій</item>
|
1208 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Midnight Blue</item>
|
1209 |
+
<item language="pt_PT|pt_BR">Midnight Blue</item>
|
1210 |
+
<item language="de_DE">Midnight Blue|Mitternachtblau</item>
|
1211 |
+
<item language="fr_FR|fr_CA">Midnight Blue|bleu nuit</item>
|
1212 |
+
<item language="nl_NL">Midnight Blue</item>
|
1213 |
+
</color>
|
1214 |
+
<color value="#98FF98">
|
1215 |
+
<item language="en_GB|en_US|en_CA|en_AU">Mint Green</item>
|
1216 |
+
<item language="ru_RU">Зеленая мята|мятный</item>
|
1217 |
+
<item language="uk_UA">Зелена м'ята|м'ятний</item>
|
1218 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Mint Green|menta verde</item>
|
1219 |
+
<item language="pt_PT|pt_BR">Mint Green|hortelã</item>
|
1220 |
+
<item language="de_DE">Mint Green</item>
|
1221 |
+
<item language="fr_FR|fr_CA">Mint Green|menthe</item>
|
1222 |
+
<item language="nl_NL">Mint Green</item>
|
1223 |
+
</color>
|
1224 |
+
<color value="#ADDFAD">
|
1225 |
+
<item language="en_GB|en_US|en_CA|en_AU">Moss green</item>
|
1226 |
+
<item language="ru_RU">Зеленый мох</item>
|
1227 |
+
<item language="uk_UA">Зелений мох</item>
|
1228 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Verde musgo</item>
|
1229 |
+
<item language="pt_PT|pt_BR">Verde musgo</item>
|
1230 |
+
<item language="de_DE">Moosgrün</item>
|
1231 |
+
<item language="fr_FR|fr_CA">Vert mousse</item>
|
1232 |
+
<item language="nl_NL">Mosgroen</item>
|
1233 |
+
</color>
|
1234 |
+
<color value="#997A8D">
|
1235 |
+
<item language="en_GB|en_US|en_CA|en_AU">Mountbatten pink</item>
|
1236 |
+
<item language="ru_RU">Розовый Маунтбэттена</item>
|
1237 |
+
<item language="uk_UA">Рожевий Маунтбеттена</item>
|
1238 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Mountbatten rosa</item>
|
1239 |
+
<item language="pt_PT|pt_BR">Mountbatten-de-rosa</item>
|
1240 |
+
<item language="de_DE">Mountbatten rosa</item>
|
1241 |
+
<item language="fr_FR|fr_CA">Mountbatten rose</item>
|
1242 |
+
<item language="nl_NL">Mountbatten roze</item>
|
1243 |
+
</color>
|
1244 |
+
<color value="#FFDB58">
|
1245 |
+
<item language="en_GB|en_US|en_CA|en_AU">Mustard</item>
|
1246 |
+
<item language="ru_RU">Горчичный</item>
|
1247 |
+
<item language="uk_UA">Гірчичний</item>
|
1248 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Mostaza</item>
|
1249 |
+
<item language="pt_PT|pt_BR">Mostarda</item>
|
1250 |
+
<item language="de_DE">Senf</item>
|
1251 |
+
<item language="fr_FR|fr_CA">Moutarde</item>
|
1252 |
+
<item language="nl_NL">Mosterd</item>
|
1253 |
+
</color>
|
1254 |
+
<color value="#FFDEAD">
|
1255 |
+
<item language="en_GB|en_US|en_CA|en_AU">Navajo white</item>
|
1256 |
+
<item language="ru_RU">Белый навахо</item>
|
1257 |
+
<item language="uk_UA">Білий навахо</item>
|
1258 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Navajo blanco</item>
|
1259 |
+
<item language="pt_PT|pt_BR">Navajo branco</item>
|
1260 |
+
<item language="de_DE">Navajo weiß</item>
|
1261 |
+
<item language="fr_FR|fr_CA">Navajo blanc</item>
|
1262 |
+
<item language="nl_NL">Navajo wit</item>
|
1263 |
+
</color>
|
1264 |
+
<color value="#000080">
|
1265 |
+
<item language="en_GB|en_US|en_CA|en_AU">Navy</item>
|
1266 |
+
<item language="ru_RU">Темно-синий</item>
|
1267 |
+
<item language="uk_UA">Темно-синій</item>
|
1268 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Marina de guerra</item>
|
1269 |
+
<item language="pt_PT|pt_BR">Marinha</item>
|
1270 |
+
<item language="de_DE">Marine</item>
|
1271 |
+
<item language="fr_FR|fr_CA">Marine</item>
|
1272 |
+
<item language="nl_NL">Marine</item>
|
1273 |
+
</color>
|
1274 |
+
<color value="#CC7722">
|
1275 |
+
<item language="en_GB|en_US|en_CA|en_AU">Ochre</item>
|
1276 |
+
<item language="ru_RU">Охра</item>
|
1277 |
+
<item language="uk_UA">Охра</item>
|
1278 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Ocre</item>
|
1279 |
+
<item language="pt_PT|pt_BR">Ochre</item>
|
1280 |
+
<item language="de_DE">Ochre</item>
|
1281 |
+
<item language="fr_FR|fr_CA">Ocre</item>
|
1282 |
+
<item language="nl_NL">Ochre</item>
|
1283 |
+
</color>
|
1284 |
+
<color value="#CFB53B">
|
1285 |
+
<item language="en_GB|en_US|en_CA|en_AU">Old Gold</item>
|
1286 |
+
<item language="ru_RU">Старое золото</item>
|
1287 |
+
<item language="uk_UA">Старе золото</item>
|
1288 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oro Viejo</item>
|
1289 |
+
<item language="pt_PT|pt_BR">Ouro Velho</item>
|
1290 |
+
<item language="de_DE">Old Gold</item>
|
1291 |
+
<item language="fr_FR|fr_CA">Old Gold|vieil or</item>
|
1292 |
+
<item language="nl_NL">Old Gold</item>
|
1293 |
+
</color>
|
1294 |
+
<color value="#808000">
|
1295 |
+
<item language="en_GB|en_US|en_CA|en_AU">Olive</item>
|
1296 |
+
<item language="ru_RU">Оливковый</item>
|
1297 |
+
<item language="uk_UA">Оливковий</item>
|
1298 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Oliva</item>
|
1299 |
+
<item language="pt_PT|pt_BR">Oliva</item>
|
1300 |
+
<item language="de_DE">Olive</item>
|
1301 |
+
<item language="fr_FR|fr_CA">Olive</item>
|
1302 |
+
<item language="nl_NL">Olijf</item>
|
1303 |
+
</color>
|
1304 |
+
<color value="#6B8E23">
|
1305 |
+
<item language="en_GB|en_US|en_CA|en_AU">Olive Drab</item>
|
1306 |
+
<item language="ru_RU">Нежно-оливковый</item>
|
1307 |
+
<item language="uk_UA">Ніжно-оливковий</item>
|
1308 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Olive Drab|Oliva Pálido</item>
|
1309 |
+
<item language="pt_PT|pt_BR">Olive Drab|Azeitona pálido</item>
|
1310 |
+
<item language="de_DE">Olive Drab</item>
|
1311 |
+
<item language="fr_FR|fr_CA">Olive Drab|Olive pâle</item>
|
1312 |
+
<item language="nl_NL">Olive Drab</item>
|
1313 |
+
</color>
|
1314 |
+
<color value="#FFA500">
|
1315 |
+
<item language="en_GB|en_US|en_CA|en_AU">Orange</item>
|
1316 |
+
<item language="ru_RU">Оранжевый</item>
|
1317 |
+
<item language="uk_UA">Помаранчевий</item>
|
1318 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Naranja</item>
|
1319 |
+
<item language="pt_PT|pt_BR">Laranja</item>
|
1320 |
+
<item language="de_DE">Orange</item>
|
1321 |
+
<item language="fr_FR|fr_CA">Orange</item>
|
1322 |
+
<item language="nl_NL">Oranje</item>
|
1323 |
+
</color>
|
1324 |
+
<color value="#DA70D6">
|
1325 |
+
<item language="en_GB|en_US|en_CA|en_AU">Orchid</item>
|
1326 |
+
<item language="ru_RU">Орхидея</item>
|
1327 |
+
<item language="uk_UA">Орхідея</item>
|
1328 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Orquídea</item>
|
1329 |
+
<item language="pt_PT|pt_BR">Orquídea</item>
|
1330 |
+
<item language="de_DE">Orchidee</item>
|
1331 |
+
<item language="fr_FR|fr_CA">Orchidée</item>
|
1332 |
+
<item language="nl_NL">Orchidee</item>
|
1333 |
+
</color>
|
1334 |
+
<color value="#FDF5E6">
|
1335 |
+
<item language="en_GB|en_US|en_CA|en_AU">Old Lace</item>
|
1336 |
+
<item language="ru_RU">Старое кружево</item>
|
1337 |
+
<item language="uk_UA">Старе мереживо</item>
|
1338 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Old Lace|encaje viejo</item>
|
1339 |
+
<item language="pt_PT|pt_BR">Old Lace|renda velho</item>
|
1340 |
+
<item language="de_DE">Old Lace|alt schnüren</item>
|
1341 |
+
<item language="fr_FR|fr_CA">Old Lace|vieil dentelle</item>
|
1342 |
+
<item language="nl_NL">Old Lace</item>
|
1343 |
+
</color>
|
1344 |
+
<color value="#AFEEEE">
|
1345 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale Blue</item>
|
1346 |
+
<item language="ru_RU">Бледно-синий</item>
|
1347 |
+
<item language="uk_UA">Блідо-синій</item>
|
1348 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale Blue|azul pálido</item>
|
1349 |
+
<item language="pt_PT|pt_BR">Pale Blue|Pálido Azul</item>
|
1350 |
+
<item language="de_DE">Pale Blue</item>
|
1351 |
+
<item language="fr_FR|fr_CA">Pale Blue</item>
|
1352 |
+
<item language="nl_NL">Pale Blue</item>
|
1353 |
+
</color>
|
1354 |
+
<color value="#987654">
|
1355 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale brown</item>
|
1356 |
+
<item language="ru_RU">Бледно-коричневый</item>
|
1357 |
+
<item language="uk_UA">Блідо-коричневий</item>
|
1358 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Marrón pálido</item>
|
1359 |
+
<item language="pt_PT|pt_BR">Castanho claro</item>
|
1360 |
+
<item language="de_DE">Hellbraun</item>
|
1361 |
+
<item language="fr_FR|fr_CA">Brun pâle</item>
|
1362 |
+
<item language="nl_NL">Lichtbruin</item>
|
1363 |
+
</color>
|
1364 |
+
<color value="#AF4035">
|
1365 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale carmine</item>
|
1366 |
+
<item language="ru_RU">Бледно-карминный|Кармин</item>
|
1367 |
+
<item language="uk_UA">Блідо-кармін|Кармін</item>
|
1368 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale carmín</item>
|
1369 |
+
<item language="pt_PT|pt_BR">Pálido carmim|Pálido carmim</item>
|
1370 |
+
<item language="de_DE">Pale carmine</item>
|
1371 |
+
<item language="fr_FR|fr_CA">Pale carmin</item>
|
1372 |
+
<item language="nl_NL">Pale karmijn</item>
|
1373 |
+
</color>
|
1374 |
+
<color value="#DDADAF">
|
1375 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale chestnut</item>
|
1376 |
+
<item language="ru_RU">Бледно-каштановый</item>
|
1377 |
+
<item language="uk_UA">Блідо-каштановий</item>
|
1378 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Castaño pálido</item>
|
1379 |
+
<item language="pt_PT|pt_BR">Castanha pálida</item>
|
1380 |
+
<item language="de_DE">Pale Kastanien</item>
|
1381 |
+
<item language="fr_FR|fr_CA">Châtain clair</item>
|
1382 |
+
<item language="nl_NL">Pale kastanje</item>
|
1383 |
+
</color>
|
1384 |
+
<color value="#ABCDEF">
|
1385 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale cornflower blue</item>
|
1386 |
+
<item language="ru_RU">Бледно-васильковый</item>
|
1387 |
+
<item language="uk_UA">Блідо-волошковий</item>
|
1388 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale azul aciano</item>
|
1389 |
+
<item language="pt_PT|pt_BR">Pálido azul-violáceo</item>
|
1390 |
+
<item language="de_DE">Pale Kornblumenblau</item>
|
1391 |
+
<item language="fr_FR|fr_CA">Bleuet bleu pâle</item>
|
1392 |
+
<item language="nl_NL">Pale korenbloemblauw</item>
|
1393 |
+
</color>
|
1394 |
+
<color value="#F984E5">
|
1395 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale magenta</item>
|
1396 |
+
<item language="ru_RU">Бледно-пурпурный</item>
|
1397 |
+
<item language="uk_UA">Блідо-пурпурний</item>
|
1398 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Magenta pálido</item>
|
1399 |
+
<item language="pt_PT|pt_BR">Magenta clara</item>
|
1400 |
+
<item language="de_DE">Pale magenta</item>
|
1401 |
+
<item language="fr_FR|fr_CA">Magenta pâle</item>
|
1402 |
+
<item language="nl_NL">Pale magenta</item>
|
1403 |
+
</color>
|
1404 |
+
<color value="#996666">
|
1405 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale mauve</item>
|
1406 |
+
<item language="ru_RU">Бледный розовато-лиловый</item>
|
1407 |
+
<item language="uk_UA">Блідий рожево-ліловий</item>
|
1408 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale malva</item>
|
1409 |
+
<item language="pt_PT|pt_BR">Lilás claro</item>
|
1410 |
+
<item language="de_DE">Pale Mauve</item>
|
1411 |
+
<item language="fr_FR|fr_CA">Mauve pâle</item>
|
1412 |
+
<item language="nl_NL">Lichtpaars</item>
|
1413 |
+
</color>
|
1414 |
+
<color value="#FADADD">
|
1415 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale pink</item>
|
1416 |
+
<item language="ru_RU">Бледно-розовый</item>
|
1417 |
+
<item language="uk_UA">Блідо-рожевий</item>
|
1418 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rosa pálido</item>
|
1419 |
+
<item language="pt_PT|pt_BR">Rosa pálido</item>
|
1420 |
+
<item language="de_DE">Pale pink</item>
|
1421 |
+
<item language="fr_FR|fr_CA">Rose pâle</item>
|
1422 |
+
<item language="nl_NL">Lichtroze</item>
|
1423 |
+
</color>
|
1424 |
+
<color value="#DB7093">
|
1425 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale red-violet</item>
|
1426 |
+
<item language="ru_RU">Лиловый</item>
|
1427 |
+
<item language="uk_UA">Ліловий</item>
|
1428 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale rojo-violeta</item>
|
1429 |
+
<item language="pt_PT|pt_BR">Pálido vermelho-violeta</item>
|
1430 |
+
<item language="de_DE">Pale rot-violett</item>
|
1431 |
+
<item language="fr_FR|fr_CA">Pale rouge-violet</item>
|
1432 |
+
<item language="nl_NL">Pale rood-violet</item>
|
1433 |
+
</color>
|
1434 |
+
<color value="#DABDAB">
|
1435 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pale Sandy Brown</item>
|
1436 |
+
<item language="ru_RU">Бледно-песочный</item>
|
1437 |
+
<item language="uk_UA">Блідо-пісочний</item>
|
1438 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pale Brown Sandy|Arena pálida</item>
|
1439 |
+
<item language="pt_PT|pt_BR">Pálido Sandy Brown|Areia branca</item>
|
1440 |
+
<item language="de_DE">Pale Sandy Brown</item>
|
1441 |
+
<item language="fr_FR|fr_CA">Pale Sandy Brown</item>
|
1442 |
+
<item language="nl_NL">Pale Sandy Brown</item>
|
1443 |
+
</color>
|
1444 |
+
<color value="#F0DC82">
|
1445 |
+
<item language="en_GB|en_US|en_CA|en_AU">Buff|Pale yellow</item>
|
1446 |
+
<item language="ru_RU">Кожа буйвола|палевый</item>
|
1447 |
+
<item language="uk_UA">Шкіра буйвола|палевий</item>
|
1448 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pulir|amarillo pálido</item>
|
1449 |
+
<item language="pt_PT|pt_BR">Tapa|Amarelo pálido</item>
|
1450 |
+
<item language="de_DE">Polieren|Hellgelb</item>
|
1451 |
+
<item language="fr_FR|fr_CA">Chamois|Jaune pâle</item>
|
1452 |
+
<item language="nl_NL">Polijsten|Lichtgeel</item>
|
1453 |
+
</color>
|
1454 |
+
<color value="#C7FCEC">
|
1455 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pang</item>
|
1456 |
+
<item language="ru_RU">Панг</item>
|
1457 |
+
<item language="uk_UA">Панг</item>
|
1458 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Angustia</item>
|
1459 |
+
<item language="pt_PT|pt_BR">Angústia</item>
|
1460 |
+
<item language="de_DE">Stich</item>
|
1461 |
+
<item language="fr_FR|fr_CA">Serrement</item>
|
1462 |
+
<item language="nl_NL">Pijnscheut</item>
|
1463 |
+
</color>
|
1464 |
+
<color value="#FFEFD5">
|
1465 |
+
<item language="en_GB|en_US|en_CA|en_AU">Papaya whip</item>
|
1466 |
+
<item language="ru_RU">Побег папайи</item>
|
1467 |
+
<item language="uk_UA">Паросток папайї</item>
|
1468 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Papaya látigo</item>
|
1469 |
+
<item language="pt_PT|pt_BR">Mamão chicote</item>
|
1470 |
+
<item language="de_DE">Papaya Peitsche</item>
|
1471 |
+
<item language="fr_FR|fr_CA">Papaye fouet</item>
|
1472 |
+
<item language="nl_NL">Papaya zweep</item>
|
1473 |
+
</color>
|
1474 |
+
<color value="#77DD77">
|
1475 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pastel green</item>
|
1476 |
+
<item language="ru_RU">Пастельно-зеленый</item>
|
1477 |
+
<item language="uk_UA">Пастельно-зелений</item>
|
1478 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pastel verde</item>
|
1479 |
+
<item language="pt_PT|pt_BR">Verde pastel</item>
|
1480 |
+
<item language="de_DE">Lindgrün</item>
|
1481 |
+
<item language="fr_FR|fr_CA">Vert pastel</item>
|
1482 |
+
<item language="nl_NL">Pastel groene</item>
|
1483 |
+
</color>
|
1484 |
+
<color value="#FFD1DC">
|
1485 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pastel pink</item>
|
1486 |
+
<item language="ru_RU">Пастельно-розовый</item>
|
1487 |
+
<item language="uk_UA">Пастельно-рожевий</item>
|
1488 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pastel rosa</item>
|
1489 |
+
<item language="pt_PT|pt_BR">Rosa pastel</item>
|
1490 |
+
<item language="de_DE">Hellrosa</item>
|
1491 |
+
<item language="fr_FR|fr_CA">Rose pastel</item>
|
1492 |
+
<item language="nl_NL">Pastel roze</item>
|
1493 |
+
</color>
|
1494 |
+
<color value="#FFE5B4">
|
1495 |
+
<item language="en_GB|en_US|en_CA|en_AU">Peach</item>
|
1496 |
+
<item language="ru_RU">Персиковый</item>
|
1497 |
+
<item language="uk_UA">Персиковий</item>
|
1498 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Melocotón</item>
|
1499 |
+
<item language="pt_PT|pt_BR">Pêssego</item>
|
1500 |
+
<item language="de_DE">Pfirsich</item>
|
1501 |
+
<item language="fr_FR|fr_CA">Pêche</item>
|
1502 |
+
<item language="nl_NL">Perzik</item>
|
1503 |
+
</color>
|
1504 |
+
<color value="#FFCC99">
|
1505 |
+
<item language="en_GB|en_US|en_CA|en_AU">Peach-orange</item>
|
1506 |
+
<item language="ru_RU">Оранжево-персиковый</item>
|
1507 |
+
<item language="uk_UA">Оранжево-персиковий</item>
|
1508 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Peach-naranja</item>
|
1509 |
+
<item language="pt_PT|pt_BR">Pêssego-laranja</item>
|
1510 |
+
<item language="de_DE">Peach-orange</item>
|
1511 |
+
<item language="fr_FR|fr_CA">Peach-orange</item>
|
1512 |
+
<item language="nl_NL">Perzik-oranje</item>
|
1513 |
+
</color>
|
1514 |
+
<color value="#FADFAD">
|
1515 |
+
<item language="en_GB|en_US|en_CA|en_AU">Peach-yellow</item>
|
1516 |
+
<item language="ru_RU">Желто-персиковый</item>
|
1517 |
+
<item language="uk_UA">Жовто-персиковий</item>
|
1518 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Melocotón amarillo-</item>
|
1519 |
+
<item language="pt_PT|pt_BR">Pêssego amarelo-</item>
|
1520 |
+
<item language="de_DE">Peach-gelb</item>
|
1521 |
+
<item language="fr_FR|fr_CA">Pêche jaune</item>
|
1522 |
+
<item language="nl_NL">Perzik-geel</item>
|
1523 |
+
</color>
|
1524 |
+
<color value="#D1E231">
|
1525 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pear</item>
|
1526 |
+
<item language="ru_RU">Грушевый</item>
|
1527 |
+
<item language="uk_UA">Грушевий</item>
|
1528 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pera</item>
|
1529 |
+
<item language="pt_PT|pt_BR">Pereira</item>
|
1530 |
+
<item language="de_DE">Birne</item>
|
1531 |
+
<item language="fr_FR|fr_CA">Poire</item>
|
1532 |
+
<item language="nl_NL">Peer</item>
|
1533 |
+
</color>
|
1534 |
+
<color value="#CCCCFF">
|
1535 |
+
<item language="en_GB|en_US|en_CA|en_AU">Periwinkle</item>
|
1536 |
+
<item language="ru_RU">Барвинок</item>
|
1537 |
+
<item language="uk_UA">Барвінок</item>
|
1538 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Vincapervinca</item>
|
1539 |
+
<item language="pt_PT|pt_BR">Mirta</item>
|
1540 |
+
<item language="de_DE">Immergrün</item>
|
1541 |
+
<item language="fr_FR|fr_CA">Pervenche</item>
|
1542 |
+
<item language="nl_NL">Maagdenpalm</item>
|
1543 |
+
</color>
|
1544 |
+
<color value="#6600FF">
|
1545 |
+
<item language="en_GB|en_US|en_CA|en_AU">Persian blue</item>
|
1546 |
+
<item language="ru_RU">Персидский синий</item>
|
1547 |
+
<item language="uk_UA">Перський синій</item>
|
1548 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Persa azul</item>
|
1549 |
+
<item language="pt_PT|pt_BR">Persa azul</item>
|
1550 |
+
<item language="de_DE">Perser blau</item>
|
1551 |
+
<item language="fr_FR|fr_CA">Persan bleu</item>
|
1552 |
+
<item language="nl_NL">Perzisch blauw</item>
|
1553 |
+
</color>
|
1554 |
+
<color value="#01796F">
|
1555 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pine Green</item>
|
1556 |
+
<item language="ru_RU">Зеленая сосна</item>
|
1557 |
+
<item language="uk_UA">Зелена сосна</item>
|
1558 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Green Pine|pino verde</item>
|
1559 |
+
<item language="pt_PT|pt_BR">Verde Pinho</item>
|
1560 |
+
<item language="de_DE">Pine Green</item>
|
1561 |
+
<item language="fr_FR|fr_CA">Green Pine</item>
|
1562 |
+
<item language="nl_NL">Pine Green</item>
|
1563 |
+
</color>
|
1564 |
+
<color value="#FFC0CB">
|
1565 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pink</item>
|
1566 |
+
<item language="ru_RU">Розовый</item>
|
1567 |
+
<item language="uk_UA">Рожевий</item>
|
1568 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rosa</item>
|
1569 |
+
<item language="pt_PT|pt_BR">Rosa</item>
|
1570 |
+
<item language="de_DE">Rosa</item>
|
1571 |
+
<item language="fr_FR|fr_CA">Rose</item>
|
1572 |
+
<item language="nl_NL">Roze</item>
|
1573 |
+
</color>
|
1574 |
+
<color value="#FF9966">
|
1575 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pink-orange</item>
|
1576 |
+
<item language="ru_RU">Оранжево-розовый</item>
|
1577 |
+
<item language="uk_UA">Оранжево-рожевий</item>
|
1578 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rosa-naranja</item>
|
1579 |
+
<item language="pt_PT|pt_BR">Rosa-laranja</item>
|
1580 |
+
<item language="de_DE">Rosa-orange</item>
|
1581 |
+
<item language="fr_FR|fr_CA">Rose-orange</item>
|
1582 |
+
<item language="nl_NL">Roze-oranje</item>
|
1583 |
+
</color>
|
1584 |
+
<color value="#660066">
|
1585 |
+
<item language="en_GB|en_US|en_CA|en_AU">Plum</item>
|
1586 |
+
<item language="ru_RU">Сливовый</item>
|
1587 |
+
<item language="uk_UA">Сливовий</item>
|
1588 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Ciruela</item>
|
1589 |
+
<item language="pt_PT|pt_BR">Ameixa</item>
|
1590 |
+
<item language="de_DE">Pflaume</item>
|
1591 |
+
<item language="fr_FR|fr_CA">Prune</item>
|
1592 |
+
<item language="nl_NL">Pruim</item>
|
1593 |
+
</color>
|
1594 |
+
<color value="#003399">
|
1595 |
+
<item language="en_GB|en_US|en_CA|en_AU">Powder blue</item>
|
1596 |
+
<item language="ru_RU">Пороховая синь</item>
|
1597 |
+
<item language="uk_UA">Порохова синь</item>
|
1598 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul pálido</item>
|
1599 |
+
<item language="pt_PT|pt_BR">Pó azul</item>
|
1600 |
+
<item language="de_DE">Powderblue</item>
|
1601 |
+
<item language="fr_FR|fr_CA">Bleu pastel</item>
|
1602 |
+
<item language="nl_NL">Blauwsel</item>
|
1603 |
+
</color>
|
1604 |
+
<color value="#CC8899">
|
1605 |
+
<item language="en_GB|en_US|en_CA|en_AU">Puce</item>
|
1606 |
+
<item language="ru_RU">Красновато-коричневый|пюсовый|темно-коричневый|блошиный</item>
|
1607 |
+
<item language="uk_UA">Червонувато-коричневий|пюсовий|темно-коричневий|блошиний</item>
|
1608 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Puce</item>
|
1609 |
+
<item language="pt_PT|pt_BR">Puce</item>
|
1610 |
+
<item language="de_DE">Puce</item>
|
1611 |
+
<item language="fr_FR|fr_CA">Puce</item>
|
1612 |
+
<item language="nl_NL">Spaan</item>
|
1613 |
+
</color>
|
1614 |
+
<color value="#003153">
|
1615 |
+
<item language="en_GB|en_US|en_CA|en_AU">Prussian blue</item>
|
1616 |
+
<item language="ru_RU">Берлинская лазурь</item>
|
1617 |
+
<item language="uk_UA">Берлінська лазур</item>
|
1618 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul de Prusia</item>
|
1619 |
+
<item language="pt_PT|pt_BR">Azul da Prússia</item>
|
1620 |
+
<item language="de_DE">Preußisch Blau</item>
|
1621 |
+
<item language="fr_FR|fr_CA">Le bleu de Prusse</item>
|
1622 |
+
<item language="nl_NL">Pruisisch-blauw</item>
|
1623 |
+
</color>
|
1624 |
+
<color value="#FF7518">
|
1625 |
+
<item language="en_GB|en_US|en_CA|en_AU">Pumpkin</item>
|
1626 |
+
<item language="ru_RU">Тыква</item>
|
1627 |
+
<item language="uk_UA">Гарбуз</item>
|
1628 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Calabaza</item>
|
1629 |
+
<item language="pt_PT|pt_BR">Abóbora</item>
|
1630 |
+
<item language="de_DE">Kürbis</item>
|
1631 |
+
<item language="fr_FR|fr_CA">Citrouille</item>
|
1632 |
+
<item language="nl_NL">Pompoen</item>
|
1633 |
+
</color>
|
1634 |
+
<color value="#660099">
|
1635 |
+
<item language="en_GB|en_US|en_CA|en_AU">Purple</item>
|
1636 |
+
<item language="ru_RU">Фиолетовый</item>
|
1637 |
+
<item language="uk_UA">Фіолетовий</item>
|
1638 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Púrpura</item>
|
1639 |
+
<item language="pt_PT|pt_BR">Roxo</item>
|
1640 |
+
<item language="de_DE">Lila</item>
|
1641 |
+
<item language="fr_FR|fr_CA">Violet</item>
|
1642 |
+
<item language="nl_NL">Purperen</item>
|
1643 |
+
</color>
|
1644 |
+
<color value="#734A12">
|
1645 |
+
<item language="en_GB|en_US|en_CA|en_AU">Raw umber</item>
|
1646 |
+
<item language="ru_RU">Умбра</item>
|
1647 |
+
<item language="uk_UA">Умбра</item>
|
1648 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Raw Umber</item>
|
1649 |
+
<item language="pt_PT|pt_BR">Raw Umber</item>
|
1650 |
+
<item language="de_DE">Umbra</item>
|
1651 |
+
<item language="fr_FR|fr_CA">Terre d'ombre naturelle</item>
|
1652 |
+
<item language="nl_NL">Raw umber</item>
|
1653 |
+
</color>
|
1654 |
+
<color value="#FF0000">
|
1655 |
+
<item language="en_GB|en_US|en_CA|en_AU">Red</item>
|
1656 |
+
<item language="ru_RU">Красный</item>
|
1657 |
+
<item language="uk_UA">Червоний</item>
|
1658 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rojo</item>
|
1659 |
+
<item language="pt_PT|pt_BR">Vermelho</item>
|
1660 |
+
<item language="de_DE">Netzwerk</item>
|
1661 |
+
<item language="fr_FR|fr_CA">Rouge</item>
|
1662 |
+
<item language="nl_NL">Rood</item>
|
1663 |
+
</color>
|
1664 |
+
<color value="#C71585">
|
1665 |
+
<item language="en_GB|en_US|en_CA|en_AU">Red-violet</item>
|
1666 |
+
<item language="ru_RU">Фиолетово-красный</item>
|
1667 |
+
<item language="uk_UA">Фіолетово-червоний</item>
|
1668 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rojo-violeta</item>
|
1669 |
+
<item language="pt_PT|pt_BR">Vermelho-violeta</item>
|
1670 |
+
<item language="de_DE">Rot-violett</item>
|
1671 |
+
<item language="fr_FR|fr_CA">Rouge-violet</item>
|
1672 |
+
<item language="nl_NL">Rood-violet</item>
|
1673 |
+
</color>
|
1674 |
+
<color value="#00CCCC">
|
1675 |
+
<item language="en_GB|en_US|en_CA|en_AU">Robin egg blue</item>
|
1676 |
+
<item language="ru_RU">Цвет яйца дрозда</item>
|
1677 |
+
<item language="uk_UA">Колір яйця дрозда</item>
|
1678 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Robin huevo azul</item>
|
1679 |
+
<item language="pt_PT|pt_BR">Robin ovo azul</item>
|
1680 |
+
<item language="de_DE">Robin Egg Blue</item>
|
1681 |
+
<item language="fr_FR|fr_CA">Robin oeuf bleu</item>
|
1682 |
+
<item language="nl_NL">Robin ei blauw</item>
|
1683 |
+
</color>
|
1684 |
+
<color value="#4169E1">
|
1685 |
+
<item language="en_GB|en_US|en_CA|en_AU">Royal Blue</item>
|
1686 |
+
<item language="ru_RU">Ярко-синий|королевский синий</item>
|
1687 |
+
<item language="uk_UA">Яскраво-синій|королівський синій</item>
|
1688 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Royal Blue</item>
|
1689 |
+
<item language="pt_PT|pt_BR">Royal Blue</item>
|
1690 |
+
<item language="de_DE">Royal Blue|Königsblau</item>
|
1691 |
+
<item language="fr_FR|fr_CA">Bleu Royal</item>
|
1692 |
+
<item language="nl_NL">Royal Blue</item>
|
1693 |
+
</color>
|
1694 |
+
<color value="#755A57">
|
1695 |
+
<item language="en_GB|en_US|en_CA|en_AU">Russet</item>
|
1696 |
+
<item language="ru_RU">Красновато-коричневый</item>
|
1697 |
+
<item language="uk_UA">Червонувато-коричневий</item>
|
1698 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bermejo</item>
|
1699 |
+
<item language="pt_PT|pt_BR">Castanho-avermelhado</item>
|
1700 |
+
<item language="de_DE">Rostbraun</item>
|
1701 |
+
<item language="fr_FR|fr_CA">Brun roux</item>
|
1702 |
+
<item language="nl_NL">Roodbruin</item>
|
1703 |
+
</color>
|
1704 |
+
<color value="#B7410E">
|
1705 |
+
<item language="en_GB|en_US|en_CA|en_AU">Rust</item>
|
1706 |
+
<item language="ru_RU">Ржаво-коричневый</item>
|
1707 |
+
<item language="uk_UA">Іржаво-коричневий</item>
|
1708 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Herrumbre</item>
|
1709 |
+
<item language="pt_PT|pt_BR">Ferrugem</item>
|
1710 |
+
<item language="de_DE">Rost</item>
|
1711 |
+
<item language="fr_FR|fr_CA">Rouille</item>
|
1712 |
+
<item language="nl_NL">Roest</item>
|
1713 |
+
</color>
|
1714 |
+
<color value="#BC8F8F">
|
1715 |
+
<item language="en_GB|en_US|en_CA|en_AU">Rosy Brown</item>
|
1716 |
+
<item language="ru_RU">Розово-коричневый</item>
|
1717 |
+
<item language="uk_UA">Рожево-коричневий</item>
|
1718 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Rosy Brown|rosa y marrón</item>
|
1719 |
+
<item language="pt_PT|pt_BR">Brown Rosy|rosa e marrom</item>
|
1720 |
+
<item language="de_DE">Rosy Brown</item>
|
1721 |
+
<item language="fr_FR|fr_CA">Rosy Brown</item>
|
1722 |
+
<item language="nl_NL">Rosy Brown</item>
|
1723 |
+
</color>
|
1724 |
+
<color value="#F4C430">
|
1725 |
+
<item language="en_GB|en_US|en_CA|en_AU">Saffron</item>
|
1726 |
+
<item language="ru_RU">Шафрановый</item>
|
1727 |
+
<item language="uk_UA">Шафрановий</item>
|
1728 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azafrán</item>
|
1729 |
+
<item language="pt_PT|pt_BR">Açafrão</item>
|
1730 |
+
<item language="de_DE">Safran</item>
|
1731 |
+
<item language="fr_FR|fr_CA">Safran</item>
|
1732 |
+
<item language="nl_NL">Saffraan</item>
|
1733 |
+
</color>
|
1734 |
+
<color value="#082567">
|
1735 |
+
<item language="en_GB|en_US|en_CA|en_AU">Sapphire</item>
|
1736 |
+
<item language="ru_RU">Сапфировый</item>
|
1737 |
+
<item language="uk_UA">Сапфіровий</item>
|
1738 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Zafiro</item>
|
1739 |
+
<item language="pt_PT|pt_BR">Safira</item>
|
1740 |
+
<item language="de_DE">Saphir</item>
|
1741 |
+
<item language="fr_FR|fr_CA">Saphir</item>
|
1742 |
+
<item language="nl_NL">Saffier</item>
|
1743 |
+
</color>
|
1744 |
+
<color value="#FF8C69">
|
1745 |
+
<item language="en_GB|en_US|en_CA|en_AU">Salmon</item>
|
1746 |
+
<item language="ru_RU">Лососевый</item>
|
1747 |
+
<item language="uk_UA">Лососевий</item>
|
1748 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Salmón</item>
|
1749 |
+
<item language="pt_PT|pt_BR">Salmão</item>
|
1750 |
+
<item language="de_DE">Lachs</item>
|
1751 |
+
<item language="fr_FR|fr_CA">Saumon</item>
|
1752 |
+
<item language="nl_NL">Zalm</item>
|
1753 |
+
</color>
|
1754 |
+
<color value="#F4A460">
|
1755 |
+
<item language="en_GB|en_US|en_CA|en_AU">Sandy brown</item>
|
1756 |
+
<item language="ru_RU">Песочный цвет</item>
|
1757 |
+
<item language="uk_UA">Пісочний колір</item>
|
1758 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Sandy brown|Arena marrón</item>
|
1759 |
+
<item language="pt_PT|pt_BR">Sandy marrom</item>
|
1760 |
+
<item language="de_DE">Sandy Brown</item>
|
1761 |
+
<item language="fr_FR|fr_CA">Brun sable</item>
|
1762 |
+
<item language="nl_NL">Sandy bruin</item>
|
1763 |
+
</color>
|
1764 |
+
<color value="#92000A">
|
1765 |
+
<item language="en_GB|en_US|en_CA|en_AU">Sangria</item>
|
1766 |
+
<item language="ru_RU">Сангрия</item>
|
1767 |
+
<item language="uk_UA">Сангрія</item>
|
1768 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Sangría</item>
|
1769 |
+
<item language="pt_PT|pt_BR">Sangria</item>
|
1770 |
+
<item language="de_DE">Sangria</item>
|
1771 |
+
<item language="fr_FR|fr_CA">Sangria</item>
|
1772 |
+
<item language="nl_NL">Sangria</item>
|
1773 |
+
</color>
|
1774 |
+
<color value="#FF2400">
|
1775 |
+
<item language="en_GB|en_US|en_CA|en_AU">Scarlet</item>
|
1776 |
+
<item language="ru_RU">Ярко-красный|алый</item>
|
1777 |
+
<item language="uk_UA">Яскраво-червоний|червоний</item>
|
1778 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Escarlata</item>
|
1779 |
+
<item language="pt_PT|pt_BR">Escarlate</item>
|
1780 |
+
<item language="de_DE">Scharlach</item>
|
1781 |
+
<item language="fr_FR|fr_CA">Écarlate</item>
|
1782 |
+
<item language="nl_NL">Scharlaken</item>
|
1783 |
+
</color>
|
1784 |
+
<color value="#FFD800">
|
1785 |
+
<item language="en_GB|en_US|en_CA|en_AU">School bus yellow</item>
|
1786 |
+
<item language="ru_RU">Цвет желтого школьного автобуса</item>
|
1787 |
+
<item language="uk_UA">Колір жовтого шкільного автобуса</item>
|
1788 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Autobús escolar amarillo</item>
|
1789 |
+
<item language="pt_PT|pt_BR">Ônibus escolar amarelo</item>
|
1790 |
+
<item language="de_DE">Schulbus gelb</item>
|
1791 |
+
<item language="fr_FR|fr_CA">D'autobus scolaire jaune</item>
|
1792 |
+
<item language="nl_NL">Schoolbus geel</item>
|
1793 |
+
</color>
|
1794 |
+
<color value="#2E8B57">
|
1795 |
+
<item language="en_GB|en_US|en_CA|en_AU">Sea Green</item>
|
1796 |
+
<item language="ru_RU">Зеленое море</item>
|
1797 |
+
<item language="uk_UA">Зелене море</item>
|
1798 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Sea Green</item>
|
1799 |
+
<item language="pt_PT|pt_BR">Mar verde</item>
|
1800 |
+
<item language="de_DE">Be Green</item>
|
1801 |
+
<item language="fr_FR|fr_CA">Sea Green</item>
|
1802 |
+
<item language="nl_NL">Sea Green</item>
|
1803 |
+
</color>
|
1804 |
+
<color value="#FFF5EE">
|
1805 |
+
<item language="en_GB|en_US|en_CA|en_AU">Seashell</item>
|
1806 |
+
<item language="ru_RU">Цвет морской пены</item>
|
1807 |
+
<item language="uk_UA">Колір морської піни</item>
|
1808 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Concha</item>
|
1809 |
+
<item language="pt_PT|pt_BR">Concha</item>
|
1810 |
+
<item language="de_DE">Muschel</item>
|
1811 |
+
<item language="fr_FR|fr_CA">Seashell</item>
|
1812 |
+
<item language="nl_NL">Zeeschelp</item>
|
1813 |
+
</color>
|
1814 |
+
<color value="#FFBA00">
|
1815 |
+
<item language="en_GB|en_US|en_CA|en_AU">Selective yellow</item>
|
1816 |
+
<item language="ru_RU">Отборный желтый</item>
|
1817 |
+
<item language="uk_UA">Добірний жовтий</item>
|
1818 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Amarillo selectivo</item>
|
1819 |
+
<item language="pt_PT|pt_BR">Amarela seletiva</item>
|
1820 |
+
<item language="de_DE">Selektive gelb</item>
|
1821 |
+
<item language="fr_FR|fr_CA">Jaune sélectif</item>
|
1822 |
+
<item language="nl_NL">Selectief geel</item>
|
1823 |
+
</color>
|
1824 |
+
<color value="#704214">
|
1825 |
+
<item language="en_GB|en_US|en_CA|en_AU">Sepia</item>
|
1826 |
+
<item language="ru_RU">Сепия</item>
|
1827 |
+
<item language="uk_UA">Сепія</item>
|
1828 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Sepia</item>
|
1829 |
+
<item language="pt_PT|pt_BR">Sépia</item>
|
1830 |
+
<item language="de_DE">Sepia</item>
|
1831 |
+
<item language="fr_FR|fr_CA">Sépia</item>
|
1832 |
+
<item language="nl_NL">Sepia</item>
|
1833 |
+
</color>
|
1834 |
+
<color value="#C0C0C0">
|
1835 |
+
<item language="en_GB|en_US|en_CA|en_AU">Silver</item>
|
1836 |
+
<item language="ru_RU">Серебряный</item>
|
1837 |
+
<item language="uk_UA">Срібний</item>
|
1838 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Plata</item>
|
1839 |
+
<item language="pt_PT|pt_BR">Prata</item>
|
1840 |
+
<item language="de_DE">Silber</item>
|
1841 |
+
<item language="fr_FR|fr_CA">Argent</item>
|
1842 |
+
<item language="nl_NL">Zilver</item>
|
1843 |
+
</color>
|
1844 |
+
<color value="#708090">
|
1845 |
+
<item language="en_GB|en_US|en_CA|en_AU">Slate gray</item>
|
1846 |
+
<item language="ru_RU">Серый шифер</item>
|
1847 |
+
<item language="uk_UA">Сірий шифер</item>
|
1848 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pizarra gris</item>
|
1849 |
+
<item language="pt_PT|pt_BR">Ardósia cinza</item>
|
1850 |
+
<item language="de_DE">Schiefergrau</item>
|
1851 |
+
<item language="fr_FR|fr_CA">Gris ardoise</item>
|
1852 |
+
<item language="nl_NL">Leigrijs</item>
|
1853 |
+
</color>
|
1854 |
+
<color value="#FFFAFA">
|
1855 |
+
<item language="en_GB|en_US|en_CA|en_AU">Snow</item>
|
1856 |
+
<item language="ru_RU">Белоснежный|Снег</item>
|
1857 |
+
<item language="uk_UA">Білосніжний|Сніг</item>
|
1858 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Nieve</item>
|
1859 |
+
<item language="pt_PT|pt_BR">Neve</item>
|
1860 |
+
<item language="de_DE">Schnee</item>
|
1861 |
+
<item language="fr_FR|fr_CA">Neige</item>
|
1862 |
+
<item language="nl_NL">Sneeuw</item>
|
1863 |
+
</color>
|
1864 |
+
<color value="#00FF7F">
|
1865 |
+
<item language="en_GB|en_US|en_CA|en_AU">Spring Green</item>
|
1866 |
+
<item language="ru_RU">Зеленая весна</item>
|
1867 |
+
<item language="uk_UA">Зелена весна</item>
|
1868 |
+
<item language="es_MX|es_ES|es_AR|es_CO">verde primavera</item>
|
1869 |
+
<item language="pt_PT|pt_BR">Spring Green|verde primavera</item>
|
1870 |
+
<item language="de_DE">Spring Green|Frühlingsgrün</item>
|
1871 |
+
<item language="fr_FR|fr_CA">Spring Green</item>
|
1872 |
+
<item language="nl_NL">Spring Green</item>
|
1873 |
+
</color>
|
1874 |
+
<color value="#4682B4">
|
1875 |
+
<item language="en_GB|en_US|en_CA|en_AU">Steel blue</item>
|
1876 |
+
<item language="ru_RU">Синяя сталь</item>
|
1877 |
+
<item language="uk_UA">Синя сталь</item>
|
1878 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul de Acero</item>
|
1879 |
+
<item language="pt_PT|pt_BR">Blue Steel</item>
|
1880 |
+
<item language="de_DE">Stahlblau</item>
|
1881 |
+
<item language="fr_FR|fr_CA">Bleu acier</item>
|
1882 |
+
<item language="nl_NL">Staalblauw</item>
|
1883 |
+
</color>
|
1884 |
+
<color value="#ACB78E">
|
1885 |
+
<item language="en_GB|en_US|en_CA|en_AU">Swamp green</item>
|
1886 |
+
<item language="ru_RU">Болотный</item>
|
1887 |
+
<item language="uk_UA">Болотний</item>
|
1888 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Pantano verde</item>
|
1889 |
+
<item language="pt_PT|pt_BR">Pântano verde</item>
|
1890 |
+
<item language="de_DE">Green Swamp</item>
|
1891 |
+
<item language="fr_FR|fr_CA">Marais vert</item>
|
1892 |
+
<item language="nl_NL">Swamp groene</item>
|
1893 |
+
</color>
|
1894 |
+
<color value="#D2B48C">
|
1895 |
+
<item language="en_GB|en_US|en_CA|en_AU">Tan</item>
|
1896 |
+
<item language="ru_RU">Цвет загара</item>
|
1897 |
+
<item language="uk_UA">Колір засмаги</item>
|
1898 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bronceado</item>
|
1899 |
+
<item language="pt_PT|pt_BR">Bronzeado</item>
|
1900 |
+
<item language="de_DE">So</item>
|
1901 |
+
<item language="fr_FR|fr_CA">Bronzage</item>
|
1902 |
+
<item language="nl_NL">Looien</item>
|
1903 |
+
</color>
|
1904 |
+
<color value="#CD5700">
|
1905 |
+
<item language="en_GB|en_US|en_CA|en_AU">Tenné</item>
|
1906 |
+
<item language="ru_RU">Краснобуро-оранжевый</item>
|
1907 |
+
<item language="uk_UA">Краснобуро-помаранчевий</item>
|
1908 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Tenne</item>
|
1909 |
+
<item language="pt_PT|pt_BR">Tenne</item>
|
1910 |
+
<item language="de_DE">Tenne</item>
|
1911 |
+
<item language="fr_FR|fr_CA">Tenne</item>
|
1912 |
+
<item language="nl_NL">Tenne</item>
|
1913 |
+
</color>
|
1914 |
+
<color value="#FFCC00">
|
1915 |
+
<item language="en_GB|en_US|en_CA|en_AU">Tangerine</item>
|
1916 |
+
<item language="ru_RU">Мандариновый</item>
|
1917 |
+
<item language="uk_UA">Мандариновий</item>
|
1918 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Mandarina</item>
|
1919 |
+
<item language="pt_PT|pt_BR">Tangerina</item>
|
1920 |
+
<item language="de_DE">Mandarine</item>
|
1921 |
+
<item language="fr_FR|fr_CA">Mandarine</item>
|
1922 |
+
<item language="nl_NL">Mandarijn</item>
|
1923 |
+
</color>
|
1924 |
+
<color value="#D0F0C0">
|
1925 |
+
<item language="en_GB|en_US|en_CA|en_AU">Tea Green</item>
|
1926 |
+
<item language="ru_RU">Зеленый чай</item>
|
1927 |
+
<item language="uk_UA">Зелений чай</item>
|
1928 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Té Verde</item>
|
1929 |
+
<item language="pt_PT|pt_BR">O chá verde</item>
|
1930 |
+
<item language="de_DE">Grüner Tee</item>
|
1931 |
+
<item language="fr_FR|fr_CA">Thé vert</item>
|
1932 |
+
<item language="nl_NL">Groene thee</item>
|
1933 |
+
</color>
|
1934 |
+
<color value="#008080">
|
1935 |
+
<item language="en_GB|en_US|en_CA|en_AU">Teal</item>
|
1936 |
+
<item language="ru_RU">Сине-зеленый</item>
|
1937 |
+
<item language="uk_UA">Синьо-зелений</item>
|
1938 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Teal</item>
|
1939 |
+
<item language="pt_PT|pt_BR">Marrequinho</item>
|
1940 |
+
<item language="de_DE">Teal</item>
|
1941 |
+
<item language="fr_FR|fr_CA">Sarcelle</item>
|
1942 |
+
<item language="nl_NL">Taling</item>
|
1943 |
+
</color>
|
1944 |
+
<color value="#D8BFD8">
|
1945 |
+
<item language="en_GB|en_US|en_CA|en_AU">Thistle</item>
|
1946 |
+
<item language="ru_RU">Чертополох</item>
|
1947 |
+
<item language="uk_UA">Чортополох</item>
|
1948 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Cardo</item>
|
1949 |
+
<item language="pt_PT|pt_BR">Cardo</item>
|
1950 |
+
<item language="de_DE">Distel</item>
|
1951 |
+
<item language="fr_FR|fr_CA">Chardon</item>
|
1952 |
+
<item language="nl_NL">Distel</item>
|
1953 |
+
</color>
|
1954 |
+
<color value="#30D5C8">
|
1955 |
+
<item language="en_GB|en_US|en_CA|en_AU">Turquoise</item>
|
1956 |
+
<item language="ru_RU">Бирюзовый|бирюза</item>
|
1957 |
+
<item language="uk_UA">Бірюзовий|бірюза</item>
|
1958 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Turquesa</item>
|
1959 |
+
<item language="pt_PT|pt_BR">Turquesa</item>
|
1960 |
+
<item language="de_DE">Türkis</item>
|
1961 |
+
<item language="fr_FR|fr_CA">Turquoise</item>
|
1962 |
+
<item language="nl_NL">Turkoois</item>
|
1963 |
+
</color>
|
1964 |
+
<color value="#d53e07">
|
1965 |
+
<item language="en_GB|en_US|en_CA|en_AU">Titian</item>
|
1966 |
+
<item language="ru_RU">Тициановый</item>
|
1967 |
+
<item language="uk_UA">Тіціановий</item>
|
1968 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Tiziano</item>
|
1969 |
+
<item language="pt_PT|pt_BR">Ticiano</item>
|
1970 |
+
<item language="de_DE">Tizian</item>
|
1971 |
+
<item language="fr_FR|fr_CA">Titien</item>
|
1972 |
+
<item language="nl_NL">Goudgeel</item>
|
1973 |
+
</color>
|
1974 |
+
<color value="#FF6347">
|
1975 |
+
<item language="en_GB|en_US|en_CA|en_AU">Tomato</item>
|
1976 |
+
<item language="ru_RU">Томатный</item>
|
1977 |
+
<item language="uk_UA">Томатний</item>
|
1978 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Tomate</item>
|
1979 |
+
<item language="pt_PT|pt_BR">Tomate</item>
|
1980 |
+
<item language="de_DE">Tomate</item>
|
1981 |
+
<item language="fr_FR|fr_CA">Tomate</item>
|
1982 |
+
<item language="nl_NL">Tomaat</item>
|
1983 |
+
</color>
|
1984 |
+
<color value="#120A8F">
|
1985 |
+
<item language="en_GB|en_US|en_CA|en_AU">Ultramarine</item>
|
1986 |
+
<item language="ru_RU">Ультрамариновый</item>
|
1987 |
+
<item language="uk_UA">Ультрамариновий</item>
|
1988 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Ultramarino</item>
|
1989 |
+
<item language="pt_PT|pt_BR">Ultramarino</item>
|
1990 |
+
<item language="de_DE">Ultramarin</item>
|
1991 |
+
<item language="fr_FR|fr_CA">Outremer</item>
|
1992 |
+
<item language="nl_NL">Ultramarijn</item>
|
1993 |
+
</color>
|
1994 |
+
<color value="#5B92E5">
|
1995 |
+
<item language="en_GB|en_US|en_CA|en_AU">United Nations Blue</item>
|
1996 |
+
<item language="ru_RU">Цвет флага ООН</item>
|
1997 |
+
<item language="uk_UA">Колір прапора ООН</item>
|
1998 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Azul de las Naciones Unidas</item>
|
1999 |
+
<item language="pt_PT|pt_BR">Nações Unidas Azul</item>
|
2000 |
+
<item language="de_DE">Vereinten Nationen Blau</item>
|
2001 |
+
<item language="fr_FR|fr_CA">Bleus des Nations Unies</item>
|
2002 |
+
<item language="nl_NL">Verenigde Naties Blauw</item>
|
2003 |
+
</color>
|
2004 |
+
<color value="#F3E5AB">
|
2005 |
+
<item language="en_GB|en_US|en_CA|en_AU">Vanilla</item>
|
2006 |
+
<item language="ru_RU">Ванильный</item>
|
2007 |
+
<item language="uk_UA">Ванільний</item>
|
2008 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Vainilla</item>
|
2009 |
+
<item language="pt_PT|pt_BR">Baunilha</item>
|
2010 |
+
<item language="de_DE">Vanille</item>
|
2011 |
+
<item language="fr_FR|fr_CA">Vanille</item>
|
2012 |
+
<item language="nl_NL">Vanille</item>
|
2013 |
+
</color>
|
2014 |
+
<color value="#E34234">
|
2015 |
+
<item language="en_GB|en_US|en_CA|en_AU">Vermilion</item>
|
2016 |
+
<item language="ru_RU">Киноварь</item>
|
2017 |
+
<item language="uk_UA">Кіновар</item>
|
2018 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Bermellón</item>
|
2019 |
+
<item language="pt_PT|pt_BR">Vermelhão</item>
|
2020 |
+
<item language="de_DE">Zinnober</item>
|
2021 |
+
<item language="fr_FR|fr_CA">Vermillon</item>
|
2022 |
+
<item language="nl_NL">Vermiljoen</item>
|
2023 |
+
</color>
|
2024 |
+
<color value="#8B00FF">
|
2025 |
+
<item language="en_GB|en_US|en_CA|en_AU">Violet</item>
|
2026 |
+
<item language="ru_RU">Фиолетовый</item>
|
2027 |
+
<item language="uk_UA">Фіолетовий</item>
|
2028 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Violeta</item>
|
2029 |
+
<item language="pt_PT|pt_BR">Violeta</item>
|
2030 |
+
<item language="de_DE">Violett</item>
|
2031 |
+
<item language="fr_FR|fr_CA">Violet</item>
|
2032 |
+
<item language="nl_NL">Purperen</item>
|
2033 |
+
</color>
|
2034 |
+
<color value="#991199">
|
2035 |
+
<item language="en_GB|en_US|en_CA|en_AU">Violet-eggplant</item>
|
2036 |
+
<item language="ru_RU">Фиолетово-баклажанный</item>
|
2037 |
+
<item language="uk_UA">Фіолетово-баклажановий</item>
|
2038 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Violeta-berenjena</item>
|
2039 |
+
<item language="pt_PT|pt_BR">Violeta de berinjela</item>
|
2040 |
+
<item language="de_DE">Violet-Auberginen</item>
|
2041 |
+
<item language="fr_FR|fr_CA">Violet-aubergine</item>
|
2042 |
+
<item language="nl_NL">Paars aubergine</item>
|
2043 |
+
</color>
|
2044 |
+
<color value="#40826D">
|
2045 |
+
<item language="en_GB|en_US|en_CA|en_AU">Viridian</item>
|
2046 |
+
<item language="ru_RU">Ядовито-зеленый</item>
|
2047 |
+
<item language="uk_UA">Отруйно-зелений</item>
|
2048 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Viridian</item>
|
2049 |
+
<item language="pt_PT|pt_BR">Viridian</item>
|
2050 |
+
<item language="de_DE">Viridian</item>
|
2051 |
+
<item language="fr_FR|fr_CA">Viridian</item>
|
2052 |
+
<item language="nl_NL">Viridian</item>
|
2053 |
+
</color>
|
2054 |
+
<color value="#F5DEB3">
|
2055 |
+
<item language="en_GB|en_US|en_CA|en_AU">Wheat</item>
|
2056 |
+
<item language="ru_RU">Пшеничный</item>
|
2057 |
+
<item language="uk_UA">Пшеничний</item>
|
2058 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Trigo</item>
|
2059 |
+
<item language="pt_PT|pt_BR">Trigo</item>
|
2060 |
+
<item language="de_DE">Weizen</item>
|
2061 |
+
<item language="fr_FR|fr_CA">Blé</item>
|
2062 |
+
<item language="nl_NL">Tarwe</item>
|
2063 |
+
</color>
|
2064 |
+
<color value="#FFFFFF">
|
2065 |
+
<item language="en_GB|en_US|en_CA|en_AU">White</item>
|
2066 |
+
<item language="ru_RU">Белый</item>
|
2067 |
+
<item language="uk_UA">Білий</item>
|
2068 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Blanco</item>
|
2069 |
+
<item language="pt_PT|pt_BR">Branco</item>
|
2070 |
+
<item language="de_DE">Weiß</item>
|
2071 |
+
<item language="fr_FR|fr_CA">Blanc</item>
|
2072 |
+
<item language="nl_NL">Wit</item>
|
2073 |
+
</color>
|
2074 |
+
<color value="#C9A0DC">
|
2075 |
+
<item language="en_GB|en_US|en_CA|en_AU">Wisteria</item>
|
2076 |
+
<item language="ru_RU">Глициния</item>
|
2077 |
+
<item language="uk_UA">Гліцинія</item>
|
2078 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Wisteria</item>
|
2079 |
+
<item language="pt_PT|pt_BR">Wisteria</item>
|
2080 |
+
<item language="de_DE">Wisteria</item>
|
2081 |
+
<item language="fr_FR|fr_CA">Wisteria</item>
|
2082 |
+
<item language="nl_NL">Wisteria</item>
|
2083 |
+
</color>
|
2084 |
+
<color value="#722F37">
|
2085 |
+
<item language="en_GB|en_US|en_CA|en_AU">Wine</item>
|
2086 |
+
<item language="ru_RU">Вино</item>
|
2087 |
+
<item language="uk_UA">Вино</item>
|
2088 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Vino</item>
|
2089 |
+
<item language="pt_PT|pt_BR">Vinho</item>
|
2090 |
+
<item language="de_DE">Wein</item>
|
2091 |
+
<item language="fr_FR|fr_CA">Vin</item>
|
2092 |
+
<item language="nl_NL">Wijn</item>
|
2093 |
+
</color>
|
2094 |
+
<color value="#FFFF00">
|
2095 |
+
<item language="en_GB|en_US|en_CA|en_AU">Yellow</item>
|
2096 |
+
<item language="ru_RU">Желтый</item>
|
2097 |
+
<item language="uk_UA">Жовтий</item>
|
2098 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Amarillo</item>
|
2099 |
+
<item language="pt_PT|pt_BR">Amarelo</item>
|
2100 |
+
<item language="de_DE">Gelb</item>
|
2101 |
+
<item language="fr_FR|fr_CA">Jaune</item>
|
2102 |
+
<item language="nl_NL">Geel</item>
|
2103 |
+
</color>
|
2104 |
+
<color value="#EBC2AF">
|
2105 |
+
<item language="en_GB|en_US|en_CA|en_AU">Zinnwaldite</item>
|
2106 |
+
<item language="ru_RU">Циннвальдит</item>
|
2107 |
+
<item language="uk_UA">Ціннвальдіт</item>
|
2108 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Zinnwaldita</item>
|
2109 |
+
<item language="pt_PT|pt_BR">Zinnwaldite</item>
|
2110 |
+
<item language="de_DE">Zinnwaldit</item>
|
2111 |
+
<item language="fr_FR|fr_CA">Zinnwaldite</item>
|
2112 |
+
<item language="nl_NL">Zinnwaldite</item>
|
2113 |
+
</color>
|
2114 |
+
<color value="#0014A8">
|
2115 |
+
<item language="en_GB|en_US|en_CA|en_AU">Zaffre</item>
|
2116 |
+
<item language="ru_RU">Кобальтовая синь</item>
|
2117 |
+
<item language="uk_UA">Кобальтова синь</item>
|
2118 |
+
<item language="es_MX|es_ES|es_AR|es_CO">Alazor</item>
|
2119 |
+
<item language="pt_PT|pt_BR">Safre</item>
|
2120 |
+
<item language="de_DE">Saflor</item>
|
2121 |
+
<item language="fr_FR|fr_CA">Safre</item>
|
2122 |
+
<item language="nl_NL">Zaffre</item>
|
2123 |
+
</color>
|
2124 |
+
</lib>
|
app/code/community/Tonbo/ColorPicker/etc/system.xml
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<sections>
|
25 |
+
<design>
|
26 |
+
<frontend_model>colorpicker/adminhtml_system_config_form</frontend_model>
|
27 |
+
<groups>
|
28 |
+
<colorpicker translate="label" module="colorpicker">
|
29 |
+
<label>Tonbo Color Picker</label>
|
30 |
+
<frontend_type>text</frontend_type>
|
31 |
+
<sort_order>800</sort_order>
|
32 |
+
<show_in_default>1</show_in_default>
|
33 |
+
<show_in_website>1</show_in_website>
|
34 |
+
<show_in_store>1</show_in_store>
|
35 |
+
<fields>
|
36 |
+
<is_active translate="label comment" module="colorpicker">
|
37 |
+
<label>Enable Tonbo Color Picker</label>
|
38 |
+
<frontend_type>select</frontend_type>
|
39 |
+
<config_path>colorpicker/is_active</config_path>
|
40 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
41 |
+
<comment><![CDATA[<a href="http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf" target="_blank">Download user manual</a>]]></comment>
|
42 |
+
<sort_order>10</sort_order>
|
43 |
+
<show_in_default>1</show_in_default>
|
44 |
+
<show_in_website>1</show_in_website>
|
45 |
+
<show_in_store>1</show_in_store>
|
46 |
+
</is_active>
|
47 |
+
<attribute_list translate="label" module="colorpicker">
|
48 |
+
<label>Select attributes which specify colors for store</label>
|
49 |
+
<frontend_type>attribute_list</frontend_type>
|
50 |
+
<config_path>colorpicker/attribute_list</config_path>
|
51 |
+
<source_model>colorpicker/adminhtml_allowedList</source_model>
|
52 |
+
<backend_model>colorpicker/adminhtml_listSave</backend_model>
|
53 |
+
<depends>
|
54 |
+
<is_active>1</is_active>
|
55 |
+
</depends>
|
56 |
+
<can_be_empty>0</can_be_empty>
|
57 |
+
<sort_order>20</sort_order>
|
58 |
+
<show_in_default>1</show_in_default>
|
59 |
+
<show_in_website>1</show_in_website>
|
60 |
+
<show_in_store>1</show_in_store>
|
61 |
+
</attribute_list>
|
62 |
+
<zoom_image translate="label" module="colorpicker">
|
63 |
+
<label>Display options</label>
|
64 |
+
<frontend_type>zoom_image</frontend_type>
|
65 |
+
<config_path>colorpicker/zoom_image</config_path>
|
66 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
67 |
+
<depends>
|
68 |
+
<is_active>1</is_active>
|
69 |
+
</depends>
|
70 |
+
<sort_order>30</sort_order>
|
71 |
+
<show_in_default>1</show_in_default>
|
72 |
+
<show_in_website>1</show_in_website>
|
73 |
+
<show_in_store>1</show_in_store>
|
74 |
+
</zoom_image>
|
75 |
+
</fields>
|
76 |
+
</colorpicker>
|
77 |
+
</groups>
|
78 |
+
</design>
|
79 |
+
</sections>
|
80 |
+
</config>
|
app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-data-upgrade-1.0.0.0-1.0.0.1.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Tonbo color picker data install
|
25 |
+
*/
|
26 |
+
/** @var $colorSourceModel Tonbo_ColorPicker_Model_Translate_Source_Color */
|
27 |
+
$colorSourceModel = Mage::getModel('colorpicker/translate_source_color');
|
28 |
+
Mage::getModel('colorpicker/translate_register', $colorSourceModel);
|
29 |
+
|
app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-data-upgrade-1.0.0.1-1.0.0.2.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Tonbo color picker data install
|
25 |
+
*/
|
26 |
+
/** @var $optionSourceModel Tonbo_ColorPicker_Model_Translate_Source_Option */
|
27 |
+
$optionSourceModel = Mage::getModel('colorpicker/translate_source_option');
|
28 |
+
Mage::getModel('colorpicker/translate_register', $optionSourceModel);
|
app/code/community/Tonbo/ColorPicker/sql/colorpicker_setup/mysql4-install-1.0.0.0.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Tonbo Inc
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
*
|
12 |
+
* DISCLAIMER
|
13 |
+
*
|
14 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
15 |
+
* versions in the future.
|
16 |
+
*
|
17 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
18 |
+
* @email info@tonboinc.com
|
19 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
20 |
+
*/
|
21 |
+
|
22 |
+
$installer = $this;
|
23 |
+
|
24 |
+
/* @var $installer Mage_Core_Model_Resource_Setup */
|
25 |
+
$installer->startSetup();
|
26 |
+
|
27 |
+
$installer->run("
|
28 |
+
CREATE TABLE IF NOT EXISTS `{$installer->getTable('colorpicker/value')}` (
|
29 |
+
`color_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Color Id',
|
30 |
+
`attribute_id` smallint(5) unsigned DEFAULT '0' COMMENT 'EAV Attribute Id',
|
31 |
+
`option_id` int(10) unsigned NOT NULL COMMENT 'EAV Option Id',
|
32 |
+
`color_value` varchar(255) DEFAULT NULL COMMENT 'Color Value',
|
33 |
+
`color_image` varchar(255) DEFAULT NULL COMMENT 'Color Image',
|
34 |
+
`color_type` smallint(5) unsigned DEFAULT '1' COMMENT 'Color Type (1 - css value, 2 - image path)',
|
35 |
+
PRIMARY KEY (`color_id`),
|
36 |
+
KEY `FK_EAV_ATTRIBUTE_ID` (`attribute_id`),
|
37 |
+
KEY `FK_EAV_OPTION_ID` (`option_id`),
|
38 |
+
UNIQUE KEY `UNQ_ATTRIBUTE_OPTION` (`attribute_id`, `option_id`),
|
39 |
+
CONSTRAINT `FK_EAV_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
40 |
+
CONSTRAINT `FK_EAV_OPTION_ID` FOREIGN KEY (`option_id`) REFERENCES `{$installer->getTable('eav_attribute_option')}` (`option_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
41 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT = 'Tonbo Color Picker';");
|
42 |
+
|
43 |
+
$installer->run("
|
44 |
+
CREATE TABLE IF NOT EXISTS `{$installer->getTable('colorpicker/translate')}` (
|
45 |
+
`translate_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Translate Value Id',
|
46 |
+
`translate_value` varchar(255) NOT NULL COMMENT 'Destination Translate Value',
|
47 |
+
`translate_type` smallint(5) unsigned NOT NULL COMMENT 'Translate Type (1 - color attribute, 2 - color option)',
|
48 |
+
PRIMARY KEY (`translate_id`),
|
49 |
+
UNIQUE KEY `UNQ_TRANSLATE` (`translate_value`)
|
50 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT = 'Tonbo Translate';");
|
51 |
+
|
52 |
+
$installer->run("
|
53 |
+
CREATE TABLE IF NOT EXISTS `{$installer->getTable('colorpicker/translation')}` (
|
54 |
+
`translation_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Translate Value Id',
|
55 |
+
`translate_id` int(10) unsigned NOT NULL COMMENT 'Translate Value Id',
|
56 |
+
`translation_value` varchar(255) NOT NULL COMMENT 'Translation Value',
|
57 |
+
`translation_language` varchar(255) NOT NULL COMMENT 'Translation Language',
|
58 |
+
PRIMARY KEY (`translation_id`),
|
59 |
+
CONSTRAINT `FK_TRANSLATE_ID` FOREIGN KEY (`translate_id`) REFERENCES `{$installer->getTable('colorpicker/translate')}` (`translate_id`) ON DELETE CASCADE ON UPDATE CASCADE
|
60 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci COMMENT = 'Tonbo Translation';");
|
61 |
+
|
62 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/colorpicker.xml
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<layout>
|
25 |
+
<adminhtml_tonbo_upload>
|
26 |
+
<block type="colorpicker/adminhtml_upload_form" name="root"/>
|
27 |
+
</adminhtml_tonbo_upload>
|
28 |
+
|
29 |
+
<adminhtml_tonbo_uploadform>
|
30 |
+
<block type="colorpicker/adminhtml_upload_form" name="root"/>
|
31 |
+
</adminhtml_tonbo_uploadform>
|
32 |
+
</layout>
|
app/design/adminhtml/default/default/template/tonbo_colorpicker/allowed_after.phtml
ADDED
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Adminhtml_System_Config_Form_Attribute_AllowedAfter */
|
7 |
+
?>
|
8 |
+
<div id="tonbo_colorpicker_wrapper" class="tonbo_colorpicker_wrapper">
|
9 |
+
<?php if ($this->getParentElement()->isAutoAssign()) : ?>
|
10 |
+
<span class="tonbo_colorpicker_assign_message"><?php echo $this->__('Attributes were assigned automatically') ?></span>
|
11 |
+
<?php endif; ?>
|
12 |
+
<ul id="<?php echo $this->getAllowedListId() ?>"
|
13 |
+
class="tonbo_colorpicker_attributes tonbo_colorpicker_attributes_system"
|
14 |
+
data-message="<?php echo $this->__('No Attribute Selected'); ?>">
|
15 |
+
<?php foreach ($this->getAllowedList() as $option) : ?>
|
16 |
+
<li id="list_element_<?php echo $this->escapeHtml($option['value']); ?>"
|
17 |
+
class="color_element options-new-attr"
|
18 |
+
title="<?php echo $this->__('Save Config to map this attribute'); ?>">
|
19 |
+
<?php echo $this->escapeHtml($option['label']); ?>
|
20 |
+
</li>
|
21 |
+
<?php endforeach; ?>
|
22 |
+
</ul>
|
23 |
+
<div class="tonbo_colorpicker_actions">
|
24 |
+
<a class="add_to_list"
|
25 |
+
title="<?php echo $this->__('Add attributes to the list'); ?>"
|
26 |
+
style="cursor:pointer"
|
27 |
+
onclick="selectorObj.addAttributeToList();"><?php echo htmlspecialchars('>>>'); ?></a>
|
28 |
+
<br />
|
29 |
+
<a class="remove_from_list"
|
30 |
+
title="<?php echo $this->__('Remove attributes from list'); ?>"
|
31 |
+
style="cursor:pointer" onclick="selectorObj.removeAttributeFromList();"><?php echo htmlspecialchars('<<<'); ?></a>
|
32 |
+
</div>
|
33 |
+
<ul id="<?php echo $this->getAssignedListId() ?>"
|
34 |
+
class="tonbo_colorpicker_attributes tonbo_colorpicker_attributes_assigned"
|
35 |
+
data-message="<?php echo $this->__('No Attribute Selected'); ?>">
|
36 |
+
<?php foreach ($this->getAssignedList() as $option) : ?>
|
37 |
+
<li id="<?php echo $this->getListElementPrefixId() . $this->escapeHtml($option['value']); ?>"
|
38 |
+
class="color_element <?php echo $this->getAttributeStatus($option['value']) ?>"
|
39 |
+
title="<?php echo $this->getAttributeStatus($option['value']) == 'options-detected' ? $this->__('This attribute has been successfully mapped') : $this->__('Some values of this attribute were not mapped. Click "Edit"-icon to manage this attribute.'); ?>">
|
40 |
+
<a id="attribute_url_<?php echo $option['value']; ?>"
|
41 |
+
class="tonbo_colorpicker_edit_button"
|
42 |
+
href="<?php echo $this->getOptionEditUrl($option['value']); ?>"
|
43 |
+
target="_blank"
|
44 |
+
title="<?php echo $this->__('Edit Attribute'); ?>"><?php echo $this->__('Edit'); ?></a>
|
45 |
+
<?php echo $this->escapeHtml($option['label']); ?>
|
46 |
+
</li>
|
47 |
+
<?php endforeach; ?>
|
48 |
+
</ul>
|
49 |
+
<script type="text/javascript">
|
50 |
+
AttributeSlector = Class.create();
|
51 |
+
AttributeSlector.prototype = {
|
52 |
+
allowedUlId: '<?php echo $this->getAllowedListId() ?>',
|
53 |
+
assignedUlId: '<?php echo $this->getAssignedListId() ?>',
|
54 |
+
mainElementId: '<?php echo $this->getHtmlId() ?>',
|
55 |
+
listElementPrefix: '<?php echo $this->getListElementPrefixId() ?>',
|
56 |
+
scopeElement: null,
|
57 |
+
elementDisabledClass: 'tonbo_colorpicker_wrapper-disabled',
|
58 |
+
wrapperId: 'tonbo_colorpicker_wrapper',
|
59 |
+
initialize: function() {
|
60 |
+
this.scopeElement = this.mainElementId + '_inherit';
|
61 |
+
document.observe("dom:loaded", function() {
|
62 |
+
if ($(this.scopeElement)) {
|
63 |
+
$(this.scopeElement).observe('click', function() {
|
64 |
+
$(this.wrapperId).toggleClassName(this.elementDisabledClass);
|
65 |
+
}.bind(this));
|
66 |
+
if ($(this.scopeElement).checked) {
|
67 |
+
$(this.wrapperId).addClassName(this.elementDisabledClass);
|
68 |
+
}
|
69 |
+
}
|
70 |
+
$$('li.color_element').invoke('observe', 'click', function (event) {
|
71 |
+
this.onClickLi(event);
|
72 |
+
}.bind(this));
|
73 |
+
}.bind(this));
|
74 |
+
},
|
75 |
+
onClickLi : function(event) {
|
76 |
+
var element = Event.element(event);
|
77 |
+
if (!element.hasClassName('selected')) {
|
78 |
+
this.setSelectedData(element);
|
79 |
+
} else {
|
80 |
+
this.unsetSelectedData(element);
|
81 |
+
}
|
82 |
+
},
|
83 |
+
setSelectedData : function(element) {
|
84 |
+
element.addClassName('selected');
|
85 |
+
element.selectedForMove = true;
|
86 |
+
},
|
87 |
+
unsetSelectedData : function (element) {
|
88 |
+
element.removeClassName('selected');
|
89 |
+
element.selectedForMove = false;
|
90 |
+
},
|
91 |
+
addAttributeToList : function() {
|
92 |
+
this.moveSelectedElements(this.allowedUlId, this.assignedUlId, true);
|
93 |
+
},
|
94 |
+
removeAttributeFromList : function() {
|
95 |
+
this.moveSelectedElements(this.assignedUlId, this.allowedUlId, false);
|
96 |
+
},
|
97 |
+
moveSelectedElements : function(source, destination, isAdded) {
|
98 |
+
var children = $(source).childElements();
|
99 |
+
if (children.length) {
|
100 |
+
$(source).childElements().each(
|
101 |
+
function (element) {
|
102 |
+
if (element.selectedForMove == true) {
|
103 |
+
element.remove();
|
104 |
+
var elementValue = this.getElementId(element, this.listElementPrefix);
|
105 |
+
this.updateMainSelect(elementValue, isAdded);
|
106 |
+
this.unsetSelectedData(element);
|
107 |
+
this.insertLiElement(destination, element, elementValue);
|
108 |
+
this.displayLink(elementValue);
|
109 |
+
}
|
110 |
+
}.bind(this));
|
111 |
+
}
|
112 |
+
},
|
113 |
+
displayLink : function(editLinkId) {
|
114 |
+
var detectActionLink = 'update_status_' + editLinkId;
|
115 |
+
editLinkId = 'attribute_url_' + editLinkId;
|
116 |
+
if ($(editLinkId) && $(editLinkId).visible()) {
|
117 |
+
$(editLinkId, detectActionLink).invoke('hide');
|
118 |
+
} else {
|
119 |
+
$(editLinkId, detectActionLink).invoke('show');
|
120 |
+
}
|
121 |
+
},
|
122 |
+
getElementId : function(element, prefix) {
|
123 |
+
return element.readAttribute('id').sub(prefix, '');
|
124 |
+
},
|
125 |
+
updateMainSelect : function(elementValue, updateTo) {
|
126 |
+
$$('#' + this.mainElementId + ' option').each(function(element) {
|
127 |
+
if (element.value == elementValue) {
|
128 |
+
element.selected = updateTo;
|
129 |
+
}
|
130 |
+
}.bind(this));
|
131 |
+
},
|
132 |
+
insertLiElement : function(destination, element, elementValue) {
|
133 |
+
var previewElement = [];
|
134 |
+
var elementDetected = false;
|
135 |
+
$$('#' + this.mainElementId + ' option').each(function (element) {
|
136 |
+
var idToSelect = '#' + destination + ' li#' + this.listElementPrefix + element.value;
|
137 |
+
if (element.value == elementValue || elementDetected) {
|
138 |
+
elementDetected = true;
|
139 |
+
return;
|
140 |
+
}
|
141 |
+
if ($$(idToSelect).length) {
|
142 |
+
previewElement.push(this.listElementPrefix + element.value);
|
143 |
+
}
|
144 |
+
}.bind(this));
|
145 |
+
if (previewElement.length) {
|
146 |
+
var idToInsert = previewElement.pop();
|
147 |
+
$(idToInsert).insert({after: element});
|
148 |
+
} else {
|
149 |
+
$(destination).insert({top: element});
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
/**
|
154 |
+
* Extend functions with ability to bind context
|
155 |
+
*/
|
156 |
+
Function.prototype.bind = function(scope) {
|
157 |
+
var fn = this;
|
158 |
+
return function() {
|
159 |
+
return fn.apply(scope, arguments);
|
160 |
+
};
|
161 |
+
};
|
162 |
+
selectorObj = new AttributeSlector;
|
163 |
+
</script>
|
164 |
+
</div>
|
app/design/adminhtml/default/default/template/tonbo_colorpicker/color_picker.phtml
ADDED
@@ -0,0 +1,432 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Mage_Core_Block_Template */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
/**
|
10 |
+
* Color Picker
|
11 |
+
*
|
12 |
+
* @see Mage_Core_Block_Template
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
<div class="tcp-popup cf" id="tcp-popup" style="display: none;">
|
16 |
+
<div class="tcp-popup-close-btn" onclick="tonboColorPicker.closeColorPicker();" title="<?php echo $this->__('Close') ?>"><?php echo $this->__('Close') ?></div>
|
17 |
+
<div id="color_picker_delete" class="tcp-popup-delete-img" onclick="tonboColorPicker.deleteImage();"><?php echo $this->__('Delete Image') ?></div>
|
18 |
+
<div class="tcp-popup-file_upload-wrapper">
|
19 |
+
<div id="color_picker_image" class="tcp-popup-file_upload" onclick="tonboColorPicker.initUploadForm();"></div>
|
20 |
+
<div class="tcp-popup-file_upload-actions">
|
21 |
+
<a href="#" onclick="tonboColorPicker.initUploadForm(); return false;" class="action"><?php echo $this->__('Upload Image'); ?></a>
|
22 |
+
<?php echo $this->__('for this attribute'); ?>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
<div class="tcp-popup-wrapper">
|
26 |
+
<table id="cp1">
|
27 |
+
<tr>
|
28 |
+
<td valign="top">
|
29 |
+
<div id="cp1_ColorMap"></div>
|
30 |
+
</td>
|
31 |
+
<td valign="top">
|
32 |
+
<div id="cp1_ColorBar"></div>
|
33 |
+
</td>
|
34 |
+
<td valign="top">
|
35 |
+
<table>
|
36 |
+
<tr>
|
37 |
+
<td colspan="3">
|
38 |
+
<div id="cp1_Preview" style="background-color: #fff; width: 60px; height: 60px; padding: 0; margin: 0 0 5px; border: solid 1px #000;">
|
39 |
+
<br />
|
40 |
+
</div>
|
41 |
+
</td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td>
|
45 |
+
<input type="radio" id="cp1_HueRadio" name="cp1_Mode" value="0" />
|
46 |
+
</td>
|
47 |
+
<td>
|
48 |
+
<label style="margin: 0 5px" for="cp1_HueRadio">H:</label>
|
49 |
+
</td>
|
50 |
+
<td>
|
51 |
+
<input type="text" id="cp1_Hue" value="0" style="width: 40px;" /> °
|
52 |
+
</td>
|
53 |
+
</tr>
|
54 |
+
<tr>
|
55 |
+
<td>
|
56 |
+
<input type="radio" id="cp1_SaturationRadio" name="cp1_Mode" value="1" />
|
57 |
+
</td>
|
58 |
+
<td>
|
59 |
+
<label style="margin: 0 5px" for="cp1_SaturationRadio">S:</label>
|
60 |
+
</td>
|
61 |
+
<td>
|
62 |
+
<input type="text" id="cp1_Saturation" value="100" style="width: 40px;" /> %
|
63 |
+
</td>
|
64 |
+
</tr>
|
65 |
+
<tr>
|
66 |
+
<td>
|
67 |
+
<input type="radio" id="cp1_BrightnessRadio" name="cp1_Mode" value="2" />
|
68 |
+
</td>
|
69 |
+
<td>
|
70 |
+
<label style="margin: 0 5px" for="cp1_BrightnessRadio">B:</label>
|
71 |
+
</td>
|
72 |
+
<td>
|
73 |
+
<input type="text" id="cp1_Brightness" value="100" style="width: 40px;" /> %
|
74 |
+
</td>
|
75 |
+
</tr>
|
76 |
+
<tr>
|
77 |
+
<td colspan="3" height="5"></td>
|
78 |
+
</tr>
|
79 |
+
<tr>
|
80 |
+
<td>
|
81 |
+
<input type="radio" id="cp1_RedRadio" name="cp1_Mode" value="r" />
|
82 |
+
</td>
|
83 |
+
<td>
|
84 |
+
<label style="margin: 0 5px" for="cp1_RedRadio">R:</label>
|
85 |
+
</td>
|
86 |
+
<td>
|
87 |
+
<input type="text" id="cp1_Red" value="255" style="width: 40px;" />
|
88 |
+
</td>
|
89 |
+
</tr>
|
90 |
+
<tr>
|
91 |
+
<td>
|
92 |
+
<input type="radio" id="cp1_GreenRadio" name="cp1_Mode" value="g" />
|
93 |
+
</td>
|
94 |
+
<td>
|
95 |
+
<label style="margin: 0 5px" for="cp1_GreenRadio">G:</label>
|
96 |
+
</td>
|
97 |
+
<td>
|
98 |
+
<input type="text" id="cp1_Green" value="0" style="width: 40px;" />
|
99 |
+
</td>
|
100 |
+
</tr>
|
101 |
+
<tr>
|
102 |
+
<td>
|
103 |
+
<input type="radio" id="cp1_BlueRadio" name="cp1_Mode" value="b" />
|
104 |
+
</td>
|
105 |
+
<td>
|
106 |
+
<label style="margin: 0 5px" for="cp1_BlueRadio">B:</label>
|
107 |
+
</td>
|
108 |
+
<td>
|
109 |
+
<input type="text" id="cp1_Blue" value="0" style="width: 40px;" />
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td><label style="margin: 0 0 0 5px">#:</label></td>
|
114 |
+
<td colspan="2">
|
115 |
+
<input type="text" id="cp1_Hex" value="FF0000" style="margin: 0 0 0 4px; width: 60px;" />
|
116 |
+
</td>
|
117 |
+
</tr>
|
118 |
+
</table>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
</table>
|
122 |
+
<p><?php echo $this->__('*The system will display selected color if image is not specified.') ?></p>
|
123 |
+
</div>
|
124 |
+
<div style="display:none;">
|
125 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/rangearrows.gif') ?>" />
|
126 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/mappoint.gif') ?>" />
|
127 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-saturation.png') ?>" />
|
128 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-brightness.png') ?>" />
|
129 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-blue-tl.png') ?>" />
|
130 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-blue-tr.png') ?>" />
|
131 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-blue-bl.png') ?>" />
|
132 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-blue-br.png') ?>" />
|
133 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-red-tl.png') ?>" />
|
134 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-red-tr.png') ?>" />
|
135 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-red-bl.png') ?>" />
|
136 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-red-br.png') ?>" />
|
137 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-green-tl.png') ?>" />
|
138 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-green-tr.png') ?>" />
|
139 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-green-bl.png') ?>" />
|
140 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/bar-green-br.png') ?>" />
|
141 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-red-max.png') ?>" />
|
142 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-red-min.png') ?>" />
|
143 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-green-max.png') ?>" />
|
144 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-green-min.png') ?>" />
|
145 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-blue-max.png') ?>" />
|
146 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-blue-min.png') ?>" />
|
147 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-saturation.png') ?>" />
|
148 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-saturation-overlay.png') ?>" />
|
149 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-brightness.png') ?>" />
|
150 |
+
<img onDragStart="return false;" src="<?php echo $this->getSkinUrl('images/colorpicker/map-hue.png') ?>" />
|
151 |
+
</div>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<script type="text/javascript">
|
155 |
+
TonboColorPicker = Class.create();
|
156 |
+
TonboColorPicker.prototype = {
|
157 |
+
colorPickerContainerId: 'tcp-popup',
|
158 |
+
colorPickerId: 'cp1',
|
159 |
+
isInitialized: false,
|
160 |
+
elementPrefix: 'color_picker_',
|
161 |
+
colorSelector: null,
|
162 |
+
colorTypeValue: null,
|
163 |
+
colorTypeImage: null,
|
164 |
+
destinationInputValue: 'color_value_',
|
165 |
+
destinationInputImage: 'color_image_',
|
166 |
+
destinationInputType: 'color_type_',
|
167 |
+
currentElementId: null,
|
168 |
+
viewElement: null,
|
169 |
+
attributeId: null,
|
170 |
+
iframeId: 'image_color_uploader',
|
171 |
+
deleteBtn: 'color_picker_delete',
|
172 |
+
isNew: null,
|
173 |
+
colorPickerImage: 'color_picker_image',
|
174 |
+
defaultColorHex: 'ff0000',
|
175 |
+
fileSelectMessage: '<?php echo $this->__('Click to select file') ?>',
|
176 |
+
imageUrlPrefix: '<?php echo Mage::getModel('colorpicker/color_image')->getMediaUrl(); ?>',
|
177 |
+
initialize: function (colorTypeValue, colorTypeImage, attributeId) {
|
178 |
+
this.colorTypeValue = colorTypeValue;
|
179 |
+
this.colorTypeImage = colorTypeImage;
|
180 |
+
this.attributeId = attributeId;
|
181 |
+
Event.observe(document, 'click', this.hideColorPicker.bind(this));
|
182 |
+
this.colorSelector = new Refresh.Web.ColorPicker(
|
183 |
+
this.colorPickerId,
|
184 |
+
{startHex : this.defaultColorHex,
|
185 |
+
startMode : 's',
|
186 |
+
clientFilesPath : '<?php echo $this->getSkinUrl('images/colorpicker/'); ?>'}
|
187 |
+
);
|
188 |
+
},
|
189 |
+
getColorPicker: function (elementId, isNew) {
|
190 |
+
this.currentElementId = elementId;
|
191 |
+
this.isNew = isNew;
|
192 |
+
this.viewElement = $('color_view_' + this.currentElementId);
|
193 |
+
var position = $(this.elementPrefix + this.currentElementId).cumulativeOffset();
|
194 |
+
$(this.colorPickerContainerId).setStyle({
|
195 |
+
top: position.top - $(this.colorPickerContainerId).getHeight() + 'px',
|
196 |
+
left: position.left + 'px'
|
197 |
+
}).show();
|
198 |
+
this._updateFileInputOnInit();
|
199 |
+
},
|
200 |
+
detectColorValue: function(event, optionId, isNew) {
|
201 |
+
var element = Event.element(event);
|
202 |
+
var value = $(element).getValue();
|
203 |
+
if (value.length < 2 || $(this.destinationInputValue + optionId).getValue()
|
204 |
+
|| $(this.destinationInputImage + optionId).getValue()
|
205 |
+
) {
|
206 |
+
return;
|
207 |
+
}
|
208 |
+
this.currentElementId = optionId;
|
209 |
+
this.viewElement = $('color_view_' + this.currentElementId);
|
210 |
+
var self = this;
|
211 |
+
new Ajax.Request('<?php echo $this->getUrl('*/tonbo/detectOption'); ?>', {
|
212 |
+
parameters: {
|
213 |
+
value: value,
|
214 |
+
attribute_id: self.attributeId,
|
215 |
+
option_id: optionId,
|
216 |
+
is_new: isNew
|
217 |
+
},
|
218 |
+
onSuccess : function(transport) {
|
219 |
+
try {
|
220 |
+
var response = transport.responseText.evalJSON()
|
221 |
+
if (response.error) {
|
222 |
+
alert(response.error);
|
223 |
+
}
|
224 |
+
if (response.ajaxExpired && response.ajaxRedirect) {
|
225 |
+
setLocation(response.ajaxRedirect);
|
226 |
+
}
|
227 |
+
if (!response.success) {
|
228 |
+
alert('<?php echo $this->__('Error: Color was not detected') ?>');
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
if (!response.color) {
|
232 |
+
return;
|
233 |
+
}
|
234 |
+
self._setInputType(self.colorTypeValue);
|
235 |
+
self.updateColorInputValue(response.color)
|
236 |
+
} catch (e) {
|
237 |
+
alert(e.message);
|
238 |
+
}
|
239 |
+
}
|
240 |
+
});
|
241 |
+
},
|
242 |
+
_getInputValue: function() {
|
243 |
+
return $(this.destinationInputValue + this.currentElementId).getValue();
|
244 |
+
},
|
245 |
+
_setInputValue: function(value) {
|
246 |
+
return $(this.destinationInputValue + this.currentElementId).setValue(value);
|
247 |
+
},
|
248 |
+
_getInputImage: function() {
|
249 |
+
return $(this.destinationInputImage + this.currentElementId).getValue();
|
250 |
+
},
|
251 |
+
_setInputImage: function(value) {
|
252 |
+
return $(this.destinationInputImage + this.currentElementId).setValue(value);
|
253 |
+
},
|
254 |
+
_getInputType: function() {
|
255 |
+
return $(this.destinationInputType + this.currentElementId).getValue();
|
256 |
+
},
|
257 |
+
_setInputType: function(value) {
|
258 |
+
return $(this.destinationInputType + this.currentElementId).setValue(value);
|
259 |
+
},
|
260 |
+
_updateFileInputOnInit: function() {
|
261 |
+
var inputValue = this._getInputValue();
|
262 |
+
if (this._isColorTypeValue()) {
|
263 |
+
$(this.deleteBtn).hide();
|
264 |
+
this._removeChildrenAndInsertElement(
|
265 |
+
$(this.colorPickerImage),
|
266 |
+
'<span>' + this.fileSelectMessage + '</span>'
|
267 |
+
);
|
268 |
+
} else {
|
269 |
+
var imageUrl = this.imageUrlPrefix + '/' + this._getInputImage();
|
270 |
+
this._updateMainImage(this._prepareImage(imageUrl));
|
271 |
+
if (this._getInputImage()) {
|
272 |
+
$(this.deleteBtn).show();
|
273 |
+
} else {
|
274 |
+
$(this.deleteBtn).hide();
|
275 |
+
}
|
276 |
+
}
|
277 |
+
this.updateColorPicker(inputValue ? inputValue : this.defaultColorHex);
|
278 |
+
},
|
279 |
+
_isColorTypeValue: function () {
|
280 |
+
var result = false;
|
281 |
+
if (this._getInputType() == this.colorTypeValue) {
|
282 |
+
result = true;
|
283 |
+
}
|
284 |
+
return result;
|
285 |
+
},
|
286 |
+
updateColorPicker: function (hexValue) {
|
287 |
+
this.colorSelector.show();
|
288 |
+
this.colorSelector.setCustomHexValue(hexValue);
|
289 |
+
this.colorSelector.positionMapAndSliderArrows();
|
290 |
+
this.colorSelector.updateVisuals();
|
291 |
+
},
|
292 |
+
hideColorPicker: function(event) {
|
293 |
+
var element = Event.element(event);
|
294 |
+
|
295 |
+
if ($(element).descendantOf(this.colorPickerContainerId)
|
296 |
+
|| $(element).hasClassName('color-picker-created')
|
297 |
+
|| !$(this.colorPickerContainerId).visible()
|
298 |
+
|| element === $(this.elementPrefix + this.currentElementId)
|
299 |
+
|| $(element).descendantOf(this.elementPrefix + this.currentElementId)
|
300 |
+
|| element === document.body
|
301 |
+
) {
|
302 |
+
return;
|
303 |
+
}
|
304 |
+
|
305 |
+
this.closeColorPicker();
|
306 |
+
},
|
307 |
+
closeColorPicker: function() {
|
308 |
+
this.updateColorInputValue(this.colorSelector.getValueFromHex());
|
309 |
+
this.colorSelector.hide();
|
310 |
+
$(this.colorPickerContainerId).hide();
|
311 |
+
},
|
312 |
+
initUploadForm: function () {
|
313 |
+
if (this.isNew === '1') {
|
314 |
+
alert('<?php echo $this->__('Please save the attribute before uploading an image') ?>');
|
315 |
+
return;
|
316 |
+
}
|
317 |
+
if (!this._getInputImage() || this._isColorTypeValue()) {
|
318 |
+
var element = this.getEleInIFrame('color_image');
|
319 |
+
element.click();
|
320 |
+
}
|
321 |
+
},
|
322 |
+
getEleInIFrame: function (targetId) {
|
323 |
+
var theFrame = $(this.iframeId);
|
324 |
+
var theDoc = theFrame.contentWindow.document;
|
325 |
+
var theEle = theDoc.getElementById(targetId);
|
326 |
+
return theEle;
|
327 |
+
},
|
328 |
+
updateColorInputValue: function (newColorValue) {
|
329 |
+
this._setInputValue(newColorValue);
|
330 |
+
if (this._isColorTypeValue()) {
|
331 |
+
this.viewElement.childElements().each(function (item) {item.remove();});
|
332 |
+
this.viewElement.setStyle({background: '#' + newColorValue});
|
333 |
+
this.viewElement.removeClassName('is-empty');
|
334 |
+
}
|
335 |
+
this.updateColorPicker(newColorValue);
|
336 |
+
},
|
337 |
+
updateUploadedImage: function(imagePath, imageUrl) {
|
338 |
+
imageUrl = this._prepareImage(imageUrl);
|
339 |
+
this._removeChildrenAndInsertElement(
|
340 |
+
this.viewElement,
|
341 |
+
'<img src="' + imageUrl + '" height="20" width="20" alt="" />'
|
342 |
+
);
|
343 |
+
this._updateMainImage(imageUrl);
|
344 |
+
this._setInputImage(imagePath);
|
345 |
+
this._setInputType(this.colorTypeImage);
|
346 |
+
this.viewElement.removeClassName('is-empty');
|
347 |
+
$(this.deleteBtn).show();
|
348 |
+
},
|
349 |
+
_updateMainImage: function(imageUrl) {
|
350 |
+
var fileImageUpdate = '<img src="' + imageUrl + '" height="260" width="260" alt="" />';
|
351 |
+
this._removeChildrenAndInsertElement($(this.colorPickerImage), fileImageUpdate);
|
352 |
+
},
|
353 |
+
_prepareImage: function(imageUrl) {
|
354 |
+
var lastIndex = imageUrl.lastIndexOf('/');
|
355 |
+
return imageUrl.substring(0, lastIndex) + '/'
|
356 |
+
+ '<?php echo Tonbo_ColorPicker_Model_Color_Image::MIN_WIDTH
|
357 |
+
. '_' . Tonbo_ColorPicker_Model_Color_Image::MIN_HEIGHT; ?>'
|
358 |
+
+ imageUrl.substring(lastIndex);
|
359 |
+
},
|
360 |
+
_removeChildrenAndInsertElement: function(element, insertItem) {
|
361 |
+
element.childElements().each(function (item) {item.remove();});
|
362 |
+
element.insert(insertItem);
|
363 |
+
},
|
364 |
+
deleteImage: function () {
|
365 |
+
if (!confirm('<?php echo $this->__('Are you sure you want to delete this image? If image is not specified, system will display the selected color.');?>')) {
|
366 |
+
return false;
|
367 |
+
}
|
368 |
+
|
369 |
+
var self = this;
|
370 |
+
new Ajax.Request('<?php echo $this->getUrl('*/tonbo/deleteOption'); ?>', {
|
371 |
+
parameters: {
|
372 |
+
option_id: self.currentElementId,
|
373 |
+
attribute_id: self.attributeId
|
374 |
+
},
|
375 |
+
onSuccess : function(transport) {
|
376 |
+
try {
|
377 |
+
var response = transport.responseText.evalJSON()
|
378 |
+
if (response.error) {
|
379 |
+
alert(response.error);
|
380 |
+
}
|
381 |
+
if (response.ajaxExpired && response.ajaxRedirect) {
|
382 |
+
setLocation(response.ajaxRedirect);
|
383 |
+
}
|
384 |
+
if (!response.success) {
|
385 |
+
alert('<?php echo $this->__('Error: Image was not deleted') ?>');
|
386 |
+
return;
|
387 |
+
}
|
388 |
+
var fileImageUpdate = '<span>' + self.fileSelectMessage + '</span>';
|
389 |
+
self._removeChildrenAndInsertElement($(self.colorPickerImage), fileImageUpdate);
|
390 |
+
self._setInputType(self.colorTypeValue);
|
391 |
+
self.updateColorInputValue(self.colorSelector.getValueFromHex());
|
392 |
+
$(self.deleteBtn).hide();
|
393 |
+
} catch (e) {
|
394 |
+
alert(e.message);
|
395 |
+
}
|
396 |
+
}
|
397 |
+
});
|
398 |
+
}
|
399 |
+
}
|
400 |
+
var ColorPickerUploader = Class.create({
|
401 |
+
colorPickerObj: null,
|
402 |
+
initialize: function(target) {
|
403 |
+
this.colorPickerObj = target;
|
404 |
+
this.observeImageColor();
|
405 |
+
Event.observe($(this.colorPickerObj.iframeId), 'load', this.complete.bind(this));
|
406 |
+
},
|
407 |
+
observeImageColor: function () {
|
408 |
+
Event.observe(this.colorPickerObj.getEleInIFrame('color_image'), 'change', this.submit.bind(this));
|
409 |
+
},
|
410 |
+
submit: function() {
|
411 |
+
displayLoadingMask();
|
412 |
+
this.colorPickerObj.getEleInIFrame('attribute_id').value = this.colorPickerObj.attributeId;
|
413 |
+
this.colorPickerObj.getEleInIFrame('option_id').value = this.colorPickerObj.currentElementId;
|
414 |
+
this.colorPickerObj.getEleInIFrame('color_image_upload').submit();
|
415 |
+
},
|
416 |
+
complete: function() {
|
417 |
+
try {
|
418 |
+
hideLoadingMask();
|
419 |
+
var imagePath = $F(this.colorPickerObj.getEleInIFrame('image_path'));
|
420 |
+
var imageUrl = $F(this.colorPickerObj.getEleInIFrame('image_url'));
|
421 |
+
var errorMessage = $F(this.colorPickerObj.getEleInIFrame('error_message'));
|
422 |
+
if (errorMessage) {
|
423 |
+
alert(errorMessage);
|
424 |
+
} else {
|
425 |
+
this.colorPickerObj.updateUploadedImage(imagePath, imageUrl);
|
426 |
+
}
|
427 |
+
} catch(e) {
|
428 |
+
alert('<?php echo $this->__('Image was not uploaded'); ?>');
|
429 |
+
}
|
430 |
+
}
|
431 |
+
})
|
432 |
+
</script>
|
app/design/adminhtml/default/default/template/tonbo_colorpicker/options.phtml
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
<?php
|
7 |
+
/**
|
8 |
+
* Attribute options control
|
9 |
+
*/
|
10 |
+
/** @var $this Tonbo_ColorPicker_Block_Adminhtml_Catalog_Product_Attribute_Edit_Tab_Options */
|
11 |
+
?>
|
12 |
+
<div>
|
13 |
+
<ul class="messages">
|
14 |
+
<li class="notice-msg">
|
15 |
+
<ul>
|
16 |
+
<li><?php echo Mage::helper('colorpicker')->__('Tonbo Color Picker') ?></li>
|
17 |
+
<li><?php echo Mage::helper('catalog')->__('If you do not specify an option value for a specific store view then the default (Admin) value will be used.') ?></li>
|
18 |
+
</ul>
|
19 |
+
</li>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="entity-edit">
|
24 |
+
<div class="entry-edit-head">
|
25 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Manage Titles (Size, Color, etc.)') ?></h4>
|
26 |
+
</div>
|
27 |
+
<div class="box">
|
28 |
+
<div class="hor-scroll">
|
29 |
+
<table class="dynamic-grid" cellspacing="0" id="attribute-labels-table">
|
30 |
+
<tr>
|
31 |
+
<?php foreach ($this->getStores() as $store): ?>
|
32 |
+
<th><?php echo $store->getName() ?></th>
|
33 |
+
<?php endforeach; ?>
|
34 |
+
</tr>
|
35 |
+
<tr>
|
36 |
+
<?php $labels = $this->getLabelValues() ?>
|
37 |
+
<?php foreach ($this->getStores() as $store): ?>
|
38 |
+
<td>
|
39 |
+
<input class="input-text<?php if($store->getId() == 0): ?> required-option<?php endif; ?>"
|
40 |
+
type="text"
|
41 |
+
name="frontend_label[<?php echo $store->getId() ?>]"
|
42 |
+
value="<?php echo $this->escapeHtml($labels[$store->getId()]) ?>"<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
|
43 |
+
</td>
|
44 |
+
<?php endforeach; ?>
|
45 |
+
</tr>
|
46 |
+
</table>
|
47 |
+
</div>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
<br/>
|
51 |
+
<?php echo $this->getBlockHtml('color_picker'); ?>
|
52 |
+
|
53 |
+
<div class="entity-edit" id="matage-options-panel">
|
54 |
+
<div class="entry-edit-head">
|
55 |
+
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('catalog')->__('Manage Options (values of your attribute)') ?></h4>
|
56 |
+
</div>
|
57 |
+
<div class="box">
|
58 |
+
<div class="hor-scroll">
|
59 |
+
<table class="dynamic-grid" cellspacing="0" cellpadding="0">
|
60 |
+
<tr id="attribute-options-table">
|
61 |
+
<th style="width: 25px;"></th>
|
62 |
+
<?php foreach ($this->getStores() as $store): ?>
|
63 |
+
<th><?php echo $store->getName() ?></th>
|
64 |
+
<?php endforeach; ?>
|
65 |
+
<th><?php echo Mage::helper('catalog')->__('Position') ?></th>
|
66 |
+
<th class="nobr a-center"><?php echo Mage::helper('catalog')->__('Is Default') ?></th>
|
67 |
+
<th>
|
68 |
+
<?php if (!$this->getReadOnly()):?>
|
69 |
+
<?php echo $this->getAddNewButtonHtml() ?>
|
70 |
+
<?php endif;?>
|
71 |
+
</th>
|
72 |
+
</tr>
|
73 |
+
<tr class="no-display template" id="row-template">
|
74 |
+
<?php foreach ($this->getStores() as $store): ?>
|
75 |
+
<td>
|
76 |
+
<input name="option[value][{{id}}][<?php echo $store->getId() ?>]"
|
77 |
+
value="{{store<?php echo $store->getId() ?>}}"
|
78 |
+
class="input-text<?php if($store->getId()==0): ?> required-option<?php endif; ?>"
|
79 |
+
type="text"
|
80 |
+
<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
|
81 |
+
</td>
|
82 |
+
<?php endforeach; ?>
|
83 |
+
<td class="a-center">
|
84 |
+
<input class="input-text"
|
85 |
+
type="text"
|
86 |
+
name="option[order][{{id}}]"
|
87 |
+
value="{{sort_order}}"
|
88 |
+
<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
|
89 |
+
</td>
|
90 |
+
<td>
|
91 |
+
<input class="input-radio"
|
92 |
+
type="radio"
|
93 |
+
name="default[]"
|
94 |
+
value="{{id}}"
|
95 |
+
<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>
|
96 |
+
</td>
|
97 |
+
<td class="a-left">
|
98 |
+
<input type="hidden" class="delete-flag" name="option[delete][{{id}}]" value="" />
|
99 |
+
<?php if (!$this->getReadOnly()):?>
|
100 |
+
<?php echo $this->getDeleteButtonHtml() ?>
|
101 |
+
<?php endif;?>
|
102 |
+
</td>
|
103 |
+
</tr>
|
104 |
+
</table>
|
105 |
+
</div>
|
106 |
+
<input type="hidden" id="option-count-check" value="" />
|
107 |
+
</div>
|
108 |
+
</div>
|
109 |
+
<script type="text/javascript">
|
110 |
+
//<![CDATA[
|
111 |
+
var optionDefaultInputType = 'radio';
|
112 |
+
|
113 |
+
// IE removes quotes from element.innerHTML whenever it thinks they're not needed, which breaks html.
|
114 |
+
var templateText =
|
115 |
+
'<tr class="option-row">' +
|
116 |
+
'<td id="color_picker_{{id}}" <?php if (!$this->getReadOnly()):?>onclick="tonboColorPicker.getColorPicker(\'{{id}}\', \'{{is_new}}\');" <?php endif;?>>' +
|
117 |
+
'{{color_selector}}' +
|
118 |
+
' <?php if (!$this->getReadOnly()):?><input id="color_value_{{id}}" type="hidden" name="option[color_picker][value][{{id}}]" value="{{color_value}}"/><?php endif;?>' +
|
119 |
+
' <?php if (!$this->getReadOnly()):?><input id="color_image_{{id}}" type="hidden" name="option[color_picker][image][{{id}}]" value="{{color_image}}"/><?php endif;?>' +
|
120 |
+
' <?php if (!$this->getReadOnly()):?><input id="color_type_{{id}}" type="hidden" name="option[color_picker][type][{{id}}]" value="{{value_type}}"/><?php endif;?>' +
|
121 |
+
'<\/td>' +
|
122 |
+
<?php foreach ($this->getStores() as $store): ?>
|
123 |
+
'<td><input name="option[value][{{id}}][<?php echo $store->getId() ?>]" ' +
|
124 |
+
'value="{{store<?php echo $store->getId() ?>}}" ' +
|
125 |
+
'class="input-text<?php if($store->getId() == 0): ?> required-option<?php endif; ?>" ' +
|
126 |
+
'onchange="tonboColorPicker.detectColorValue(event, \'{{id}}\', \'{{is_new}}\');" ' +
|
127 |
+
'type="text" <?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/>' +
|
128 |
+
'<\/td>' +
|
129 |
+
<?php endforeach; ?>
|
130 |
+
'<td><input class="input-text" type="text" name="option[order][{{id}}]" value="{{sort_order}}" ' +
|
131 |
+
'<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/><\/td>' +
|
132 |
+
'<td class="a-center"><input class="input-radio" type="{{intype}}" name="default[]" value="{{id}}" {{checked}} ' +
|
133 |
+
'<?php if ($this->getReadOnly()):?> disabled="disabled"<?php endif;?>/><\/td>' +
|
134 |
+
'<td class="a-left">' +
|
135 |
+
'<input type="hidden" class="delete-flag" name="option[delete][{{id}}]" value="" />' +
|
136 |
+
<?php if (!$this->getReadOnly()): ?>
|
137 |
+
'<?php echo $this->getDeleteButtonHtml() ?>' +
|
138 |
+
<?php endif;?>
|
139 |
+
'<\/td>' +
|
140 |
+
'<\/tr>';
|
141 |
+
|
142 |
+
var templateColorSelector = '<span id="color_view_{{id}}" class="tcp-color-set" style="background: #{{color_value}};">{{image_color}}</span>';
|
143 |
+
var templateColorImage = '<img src="{{color_value_image}}" height="20" width="20" alt="{{warning_alt}}" title="{{warning_alt}}" />';
|
144 |
+
|
145 |
+
var attributeOption = {
|
146 |
+
template : null,
|
147 |
+
templateColor : null,
|
148 |
+
templateColorImageResult : null,
|
149 |
+
table : $('attribute-options-table'),
|
150 |
+
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
151 |
+
templateText : templateText,
|
152 |
+
templateColorSelector : templateColorSelector,
|
153 |
+
templateColorImage : templateColorImage,
|
154 |
+
itemCount : 0,
|
155 |
+
totalItems : 0,
|
156 |
+
isReadOnly: <?php echo (int)$this->getReadOnly(); ?>,
|
157 |
+
warningImage : '<?php echo $this->getColorPickerHelper()->getWarningImage() ?>',
|
158 |
+
warningAlt : '<?php echo $this->__('Color was not detected')?>',
|
159 |
+
colorTypeValue: '<?php echo Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE ?>',
|
160 |
+
colorTypeImage: '<?php echo Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE ?>',
|
161 |
+
add : function(data) {
|
162 |
+
this.template = new Template(this.templateText, this.templateSyntax);
|
163 |
+
data.is_new = '0';
|
164 |
+
var isNewOption = false;
|
165 |
+
if (!data.id) {
|
166 |
+
data = {};
|
167 |
+
data.id = 'option_' + this.itemCount;
|
168 |
+
data.is_detected = this.warningImage;
|
169 |
+
data.value_type = this.colorTypeValue;
|
170 |
+
data.is_new = '1';
|
171 |
+
isNewOption = true;
|
172 |
+
}
|
173 |
+
if (isNewOption && !this.isReadOnly) {
|
174 |
+
this.enableNewOptionDeleteButton(data.id);
|
175 |
+
}
|
176 |
+
if (!data.intype) {
|
177 |
+
data.intype = optionDefaultInputType;
|
178 |
+
}
|
179 |
+
|
180 |
+
if (typeof(data.is_detected) !== "undefined" && data.is_detected.length > 0) {
|
181 |
+
data.color_value_image = data.is_detected;
|
182 |
+
data.warning_alt = this.warningAlt;
|
183 |
+
}
|
184 |
+
|
185 |
+
if (data.color_value_image) {
|
186 |
+
this.templateColorImageResult = new Template(this.templateColorImage, this.templateSyntax);
|
187 |
+
data.image_color = this.templateColorImageResult.evaluate(data);
|
188 |
+
}
|
189 |
+
this.templateColor = new Template(this.templateColorSelector, this.templateSyntax);
|
190 |
+
data.color_selector = this.templateColor.evaluate(data);
|
191 |
+
Element.insert(this.table, {after: this.template.evaluate(data)});
|
192 |
+
this.toggleEmptyClass(data.warning_alt, 'color_view_' + data.id);
|
193 |
+
this.bindRemoveButtons();
|
194 |
+
this.itemCount++;
|
195 |
+
this.totalItems++;
|
196 |
+
this.updateItemsCountField();
|
197 |
+
},
|
198 |
+
remove : function(event) {
|
199 |
+
var element = $(Event.findElement(event, 'tr')); // !!! Button already have table parent in safari
|
200 |
+
// Safari workaround
|
201 |
+
element.ancestors().each(function(parentItem) {
|
202 |
+
if (parentItem.hasClassName('option-row')) {
|
203 |
+
element = parentItem;
|
204 |
+
throw $break;
|
205 |
+
} else if (parentItem.hasClassName('box')) {
|
206 |
+
throw $break;
|
207 |
+
}
|
208 |
+
});
|
209 |
+
|
210 |
+
if (element) {
|
211 |
+
var elementFlags = element.getElementsByClassName('delete-flag');
|
212 |
+
if (elementFlags[0]) {
|
213 |
+
elementFlags[0].value = 1;
|
214 |
+
}
|
215 |
+
|
216 |
+
element.addClassName('no-display');
|
217 |
+
element.addClassName('template');
|
218 |
+
element.hide();
|
219 |
+
this.totalItems--;
|
220 |
+
this.updateItemsCountField();
|
221 |
+
}
|
222 |
+
},
|
223 |
+
updateItemsCountField: function() {
|
224 |
+
if (this.totalItems > 0) {
|
225 |
+
$('option-count-check').value = '1';
|
226 |
+
} else {
|
227 |
+
$('option-count-check').value = '';
|
228 |
+
}
|
229 |
+
},
|
230 |
+
enableNewOptionDeleteButton: function(id) {
|
231 |
+
$$('#delete_button_container_' + id + ' button').each(function(button) {
|
232 |
+
button.enable();
|
233 |
+
button.removeClassName('disabled');
|
234 |
+
});
|
235 |
+
},
|
236 |
+
bindRemoveButtons : function() {
|
237 |
+
var buttons = $$('.delete-option');
|
238 |
+
for (var i = 0; i < buttons.length; i++) {
|
239 |
+
if (!$(buttons[i]).binded) {
|
240 |
+
$(buttons[i]).binded = true;
|
241 |
+
Event.observe(buttons[i], 'click', this.remove.bind(this));
|
242 |
+
}
|
243 |
+
}
|
244 |
+
},
|
245 |
+
toggleEmptyClass: function(isEmpty, elementId) {
|
246 |
+
isEmpty ? $(elementId).addClassName('is-empty') : $(elementId).removeClassName('is-empty');
|
247 |
+
}
|
248 |
+
}
|
249 |
+
if ($('row-template')) {
|
250 |
+
$('row-template').remove();
|
251 |
+
}
|
252 |
+
|
253 |
+
tonboColorPicker = new TonboColorPicker(
|
254 |
+
attributeOption.colorTypeValue,
|
255 |
+
attributeOption.colorTypeImage,
|
256 |
+
'<?php echo $this->getAttributeObject()->getId()?>'
|
257 |
+
);
|
258 |
+
|
259 |
+
var ColorPickerIframe = Class.create({
|
260 |
+
container: 'image_uploader_container',
|
261 |
+
isLoaded: false,
|
262 |
+
tonboColorPicker: null,
|
263 |
+
colorPickerUploader: null,
|
264 |
+
initialize: function (tonboColorPicker) {
|
265 |
+
this.tonboColorPicker = tonboColorPicker;
|
266 |
+
displayLoadingMask();
|
267 |
+
Event.observe($('image_color_uploader'), 'load', this.initUploader.bind(this));
|
268 |
+
},
|
269 |
+
initUploader: function() {
|
270 |
+
if (!this.colorPickerUploader) {
|
271 |
+
this.colorPickerUploader = new ColorPickerUploader(this.tonboColorPicker);
|
272 |
+
} else {
|
273 |
+
this.colorPickerUploader.observeImageColor();
|
274 |
+
}
|
275 |
+
hideLoadingMask();
|
276 |
+
}
|
277 |
+
})
|
278 |
+
Event.observe(window, 'load', function() {
|
279 |
+
new ColorPickerIframe(tonboColorPicker);
|
280 |
+
});
|
281 |
+
|
282 |
+
attributeOption.bindRemoveButtons();
|
283 |
+
|
284 |
+
function displayLoadingMask() {
|
285 |
+
var loaderArea = $$('#html-body .wrapper')[0]; // Blocks all page
|
286 |
+
Position.clone($(loaderArea), $('loading-mask'), {offsetLeft: - 2});
|
287 |
+
toggleSelectsUnderBlock($('loading-mask'), false);
|
288 |
+
Element.show('loading-mask');
|
289 |
+
}
|
290 |
+
|
291 |
+
function hideLoadingMask() {
|
292 |
+
toggleSelectsUnderBlock($('loading-mask'), false);
|
293 |
+
Element.hide('loading-mask');
|
294 |
+
}
|
295 |
+
|
296 |
+
if ($('add_new_option_button')) {
|
297 |
+
Event.observe('add_new_option_button', 'click', attributeOption.add.bind(attributeOption));
|
298 |
+
}
|
299 |
+
Validation.addAllThese([
|
300 |
+
['required-option', '<?php echo Mage::helper('catalog')->__('Failed') ?>', function(v) {
|
301 |
+
return !Validation.get('IsEmpty').test(v);
|
302 |
+
}]]);
|
303 |
+
Validation.addAllThese([
|
304 |
+
['required-options-count', '<?php echo Mage::helper('catalog')->__('Options is required') ?>', function(v) {
|
305 |
+
return !Validation.get('IsEmpty').test(v);
|
306 |
+
}]]);
|
307 |
+
<?php foreach ($this->getOptionValues() as $value): ?>
|
308 |
+
attributeOption.add(<?php echo $value->toJson() ?>);
|
309 |
+
<?php endforeach; ?>
|
310 |
+
//]]>
|
311 |
+
</script>
|
312 |
+
<iframe id="image_color_uploader" src="<?php echo $this->getUrl('*/tonbo/uploadForm') ?>" style="display: none;"></iframe>
|
app/design/adminhtml/default/default/template/tonbo_colorpicker/upload_form.phtml
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Adminhtml_Upload_Form */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
/**
|
10 |
+
* Upload form
|
11 |
+
*
|
12 |
+
* @see Tonbo_ColorPicker_Block_Adminhtml_Upload_Form
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
<html>
|
16 |
+
<head></head>
|
17 |
+
<body>
|
18 |
+
<form id="color_image_upload" method="post"
|
19 |
+
enctype="multipart/form-data"
|
20 |
+
action="<?php echo $this->getUrl('*/tonbo/upload'); ?>">
|
21 |
+
<?php echo $this->getFormData(); ?>
|
22 |
+
</form>
|
23 |
+
</body>
|
24 |
+
</html>
|
app/design/adminhtml/default/default/template/tonbo_colorpicker/zoom_image_after.phtml
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
?>
|
6 |
+
|
7 |
+
<?php
|
8 |
+
$parent = $this->getParentElement();
|
9 |
+
?>
|
10 |
+
|
11 |
+
<label for="zoom_image" class="tcp-zoom-toggle">
|
12 |
+
<input type="checkbox" name="zoom_image" id="zoom_image">
|
13 |
+
<?php echo $this->__('Zoom Image'); ?>
|
14 |
+
</label>
|
15 |
+
|
16 |
+
<ul class="tcp-images-list">
|
17 |
+
<li class="tcp-images-list-item tcp-images-list-item-1">
|
18 |
+
<a href="#" onclick="return false;" style="background: #007fff;" title="<?php echo $this->__('Azure'); ?>">
|
19 |
+
<span>
|
20 |
+
<i style="background: #007fff;"></i>
|
21 |
+
<strong><?php echo $this->__('Azure'); ?></strong>
|
22 |
+
</span>
|
23 |
+
</a>
|
24 |
+
</li>
|
25 |
+
<li class="tcp-images-list-item tcp-images-list-item-2">
|
26 |
+
<a href="#" onclick="return false;" style="background: #fff;" title="<?php echo $this->__('White'); ?>">
|
27 |
+
<span>
|
28 |
+
<i style="background: #fff;"></i>
|
29 |
+
<strong><?php echo $this->__('White'); ?></strong>
|
30 |
+
</span>
|
31 |
+
</a>
|
32 |
+
</li>
|
33 |
+
<li class="tcp-images-list-item tcp-images-list-item-3">
|
34 |
+
<a href="#" onclick="return false;" style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/leopard_small.jpg'); ?>) no-repeat 0 0;" title="<?php echo $this->__('Leopard'); ?>">
|
35 |
+
<span id="zoom_image_popup">
|
36 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/leopard.jpg'); ?>) no-repeat center;"></i>
|
37 |
+
<strong><?php echo $this->__('Leopard'); ?></strong>
|
38 |
+
</span>
|
39 |
+
</a>
|
40 |
+
</li>
|
41 |
+
<li class="tcp-images-list-item tcp-images-list-item-4">
|
42 |
+
<a href="#" onclick="return false;" style="background: #4B5320;" title="<?php echo $this->__('Army Green'); ?>">
|
43 |
+
<span>
|
44 |
+
<i style="background: #4B5320;"></i>
|
45 |
+
<strong><?php echo $this->__('Army Green'); ?></strong>
|
46 |
+
</span>
|
47 |
+
</a>
|
48 |
+
</li>
|
49 |
+
</ul>
|
50 |
+
|
51 |
+
<script>
|
52 |
+
ZoomImage = Class.create();
|
53 |
+
ZoomImage.prototype = {
|
54 |
+
parentElement: '<?php echo $parent->getHtmlId(); ?>',
|
55 |
+
zoomCheckbox: 'zoom_image',
|
56 |
+
zoomPopUp: 'zoom_image_popup',
|
57 |
+
scopeElement: null,
|
58 |
+
initialize: function() {
|
59 |
+
this._initBanner();
|
60 |
+
$(this.zoomCheckbox).checked = $(this.parentElement).getValue() !== '0';
|
61 |
+
if ($(this.zoomCheckbox).checked) {
|
62 |
+
$(this.zoomPopUp).up().addClassName('hover');
|
63 |
+
$$('.tcp-images-list-item a').invoke('addClassName', 'hover');
|
64 |
+
} else {
|
65 |
+
$(this.zoomPopUp).up().removeClassName('hover');
|
66 |
+
$$('.tcp-images-list-item a').invoke('removeClassName', 'hover');
|
67 |
+
}
|
68 |
+
$(this.zoomCheckbox).observe('change', this.animation.bind(this));
|
69 |
+
this.scopeElement = this.parentElement + '_inherit';
|
70 |
+
if ($(this.scopeElement) && $(this.scopeElement).checked) {
|
71 |
+
$(this.zoomCheckbox).disable();
|
72 |
+
}
|
73 |
+
},
|
74 |
+
_initBanner : function() {
|
75 |
+
var parentEl = this.parentElement;
|
76 |
+
$$('table').each(function(element) {
|
77 |
+
if ($(parentEl).descendantOf(element)) {
|
78 |
+
$(element).down('tr').insert({before: new Element('tr', {id: 'tonboinc_banner'})});
|
79 |
+
$('tonboinc_banner').insert({top: new Element('td', {
|
80 |
+
id: 'tonboinc_banner_td',
|
81 |
+
colspan: '100'
|
82 |
+
})});
|
83 |
+
var srcUrl = 'http://tonboinc.com/tonboad/index/index'
|
84 |
+
+ '/website/' + '<?php echo base64_encode($this->getBaseUrl()); ?>'
|
85 |
+
+ '/module/' + '<?php echo base64_encode('colorpicker'); ?>'
|
86 |
+
+ '/module_version/' + '<?php echo base64_encode(Mage::getConfig()->getNode('modules/Tonbo_ColorPicker/version')); ?>'
|
87 |
+
+ '/mage_version/' + '<?php echo base64_encode(Mage::getVersion()); ?>';
|
88 |
+
$('tonboinc_banner_td').insert({top: new Element('iframe', {
|
89 |
+
id: 'tonboinc_banner_frame',
|
90 |
+
name: 'tonboinc_banner_frame',
|
91 |
+
src: srcUrl,
|
92 |
+
width: '800px;',
|
93 |
+
height: '140px;',
|
94 |
+
frameborder: '0',
|
95 |
+
scrolling: 'no'
|
96 |
+
})});
|
97 |
+
}
|
98 |
+
});
|
99 |
+
},
|
100 |
+
animation: function (e) {
|
101 |
+
var element = e.element();
|
102 |
+
var scopeElement = $(this.scopeElement);
|
103 |
+
$(this.parentElement).setValue(element.checked ? 1 : 0);
|
104 |
+
element.disable();
|
105 |
+
if (scopeElement) {
|
106 |
+
scopeElement.disable();
|
107 |
+
}
|
108 |
+
var popup = $(this.zoomPopUp), popupHolder = popup.up();
|
109 |
+
|
110 |
+
if(popupHolder.hasClassName('hover')) {
|
111 |
+
$$('.tcp-images-list-item a').invoke('removeClassName', 'hover');
|
112 |
+
popupHolder.removeClassName('hover');
|
113 |
+
element.enable();
|
114 |
+
if (scopeElement) {
|
115 |
+
scopeElement.enable();
|
116 |
+
}
|
117 |
+
} else {
|
118 |
+
popup.style.opacity = 0;
|
119 |
+
popup.setStyle({'display': 'block'});
|
120 |
+
var insertItem = '<img id="popup_color_image"'
|
121 |
+
+ ' src="<?php echo $this->getSkinUrl('tonbo-colorpicker/img/leopard.jpg'); ?>"'
|
122 |
+
+ ' height="200" width="200" alt="" />';
|
123 |
+
Element.insert(popup, {top: insertItem});
|
124 |
+
new Effect.Opacity(
|
125 |
+
popup, {
|
126 |
+
from: 0.0,
|
127 |
+
to: 1.0,
|
128 |
+
duration: 1,
|
129 |
+
afterFinish: function () {
|
130 |
+
new Effect.Opacity(
|
131 |
+
popup, {
|
132 |
+
from: 2.0,
|
133 |
+
to: 0.0,
|
134 |
+
duration: 1.5,
|
135 |
+
afterFinish: function () {
|
136 |
+
popup.setStyle({'display': 'none'});
|
137 |
+
$('popup_color_image').remove();
|
138 |
+
$$('.tcp-images-list-item a').invoke('addClassName', 'hover');
|
139 |
+
popupHolder.addClassName('hover');
|
140 |
+
if (scopeElement) {
|
141 |
+
scopeElement.enable();
|
142 |
+
}
|
143 |
+
element.enable();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
);
|
147 |
+
}
|
148 |
+
}
|
149 |
+
);
|
150 |
+
}
|
151 |
+
}
|
152 |
+
}
|
153 |
+
document.observe("dom:loaded", function() {
|
154 |
+
ZoomImageObj = new ZoomImage;
|
155 |
+
});
|
156 |
+
|
157 |
+
</script>
|
app/design/frontend/base/default/layout/colorpicker.xml
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
|
24 |
+
<layout>
|
25 |
+
<default>
|
26 |
+
<reference name="head">
|
27 |
+
<action method="addItem"><type>skin_css</type><stylesheet>tonbo-colorpicker/css/styles.css</stylesheet></action>
|
28 |
+
</reference>
|
29 |
+
</default>
|
30 |
+
</layout>
|
app/design/frontend/base/default/template/tonbo_colorpicker/cart_item_default.phtml
ADDED
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Checkout_Cart_Item_Renderer_Configurable */
|
7 |
+
?>
|
8 |
+
|
9 |
+
<?php
|
10 |
+
$item = $this->getItem();
|
11 |
+
$isVisibleProduct = $item->getProduct()->isVisibleInSiteVisibility();
|
12 |
+
if (method_exists(Mage::helper('catalog'), 'canApplyMsrp')) {
|
13 |
+
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
|
14 |
+
} else {
|
15 |
+
$canApplyMsrp = false;
|
16 |
+
}
|
17 |
+
?>
|
18 |
+
<tr>
|
19 |
+
<td><?php if ($this->hasProductUrl()):?><a href="<?php echo $this->getProductUrl() ?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><?php endif;?><img src="<?php echo $this->getProductThumbnail()->resize(75); ?>" width="75" height="75" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" /><?php if ($this->hasProductUrl()):?></a><?php endif;?></td>
|
20 |
+
<td>
|
21 |
+
<h2 class="product-name">
|
22 |
+
<?php if ($this->hasProductUrl()):?>
|
23 |
+
<a href="<?php echo $this->getProductUrl() ?>"><?php echo $this->escapeHtml($this->getProductName()) ?></a>
|
24 |
+
<?php else: ?>
|
25 |
+
<?php echo $this->escapeHtml($this->getProductName()) ?>
|
26 |
+
<?php endif; ?>
|
27 |
+
</h2>
|
28 |
+
<?php if ($options = $this->getOptionList()):?>
|
29 |
+
<dl class="item-options">
|
30 |
+
<?php foreach ($options as $option) : ?>
|
31 |
+
<?php $formattedOptionValue = $this->getFormatedOptionValue($option); ?>
|
32 |
+
<?php if (isset($option['attribute_model']) && $this->getColorPickerHelper()->isColorAttribute($option['attribute_model'])): ?>
|
33 |
+
<?php $colorAttribute = $this->getColorValueObject($option['attribute_model']->getAttributeId(), $option['option_id'])->loadByAttributeData(); ?>
|
34 |
+
<dt>
|
35 |
+
<?php echo $this->escapeHtml($option['label']) ?>
|
36 |
+
</dt>
|
37 |
+
<dd>
|
38 |
+
<?php if ($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE) : ?>
|
39 |
+
<a href="#"
|
40 |
+
onclick="return false;"
|
41 |
+
class="tcp-list-item-selected"
|
42 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : trim($formattedOptionValue['value']) ?>"
|
43 |
+
style="background: #<?php echo $colorAttribute->getColorValue() ?>;">
|
44 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
45 |
+
<span>
|
46 |
+
<i style="background: #<?php echo $colorAttribute->getColorValue() ?>;"></i>
|
47 |
+
<strong><?php echo trim($formattedOptionValue['value']) ?></strong>
|
48 |
+
</span>
|
49 |
+
<?php endif; ?>
|
50 |
+
</a>
|
51 |
+
<?php elseif($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE): ?>
|
52 |
+
<a href="#"
|
53 |
+
onclick="return false;"
|
54 |
+
class="tcp-list-item-selected"
|
55 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : trim($formattedOptionValue['value']) ?>"
|
56 |
+
style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 30, 30) ?>) no-repeat 0 0;">
|
57 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
58 |
+
<span>
|
59 |
+
<i style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 260, 260) ?>) no-repeat center;"></i>
|
60 |
+
<strong><?php echo trim($formattedOptionValue['value']) ?></strong>
|
61 |
+
</span>
|
62 |
+
<?php endif; ?>
|
63 |
+
</a>
|
64 |
+
<?php else: ?>
|
65 |
+
<a href="#"
|
66 |
+
onclick="return false;"
|
67 |
+
class="tcp-list-item-selected"
|
68 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : trim($formattedOptionValue['value']) ?>"
|
69 |
+
style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty_small.png') ?>) no-repeat 0 0;">
|
70 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
71 |
+
<span>
|
72 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty.png') ?>) no-repeat center;"></i>
|
73 |
+
<strong><?php echo trim($formattedOptionValue['value']) ?></strong>
|
74 |
+
</span>
|
75 |
+
<?php endif; ?>
|
76 |
+
</a>
|
77 |
+
<?php endif; ?>
|
78 |
+
</dd>
|
79 |
+
<?php unset($colorAttribute); ?>
|
80 |
+
<?php else: ?>
|
81 |
+
<dt><?php echo $this->escapeHtml($option['label']) ?></dt>
|
82 |
+
<dd<?php if (isset($formattedOptionValue['full_view'])): ?> class="truncated"<?php endif; ?>><?php echo $formattedOptionValue['value'] ?>
|
83 |
+
<?php if (isset($formattedOptionValue['full_view'])): ?>
|
84 |
+
<div class="truncated_full_value">
|
85 |
+
<dl class="item-options">
|
86 |
+
<dt><?php echo $this->escapeHtml($option['label'])?></dt>
|
87 |
+
<dd><?php echo $formattedOptionValue['full_view'] ?></dd>
|
88 |
+
</dl>
|
89 |
+
</div>
|
90 |
+
<?php endif; ?>
|
91 |
+
</dd>
|
92 |
+
<?php endif;?>
|
93 |
+
<?php endforeach; ?>
|
94 |
+
</dl>
|
95 |
+
<?php endif;?>
|
96 |
+
<?php if ($messages = $this->getMessages()): ?>
|
97 |
+
<?php foreach ($messages as $message): ?>
|
98 |
+
<p class="item-msg <?php echo $message['type'] ?>">* <?php echo $message['text'] ?></p>
|
99 |
+
<?php endforeach; ?>
|
100 |
+
<?php endif; ?>
|
101 |
+
<?php if ($addInfoBlock = $this->getProductAdditionalInformationBlock()):?>
|
102 |
+
<?php echo $addInfoBlock->setItem($item)->toHtml() ?>
|
103 |
+
<?php endif;?>
|
104 |
+
</td>
|
105 |
+
<td class="a-center">
|
106 |
+
<?php if ($isVisibleProduct): ?>
|
107 |
+
<a href="<?php echo $this->getConfigureUrl() ?>" title="<?php echo $this->__('Edit item parameters') ?>"><?php echo $this->__('Edit') ?></a>
|
108 |
+
<?php endif ?>
|
109 |
+
</td>
|
110 |
+
<?php if ($this->helper('wishlist')->isAllowInCart()) : ?>
|
111 |
+
<td class="a-center">
|
112 |
+
<?php if ($isVisibleProduct): ?>
|
113 |
+
<input type="checkbox" value="1" name="cart[<?php echo $item->getId() ?>][wishlist]" title="<?php echo $this->__('Move to Wishlist') ?>" class="checkbox" />
|
114 |
+
<?php endif ?>
|
115 |
+
</td>
|
116 |
+
<?php endif ?>
|
117 |
+
|
118 |
+
<?php if ($canApplyMsrp): ?>
|
119 |
+
<td class="a-right"<?php if ($this->helper('tax')->displayCartBothPrices()): ?> colspan="2"<?php endif; ?>>
|
120 |
+
<span class="cart-price">
|
121 |
+
<span class="cart-msrp-unit"><?php echo $this->__('See price before order confirmation.'); ?></span>
|
122 |
+
<?php $helpLinkId = 'cart-msrp-help-' . $item->getId(); ?>
|
123 |
+
<a id="<?php echo $helpLinkId ?>" href="#" class="map-help-link"><?php echo $this->__("What's this?"); ?></a>
|
124 |
+
<script type="text/javascript">
|
125 |
+
Catalog.Map.addHelpLink($('<?php echo $helpLinkId ?>'), "<?php echo $this->__("What's this?") ?>");
|
126 |
+
</script>
|
127 |
+
</span>
|
128 |
+
</td>
|
129 |
+
<?php else: ?>
|
130 |
+
|
131 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
132 |
+
<td class="a-right">
|
133 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
134 |
+
<span class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
135 |
+
<?php else: ?>
|
136 |
+
<span class="cart-price">
|
137 |
+
<?php endif; ?>
|
138 |
+
|
139 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
140 |
+
<?php echo $this->helper('checkout')->formatPrice($item->getCalculationPrice()+$item->getWeeeTaxAppliedAmount()+$item->getWeeeTaxDisposition()); ?>
|
141 |
+
<?php else: ?>
|
142 |
+
<?php echo $this->helper('checkout')->formatPrice($item->getCalculationPrice()) ?>
|
143 |
+
<?php endif; ?>
|
144 |
+
|
145 |
+
</span>
|
146 |
+
|
147 |
+
|
148 |
+
<?php if (Mage::helper('weee')->getApplied($item)): ?>
|
149 |
+
|
150 |
+
<div class="cart-tax-info" id="eunit-item-tax-details<?php echo $item->getId(); ?>" style="display:none;">
|
151 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 1, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
152 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
153 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
154 |
+
<?php endforeach; ?>
|
155 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
156 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
157 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
158 |
+
<?php endforeach; ?>
|
159 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 4, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
160 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
161 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
162 |
+
<?php endforeach; ?>
|
163 |
+
<?php endif; ?>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
167 |
+
<div class="cart-tax-total" onclick="taxToggle('eunit-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
168 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($item->getCalculationPrice()+$item->getWeeeTaxAppliedAmount()+$item->getWeeeTaxDisposition()); ?></span>
|
169 |
+
</div>
|
170 |
+
<?php endif; ?>
|
171 |
+
<?php endif; ?>
|
172 |
+
</td>
|
173 |
+
<?php endif; ?>
|
174 |
+
<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
175 |
+
<td>
|
176 |
+
<?php $_incl = $this->helper('checkout')->getPriceInclTax($item); ?>
|
177 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
178 |
+
<span class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
179 |
+
<?php else: ?>
|
180 |
+
<span class="cart-price">
|
181 |
+
<?php endif; ?>
|
182 |
+
|
183 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
184 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$item->getWeeeTaxAppliedAmount()); ?>
|
185 |
+
<?php else: ?>
|
186 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$item->getWeeeTaxDisposition()) ?>
|
187 |
+
<?php endif; ?>
|
188 |
+
|
189 |
+
</span>
|
190 |
+
<?php if (Mage::helper('weee')->getApplied($item)): ?>
|
191 |
+
|
192 |
+
<div class="cart-tax-info" id="unit-item-tax-details<?php echo $item->getId(); ?>" style="display:none;">
|
193 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 1, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
194 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
195 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount'],true,true); ?></span>
|
196 |
+
<?php endforeach; ?>
|
197 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
198 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
199 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
200 |
+
<?php endforeach; ?>
|
201 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 4, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
202 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
203 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['amount_incl_tax'],true,true); ?></span>
|
204 |
+
<?php endforeach; ?>
|
205 |
+
<?php endif; ?>
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
209 |
+
<div class="cart-tax-total" onclick="taxToggle('unit-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
210 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$item->getWeeeTaxAppliedAmount()); ?></span>
|
211 |
+
</div>
|
212 |
+
<?php endif; ?>
|
213 |
+
<?php endif; ?>
|
214 |
+
</td>
|
215 |
+
<?php endif; ?>
|
216 |
+
<?php endif; ?>
|
217 |
+
<td class="a-center">
|
218 |
+
<input name="cart[<?php echo $item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" title="<?php echo $this->__('Qty') ?>" class="input-text qty" maxlength="12" />
|
219 |
+
</td>
|
220 |
+
<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
|
221 |
+
<td class="a-right">
|
222 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
223 |
+
<span class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
224 |
+
<?php else: ?>
|
225 |
+
<span class="cart-price">
|
226 |
+
<?php endif; ?>
|
227 |
+
|
228 |
+
<?php if ($canApplyMsrp): ?>
|
229 |
+
<span class="cart-msrp-subtotal">--</span>
|
230 |
+
<?php else: ?>
|
231 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
232 |
+
<?php echo $this->helper('checkout')->formatPrice($item->getRowTotal()+$item->getWeeeTaxAppliedRowAmount()+$item->getWeeeTaxRowDisposition()); ?>
|
233 |
+
<?php else: ?>
|
234 |
+
<?php echo $this->helper('checkout')->formatPrice($item->getRowTotal()) ?>
|
235 |
+
<?php endif; ?>
|
236 |
+
<?php endif; ?>
|
237 |
+
|
238 |
+
</span>
|
239 |
+
<?php if (Mage::helper('weee')->getApplied($item)): ?>
|
240 |
+
|
241 |
+
<div class="cart-tax-info" id="esubtotal-item-tax-details<?php echo $item->getId(); ?>" style="display:none;">
|
242 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 1, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
243 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
244 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
245 |
+
<?php endforeach; ?>
|
246 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
247 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
248 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
249 |
+
<?php endforeach; ?>
|
250 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 4, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
251 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
252 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
253 |
+
<?php endforeach; ?>
|
254 |
+
<?php endif; ?>
|
255 |
+
</div>
|
256 |
+
|
257 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
258 |
+
<div class="cart-tax-total" onclick="taxToggle('esubtotal-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
259 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total'); ?>: <?php echo $this->helper('checkout')->formatPrice($item->getRowTotal()+$item->getWeeeTaxAppliedRowAmount()+$item->getWeeeTaxRowDisposition()); ?></span>
|
260 |
+
</div>
|
261 |
+
<?php endif; ?>
|
262 |
+
<?php endif; ?>
|
263 |
+
</td>
|
264 |
+
<?php endif; ?>
|
265 |
+
<?php if (($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices())): ?>
|
266 |
+
<td>
|
267 |
+
<?php $_incl = $this->helper('checkout')->getSubtotalInclTax($item); ?>
|
268 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
269 |
+
<span class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
270 |
+
<?php else: ?>
|
271 |
+
<span class="cart-price">
|
272 |
+
<?php endif; ?>
|
273 |
+
|
274 |
+
<?php if ($canApplyMsrp): ?>
|
275 |
+
<span class="cart-msrp-subtotal">--</span>
|
276 |
+
<?php else: ?>
|
277 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, array(0, 1, 4), 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
278 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl+$item->getWeeeTaxAppliedRowAmount()); ?>
|
279 |
+
<?php else: ?>
|
280 |
+
<?php echo $this->helper('checkout')->formatPrice($_incl-$item->getWeeeTaxRowDisposition()) ?>
|
281 |
+
<?php endif; ?>
|
282 |
+
<?php endif; ?>
|
283 |
+
|
284 |
+
</span>
|
285 |
+
|
286 |
+
|
287 |
+
<?php if (Mage::helper('weee')->getApplied($item)): ?>
|
288 |
+
|
289 |
+
<div class="cart-tax-info" id="subtotal-item-tax-details<?php echo $item->getId(); ?>" style="display:none;">
|
290 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 1, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
291 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
292 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount'],true,true); ?></span>
|
293 |
+
<?php endforeach; ?>
|
294 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
295 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
296 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
297 |
+
<?php endforeach; ?>
|
298 |
+
<?php elseif (Mage::helper('weee')->typeOfDisplay($item, 4, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
299 |
+
<?php foreach (Mage::helper('weee')->getApplied($item) as $tax): ?>
|
300 |
+
<span class="weee"><?php echo $tax['title']; ?>: <?php echo Mage::helper('checkout')->formatPrice($tax['row_amount_incl_tax'],true,true); ?></span>
|
301 |
+
<?php endforeach; ?>
|
302 |
+
<?php endif; ?>
|
303 |
+
</div>
|
304 |
+
|
305 |
+
<?php if (Mage::helper('weee')->typeOfDisplay($item, 2, 'sales') && $item->getWeeeTaxAppliedAmount()): ?>
|
306 |
+
<div class="cart-tax-total" onclick="taxToggle('subtotal-item-tax-details<?php echo $item->getId(); ?>', this, 'cart-tax-total-expanded');">
|
307 |
+
<span class="weee"><?php echo Mage::helper('weee')->__('Total incl. tax'); ?>: <?php echo $this->helper('checkout')->formatPrice($_incl+$item->getWeeeTaxAppliedRowAmount()); ?></span>
|
308 |
+
</div>
|
309 |
+
<?php endif; ?>
|
310 |
+
<?php endif; ?>
|
311 |
+
</td>
|
312 |
+
<?php endif; ?>
|
313 |
+
<td class="a-center"><a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove item')?></a></td>
|
314 |
+
</tr>
|
app/design/frontend/base/default/template/tonbo_colorpicker/catalog_layer_filter.phtml
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Catalog_Layer_Filter_Attribute */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
/**
|
10 |
+
* Template for filter items block
|
11 |
+
*
|
12 |
+
* @see Tonbo_ColorPicker_Block_Catalog_Layer_Filter_Attribute
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
|
16 |
+
<ul class="tcp-images-list">
|
17 |
+
<?php foreach ($this->getItems() as $item): ?>
|
18 |
+
<li class="tcp-images-list-item">
|
19 |
+
<?php if ($item->getCount() > 0): ?>
|
20 |
+
<?php if ($colorAttribute = $this->getColorPickerHelper()->getColorItemByOption($item->getValue())) : ?>
|
21 |
+
<?php if ($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE) : ?>
|
22 |
+
<a href="<?php echo $this->escapeHtml($item->getUrl()) ?>"
|
23 |
+
style="background: #<?php echo $colorAttribute->getColorValue() ?>;"
|
24 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $item->getLabel() ?>">
|
25 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
26 |
+
<span>
|
27 |
+
<i style="background: #<?php echo $colorAttribute->getColorValue() ?>;" title="<?php echo $item->getLabel() ?>"></i>
|
28 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
29 |
+
</span>
|
30 |
+
<?php endif; ?>
|
31 |
+
</a>
|
32 |
+
<?php else: ?>
|
33 |
+
<a href="<?php echo $this->escapeHtml($item->getUrl()) ?>"
|
34 |
+
style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 30, 30) ?>) no-repeat center;"
|
35 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $item->getLabel(); ?>">
|
36 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
37 |
+
<span>
|
38 |
+
<i style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 260, 260) ?>) no-repeat"></i>
|
39 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
40 |
+
</span>
|
41 |
+
<?php endif; ?>
|
42 |
+
</a>
|
43 |
+
<?php endif; ?>
|
44 |
+
<?php else: ?>
|
45 |
+
<a href="<?php echo $this->escapeHtml($item->getUrl()) ?>"
|
46 |
+
style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty_small.png') ?>) no-repeat center"
|
47 |
+
title="<?php echo Mage::helper('colorpicker')->isZoomEnabled() ? '' : $item->getLabel() ?>">
|
48 |
+
<?php if(Mage::helper('colorpicker')->isZoomEnabled()): ?>
|
49 |
+
<span>
|
50 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty.png') ?>) no-repeat center"></i>
|
51 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
52 |
+
</span>
|
53 |
+
<?php endif; ?>
|
54 |
+
</a>
|
55 |
+
<?php endif; ?>
|
56 |
+
<?php else: ?>
|
57 |
+
<?php if ($colorAttribute = $this->getColorPickerHelper()->getColorItemByOption($item->getValue())) : ?>
|
58 |
+
<?php if ($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE) : ?>
|
59 |
+
<a href="#"
|
60 |
+
onclick="return false;"
|
61 |
+
style="background: #<?php echo $colorAttribute->getColorValue() ?>;"
|
62 |
+
title="<?php echo Mage::helper('colorpicker')->isZoomEnabled() ? '' : $item->getLabel() ?>">
|
63 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
64 |
+
<span>
|
65 |
+
<i style="background: #<?php echo $colorAttribute->getColorValue() ?>;" title="<?php echo $item->getLabel() ?>"></i>
|
66 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
67 |
+
</span>
|
68 |
+
<?php endif; ?>
|
69 |
+
</a>
|
70 |
+
<?php else: ?>
|
71 |
+
<a href="#"
|
72 |
+
onclick="return false;"
|
73 |
+
style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 30, 30) ?>) no-repeat center;"
|
74 |
+
title="<?php echo Mage::helper('colorpicker')->isZoomEnabled() ? '' : $item->getLabel(); ?>">
|
75 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
76 |
+
<span>
|
77 |
+
<i style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 260, 260) ?>) no-repeat"></i>
|
78 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
79 |
+
</span>
|
80 |
+
<?php endif; ?>
|
81 |
+
</a>
|
82 |
+
<?php endif; ?>
|
83 |
+
<?php else: ?>
|
84 |
+
<a href="#"
|
85 |
+
onclick="return false;"
|
86 |
+
style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty_small.png') ?>) no-repeat center"
|
87 |
+
title="<?php echo Mage::helper('colorpicker')->isZoomEnabled() ? '' : $item->getLabel() ?>">
|
88 |
+
<?php if(Mage::helper('colorpicker')->isZoomEnabled()): ?>
|
89 |
+
<span>
|
90 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty.png') ?>) no-repeat center"></i>
|
91 |
+
<strong><?php echo $item->getLabel(); ?></strong>
|
92 |
+
</span>
|
93 |
+
<?php endif; ?>
|
94 |
+
</a>
|
95 |
+
<?php endif; ?>
|
96 |
+
<?php endif; ?>
|
97 |
+
</li>
|
98 |
+
<?php endforeach ?>
|
99 |
+
</ul>
|
app/design/frontend/base/default/template/tonbo_colorpicker/catalog_layer_sate.phtml
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Catalog_Layer_State */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
/**
|
10 |
+
* Template for filter items block
|
11 |
+
*
|
12 |
+
* @see Tonbo_ColorPicker_Block_Catalog_Layer_State
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
|
16 |
+
<?php $filters = $this->getActiveFilters() ?>
|
17 |
+
<?php if(!empty($filters)): ?>
|
18 |
+
<div class="currently">
|
19 |
+
<p class="block-subtitle"><?php echo $this->__('Currently Shopping by:') ?></p>
|
20 |
+
<ol>
|
21 |
+
<?php foreach ($filters as $filter): ?>
|
22 |
+
<li>
|
23 |
+
<a href="<?php echo $filter->getRemoveUrl() ?>" title="<?php echo $this->__('Remove This Item') ?>" class="btn-remove"><?php echo $this->__('Remove This Item') ?></a>
|
24 |
+
<?php if ($filter->getFilter()->getData('attribute_model') && $this->getColorPickerHelper()->isColorAttribute($filter->getFilter()->getAttributeModel())): ?>
|
25 |
+
<span class="label"><?php echo $this->__($filter->getName()) ?>:</span>
|
26 |
+
<?php $colorAttribute = $this->getColorValueObject($filter->getFilter()->getAttributeModel()->getId(), $filter->getValue())->loadByAttributeData(); ?>
|
27 |
+
<?php if ($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE) : ?>
|
28 |
+
<a href="#"
|
29 |
+
onclick="return false;"
|
30 |
+
class="tcp-list-item-selected"
|
31 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $filter->getLabel() ?>"
|
32 |
+
style="background: #<?php echo $colorAttribute->getColorValue() ?>;">
|
33 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
34 |
+
<span>
|
35 |
+
<i style="background: #<?php echo $colorAttribute->getColorValue() ?>;"></i>
|
36 |
+
<strong><?php echo $filter->getLabel() ?></strong>
|
37 |
+
</span>
|
38 |
+
<?php endif; ?>
|
39 |
+
</a>
|
40 |
+
<?php elseif($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE): ?>
|
41 |
+
<a href="#"
|
42 |
+
onclick="return false;"
|
43 |
+
class="tcp-list-item-selected"
|
44 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $filter->getLabel() ?>"
|
45 |
+
style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 30, 30) ?>) no-repeat 0 0;">
|
46 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
47 |
+
<span>
|
48 |
+
<i style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 260, 260) ?>) no-repeat center;"></i>
|
49 |
+
<strong><?php echo $filter->getLabel() ?></strong>
|
50 |
+
</span>
|
51 |
+
<?php endif; ?>
|
52 |
+
</a>
|
53 |
+
<?php else: ?>
|
54 |
+
<a href="#"
|
55 |
+
onclick="return false;"
|
56 |
+
class="tcp-list-item-selected"
|
57 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $filter->getLabel() ?>"
|
58 |
+
style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty_small.png') ?>) no-repeat 0 0;">
|
59 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
60 |
+
<span>
|
61 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty.png') ?>) no-repeat center;"></i>
|
62 |
+
<strong><?php echo $filter->getLabel() ?></strong>
|
63 |
+
</span>
|
64 |
+
<?php endif; ?>
|
65 |
+
</a>
|
66 |
+
<?php endif; ?>
|
67 |
+
<?php unset($colorAttribute); ?>
|
68 |
+
<?php else: ?>
|
69 |
+
<span class="label"><?php echo $this->__($filter->getName()) ?>:</span> <?php echo $this->stripTags($filter->getLabel()) ?>
|
70 |
+
<?php endif; ?>
|
71 |
+
</li>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
</ol>
|
74 |
+
<div class="actions"><a href="<?php echo $this->getClearUrl() ?>"><?php echo $this->__('Clear All') ?></a></div>
|
75 |
+
</div>
|
76 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/tonbo_colorpicker/options_configurable.phtml
ADDED
@@ -0,0 +1,240 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* {tonbo_license}
|
4 |
+
*/
|
5 |
+
|
6 |
+
/** @var $this Tonbo_ColorPicker_Block_Catalog_Product_Configurable */
|
7 |
+
?>
|
8 |
+
<?php
|
9 |
+
/**
|
10 |
+
* Template for configurable product options
|
11 |
+
*
|
12 |
+
* @see Tonbo_ColorPicker_Block_Catalog_Product_Configurable
|
13 |
+
*/
|
14 |
+
?>
|
15 |
+
|
16 |
+
<?php
|
17 |
+
$product = $this->getProduct();
|
18 |
+
$attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
|
19 |
+
?>
|
20 |
+
<?php if ($product->isSaleable() && count($attributes)):?>
|
21 |
+
<dl>
|
22 |
+
<?php foreach($attributes as $attribute): ?>
|
23 |
+
<?php if (Mage::helper('colorpicker')->isColorAttribute($attribute->getProductAttribute())): ?>
|
24 |
+
<dt><label class="required"><em>*</em><?php echo $attribute->getLabel() ?></label></dt>
|
25 |
+
<dd<?php if ($attribute->decoratedIsLast) {?> class="last"<?php }?>>
|
26 |
+
<?php if ($this->isOptions()): ?>
|
27 |
+
<ul id="tcp-images-list<?php echo $attribute->getAttributeId()?>" class="tcp-images-list">
|
28 |
+
<?php $attributeOptions = $this->getColorPickerData();?>
|
29 |
+
<?php foreach($attributeOptions[$attribute->getAttributeId()] as $option): ?>
|
30 |
+
<li class="tcp-images-list-item tcp-select-inactive">
|
31 |
+
<?php $colorAttribute = $option['color_object']; ?>
|
32 |
+
<?php if ($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_VALUE) : ?>
|
33 |
+
<a href="#"
|
34 |
+
id="<?php echo $attribute->getAttributeId()?>-option-link-<?php echo $option['option_id'] ?>"
|
35 |
+
onclick="spConfig.selectColor(event, '<?php echo $attribute->getAttributeId()?>', '<?php echo $option['option_id'] ?>'); return false;"
|
36 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $option['label'] ?>"
|
37 |
+
style="background: #<?php echo $colorAttribute->getColorValue() ?>;" title="<?php echo $option['label'] ?>">
|
38 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
39 |
+
<span>
|
40 |
+
<i style="background: #<?php echo $colorAttribute->getColorValue() ?>;"></i>
|
41 |
+
<strong id="<?php echo $attribute->getAttributeId()?>-option-label-full-<?php echo $option['option_id'] ?>"><?php echo $option['label'] ?></strong>
|
42 |
+
</span>
|
43 |
+
<?php endif; ?>
|
44 |
+
</a>
|
45 |
+
<?php elseif($colorAttribute->getColorType() == Tonbo_ColorPicker_Model_Color_Value::COLOR_TYPE_IMAGE): ?>
|
46 |
+
<a href="#"
|
47 |
+
id="<?php echo $attribute->getAttributeId()?>-option-link-<?php echo $option['option_id'] ?>"
|
48 |
+
onclick="spConfig.selectColor(event, '<?php echo $attribute->getAttributeId()?>', '<?php echo $option['option_id'] ?>'); return false;"
|
49 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $option['label'] ?>"
|
50 |
+
style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 30, 30) ?>) no-repeat center">
|
51 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
52 |
+
<span>
|
53 |
+
<i style="background: url(<?php echo $colorAttribute->getImageUploadModel()->getImageWithSize($colorAttribute, 260, 260) ?>) no-repeat center;"></i>
|
54 |
+
<strong id="<?php echo $attribute->getAttributeId()?>-option-label-full-<?php echo $option['option_id'] ?>"><?php echo $option['label'] ?></strong>
|
55 |
+
</span>
|
56 |
+
<?php endif; ?>
|
57 |
+
</a>
|
58 |
+
<?php else: ?>
|
59 |
+
<a href="#"
|
60 |
+
id="<?php echo $attribute->getAttributeId()?>-option-link-<?php echo $option['option_id'] ?>"
|
61 |
+
onclick="spConfig.selectColor(event, '<?php echo $attribute->getAttributeId();?>', '<?php echo $option['option_id'] ?>'); return false;"
|
62 |
+
title="<?php echo $colorAttribute->isZoomEnabled() ? '' : $option['label'] ?>"
|
63 |
+
style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty_small.png') ?>) no-repeat center">
|
64 |
+
<?php if($colorAttribute->isZoomEnabled()): ?>
|
65 |
+
<span>
|
66 |
+
<i style="background: url(<?php echo $this->getSkinUrl('tonbo-colorpicker/img/empty.png') ?>) no-repeat center"></i>
|
67 |
+
<strong id="<?php echo $attribute->getAttributeId()?>-option-label-full-<?php echo $option['option_id'] ?>"><?php echo $option['label'] ?></strong>
|
68 |
+
</span>
|
69 |
+
<?php endif; ?>
|
70 |
+
</a>
|
71 |
+
<?php endif; ?>
|
72 |
+
</li>
|
73 |
+
<?php endforeach; ?>
|
74 |
+
</ul>
|
75 |
+
<p id="selected-data-container<?php echo $attribute->getAttributeId() ?>" style="display: none;"></p>
|
76 |
+
<?php endif; ?>
|
77 |
+
<div class="input-box">
|
78 |
+
<select name="super_attribute[<?php echo $attribute->getAttributeId() ?>]" id="attribute<?php echo $attribute->getAttributeId() ?>" class="required-entry super-attribute-select tcp-select-hidden">
|
79 |
+
<option><?php echo $this->__('Choose an Option...') ?></option>
|
80 |
+
</select>
|
81 |
+
</div>
|
82 |
+
</dd>
|
83 |
+
<?php else: ?>
|
84 |
+
<dt><label class="required"><em>*</em><?php echo $attribute->getLabel() ?></label></dt>
|
85 |
+
<dd<?php if ($attribute->decoratedIsLast){?> class="last"<?php }?>>
|
86 |
+
<div class="input-box">
|
87 |
+
<select name="super_attribute[<?php echo $attribute->getAttributeId() ?>]" id="attribute<?php echo $attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
|
88 |
+
<option><?php echo $this->__('Choose an Option...') ?></option>
|
89 |
+
</select>
|
90 |
+
</div>
|
91 |
+
</dd>
|
92 |
+
<?php endif; ?>
|
93 |
+
<?php endforeach; ?>
|
94 |
+
</dl>
|
95 |
+
<script type="text/javascript">
|
96 |
+
var TonboColorpickerProduct = Class.create(Product.Config, {
|
97 |
+
selectElementPrefix: 'attribute',
|
98 |
+
selectedDataContainerPrefix: 'selected-data-container',
|
99 |
+
selectedAttributeClass: 'color-selected',
|
100 |
+
selectedOptionTitle: '<?php echo $this->__('Chosen color: '); ?>',
|
101 |
+
colorPickerInactiveClass: 'tcp-select-inactive',
|
102 |
+
colorPickerHiddenClass: 'hidden',
|
103 |
+
colorPickerLinkIdElement: '-option-link-',
|
104 |
+
optionLabels: {},
|
105 |
+
selectColor: function(event, attributeId, optionId) {
|
106 |
+
var element = Event.element(event);
|
107 |
+
return this._selectColorForElement(element, attributeId, optionId);
|
108 |
+
},
|
109 |
+
_selectColorForElement: function(element, attributeId, optionId) {
|
110 |
+
if (element.up().hasClassName(this.colorPickerInactiveClass)) {
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
var linkList = element.up(2).select('a');
|
114 |
+
var elementClass = this.selectedAttributeClass;
|
115 |
+
var destinationSelect = $(this.selectElementPrefix + attributeId);
|
116 |
+
var infoTab = $(this.selectedDataContainerPrefix + attributeId);
|
117 |
+
|
118 |
+
linkList.each(function(item) {
|
119 |
+
if ($(item).hasClassName(elementClass)) {
|
120 |
+
$(item).removeClassName(elementClass);
|
121 |
+
}
|
122 |
+
});
|
123 |
+
element.addClassName(elementClass);
|
124 |
+
destinationSelect.setValue(optionId);
|
125 |
+
if (infoTab) {
|
126 |
+
infoTab.show();
|
127 |
+
infoTab.update(this.selectedOptionTitle + this.optionLabels[attributeId.toString() + optionId]);
|
128 |
+
}
|
129 |
+
this.configureElement(destinationSelect);
|
130 |
+
return false;
|
131 |
+
},
|
132 |
+
_clearInfoTab: function(attributeId) {
|
133 |
+
var infoTab = $(this.selectedDataContainerPrefix + attributeId);
|
134 |
+
if (infoTab) {
|
135 |
+
infoTab.hide();
|
136 |
+
}
|
137 |
+
},
|
138 |
+
_getLabelElement: function(attributeId, optionId) {
|
139 |
+
return $(attributeId.toString() + '-option-label-full-' + optionId);
|
140 |
+
},
|
141 |
+
resetChildren: function($super, element) {
|
142 |
+
if(element.childSettings) {
|
143 |
+
for (var i = 0; i < element.childSettings.length; i++) {
|
144 |
+
var attributeId = element.childSettings[i].id.replace(/[a-z]*/, '');
|
145 |
+
var options = this.getAttributeOptions(attributeId);
|
146 |
+
for (var i = 0; i < options.length; i++) {
|
147 |
+
var linkElementId = $(attributeId + this.colorPickerLinkIdElement + options[i].id);
|
148 |
+
if (linkElementId) {
|
149 |
+
linkElementId.up().addClassName(this.colorPickerInactiveClass);
|
150 |
+
linkElementId.up().show();
|
151 |
+
linkElementId.removeClassName(this.selectedAttributeClass);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
this._clearInfoTab(attributeId);
|
155 |
+
}
|
156 |
+
}
|
157 |
+
return $super(element);
|
158 |
+
},
|
159 |
+
configureForValues: function ($super) {
|
160 |
+
$super(this);
|
161 |
+
if (this.values) {
|
162 |
+
this.settings.each(function(element){
|
163 |
+
var attributeId = element.attributeId;
|
164 |
+
if (typeof(this.values[attributeId]) != 'undefined') {
|
165 |
+
var linkElementId = $(attributeId + this.colorPickerLinkIdElement + this.values[attributeId]);
|
166 |
+
if (linkElementId) {
|
167 |
+
this._selectColorForElement(linkElementId, attributeId, this.values[attributeId]);
|
168 |
+
}
|
169 |
+
}
|
170 |
+
}.bind(this));
|
171 |
+
}
|
172 |
+
},
|
173 |
+
fillSelect: function(element) {
|
174 |
+
var attributeId = element.id.replace(/[a-z]*/, '');
|
175 |
+
var options = this.getAttributeOptions(attributeId);
|
176 |
+
var infoTab = $(this.selectedDataContainerPrefix + attributeId);
|
177 |
+
if (infoTab) {
|
178 |
+
infoTab.update('');
|
179 |
+
}
|
180 |
+
this.clearSelect(element);
|
181 |
+
element.options[0] = new Option(this.config.chooseText, '');
|
182 |
+
|
183 |
+
var prevConfig = false;
|
184 |
+
if (element.prevSetting) {
|
185 |
+
prevConfig = element.prevSetting.options[element.prevSetting.selectedIndex];
|
186 |
+
}
|
187 |
+
|
188 |
+
if (options) {
|
189 |
+
var index = 1;
|
190 |
+
for (var i = 0; i < options.length; i++) {
|
191 |
+
var allowedProducts = [];
|
192 |
+
if (prevConfig) {
|
193 |
+
for (var j = 0; j < options[i].products.length; j++) {
|
194 |
+
if(prevConfig.config.allowedProducts
|
195 |
+
&& prevConfig.config.allowedProducts.indexOf(options[i].products[j]) > -1) {
|
196 |
+
allowedProducts.push(options[i].products[j]);
|
197 |
+
}
|
198 |
+
}
|
199 |
+
} else {
|
200 |
+
allowedProducts = options[i].products.clone();
|
201 |
+
}
|
202 |
+
var linkElementId = $(attributeId + this.colorPickerLinkIdElement + options[i].id);
|
203 |
+
if (allowedProducts.size() > 0) {
|
204 |
+
options[i].allowedProducts = allowedProducts;
|
205 |
+
var elementText = this.getOptionLabel(options[i], options[i].price);
|
206 |
+
element.options[index] = new Option(elementText, options[i].id);
|
207 |
+
if (typeof options[i].price != 'undefined') {
|
208 |
+
element.options[index].setAttribute('price', options[i].price);
|
209 |
+
}
|
210 |
+
var labelElement = this._getLabelElement(attributeId, options[i].id);
|
211 |
+
this.optionLabels[attributeId.toString() + options[i].id] = elementText;
|
212 |
+
if (labelElement) {
|
213 |
+
labelElement.update(elementText);
|
214 |
+
}
|
215 |
+
element.options[index].config = options[i];
|
216 |
+
if (linkElementId) {
|
217 |
+
linkElementId.up().show();
|
218 |
+
if (linkElementId.up().hasClassName(this.colorPickerInactiveClass)) {
|
219 |
+
linkElementId.up().removeClassName(this.colorPickerInactiveClass);
|
220 |
+
}
|
221 |
+
}
|
222 |
+
index++;
|
223 |
+
} else {
|
224 |
+
if (linkElementId) {
|
225 |
+
if (linkElementId.up().hasClassName(this.colorPickerInactiveClass)) {
|
226 |
+
linkElementId.up().removeClassName(this.colorPickerInactiveClass);
|
227 |
+
}
|
228 |
+
if (linkElementId.up().visible()) {
|
229 |
+
linkElementId.up().hide();
|
230 |
+
linkElementId.removeClassName(this.selectedAttributeClass);
|
231 |
+
}
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
}
|
236 |
+
}
|
237 |
+
});
|
238 |
+
var spConfig = new TonboColorpickerProduct(<?php echo $this->getJsonConfig() ?>);
|
239 |
+
</script>
|
240 |
+
<?php endif;?>
|
app/etc/modules/Tonbo_ColorPicker.xml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Tonbo Inc
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
9 |
+
* that is bundled with this package in the file LICENSE.txt.
|
10 |
+
* It is also available through the world-wide-web at this URL:
|
11 |
+
* http://opensource.org/licenses/osl-3.0.php
|
12 |
+
*
|
13 |
+
* DISCLAIMER
|
14 |
+
*
|
15 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
16 |
+
* versions in the future.
|
17 |
+
*
|
18 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
19 |
+
* @email info@tonboinc.com
|
20 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
21 |
+
*/
|
22 |
+
-->
|
23 |
+
<config>
|
24 |
+
<modules>
|
25 |
+
<Tonbo_ColorPicker>
|
26 |
+
<active>true</active>
|
27 |
+
<codePool>community</codePool>
|
28 |
+
<depends>
|
29 |
+
<Mage_Catalog />
|
30 |
+
<Mage_CatalogSearch />
|
31 |
+
<Mage_Adminhtml />
|
32 |
+
</depends>
|
33 |
+
</Tonbo_ColorPicker>
|
34 |
+
</modules>
|
35 |
+
</config>
|
app/locale/de_DE/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Das System zeigt die ausgewählte Farbe, wenn das Bild nicht angegeben"
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Herunterladen Bedienungsanleitung</a>"
|
3 |
+
"Add attributes to the list","Hinzufügen von Attributen zur Liste"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Sind Sie sicher, dass Sie dieses Bild löschen? Wenn die Grafik nicht angegeben wird, wird das System zeigt die ausgewählte Farbe."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Attribute wurden automatisch zugeordnet"
|
7 |
+
"Azure","Azurblau"
|
8 |
+
"Choose an Option...","Wählen Sie eine Option..."
|
9 |
+
"Chosen color: ","Gewählte Farbe: "
|
10 |
+
"Clear All","Alle löschen"
|
11 |
+
"Click to select file","Klicken Sie auf Datei auswählen"
|
12 |
+
"Close","Schließen"
|
13 |
+
"Color was not detected","Die Farbe wurde nicht erkannt"
|
14 |
+
"Currently Shopping by:","Einkaufen nach:"
|
15 |
+
"Delete Image","Bild löschen"
|
16 |
+
"Display options","Anzeigeoptionen"
|
17 |
+
"Edit","Bearbeiten"
|
18 |
+
"Edit Attribute","Bearbeiten Attribut"
|
19 |
+
"Enable Tonbo Color Picker","Einschalten Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: Die Farbe wurde nicht erkannt"
|
21 |
+
"Error: Image was not deleted","Error: Das Bild wurde nicht gelöscht"
|
22 |
+
"File to upload","Datei zum Hochladen"
|
23 |
+
"File was not uploaded","Datei wurde nicht hochgeladen"
|
24 |
+
"for this attribute","für dieses attribut"
|
25 |
+
"Image was not uploaded","Das bild wurde nicht hochgeladen"
|
26 |
+
"Leopard","Leopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Mindestwert Bildgröße beträgt %sx%s Pixel"
|
28 |
+
"Move to Wishlist","Bewegen Sie den Wunschzettel"
|
29 |
+
"No Attribute Selected","Keine Attribute ausgewählt"
|
30 |
+
"Only %s extensions are allowed","Nur %s erweiterungen sind erlaubt"
|
31 |
+
"Please save the attribute before uploading an image","Bitte speichern Sie das Attribut vor dem Hochladen eines Bildes"
|
32 |
+
"Qty","Quantität"
|
33 |
+
"Remove attributes from list","Entfernen Sie Attribute aus der Liste"
|
34 |
+
"Remove item","Artikel entfernen"
|
35 |
+
"Remove This Item","Brechen Sie den Filter"
|
36 |
+
"Save Config to map this attribute","Save Config dieses Attribut zuordnen"
|
37 |
+
"Select attributes which specify colors for store","Wählen Sie Eigenschaften, die Farben für Speicher angeben"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Einige der Parameter dieses Attribut ist nicht definiert. Klicken Sie auf ""Bearbeiten"", um dieses Attribut zu steuern."
|
39 |
+
"This attribute has been successfully mapped","Attribut Parameter erfolgreich gesetzt"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Bild hochladen"
|
42 |
+
"Upload Information","Informationen hochladen"
|
43 |
+
"White","Weiß"
|
44 |
+
"Zoom Image","Bild vergrößern"
|
app/locale/en_CA/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*The system will display selected color if image is not specified."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>"
|
3 |
+
"Add attributes to the list","Add attributes to the list"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Are you sure you want to delete this image? If image is not specified, system will display the selected color."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Attributes were assigned automatically"
|
7 |
+
"Azure","Azure"
|
8 |
+
"Choose an Option...","Choose an Option..."
|
9 |
+
"Chosen color: ","Chosen color: "
|
10 |
+
"Clear All","Clear All"
|
11 |
+
"Click to select file","Click to select file"
|
12 |
+
"Close","Close"
|
13 |
+
"Color was not detected","Color was not detected"
|
14 |
+
"Currently Shopping by:","Currently Shopping by:"
|
15 |
+
"Delete Image","Delete Image"
|
16 |
+
"Display options","Display options"
|
17 |
+
"Edit","Edit"
|
18 |
+
"Edit Attribute","Edit Attribute"
|
19 |
+
"Enable Tonbo Color Picker","Enable Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: Color was not detected"
|
21 |
+
"Error: Image was not deleted","Error: Image was not deleted"
|
22 |
+
"File to upload","File to upload"
|
23 |
+
"File was not uploaded","File was not uploaded"
|
24 |
+
"for this attribute","for this attribute"
|
25 |
+
"Image was not uploaded","Image was not uploaded"
|
26 |
+
"Leopard","Leopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Minimum allowed image size is %sx%s px."
|
28 |
+
"Move to Wishlist","Move to Wishlist"
|
29 |
+
"No Attribute Selected","No Attribute Selected"
|
30 |
+
"Only %s extensions are allowed","Only %s extensions are allowed"
|
31 |
+
"Please save the attribute before uploading an image","Please save the attribute before uploading an image"
|
32 |
+
"Qty","Qty"
|
33 |
+
"Remove attributes from list","Remove attributes from list"
|
34 |
+
"Remove item","Remove item"
|
35 |
+
"Remove This Item","Remove This Item"
|
36 |
+
"Save Config to map this attribute","Save Config to map this attribute"
|
37 |
+
"Select attributes which specify colors for store","Select attributes which specify colors for store"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute."
|
39 |
+
"This attribute has been successfully mapped","This attribute has been successfully mapped"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Upload Image"
|
42 |
+
"Upload Information","Upload Information"
|
43 |
+
"White","White"
|
44 |
+
"Zoom Image","Zoom Image"
|
app/locale/en_GB/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*The system will display selected color if image is not specified."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>"
|
3 |
+
"Add attributes to the list","Add attributes to the list"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Are you sure you want to delete this image? If image is not specified, system will display the selected color."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Attributes were assigned automatically"
|
7 |
+
"Azure","Azure"
|
8 |
+
"Choose an Option...","Choose an Option..."
|
9 |
+
"Chosen color: ","Chosen color: "
|
10 |
+
"Clear All","Clear All"
|
11 |
+
"Click to select file","Click to select file"
|
12 |
+
"Close","Close"
|
13 |
+
"Color was not detected","Color was not detected"
|
14 |
+
"Currently Shopping by:","Currently Shopping by:"
|
15 |
+
"Delete Image","Delete Image"
|
16 |
+
"Display options","Display options"
|
17 |
+
"Edit","Edit"
|
18 |
+
"Edit Attribute","Edit Attribute"
|
19 |
+
"Enable Tonbo Color Picker","Enable Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: Color was not detected"
|
21 |
+
"Error: Image was not deleted","Error: Image was not deleted"
|
22 |
+
"File to upload","File to upload"
|
23 |
+
"File was not uploaded","File was not uploaded"
|
24 |
+
"for this attribute","for this attribute"
|
25 |
+
"Image was not uploaded","Image was not uploaded"
|
26 |
+
"Leopard","Leopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Minimum allowed image size is %sx%s px."
|
28 |
+
"Move to Wishlist","Move to Wishlist"
|
29 |
+
"No Attribute Selected","No Attribute Selected"
|
30 |
+
"Only %s extensions are allowed","Only %s extensions are allowed"
|
31 |
+
"Please save the attribute before uploading an image","Please save the attribute before uploading an image"
|
32 |
+
"Qty","Qty"
|
33 |
+
"Remove attributes from list","Remove attributes from list"
|
34 |
+
"Remove item","Remove item"
|
35 |
+
"Remove This Item","Remove This Item"
|
36 |
+
"Save Config to map this attribute","Save Config to map this attribute"
|
37 |
+
"Select attributes which specify colors for store","Select attributes which specify colors for store"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute."
|
39 |
+
"This attribute has been successfully mapped","This attribute has been successfully mapped"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Upload Image"
|
42 |
+
"Upload Information","Upload Information"
|
43 |
+
"White","White"
|
44 |
+
"Zoom Image","Zoom Image"
|
app/locale/en_US/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*The system will display selected color if image is not specified."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>"
|
3 |
+
"Add attributes to list","Add attributes to list"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Are you sure you want to delete this image? If image is not specified, system will display the selected color."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Attributes were assigned automatically"
|
7 |
+
"Azure","Azure"
|
8 |
+
"Choose an Option...","Choose an Option..."
|
9 |
+
"Chosen color: ","Chosen color: "
|
10 |
+
"Clear All","Clear All"
|
11 |
+
"Click to select file","Click to select file"
|
12 |
+
"Close","Close"
|
13 |
+
"Color was not detected","Color was not detected"
|
14 |
+
"Currently Shopping by:","Currently Shopping by:"
|
15 |
+
"Delete Image","Delete Image"
|
16 |
+
"Display options","Display options"
|
17 |
+
"Edit","Edit"
|
18 |
+
"Edit Attribute","Edit Attribute"
|
19 |
+
"Enable Tonbo Color Picker","Enable Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: Color was not detected"
|
21 |
+
"Error: Image was not deleted","Error: Image was not deleted"
|
22 |
+
"File to upload","File to upload"
|
23 |
+
"File was not uploaded","File was not uploaded"
|
24 |
+
"for this attribute","for this attribute"
|
25 |
+
"Image was not uploaded","Image was not uploaded"
|
26 |
+
"Leopard","Leopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Minimum allowed image size is %sx%s px."
|
28 |
+
"Move to Wishlist","Move to Wishlist"
|
29 |
+
"No Attribute Selected","No Attribute Selected"
|
30 |
+
"Only %s extensions are allowed","Only %s extensions are allowed"
|
31 |
+
"Please save the attribute before uploading an image","Please save the attribute before uploading an image"
|
32 |
+
"Qty","Qty"
|
33 |
+
"Remove attributes from list","Remove attributes from list"
|
34 |
+
"Remove item","Remove item"
|
35 |
+
"Remove This Item","Remove This Item"
|
36 |
+
"Save Config to map this attribute","Save Config to map this attribute"
|
37 |
+
"Select attributes which specify colors for store","Select attributes which specify colors for store"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute."
|
39 |
+
"This attribute has been successfully mapped","This attribute has been successfully mapped"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Upload Image"
|
42 |
+
"Upload Information","Upload Information"
|
43 |
+
"White","White"
|
44 |
+
"Zoom Image","Zoom Image"
|
app/locale/es_AR/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*El sistema mostrará el color seleccionado si la imagen no se especifica."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Descargar manual de usuario</a>"
|
3 |
+
"Add attributes to the list","Añadir atributos a la lista"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","¿Seguro que quieres eliminar esta imagen? Si la imagen no se especifica, el sistema mostrará el color seleccionado."
|
5 |
+
"Army Green","Ejército Verde"
|
6 |
+
"Attributes were assigned automatically","Los atributos se asignan automáticamente"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Seleccione una opción..."
|
9 |
+
"Chosen color: ","Color elegido: "
|
10 |
+
"Clear All","Borrar todo"
|
11 |
+
"Click to select file","Haga clic para seleccionar el archivo"
|
12 |
+
"Close","Cerrar"
|
13 |
+
"Color was not detected","No se detectó color"
|
14 |
+
"Currently Shopping by:","Actualmente está comprando por:"
|
15 |
+
"Delete Image","Eliminar imagen"
|
16 |
+
"Display options","Opciones de visualización"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Encender Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: No se detectó color"
|
21 |
+
"Error: Image was not deleted","Error: La imagen no ha sido eliminada"
|
22 |
+
"File to upload","Archivo para cargar"
|
23 |
+
"File was not uploaded","El archivo no se ha subido"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","La imagen no se ha subido"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","El tamaño mínimo permitido la imagen es de %sx%s píxeles"
|
28 |
+
"Move to Wishlist","Mover a la Lista de Deseos"
|
29 |
+
"No Attribute Selected","No atributo seleccionado"
|
30 |
+
"Only %s extensions are allowed","Sólo %s extensiones se les permite"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, guarde el atributo antes de subir una imagen"
|
32 |
+
"Qty","Сantidad"
|
33 |
+
"Remove attributes from list","Eliminar los atributos de la lista"
|
34 |
+
"Remove item","Eliminar elemento"
|
35 |
+
"Remove This Item","Cancelar el filtro"
|
36 |
+
"Save Config to map this attribute","Guardar configuración para asignar este atributo"
|
37 |
+
"Select attributes which specify colors for store","Seleccione los atributos que especifican colores para tienda"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Algunos de los parámetros de este atributo no está definido. Haga clic en ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parámetros de atributos se establecen con éxito"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Subir imagen"
|
42 |
+
"Upload Information","Subir Información"
|
43 |
+
"White","Blanco"
|
44 |
+
"Zoom Image","Ampliar la imagen"
|
app/locale/es_CO/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*El sistema mostrará el color seleccionado si la imagen no se especifica."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Descargar manual de usuario</a>"
|
3 |
+
"Add attributes to the list","Añadir atributos a la lista"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","¿Seguro que quieres eliminar esta imagen? Si la imagen no se especifica, el sistema mostrará el color seleccionado."
|
5 |
+
"Army Green","Ejército Verde"
|
6 |
+
"Attributes were assigned automatically","Los atributos se asignan automáticamente"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Seleccione una opción..."
|
9 |
+
"Chosen color: ","Color elegido: "
|
10 |
+
"Clear All","Borrar todo"
|
11 |
+
"Click to select file","Haga clic para seleccionar el archivo"
|
12 |
+
"Close","Cerrar"
|
13 |
+
"Color was not detected","No se detectó color"
|
14 |
+
"Currently Shopping by:","Actualmente está comprando por:"
|
15 |
+
"Delete Image","Eliminar imagen"
|
16 |
+
"Display options","Opciones de visualización"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Encender Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: No se detectó color"
|
21 |
+
"Error: Image was not deleted","Error: La imagen no ha sido eliminada"
|
22 |
+
"File to upload","Archivo para cargar"
|
23 |
+
"File was not uploaded","El archivo no se ha subido"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","La imagen no se ha subido"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","El tamaño mínimo permitido la imagen es de %sx%s píxeles"
|
28 |
+
"Move to Wishlist","Mover a la Lista de Deseos"
|
29 |
+
"No Attribute Selected","No atributo seleccionado"
|
30 |
+
"Only %s extensions are allowed","Sólo %s extensiones se les permite"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, guarde el atributo antes de subir una imagen"
|
32 |
+
"Qty","Сantidad"
|
33 |
+
"Remove attributes from list","Eliminar los atributos de la lista"
|
34 |
+
"Remove item","Eliminar elemento"
|
35 |
+
"Remove This Item","Cancelar el filtro"
|
36 |
+
"Save Config to map this attribute","Guardar configuración para asignar este atributo"
|
37 |
+
"Select attributes which specify colors for store","Seleccione los atributos que especifican colores para tienda"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Algunos de los parámetros de este atributo no está definido. Haga clic en ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parámetros de atributos se establecen con éxito"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Subir imagen"
|
42 |
+
"Upload Information","Subir Información"
|
43 |
+
"White","Blanco"
|
44 |
+
"Zoom Image","Ampliar la imagen"
|
app/locale/es_ES/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*El sistema mostrará el color seleccionado si la imagen no se especifica."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Descargar manual de usuario</a>"
|
3 |
+
"Add attributes to the list","Añadir atributos a la lista"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","¿Seguro que quieres eliminar esta imagen? Si la imagen no se especifica, el sistema mostrará el color seleccionado."
|
5 |
+
"Army Green","Ejército Verde"
|
6 |
+
"Attributes were assigned automatically","Los atributos se asignan automáticamente"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Seleccione una opción..."
|
9 |
+
"Chosen color: ","Color elegido: "
|
10 |
+
"Clear All","Borrar todo"
|
11 |
+
"Click to select file","Haga clic para seleccionar el archivo"
|
12 |
+
"Close","Cerrar"
|
13 |
+
"Color was not detected","No se detectó color"
|
14 |
+
"Currently Shopping by:","Actualmente está comprando por:"
|
15 |
+
"Delete Image","Eliminar imagen"
|
16 |
+
"Display options","Opciones de visualización"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Encender Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: No se detectó color"
|
21 |
+
"Error: Image was not deleted","Error: La imagen no ha sido eliminada"
|
22 |
+
"File to upload","Archivo para cargar"
|
23 |
+
"File was not uploaded","El archivo no se ha subido"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","La imagen no se ha subido"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","El tamaño mínimo permitido la imagen es de %sx%s píxeles"
|
28 |
+
"Move to Wishlist","Mover a la Lista de Deseos"
|
29 |
+
"No Attribute Selected","No atributo seleccionado"
|
30 |
+
"Only %s extensions are allowed","Sólo %s extensiones se les permite"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, guarde el atributo antes de subir una imagen"
|
32 |
+
"Qty","Сantidad"
|
33 |
+
"Remove attributes from list","Eliminar los atributos de la lista"
|
34 |
+
"Remove item","Eliminar elemento"
|
35 |
+
"Remove This Item","Cancelar el filtro"
|
36 |
+
"Save Config to map this attribute","Guardar configuración para asignar este atributo"
|
37 |
+
"Select attributes which specify colors for store","Seleccione los atributos que especifican colores para tienda"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Algunos de los parámetros de este atributo no está definido. Haga clic en ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parámetros de atributos se establecen con éxito"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Subir imagen"
|
42 |
+
"Upload Information","Subir Información"
|
43 |
+
"White","Blanco"
|
44 |
+
"Zoom Image","Ampliar la imagen"
|
app/locale/es_MX/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*El sistema mostrará el color seleccionado si la imagen no se especifica."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Descargar manual de usuario</a>"
|
3 |
+
"Add attributes to the list","Añadir atributos a la lista"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","¿Seguro que quieres eliminar esta imagen? Si la imagen no se especifica, el sistema mostrará el color seleccionado."
|
5 |
+
"Army Green","Ejército Verde"
|
6 |
+
"Attributes were assigned automatically","Los atributos se asignan automáticamente"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Seleccione una opción..."
|
9 |
+
"Chosen color: ","Color elegido: "
|
10 |
+
"Clear All","Borrar todo"
|
11 |
+
"Click to select file","Haga clic para seleccionar el archivo"
|
12 |
+
"Close","Cerrar"
|
13 |
+
"Color was not detected","No se detectó color"
|
14 |
+
"Currently Shopping by:","Actualmente está comprando por:"
|
15 |
+
"Delete Image","Eliminar imagen"
|
16 |
+
"Display options","Opciones de visualización"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Encender Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: No se detectó color"
|
21 |
+
"Error: Image was not deleted","Error: La imagen no ha sido eliminada"
|
22 |
+
"File to upload","Archivo para cargar"
|
23 |
+
"File was not uploaded","El archivo no se ha subido"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","La imagen no se ha subido"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","El tamaño mínimo permitido la imagen es de %sx%s píxeles"
|
28 |
+
"Move to Wishlist","Mover a la Lista de Deseos"
|
29 |
+
"No Attribute Selected","No atributo seleccionado"
|
30 |
+
"Only %s extensions are allowed","Sólo %s extensiones se les permite"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, guarde el atributo antes de subir una imagen"
|
32 |
+
"Qty","Сantidad"
|
33 |
+
"Remove attributes from list","Eliminar los atributos de la lista"
|
34 |
+
"Remove item","Eliminar elemento"
|
35 |
+
"Remove This Item","Cancelar el filtro"
|
36 |
+
"Save Config to map this attribute","Guardar configuración para asignar este atributo"
|
37 |
+
"Select attributes which specify colors for store","Seleccione los atributos que especifican colores para tienda"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Algunos de los parámetros de este atributo no está definido. Haga clic en ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parámetros de atributos se establecen con éxito"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Subir imagen"
|
42 |
+
"Upload Information","Subir Información"
|
43 |
+
"White","Blanco"
|
44 |
+
"Zoom Image","Ampliar la imagen"
|
app/locale/fr_CA/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Le système affiche la couleur sélectionnée si l'image n'est pas précisé."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Télécharger le mode d'emploi</a>"
|
3 |
+
"Add attributes to the list","Ajouter des attributs à la liste"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Êtes-vous sûr de vouloir supprimer cette image? Si l'image n'est pas spécifié, le système affiche la couleur sélectionnée."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Des attributs ont été attribués automatiquement"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Choisissez une option..."
|
9 |
+
"Chosen color: ","Couleur choisie: "
|
10 |
+
"Clear All","Effacer tout"
|
11 |
+
"Click to select file","Cliquez sur pour sélectionner le fichier"
|
12 |
+
"Close","Fermer"
|
13 |
+
"Color was not detected","Couleur n'a pas été détecté"
|
14 |
+
"Currently Shopping by:","Magasiner par:"
|
15 |
+
"Delete Image","Supprimer l'image"
|
16 |
+
"Display options","Options d'affichage"
|
17 |
+
"Edit","éditer"
|
18 |
+
"Edit Attribute","Modifier un attribut"
|
19 |
+
"Enable Tonbo Color Picker","Activer Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Erreur: Couleur n'a pas été détecté"
|
21 |
+
"Error: Image was not deleted","Error: L'image a été pas supprimé"
|
22 |
+
"File to upload","Fichier à télécharger"
|
23 |
+
"File was not uploaded","Le fichier a été téléchargé pas"
|
24 |
+
"for this attribute","pour cet attribut"
|
25 |
+
"Image was not uploaded","L'image a été pas envoyé"
|
26 |
+
"Leopard","léopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Taille d'image minimale autorisée est de %sx%s px."
|
28 |
+
"Move to Wishlist","Déplacer à la liste"
|
29 |
+
"No Attribute Selected","Aucun attribut sélectionné"
|
30 |
+
"Only %s extensions are allowed","Seuls %s extensions sont autorisées"
|
31 |
+
"Please save the attribute before uploading an image","S'il vous plaît sauver l'attribut avant de télécharger une image"
|
32 |
+
"Qty","Quantité"
|
33 |
+
"Remove attributes from list","Supprimez les attributs de la liste"
|
34 |
+
"Remove item","supprimer l'élément"
|
35 |
+
"Remove This Item","Annuler le filtrage"
|
36 |
+
"Save Config to map this attribute","Save Config pour cartographier cet attribut"
|
37 |
+
"Select attributes which specify colors for store","Sélectionnez les attributs qui spécifient les couleurs pour le magasin"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Certains des paramètres de cet attribut n'est pas défini. Cliquez sur ""éditer"" pour commander cet attribut."
|
39 |
+
"This attribute has been successfully mapped","Paramètres d'attributs sont définis avec succès"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Télécharger l'image"
|
42 |
+
"Upload Information","Téléchargez l'information"
|
43 |
+
"White","Weiß"
|
44 |
+
"Zoom Image","Agrandir l'image"
|
app/locale/fr_FR/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Le système affiche la couleur sélectionnée si l'image n'est pas précisé."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Télécharger le mode d'emploi</a>"
|
3 |
+
"Add attributes to the list","Ajouter des attributs à la liste"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Êtes-vous sûr de vouloir supprimer cette image? Si l'image n'est pas spécifié, le système affiche la couleur sélectionnée."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Des attributs ont été attribués automatiquement"
|
7 |
+
"Azure","Azur"
|
8 |
+
"Choose an Option...","Choisissez une option..."
|
9 |
+
"Chosen color: ","Couleur choisie: "
|
10 |
+
"Clear All","Effacer tout"
|
11 |
+
"Click to select file","Cliquez sur pour sélectionner le fichier"
|
12 |
+
"Close","Fermer"
|
13 |
+
"Color was not detected","Couleur n'a pas été détecté"
|
14 |
+
"Currently Shopping by:","Magasiner par:"
|
15 |
+
"Delete Image","Supprimer l'image"
|
16 |
+
"Display options","Options d'affichage"
|
17 |
+
"Edit","éditer"
|
18 |
+
"Edit Attribute","Modifier un attribut"
|
19 |
+
"Enable Tonbo Color Picker","Activer Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Erreur: Couleur n'a pas été détecté"
|
21 |
+
"Error: Image was not deleted","Error: L'image a été pas supprimé"
|
22 |
+
"File to upload","Fichier à télécharger"
|
23 |
+
"File was not uploaded","Le fichier a été téléchargé pas"
|
24 |
+
"for this attribute","pour cet attribut"
|
25 |
+
"Image was not uploaded","L'image a été pas envoyé"
|
26 |
+
"Leopard","léopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Taille d'image minimale autorisée est de %sx%s px."
|
28 |
+
"Move to Wishlist","Déplacer à la liste"
|
29 |
+
"No Attribute Selected","Aucun attribut sélectionné"
|
30 |
+
"Only %s extensions are allowed","Seuls %s extensions sont autorisées"
|
31 |
+
"Please save the attribute before uploading an image","S'il vous plaît sauver l'attribut avant de télécharger une image"
|
32 |
+
"Qty","Quantité"
|
33 |
+
"Remove attributes from list","Supprimez les attributs de la liste"
|
34 |
+
"Remove item","supprimer l'élément"
|
35 |
+
"Remove This Item","Annuler le filtrage"
|
36 |
+
"Save Config to map this attribute","Save Config pour cartographier cet attribut"
|
37 |
+
"Select attributes which specify colors for store","Sélectionnez les attributs qui spécifient les couleurs pour le magasin"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Certains des paramètres de cet attribut n'est pas défini. Cliquez sur ""éditer"" pour commander cet attribut."
|
39 |
+
"This attribute has been successfully mapped","Paramètres d'attributs sont définis avec succès"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Télécharger l'image"
|
42 |
+
"Upload Information","Téléchargez l'information"
|
43 |
+
"White","Weiß"
|
44 |
+
"Zoom Image","Agrandir l'image"
|
app/locale/it_IT/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Il sistema visualizzerà colore selezionato se l'immagine non è specificato"
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Scarica il manuale</a>"
|
3 |
+
"Add attributes to the list","Aggiungere attributi nella lista"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Sei sicuro di voler cancellare questa immagine? Se l'immagine non viene specificato, il sistema visualizza il colore selezionato."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Gli attributi sono stati assegnati automaticamente"
|
7 |
+
"Azure","Azure"
|
8 |
+
"Choose an Option...","Scegli una Opzione…"
|
9 |
+
"Chosen color: ","Colore scelto: "
|
10 |
+
"Clear All","Cancella tutto"
|
11 |
+
"Click to select file","Fare clic per selezionare il file"
|
12 |
+
"Close","Сhiudere"
|
13 |
+
"Color was not detected","Il colore non è stato rilevato"
|
14 |
+
"Currently Shopping by:","Attualmente acquisti da:"
|
15 |
+
"Delete Image","Elimina immagine"
|
16 |
+
"Display options","Opzioni di visualizzazione"
|
17 |
+
"Edit","Modifica"
|
18 |
+
"Edit Attribute","Modifica Attributo"
|
19 |
+
"Enable Tonbo Color Picker","Attiva Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Errore: Il colore non è stato rilevato"
|
21 |
+
"Error: Image was not deleted","Errore: L'immagine non è stata cancellata"
|
22 |
+
"File to upload","File da caricare"
|
23 |
+
"File was not uploaded","Il file non è stato caricato"
|
24 |
+
"for this attribute","per questo attributo"
|
25 |
+
"Image was not uploaded","L'immagine non è stato caricato"
|
26 |
+
"Leopard","Leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Dimensione minima dell'immagine è consentita %sx%s px."
|
28 |
+
"Move to Wishlist","Spostarsi alla Wishlist"
|
29 |
+
"No Attribute Selected","Nessun attributo selezionato"
|
30 |
+
"Only %s extensions are allowed","Solo %s estensioni sono permessi"
|
31 |
+
"Please save the attribute before uploading an image","Si prega di conservare l'attributo prima di caricare una immagine"
|
32 |
+
"Qty","Quantità"
|
33 |
+
"Remove attributes from list","Rimuovere gli attributi dalla lista"
|
34 |
+
"Remove item","Rimuovere voce"
|
35 |
+
"Remove This Item","Annulla i filtri"
|
36 |
+
"Save Config to map this attribute","Save Config per mappare questo attributo"
|
37 |
+
"Select attributes which specify colors for store","Selezionare gli attributi che specificano i colori per negozio"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Alcuni valori di questo attributo non sono state mappate. Fare clic su ""Modifica""-icona per gestire questo attributo."
|
39 |
+
"This attribute has been successfully mapped","Questo attributo è stato mappato con successo"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Carica immagine"
|
42 |
+
"Upload Information","Carica Informazioni"
|
43 |
+
"White","Bianco"
|
44 |
+
"Zoom Image","Zoom Immagine"
|
app/locale/nl_NL/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Het systeem geeft de geselecteerde kleur als afbeelding wordt niet gespecificeerd."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download gebruikershandleiding</a>"
|
3 |
+
"Add attributes to the list","Attributen toe te voegen aan de lijst"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Weet u zeker dat u deze afbeelding wilt verwijderen? Als beeld niet is opgegeven, zal het systeem weer te geven van de geselecteerde kleur."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Attributen werden automatisch toegewezen"
|
7 |
+
"Azure","Azuur"
|
8 |
+
"Choose an Option...","Kies een optie..."
|
9 |
+
"Chosen color: ","Gekozen kleur: "
|
10 |
+
"Clear All","Verwijder alle"
|
11 |
+
"Click to select file","Klik om bestand te selecteren"
|
12 |
+
"Close","Sluit"
|
13 |
+
"Color was not detected","Kleur werd niet gedetecteerd"
|
14 |
+
"Currently Shopping by:","Momenteel zoekt u op:"
|
15 |
+
"Delete Image","Afbeelding verwijderen"
|
16 |
+
"Display options","Weergegeven opties"
|
17 |
+
"Edit","Redigeren"
|
18 |
+
"Edit Attribute","Attribuut bewerken"
|
19 |
+
"Enable Tonbo Color Picker","Omvatten Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: Kleur werd niet gedetecteerd"
|
21 |
+
"Error: Image was not deleted","Error: Afbeelding werd niet verwijderd"
|
22 |
+
"File to upload","Bestand te uploaden"
|
23 |
+
"File was not uploaded","Bestand is niet geupload"
|
24 |
+
"for this attribute","voor dit kenmerk"
|
25 |
+
"Image was not uploaded","Afbeelding werd niet geupload"
|
26 |
+
"Leopard","Leopard"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Minimaal toegestane beeldformaat is %sx%s px."
|
28 |
+
"Move to Wishlist","Ga naar verlanglijst"
|
29 |
+
"No Attribute Selected","Geen Attribuut Geselecteerde"
|
30 |
+
"Only %s extensions are allowed","Slechts %s extensies zijn toegestaan"
|
31 |
+
"Please save the attribute before uploading an image","Sla het attribuut voor het uploaden van een afbeelding"
|
32 |
+
"Qty","Kwantiteit"
|
33 |
+
"Remove attributes from list","Verwijderen attributen uit lijst"
|
34 |
+
"Remove item","Verwijder item"
|
35 |
+
"Remove This Item","Annuleer de filter"
|
36 |
+
"Save Config to map this attribute","Save Config om deze eigenschap in kaart"
|
37 |
+
"Select attributes which specify colors for store","Selecteer attributen die kleuren voor winkel opgeven"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Sommige parameters van deze eigenschap is niet gedefinieerd. Klik op ""Redigeren"" om dit kenmerk te controleren."
|
39 |
+
"This attribute has been successfully mapped","Attribuut parameters worden met succes"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Upload Afbeelding"
|
42 |
+
"Upload Information","Downloaden informatie"
|
43 |
+
"White","Wit"
|
44 |
+
"Zoom Image","Zoom beeld"
|
app/locale/pt_BR/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*O sistema irá exibir a cor selecionada se a imagem não é especificado."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Baixe o manual do usuário</a>"
|
3 |
+
"Add attributes to the list","Adicionar à lista de atributos"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Tem certeza de que deseja apagar esta imagem? Se a imagem não for especificado, o sistema irá exibir a cor selecionada."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Atributos foram atribuídos automaticamente"
|
7 |
+
"Azure","Azul"
|
8 |
+
"Choose an Option...","Escolha uma opção..."
|
9 |
+
"Chosen color: ","Cor escolhida: "
|
10 |
+
"Clear All","Limpar tudo"
|
11 |
+
"Click to select file","Clique para selecionar o arquivo"
|
12 |
+
"Close","Fechar"
|
13 |
+
"Color was not detected","A cor não foi detectado"
|
14 |
+
"Currently Shopping by:","Atualmente comprando por:"
|
15 |
+
"Delete Image","Apagar imagem"
|
16 |
+
"Display options","As opções de exibição"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Ligar Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: A cor não foi detectado"
|
21 |
+
"Error: Image was not deleted","Error: A imagem não foi excluída"
|
22 |
+
"File to upload","Arquivo para upload"
|
23 |
+
"File was not uploaded","O arquivo não foi carregado"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","A imagem não foi carregado"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Tamanho da imagem permitido mínima é de %sx%s px"
|
28 |
+
"Move to Wishlist","Mover para Lista de Desejos"
|
29 |
+
"No Attribute Selected","No atributo selecionado"
|
30 |
+
"Only %s extensions are allowed","Apenas %s extensões são permitidos"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, salve o atributo antes de fazer upload de uma imagem"
|
32 |
+
"Qty","Quantidade"
|
33 |
+
"Remove attributes from list","Remova os atributos da lista"
|
34 |
+
"Remove item","Remover item"
|
35 |
+
"Remove This Item","Cancelar o filtro"
|
36 |
+
"Save Config to map this attribute","Salvar Config para mapear esse atributo"
|
37 |
+
"Select attributes which specify colors for store","Selecione os atributos que especificam as cores para loja"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Alguns dos parâmetros deste atributo não está definido. Clique em ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parâmetros de atributos são definidos com sucesso"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Enviar Imagem"
|
42 |
+
"Upload Information","Envie Informações"
|
43 |
+
"White","Branco"
|
44 |
+
"Zoom Image","Zoom de imagem"
|
app/locale/pt_PT/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*O sistema irá exibir a cor selecionada se a imagem não é especificado."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Baixe o manual do usuário</a>"
|
3 |
+
"Add attributes to the list","Adicionar à lista de atributos"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Tem certeza de que deseja apagar esta imagem? Se a imagem não for especificado, o sistema irá exibir a cor selecionada."
|
5 |
+
"Army Green","Army Green"
|
6 |
+
"Attributes were assigned automatically","Atributos foram atribuídos automaticamente"
|
7 |
+
"Azure","Azul"
|
8 |
+
"Choose an Option...","Escolha uma opção..."
|
9 |
+
"Chosen color: ","Cor escolhida: "
|
10 |
+
"Clear All","Limpar tudo"
|
11 |
+
"Click to select file","Clique para selecionar o arquivo"
|
12 |
+
"Close","Fechar"
|
13 |
+
"Color was not detected","A cor não foi detectado"
|
14 |
+
"Currently Shopping by:","Atualmente comprando por:"
|
15 |
+
"Delete Image","Apagar imagem"
|
16 |
+
"Display options","As opções de exibição"
|
17 |
+
"Edit","Editar"
|
18 |
+
"Edit Attribute","Editar Atributo"
|
19 |
+
"Enable Tonbo Color Picker","Ligar Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Error: A cor não foi detectado"
|
21 |
+
"Error: Image was not deleted","Error: A imagem não foi excluída"
|
22 |
+
"File to upload","Arquivo para upload"
|
23 |
+
"File was not uploaded","O arquivo não foi carregado"
|
24 |
+
"for this attribute","para este atributo"
|
25 |
+
"Image was not uploaded","A imagem não foi carregado"
|
26 |
+
"Leopard","leopardo"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Tamanho da imagem permitido mínima é de %sx%s px"
|
28 |
+
"Move to Wishlist","Mover para Lista de Desejos"
|
29 |
+
"No Attribute Selected","No atributo selecionado"
|
30 |
+
"Only %s extensions are allowed","Apenas %s extensões são permitidos"
|
31 |
+
"Please save the attribute before uploading an image","Por favor, salve o atributo antes de fazer upload de uma imagem"
|
32 |
+
"Qty","Quantidade"
|
33 |
+
"Remove attributes from list","Remova os atributos da lista"
|
34 |
+
"Remove item","Remover item"
|
35 |
+
"Remove This Item","Cancelar o filtro"
|
36 |
+
"Save Config to map this attribute","Salvar Config para mapear esse atributo"
|
37 |
+
"Select attributes which specify colors for store","Selecione os atributos que especificam as cores para loja"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Alguns dos parâmetros deste atributo não está definido. Clique em ""Editar"" para controlar este atributo."
|
39 |
+
"This attribute has been successfully mapped","Parâmetros de atributos são definidos com sucesso"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Enviar Imagem"
|
42 |
+
"Upload Information","Envie Informações"
|
43 |
+
"White","Branco"
|
44 |
+
"Zoom Image","Zoom de imagem"
|
app/locale/ru_RU/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Система будет отображать выбранный цвет, если картинка отсутствует."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Загрузить руководство пользователя</a>"
|
3 |
+
"Add attributes to the list","Добавить атрибут в список"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Вы уверены, что хотите удалить это изображение? В случае удаления изображения система покажет выбранный цвет."
|
5 |
+
"Army Green","Армейский зеленый"
|
6 |
+
"Attributes were assigned automatically","Атрибуты были назначены автоматически"
|
7 |
+
"Azure","Лазурный"
|
8 |
+
"Choose an Option...","Выбрать опцию…"
|
9 |
+
"Chosen color: ","Выбранный цвет: "
|
10 |
+
"Clear All","Очистить все"
|
11 |
+
"Click to select file","Кликнуть для выбора файла"
|
12 |
+
"Close","Закрыть"
|
13 |
+
"Color was not detected","Цвет не определен"
|
14 |
+
"Currently Shopping by:","Просмотр товаров по:"
|
15 |
+
"Delete Image","Удалить картинку"
|
16 |
+
"Display options","Параметры отображения"
|
17 |
+
"Edit","Редактировать"
|
18 |
+
"Edit Attribute","Редактировать атрибут"
|
19 |
+
"Enable Tonbo Color Picker","Включить Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Ошибка: Цвет не определен"
|
21 |
+
"Error: Image was not deleted","Ошибка: Картинка не удалена"
|
22 |
+
"File to upload","Файл для загрузки"
|
23 |
+
"File was not uploaded","Файл не загружен"
|
24 |
+
"for this attribute","для этого атрибута"
|
25 |
+
"Image was not uploaded","Картинка не загружена"
|
26 |
+
"Leopard","Леопард"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Минимальный размер изображения %sx%s px."
|
28 |
+
"Move to Wishlist","Переместить в "Список пожеланий""
|
29 |
+
"No Attribute Selected","Атрибут не выбран"
|
30 |
+
"Only %s extensions are allowed","Разрешены только %s"
|
31 |
+
"Please save the attribute before uploading an image","Пожалуйста, сохраните атрибут, прежде чем загружать картинку"
|
32 |
+
"Qty","Количество"
|
33 |
+
"Remove attributes from list","Удалить атрибуты из списка"
|
34 |
+
"Remove item","Удалить продукт"
|
35 |
+
"Remove This Item","Отменить фильтр"
|
36 |
+
"Save Config to map this attribute","Сохраните конфигурацию перед настройкой этого атрибута"
|
37 |
+
"Select attributes which specify colors for store","Выберите атрибуты, которые определяют цвета для магазина"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Некоторые параметры этого атрибута не определены. Нажмите кнопку ""Редактировать"" для управления этим атрибутом."
|
39 |
+
"This attribute has been successfully mapped","Параметры атрибута установлены успешно"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Загрузить картинку"
|
42 |
+
"Upload Information","Загрузить информацию"
|
43 |
+
"White","Белый"
|
44 |
+
"Zoom Image","Увеличивать изображение"
|
app/locale/uk_UA/Tonbo_ColorPicker.csv
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"*The system will display selected color if image is not specified.","*Система буде відображати вибраний колір, якщо зображення відсутнє."
|
2 |
+
"<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Download user manual</a>","<a href=""http://tonboinc.com/media/usermanual/tonbocolorpicker.pdf"" target=""_blank"">Завантажити інструкції</a>"
|
3 |
+
"Add attributes to the list","Додати атрибут до списку"
|
4 |
+
"Are you sure you want to delete this image? If image is not specified, system will display the selected color.","Ви впевнені, що хочете видалити це зображення? Якщо зображення не вказано, система буде відображати вибраний колір."
|
5 |
+
"Army Green","Армійський зелений"
|
6 |
+
"Attributes were assigned automatically","Атрибути були призначені автоматично"
|
7 |
+
"Azure","Лазурний"
|
8 |
+
"Choose an Option...","Обрати опцію..."
|
9 |
+
"Chosen color: ","Обраний колір: "
|
10 |
+
"Clear All","Очистити все"
|
11 |
+
"Click to select file","Клікнути для вибору файлу"
|
12 |
+
"Close","Закрити"
|
13 |
+
"Color was not detected","Колір не визначено"
|
14 |
+
"Currently Shopping by:","Перегляд товарів по:"
|
15 |
+
"Delete Image","Видалити зображення"
|
16 |
+
"Display options","Параметри відображення"
|
17 |
+
"Edit","Редагувати"
|
18 |
+
"Edit Attribute","Редагувати атрибут"
|
19 |
+
"Enable Tonbo Color Picker","Включити Tonbo Color Picker"
|
20 |
+
"Error: Color was not detected","Помилка: Колір не визначено"
|
21 |
+
"Error: Image was not deleted","Помилка: Зображення не видалено"
|
22 |
+
"File to upload","Файл для завантаження"
|
23 |
+
"File was not uploaded","Файл не завантажено"
|
24 |
+
"for this attribute","для цього атрибуту"
|
25 |
+
"Image was not uploaded","Зображення не завантажено"
|
26 |
+
"Leopard","Леопард"
|
27 |
+
"Minimum allowed image size is %sx%s px.","Мінімальний розмір зображення %sx%s px."
|
28 |
+
"Move to Wishlist","Додати до ""Списку побажань"""
|
29 |
+
"No Attribute Selected","Атрибут не обрано"
|
30 |
+
"Only %s extensions are allowed","Дозволяються тільки %s"
|
31 |
+
"Please save the attribute before uploading an image","Будь ласка, збережіть атрибут перед тим як завантажити зображення"
|
32 |
+
"Qty","Кількість"
|
33 |
+
"Remove attributes from list","Видалити атрибути зі списку"
|
34 |
+
"Remove item","Видалити продукт"
|
35 |
+
"Remove This Item","Відключити фільтр"
|
36 |
+
"Save Config to map this attribute","Сбережіть конфігурацію перед налаштуванням цього атрибуту"
|
37 |
+
"Select attributes which specify colors for store","Виберіть атрибути, які визначають кольори для магазину"
|
38 |
+
"Some values of this attribute were not mapped. Click ""Edit""-icon to manage this attribute.","Деякі параметри цього атрибуту не визначено. Натисніть кнопку ""Редагувати"" щоб сконфігурувати атрибут."
|
39 |
+
"This attribute has been successfully mapped","Параметри атрибуту встановлені успішно"
|
40 |
+
"Tonbo Color Picker","Tonbo Color Picker"
|
41 |
+
"Upload Image","Завантажити зображення"
|
42 |
+
"Upload Information","Завантажити інформацію"
|
43 |
+
"White","Білий"
|
44 |
+
"Zoom Image","Збільшувати зображення"
|
js/colorpicker/colormethods.js
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright (c) 2007 John Dyer (http://johndyer.name)
|
3 |
+
MIT style license
|
4 |
+
*/
|
5 |
+
|
6 |
+
if (!window.Refresh) Refresh = {};
|
7 |
+
if (!Refresh.Web) Refresh.Web = {};
|
8 |
+
|
9 |
+
Refresh.Web.Color = function(init) {
|
10 |
+
var color = {
|
11 |
+
r: 0,
|
12 |
+
g: 0,
|
13 |
+
b: 0,
|
14 |
+
|
15 |
+
h: 0,
|
16 |
+
s: 0,
|
17 |
+
v: 0,
|
18 |
+
|
19 |
+
hex: '',
|
20 |
+
|
21 |
+
setRgb: function(r, g, b) {
|
22 |
+
this.r = r;
|
23 |
+
this.g = g;
|
24 |
+
this.b = b;
|
25 |
+
|
26 |
+
var newHsv = Refresh.Web.ColorMethods.rgbToHsv(this);
|
27 |
+
this.h = newHsv.h;
|
28 |
+
this.s = newHsv.s;
|
29 |
+
this.v = newHsv.v;
|
30 |
+
|
31 |
+
this.hex = Refresh.Web.ColorMethods.rgbToHex(this);
|
32 |
+
},
|
33 |
+
|
34 |
+
setHsv: function(h, s, v) {
|
35 |
+
this.h = h;
|
36 |
+
this.s = s;
|
37 |
+
this.v = v;
|
38 |
+
|
39 |
+
var newRgb = Refresh.Web.ColorMethods.hsvToRgb(this);
|
40 |
+
this.r = newRgb.r;
|
41 |
+
this.g = newRgb.g;
|
42 |
+
this.b = newRgb.b;
|
43 |
+
|
44 |
+
this.hex = Refresh.Web.ColorMethods.rgbToHex(newRgb);
|
45 |
+
},
|
46 |
+
|
47 |
+
setHex: function(hex) {
|
48 |
+
this.hex = hex;
|
49 |
+
|
50 |
+
var newRgb = Refresh.Web.ColorMethods.hexToRgb(this.hex);
|
51 |
+
this.r = newRgb.r;
|
52 |
+
this.g = newRgb.g;
|
53 |
+
this.b = newRgb.b;
|
54 |
+
|
55 |
+
var newHsv = Refresh.Web.ColorMethods.rgbToHsv(newRgb);
|
56 |
+
this.h = newHsv.h;
|
57 |
+
this.s = newHsv.s;
|
58 |
+
this.v = newHsv.v;
|
59 |
+
}
|
60 |
+
};
|
61 |
+
|
62 |
+
if (init) {
|
63 |
+
if (init.hex)
|
64 |
+
color.setHex(init.hex);
|
65 |
+
else if (init.r)
|
66 |
+
color.setRgb(init.r, init.g, init.b);
|
67 |
+
else if (init.h)
|
68 |
+
color.setHsv(init.h, init.s, init.v);
|
69 |
+
}
|
70 |
+
|
71 |
+
return color;
|
72 |
+
};
|
73 |
+
Refresh.Web.ColorMethods = {
|
74 |
+
hexToRgb: function(hex) {
|
75 |
+
hex = this.validateHex(hex);
|
76 |
+
|
77 |
+
var r='00', g='00', b='00';
|
78 |
+
|
79 |
+
/*
|
80 |
+
if (hex.length == 3) {
|
81 |
+
r = hex.substring(0,1);
|
82 |
+
g = hex.substring(1,2);
|
83 |
+
b = hex.substring(2,3);
|
84 |
+
} else if (hex.length == 6) {
|
85 |
+
r = hex.substring(0,2);
|
86 |
+
g = hex.substring(2,4);
|
87 |
+
b = hex.substring(4,6);
|
88 |
+
*/
|
89 |
+
if (hex.length == 6) {
|
90 |
+
r = hex.substring(0,2);
|
91 |
+
g = hex.substring(2,4);
|
92 |
+
b = hex.substring(4,6);
|
93 |
+
} else {
|
94 |
+
if (hex.length > 4) {
|
95 |
+
r = hex.substring(4, hex.length);
|
96 |
+
hex = hex.substring(0,4);
|
97 |
+
}
|
98 |
+
if (hex.length > 2) {
|
99 |
+
g = hex.substring(2,hex.length);
|
100 |
+
hex = hex.substring(0,2);
|
101 |
+
}
|
102 |
+
if (hex.length > 0) {
|
103 |
+
b = hex.substring(0,hex.length);
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
return { r:this.hexToInt(r), g:this.hexToInt(g), b:this.hexToInt(b) };
|
108 |
+
},
|
109 |
+
validateHex: function(hex) {
|
110 |
+
hex = new String(hex).toUpperCase();
|
111 |
+
hex = hex.replace(/[^A-F0-9]/g, '0');
|
112 |
+
if (hex.length > 6) hex = hex.substring(0, 6);
|
113 |
+
return hex;
|
114 |
+
},
|
115 |
+
webSafeDec: function (dec) {
|
116 |
+
dec = Math.round(dec / 51);
|
117 |
+
dec *= 51;
|
118 |
+
return dec;
|
119 |
+
},
|
120 |
+
hexToWebSafe: function (hex) {
|
121 |
+
var r, g, b;
|
122 |
+
|
123 |
+
if (hex.length == 3) {
|
124 |
+
r = hex.substring(0,1);
|
125 |
+
g = hex.substring(1,1);
|
126 |
+
b = hex.substring(2,1);
|
127 |
+
} else {
|
128 |
+
r = hex.substring(0,2);
|
129 |
+
g = hex.substring(2,4);
|
130 |
+
b = hex.substring(4,6);
|
131 |
+
}
|
132 |
+
return intToHex(this.webSafeDec(this.hexToInt(r))) + this.intToHex(this.webSafeDec(this.hexToInt(g))) + this.intToHex(this.webSafeDec(this.hexToInt(b)));
|
133 |
+
},
|
134 |
+
rgbToWebSafe: function(rgb) {
|
135 |
+
return {r: this.webSafeDec(rgb.r), g: this.webSafeDec(rgb.g), b: this.webSafeDec(rgb.b) };
|
136 |
+
},
|
137 |
+
rgbToHex: function (rgb) {
|
138 |
+
return this.intToHex(rgb.r) + this.intToHex(rgb.g) + this.intToHex(rgb.b);
|
139 |
+
},
|
140 |
+
intToHex: function (dec){
|
141 |
+
var result = (parseInt(dec).toString(16));
|
142 |
+
if (result.length == 1)
|
143 |
+
result = ("0" + result);
|
144 |
+
return result.toUpperCase();
|
145 |
+
},
|
146 |
+
hexToInt: function (hex){
|
147 |
+
return(parseInt(hex,16));
|
148 |
+
},
|
149 |
+
rgbToHsv: function (rgb) {
|
150 |
+
|
151 |
+
var r = rgb.r / 255;
|
152 |
+
var g = rgb.g / 255;
|
153 |
+
var b = rgb.b / 255;
|
154 |
+
|
155 |
+
hsv = {h:0, s:0, v:0};
|
156 |
+
|
157 |
+
var min = 0
|
158 |
+
var max = 0;
|
159 |
+
|
160 |
+
if (r >= g && r >= b) {
|
161 |
+
max = r;
|
162 |
+
min = (g > b) ? b : g;
|
163 |
+
} else if (g >= b && g >= r) {
|
164 |
+
max = g;
|
165 |
+
min = (r > b) ? b : r;
|
166 |
+
} else {
|
167 |
+
max = b;
|
168 |
+
min = (g > r) ? r : g;
|
169 |
+
}
|
170 |
+
|
171 |
+
hsv.v = max;
|
172 |
+
hsv.s = (max) ? ((max - min) / max) : 0;
|
173 |
+
|
174 |
+
if (!hsv.s) {
|
175 |
+
hsv.h = 0;
|
176 |
+
} else {
|
177 |
+
delta = max - min;
|
178 |
+
if (r == max) {
|
179 |
+
hsv.h = (g - b) / delta;
|
180 |
+
} else if (g == max) {
|
181 |
+
hsv.h = 2 + (b - r) / delta;
|
182 |
+
} else {
|
183 |
+
hsv.h = 4 + (r - g) / delta;
|
184 |
+
}
|
185 |
+
|
186 |
+
hsv.h = parseInt(hsv.h * 60);
|
187 |
+
if (hsv.h < 0) {
|
188 |
+
hsv.h += 360;
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
hsv.s = parseInt(hsv.s * 100);
|
193 |
+
hsv.v = parseInt(hsv.v * 100);
|
194 |
+
|
195 |
+
return hsv;
|
196 |
+
},
|
197 |
+
hsvToRgb: function (hsv) {
|
198 |
+
|
199 |
+
rgb = {r:0, g:0, b:0};
|
200 |
+
|
201 |
+
var h = hsv.h;
|
202 |
+
var s = hsv.s;
|
203 |
+
var v = hsv.v;
|
204 |
+
|
205 |
+
if (s == 0) {
|
206 |
+
if (v == 0) {
|
207 |
+
rgb.r = rgb.g = rgb.b = 0;
|
208 |
+
} else {
|
209 |
+
rgb.r = rgb.g = rgb.b = parseInt(v * 255 / 100);
|
210 |
+
}
|
211 |
+
} else {
|
212 |
+
if (h == 360) {
|
213 |
+
h = 0;
|
214 |
+
}
|
215 |
+
h /= 60;
|
216 |
+
|
217 |
+
// 100 scale
|
218 |
+
s = s/100;
|
219 |
+
v = v/100;
|
220 |
+
|
221 |
+
var i = parseInt(h);
|
222 |
+
var f = h - i;
|
223 |
+
var p = v * (1 - s);
|
224 |
+
var q = v * (1 - (s * f));
|
225 |
+
var t = v * (1 - (s * (1 - f)));
|
226 |
+
switch (i) {
|
227 |
+
case 0:
|
228 |
+
rgb.r = v;
|
229 |
+
rgb.g = t;
|
230 |
+
rgb.b = p;
|
231 |
+
break;
|
232 |
+
case 1:
|
233 |
+
rgb.r = q;
|
234 |
+
rgb.g = v;
|
235 |
+
rgb.b = p;
|
236 |
+
break;
|
237 |
+
case 2:
|
238 |
+
rgb.r = p;
|
239 |
+
rgb.g = v;
|
240 |
+
rgb.b = t;
|
241 |
+
break;
|
242 |
+
case 3:
|
243 |
+
rgb.r = p;
|
244 |
+
rgb.g = q;
|
245 |
+
rgb.b = v;
|
246 |
+
break;
|
247 |
+
case 4:
|
248 |
+
rgb.r = t;
|
249 |
+
rgb.g = p;
|
250 |
+
rgb.b = v;
|
251 |
+
break;
|
252 |
+
case 5:
|
253 |
+
rgb.r = v;
|
254 |
+
rgb.g = p;
|
255 |
+
rgb.b = q;
|
256 |
+
break;
|
257 |
+
}
|
258 |
+
|
259 |
+
rgb.r = parseInt(rgb.r * 255);
|
260 |
+
rgb.g = parseInt(rgb.g * 255);
|
261 |
+
rgb.b = parseInt(rgb.b * 255);
|
262 |
+
}
|
263 |
+
|
264 |
+
return rgb;
|
265 |
+
}
|
266 |
+
};
|
js/colorpicker/colorpicker.js
ADDED
@@ -0,0 +1,626 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright (c) 2007 John Dyer (http://johndyer.name)
|
3 |
+
MIT style license
|
4 |
+
*/
|
5 |
+
|
6 |
+
if (!window.Refresh) Refresh = {};
|
7 |
+
if (!Refresh.Web) Refresh.Web = {};
|
8 |
+
|
9 |
+
Refresh.Web.DefaultColorPickerSettings = {
|
10 |
+
startMode:'h',
|
11 |
+
startHex:'ff0000',
|
12 |
+
clientFilesPath: 'refresh_web/colorpicker/images/'
|
13 |
+
};
|
14 |
+
|
15 |
+
Refresh.Web.ColorPicker = Class.create();
|
16 |
+
Refresh.Web.ColorPicker.prototype = {
|
17 |
+
|
18 |
+
initialize: function(id, settings) {
|
19 |
+
this.id = id;
|
20 |
+
this.settings = Object.extend(Object.extend({},Refresh.Web.DefaultColorPickerSettings), settings || {});
|
21 |
+
|
22 |
+
// attach radio & check boxes
|
23 |
+
this._hueRadio = $(this.id + '_HueRadio');
|
24 |
+
this._saturationRadio = $(this.id + '_SaturationRadio');
|
25 |
+
this._valueRadio = $(this.id + '_BrightnessRadio');
|
26 |
+
|
27 |
+
this._redRadio = $(this.id + '_RedRadio');
|
28 |
+
this._greenRadio = $(this.id + '_GreenRadio');
|
29 |
+
this._blueRadio = $(this.id + '_BlueRadio');
|
30 |
+
//this._webSafeCheck = $(this.id + '_WebSafeCheck');
|
31 |
+
|
32 |
+
this._hueRadio.value = 'h';
|
33 |
+
this._saturationRadio.value = 's';
|
34 |
+
this._valueRadio.value = 'v';
|
35 |
+
|
36 |
+
this._redRadio.value = 'r';
|
37 |
+
this._greenRadio.value = 'g';
|
38 |
+
this._blueRadio.value = 'b';
|
39 |
+
|
40 |
+
// attach events to radio & checks
|
41 |
+
|
42 |
+
this._event_onRadioClicked = this._onRadioClicked.bindAsEventListener(this);
|
43 |
+
|
44 |
+
Event.observe(this._hueRadio,'click', this._event_onRadioClicked);
|
45 |
+
Event.observe(this._saturationRadio,'click', this._event_onRadioClicked);
|
46 |
+
Event.observe(this._valueRadio,'click', this._event_onRadioClicked);
|
47 |
+
|
48 |
+
Event.observe(this._redRadio,'click', this._event_onRadioClicked);
|
49 |
+
Event.observe(this._greenRadio,'click', this._event_onRadioClicked);
|
50 |
+
Event.observe(this._blueRadio,'click', this._event_onRadioClicked);
|
51 |
+
|
52 |
+
//this._event_webSafeClicked = this._onWebSafeClicked.bindAsEventListener(this);
|
53 |
+
//Event.observe( this._webSafeCheck, 'click', this._event_webSafeClicked);
|
54 |
+
|
55 |
+
|
56 |
+
// attach simple properties
|
57 |
+
this._preview = $(this.id + '_Preview');
|
58 |
+
|
59 |
+
|
60 |
+
// MAP
|
61 |
+
this._mapBase = $(this.id + '_ColorMap');
|
62 |
+
this._mapBase.style.width = '256px';
|
63 |
+
this._mapBase.style.height = '256px';
|
64 |
+
this._mapBase.style.padding = 0;
|
65 |
+
this._mapBase.style.margin = 0;
|
66 |
+
this._mapBase.style.border = 'solid 1px #000';
|
67 |
+
|
68 |
+
this._mapL1 = this._createImageElement(this.settings.clientFilesPath + 'blank.gif', 256, 256);
|
69 |
+
this._mapL1.style.margin = '0px';
|
70 |
+
this._mapL1.style.display = 'block';
|
71 |
+
this._mapBase.appendChild(this._mapL1);
|
72 |
+
|
73 |
+
this._mapL2 = this._createImageElement(this.settings.clientFilesPath + 'blank.gif', 256, 256);
|
74 |
+
this._mapBase.appendChild(this._mapL2);
|
75 |
+
this._mapL2.style.clear = 'both';
|
76 |
+
this._mapL2.style.margin = '-256px 0px 0px 0px';
|
77 |
+
this._mapL2.setOpacity(.5);
|
78 |
+
this._mapL2.style.display = 'block';
|
79 |
+
|
80 |
+
// BAR
|
81 |
+
this._bar = $(this.id + '_ColorBar');
|
82 |
+
this._bar.style.width = '20px';
|
83 |
+
this._bar.style.height = '256px';
|
84 |
+
this._bar.style.padding = 0;
|
85 |
+
this._bar.style.margin = '0px 10px';
|
86 |
+
this._bar.style.border = 'solid 1px #000';
|
87 |
+
|
88 |
+
this._barL1 = this._createImageElement(this.settings.clientFilesPath + 'blank.gif', 20, 256);
|
89 |
+
this._barL1.style.margin = '0px';
|
90 |
+
this._barL1.style.display = 'block';
|
91 |
+
this._bar.appendChild(this._barL1);
|
92 |
+
|
93 |
+
this._barL2 = this._createImageElement(this.settings.clientFilesPath + 'blank.gif', 20, 256);
|
94 |
+
this._barL2.style.margin = '-256px 0px 0px 0px';
|
95 |
+
this._barL2.style.display = 'block';
|
96 |
+
this._bar.appendChild(this._barL2);
|
97 |
+
|
98 |
+
this._barL3 = this._createImageElement(this.settings.clientFilesPath + 'blank.gif', 20, 256);
|
99 |
+
this._barL3.style.margin = '-256px 0px 0px 0px';
|
100 |
+
this._barL3.style.backgroundColor = '#ff0000';
|
101 |
+
this._barL3.style.display = 'block';
|
102 |
+
this._bar.appendChild(this._barL3);
|
103 |
+
|
104 |
+
this._barL4 = this._createImageElement(this.settings.clientFilesPath + 'bar-brightness.png', 20, 256);
|
105 |
+
this._barL4.style.margin = '-256px 0px 0px 0px';
|
106 |
+
this._barL4.style.display = 'block';
|
107 |
+
this._bar.appendChild(this._barL4);
|
108 |
+
|
109 |
+
// attach map slider
|
110 |
+
this._map = new Refresh.Web.Slider(this._mapL2, {
|
111 |
+
xMaxValue: 255,
|
112 |
+
yMinValue: 255,
|
113 |
+
arrowImage: this.settings.clientFilesPath + 'mappoint.gif',
|
114 |
+
mainElementId: this.id
|
115 |
+
});
|
116 |
+
|
117 |
+
// attach color slider
|
118 |
+
this._slider = new Refresh.Web.Slider(this._barL4, {
|
119 |
+
xMinValue: 1,
|
120 |
+
xMaxValue: 1,
|
121 |
+
yMinValue: 255,
|
122 |
+
arrowImage: this.settings.clientFilesPath + 'rangearrows.gif',
|
123 |
+
mainElementId: this.id
|
124 |
+
});
|
125 |
+
|
126 |
+
// attach color values
|
127 |
+
this._cvp = new Refresh.Web.ColorValuePicker(this.id);
|
128 |
+
|
129 |
+
// link up events
|
130 |
+
var cp = this;
|
131 |
+
|
132 |
+
this._slider.onValuesChanged = function() {cp.sliderValueChanged()};
|
133 |
+
this._map.onValuesChanged = function() {cp.mapValueChanged();}
|
134 |
+
this._cvp.onValuesChanged = function() {cp.textValuesChanged();}
|
135 |
+
|
136 |
+
// browser!
|
137 |
+
this.isLessThanIE7 = false;
|
138 |
+
var version = parseFloat(navigator.appVersion.split("MSIE")[1]);
|
139 |
+
if ((version < 7) && (document.body.filters))
|
140 |
+
this.isLessThanIE7 = true;
|
141 |
+
|
142 |
+
|
143 |
+
// initialize values
|
144 |
+
this.setColorMode(this.settings.startMode);
|
145 |
+
if (this.settings.startHex)
|
146 |
+
this._cvp._hexInput.value = this.settings.startHex;
|
147 |
+
this._cvp.setValuesFromHex();
|
148 |
+
this.positionMapAndSliderArrows();
|
149 |
+
this.updateVisuals();
|
150 |
+
|
151 |
+
this.color = null;
|
152 |
+
},
|
153 |
+
_createImageElement: function(src, width, height) {
|
154 |
+
var element = new Element('img', {
|
155 |
+
src: src,
|
156 |
+
width: width,
|
157 |
+
height: height,
|
158 |
+
onDragStart: 'return false;'
|
159 |
+
});
|
160 |
+
element.className = 'color-picker-created';
|
161 |
+
return element;
|
162 |
+
},
|
163 |
+
show: function() {
|
164 |
+
this._map._arrow.style.display = '';
|
165 |
+
this._slider._arrow.style.display = '';
|
166 |
+
this._map.setPositioningVariables();
|
167 |
+
this._slider.setPositioningVariables();
|
168 |
+
this.positionMapAndSliderArrows();
|
169 |
+
},
|
170 |
+
hide: function() {
|
171 |
+
this._map._arrow.style.display = 'none';
|
172 |
+
this._slider._arrow.style.display = 'none';
|
173 |
+
},
|
174 |
+
_onRadioClicked: function(e) {
|
175 |
+
this.setColorMode(e.target.value);
|
176 |
+
},
|
177 |
+
_onWebSafeClicked: function(e) {
|
178 |
+
// reset
|
179 |
+
this.setColorMode(this.ColorMode);
|
180 |
+
},
|
181 |
+
textValuesChanged: function() {
|
182 |
+
this.positionMapAndSliderArrows();
|
183 |
+
this.updateVisuals();
|
184 |
+
},
|
185 |
+
setColorMode: function(colorMode) {
|
186 |
+
|
187 |
+
this.color = this._cvp.color;
|
188 |
+
|
189 |
+
// reset all images
|
190 |
+
function resetImage(cp, img) {
|
191 |
+
cp.setAlpha(img, 100);
|
192 |
+
img.style.backgroundColor = '';
|
193 |
+
img.src = cp.settings.clientFilesPath + 'blank.gif';
|
194 |
+
img.style.filter = '';
|
195 |
+
}
|
196 |
+
resetImage(this, this._mapL1);
|
197 |
+
resetImage(this, this._mapL2);
|
198 |
+
resetImage(this, this._barL1);
|
199 |
+
resetImage(this, this._barL2);
|
200 |
+
resetImage(this, this._barL3);
|
201 |
+
resetImage(this, this._barL4);
|
202 |
+
|
203 |
+
this._hueRadio.checked = false;
|
204 |
+
this._saturationRadio.checked = false;
|
205 |
+
this._valueRadio.checked = false;
|
206 |
+
this._redRadio.checked = false;
|
207 |
+
this._greenRadio.checked = false;
|
208 |
+
this._blueRadio.checked = false;
|
209 |
+
|
210 |
+
switch (colorMode) {
|
211 |
+
case 'h':
|
212 |
+
this._hueRadio.checked = true;
|
213 |
+
|
214 |
+
// MAP
|
215 |
+
// put a color layer on the bottom
|
216 |
+
this._mapL1.style.backgroundColor = '#' + this.color.hex;
|
217 |
+
|
218 |
+
// add a hue map on the top
|
219 |
+
this._mapL2.style.backgroundColor = 'transparent';
|
220 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-hue.png');
|
221 |
+
this.setAlpha(this._mapL2, 100);
|
222 |
+
|
223 |
+
// SLIDER
|
224 |
+
// simple hue map
|
225 |
+
this.setImg(this._barL4,this.settings.clientFilesPath + 'bar-hue.png');
|
226 |
+
|
227 |
+
this._map.settings.xMaxValue = 100;
|
228 |
+
this._map.settings.yMaxValue = 100;
|
229 |
+
this._slider.settings.yMaxValue = 359;
|
230 |
+
break;
|
231 |
+
case 's':
|
232 |
+
this._saturationRadio.checked = true;
|
233 |
+
|
234 |
+
// MAP
|
235 |
+
// bottom has saturation map
|
236 |
+
this.setImg(this._mapL1, this.settings.clientFilesPath + 'map-saturation.png');
|
237 |
+
|
238 |
+
// top has overlay
|
239 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-saturation-overlay.png');
|
240 |
+
this.setAlpha(this._mapL2,0);
|
241 |
+
|
242 |
+
// SLIDER
|
243 |
+
// bottom: color
|
244 |
+
this.setBG(this._barL3, this.color.hex);
|
245 |
+
|
246 |
+
// top: graduated overlay
|
247 |
+
this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-saturation.png');
|
248 |
+
|
249 |
+
|
250 |
+
this._map.settings.xMaxValue = 359;
|
251 |
+
this._map.settings.yMaxValue = 100;
|
252 |
+
this._slider.settings.yMaxValue = 100;
|
253 |
+
break;
|
254 |
+
case 'v':
|
255 |
+
this._valueRadio.checked = true;
|
256 |
+
|
257 |
+
// MAP
|
258 |
+
// bottom: nothing
|
259 |
+
|
260 |
+
// top
|
261 |
+
this.setBG(this._mapL1,'000');
|
262 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-brightness.png');
|
263 |
+
|
264 |
+
// SLIDER
|
265 |
+
// bottom
|
266 |
+
this._barL3.style.backgroundColor = '#' + this.color.hex;
|
267 |
+
|
268 |
+
// top
|
269 |
+
this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-brightness.png');
|
270 |
+
|
271 |
+
|
272 |
+
this._map.settings.xMaxValue = 359;
|
273 |
+
this._map.settings.yMaxValue = 100;
|
274 |
+
this._slider.settings.yMaxValue = 100;
|
275 |
+
break;
|
276 |
+
case 'r':
|
277 |
+
this._redRadio.checked = true;
|
278 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-red-max.png');
|
279 |
+
this.setImg(this._mapL1, this.settings.clientFilesPath + 'map-red-min.png');
|
280 |
+
|
281 |
+
this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-red-tl.png');
|
282 |
+
this.setImg(this._barL3, this.settings.clientFilesPath + 'bar-red-tr.png');
|
283 |
+
this.setImg(this._barL2, this.settings.clientFilesPath + 'bar-red-br.png');
|
284 |
+
this.setImg(this._barL1, this.settings.clientFilesPath + 'bar-red-bl.png');
|
285 |
+
break;
|
286 |
+
case 'g':
|
287 |
+
this._greenRadio.checked = true;
|
288 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-green-max.png');
|
289 |
+
this.setImg(this._mapL1, this.settings.clientFilesPath + 'map-green-min.png');
|
290 |
+
|
291 |
+
this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-green-tl.png');
|
292 |
+
this.setImg(this._barL3, this.settings.clientFilesPath + 'bar-green-tr.png');
|
293 |
+
this.setImg(this._barL2, this.settings.clientFilesPath + 'bar-green-br.png');
|
294 |
+
this.setImg(this._barL1, this.settings.clientFilesPath + 'bar-green-bl.png');
|
295 |
+
break;
|
296 |
+
case 'b':
|
297 |
+
this._blueRadio.checked = true;
|
298 |
+
this.setImg(this._mapL2, this.settings.clientFilesPath + 'map-blue-max.png');
|
299 |
+
this.setImg(this._mapL1, this.settings.clientFilesPath + 'map-blue-min.png');
|
300 |
+
|
301 |
+
this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-blue-tl.png');
|
302 |
+
this.setImg(this._barL3, this.settings.clientFilesPath + 'bar-blue-tr.png');
|
303 |
+
this.setImg(this._barL2, this.settings.clientFilesPath + 'bar-blue-br.png');
|
304 |
+
this.setImg(this._barL1, this.settings.clientFilesPath + 'bar-blue-bl.png');
|
305 |
+
//this.setImg(this._barL4, this.settings.clientFilesPath + 'bar-hue.png');
|
306 |
+
break;
|
307 |
+
default:
|
308 |
+
alert('invalid mode');
|
309 |
+
break;
|
310 |
+
}
|
311 |
+
|
312 |
+
switch (colorMode) {
|
313 |
+
case 'h':
|
314 |
+
case 's':
|
315 |
+
case 'v':
|
316 |
+
this._map.settings.xMinValue = 1;
|
317 |
+
this._map.settings.yMinValue = 1;
|
318 |
+
this._slider.settings.yMinValue = 1;
|
319 |
+
break;
|
320 |
+
|
321 |
+
case 'r':
|
322 |
+
case 'g':
|
323 |
+
case 'b':
|
324 |
+
this._map.settings.xMinValue = 0;
|
325 |
+
this._map.settings.yMinValue = 0;
|
326 |
+
this._slider.settings.yMinValue = 0;
|
327 |
+
|
328 |
+
this._map.settings.xMaxValue = 255;
|
329 |
+
this._map.settings.yMaxValue = 255;
|
330 |
+
this._slider.settings.yMaxValue = 255;
|
331 |
+
break;
|
332 |
+
}
|
333 |
+
|
334 |
+
this.ColorMode = colorMode;
|
335 |
+
|
336 |
+
this.positionMapAndSliderArrows();
|
337 |
+
|
338 |
+
this.updateMapVisuals();
|
339 |
+
this.updateSliderVisuals();
|
340 |
+
},
|
341 |
+
mapValueChanged: function() {
|
342 |
+
// update values
|
343 |
+
|
344 |
+
switch(this.ColorMode) {
|
345 |
+
case 'h':
|
346 |
+
this._cvp._saturationInput.value = this._map.xValue;
|
347 |
+
this._cvp._valueInput.value = 100 - this._map.yValue;
|
348 |
+
break;
|
349 |
+
|
350 |
+
case 's':
|
351 |
+
this._cvp._hueInput.value = this._map.xValue;
|
352 |
+
this._cvp._valueInput.value = 100 - this._map.yValue;
|
353 |
+
break;
|
354 |
+
|
355 |
+
case 'v':
|
356 |
+
this._cvp._hueInput.value = this._map.xValue;
|
357 |
+
this._cvp._saturationInput.value = 100 - this._map.yValue;
|
358 |
+
break;
|
359 |
+
|
360 |
+
case 'r':
|
361 |
+
this._cvp._blueInput.value = this._map.xValue;
|
362 |
+
this._cvp._greenInput.value = 256 - this._map.yValue;
|
363 |
+
break;
|
364 |
+
|
365 |
+
case 'g':
|
366 |
+
this._cvp._blueInput.value = this._map.xValue;
|
367 |
+
this._cvp._redInput.value = 256 - this._map.yValue;
|
368 |
+
break;
|
369 |
+
|
370 |
+
case 'b':
|
371 |
+
this._cvp._redInput.value = this._map.xValue;
|
372 |
+
this._cvp._greenInput.value = 256 - this._map.yValue;
|
373 |
+
break;
|
374 |
+
}
|
375 |
+
|
376 |
+
switch(this.ColorMode) {
|
377 |
+
case 'h':
|
378 |
+
case 's':
|
379 |
+
case 'v':
|
380 |
+
this._cvp.setValuesFromHsv();
|
381 |
+
break;
|
382 |
+
|
383 |
+
case 'r':
|
384 |
+
case 'g':
|
385 |
+
case 'b':
|
386 |
+
this._cvp.setValuesFromRgb();
|
387 |
+
break;
|
388 |
+
}
|
389 |
+
|
390 |
+
|
391 |
+
this.updateVisuals();
|
392 |
+
},
|
393 |
+
sliderValueChanged: function() {
|
394 |
+
|
395 |
+
switch(this.ColorMode) {
|
396 |
+
case 'h':
|
397 |
+
this._cvp._hueInput.value = 360 - this._slider.yValue;
|
398 |
+
break;
|
399 |
+
case 's':
|
400 |
+
this._cvp._saturationInput.value = 100 - this._slider.yValue;
|
401 |
+
break;
|
402 |
+
case 'v':
|
403 |
+
this._cvp._valueInput.value = 100 - this._slider.yValue;
|
404 |
+
break;
|
405 |
+
|
406 |
+
case 'r':
|
407 |
+
this._cvp._redInput.value = 255 - this._slider.yValue;
|
408 |
+
break;
|
409 |
+
case 'g':
|
410 |
+
this._cvp._greenInput.value = 255 - this._slider.yValue;
|
411 |
+
break;
|
412 |
+
case 'b':
|
413 |
+
this._cvp._blueInput.value = 255 - this._slider.yValue;
|
414 |
+
break;
|
415 |
+
}
|
416 |
+
|
417 |
+
switch(this.ColorMode) {
|
418 |
+
case 'h':
|
419 |
+
case 's':
|
420 |
+
case 'v':
|
421 |
+
this._cvp.setValuesFromHsv();
|
422 |
+
break;
|
423 |
+
|
424 |
+
case 'r':
|
425 |
+
case 'g':
|
426 |
+
case 'b':
|
427 |
+
this._cvp.setValuesFromRgb();
|
428 |
+
break;
|
429 |
+
}
|
430 |
+
|
431 |
+
this.updateVisuals();
|
432 |
+
},
|
433 |
+
positionMapAndSliderArrows: function() {
|
434 |
+
this.color = this._cvp.color;
|
435 |
+
|
436 |
+
// Slider
|
437 |
+
var sliderValue = 0;
|
438 |
+
switch(this.ColorMode) {
|
439 |
+
case 'h':
|
440 |
+
sliderValue = 360 - this.color.h;
|
441 |
+
break;
|
442 |
+
|
443 |
+
case 's':
|
444 |
+
sliderValue = 100 - this.color.s;
|
445 |
+
break;
|
446 |
+
|
447 |
+
case 'v':
|
448 |
+
sliderValue = 100 - this.color.v;
|
449 |
+
break;
|
450 |
+
|
451 |
+
case 'r':
|
452 |
+
sliderValue = 255- this.color.r;
|
453 |
+
break;
|
454 |
+
|
455 |
+
case 'g':
|
456 |
+
sliderValue = 255- this.color.g;
|
457 |
+
break;
|
458 |
+
|
459 |
+
case 'b':
|
460 |
+
sliderValue = 255- this.color.b;
|
461 |
+
break;
|
462 |
+
}
|
463 |
+
|
464 |
+
this._slider.yValue = sliderValue;
|
465 |
+
this._slider.setArrowPositionFromValues();
|
466 |
+
|
467 |
+
// color map
|
468 |
+
var mapXValue = 0;
|
469 |
+
var mapYValue = 0;
|
470 |
+
switch(this.ColorMode) {
|
471 |
+
case 'h':
|
472 |
+
mapXValue = this.color.s;
|
473 |
+
mapYValue = 100 - this.color.v;
|
474 |
+
break;
|
475 |
+
|
476 |
+
case 's':
|
477 |
+
mapXValue = this.color.h;
|
478 |
+
mapYValue = 100 - this.color.v;
|
479 |
+
break;
|
480 |
+
|
481 |
+
case 'v':
|
482 |
+
mapXValue = this.color.h;
|
483 |
+
mapYValue = 100 - this.color.s;
|
484 |
+
break;
|
485 |
+
|
486 |
+
case 'r':
|
487 |
+
mapXValue = this.color.b;
|
488 |
+
mapYValue = 256 - this.color.g;
|
489 |
+
break;
|
490 |
+
|
491 |
+
case 'g':
|
492 |
+
mapXValue = this.color.b;
|
493 |
+
mapYValue = 256 - this.color.r;
|
494 |
+
break;
|
495 |
+
|
496 |
+
case 'b':
|
497 |
+
mapXValue = this.color.r;
|
498 |
+
mapYValue = 256 - this.color.g;
|
499 |
+
break;
|
500 |
+
}
|
501 |
+
this._map.xValue = mapXValue;
|
502 |
+
this._map.yValue = mapYValue;
|
503 |
+
this._map.setArrowPositionFromValues();
|
504 |
+
},
|
505 |
+
updateVisuals: function() {
|
506 |
+
this.updatePreview();
|
507 |
+
this.updateMapVisuals();
|
508 |
+
this.updateSliderVisuals();
|
509 |
+
},
|
510 |
+
updatePreview: function() {
|
511 |
+
try {
|
512 |
+
this._preview.style.backgroundColor = '#' + this._cvp.color.hex;
|
513 |
+
} catch (e) {}
|
514 |
+
},
|
515 |
+
updateMapVisuals: function() {
|
516 |
+
|
517 |
+
this.color = this._cvp.color;
|
518 |
+
|
519 |
+
switch(this.ColorMode) {
|
520 |
+
case 'h':
|
521 |
+
// fake color with only hue
|
522 |
+
var color = new Refresh.Web.Color({h:this.color.h, s:100, v:100});
|
523 |
+
this.setBG(this._mapL1, color.hex);
|
524 |
+
break;
|
525 |
+
|
526 |
+
case 's':
|
527 |
+
this.setAlpha(this._mapL2, 100 - this.color.s);
|
528 |
+
break;
|
529 |
+
|
530 |
+
case 'v':
|
531 |
+
this.setAlpha(this._mapL2, this.color.v);
|
532 |
+
break;
|
533 |
+
|
534 |
+
case 'r':
|
535 |
+
this.setAlpha(this._mapL2, this.color.r/256*100);
|
536 |
+
break;
|
537 |
+
|
538 |
+
case 'g':
|
539 |
+
this.setAlpha(this._mapL2, this.color.g/256*100);
|
540 |
+
break;
|
541 |
+
|
542 |
+
case 'b':
|
543 |
+
this.setAlpha(this._mapL2, this.color.b/256*100);
|
544 |
+
break;
|
545 |
+
}
|
546 |
+
},
|
547 |
+
updateSliderVisuals: function() {
|
548 |
+
|
549 |
+
this.color = this._cvp.color;
|
550 |
+
|
551 |
+
switch(this.ColorMode) {
|
552 |
+
case 'h':
|
553 |
+
break;
|
554 |
+
|
555 |
+
case 's':
|
556 |
+
var saturatedColor = new Refresh.Web.Color({h:this.color.h, s:100, v:this.color.v});
|
557 |
+
this.setBG(this._barL3, saturatedColor.hex);
|
558 |
+
break;
|
559 |
+
|
560 |
+
case 'v':
|
561 |
+
var valueColor = new Refresh.Web.Color({h:this.color.h, s:this.color.s, v:100});
|
562 |
+
this.setBG(this._barL3, valueColor.hex);
|
563 |
+
break;
|
564 |
+
|
565 |
+
case 'r':
|
566 |
+
case 'g':
|
567 |
+
case 'b':
|
568 |
+
var hValue = 0;
|
569 |
+
var vValue = 0;
|
570 |
+
|
571 |
+
if (this.ColorMode == 'r') {
|
572 |
+
hValue = this._cvp._blueInput.value;
|
573 |
+
vValue = this._cvp._greenInput.value;
|
574 |
+
} else if (this.ColorMode == 'g') {
|
575 |
+
hValue = this._cvp._blueInput.value;
|
576 |
+
vValue = this._cvp._redInput.value;
|
577 |
+
} else if (this.ColorMode == 'b') {
|
578 |
+
hValue = this._cvp._redInput.value;
|
579 |
+
vValue = this._cvp._greenInput.value;
|
580 |
+
}
|
581 |
+
|
582 |
+
var horzPer = (hValue / 256) * 100;
|
583 |
+
var vertPer = (vValue / 256) * 100;
|
584 |
+
|
585 |
+
var horzPerRev = ((256 - hValue) / 256) * 100;
|
586 |
+
var vertPerRev = ((256 - vValue) / 256) * 100;
|
587 |
+
|
588 |
+
this.setAlpha(this._barL4, (vertPer>horzPerRev) ? horzPerRev : vertPer);
|
589 |
+
this.setAlpha(this._barL3, (vertPer>horzPer) ? horzPer : vertPer);
|
590 |
+
this.setAlpha(this._barL2, (vertPerRev>horzPer) ? horzPer : vertPerRev);
|
591 |
+
this.setAlpha(this._barL1, (vertPerRev>horzPerRev) ? horzPerRev : vertPerRev);
|
592 |
+
break;
|
593 |
+
}
|
594 |
+
},
|
595 |
+
setBG: function(el, c) {
|
596 |
+
try {
|
597 |
+
el.style.backgroundColor = '#' + c;
|
598 |
+
} catch (e) {}
|
599 |
+
},
|
600 |
+
setImg: function(img, src) {
|
601 |
+
if (src.indexOf('png') && this.isLessThanIE7) {
|
602 |
+
img.pngSrc = src;
|
603 |
+
img.src = this.settings.clientFilesPath + 'blank.gif';
|
604 |
+
img.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src + '\');';
|
605 |
+
} else {
|
606 |
+
img.src = src;
|
607 |
+
}
|
608 |
+
},
|
609 |
+
setAlpha: function(obj, alpha) {
|
610 |
+
if (this.isLessThanIE7) {
|
611 |
+
var src = obj.pngSrc;
|
612 |
+
// exception for the hue map
|
613 |
+
if (src != null && src.indexOf('map-hue') == -1)
|
614 |
+
obj.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + src
|
615 |
+
+ '\') progid:DXImageTransform.Microsoft.Alpha(opacity=' + alpha + ')';
|
616 |
+
} else {
|
617 |
+
obj.style.opacity = alpha/100;
|
618 |
+
}
|
619 |
+
},
|
620 |
+
setCustomHexValue: function (hexValue) {
|
621 |
+
return this._cvp.setCustomHexValue(hexValue);
|
622 |
+
},
|
623 |
+
getValueFromHex: function() {
|
624 |
+
return this._cvp.getValueFromHex();
|
625 |
+
}
|
626 |
+
};
|
js/colorpicker/colorvaluepicker.js
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright (c) 2007 John Dyer (http://johndyer.name)
|
3 |
+
MIT style license
|
4 |
+
*/
|
5 |
+
|
6 |
+
if (!window.Refresh) Refresh = {};
|
7 |
+
if (!Refresh.Web) Refresh.Web = {};
|
8 |
+
|
9 |
+
Refresh.Web.ColorValuePicker = Class.create();
|
10 |
+
Refresh.Web.ColorValuePicker.prototype = {
|
11 |
+
initialize: function(id) {
|
12 |
+
|
13 |
+
this.id = id;
|
14 |
+
|
15 |
+
this.onValuesChanged = null;
|
16 |
+
|
17 |
+
this._hueInput = $(this.id + '_Hue');
|
18 |
+
this._valueInput = $(this.id + '_Brightness');
|
19 |
+
this._saturationInput = $(this.id + '_Saturation');
|
20 |
+
|
21 |
+
this._redInput = $(this.id + '_Red');
|
22 |
+
this._greenInput = $(this.id + '_Green');
|
23 |
+
this._blueInput = $(this.id + '_Blue');
|
24 |
+
|
25 |
+
this._hexInput = $(this.id + '_Hex');
|
26 |
+
|
27 |
+
// assign events
|
28 |
+
|
29 |
+
// events
|
30 |
+
this._event_onHsvKeyUp = this._onHsvKeyUp.bindAsEventListener(this);
|
31 |
+
this._event_onHsvBlur = this._onHsvBlur.bindAsEventListener(this);
|
32 |
+
this._event_onRgbKeyUp = this._onRgbKeyUp.bindAsEventListener(this);
|
33 |
+
this._event_onRgbBlur = this._onRgbBlur.bindAsEventListener(this);
|
34 |
+
this._event_onHexKeyUp = this._onHexKeyUp.bindAsEventListener(this);
|
35 |
+
|
36 |
+
// HSB
|
37 |
+
Event.observe( this._hueInput,'keyup', this._event_onHsvKeyUp);
|
38 |
+
Event.observe( this._valueInput,'keyup',this._event_onHsvKeyUp);
|
39 |
+
Event.observe( this._saturationInput,'keyup',this._event_onHsvKeyUp);
|
40 |
+
Event.observe( this._hueInput,'blur', this._event_onHsvBlur);
|
41 |
+
Event.observe( this._valueInput,'blur',this._event_onHsvBlur);
|
42 |
+
Event.observe( this._saturationInput,'blur',this._event_onHsvBlur);
|
43 |
+
|
44 |
+
// RGB
|
45 |
+
Event.observe( this._redInput,'keyup', this._event_onRgbKeyUp);
|
46 |
+
Event.observe( this._greenInput,'keyup', this._event_onRgbKeyUp);
|
47 |
+
Event.observe( this._blueInput,'keyup', this._event_onRgbKeyUp);
|
48 |
+
Event.observe( this._redInput,'blur', this._event_onRgbBlur);
|
49 |
+
Event.observe( this._greenInput,'blur', this._event_onRgbBlur);
|
50 |
+
Event.observe( this._blueInput,'blur', this._event_onRgbBlur);
|
51 |
+
|
52 |
+
// HEX
|
53 |
+
Event.observe( this._hexInput,'keyup', this._event_onHexKeyUp);
|
54 |
+
|
55 |
+
this.color = new Refresh.Web.Color();
|
56 |
+
|
57 |
+
// get an initial value
|
58 |
+
if (this._hexInput.value != '')
|
59 |
+
this.color.setHex(this._hexInput.value);
|
60 |
+
|
61 |
+
|
62 |
+
// set the others based on initial value
|
63 |
+
this._hexInput.value = this.color.hex;
|
64 |
+
|
65 |
+
this._redInput.value = this.color.r;
|
66 |
+
this._greenInput.value = this.color.g;
|
67 |
+
this._blueInput.value = this.color.b;
|
68 |
+
|
69 |
+
this._hueInput.value = this.color.h;
|
70 |
+
this._saturationInput.value = this.color.s;
|
71 |
+
this._valueInput.value = this.color.v;
|
72 |
+
|
73 |
+
},
|
74 |
+
_onHsvKeyUp: function(e) {
|
75 |
+
if (e.target.value == '') return;
|
76 |
+
this.validateHsv(e);
|
77 |
+
this.setValuesFromHsv();
|
78 |
+
if (this.onValuesChanged) this.onValuesChanged(this);
|
79 |
+
},
|
80 |
+
_onRgbKeyUp: function(e) {
|
81 |
+
if (e.target.value == '') return;
|
82 |
+
this.validateRgb(e);
|
83 |
+
this.setValuesFromRgb();
|
84 |
+
if (this.onValuesChanged) this.onValuesChanged(this);
|
85 |
+
},
|
86 |
+
_onHexKeyUp: function(e) {
|
87 |
+
if (e.target.value == '') return;
|
88 |
+
this.validateHex(e);
|
89 |
+
this.setValuesFromHex();
|
90 |
+
if (this.onValuesChanged) this.onValuesChanged(this);
|
91 |
+
},
|
92 |
+
_onHsvBlur: function(e) {
|
93 |
+
if (e.target.value == '')
|
94 |
+
this.setValuesFromRgb();
|
95 |
+
},
|
96 |
+
_onRgbBlur: function(e) {
|
97 |
+
if (e.target.value == '')
|
98 |
+
this.setValuesFromHsv();
|
99 |
+
},
|
100 |
+
HexBlur: function(e) {
|
101 |
+
if (e.target.value == '')
|
102 |
+
this.setValuesFromHsv();
|
103 |
+
},
|
104 |
+
validateRgb: function(e) {
|
105 |
+
if (!this._keyNeedsValidation(e)) return e;
|
106 |
+
this._redInput.value = this._setValueInRange(this._redInput.value,0,255);
|
107 |
+
this._greenInput.value = this._setValueInRange(this._greenInput.value,0,255);
|
108 |
+
this._blueInput.value = this._setValueInRange(this._blueInput.value,0,255);
|
109 |
+
},
|
110 |
+
validateHsv: function(e) {
|
111 |
+
if (!this._keyNeedsValidation(e)) return e;
|
112 |
+
this._hueInput.value = this._setValueInRange(this._hueInput.value,0,359);
|
113 |
+
this._saturationInput.value = this._setValueInRange(this._saturationInput.value,0,100);
|
114 |
+
this._valueInput.value = this._setValueInRange(this._valueInput.value,0,100);
|
115 |
+
},
|
116 |
+
validateHex: function(e) {
|
117 |
+
if (!this._keyNeedsValidation(e)) return e;
|
118 |
+
var hex = new String(this._hexInput.value).toUpperCase();
|
119 |
+
hex = hex.replace(/[^A-F0-9]/g, '0');
|
120 |
+
if (hex.length > 6) hex = hex.substring(0, 6);
|
121 |
+
this._hexInput.value = hex;
|
122 |
+
},
|
123 |
+
_keyNeedsValidation: function(e) {
|
124 |
+
|
125 |
+
if (e.keyCode == 9 || // TAB
|
126 |
+
e.keyCode == 16 || // Shift
|
127 |
+
e.keyCode == 38 || // Up arrow
|
128 |
+
e.keyCode == 29 || // Right arrow
|
129 |
+
e.keyCode == 40 || // Down arrow
|
130 |
+
e.keyCode == 37 // Left arrow
|
131 |
+
||
|
132 |
+
(e.ctrlKey && (e.keyCode == 'c'.charCodeAt() || e.keyCode == 'v'.charCodeAt()) )
|
133 |
+
) return false;
|
134 |
+
|
135 |
+
return true;
|
136 |
+
},
|
137 |
+
_setValueInRange: function(value,min,max) {
|
138 |
+
if (value == '' || isNaN(value))
|
139 |
+
return min;
|
140 |
+
|
141 |
+
value = parseInt(value);
|
142 |
+
if (value > max)
|
143 |
+
return max;
|
144 |
+
if (value < min)
|
145 |
+
return min;
|
146 |
+
|
147 |
+
return value;
|
148 |
+
},
|
149 |
+
setValuesFromRgb: function() {
|
150 |
+
this.color.setRgb(this._redInput.value, this._greenInput.value, this._blueInput.value);
|
151 |
+
this._hexInput.value = this.color.hex;
|
152 |
+
this._hueInput.value = this.color.h;
|
153 |
+
this._saturationInput.value = this.color.s;
|
154 |
+
this._valueInput.value = this.color.v;
|
155 |
+
},
|
156 |
+
setValuesFromHsv: function() {
|
157 |
+
this.color.setHsv(this._hueInput.value, this._saturationInput.value, this._valueInput.value);
|
158 |
+
|
159 |
+
this._hexInput.value = this.color.hex;
|
160 |
+
this._redInput.value = this.color.r;
|
161 |
+
this._greenInput.value = this.color.g;
|
162 |
+
this._blueInput.value = this.color.b;
|
163 |
+
},
|
164 |
+
setValuesFromHex: function() {
|
165 |
+
this.color.setHex(this._hexInput.value);
|
166 |
+
|
167 |
+
this._redInput.value = this.color.r;
|
168 |
+
this._greenInput.value = this.color.g;
|
169 |
+
this._blueInput.value = this.color.b;
|
170 |
+
|
171 |
+
this._hueInput.value = this.color.h;
|
172 |
+
this._saturationInput.value = this.color.s;
|
173 |
+
this._valueInput.value = this.color.v;
|
174 |
+
},
|
175 |
+
setCustomHexValue: function (hexValue) {
|
176 |
+
this._hexInput.value = hexValue;
|
177 |
+
this.setValuesFromHex();
|
178 |
+
},
|
179 |
+
getValueFromHex: function() {
|
180 |
+
return this._hexInput.value;
|
181 |
+
}
|
182 |
+
};
|
js/colorpicker/slider.js
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright (c) 2007 John Dyer (http://johndyer.name)
|
3 |
+
MIT style license
|
4 |
+
*/
|
5 |
+
|
6 |
+
if (!window.Refresh) Refresh = {};
|
7 |
+
if (!Refresh.Web) Refresh.Web = {};
|
8 |
+
|
9 |
+
Refresh.Web.SlidersList = [];
|
10 |
+
|
11 |
+
Refresh.Web.DefaultSliderSettings = {
|
12 |
+
xMinValue: 0,
|
13 |
+
xMaxValue: 100,
|
14 |
+
yMinValue: 0,
|
15 |
+
yMaxValue: 100,
|
16 |
+
arrowImage: 'refresh_web/colorpicker/images/rangearrows.gif'
|
17 |
+
}
|
18 |
+
|
19 |
+
|
20 |
+
Refresh.Web.Slider = Class.create();
|
21 |
+
Refresh.Web.Slider.prototype = {
|
22 |
+
_bar: null,
|
23 |
+
_arrow: null,
|
24 |
+
|
25 |
+
initialize: function(id, settings) {
|
26 |
+
this.id = id;
|
27 |
+
this.settings = Object.extend(Object.extend({},Refresh.Web.DefaultSliderSettings), settings || {});
|
28 |
+
|
29 |
+
this.xValue = 0;
|
30 |
+
this.yValue = 0;
|
31 |
+
|
32 |
+
// hook up controls
|
33 |
+
this._bar = $(this.id);
|
34 |
+
|
35 |
+
// build controls
|
36 |
+
this._arrow = new Element('img', {
|
37 |
+
src: this.settings.arrowImage,
|
38 |
+
border: 0,
|
39 |
+
margin: 0,
|
40 |
+
padding: 0,
|
41 |
+
onDragStart: 'return false;'
|
42 |
+
});
|
43 |
+
this._arrow.className = 'color-picker-created';
|
44 |
+
this._arrow.setStyle({position: 'absolute', top: '0px', left: '0px'});
|
45 |
+
$(document.body).insert(this._arrow);
|
46 |
+
|
47 |
+
// attach 'this' to html objects
|
48 |
+
var slider = this;
|
49 |
+
|
50 |
+
this.setPositioningVariables();
|
51 |
+
|
52 |
+
this._event_docMouseMove = this._docMouseMove.bindAsEventListener(this);
|
53 |
+
this._event_docMouseUp = this._docMouseUp.bindAsEventListener(this);
|
54 |
+
|
55 |
+
Event.observe(this._bar, 'mousedown', this._bar_mouseDown.bindAsEventListener(this));
|
56 |
+
Event.observe(this._arrow, 'mousedown', this._arrow_mouseDown.bindAsEventListener(this));
|
57 |
+
|
58 |
+
// set initial position
|
59 |
+
this.setArrowPositionFromValues();
|
60 |
+
|
61 |
+
// fire events
|
62 |
+
if (this.onValuesChanged) {
|
63 |
+
this.onValuesChanged(this);
|
64 |
+
}
|
65 |
+
|
66 |
+
// final setup
|
67 |
+
Refresh.Web.SlidersList.push(this);
|
68 |
+
},
|
69 |
+
|
70 |
+
|
71 |
+
setPositioningVariables: function() {
|
72 |
+
// calculate sizes and ranges
|
73 |
+
// BAR
|
74 |
+
|
75 |
+
this._barWidth = this._bar.getWidth();
|
76 |
+
this._barHeight = this._bar.getHeight();
|
77 |
+
|
78 |
+
var pos = this._bar.cumulativeOffset();
|
79 |
+
this._barTop = pos.top;
|
80 |
+
this._barLeft = pos.left;
|
81 |
+
|
82 |
+
this._barBottom = this._barTop + this._barHeight;
|
83 |
+
this._barRight = this._barLeft + this._barWidth;
|
84 |
+
|
85 |
+
// ARROW
|
86 |
+
this._arrow = $(this._arrow);
|
87 |
+
this._arrowWidth = this._arrow.getWidth();
|
88 |
+
this._arrowHeight = this._arrow.getHeight();
|
89 |
+
|
90 |
+
// MIN & MAX
|
91 |
+
this.MinX = this._barLeft;
|
92 |
+
this.MinY = this._barTop;
|
93 |
+
|
94 |
+
this.MaxX = this._barRight;
|
95 |
+
this.MinY = this._barBottom;
|
96 |
+
},
|
97 |
+
|
98 |
+
setArrowPositionFromValues: function(e) {
|
99 |
+
this.setPositioningVariables();
|
100 |
+
|
101 |
+
// sets the arrow position from XValue and YValue properties
|
102 |
+
|
103 |
+
var arrowOffsetX = 0;
|
104 |
+
var arrowOffsetY = 0;
|
105 |
+
|
106 |
+
// X Value/Position
|
107 |
+
if (this.settings.xMinValue != this.settings.xMaxValue) {
|
108 |
+
|
109 |
+
if (this.xValue == this.settings.xMinValue) {
|
110 |
+
arrowOffsetX = 0;
|
111 |
+
} else if (this.xValue == this.settings.xMaxValue) {
|
112 |
+
arrowOffsetX = this._barWidth-1;
|
113 |
+
} else {
|
114 |
+
|
115 |
+
var xMax = this.settings.xMaxValue;
|
116 |
+
if (this.settings.xMinValue < 1) {
|
117 |
+
xMax = xMax + Math.abs(this.settings.xMinValue) + 1;
|
118 |
+
}
|
119 |
+
var xValue = this.xValue;
|
120 |
+
|
121 |
+
if (this.xValue < 1) xValue = xValue + 1;
|
122 |
+
|
123 |
+
arrowOffsetX = xValue / xMax * this._barWidth;
|
124 |
+
|
125 |
+
if (parseInt(arrowOffsetX) == (xMax-1))
|
126 |
+
arrowOffsetX=xMax;
|
127 |
+
else
|
128 |
+
arrowOffsetX=parseInt(arrowOffsetX);
|
129 |
+
|
130 |
+
// shift back to normal values
|
131 |
+
if (this.settings.xMinValue < 1) {
|
132 |
+
arrowOffsetX = arrowOffsetX - Math.abs(this.settings.xMinValue) - 1;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
// X Value/Position
|
138 |
+
if (this.settings.yMinValue != this.settings.yMaxValue) {
|
139 |
+
|
140 |
+
if (this.yValue == this.settings.yMinValue) {
|
141 |
+
arrowOffsetY = 0;
|
142 |
+
} else if (this.yValue == this.settings.yMaxValue) {
|
143 |
+
arrowOffsetY = this._barHeight-1;
|
144 |
+
} else {
|
145 |
+
|
146 |
+
var yMax = this.settings.yMaxValue;
|
147 |
+
if (this.settings.yMinValue < 1) {
|
148 |
+
yMax = yMax + Math.abs(this.settings.yMinValue) + 1;
|
149 |
+
}
|
150 |
+
|
151 |
+
var yValue = this.yValue;
|
152 |
+
|
153 |
+
if (this.yValue < 1) yValue = yValue + 1;
|
154 |
+
|
155 |
+
var arrowOffsetY = yValue / yMax * this._barHeight;
|
156 |
+
|
157 |
+
if (parseInt(arrowOffsetY) == (yMax-1))
|
158 |
+
arrowOffsetY=yMax;
|
159 |
+
else
|
160 |
+
arrowOffsetY=parseInt(arrowOffsetY);
|
161 |
+
|
162 |
+
if (this.settings.yMinValue < 1) {
|
163 |
+
arrowOffsetY = arrowOffsetY - Math.abs(this.settings.yMinValue) - 1;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
this._setArrowPosition(arrowOffsetX, arrowOffsetY);
|
169 |
+
|
170 |
+
},
|
171 |
+
_setArrowPosition: function(offsetX, offsetY) {
|
172 |
+
|
173 |
+
|
174 |
+
// validate
|
175 |
+
if (offsetX < 0) offsetX = 0
|
176 |
+
if (offsetX > this._barWidth) offsetX = this._barWidth;
|
177 |
+
if (offsetY < 0) offsetY = 0
|
178 |
+
if (offsetY > this._barHeight) offsetY = this._barHeight;
|
179 |
+
|
180 |
+
var posX = this._barLeft + offsetX;
|
181 |
+
var posY = this._barTop + offsetY;
|
182 |
+
|
183 |
+
// check if the arrow is bigger than the bar area
|
184 |
+
if (this._arrowWidth > this._barWidth) {
|
185 |
+
posX = posX - (this._arrowWidth/2 - this._barWidth/2);
|
186 |
+
} else {
|
187 |
+
posX = posX - parseInt(this._arrowWidth/2);
|
188 |
+
}
|
189 |
+
if (this._arrowHeight > this._barHeight) {
|
190 |
+
posY = posY - (this._arrowHeight/2 - this._barHeight/2);
|
191 |
+
} else {
|
192 |
+
posY = posY - parseInt(this._arrowHeight/2);
|
193 |
+
}
|
194 |
+
this._arrow.style.left = posX + 'px';
|
195 |
+
this._arrow.style.top = posY + 'px';
|
196 |
+
},
|
197 |
+
_bar_mouseDown: function(e) {
|
198 |
+
this._mouseDown(e);
|
199 |
+
},
|
200 |
+
|
201 |
+
_arrow_mouseDown: function(e) {
|
202 |
+
this._mouseDown(e);
|
203 |
+
},
|
204 |
+
|
205 |
+
_mouseDown: function(e) {
|
206 |
+
Refresh.Web.ActiveSlider = this;
|
207 |
+
|
208 |
+
this.setValuesFromMousePosition(e);
|
209 |
+
|
210 |
+
Event.observe(document, 'mousemove', this._event_docMouseMove);
|
211 |
+
Event.observe(document, 'mouseup', this._event_docMouseUp);
|
212 |
+
|
213 |
+
Event.stop(e);
|
214 |
+
},
|
215 |
+
|
216 |
+
_docMouseMove: function(e) {
|
217 |
+
|
218 |
+
this.setValuesFromMousePosition(e);
|
219 |
+
|
220 |
+
Event.stop(e);
|
221 |
+
},
|
222 |
+
|
223 |
+
_docMouseUp: function(e) {
|
224 |
+
Event.stopObserving( document, 'mouseup', this._event_docMouseUp);
|
225 |
+
Event.stopObserving( document, 'mousemove', this._event_docMouseMove);
|
226 |
+
Event.stop(e);
|
227 |
+
},
|
228 |
+
|
229 |
+
setValuesFromMousePosition: function(e) {
|
230 |
+
//this.setPositioningVariables();
|
231 |
+
|
232 |
+
|
233 |
+
var mouse = Event.pointer(e);
|
234 |
+
|
235 |
+
var relativeX = 0;
|
236 |
+
var relativeY = 0;
|
237 |
+
|
238 |
+
// mouse relative to object's top left
|
239 |
+
if (mouse.x < this._barLeft)
|
240 |
+
relativeX = 0;
|
241 |
+
else if (mouse.x > this._barRight)
|
242 |
+
relativeX = this._barWidth;
|
243 |
+
else
|
244 |
+
relativeX = mouse.x - this._barLeft + 1;
|
245 |
+
|
246 |
+
if (mouse.y < this._barTop)
|
247 |
+
relativeY = 0;
|
248 |
+
else if (mouse.y > this._barBottom)
|
249 |
+
relativeY = this._barHeight;
|
250 |
+
else
|
251 |
+
relativeY = mouse.y - this._barTop + 1;
|
252 |
+
|
253 |
+
|
254 |
+
var newXValue = parseInt(relativeX / this._barWidth * this.settings.xMaxValue);
|
255 |
+
var newYValue = parseInt(relativeY / this._barHeight * this.settings.yMaxValue);
|
256 |
+
|
257 |
+
// set values
|
258 |
+
this.xValue = newXValue;
|
259 |
+
this.yValue = newYValue;
|
260 |
+
|
261 |
+
// position arrow
|
262 |
+
if (this.settings.xMaxValue == this.settings.xMinValue)
|
263 |
+
relativeX = 0;
|
264 |
+
if (this.settings.yMaxValue == this.settings.yMinValue)
|
265 |
+
relativeY = 0;
|
266 |
+
this._setArrowPosition(relativeX, relativeY);
|
267 |
+
|
268 |
+
// fire events
|
269 |
+
if(this.onValuesChanged)
|
270 |
+
this.onValuesChanged(this);
|
271 |
+
}
|
272 |
+
|
273 |
+
}
|
274 |
+
|
package.xml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>TonboColorPicker</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">mixed</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>This is an easy tool to improve design and user experience of your Magento website.
|
10 |
+
ColorPicker gives you an ability to manage color configuration of your products and makes color picking process easy and straightforward for your users.</summary>
|
11 |
+
<description>It is easier to pick a color when you can actually see it. Especially if color schemes of your products include color variations, fancy patterns and special effects. Once installed and activated, ColorPicker would scan your Magento system and find attributes and attribute sets which define color scheme of your website. It will then automatically map the colors to one of more than 200 known color codes in order to make the setup as easy and quick as possible.</description>
|
12 |
+
<notes>Public Version 1.0
|
13 |
+
version supports magento community version form 1.5.0.0 to 1.7.0.0</notes>
|
14 |
+
<authors><author><name>Tonbo Team</name><user>tonboinc</user><email>info@tonboinc.com</email></author></authors>
|
15 |
+
<date>2013-07-01</date>
|
16 |
+
<time>22:47:32</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Tonbo"><dir><dir name="ColorPicker"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Attribute"><dir name="Edit"><dir name="Tab"><file name="Options.php" hash="3f26ca9ef64d9a53fbae61ea2b92adc1"/></dir><file name="Tabs.php" hash="6e6fd037cc01c5b3675ccaf84702b0b7"/></dir><file name="Edit.php" hash="da7df2ff27b603dd621a67a02219e707"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Attribute"><file name="AllowedAfter.php" hash="36c8bc05927aa5a261d51476c46974f2"/><file name="AllowedList.php" hash="37b874de5737f9a444e8e79082208162"/><file name="ZoomImage.php" hash="2f515a091a5a0c33432f8df64a9a003d"/></dir></dir><file name="Form.php" hash="2404e72e1bc815e07e6f98a2b85e2256"/></dir></dir><dir name="Upload"><file name="Form.php" hash="82f125e1e01be9f67d79ecb36fe39992"/></dir></dir><dir name="Catalog"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="ac108816168e6a9afd9c28947fa1a61d"/></dir><file name="State.php" hash="718bca2c51930ec96ccd1f5e707cbcc9"/></dir><dir name="Product"><file name="Configurable.php" hash="8f0f1bf65b4eeaa8d45f6da956a52135"/></dir></dir><dir name="Checkout"><dir name="Cart"><dir name="Item"><dir name="Renderer"><file name="Configurable.php" hash="e2b5a5d454b70498f83517af8118cc88"/></dir></dir></dir></dir><dir name="Search"><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="e7957c00d5bff6cbd858d603c2974749"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="3b206d5fb7e30ef231d074c834aad0da"/></dir><file name="LICENSE.txt" hash="060376ffddaeeab63b338e022e62346d"/><dir name="Model"><dir name="Adminhtml"><file name="AllowedList.php" hash="ba2a1596d749c70704c92f6c8f0813e4"/><file name="ListSave.php" hash="65414ad73f0ff99f70ebd6a7b470959c"/></dir><dir name="Catalog"><dir name="Product"><dir name="Type"><file name="Configurable.php" hash="aa34cda2328fcba54bb80dba12d2f5df"/></dir></dir></dir><dir name="Color"><file name="Image.php" hash="6c7021e4901135670649436bc152f27f"/><file name="Value.php" hash="be3736aa604ca142bd221904f32bba65"/></dir><dir name="Library"><file name="Abstract.php" hash="0a98567c943b62e9081533b1a0b62a6a"/><file name="Color.php" hash="d5eb9bc776259ed9a01bb97e133ea1cb"/><file name="Interface.php" hash="abcc0e08d7ee0d3ac39649dec472bab0"/><file name="Option.php" hash="b62bb4c534702fef9eb150132d8c89d0"/></dir><file name="Mapper.php" hash="d0d69b839426a9bfeedd1617764ae143"/><dir name="Resource"><dir name="Catalog"><dir name="Eav"><dir name="Mysql4"><file name="Attribute.php" hash="073f768f680b62cae36ec65db9071767"/></dir></dir></dir><dir name="Color"><dir name="Value"><file name="Collection.php" hash="368205359eec1b848aaa9b9ae445204a"/></dir><file name="Value.php" hash="60208af080bf19c621d559d693a1171b"/></dir><file name="Translate.php" hash="9ccbbddcdd16b50a2cf958fc8ebc987e"/><dir name="Translation"><file name="Collection.php" hash="635ddadc5ad2cf684e75e07cbc8c97b9"/></dir><file name="Translation.php" hash="a4718b32803ccf4e6b4335dfac72726e"/></dir><dir name="Translate"><file name="Entity.php" hash="c4db244504518ac9afaf5c6025931486"/><file name="EntityInterface.php" hash="bbb4e46628c4324727a9bfceb99b7263"/><file name="Register.php" hash="36fee393b1eee7383c9831ce70f010eb"/><dir name="Source"><file name="Abstract.php" hash="86236e43a353758042123e706d6bb7b3"/><file name="Color.php" hash="1738586a679d843ecb4238a3703bc68a"/><file name="Option.php" hash="5e605ab897f4d93836d2512fbe97c67d"/></dir><file name="SourceInterface.php" hash="df7ae7b528c7fd520ef6afeb25ff493a"/></dir><file name="Translate.php" hash="94013c1988f6b027a0a06262ae644739"/><file name="Translation.php" hash="7c927e861a640a98512ccb40b43d9f00"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="TonboController.php" hash="7ae89f9c96498e656387144ba782d3eb"/></dir></dir><dir name="etc"><file name="config.xml" hash="d3d30791b90ff4f78d53dd293522d4a9"/><dir name="libraries"><file name="color_lib.xml" hash="5152f07c58020629c1b9e06c3c3902e1"/><file name="option_lib.xml" hash="abb35e928f183d186241bbf54486ff2b"/></dir><file name="system.xml" hash="4bfa888c1849f72a6fd24daf1926ab86"/></dir><dir name="sql"><dir name="colorpicker_setup"><file name="mysql4-data-upgrade-1.0.0.0-1.0.0.1.php" hash="1265b5b31797bf2604c61d28767796dd"/><file name="mysql4-data-upgrade-1.0.0.1-1.0.0.2.php" hash="e2bff8eabe7878f35989eb001273a954"/><file name="mysql4-install-1.0.0.0.php" hash="5bb95c1d021290b3198cf1d73b631a24"/></dir></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="colorpicker.xml" hash="85244a9d24ff22f4273d121e1861e401"/></dir><dir name="template"><dir name="tonbo_colorpicker"><file name="cart_item_default.phtml" hash="36803ac3d97aabeb7c26514e706b2112"/><file name="catalog_layer_filter.phtml" hash="ed3f4ad3a6cd7feb1fce1e447bdf1870"/><file name="catalog_layer_sate.phtml" hash="5a822fb9534b6ab466b564d84ef854e6"/><file name="options_configurable.phtml" hash="61c77f2e8d787a0861c3c216bede212d"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="colorpicker.xml" hash="a435ddf8669203f1478eba54a645a5c1"/></dir><dir name="template"><dir name="tonbo_colorpicker"><file name="allowed_after.phtml" hash="cbde4a1fdb5cf3e7933226e68ccc14e1"/><file name="color_picker.phtml" hash="365dac0f5209b49e34a2fd636dad8fd1"/><file name="options.phtml" hash="5412292228944d629d1aee1d507e2f45"/><file name="upload_form.phtml" hash="20a50c150978fe9a67b88d346e7b34dc"/><file name="zoom_image_after.phtml" hash="103812af65af7117004ebed457c829f3"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tonbo_ColorPicker.xml" hash="9eb5ba84245ddf029d427bdc7467b13c"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Tonbo_ColorPicker.csv" hash="7bbae2caba510e5c4eba6df8fda7b70b"/></dir><dir name="de_DE"><file name="Tonbo_ColorPicker.csv" hash="d38cf9dc6a34f85393e0f683dac61151"/></dir><dir name="en_CA"><file name="Tonbo_ColorPicker.csv" hash="08ac7abc801a8cb6ace5e1164d1508fd"/></dir><dir name="en_GB"><file name="Tonbo_ColorPicker.csv" hash="08ac7abc801a8cb6ace5e1164d1508fd"/></dir><dir name="es_AR"><file name="Tonbo_ColorPicker.csv" hash="77288bd61e1d38562453ddb872284130"/></dir><dir name="es_CO"><file name="Tonbo_ColorPicker.csv" hash="77288bd61e1d38562453ddb872284130"/></dir><dir name="es_ES"><file name="Tonbo_ColorPicker.csv" hash="77288bd61e1d38562453ddb872284130"/></dir><dir name="es_MX"><file name="Tonbo_ColorPicker.csv" hash="77288bd61e1d38562453ddb872284130"/></dir><dir name="fr_CA"><file name="Tonbo_ColorPicker.csv" hash="c12fcca5f6ef49a8e8b44a52d6fbda40"/></dir><dir name="fr_FR"><file name="Tonbo_ColorPicker.csv" hash="c12fcca5f6ef49a8e8b44a52d6fbda40"/></dir><dir name="it_IT"><file name="Tonbo_ColorPicker.csv" hash="ece67abd35b2349d045ec0b17992f31d"/></dir><dir name="nl_NL"><file name="Tonbo_ColorPicker.csv" hash="d4232ed72c1981eeeace3447f7f113b2"/></dir><dir name="pt_BR"><file name="Tonbo_ColorPicker.csv" hash="5644efd60b31ccf1eb033bc12fc967c0"/></dir><dir name="pt_PT"><file name="Tonbo_ColorPicker.csv" hash="5644efd60b31ccf1eb033bc12fc967c0"/></dir><dir name="ru_RU"><file name="Tonbo_ColorPicker.csv" hash="b9b7eac65ec71a69a242055a221d8bb8"/></dir><dir name="uk_UA"><file name="Tonbo_ColorPicker.csv" hash="95a01ba914087c153b2f3c3269430a96"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="tonbo-colorpicker"><dir><dir name="img"><file name="close.png" hash="3c5e5fc3d7f21392b319fe3510122c76"/><file name="edit.png" hash="3d2137a6324e29f408604fc2914051fe"/><file name="editRetina.png" hash="ee0c3629e9a82cfccfd4d5a43e78bc43"/><file name="error.png" hash="f14f36b7b0b330e3ccec5bcdaea79751"/><file name="errorRetina.png" hash="641e8394ee86b960e107ef8b99cedccc"/><file name="full-arrow-left.gif" hash="8ec91b60d38d1a16cba7670f2088a5c7"/><file name="full-arrow.gif" hash="36ddff0fca1c7d8900cb3633e0a30cea"/><file name="leopard.jpg" hash="f57d843a4d8bb0b3e8214374f5403494"/><file name="leopard_small.jpg" hash="6b23c7c009463d0761a5a9b62544f65d"/><file name="newAttrRetina.png" hash="190b3205a7db2d5dd2c32037f1092790"/><file name="success.png" hash="2aa498e1e014e7d3ced42649cba657b3"/><file name="successRetina.png" hash="374bc6fb43545711c6e2291f29aedea3"/><file name="tnb_delete_btn.png" hash="624487dde7e7fb1105ed9a79023e256e"/></dir></dir><file name="styles.css" hash="a666a5b5e437a9222ae1033bcee48c52"/></dir><dir name="images"><dir name="colorpicker"><file name="bar-blue-bl.png" hash="b778d475308ba416d1e736c32edcf405"/><file name="bar-blue-br.png" hash="840408369ec8088205457a52ac85430b"/><file name="bar-blue-tl.png" hash="b55fea6321394b5ec219e3798a465963"/><file name="bar-blue-tr.png" hash="4a202c137cd44410e64912a8fd163b6c"/><file name="bar-brightness.png" hash="39b5e4331fdd318f27a4144dc172c4dd"/><file name="bar-green-bl.png" hash="f5190372ea526b5226d75e8c5a270f1c"/><file name="bar-green-br.png" hash="2b3e5fc3321fb0e189024a6e8e162e44"/><file name="bar-green-tl.png" hash="ab540ae7638b2187b873e4bf19b6d3f5"/><file name="bar-green-tr.png" hash="decdf1e6aafd5dc81a73bfaae1ac2030"/><file name="bar-hue.png" hash="36102c875c55ac25709090d69cf4956f"/><file name="bar-red-bl.png" hash="2efa51e655ed7ceb92cbf81f5963800f"/><file name="bar-red-br.png" hash="923b16fe229458a6135472fc8a9fccd1"/><file name="bar-red-tl.png" hash="1094902ed1dc08da4b396aec49b6a53f"/><file name="bar-red-tr.png" hash="9eaebdeea948ab644767cf17247fa8fd"/><file name="bar-saturation.png" hash="dabb0b18bf80492f854c850ab6ba1e2f"/><file name="blank.gif" hash="fc94fb0c3ed8a8f909dbc7630a0987ff"/><file name="map-blue-max.png" hash="5026a00084957e2366f667c92be7161c"/><file name="map-blue-min.png" hash="015b32248114f2a42f7f278aabbdef81"/><file name="map-brightness.png" hash="83aafd17086eaab68b229a681c04139b"/><file name="map-green-max.png" hash="f80a6eca0f3c7dba092f2ede36e37e10"/><file name="map-green-min.png" hash="e937aebc761fe9ea7e2ffac360cd9b49"/><file name="map-hue.png" hash="076dc20edf52be6efbb83c7dd09b84fa"/><file name="map-red-max.png" hash="62e8f8e75b7954bbe9f712555dca13da"/><file name="map-red-min.png" hash="c5e306b87e4eacf894a454f437fed866"/><file name="map-saturation-overlay.png" hash="b01e6120d05abd33918d1dbb78c0660f"/><file name="map-saturation.png" hash="8495d8cfcd11178425d1408c26bf42df"/><file name="mappoint.gif" hash="9f6dd30bc97b892fbd971271d1a82ce7"/><file name="rangearrows.gif" hash="c5956447fffd9e9cce7697ac66a91325"/><file name="warning.png" hash="e01df973106a35e9fb4b79e27f0731c0"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="tonbo-colorpicker"><dir><dir name="css"><file name="styles.css" hash="9738e85bbc0d12446e1ffaee00caf775"/></dir><dir name="img"><file name="empty.png" hash="af9cf0bac40cc1a2eb1d217f9abd4523"/><file name="empty_small.png" hash="0c1379a5841562073846d78f2109e055"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="colorpicker"><file name="colormethods.js" hash="a01679e7e1db70d3c9fd9fb223e6d544"/><file name="colorpicker.js" hash="3132978753b3c4904f122c9a05afc8d2"/><file name="colorvaluepicker.js" hash="c9f3f37e7a94712a668c20dfeded1869"/><file name="slider.js" hash="ffecd9790e350a05873b780424e2b4ac"/></dir></dir></target></contents>
|
18 |
+
<compatible/>
|
19 |
+
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>core</channel><min>1.5.0.0</min><max>1.7.0.0</max></package></required></dependencies>
|
20 |
+
</package>
|
skin/adminhtml/default/default/images/colorpicker/bar-blue-bl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-blue-br.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-blue-tl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-blue-tr.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-brightness.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-green-bl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-green-br.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-green-tl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-green-tr.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-hue.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-red-bl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-red-br.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-red-tl.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-red-tr.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/bar-saturation.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/blank.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-blue-max.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-blue-min.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-brightness.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-green-max.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-green-min.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-hue.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-red-max.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-red-min.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-saturation-overlay.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/map-saturation.png
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/mappoint.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/rangearrows.gif
ADDED
Binary file
|
skin/adminhtml/default/default/images/colorpicker/warning.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/close.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/edit.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/editRetina.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/error.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/errorRetina.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/full-arrow-left.gif
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/full-arrow.gif
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/leopard.jpg
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/leopard_small.jpg
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/newAttrRetina.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/success.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/successRetina.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/img/tnb_delete_btn.png
ADDED
Binary file
|
skin/adminhtml/default/default/tonbo-colorpicker/styles.css
ADDED
@@ -0,0 +1,415 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Tonbo Inc
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* DISCLAIMER
|
12 |
+
*
|
13 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
14 |
+
* versions in the future.
|
15 |
+
*
|
16 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
17 |
+
* @email info@tonboinc.com
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
#design_colorpicker_is_active {
|
21 |
+
width: 252px;
|
22 |
+
}
|
23 |
+
|
24 |
+
.tonbo_colorpicker_assign_message {
|
25 |
+
border: 1px solid green;
|
26 |
+
color: green;
|
27 |
+
clear: both;
|
28 |
+
display: block;
|
29 |
+
margin: 5px 0 15px;
|
30 |
+
padding: 10px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.tonbo_colorpicker_wrapper {
|
34 |
+
width: 600px;
|
35 |
+
}
|
36 |
+
|
37 |
+
.tonbo_colorpicker_wrapper-disabled {
|
38 |
+
position: relative;
|
39 |
+
overflow: hidden;
|
40 |
+
}
|
41 |
+
|
42 |
+
.tonbo_colorpicker_wrapper-disabled:after {
|
43 |
+
content: '';
|
44 |
+
background: rgba(0, 0, 0, .1);
|
45 |
+
position: absolute;
|
46 |
+
top: 0;
|
47 |
+
bottom: 0;
|
48 |
+
left: 0;
|
49 |
+
right: 0;
|
50 |
+
z-index: 3;
|
51 |
+
}
|
52 |
+
|
53 |
+
.tonbo_colorpicker_attributes {
|
54 |
+
background: #fff;
|
55 |
+
box-shadow: inset 0 0 3px #ccc;
|
56 |
+
border: 1px solid #ccc;
|
57 |
+
float: left;
|
58 |
+
margin: 0;
|
59 |
+
padding: 0;
|
60 |
+
position: relative;
|
61 |
+
overflow: auto;
|
62 |
+
height: 315px;
|
63 |
+
width: 250px;
|
64 |
+
}
|
65 |
+
|
66 |
+
.tonbo_colorpicker_attributes_assigned {
|
67 |
+
float: right;
|
68 |
+
}
|
69 |
+
|
70 |
+
.tonbo_colorpicker_attributes:before {
|
71 |
+
content: attr(data-message);
|
72 |
+
color: #ccc;
|
73 |
+
display: block;
|
74 |
+
padding: 5px;
|
75 |
+
line-height: 20px;
|
76 |
+
text-align: center;
|
77 |
+
position: absolute;
|
78 |
+
top: 0;
|
79 |
+
left: 0;
|
80 |
+
right: 0;
|
81 |
+
z-index: 1;
|
82 |
+
}
|
83 |
+
|
84 |
+
.tonbo_colorpicker_attributes li {
|
85 |
+
background: #fff;
|
86 |
+
border-bottom: 1px solid #ccc;
|
87 |
+
line-height: 20px;
|
88 |
+
margin: 0 !important;
|
89 |
+
padding: 5px;
|
90 |
+
position: relative;
|
91 |
+
vertical-align: bottom;
|
92 |
+
text-overflow: ellipsis;
|
93 |
+
overflow: hidden;
|
94 |
+
white-space: nowrap;
|
95 |
+
z-index: 2;
|
96 |
+
}
|
97 |
+
|
98 |
+
.tonbo_colorpicker_attributes_assigned li {
|
99 |
+
padding-right: 25px;
|
100 |
+
}
|
101 |
+
|
102 |
+
.tonbo_colorpicker_attributes_assigned li .tonbo_colorpicker_edit_button {
|
103 |
+
position: relative;
|
104 |
+
left: 20px;
|
105 |
+
}
|
106 |
+
|
107 |
+
.tonbo_colorpicker_attributes_assigned li.options-detected {
|
108 |
+
background-image: url(img/successRetina.png);
|
109 |
+
background-repeat: no-repeat;
|
110 |
+
background-position: 5px center;
|
111 |
+
background-size: 20px 20px;
|
112 |
+
padding-left: 35px;
|
113 |
+
}
|
114 |
+
|
115 |
+
.tonbo_colorpicker_attributes_assigned li.options-not-detected {
|
116 |
+
background-image: url(img/errorRetina.png);
|
117 |
+
background-repeat: no-repeat;
|
118 |
+
background-position: 5px center;
|
119 |
+
background-size: 20px 20px;
|
120 |
+
padding-left: 35px;
|
121 |
+
}
|
122 |
+
|
123 |
+
.tonbo_colorpicker_attributes_assigned li.options-new-attr {
|
124 |
+
background-image: url(img/newAttrRetina.png);
|
125 |
+
background-repeat: no-repeat;
|
126 |
+
background-position: 5px center;
|
127 |
+
background-size: 20px 20px;
|
128 |
+
padding-left: 35px;
|
129 |
+
}
|
130 |
+
|
131 |
+
.tonbo_colorpicker_attributes li.selected {
|
132 |
+
background-color: #d4d4d4;
|
133 |
+
}
|
134 |
+
|
135 |
+
.tonbo_colorpicker_attributes li.selected:hover {
|
136 |
+
background-color: #d4d4d4;
|
137 |
+
}
|
138 |
+
|
139 |
+
.tonbo_colorpicker_attributes li:hover {
|
140 |
+
background-color: #eee;
|
141 |
+
}
|
142 |
+
|
143 |
+
.tonbo_colorpicker_actions {
|
144 |
+
float: left;
|
145 |
+
padding: 0 0 0 6px;
|
146 |
+
margin: 139px 0 0 0 ;
|
147 |
+
text-align: left;
|
148 |
+
width: 89px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.tonbo_colorpicker_edit_button {
|
152 |
+
float: right;
|
153 |
+
display: inline-block;
|
154 |
+
background: url(img/editRetina.png) no-repeat left;
|
155 |
+
background-size: 20px 20px;
|
156 |
+
text-indent: 100%;
|
157 |
+
overflow: hidden;
|
158 |
+
height: 20px;
|
159 |
+
width: 20px;
|
160 |
+
}
|
161 |
+
|
162 |
+
.add_to_list,
|
163 |
+
.remove_from_list {
|
164 |
+
display: inline-block;
|
165 |
+
background: url(img/full-arrow.gif) no-repeat 0 0;
|
166 |
+
overflow: hidden;
|
167 |
+
text-indent: 100%;
|
168 |
+
height: 17px;
|
169 |
+
width: 84px;
|
170 |
+
}
|
171 |
+
|
172 |
+
.remove_from_list {
|
173 |
+
background-image: url(img/full-arrow-left.gif);
|
174 |
+
position: relative;
|
175 |
+
margin: 10px 0 0 -1px;
|
176 |
+
}
|
177 |
+
|
178 |
+
.tcp-popup {
|
179 |
+
position: absolute;
|
180 |
+
padding: 10px;
|
181 |
+
background: #fff;
|
182 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, .5);
|
183 |
+
margin: -5px 0 0 -270px;
|
184 |
+
}
|
185 |
+
|
186 |
+
.tcp-popup:after {
|
187 |
+
content: '▼';
|
188 |
+
color: #fff;
|
189 |
+
font-size: 20px;
|
190 |
+
line-height: 20px;
|
191 |
+
text-shadow: 0 2px 2px rgba(0, 0, 0, .5);
|
192 |
+
display: block;
|
193 |
+
position: absolute;
|
194 |
+
bottom: -16px;
|
195 |
+
left: 272px;
|
196 |
+
vertical-align: top;
|
197 |
+
white-space: nowrap;
|
198 |
+
}
|
199 |
+
|
200 |
+
.tcp-popup-close-btn {
|
201 |
+
background: url(img/close.png) no-repeat center;
|
202 |
+
font-size: 12px;
|
203 |
+
cursor: pointer;
|
204 |
+
text-decoration: underline;
|
205 |
+
position: absolute;
|
206 |
+
top: 12px;
|
207 |
+
right: 10px;
|
208 |
+
z-index: 2;
|
209 |
+
text-indent: 100%;
|
210 |
+
overflow: hidden;
|
211 |
+
height: 20px;
|
212 |
+
width: 20px;
|
213 |
+
}
|
214 |
+
|
215 |
+
.tcp-popup-file_upload-wrapper {
|
216 |
+
border-right: 1px solid #eee;
|
217 |
+
float: left;
|
218 |
+
padding-right: 10px;
|
219 |
+
margin: 0 10px 0 0;
|
220 |
+
}
|
221 |
+
|
222 |
+
.tcp-popup-file_upload {
|
223 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, .2);
|
224 |
+
color: #ccc;
|
225 |
+
font-size: 22px;
|
226 |
+
font-weight: bold;
|
227 |
+
border: 1px solid #fff;
|
228 |
+
border-radius: 5px;
|
229 |
+
text-align: center;
|
230 |
+
margin: 0 0 10px;
|
231 |
+
position: relative;
|
232 |
+
overflow: hidden;
|
233 |
+
height: 259px;
|
234 |
+
width: 259px;
|
235 |
+
}
|
236 |
+
|
237 |
+
.tcp-popup-file_upload-actions a {
|
238 |
+
background: #1687e7;
|
239 |
+
border-radius: 15px;
|
240 |
+
color: #fff;
|
241 |
+
padding: 1px 10px 2px;
|
242 |
+
display: inline-block;
|
243 |
+
text-decoration: none;
|
244 |
+
}
|
245 |
+
|
246 |
+
.tcp-popup-file_upload > span {
|
247 |
+
position: absolute;
|
248 |
+
left: 50%;
|
249 |
+
top: 50%;
|
250 |
+
margin: 0 0 0 -100px;
|
251 |
+
white-space: normal;
|
252 |
+
width: 200px;
|
253 |
+
}
|
254 |
+
|
255 |
+
.tcp-popup-file_upload input[type=file] {
|
256 |
+
position: absolute;
|
257 |
+
top: 0; right: 0;
|
258 |
+
font-size: 600px;
|
259 |
+
opacity: 0;
|
260 |
+
filter: alpha(opacity=0);
|
261 |
+
cursor: pointer;
|
262 |
+
}
|
263 |
+
|
264 |
+
.tcp-popup-wrapper {
|
265 |
+
float: right;
|
266 |
+
position: relative;
|
267 |
+
}
|
268 |
+
|
269 |
+
.tcp-popup-wrapper p {
|
270 |
+
margin: 10px 0 0;
|
271 |
+
max-width: 400px;
|
272 |
+
}
|
273 |
+
|
274 |
+
.tcp-popup-delete-img {
|
275 |
+
background: url(img/tnb_delete_btn.png) no-repeat 0 0;
|
276 |
+
cursor: pointer;
|
277 |
+
text-indent: 100%;
|
278 |
+
overflow: hidden;
|
279 |
+
white-space: nowrap;
|
280 |
+
position: absolute;
|
281 |
+
top: 5px;
|
282 |
+
left: 255px;
|
283 |
+
height: 22px;
|
284 |
+
width: 22px;
|
285 |
+
z-index: 1;
|
286 |
+
}
|
287 |
+
|
288 |
+
.cf:before,
|
289 |
+
.cf:after, {
|
290 |
+
content:"";
|
291 |
+
display:table;
|
292 |
+
}
|
293 |
+
|
294 |
+
.cf:after {
|
295 |
+
clear:both;
|
296 |
+
}
|
297 |
+
|
298 |
+
.cf {
|
299 |
+
zoom:1;
|
300 |
+
}
|
301 |
+
|
302 |
+
.tcp-color-set {
|
303 |
+
border-radius: 2px;
|
304 |
+
box-shadow: 0 0 3px #0d59c9;
|
305 |
+
display: inline-block;
|
306 |
+
height: 20px;
|
307 |
+
width: 20px;
|
308 |
+
}
|
309 |
+
|
310 |
+
.is-empty {
|
311 |
+
border-radius: 0;
|
312 |
+
box-shadow: none;
|
313 |
+
}
|
314 |
+
|
315 |
+
.tcp-images-list {
|
316 |
+
display: block;
|
317 |
+
}
|
318 |
+
|
319 |
+
.tcp-images-list-item {
|
320 |
+
display: inline-block;
|
321 |
+
margin-right: 10px !important;
|
322 |
+
}
|
323 |
+
|
324 |
+
.tcp-images-list-item a {
|
325 |
+
cursor: default;
|
326 |
+
border-radius: 5px;
|
327 |
+
box-shadow: 0 0 1px #ccc;
|
328 |
+
display: inline-block;
|
329 |
+
position: relative;
|
330 |
+
height: 29px;
|
331 |
+
width: 29px;
|
332 |
+
}
|
333 |
+
|
334 |
+
.tcp-images-list-item a:hover {
|
335 |
+
box-shadow: 0 0 3px #9cefef;
|
336 |
+
}
|
337 |
+
|
338 |
+
.tcp-images-list-item span {
|
339 |
+
display: none;
|
340 |
+
}
|
341 |
+
|
342 |
+
.tcp-images-list-item img {
|
343 |
+
border-radius: 15px;
|
344 |
+
}
|
345 |
+
|
346 |
+
.tcp-images-list-item strong {
|
347 |
+
color: #000;
|
348 |
+
display: block;
|
349 |
+
font-size: 16px;
|
350 |
+
font-weight: normal;
|
351 |
+
padding: 5px 0 0;
|
352 |
+
text-align: center;
|
353 |
+
}
|
354 |
+
|
355 |
+
.tcp-images-list-item span:after {
|
356 |
+
content: '▼';
|
357 |
+
color: #fff;
|
358 |
+
font-size: 20px;
|
359 |
+
line-height: 20px;
|
360 |
+
text-shadow: 0 2px 2px #ccc;
|
361 |
+
display: block;
|
362 |
+
position: absolute;
|
363 |
+
bottom: -16px;
|
364 |
+
left: 100px;
|
365 |
+
vertical-align: top;
|
366 |
+
white-space: nowrap;
|
367 |
+
}
|
368 |
+
|
369 |
+
.tcp-images-list-item span {
|
370 |
+
display: none;
|
371 |
+
background: #fff;
|
372 |
+
box-shadow: 0 0 6px #ccc;
|
373 |
+
padding: 10px;
|
374 |
+
position: absolute;
|
375 |
+
margin: 0 0 16px;
|
376 |
+
bottom: 100%;
|
377 |
+
left: -95px;
|
378 |
+
z-index: 3;
|
379 |
+
}
|
380 |
+
|
381 |
+
.tcp-images-list-item a.hover:hover span {
|
382 |
+
display: block !important;
|
383 |
+
opacity: 1 !important;
|
384 |
+
}
|
385 |
+
|
386 |
+
.tcp-images-list-item a i {
|
387 |
+
display: none;
|
388 |
+
}
|
389 |
+
|
390 |
+
.tcp-images-list-item a.hover:hover i {
|
391 |
+
border-radius: 15px;
|
392 |
+
display: block;
|
393 |
+
height: 200px;
|
394 |
+
width: 200px;
|
395 |
+
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
|
396 |
+
}
|
397 |
+
|
398 |
+
.tcp-images-list-item a.hover:hover span:hover {
|
399 |
+
visibility: hidden;
|
400 |
+
}
|
401 |
+
|
402 |
+
.tcp-zoom-toggle {
|
403 |
+
float: right;
|
404 |
+
margin: 0 0 0 20px;
|
405 |
+
}
|
406 |
+
|
407 |
+
.tcp-zoom-toggle input {
|
408 |
+
margin-right: 5px;
|
409 |
+
}
|
410 |
+
|
411 |
+
#design_colorpicker_attribute_list,
|
412 |
+
#design_colorpicker_zoom_image {
|
413 |
+
position: absolute;
|
414 |
+
visibility: hidden;
|
415 |
+
}
|
skin/frontend/base/default/tonbo-colorpicker/css/styles.css
ADDED
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Tonbo Inc
|
3 |
+
*
|
4 |
+
* NOTICE OF LICENSE
|
5 |
+
*
|
6 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
7 |
+
* that is bundled with this package in the file LICENSE.txt.
|
8 |
+
* It is also available through the world-wide-web at this URL:
|
9 |
+
* http://opensource.org/licenses/osl-3.0.php
|
10 |
+
*
|
11 |
+
* DISCLAIMER
|
12 |
+
*
|
13 |
+
* Do not edit or add to this file if you wish to upgrade Tonbo Inc products to newer
|
14 |
+
* versions in the future.
|
15 |
+
*
|
16 |
+
* @copyright Copyright © 2013 Tonbo Inc. (http://www.tonboinc.com)
|
17 |
+
* @email info@tonboinc.com
|
18 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
19 |
+
*/
|
20 |
+
.tcp-images-list {
|
21 |
+
display: block;
|
22 |
+
margin: 10px 0 0;
|
23 |
+
}
|
24 |
+
|
25 |
+
.tcp-images-list-item {
|
26 |
+
display: inline-block;
|
27 |
+
margin-right: 5px !important;
|
28 |
+
}
|
29 |
+
|
30 |
+
.tcp-images-list-item a,
|
31 |
+
.tcp-list-item-selected {
|
32 |
+
border-radius: 2px;
|
33 |
+
box-shadow: 0 0 1px #ccc;
|
34 |
+
display: inline-block;
|
35 |
+
position: relative;
|
36 |
+
height: 29px;
|
37 |
+
width: 29px;
|
38 |
+
}
|
39 |
+
|
40 |
+
.tcp-images-list-item a:hover,
|
41 |
+
.tcp-images-list-item .color-selected {
|
42 |
+
box-shadow: 0 0 0 3px #0d59c9;
|
43 |
+
}
|
44 |
+
|
45 |
+
.tcp-images-list-item span,
|
46 |
+
.tcp-list-item-selected span {
|
47 |
+
display: none;
|
48 |
+
}
|
49 |
+
|
50 |
+
.tcp-images-list-item img,
|
51 |
+
.tcp-list-item-selected img {
|
52 |
+
border-radius: 15px;
|
53 |
+
}
|
54 |
+
|
55 |
+
.tcp-images-list-item strong,
|
56 |
+
.tcp-list-item-selected strong {
|
57 |
+
color: #000;
|
58 |
+
display: block;
|
59 |
+
font-size: 16px;
|
60 |
+
font-weight: normal;
|
61 |
+
padding: 5px 0 0;
|
62 |
+
text-align: center;
|
63 |
+
}
|
64 |
+
|
65 |
+
.tcp-images-list-item span:after,
|
66 |
+
.tcp-list-item-selected span:after {
|
67 |
+
content: '▼';
|
68 |
+
color: #fff;
|
69 |
+
font-size: 20px;
|
70 |
+
line-height: 20px;
|
71 |
+
text-shadow: 0 2px 2px #666;
|
72 |
+
display: block;
|
73 |
+
position: absolute;
|
74 |
+
bottom: -16px;
|
75 |
+
left: 135px;
|
76 |
+
vertical-align: top;
|
77 |
+
white-space: nowrap;
|
78 |
+
}
|
79 |
+
|
80 |
+
.tcp-images-list-item span,
|
81 |
+
.tcp-list-item-selected span {
|
82 |
+
display: none;
|
83 |
+
background: #fff;
|
84 |
+
box-shadow: 0 0 6px #666;
|
85 |
+
margin: 0 0 16px;
|
86 |
+
padding: 10px;
|
87 |
+
position: absolute;
|
88 |
+
bottom: 100%;
|
89 |
+
left: -130px;
|
90 |
+
}
|
91 |
+
|
92 |
+
.tcp-images-list-item span i,
|
93 |
+
.tcp-list-item-selected span i {
|
94 |
+
box-shadow: 0 0 3px #999;
|
95 |
+
border-radius: 15px;
|
96 |
+
display: block;
|
97 |
+
height: 260px;
|
98 |
+
width: 260px;
|
99 |
+
}
|
100 |
+
|
101 |
+
.tcp-images-list-item a:hover span,
|
102 |
+
.tcp-list-item-selected:hover span {
|
103 |
+
display: block;
|
104 |
+
z-index: 999999;
|
105 |
+
}
|
106 |
+
|
107 |
+
.tcp-images-list-item a:hover span:hover,
|
108 |
+
.tcp-list-item-selected:hover span:hover {
|
109 |
+
visibility: hidden;
|
110 |
+
}
|
111 |
+
|
112 |
+
.tcp-list-item-selected {
|
113 |
+
border-radius: 2px;
|
114 |
+
box-shadow: 0 0 0 3px #0d59c9;
|
115 |
+
display: inline-block;
|
116 |
+
height: 30px;
|
117 |
+
width: 30px;
|
118 |
+
margin-left: 5px;
|
119 |
+
vertical-align: top;
|
120 |
+
}
|
121 |
+
|
122 |
+
.cart-table .tcp-list-item-selected,
|
123 |
+
.currently .tcp-list-item-selected {
|
124 |
+
box-shadow: 0 0 3px #0d59c9;
|
125 |
+
}
|
126 |
+
|
127 |
+
.tcp-list-item-active {
|
128 |
+
border: 2px solid #333;
|
129 |
+
margin: -2px;
|
130 |
+
}
|
131 |
+
|
132 |
+
.tcp-select-hidden {
|
133 |
+
position: absolute;
|
134 |
+
visibility: hidden;
|
135 |
+
left: -100%;
|
136 |
+
top: -100%;
|
137 |
+
}
|
138 |
+
|
139 |
+
.tcp-select-inactive {
|
140 |
+
opacity: .3;
|
141 |
+
}
|
142 |
+
|
143 |
+
.tcp-select-inactive a,
|
144 |
+
.tcp-select-inactive a:hover {
|
145 |
+
cursor: default;
|
146 |
+
box-shadow: none !important;
|
147 |
+
}
|
148 |
+
|
149 |
+
.tcp-select-inactive a:hover span {
|
150 |
+
display: none !important;
|
151 |
+
}
|
152 |
+
|
153 |
+
.data-table .item-options .tcp-list-item-selected {
|
154 |
+
margin: 5px 0 8px;
|
155 |
+
}
|
skin/frontend/base/default/tonbo-colorpicker/img/empty.png
ADDED
Binary file
|
skin/frontend/base/default/tonbo-colorpicker/img/empty_small.png
ADDED
Binary file
|