Modify

Opened 15 years ago

Closed 9 years ago

#5515 closed defect (wontfix)

Force Trac to use Genshi TextTemplate instead of MarkupTemplate

Reported by: anonymous Owned by:
Priority: normal Component: CondFieldsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I tried to install CondFieldsPlugin for 0.11 but it did not work until I changed the content-type returned from process_request(self, req) to 'text/plain'.

I modified this line in web_ui.js:

return 'condfields.js', {'condfields': data}, 'text/javascript'

to:

return 'condfields.js', {'condfields': data}, 'text/plain'

The reason is that it forces the Trac to use the Genshi TextTemplate instead of the Genshi MarkupTemplate for the javascript file.

Attachments (3)

trac-5515-1.jpg (61.8 KB) - added by anonymous 14 years ago.
trac-5515-2.jpg (55.6 KB) - added by anonymous 14 years ago.
trac-5515-3.jpg (46.8 KB) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (8)

Changed 14 years ago by anonymous

Attachment: trac-5515-1.jpg added

comment:1 Changed 14 years ago by anonymous

I have modified the proposed solution in:

\...\Python\condfieldsplugin\0.11\condfields\web_ui.py (copied to the build dir too) build and installed it again and the good part it that now conditional fields are gone ... default fields are gone and one field is displayed twice!

Type is displayed, Priority is displayed twice and then the other default fields are gone as they are supposed to (Milestone, Component, Version, Keywords, CC and last being printed after optional fields: Assign to) these can be set again in the ini.

Priority displaying twice is the new problem here, why is it -not- displayed but instead displayed twice? Looks like #2042 on v0.10.

Enclosed screenshots are without condfields, settings, with condfields. De ticket_custom fields are marked red.

Changed 14 years ago by anonymous

Attachment: trac-5515-2.jpg added

Changed 14 years ago by anonymous

Attachment: trac-5515-3.jpg added

comment:2 Changed 14 years ago by anonymous

temporary solution ... while Priority always seems to be displayed I haven't got a clue yet why I modified templates\condfields.js to be able to submit.

Find de line (row 47?):

if(mode == 'view' && field == 'owner') continue

Add following exception:

if(mode == 'view' && field == 'owner') continue
if(mode == 'new' && field == 'priority') continue

comment:3 Changed 13 years ago by anonymous

Yo he conseguido solucionarlo copiando el fichero condfieldsplugin/0.11/condfields/templates/condfields.js dentro del patch /usr/lib/python2.4/site-packages/Trac-0.11.2.1-py2.4.egg/trac/htdocs/js

saludos

comment:4 Changed 9 years ago by Ryan J Ollos

Owner: Noah Kantrowitz deleted

comment:5 Changed 9 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

CondFieldsPlugin is deprecated. Please see notice on CondFieldsPlugin and use DynamicFieldsPlugin instead. If you have any issues creating an equivalent configuration with DynamicFieldsPlugin, please ask for help on the trac:MailingList.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.