Ticket #734 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

SiteJS module - global and local JavaScript

Reported by: clay@killersoft.com Assigned to: anybody
Priority: high Component: Request-a-Hack
Severity: blocker Keywords:
Cc: coderanger@yahoo.com Trac Release: 0.10

Description

I'd like something similar to the SysCssPlugin.

  • Allows a system-wide and/or project-only JavaScript? directory
  • Requires only the following config settings:
[components]
sysjs.* = enabled
#sysjs.global = enabled
#sysjs.local = enabled

[sysjs]
# files to load
global = prototype.js,scriptaculous.js,subdir/other.js
local = myproject.js,subdir/extra.js

If possible, I'd like to be able to avoid creating a .py file as the syscss plugin currently requires. It seems like this could be avoided by just establishing defaults.

For example, if [component] values of sysjs.* or sysjs.global are enabled, then the [sysjs] global file path will be /usr/share/trac/htdocs/js/sysjs. If [component] sysjs.global = disabled, the [sysjs] global setting will be ignored.

Similarly, if [component] sysjs.* = enabled or [component] sysjs.local = enabled, then files specified by [sysjs] local will be loaded from /path/to/trac/env/js.

Seems like a much simpler setup to me than what's done in SysCssPlugin. Love SysCssPlugin, but think it could possibly be easier to configure than it is currently. (Of course, I say this knowing damn little about Python.)

CC'ing coderanger, since I hope he'll be interested in this project.

Attachments

Change History

09/22/06 10:36:16 changed by clay@killersoft.com

  • priority changed from normal to high.

Oh yeah ... perhaps this goes without saying, but the <script src="..."></script> tags that this plugin generates should live in the document <head> block. :)

09/23/06 15:28:44 changed by clay

  • status changed from new to closed.
  • resolution set to fixed.

Closed in [1298]


Add/Change #734 (SiteJS module - global and local JavaScript)




Change Properties
Action