Ticket #560 (closed New Feature)

Opened 3 years ago

Last modified 3 years ago

Introduce an easy way to enable/disable dojo debug.

Reported by: bruno@… Owned by:
Priority: Minor Milestone:
Component: Version: 2.2
Keywords: Cc:

Description

[jira2trac import : issue created on October 3, 2007 3:12:21 PM CEST http://issues.cocoondev.org/browse/DSY-560 ]

To enable dojo debug mode, one needs to execute this before dojo is loaded:

var djConfig = {};
djConfig.isDebug = true;

Daisy's layout.xsl can insert this code, based on the value of the dojo-debug XSLT parameter (defined from the sitemap.xmap).

This is rather clumsy to work with, since:
 - it requires modifying the sitemap, and not forgetting to change it back afterwards
 - layout.xsl is used in multiple pipelines, hence needs this modification in multiple places
 - this enables dojo debug mode for all users, which is not good if it is not a local Daisy install.

As a solution, we could have the dojo-debug preference stored in the session, and have some URL to enable/disable the debugging. This allows to easily enable/disable dojo debug on any Daisy installation. A disadvantage is that the setting is lost once the session is lost. Another possibility would be to store this preference in a cookie (could be done without any server-side support, I think).

Change History

comment:1 Changed 3 years ago by paul

  • Status changed from new to closed

[jira2trac import : comment created by bruno on December 10, 2007 3:08:26 PM CET]

For Firefox, see this:

http://shaneosullivan.wordpress.com/2007/01/12/greasemonkey-script-to-turn-on-firebug-debugging-for-dojo/

though it's certainly interesting to have this functionality for IE too.

comment:2 Changed 3 years ago by paul

[jira2trac import : comment created by bruno on December 10, 2007 4:26:40 PM CET]

Implemented in SVN rev 4583.

To use it, browse to

/resources/dojo-debug.html

which shows a page with buttons to enable or disable dojo debugging. This sets cookie, which is checked by the initialization code of other pages which use Dojo.

Note: See TracTickets for help on using tickets.