Ticket #5280 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Allow change of ticket template if no data has been entered

Reported by: anonymous Assigned to: 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

Change History

02/27/10 19:48:59 changed by takanorig

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

02/27/10 19:50:35 changed by takanorig

  • status changed from new to closed.
  • resolution set to fixed.

Add/Change #5280 (Allow change of ticket template if no data has been entered)




Change Properties
Action