Modify

Opened 5 years ago

Closed 5 years ago

#5280 closed enhancement (fixed)

Allow change of ticket template if no data has been entered

Reported by: anonymous Owned by: takanorig
Priority: normal Component: TicketExtPlugin
Severity: normal Keywords: confirmation dialog
Cc: Trac Release: 0.11

Description

When changing templates for TicketExtPlugin, a confirmation dialog pops up whenever the ticket type is changed. This is always done prior to warn the user of an impending update to the textarea template itself.

It is useful for the user to skip this dialog if nothing in the textarea has changed itself. This enhancement is only for immediate changes to the textarea, not to the restriction of fields, or modification of other changes made to the new ticket.

Details:

  • By using an arbitrary CSS class name (in this case, changed), we can identify when the ticket has changed from the template.
  • As noted, future enhancements can include checking ALL available fields in Javascript, but for now, this should be an acceptable enhancement

The following diff on file ticketext/htdocs/ticketext.js details the changes as of revision 5855:

103,104d102
<     var descElem = document.getElementById(this.descId);
<     $(descElem).change(function() { $(descElem).addClass("changed"); });
117d114
<         if ($("textarea.changed").length > 0) {
122d118
<         }
240d235
<     $(descElem).removeClass("changed");
248c243
< //                    txtareaModeElem.click();
---
>                     txtareaModeElem.click();

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by takanorig

(In [7738]) (refs #5280)内容を変更していない場合は、確認ダイアログは表示されないようにした。TracWysiwygPluginを利用している場合にも対応。

comment:2 Changed 5 years ago by takanorig

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

Add Comment

Modify Ticket

Action
as closed .
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.