{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/7602","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7602/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7602/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7602/events","html_url":"https://github.com/joomla/joomla-cms/pull/7602","id":98414784,"number":7602,"title":"Color form field type: new XML attributes + bug fix + RTL support","user":{"login":"JoomliC","id":2385058,"avatar_url":"https://avatars.githubusercontent.com/u/2385058?v=3","gravatar_id":"","url":"https://api.github.com/users/JoomliC","html_url":"https://github.com/JoomliC","followers_url":"https://api.github.com/users/JoomliC/followers","following_url":"https://api.github.com/users/JoomliC/following{/other_user}","gists_url":"https://api.github.com/users/JoomliC/gists{/gist_id}","starred_url":"https://api.github.com/users/JoomliC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoomliC/subscriptions","organizations_url":"https://api.github.com/users/JoomliC/orgs","repos_url":"https://api.github.com/users/JoomliC/repos","events_url":"https://api.github.com/users/JoomliC/events{/privacy}","received_events_url":"https://api.github.com/users/JoomliC/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-31T15:36:49Z","updated_at":"2016-03-10T11:39:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7602","html_url":"https://github.com/joomla/joomla-cms/pull/7602","diff_url":"https://github.com/joomla/joomla-cms/pull/7602.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/7602.patch"},"body":"\r\n--------------------\r\n\r\nThis PR is currently in stand-by, after @wilsonge suggestion, i have opened a PR to propose this change directly to the library minicolors.js : https://github.com/claviska/jquery-minicolors/pull/170\r\nAs Joomla is using currently an outdated version of this script (2013), i have udpated my changes of the minicolors.js to the latest minicolors.js version.\r\nSo... waiting for news...\r\n\r\nIn the same time, the bug fix for simplecolors.js with chosen.js is now moved to an new PR : https://github.com/joomla/joomla-cms/pull/7855\r\n\r\n--------------------\r\n\r\nFirst, this PR gives a solution to this issue : http://issues.joomla.org/tracker/joomla-cms/7401\r\n\r\nSecondly, it fixes an issue with simplecolors picker (control=simple) due to chosen.js file changes in Joomla 3.2.3... (and another minor issue with input value and RTL)\r\n\r\nAnd then, this one adds the possibility to enable an alpha slider in the color picker, and to save a rgba value for input.\r\n\r\n<b>Note : This PR is B/C and changes nothing to the color form field in place.</b>\r\n \r\n \r\n<h3>New XML attributes</h3>\r\n<h4>keywords</h4>\r\n(optional) allows to one or more valid keyword(s), comma separated : <code>transparent</code>,<code>inherit</code>,<code>initial</code> (Note: <code>none</code> is allowed as an entry (as user often think it's a valid keyword), but will be replaced by <code>transparent</code>)\r\n\r\n<b>XML:</b> <code>keywords=\"none,transparent,inherit,initial\"</code>\r\n<b>Usage:</b> enter the keyword in the field input (script will allow only keywords in the xml attribute)\r\n\r\n![joomla_color_keywords](https://cloud.githubusercontent.com/assets/2385058/9010732/0aee0f94-37a9-11e5-9230-40132ba18c59.png)\r\n\r\n\r\n<h4>alpha</h4>\r\n(optional) show or hide the opacity slider (true or false). If true, the color picker will return a rgba color.\r\n\r\n<b>XML:</b> <code>alpha=\"true\"</code>\r\n<b>Usage:</b> Pick the opacity in the slider\r\n\r\n![joomla_color_alpha_picker](https://cloud.githubusercontent.com/assets/2385058/9010769/43485c50-37a9-11e5-8fd8-42638dcd71b8.png)\r\n\r\n--------------------\r\n\r\n\r\n* <h5>Bug with simplecolors.js</h5>\r\n<b>This bug fix is moved to a new PR : https://github.com/joomla/joomla-cms/pull/7855</b>\r\nFix issue with simplecolors.js (since 3.2.3, bug due to chosen.js change)\r\n![joomla_color_simple_fix](https://cloud.githubusercontent.com/assets/2385058/9010614/38075176-37a8-11e5-8b7c-c7099c23d373.jpg)\r\n\r\n--------------------\r\n\r\n\r\n<h3>RTL support</h3>\r\nAdd RTL support. If position is default, the picker will be on the left if RTL language (currently it's right on LTR).\r\nThe input value was converted to RTL before, but with issue in some cases. To prevent this, the input value will always be LTR as it is not to be translated or converted as a CSS code value.\r\n![joomla_color_picker_rtl](https://cloud.githubusercontent.com/assets/2385058/9010467/60897ae4-37a7-11e5-8623-cba8311ae98f.jpg)\r\n\r\n\r\n\r\n<h3>Test instructions:</h3>\r\nAdd these fields to the settings part of an xml file of one extension (eg. template). Then go to that extension settings in the admin and test the different color fields.\r\n\r\n```\r\n<field name=\"color1\" type=\"color\" label=\"Color field\" />\r\n<field name=\"color2\" type=\"color\" label=\"Color field (WITH validate=color)\" validate=\"color\" />\r\n<field name=\"color3\" type=\"color\" label=\"With keywords (NO validate=color)\" keywords=\"none,transparent,inherit,initial\" />\r\n<field name=\"color4\" type=\"color\" label=\"With alpha (NO validate=color)\" alpha=\"true\" />\r\n<field name=\"color5\" type=\"color\" label=\"With keywords and alpha (NO validate=color)\" alpha=\"true\" keywords=\"none,transparent,inherit,initial\" />\r\n<field name=\"color6\" type=\"color\" label=\"With keywords and alpha (WITH validate=color)\" validate=\"color\" alpha=\"true\" keywords=\"none,transparent,inherit,initial\" />\r\n<field name=\"color7\" type=\"color\" label=\"Simple: Custom Color List\" default=\"transparent\" control=\"simple\" colors=\"transparent,#FFFFFF,#000000,#FF0000,#00FF00,#0000FF,#00FFFF,#FF00FF,#FFFF00\" />\r\n```\r\n\r\n\r\nThis PR is based on the great work already done by @nonumber (https://github.com/joomla/joomla-cms/pull/807) to integrate the great color picker created by @claviska (maybe some changes could interest you ?)\r\n\r\nAs the Joomla! Docs is not \"yet\" updated (but i will soon...) for this form field input, you can check here for all other attributes already available : https://github.com/joomla/joomla-cms/pull/807 (Thanks Peter! ;-) )"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/194802794","html_url":"https://github.com/joomla/joomla-cms/pull/7602#issuecomment-194802794","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7602","id":194802794,"user":{"login":"brianteeman","id":1296369,"avatar_url":"https://avatars.githubusercontent.com/u/1296369?v=3","gravatar_id":"","url":"https://api.github.com/users/brianteeman","html_url":"https://github.com/brianteeman","followers_url":"https://api.github.com/users/brianteeman/followers","following_url":"https://api.github.com/users/brianteeman/following{/other_user}","gists_url":"https://api.github.com/users/brianteeman/gists{/gist_id}","starred_url":"https://api.github.com/users/brianteeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianteeman/subscriptions","organizations_url":"https://api.github.com/users/brianteeman/orgs","repos_url":"https://api.github.com/users/brianteeman/repos","events_url":"https://api.github.com/users/brianteeman/events{/privacy}","received_events_url":"https://api.github.com/users/brianteeman/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T11:39:36Z","updated_at":"2016-03-10T11:39:36Z","body":"@JoomliC Any update on this?<hr /><sub>This comment was created with the <a href=\"https://github.com/joomla/jissues\">J!Tracker Application</a> at <a href=\"https://issues.joomla.org/tracker/joomla-cms/7602\">issues.joomla.org/joomla-cms/7602</a>.</sub>"}}