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');
33var format = require ( 'util' ) . format ;
44var _ = require ( 'underscore' ) ;
55var numeral = require ( 'numeral' ) ;
6+ var debug = require ( 'debug' ) ( 'scout-ui:field-list:type-list-item' ) ;
67
78require ( 'bootstrap/js/tooltip' ) ;
89
@@ -19,16 +20,6 @@ module.exports = AmpersandView.extend({
1920 }
2021 }
2122 ] ,
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- ]
3223 } ,
3324 events : {
3425 'click .schema-field-wrapper' : 'typeClicked'
@@ -46,6 +37,9 @@ module.exports = AmpersandView.extend({
4637 $ ( this . el ) . tooltip ( {
4738 title : format ( '%s (%s)' , this . model . getId ( ) , numeral ( this . model . probability ) . format ( '%' ) )
4839 } ) ;
40+ $ ( this . queryByHook ( 'bar' ) ) . css ( {
41+ width : Math . floor ( this . model . probability * 100 ) + '%'
42+ } ) ;
4943 } . bind ( this ) , 300 ) ) ;
5044 } ,
5145 template : require ( './type-list-item.jade' ) ,
@@ -54,6 +48,9 @@ module.exports = AmpersandView.extend({
5448 if ( ! fieldList . minichartModel || ( fieldList . minichartModel . modelType !== this . model . modelType ) ) {
5549 fieldList . switchView ( this . model ) ;
5650 }
51+ } ,
52+ render : function ( ) {
53+ this . renderWithTemplate ( this ) ;
54+ return this ;
5755 }
58-
5956} ) ;
Original file line number Diff line number Diff line change @@ -133,7 +133,6 @@ module.exports = AmpersandView.extend({
133133 return this ;
134134 }
135135 // redraw: function() {
136- // debug('redraw', this.cid);
137136 // this._chooseDataSource();
138137 // this.data = this.transform(this.data);
139138 //
You can’t perform that action at this time.
0 commit comments