Version 9 (modified by 9 years ago) (diff) | ,
---|
Trac Tweak UI
Description
This plugin implements a Javascript deployment platform, which enables Trac administrators to easily tweak Trac pages by using Javascript.
Key features:
- Apply different javascripts to different pages by matching regular expression.
- Supports Trac web admin.
Alternative: AddStaticResourcesPlugin accomplishes many of the same goals. Very simple deployment and trac.ini configuration (no webadmin screens). Doesn't require an environment upgrade.
See: ZoomQuiet ~ Collection KSPEG Trac hacking
Bugs/Feature Requests
Existing bugs and feature requests for TracTweakUiPlugin are here.
If you have any issues, create a new ticket.
defect |
5 / 5 |
---|
Download
Download the zipped source from [download:tractweakuiplugin here].
Source
You can check out TracTweakUiPlugin from here using Subversion, or browse the source with Trac.
Configuration
- Uninstall Trac Tweak UI if you have installed before.
- Change to the directory containing setup.py.
- If you want to install this plugin globally, that will install this plugin to the Python path:
- python setup.py install
- If you want to install this plugin to Trac instance only:
- python setup.py bdist_egg
- copy the generated egg file to the Trac instance's plugin directory:
cp dist/*.egg /srv/trac/env/plugins
- Configure your
trac.ini
file:[components] tractweakui.* = enabled
- Add following directory structure to Trac environment's htdocs directory, using
editcc
as an example:htdocs/tractweakui/
Or you can simply copy the htdocs/tractweakui/ in source to Trac environment's htdocs directory.
Example
Admin Trac Tweak UI with addon javascript plugins
- Enter Trac's Web Admin, select TracTweakUI Admin
- Add url path(regular expression): /newticket
- Select /newticket, then select filter editcc
- Click Load Default, and edit filter javascript, then Save
- Now click New Ticket to test the editcc Javascript plugin.
Admin Trac Tweak UI with any other javascript plugins
- Take autocomplete for instance.
- Prepare autocomplete directory in the Trac environment:
mkdir /path/to/trac/environment/htdocs/tractweakui/autocomplete cp main.css /path/to/trac/environment/htdocs/tractweakui/autocomplete/ cp jquery.autocomplete.css /path/to/trac/environment/htdocs/tractweakui/autocomplete/ cp jquery.autocomplete.js /path/to/trac/environment/htdocs/tractweakui/autocomplete/ cp jquery.bgiframe.min.js /path/to/trac/environment/htdocs/tractweakui/autocomplete/ cp indicator.gif /path/to/trac/environment/htdocs/tractweakui/autocomplete/ touch /path/to/trac/environment/htdocs/tractweakui/autocomplete/__template__.js
- Edit template.js (optional):
$(function() { var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; $("#field-cc").autocomplete(months); });
- Now you can admin and test autocomplete Javascript plugins as described above.
Recent Changes
- 17171 by rjollos on 2018-05-09 20:43:38
-
TracTweakUI 1.2dev: Remove need to copy templates to env htdocs dir
Refs #13428.
- 17170 by rjollos on 2018-05-09 19:45:46
-
TracTweakUI 1.2dev: Make compatible with Trac 1.2
Refs #13428.
- 17169 by rjollos on 2018-05-09 19:04:17
-
TracTweakUI 1.2dev: Branch for Trac 1.2 support
(more)
Author/Contributors
Author: richard
Maintainer: Richard Liao
Contributors:
Attachments (2)
- trac_tweakui_demo_1.png (17.9 KB) - added by 16 years ago.
- trac_editcc.png (4.2 KB) - added by 16 years ago.
Download all attachments as: .zip