Changes between Version 8 and Version 9 of TracTweakUiPlugin
- Timestamp:
- Jul 27, 2015, 12:37:26 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracTweakUiPlugin
v8 v9 1 = Trac Tweak UI = 2 [[TOC]] 3 SEE:'''ZoomQuiet''' ~ Collection KSPEG Trac hacking 1 = Trac Tweak UI 4 2 5 == Description ==3 == Description 6 4 7 * Its purpose is to implement a javascript deployment platform, which enable trac administrators to easy tweak trac pages by simply using javascript. 8 * It can apply different javascripts to different pages by matching regular expression. 9 * Support trac web admin 5 This plugin implements a Javascript deployment platform, which enables Trac administrators to easily tweak Trac pages by using Javascript. 10 6 11 == Bugs/Feature Requests == 7 Key features: 8 * Apply different javascripts to different pages by matching regular expression. 9 * Supports Trac web admin. 10 11 Alternative: AddStaticResourcesPlugin accomplishes many of the same goals. Very simple deployment and trac.ini configuration (no webadmin screens). Doesn't require an environment upgrade. 12 13 See: '''ZoomQuiet''' ~ Collection KSPEG Trac hacking 14 15 == Bugs/Feature Requests 12 16 13 17 Existing bugs and feature requests for TracTweakUiPlugin are … … 15 19 16 20 If you have any issues, create a 17 [ http://trac-hacks.org/newticket?component=TracTweakUiPlugin&owner=richardnew ticket].21 [/newticket?component=TracTweakUiPlugin new ticket]. 18 22 19 == Download == 23 [[TicketQuery(component=TracTweakUiPlugin&group=type,format=progress)]] 24 25 == Download 20 26 21 27 Download the zipped source from [download:tractweakuiplugin here]. 22 28 23 == Source ==29 == Source 24 30 25 31 You can check out TracTweakUiPlugin from [http://trac-hacks.org/svn/tractweakuiplugin here] using Subversion, or [source:tractweakuiplugin browse the source] with Trac. 26 32 27 == Configuration == 33 == Configuration 34 28 35 1. Uninstall Trac Tweak UI if you have installed before. 29 30 2. Change to the directory containning setup.py. 31 32 3. If you want to install this plugin globally, that will install this plugin to the python path: 36 1. Change to the directory containing setup.py. 37 1. If you want to install this plugin globally, that will install this plugin to the Python path: 33 38 * python setup.py install 34 35 4. If you want to install this plugin to trac instance only: 39 1. If you want to install this plugin to Trac instance only: 36 40 * python setup.py bdist_egg 37 * copy the generated egg file to the trac instance's plugin directory41 * copy the generated egg file to the Trac instance's plugin directory: 38 42 {{{ 39 43 cp dist/*.egg /srv/trac/env/plugins 40 44 }}} 41 42 5. Config trac.ini: 43 {{{ 45 1. Configure your `trac.ini` file: 46 {{{#!ini 44 47 [components] 45 48 tractweakui.* = enabled 46 49 }}} 47 48 6. Add following directory structure to trac environment's htdocs directory(using editcc as example): 50 1. Add following directory structure to Trac environment's htdocs directory, using `editcc` as an example: 49 51 {{{ 50 52 htdocs/tractweakui/ 51 53 }}} 52 54 53 Or you can simply copy the htdocs/tractweakui/ in source to trac environment's htdocs directory.55 Or you can simply copy the htdocs/tractweakui/ in source to Trac environment's htdocs directory. 54 56 55 == Example == 56 === Admin Trac Tweak UI with addon javascript plugins === 57 1. Enter trac's '''Web Admin''', select '''TracTweakUI Admin''' 57 == Example 58 59 === Admin Trac Tweak UI with addon javascript plugins 60 61 1. Enter Trac's '''Web Admin''', select '''TracTweakUI Admin''' 58 62 1. Add url path(regular expression): '''/newticket''' 59 63 1. Select '''/newticket''', then select filter '''editcc''' 60 64 1. Click '''Load Default''', and edit filter javascript, then '''Save''' 61 1. Now click '''New Ticket''' to test the '''editcc''' javascript plugin.62 * Screenshot of Admin65 1. Now click '''New Ticket''' to test the '''editcc''' Javascript plugin. 66 * '''Screenshot of Admin''' 63 67 * [[Image(trac_tweakui_demo_1.png)]] 64 * Screenshot of editcc68 * '''Screenshot of editcc''' 65 69 * [[Image(trac_editcc.png)]] 66 70 67 === Admin Trac Tweak UI with any other javascript plugins === 68 1. take [http://plugins.jquery.com/project/ac autocomplete] for instance 71 === Admin Trac Tweak UI with any other javascript plugins 69 72 70 1. Prepare autocomplete directory in trac environment 73 1. Take [http://plugins.jquery.com/project/ac autocomplete] for instance. 74 1. Prepare autocomplete directory in the Trac environment: 71 75 {{{ 72 76 mkdir /path/to/trac/environment/htdocs/tractweakui/autocomplete … … 78 82 touch /path/to/trac/environment/htdocs/tractweakui/autocomplete/__template__.js 79 83 }}} 80 81 1. Edit __template__.js (optional) 84 1. Edit __template__.js (optional): 82 85 {{{ 83 86 $(function() { … … 86 89 }); 87 90 }}} 91 1. Now you can admin and test autocomplete Javascript plugins as described above. 88 92 89 1. Now, you can admin and test autocomplete javascript plugins as described above. 90 91 == Related Plugins == 92 * AddStaticResourcesPlugin - Attempting to accomplish many of the same goals in a different way. Very simple deployment and .ini configuration (no webadmin screens). Doesn't require and upgrade. 93 == Recent Changes == 93 == Recent Changes 94 94 95 95 [[ChangeLog(tractweakuiplugin, 3)]] 96 96 97 == Author/Contributors ==97 == Author/Contributors 98 98 99 99 '''Author:''' [wiki:richard] [[BR]] 100 '''Maintainer:''' [[Maintainer]] [[BR]] 100 101 '''Contributors:'''