Closed (duplicate)
Project:
Switchtheme
Version:
6.x-1.0
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
1 Jun 2008 at 05:46 UTC
Updated:
23 Feb 2012 at 15:41 UTC
Jump to comment: Most recent file
Is it possible to auto-switch when a theme is selected and not have the "switch" button?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | switchtheme_autosubmit.patch | 1.08 KB | mrtoner |
Comments
Comment #1
KahneFan commentedAny thoughts?
Comment #2
sunIf you thought of a onChange-JavaScript-handler for the form select widget, then yes, that would be possible.
However, I don't have time to implement this right now, but would be available for reviewing (and committing) a patch.
Comment #3
mrtoner commentedHere it is. I added some <br> tags to keep the <select> from overrunning following blocks; there's probably a better way to do that.
Comment #4
sunThis needs to degrade if JavaScript is not available. Which means that a patch for this issue most likely does not touch the .module file at all. It just adds a new JavaScript file containing a Drupal.behavior that removes the submit button and attaches the event handler.
On a second thought, I'm not sure whether this will break the layout/functionality of existing sites that use SwitchTheme. Maybe it has to be configurable setting then. Or maybe a notice in the release notes is sufficient... Not sure about that yet.
Comment #5
devin carlson commentedMarking this as a duplicate of #1406116: Switch form auto-submit because it has a more up-to-date patch.