Modify ↓
Opened 16 years ago
Closed 15 years ago
#5280 closed enhancement (fixed)
Allow change of ticket template if no data has been entered
Reported by: | anonymous | Owned by: | Takanori Suzuki |
---|---|---|---|
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 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
(In [7738]) (refs #5280)内容を変更していない場合は、確認ダイアログは表示されないようにした。TracWysiwygPluginを利用している場合にも対応。