Skip to content

Commit

Permalink
issue: Remove template text in case of Subtask
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Aug 10, 2017
1 parent 5170f1c commit 9be4ad4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/views/issue/create.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@
<div class="span9 span-left-pane">
<dl>
<dd style="position: relative;">
@if(StringUtils.isNotBlank(parentIssueId)) {
@common.editor("body", "", "tabindex=2", "content-body")
} else {
@common.editor("body", issueTemplate, "tabindex=2", "content-body")
}
</dd>
</dl>

Expand Down
6 changes: 4 additions & 2 deletions public/javascripts/common/yona.Subtask.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ $(function () {

var initialProject = $("#targetProjectId");
var initialProjectId = initialProject.val();
initialProject.on("change", function(){
initialProject.on("change", function(selected){
var parentId = $("#parentId");
if($(this).val() === initialProjectId){
var targetProjectName = selected.target.selectedOptions[0].innerText;
if(selected.val === initialProjectId){
parentId.prop("disabled", false);
parentId.trigger('change.select2');
} else {
parentId.val(parentId.find("option:first").val());
parentId.prop("disabled", true);
parentId.trigger('change.select2');
$yobi.notify("Issue will be move/write to '" + targetProjectName + "'", 3000);
}
});
});

0 comments on commit 9be4ad4

Please sign in to comment.