Needs work
Project:
Button style
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2009 at 07:01 UTC
Updated:
11 Jan 2011 at 22:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
Jackinloadup commentedIt would be really nice if there was a way to turn off the module for particular themes. This also conflicts with the slate theme in the admin module.
Comment #2
robloachRan into the RootCandy problem so this patch makes it so that you can enable/disable the button style on a per-theme basis. You change the setting in the theme settings pages.
Comment #3
ghazlewoodRob thanks for the patch, much appreciated. Was exactly what I was thinking as soon as I saw the problem with this module and RootCandy. Hope the patch is committed soon :)
Comment #4
Roulion commentedThe patch is OK.. thanks a lot
Comment #5
sunWe want to use hook_form_FORM_alter() here, no?
Can we negate the condition and thereby reduce the size of this patch?
I'm on crack. Are you, too?
Comment #6
tancThanks Rob, just wanted to confirm the patch in #2 seems to work well for me.
Comment #7
detot commentedWorks for me too!
Comment #8
robloachSun's suggestions are good suggestions!
Comment #9
sunI've reverted my opinion on the default status. Let's enable it by default, so users actually see something after installing ;)
- Fixed variable name mismatches.
- Added hook_form_FORMID_alter() implementation.
- Changed hook_form_alter() to early-return to decrease code changes and make the flow more obvious.
- Fixed docs.
- Removed cache_clear_all() from hook_uninstall(), should be invoked anyway, and even if it's not, the cache doesn't matter as it'll be rebuilt at some point anyway.
However, untested.
Q: Do we really need our own submit handler to store the variable? I thought there was some kind of theme settings API or whatever? :( Does core suck again? ;)
Comment #10
sunerr, bug report? :P
Comment #11
itangalo commentedWhen testing this patch (#9) on the Seven admin theme, it just didn't seem to kick in. Broken buttons with no text, button.css loaded and everything. Sorry for the bad news. :-/
Seven 6.x-1.0-beta6
Pressflow 6.16
Comment #12
itangalo commentedComment #13
dixon_The 'var' key will contain something like 'theme_THEME_KEY_settings'. So this variable is named incorrectly.
The same goes for this.
Here we must suffix with '_settings' to look for the right variable.
Attached is a patch that fixes all this. It applies to DRUPAL-6--1.
Powered by Dreditor.
Comment #14
dixon_Comment #15
itangalo commentedImplemented and seems to work fine on Pressflow 6.16 (plus Seven 6.x-1.0-beta6)!
Comment #16
nod_works fine for me too.
Comment #17
boobaa(At least a part of) the cache should be invalidated after a
DELETE FROM {variables}inhook_uninstall():cache_clear_all('variables', 'cache');should be run, @seevariable_del().Comment #18
skilip commentedFor Drupal 7 there's a patch over here: #1023564: Button Style on a per-theme basis D7