-
Notifications
You must be signed in to change notification settings - Fork 139
Added color picker field #161
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
Conversation
inc/class-shortcode-ui.php
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only load these if a colorpicker field type has been used.
|
Revamped how the color field was included, now included the same way as #146 Much cleaner now |
js/field-color.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can just do this.$el.find() here
|
Looking great One small comment on the styling. This rule I think the only solution is to add a style to the shortcake CSS to fix this |
|
@mattheu all done :) Also added in the attribute checker. Might be beneficial if that function was ported over to the |
|
@mattheu Good catch on the bottom border, I must be going blind 👍 |
|
👍 Thanks for your work on this, @bfintal |
Added color picker field
+1 see #173 |
Added type
color, uses WordPress' native color picker and created a new template for the new field.I don't know where to put the initializing js though, so I added it to the template file. I also used
jQuery('[id="{{ data.attr }}"]')instead of just specifying the ID via#{{ data.attr }}since that did not work when the shortcode is edited multiple times since the first initialization no longer exists on the succeeding call.We need the color option for our: Page Builder Sandwich