Discussion:
[Koha-devel] Cookie controlled CSS for J-OPAC
Darrell Ulm
2010-02-03 18:52:53 UTC
Permalink
Hello,

Quick question.

If a button were made to set a cookie on the Opac labeled "Kid's OPAC" then
feasibly the CSS included could be switched on the fly with the user controlled
switch.

This would allow all the existing code for the OPAC to work by just setting up a
new CSS (for Kid's for example) and then using javascript check the cookie to
determine if an alternate CSS is being used.

This could save quite a bit of time getting a Kid's OPAC running, and the same
cookie could be passed into all search functions to limit the search on some
criteria (for example select only Kid's materials).

Questions, Comments. Just an idea.

-Darrell Ulm
MJ Ray
2010-02-09 13:55:45 UTC
Permalink
Post by Darrell Ulm
If a button were made to set a cookie on the Opac labeled "Kid's OPAC" then
feasibly the CSS included could be switched on the fly with the user controlled
switch.
This would allow all the existing code for the OPAC to work by just setting up a
new CSS (for Kid's for example) and then using javascript check the cookie to
determine if an alternate CSS is being used.
[...]
Post by Darrell Ulm
Questions, Comments. Just an idea.
Can't it be done by changing the View: Page Style menu item selection,
rather than using yet more javascript (which will break on any
half-secured browser)?

Hope that helps,
--
MJ Ray (slef) Webmaster and LMS developer at | software
www.software.coop http://mjr.towers.org.uk | .... co
IMO only: see http://mjr.towers.org.uk/email.html | .... op
Jesse
2010-02-09 20:59:22 UTC
Permalink
Post by Darrell Ulm
Post by Darrell Ulm
If a button were made to set a cookie on the Opac labeled "Kid's OPAC"
then
Post by Darrell Ulm
feasibly the CSS included could be switched on the fly with the user
controlled
Post by Darrell Ulm
switch.
This would allow all the existing code for the OPAC to work by just
setting up a
Post by Darrell Ulm
new CSS (for Kid's for example) and then using javascript check the
cookie to
Post by Darrell Ulm
determine if an alternate CSS is being used.
[...]
Post by Darrell Ulm
Questions, Comments. Just an idea.
Can't it be done by changing the View: Page Style menu item selection,
rather than using yet more javascript (which will break on any
half-secured browser)?
Hope that helps,
--
MJ Ray (slef) Webmaster and LMS developer at | software
www.software.coop http://mjr.towers.org.uk | .... co
IMO only: see http://mjr.towers.org.uk/email.html | .... op
_______________________________________________
Koha-devel mailing list
http://lists.nongnu.org/mailman/listinfo/koha-devel
I think that the alternate stylesheets used by view->page style can also be
activated by JavaScript. We could have a nice, more user-friendly button
that does this with fallback to the browser mechanism.
--
Jesse Weaver
MJ Ray
2010-02-10 13:01:42 UTC
Permalink
Post by Jesse
I think that the alternate stylesheets used by view->page style can also be
activated by JavaScript. We could have a nice, more user-friendly button
that does this with fallback to the browser mechanism.
That would be the ideal, yes. Maybe onload javascript could replace a
short small hint about the menu option with the button?

Hope that helps,
--
MJ Ray (slef) Webmaster and LMS developer at | software
www.software.coop http://mjr.towers.org.uk | .... co
IMO only: see http://mjr.towers.org.uk/email.html | .... op
Loading...