Closed afragen closed 11 years ago
That's perfect, far smoother than my previous attempt.
Did I implement the CSS from the separate file correctly? It ends up inserting in the middle of the page, while aesthetically unpleasant it works. Is there some better way to add that view
code to the header of that specific page or does it really matter?
Harder is trying to do a transition for 'Transparent' as the class would have to be category specific. Writing that to div is easy. Writing it to js harder, unless we can "write" some of the js programmatically. Something for another time.
I didn't actually notice that, but you're right, and I seem to remember there was a style element being inserted in amongst the form mark-up in the previous iteration, too. My understanding is that that is a no-no, style elements should only exist as children of the head element.
That said, it seems to work and I've seen code from Modern Tribe doing the same thing.
What we could do on a future iteration though is put it into the head. I can't remember the exact hook but it's along the lines of _admin_printstyles-{page-name} which is nice because it will only be applied on the TECCC options page and not throughout the admin/dashboard environment.
Harder is trying to do a transition for 'Transparent' as the class would have to be category specific.
Do you mean an opacity effect in addition to slideUp and slideDown?
Not sure if that's what you mean but I do quite like the current sliding effect you've put in place as is and I'm not sure if it needs much more embellishment.
I'll have to see about that hook. I'd like to be able to insert the style element into head.
Re:Transparent effect, I'm referring to a similar JS transition to show/hide color picker based upon transparent checked state.
http://codex.wordpress.org/Plugin_API/Action_Reference/admin_enqueue_scripts http://pippinsplugins.com/loading-scripts-correctly-in-the-wordpress-admin/
We might want to use this to load the teccc–admin.js also.
Is there something more specific for $hook than 'edit.php'? That will load on every admin setting page.
Is $hook = teccc_category_colors ?
@WebBaker I played around a bit with the optionsform.php and such to remove parts of the table, replace with divs, adjust the CSS and change the transition. It's running on http://drfragen.info
What do you think?