#7024 closed defect (invalid)
No datepicker when create new tickets when GanttCalendarPlugin is installed
Reported by: | Owned by: | Robert Corsaro | |
---|---|---|---|
Priority: | highest | Component: | DateFieldPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
Hey Guys,
i have a problem with these plugin and the GanttCalendarPlugin. When I want to create a new ticket, I could not open the Datepicker. There is no choice to select the Date. I must enter the date manually.
But when I open a already created ticket, I see the option to the right of the testfield, where I can open the Datepicker. These work perfectly!
Can anybody tell me, how I become the datepicker option into the template of new tickets?
Thanks for help
Attachments (0)
Change History (12)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
I could not find a ticket template. My co-worker told me, that plugins could not change the origin templates. Where can I find the ticket template for DateFieldPlugin? In the egg? How I change the template? And where schould I add the class="datepick" object?
Thanks!
comment:3 Changed 15 years ago by
Your co-worker is wrong. The is a ITemplateStreamFilter interface that allows you to change the template on the fly, using genshi's api. Here is the code that does it:
def filter_stream(self, req, method, filename, stream, data): def attr_callback(name, event): attrs = event[1][1] return ' '.join(filter(None, (attrs.get('class'), 'datepick'))) if filename == 'ticket.html': for field in list(self._date_fields()): stream = stream | Transformer( '//input[@name="field_' + field + '"]' ).attr('class', attr_callback) elif self.use_milestone and filename in ('milestone_edit.html', 'admin_milestones.html'): for field in ('duedate', 'completeddate'): stream = stream | Transformer( '//input[@name="' + field + '"]' ).attr('class', attr_callback) return stream
What is happening here is that any input field in ticket.html with a name that matches the list returned by self._date_fields()
is getting the datepick class added to it. Also, any field in milestone_edit.html
or admin_milestones.html
with a name in the list ('duedate', 'completeddate') will also get the datepick class. Later, when the template is actually rendered, the javascript in the plugin will look for fields with the datepick
class and add the datepicker to them.
comment:4 Changed 15 years ago by
Keywords: | new ticket added |
---|
Hello
I confirm this report.
I have similar situation on trac 0.11.5 with ganttcalendar and datefield. When creating new ticket, I don't get datepicker, but it is available when I modify tickets.
comment:6 Changed 15 years ago by
Priority: | normal → highest |
---|
I just tried it today, and have exactly the same problem - no date picker on creating a new ticket
(it is available on modifying one)
comment:7 follow-up: 8 Changed 14 years ago by
Trac Release: | 0.11 → 0.12 |
---|
I tried to use DateFieldPlugin with trac 0.12. There is no date picker at all. Neither new ticket nor existing one.
comment:8 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Summary: | No datepicker when create new tickets → No datepicker when create new tickets when GanttCalendarPlugin is installed |
Replying to Maxim Polscha (maxp@sterch.net):
I tried to use DateFieldPlugin with trac 0.12. There is no date picker at all. Neither new ticket nor existing one.
That is most likely a different problem that what is discussed in this ticket: there is no DateFieldPlugin on new tickets for an installation with the GanttCalendarPlugin. I'd suggest opening a ticket and providing more information about your installation. It's always a good first step to disable all plugins and see if it resolves this issue. If so, start enabling them one by one until it breaks.
comment:9 follow-up: 10 Changed 14 years ago by
I have the same here.
Trac 0.12
TracDateField 1.0.1
- Another Plugins
TracGanttCalendarPlugin 0.1
TracSubTicketsPlugin 0.1.0
TracTicketDelete 2.0
Creating new ticket, the datepicker doesnt work (i cant see the button and the popup dont open).
When modifing to acept the ticket, it WORKS fine.
After that, the datepicker doenst work again.
Also, my gantt calendar dont work anymore. I just see the tickets created before install the datepicker.
Any sugestion?
tks.
comment:10 Changed 13 years ago by
Can someone open the Error Console (Firefox) for one of these installations and see if there is anything relevant there?
comment:11 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing this because there has been no follow-up for months, and the changes would likely need to be made to the GanttCalendarPlugin, not the DateFieldPlugin.
Feel free to reopen or add additional comments if you think there is another way to go here.
comment:12 Changed 9 years ago by
Keywords: | new ticket removed |
---|
Any field with class="datepick" will get the date picker. The plugin should add the class. What is the name of your new ticket template? Right now it's matching on ticket.html, but perhaps I can make it configurable.