Opened 15 years ago
Closed 10 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)
Change History (8)
Changed 15 years ago by
Attachment: | trac-5515-1.jpg added |
---|
comment:1 Changed 15 years ago by
Changed 15 years ago by
Attachment: | trac-5515-2.jpg added |
---|
Changed 15 years ago by
Attachment: | trac-5515-3.jpg added |
---|
comment:2 Changed 15 years ago by
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 14 years ago by
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 10 years ago by
Owner: | Noah Kantrowitz deleted |
---|
comment:5 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
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.