Created
October 10, 2013 19:46
-
-
Save tstachl/6924351 to your computer and use it in GitHub Desktop.
Very simple example of how you can use JavaScript within case themes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="save_{{case.id}}"> | |
<div class="agent_ticket_section"> | |
{{subject}} | |
</div> | |
<div class="agent_ticket_section"> | |
<div> | |
{{status}} | |
</div> | |
<div> | |
{{priority}} | |
</div> | |
</div> | |
<div class="agent_ticket_section"> | |
<div> | |
{{group}} | |
</div> | |
<div> | |
{{user}} | |
</div> | |
</div> | |
<div class="agent_ticket_section"> | |
{{description}} | |
</div> | |
<div class="agent_ticket_section"> | |
{{language}} | |
</div> | |
<div class="agent_ticket_section"> | |
{{tags}} | |
</div> | |
</div> | |
{{widget.jira.body}} | |
<button id="reset_{{case.id}}">Reset</button> | |
<script> | |
$(function() { | |
var temp = $('#save_{{case.id}}').html(), | |
group = $('#save_{{case.id}}').find('#ticket_group_id').val(), | |
user = $('#save_{{case.id}}').find('#ticket_user_id').val(); | |
$('#reset_{{case.id}}').click(function() { | |
$('#save_{{case.id}}').html(temp); | |
$('#save_{{case.id}}').find('#ticket_group_id').val(group); | |
$('#save_{{case.id}}').find('#ticket_user_id').val(user); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment