Author: gjm
Date: Wed Jan 9 23:19:06 2013
New Revision: 1431144
URL: http://svn.apache.org/viewvc?rev=1431144&view=rev
Log:
reinstating comment submit changes button such that it triggers the in-place
edit submit instead if it is available - for #347
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
Modified:
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1431144&r1=1431143&r2=1431144&view=diff
==============================================================================
---
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
(original)
+++
incubator/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
Wed Jan 9 23:19:06 2013
@@ -57,7 +57,18 @@
var modify_elem = $('#modify');
<py:if test="ticket.exists">
modify_elem.parent().hide();
- $('#propertyform .buttons').hide();
+ $('#propertyform .buttons [name="preview"]').hide();
+ $('#comment').change(function (e) {
+ $('#hidden-comment').val($('#comment').val());
+ });
+ $('#propertyform .buttons [name="submit"]').click(function (e) {
+ if ($('button#edit-submit').length) {
+ // if available trigger the edit state's update button
+ $('button#edit-submit').click();
+ e.preventDefault();
+ }
+ // otherwise the default submit comment only happens
+ });
</py:if>
function modify_ticket() {