Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jscolor to 1.4.5 #2976

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Conversation

justinbeaty
Copy link
Contributor

@justinbeaty justinbeaty commented Jan 19, 2023

Description (*)

Bump jscolor from 1.3.1 to 1.4.5. This is the last release in the 1.x.x branch. Releases in the 2.x.x branch are not backwards compatible (breaks modules that use jscolor) and is also under the GPLv3 instead of the LGPL license.

Related Pull Requests

#2937

Manual testing scenarios (copy pasted from #2937)

In any system.xml, add in config/sections/anywhere/groups/anywhere/fields:

<color1>
	<label>Color</label>
	<validate>color</validate>
	<sort_order>1</sort_order>
	<show_in_default>1</show_in_default>
	<show_in_website>1</show_in_website>
	<show_in_store>1</show_in_store>
</color1>
<color2>
	<label>Color with option</label>
	<validate>color {hash:true}</validate>
	<sort_order>2</sort_order>
	<show_in_default>1</show_in_default>
	<show_in_website>1</show_in_website>
	<show_in_store>1</show_in_store>
</color2>

Don't forget to load the JS for jscolor in adminhtml layout:

<adminhtml_system_config_edit>
	<reference name="head">
		<action method="addItem">
			<type>js</type>
			<name>jscolor/jscolor.js</name>
		</action>
	</reference>
</adminhtml_system_config_edit>

Questions or comments

To upgrade, I downloaded the 1.4.5 release zip, extracted on top of js/jscolor, deleted demo.html and ran dos2unix jscolor.js

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the JavaScript Relates to js/* label Jan 19, 2023
@justinbeaty
Copy link
Contributor Author

justinbeaty commented Jan 19, 2023

Some nice upgrades for the latest version:

  1. No more eval().
  2. Will not bind to an <input type="color"/> if browser supports html5 color picker.
  3. Looks like there's some more options and better browser compatibility.

@justinbeaty
Copy link
Contributor Author

@ADDISON74 - it seems you had already tested 1.4.5 with your paid extension, but worth a double check.

@ADDISON74
Copy link
Collaborator

@justinbeaty - I did this, it is already in production, but I will check it one more time.

@fballiano fballiano merged commit a9ff10b into OpenMage:1.9.4.x Jan 20, 2023
@fballiano
Copy link
Contributor

merged and v20ed

fballiano pushed a commit that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScript Relates to js/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants