#12591 closed enhancement (fixed)
Implement IRequestFilter in BatchModifyModule for adding template data to query request
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.14 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | batch-modify |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description
Implementing IRequestFilter
in batch.py
would avoid the need to import BatchModifyModule
in query.py
and check if the component is enabled.
First discussed in comment:58:ticket:11901.
Attachments (0)
Change History (5)
comment:1 by , 8 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:2 by , 8 years ago
A related proposed change:
-
trac/ticket/templates/batch_modify.html
commit b80641289a98d1ab8e58e715cfc772119ebcf237 Author: Ryan J Ollos <ryan.j.ollos@gmail.com> Date: Sat Sep 17 18:36:59 2016 -0700 Move batch initialize diff --git a/trac/ticket/templates/batch_modify.html b/trac/ticket/templates/batch_modify.html index be5ada2..5819ccd 100644
a b 14 14 xmlns:xi="http://www.w3.org/2001/XInclude" 15 15 id="batchmod_form" method="post" action="${req.href + '/batchmodify'}"> 16 16 17 <script type="text/javascript"> 18 jQuery(document).ready(function($) { 19 initializeBatch(); 20 }); 21 </script> 22 17 23 <fieldset id="batchmod_fieldset"> 18 24 <legend class="foldable">Batch Modify</legend> 19 25 <table summary="Batch modification fields"> -
trac/ticket/templates/query.html
diff --git a/trac/ticket/templates/query.html b/trac/ticket/templates/query.html index b6e9830..cd33b44 100644
a b 22 22 <script type="text/javascript"> 23 23 jQuery(document).ready(function($) { 24 24 initializeFilters(); 25 <py:if test="batch_modify">26 initializeBatch();27 </py:if>28 25 $("#group").change(function() { 29 26 $("#groupdesc").enable(this.selectedIndex != 0) 30 27 }).change();
I was unsure if script
was allowed inside a form
tag, but w3 validator says it's valid HTML and tests pass.
follow-up: 4 comment:3 by , 8 years ago
Just for historical context it might be interesting that the batchmodifyplugin originally used ITemplateStreamFilter
and IRequestFilter
. The proposal to integrate the plugin in Trac brings up the idea that these will no longer be needed and that it could perhaps be integrated directly inside query.py. The import was then added here (Github).
Committed to 1.0-stable in r15154, merged to trunk in r15155, merged to trunk in r15156.