Opened 21 months ago

Closed 21 months ago

Last modified 21 months ago

#10995 closed enhancement (fixed)

[PATCH] Use add_script_data to pass data instead directly using TemplateLoader and render.

Reported by: jun66j5 Owned by: stoecker
Priority: normal Component: TracIniAdminPanelPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12


The plugin currently directly use genshi.template.TemplateLoader and the rendering to pass data. I think that code is complicated. It would be simple to use add_script_data.


Attachments (3)

Change History (12)

comment:1 Changed 21 months ago by stoecker

Sorry, that patch conflicts with the changes from #10994. Can you please recreate it?

comment:2 Changed 21 months ago by stoecker

P.S. Please use "trunk". While I probably will fix large bugs and security issues, I don't plan to update the 0.12 branch in any other way.

comment:3 Changed 21 months ago by jun66j5

Ok. Understand iniadminpanel branch policy.

I just created my patch, traciniadminpanel-use-add-script-data-r12853-trunk.diff for trunk.

comment:4 Changed 21 months ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

(In [12855]) fix #10995 - optimize handling of javascript data passing

comment:5 Changed 21 months ago by stoecker

Maybe you also know a solution for a small issue: The descriptions should get wiki formated properly, currently they are output as text.

comment:6 Changed 21 months ago by jun66j5

Use format_to_html instead of format_to_oneline or wiki_to_html on genshi template. New patch, traciniadminpanel-wiki-to-html-r12855-trunk.diff, it would use wiki_to_html on genshi template.

comment:7 Changed 21 months ago by stoecker

(In [12859]) see #10995: proper formating of doc texts

comment:8 Changed 21 months ago by stoecker

Applied with modifications for better style.

Only problem I see is that wiki_to_html is described as deprecated in trac code and will be removed. format_to_wiki should be used instead, but I failed to do so. I don't yet fully understand the template system, especially not which functions are available to templates and which not.

Thanks for the help. I would have stalled that issue until the far future :-)

comment:9 Changed 21 months ago by rjollos

wiki_to_html is deprecated, but the wiki_to_html function that is passed to the template is a partial function of format_to_html. See here.

It is extremely confusing that format_to_html is renamed to wiki_to_html when pased to the template!

Add Comment

Modify Ticket

as closed The owner will remain stoecker.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.