Modify

Opened 7 years ago

Closed 5 years ago

#2175 closed defect (fixed)

No date picker with SimpleTicketPlugin

Reported by: Matthew.Carlson@… Owned by: coderanger
Priority: normal Component: DateFieldPlugin
Severity: trivial Keywords:
Cc: Trac Release: 0.10

Description

Very, very minor issue. Simple Ticket page does not display the calendar date picker when DateFieldPlugin is used in conjunction with the SimpleTicketPlugin.

Thanks for the plugin, our Help Desk will find it very useful for setting deadlines on tickets.

Attachments (0)

Change History (5)

comment:1 in reply to: ↑ description Changed 7 years ago by anonymous

When will a fix for this problem be available? In 0.11?

Replying to Matthew.Carlson@cbfgroup.net:

Very, very minor issue. Simple Ticket page does not display the calendar date picker when DateFieldPlugin is used in conjunction with the SimpleTicketPlugin.

Thanks for the plugin, our Help Desk will find it very useful for setting deadlines on tickets.

comment:2 in reply to: ↑ description ; follow-up: Changed 7 years ago by didoux

I didn't try, but I think that modifying the filter.py can do the trick:

Instead of

[...]            
    def post_process_request(self, req, template, content_type):
        if req.path_info.startswith('/newticket') or req.path_info.startswith('/ticket'):
            add_script(req, 'datefield/jquery.pack.js')
            add_script(req, 'datefield/jquery.datePicker.js')
            add_stylesheet(req, 'datefield/datePicker.css')

Just add:

[...]            
    def post_process_request(self, req, template, content_type):
        if req.path_info.startswith('/newticket') or req.path_info.startswith('/ticket') or req.path_info.startswith('/simpleticket'):
[...]

comment:3 in reply to: ↑ 2 Changed 7 years ago by anonymous

Replying to didoux:

I didn't try, but I think that modifying the filter.py can do the trick:

...

Thank you for your help! That worked great. Of course, it was a bit more complicated because our /simpleticket page is also the default page for that environment. I ended up changing that line to:

[...]            
    def post_process_request(self, req, template, content_type):
         if req.path_info.startswith('/newticket') or req.path_info.startswith('/ticket') or req.path_info.startswith('/simpleticket') or req.path_info == "/" or req.path_info == "":
[...]

I'm not sure how much of that should make it into the plugin, but it would probably make sense to add req.path_info.startswith('/simpleticket') because a page with that name would almost always be created by SimpleTicketPlugin.

comment:4 Changed 7 years ago by anonymous

I think there is the same problem with the HideValsPlugin and I am not sure how to fix exactly.

comment:5 Changed 5 years ago by doki_pen

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

Add Comment

Modify Ticket

Action
as closed The owner will remain coderanger.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.