Opened 16 years ago
Last modified 11 years ago
#4250 reopened enhancement
[PATCH] Annoying javascript confirm() and Load button.
Reported by: | Sébastien GISSINGER | Owned by: | Richard Liao |
---|---|---|---|
Priority: | normal | Component: | TracTicketTemplatePlugin |
Severity: | normal | Keywords: | confirmation dialog |
Cc: | alillards | Trac Release: | 0.11 |
Description
Could you remove OK/Cancel javascript on ticket type change (new/modify).
Filling automatically textareas with template must be a normal way of doing in your plugin, no need to confirm if i want or/not, i installed the plugin to do it.
In my mind, if people don't like the preformatted template they remove it by themselves but a template is made to be followed not Cancelled.
And could make the same in Admin by removing the Load button. Fill the textarea when changing ticket type automatically. Even if the page blink and you do not intend to do Ajax, i think this a much better way to do.
Mimimizing user interactions must be a standard in software developpement. Users mustn't need to search the information, the information must comme by itself to the user.
Cheers.
Attachments (0)
Change History (13)
comment:1 follow-up: 2 Changed 16 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Replying to sgissinger:
Some patch files to do what i explained.
There is still a little bad comportment when you first access to Admin > Ticket Template. If the first type selected in the ComboBox is empty (not even a space) it's loaded as is. Or it would load the default ticket template.To apply these patch files :
- Uninstall old TracTicketTemplatePlugin
- SVN co the sources
- replace old files with these ones
- do a standard TracPlugins installation
Could not attach files so external links
comment:3 Changed 16 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Re-open so you can follow it.
comment:4 follow-up: 9 Changed 16 years ago by
It's would be more annoying if user have input a lot of words and replaced by the preformatted template without any warning. The annoying confirm dialog give them a chance to keep their work :)
As for the Load button, your suggestion is a surely good to improve user experience. I will fix it soon.
comment:5 Changed 16 years ago by
Ok, I didn't notice the confirm being used for this purpose. Hehe in my case, if the user do one mistake he surely won't do a second one. A kind of learning lesson. :)
comment:6 Changed 15 years ago by
Summary: | Annoying javascript confirm() and Load button. → [PATCH] Annoying javascript confirm() and Load button. |
---|
comment:7 follow-up: 8 Changed 15 years ago by
Indicated links are broken. A search at such domain returns nothing. Maybe sgissinger can try reloading files again.
comment:8 Changed 14 years ago by
Keywords: | confirmation dialog added |
---|
Replying to AdrianFritz:
Indicated links are broken. A search at such domain returns nothing. Maybe sgissinger can try reloading files again.
Still true; sgissinger, please try again to provide the replacement files here, please.
comment:9 follow-up: 13 Changed 13 years ago by
Replying to richard:
It's would be more annoying if user have input a lot of words and replaced by the preformatted template without any warning. The annoying confirm dialog give them a chance to keep their work :)
I also think the confirmation dialog is annoying, so how about this alternative: If the user has input text in certain fields, ask for confirmation. Else, assume the ticket is empty and apply the template without asking.
comment:10 Changed 13 years ago by
Cc: | alillards added; anonymous removed |
---|
comment:11 Changed 11 years ago by
Perhaps something like this in templates/tt_newticket.js
would do it?
function onCustomChanged(evt) { var tt_name = $("#tt_custom_select").val(); if (! tt_name) { return; } var ticketType = queryResult.field_value_mapping_custom[tt_name]; if (typeof ticketType === "undefined") return; if (evt.type == "change") { var answer = confirm("${_('Replace ticket content with template?')}"); if (!answer) { return; } } // apply custom template _updateTargetElem(ticketType); }
comment:12 Changed 11 years ago by
Full patch:
-
0.11/tickettemplate/templates/tt_newticket.js
196 196 return; 197 197 } 198 198 199 var ticketType = queryResult.field_value_mapping_custom[tt_name]; 200 if (typeof ticketType === "undefined") return; 199 201 if (evt.type == "change") { 200 202 var answer = confirm("${_('Replace ticket content with template?')}"); 201 203 if (!answer) { … … 204 206 } 205 207 206 208 // apply custom template 207 var ticketType = queryResult.field_value_mapping_custom[tt_name];208 209 _updateTargetElem(ticketType); 209 210 } 210 211 … … 333 334 return; 334 335 } 335 336 337 var ticketType = queryResult.field_value_mapping_custom[tt_name]; 338 if (typeof ticketType === "undefined") return; 336 339 if (evt.type == "change" && isLoad == false) { 337 340 var answer = confirm("${_('Replace ticket content with template?')}"); 338 341 if (!answer) { … … 340 343 } 341 344 } 342 345 343 var ticketType = queryResult.field_value_mapping[tt_name];344 346 if (!ticketType) { 345 347 ticketType = queryResult.field_value_mapping['default']; 346 348 }
Appears to work on first sight.
comment:13 Changed 11 years ago by
Replying to chester_copperpot:
I also think the confirmation dialog is annoying, so how about this alternative: If the user has input text in certain fields, ask for confirmation. Else, assume the ticket is empty and apply the template without asking.
Agreed! The confirmation dialog is only annoying when it has no possibility of deleting user data. #11544 should be considered with any changes to the confirm behavior.
Some patch files to do what i explained.
There is still a little bad comportment when you first access to Admin > Ticket Template. If the first type selected in the ComboBox is empty (not even a space) it's loaded as is. Or it would load the default ticket template.
To apply these patch files :