You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by rj...@apache.org on 2014/02/21 05:16:41 UTC
svn commit: r1570440 - in
/bloodhound/trunk/bloodhound_theme/bhtheme/templates: bh_ticket.html
bh_ticket_actions.html
Author: rjollos
Date: Fri Feb 21 04:16:40 2014
New Revision: 1570440
URL: http://svn.apache.org/r1570440
Log:
0.8dev: Moved !JavaScript code that adds the duplicate ticket ID from `bh_ticket.html` to `bh_ticket_actions.html`.
This will allow the functionality to be reused in the batch modification form.
Modified:
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_actions.html
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html?rev=1570440&r1=1570439&r2=1570440&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket.html Fri Feb 21 04:16:40 2014
@@ -161,14 +161,7 @@
e.preventDefault();
}
- function install_workflow(){
- <py:if test="bhrelations">/*<![CDATA[*/
- $('select[id$=_resolve_resolution]').each(function () {
- var prefix = $(this).attr('id').split('_').slice(0, 2).join('_');
- $(this).parent().append('<span class="duplicate_id hide">Duplicate ID: ' +
- '<input id="' + prefix + '_duplicate_id" name="duplicate_id" type="text" class="input-mini" value="${ticket_duplicate_of}" /></span>');
- });
- /*]]>*/</py:if>
+ function install_workflow() {
var actions_box = $('#workflow-actions')
.click(function(e) { e.stopPropagation(); });
$('#action').children('div').each(function() {
@@ -187,14 +180,8 @@
newlabel = newlabel + ' as ' + $('#vc-status a').text();
else if (newowner)
newlabel = newlabel + ' to ' + newowner;
- else if (newresolution) {
+ else if (newresolution)
newlabel = newlabel + ' as ' + newresolution;
- if (newresolution === 'duplicate') {
- $('.duplicate_id', $(this).parent()).show();
- } else {
- $('.duplicate_id', $(this).parent()).hide();
- }
- }
$('#submit-action-label').text(newlabel);
// Enable | disable action controls
@@ -203,7 +190,7 @@
.enable($(this).checked());
$(this).siblings().filter("*[id]")
.enable($(this).checked());
- });
+ });
}
action_trigger.click(action_click);
action_select_trigger.change(action_click);
Modified: bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_actions.html
URL: http://svn.apache.org/viewvc/bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_actions.html?rev=1570440&r1=1570439&r2=1570440&view=diff
==============================================================================
--- bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_actions.html (original)
+++ bloodhound/trunk/bloodhound_theme/bhtheme/templates/bh_ticket_actions.html Fri Feb 21 04:16:40 2014
@@ -23,6 +23,20 @@
i18n:domain="bhtheme"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
+ <script py:if="bhrelations" type="text/javascript">
+ jQuery(document).ready(function($) {
+ $('select[id$=_resolve_resolution]').each(function () {
+ var prefix = $(this).attr('id').split('_').slice(0, 2).join('_');
+ $(this).parent().append('<span class="duplicate_id hide">Duplicate ID: ' +
+ '<input id="' + prefix + '_duplicate_id" name="duplicate_id" type="text" class="input-mini" value="${ticket_duplicate_of}" /></span>');
+ }).change(function() {
+ if ($(this).val() === 'duplicate')
+ $('.duplicate_id', $(this).parent()).show();
+ else
+ $('.duplicate_id', $(this).parent()).hide();
+ });
+ });
+ </script>
<div py:for="key, label, controls, hints in action_controls">
<input type="radio" id="action_$key" name="action" value="$key"
checked="${key == action or None}" />