File tree Expand file tree Collapse file tree 7 files changed +25
-14
lines changed Expand file tree Collapse file tree 7 files changed +25
-14
lines changed Original file line number Diff line number Diff line change @@ -690,8 +690,8 @@ issues.label_templates.info = No labels exist yet. Create a label with 'New Labe
690
690
issues.label_templates.helper = Select a label set
691
691
issues.label_templates.use = Use Label Set
692
692
issues.label_templates.fail_to_load_file = Failed to load label template file ' %s' : %v
693
- issues.add_label_at = added the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s
694
- issues.remove_label_at = removed the <div class="ui label" style="color: %s\; background-color: %s">%s</div> label %s
693
+ issues.add_label_at = added the <div class="ui label has-emoji " style="color: %s\; background-color: %s">%s</div> label %s
694
+ issues.remove_label_at = removed the <div class="ui label has-emoji " style="color: %s\; background-color: %s">%s</div> label %s
695
695
issues.add_milestone_at = `added this to the <b>%s</b> milestone %s`
696
696
issues.change_milestone_at = `modified the milestone from <b>%s</b> to <b>%s</b> %s`
697
697
issues.remove_milestone_at = `removed this from the <b>%s</b> milestone %s`
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ func Labels(ctx *context.Context) {
22
22
ctx .Data ["PageIsIssueList" ] = true
23
23
ctx .Data ["PageIsLabels" ] = true
24
24
ctx .Data ["RequireMinicolors" ] = true
25
+ ctx .Data ["RequireTribute" ] = true
25
26
ctx .Data ["LabelTemplates" ] = models .LabelTemplates
26
27
ctx .HTML (200 , tplLabels )
27
28
}
Original file line number Diff line number Diff line change 68
68
}
69
69
return itemStr;
70
70
}
71
- })
72
- issuesTribute.attach(document.getElementById('content'))
71
+ });
72
+ var content = document.getElementById('content');
73
+ if (content != null) {
74
+ issuesTribute.attach(content);
75
+ }
73
76
</script>
74
77
<script>
75
78
var emojiTribute = new Tribute({
93
96
return item;
94
97
},
95
98
selectTemplate: function (item) {
96
- if (typeof item === 'undefinied ') return null;
99
+ if (typeof item === 'undefined ') return null;
97
100
return ':' + item.original + ':';
98
101
},
99
102
menuItemTemplate: function (item) {
100
103
return '<img class="emoji" src="{{AppSubUrl}}/vendor/plugins/emojify/images/' + item.original + '.png"/>' + item.original;
101
104
}
102
105
}]
103
106
});
104
- emojiTribute.attach(document.getElementById('content'))
107
+ var emojiInputs = document.querySelectorAll('.emoji-input');
108
+ if (emojiInputs.length > 0) {
109
+ emojiTribute.attach(emojiInputs);
110
+ }
111
+ var content = document.getElementById('content');
112
+ if (content != null) {
113
+ emojiTribute.attach(document.getElementById('content'));
114
+ }
105
115
</script>
106
116
{{end}}
107
117
<script src="{{AppSubUrl}}/vendor/plugins/emojify/emojify.min.js"></script>
Original file line number Diff line number Diff line change 17
17
<div class="ui grid">
18
18
<div class="three wide column">
19
19
<div class="ui small input">
20
- <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
20
+ <input class="new-label-input emoji-input " name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
21
21
</div>
22
22
</div>
23
23
<div class="five wide column">
98
98
<li class="item">
99
99
<div class="ui grid">
100
100
<div class="three wide column">
101
- <div class="ui label" style="color: {{.ForegroundColor}}; background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
101
+ <div class="ui label has-emoji " style="color: {{.ForegroundColor}}; background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
102
102
</div>
103
103
<div class="seven wide column">
104
104
{{.Description}}
151
151
<div class="ui grid">
152
152
<div class="three wide column">
153
153
<div class="ui small input">
154
- <input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
154
+ <input class="new-label-input emoji-input " name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
155
155
</div>
156
156
</div>
157
157
<div class="five wide column">
Original file line number Diff line number Diff line change 192
192
<a class="ui label" href="{{$.RepoLink}}/src/branch/{{.Ref}}">{{.Ref}}</a>
193
193
{{end}}
194
194
{{range .Labels}}
195
- <a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
195
+ <a class="ui label has-emoji " href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
196
196
{{end}}
197
197
198
198
{{if .NumComments}}
Original file line number Diff line number Diff line change 46
46
<div class="filter menu" data-id="#label_ids">
47
47
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
48
48
{{range .Labels}}
49
- <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
49
+ <a class="{{if .IsChecked}}checked{{end}} item has-emoji " href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
50
50
{{end}}
51
51
</div>
52
52
</div>
53
53
<div class="ui labels list">
54
54
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
55
55
{{range .Labels}}
56
- <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
56
+ <a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text has-emoji ">{{.Name}}</span></a>
57
57
{{end}}
58
58
</div>
59
59
Original file line number Diff line number Diff line change 10
10
<div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/labels">
11
11
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
12
12
{{range .Labels}}
13
- <a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
13
+ <a class="{{if .IsChecked}}checked{{end}} item has-emoji " href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
14
14
{{if .Description }}<br><small class="desc">{{.Description}}</small>{{end}}</a>
15
15
{{end}}
16
16
</div>
19
19
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
20
20
{{range .Labels}}
21
21
<div class="item">
22
- <a class="ui label {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
22
+ <a class="ui label has-emoji {{if not .IsChecked}}hide{{end}}" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}" title="{{.Description}}">{{.Name}}</a>
23
23
</div>
24
24
25
25
{{end}}
You can’t perform that action at this time.
0 commit comments