Skip to content

Commit 16e3cd8

Browse files
rueckstiesskangas
authored andcommitted
INT-743 make compatible with [email protected]
1 parent 35e4139 commit 16e3cd8

File tree

7 files changed

+35
-34
lines changed

7 files changed

+35
-34
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"ampersand-form-view": "^5.1.1",
7373
"ampersand-input-view": "^5.0.0",
7474
"ampersand-rest-collection": "^5.0.0",
75-
"ampersand-state": "4.6.0",
75+
"ampersand-state": "^4.8.0",
7676
"debug": "^2.2.0",
7777
"electron-squirrel-startup": "^0.1.4",
7878
"mongodb-collection-model": "^0.1.1",
@@ -129,8 +129,8 @@
129129
"mongodb-extended-json": "^1.5.3",
130130
"mongodb-js-fmt": "^0.0.3",
131131
"mongodb-js-precommit": "^0.2.4",
132-
"mongodb-language-model": "^0.3.0",
133-
"mongodb-schema": "^3.3.0",
132+
"mongodb-language-model": "^0.3.3",
133+
"mongodb-schema": "mongodb-js/mongodb-schema#INT-743-ampersand-state-4.8.0",
134134
"mousetrap": "^1.5.3",
135135
"node-notifier": "^4.3.1",
136136
"numeral": "^1.5.3",

src/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var Application = View.extend({
9696
/**
9797
* @see statusbar.js
9898
*/
99-
statusbar: 'view',
99+
statusbar: 'state',
100100
/**
101101
* Details of the MongoDB Instance we're currently connected to.
102102
*/

src/connect/sidebar.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var View = require('ampersand-view');
2-
var Connection = require('../models/connection');
32

43
/**
54
* View for a connection in the sidebar. It can be clicked (will copy details to the form view)
@@ -8,7 +7,6 @@ var Connection = require('../models/connection');
87
var SidebarItemView = View.extend({
98
namespace: 'SidebarItemView',
109
props: {
11-
model: Connection,
1210
hover: {
1311
type: 'boolean',
1412
default: false

src/field-list/index.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ var FieldView = View.extend({
3636
type: 'boolean',
3737
default: false
3838
},
39-
minichartView: 'view',
40-
fieldListView: 'view',
41-
arrayFieldListView: 'view'
39+
minichartView: 'any'
4240
},
4341
bindings: {
4442
'model.name': {
@@ -78,32 +76,26 @@ var FieldView = View.extend({
7876
});
7977
}
8078
},
81-
fields: {
79+
fieldListView: {
8280
hook: 'fields-subview',
8381
waitFor: 'model.fields',
8482
prepareView: function(el) {
85-
this.set('fieldListView', new FieldListView({
83+
return new FieldListView({
8684
el: el,
8785
parent: this,
8886
collection: this.model.fields
89-
}), {
90-
silent: true
9187
});
92-
return this.fieldListView;
9388
}
9489
},
95-
arrayFields: {
90+
arrayFieldListView: {
9691
hook: 'arrayfields-subview',
9792
waitFor: 'model.arrayFields',
9893
prepareView: function(el) {
99-
this.set('arrayFieldListView', new FieldListView({
94+
return new FieldListView({
10095
el: el,
10196
parent: this,
10297
collection: this.model.arrayFields
103-
}), {
104-
silent: true
10598
});
106-
return this.arrayFieldListView;
10799
}
108100
}
109101
},
@@ -135,7 +127,7 @@ var FieldView = View.extend({
135127
FieldListView = View.extend({
136128
modelType: 'FieldListView',
137129
session: {
138-
fieldCollectionView: 'view'
130+
fieldCollectionView: 'object'
139131
},
140132
template: require('./index.jade'),
141133
initialize: function() {

src/minicharts/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = AmpersandView.extend(QueryBuilderMixin, {
2424
modelType: 'MinichartView',
2525
template: require('./minichart.jade'),
2626
session: {
27-
subview: 'view',
27+
subview: 'state',
2828
viewOptions: 'object',
2929
selectedValues: {
3030
type: 'array',

src/minicharts/viz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var VizView = AmpersandView.extend({
1313
data: 'any',
1414
className: 'any',
1515
vizFn: 'any',
16-
chart: 'function',
16+
chart: 'any',
1717
debounceRender: {
1818
type: 'boolean',
1919
default: true

src/tour/index.js

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,30 @@ var View = require('ampersand-view');
33

44
var TourView = View.extend({
55
props: {
6-
isAnimating: { type: 'boolean', default: true },
7-
tourCount: { type: 'number', default: 0 },
8-
tourImages: { type: 'array', default: function() {
9-
return [
10-
{ file: 'f1.gif', duration: 4000 },
11-
{ file: 'f2.gif', duration: 9000 },
12-
{ file: 'f3.gif', duration: 9000 },
13-
{ file: 'f4.gif', duration: 6000 },
14-
{ file: 'f5.gif', duration: 9000 }
15-
];
16-
}
6+
isAnimating: {
7+
type: 'boolean',
8+
default: true
9+
},
10+
tourCount: {
11+
type: 'number',
12+
default: 0
1713
},
18-
tourImagesFolder: { type: 'string', default: './images/tour/' }
14+
tourImages: {
15+
type: 'array',
16+
default: function() {
17+
return [
18+
{ file: 'f1.gif', duration: 4000 },
19+
{ file: 'f2.gif', duration: 9000 },
20+
{ file: 'f3.gif', duration: 9000 },
21+
{ file: 'f4.gif', duration: 6000 },
22+
{ file: 'f5.gif', duration: 9000 }
23+
];
24+
}
25+
},
26+
tourImagesFolder: {
27+
type: 'string',
28+
default: './images/tour/'
29+
}
1930
},
2031
template: require('./index.jade'),
2132
events: {

0 commit comments

Comments
 (0)