
Issue: use labelStyles instead of Label.js for label color
@c1aa8ca80ac3133507efbdec310dfbe1ba7a1059
--- app/views/issue/view.scala.html
+++ app/views/issue/view.scala.html
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 |
|
64 | 64 |
@**<!-- author -->**@ |
65 | 65 |
<dl class="author"> |
66 |
- <dt>@Messages("issue.author")</dt> |
|
66 |
+ <dt>@Messages("igitssue.author")</dt> |
|
67 | 67 |
<dd style="padding:5px 10px;"> |
68 | 68 |
<a href="@routes.UserApp.userInfo(issue.authorLoginId)" class="usf-group"> |
69 | 69 |
<span class="avatar-wrap smaller"> |
... | ... | @@ -283,24 +283,18 @@ |
283 | 283 |
</div> |
284 | 284 |
</div> |
285 | 285 |
</div> |
286 |
+ |
|
286 | 287 |
@common.markdown(project) |
287 |
-@common.issueLabel() |
|
288 | 288 |
@common.commentDeleteModal() |
289 | 289 |
@common.select2() |
290 |
+ |
|
291 |
+<link rel="stylesheet" type="text/css" media="screen" href="@routes.IssueLabelApp.labelStyles(project.owner, project.name)"> |
|
290 | 292 |
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/mentionjs/mention.css")"> |
291 | 293 |
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/mentionjs/mention.js")"></script> |
292 | 294 |
<script type="text/javascript"> |
293 | 295 |
$(document).ready(function(){ |
294 |
- // yobi.Label |
|
295 |
- var htOptLabel = { |
|
296 |
- "bEditable" : false, |
|
297 |
- "sURLLabels" : "@routes.IssueLabelApp.labels(project.owner, project.name)", |
|
298 |
- "sURLPost" : "@routes.IssueLabelApp.newLabel(project.owner, project.name)" |
|
299 |
- }; |
|
300 |
- |
|
301 | 296 |
// yobi.issue.View |
302 | 297 |
$yobi.loadModule("issue.View", { |
303 |
- "htOptLabel" : htOptLabel, |
|
304 | 298 |
"sWatchUrl" : "@routes.WatchApp.watch(issue.asResource.asParameter)", |
305 | 299 |
"sUnwatchUrl" : "@routes.WatchApp.unwatch(issue.asResource.asParameter)", |
306 | 300 |
"sIssuesUrl" : "@routes.IssueApp.massUpdate(project.owner, project.name)", |
--- public/javascripts/service/yobi.issue.View.js
+++ public/javascripts/service/yobi.issue.View.js
... | ... | @@ -26,7 +26,6 @@ |
26 | 26 |
|
27 | 27 |
_initFileUploader(); |
28 | 28 |
_initFileDownloader(); |
29 |
- _setLabelTextColor(); |
|
30 | 29 |
|
31 | 30 |
_setTimelineUpdateTimer(); |
32 | 31 |
|
... | ... | @@ -40,13 +39,11 @@ |
40 | 39 |
htElement.welUploader = $("#upload"); |
41 | 40 |
htElement.welTextarea = $("#comment-editor"); |
42 | 41 |
|
43 |
- htElement.welLabels = $('.issue-label'); |
|
44 | 42 |
htElement.welBtnWatch = $('#watch-button'); |
45 | 43 |
|
46 | 44 |
htElement.welAssignee = htOptions.welAssignee || $("#assignee"); |
47 | 45 |
htElement.welMilestone = htOptions.welMilestone || $("#milestone"); |
48 | 46 |
htElement.welIssueUpdateForm = htOptions.welIssueUpdateForm; |
49 |
- htElement.sIssueCheckBoxesSelector = htOptions.sIssueCheckBoxesSelector; |
|
50 | 47 |
|
51 | 48 |
htElement.welChkIssueOpen = $("#issueOpen"); |
52 | 49 |
htElement.welTimelineWrap = $("#timeline"); |
... | ... | @@ -251,23 +248,6 @@ |
251 | 248 |
(new yobi.Attachments({"elContainer": elContainer})); |
252 | 249 |
} |
253 | 250 |
}); |
254 |
- } |
|
255 |
- |
|
256 |
- /** |
|
257 |
- * set Labels foreground color as contrast to background color |
|
258 |
- */ |
|
259 |
- function _setLabelTextColor(){ |
|
260 |
- var welLabel; |
|
261 |
- var sBgColor, sColor; |
|
262 |
- |
|
263 |
- htElement.welLabels.each(function(nIndex, elLabel){ |
|
264 |
- welLabel = $(elLabel); |
|
265 |
- sBgColor = welLabel.css("background-color"); |
|
266 |
- sColor = $yobi.getContrastColor(sBgColor); |
|
267 |
- welLabel.css("color", sColor); |
|
268 |
- }); |
|
269 |
- |
|
270 |
- welLabel = null; |
|
271 | 251 |
} |
272 | 252 |
|
273 | 253 |
/** |
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?