File tree 3 files changed +3
-11
lines changed
3 files changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -344,13 +344,6 @@ issues.StateButtonView = Backbone.View.extend({
344
344
this . render ( ) ;
345
345
} , this )
346
346
) ;
347
-
348
- this . model . on (
349
- "change:labels" ,
350
- _ . bind ( function ( ) {
351
- this . mainView . labels . renderLabels ( ) ;
352
- } , this )
353
- ) ;
354
347
} ,
355
348
template : _ . template ( $ ( "#state-button-tmpl" ) . html ( ) ) ,
356
349
render : function ( ) {
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ issues.LabelsView = Backbone.View.extend({
41
41
subTemplate : _ . template (
42
42
[
43
43
"<% _.each(labels, function(label) { %>" ,
44
- '<span class="wc-Label wc-Label--badge" style="background-color:#<%=label.color%>">' ,
44
+ '<span class="wc-Label wc-Label--badge js-Label " style="background-color:#<%=label.color%>">' ,
45
45
"<%= label.name %>" ,
46
46
"</span>" ,
47
47
"<% }); %>"
@@ -114,7 +114,7 @@ issues.LabelEditorView = Backbone.View.extend({
114
114
reRender : function ( data ) {
115
115
//only re-render the labels into the labels wrapper
116
116
this . issueView . $el
117
- . find ( ".js-label -list" )
117
+ . find ( ".js-Label -list" )
118
118
. html ( this . issueView . subTemplate ( data ) ) ;
119
119
this . issueView . $el . find ( ".js-LabelEditorLauncher" ) . addClass ( "is-active" ) ;
120
120
} ,
@@ -176,7 +176,7 @@ issues.LabelEditorView = Backbone.View.extend({
176
176
item . color = $ ( item ) . data ( "color" ) ;
177
177
modelUpdate . push ( item ) ;
178
178
} ) ;
179
- this . reRender ( { labels : modelUpdate } ) ;
179
+ this . reRender ( { labels : _ . uniq ( modelUpdate ) } ) ;
180
180
} ,
181
181
closeEditor : function ( ) {
182
182
var checked = $ ( "input[type=checkbox]:checked" ) ;
Original file line number Diff line number Diff line change @@ -36,7 +36,6 @@ issues.LabelList = Backbone.Model.extend({
36
36
} ) ;
37
37
// if we're initialized with {labels:array-of-objects}, process the data
38
38
var inputLabelData = this . get ( "labels" ) ;
39
- this . set ( "labels" , [ ] ) ;
40
39
if ( inputLabelData ) {
41
40
this . parse ( inputLabelData ) ;
42
41
} else {
You can’t perform that action at this time.
0 commit comments