Modify ↓
#13621 closed defect (fixed)
"TypeError: $(...).autoSubmit is not a function" is raised when no workflow actions defined
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 1.6.1 |
Component: | ticket system | Version: | 1.6 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: |
Fixed JavaScript error raised from ticket view when no workflow actions defined. |
||
API Changes: | |||
Internal Changes: |
Description
This JavaScript error is caused by auto_preview.js
not added when no workflow actions defined. The behavior is introduced in [16243] (#12642 1.3.3dev).
12:12:02.242 Uncaught TypeError: $(...).autoSubmit is not a function <anonymous> http://localhost/tracenv/newticket:84 jQuery 13
Patch:
-
trac/ticket/templates/ticket.html
diff --git a/trac/ticket/templates/ticket.html b/trac/ticket/templates/ticket.html index 064e5fc2b..f5fbeaf02 100644
a b 79 79 var comment_focused = false; 80 80 $("#comment").focus(function() { comment_focused = true; }) 81 81 .blur(function() { comment_focused = false; }); 82 # if not disable_submit: 82 83 $("#propertyform").autoSubmit({preview: '1'}, function(data, reply) { 83 84 var items = $(reply); 84 85 // Update ticket box … … 113 114 .next("div.comment").html(reply); 114 115 comment.toggle(comment.children().length != 0); 115 116 }, "#changelog .trac-loading"); 117 # endif 116 118 117 119 # else: 120 # if not disable_submit: 118 121 $("#propertyform").autoSubmit({preview: '1'}, function(data, reply) { 119 122 $('#ticket').replaceWith(reply); 120 123 }, "#ticket .trac-loading"); 124 # endif 121 125 # endif 122 126 }); 123 127 </script>
Attachments (0)
Change History (4)
comment:2 by , 12 months ago
Replying to Dirk Stöcker:
The second part should be "# elif not disable_submit" instead of
Thanks. That makes sense.
comment:3 by , 12 months ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 by , 12 months ago
Owner: | set to |
---|
Note:
See TracTickets
for help on using tickets.
The second part should be "# elif not disable_submit" instead of