Skip to content

Commit 0980721

Browse files
committed
Merge branch 'dev' into INT-270_connect-dialog
2 parents c2f4585 + 3eb22a1 commit 0980721

File tree

4 files changed

+27
-35
lines changed

4 files changed

+27
-35
lines changed

src/field-list/type-list-item.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ var format = require('util').format;
33
var _ = require('lodash');
44
var numeral = require('numeral');
55
var tooltipMixin = require('../tooltip-mixin');
6+
var $ = require('jquery');
67

78
module.exports = View.extend(tooltipMixin, {
89
namespace: 'TypeListItem',
@@ -17,14 +18,6 @@ module.exports = View.extend(tooltipMixin, {
1718
el.classList.add('schema-field-type-' + this.model.getId().toLowerCase());
1819
}
1920
}
20-
],
21-
'model.probability': [
22-
{
23-
hook: 'bar',
24-
type: function(el) {
25-
el.style.width = Math.floor(this.model.probability * 100) + '%';
26-
}
27-
}
2821
]
2922
},
3023
events: {
@@ -35,6 +28,9 @@ module.exports = View.extend(tooltipMixin, {
3528
this.tooltip({
3629
title: format('%s (%s)', this.model.getId(), numeral(this.model.probability).format('%'))
3730
});
31+
$(this.queryByHook('bar')).css({
32+
width: Math.floor(this.model.probability * 100) + '%'
33+
});
3834
}.bind(this), 300));
3935
},
4036
template: require('./type-list-item.jade'),
@@ -43,5 +39,9 @@ module.exports = View.extend(tooltipMixin, {
4339
if (!fieldList.minichartModel || fieldList.minichartModel.modelType !== this.model.modelType) {
4440
fieldList.switchView(this.model);
4541
}
42+
},
43+
render: function() {
44+
this.renderWithTemplate(this);
45+
return this;
4646
}
4747
});

src/home/collection.jade

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
.collection-view
2-
.row: .col-md-12.sampling-status
3-
p
4-
| This report is based on a sample of 1000 documents. 
5-
a(href='#') Learn More
2+
.sampling-status
3+
span This report is based on a sample of 100 documents.
64
header
75
.row
86
.col-md-6

src/home/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module.exports = AmpersandView.extend({
8585
}
8686
},
8787
documents: {
88-
waitFor: 'model.documents',
88+
waitFor: 'open',
8989
hook: 'documents-subview',
9090
prepareView: function(el) {
9191
return new DocumentListView({

src/minicharts/viz.js

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ var VizView = AmpersandView.extend({
4848
hook: 'viz-container'
4949
}
5050
},
51-
52-
initialize: function() {
53-
if (this.model !== undefined) {
54-
this.listenTo(this.model, 'change', this.redraw);
55-
}
56-
51+
initialize: function(opts) {
5752
if (this.width === 'auto' || this.width === undefined) {
5853
this._autoWidth = true;
5954
this.width = 0;
@@ -134,23 +129,22 @@ var VizView = AmpersandView.extend({
134129
});
135130
}
136131
return this;
137-
},
138-
139-
redraw: function() {
140-
this._chooseDataSource();
141-
this.data = this.transform(this.data);
142-
143-
this._measure();
144-
145-
if (this.vizFn) {
146-
this.vizFn({
147-
width: this.width,
148-
height: this.height,
149-
data: this.data,
150-
el: this.el
151-
});
152-
}
153132
}
133+
// redraw: function() {
134+
// this._chooseDataSource();
135+
// this.data = this.transform(this.data);
136+
//
137+
// this._measure();
138+
//
139+
// if (this.vizFn) {
140+
// this.vizFn({
141+
// width: this.width,
142+
// height: this.height,
143+
// data: this.data,
144+
// el: this.el,
145+
// });
146+
// }
147+
// }
154148
});
155149

156150
module.exports = VizView;

0 commit comments

Comments
 (0)