
Merge branch 'next-issue-1313' of dlab/hive
from pull request 1174
@1c9db5ea7cb0bbda731f2c03a545ce099beaf643
--- app/views/issue/partial_assignee.scala.html
+++ app/views/issue/partial_assignee.scala.html
... | ... | @@ -26,13 +26,13 @@ |
26 | 26 |
data-toggle="select2" data-format="user"> |
27 | 27 |
<option value="@User.anonymous.id" @if(issue == null || issue.assignee == null){selected}>@Messages("issue.noAssignee")</option> |
28 | 28 |
@if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.ASSIGN_ISSUE)) { |
29 |
- <option value="@UserApp.currentUser().id">@Messages("issue.assignToMe")</option> |
|
29 |
+ <option value="@UserApp.currentUser().id" data-force-change="true">@Messages("issue.assignToMe")</option> |
|
30 | 30 |
} |
31 | 31 |
@if(issue != null){ |
32 | 32 |
@defining(issue.getAuthor) { issueAuthor => |
33 | 33 |
@if(!UserApp.currentUser.equals(issueAuthor) && |
34 | 34 |
isAllowed(issueAuthor, project.asResource(), Operation.ASSIGN_ISSUE)) { |
35 |
- <option value="@issueAuthor.id">@Messages("issue.assignToAuthor")</option> |
|
35 |
+ <option value="@issueAuthor.id" data-force-change="true">@Messages("issue.assignToAuthor")</option> |
|
36 | 36 |
} |
37 | 37 |
} |
38 | 38 |
} |
--- public/javascripts/service/yobi.issue.View.js
+++ public/javascripts/service/yobi.issue.View.js
... | ... | @@ -101,6 +101,11 @@ |
101 | 101 |
|
102 | 102 |
// 이슈 정보 업데이트 |
103 | 103 |
htElement.welAssignee.on("change", _onChangeAssignee); |
104 |
+ htElement.welAssignee.on("select2-selecting", function(weEvt){ |
|
105 |
+ if($(weEvt.object.element).data("forceChange")){ |
|
106 |
+ htElement.welAssignee.trigger("change"); |
|
107 |
+ } |
|
108 |
+ }); |
|
104 | 109 |
htElement.welMilestone.on("change", _onChangeMilestone); |
105 | 110 |
htElement.welIssueLabels.on("change", _onChangeIssueLabels); |
106 | 111 |
htElement.welDueDate.on("change", _onChangeDueDate); |
... | ... | @@ -247,11 +252,12 @@ |
247 | 252 |
* @param {Wrapped Event} weEvt |
248 | 253 |
*/ |
249 | 254 |
function _onChangeAssignee(weEvt){ |
255 |
+ var value = weEvt.val || weEvt.currentTarget.value; |
|
250 | 256 |
_requestUpdateIssue({ |
251 |
- "htData" : {"assignee.id": weEvt.val}, |
|
257 |
+ "htData" : {"assignee.id": value}, |
|
252 | 258 |
"fOnLoad" : function(){ |
253 | 259 |
$yobi.notify(Messages("issue.update.assignee"), 3000); |
254 |
- htElement.welAssignee.select2("val", weEvt.val); |
|
260 |
+ htElement.welAssignee.select2("val", value); |
|
255 | 261 |
_updateTimeline(); |
256 | 262 |
}, |
257 | 263 |
"fOnError": function(oRes){ |
--- public/javascripts/service/yobi.issue.Write.js
+++ public/javascripts/service/yobi.issue.Write.js
... | ... | @@ -83,6 +83,12 @@ |
83 | 83 |
htElement.welAssignee.on("change", function(weEvt){ |
84 | 84 |
htElement.welAssignee.select2("val", weEvt.val); |
85 | 85 |
}); |
86 |
+ |
|
87 |
+ htElement.welAssignee.on("select2-selecting", function(weEvt){ |
|
88 |
+ if($(weEvt.object.element).data("forceChange")){ |
|
89 |
+ htElement.welAssignee.trigger("change"); |
|
90 |
+ } |
|
91 |
+ }); |
|
86 | 92 |
} |
87 | 93 |
|
88 | 94 |
function _onBeforeUnload(){ |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?