File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ var $ = require('jquery');
3
3
var format = require ( 'util' ) . format ;
4
4
var _ = require ( 'underscore' ) ;
5
5
var numeral = require ( 'numeral' ) ;
6
+ var debug = require ( 'debug' ) ( 'scout-ui:field-list:type-list-item' ) ;
6
7
7
8
require ( 'bootstrap/js/tooltip' ) ;
8
9
@@ -19,16 +20,6 @@ module.exports = AmpersandView.extend({
19
20
}
20
21
}
21
22
] ,
22
- 'model.probability' : [
23
- {
24
- hook : 'bar' ,
25
- type : function ( el ) {
26
- $ ( el ) . css ( {
27
- width : Math . floor ( this . model . probability * 100 ) + '%'
28
- } ) ;
29
- }
30
- }
31
- ]
32
23
} ,
33
24
events : {
34
25
'click .schema-field-wrapper' : 'typeClicked'
@@ -46,6 +37,9 @@ module.exports = AmpersandView.extend({
46
37
$ ( this . el ) . tooltip ( {
47
38
title : format ( '%s (%s)' , this . model . getId ( ) , numeral ( this . model . probability ) . format ( '%' ) )
48
39
} ) ;
40
+ $ ( this . queryByHook ( 'bar' ) ) . css ( {
41
+ width : Math . floor ( this . model . probability * 100 ) + '%'
42
+ } ) ;
49
43
} . bind ( this ) , 300 ) ) ;
50
44
} ,
51
45
template : require ( './type-list-item.jade' ) ,
@@ -54,6 +48,9 @@ module.exports = AmpersandView.extend({
54
48
if ( ! fieldList . minichartModel || ( fieldList . minichartModel . modelType !== this . model . modelType ) ) {
55
49
fieldList . switchView ( this . model ) ;
56
50
}
51
+ } ,
52
+ render : function ( ) {
53
+ this . renderWithTemplate ( this ) ;
54
+ return this ;
57
55
}
58
-
59
56
} ) ;
Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ module.exports = AmpersandView.extend({
133
133
return this ;
134
134
}
135
135
// redraw: function() {
136
- // debug('redraw', this.cid);
137
136
// this._chooseDataSource();
138
137
// this.data = this.transform(this.data);
139
138
//
You can’t perform that action at this time.
0 commit comments