? Success

User tests: Successful: Unsuccessful:

avatar JoomliC
JoomliC
29 Apr 2016

New Pull Request for #7602 and Issue #7401 .

As requested by @wilsonge to contribute these changes back to the library (https://github.com/claviska/jquery-minicolors/), i did it :smile: . The updated library includes other fixes.
A special thanks to @claviska for his suggestions, help and the time he took in make it happen! :+1:
All documentation on this color picker library available here: http://labs.abeautifulsite.net/jquery-minicolors/

Summary of Changes

  • Update library jquery.minicolors.js to latest version 2.2.4 released on 18 March 2016
  • Full B/C (keep previous behavior as default, both in library itself, and in Joomla)
  • Add 2 form xml attributes: format and keywords
  • Allow to set the format to hex (current format), rgb and rgba
  • Allow usage of CSS-wide keywords transparent, initial, inherit
  • Fix RTL issue with color input value (color hex and rgb(a) values should be LTR) and fix position of the picker on RTL, when using default position.

Documentation

New XML attributes

keywords (optional)

CSS-wide keywords can be assigned by setting the keywords attribute to a comma-separated list of valid keywords: transparent,inherit,initial

XML: keywords="transparent,inherit,initial"
Usage: enter the keyword in the field input (script will allow only a keyword listed in the xml attribute)
See screen shot for testing.

format (optional)

For Joomla, i've integrate the rgb(a) format option as a one xml attribute. (no need to set a data-opacity attribute).
Format could be: hex (default), rgb or rgba (with opacity slider)

XML: format="rgba"
Usage: Will return a validated color hex or rgb(a)
See screen shot for testing.

RTL support

Add RTL support. If position is default, the picker will be on the left if RTL language (currently it's right on LTR).
The 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.
joomla_color_picker_rtl

NOTE: When this PR will be merged, i will update JDocs accordingly ;-)

Testing Instructions

Add these fields to the settings part of an xml file of one extension (eg. template Isis). Then go to that extension settings in the admin and test the different color fields.

<field name="color1" type="color" label="Color field default (HEX)" />
<field name="color2" type="color" label="HEX + keywords" keywords="transparent,initial,inherit" />
<field name="color3" type="color" label="RGB" format="rgb" />
<field name="color4" type="color" label="RGB + keywords" format="rgb" keywords="transparent,initial,inherit" />
<field name="color5" type="color" label="RGB(A)" format="rgba" />
<field name="color6" type="color" label="RGB(A) + keywords" format="rgba" keywords="transparent,initial,inherit" />

capture d ecran 2016-04-29 a 01 42 34

avatar JoomliC JoomliC - open - 29 Apr 2016
avatar JoomliC JoomliC - change - 29 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 29 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 29 Apr 2016
Category External Library JavaScript
avatar andrepereiradasilva andrepereiradasilva - test_item - 29 Apr 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 29 Apr 2016

I have tested this item :white_check_mark: successfully on 2211e19

worked. had to clena browser cache after apply patch.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10129.

avatar Twincarb
Twincarb - comment - 1 May 2016

library jquery.minicolors.js latest version 2.2.4 released on 18 Mar. Can you clarify which one is in use here.

I have tested with no issues detected and functionality is as described :smile:
Will submit a success result once the version is identified.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10129.

avatar JoomliC
JoomliC - comment - 1 May 2016

library jquery.minicolors.js latest version 2.2.4 released on 18 Mar. Can you clarify which one is in use here.

@Twincarb Yes you're right, i've mentionned 2.2.3, but it's 2.2.4! :+1: (will update description)
I was mistaken by the package.json version which was not updated : https://github.com/claviska/jquery-minicolors/blob/master/package.json#L3 ;-)
So yes, no worry, it is the latest released version in this PR ! ;-)

avatar JoomliC JoomliC - change - 1 May 2016
The description was changed
avatar Twincarb Twincarb - test_item - 1 May 2016 - Tested successfully
avatar Twincarb
Twincarb - comment - 1 May 2016

I have tested this item :white_check_mark: successfully on 2211e19

Is it worth adding the version number to the .js file? I know the developer hasn't but I guess it's always worth asking him.
Then we have an easy way of comparing the version of the file.
:smile:


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10129.

avatar JoomliC
JoomliC - comment - 1 May 2016

@Twincarb Yes, i agree!
@claviska a suggestion here, to add the release version in jquery.minicolors.js and minified files... ;-)

avatar JoomliC
JoomliC - comment - 1 May 2016

@andrepereiradasilva, @Twincarb Thanks for testing!

avatar brianteeman brianteeman - change - 1 May 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 1 May 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10129.

avatar joomla-cms-bot joomla-cms-bot - change - 1 May 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - close - 2 May 2016
avatar rdeutz rdeutz - merge - 2 May 2016
avatar joomla-cms-bot joomla-cms-bot - close - 2 May 2016
avatar rdeutz rdeutz - reference | 8204775 - 2 May 16
avatar rdeutz rdeutz - merge - 2 May 2016
avatar rdeutz rdeutz - close - 2 May 2016
avatar rdeutz rdeutz - change - 2 May 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-05-02 06:38:42
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 2 May 2016
Labels Removed: ?
avatar JoomliC
JoomliC - comment - 2 May 2016

Just mentioned here PR #10199 concerning version adjusted to 3.6.0 for new attributes.

Now, will work on the documentation for JDocs ;-)

Add a Comment

Login with GitHub to post a comment