Skip to content

Commit ff6186b

Browse files
committed
Merge pull request #159 from 10gen/one_more_thing
INT-747 🚧 "one more thing"
2 parents db87b69 + 6e89734 commit ff6186b

File tree

10 files changed

+689
-21
lines changed

10 files changed

+689
-21
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
"mongodb-connection-model": "^3.0.6",
7979
"mongodb-instance-model": "^1.0.2",
8080
"mongodb-ns": "^1.0.0",
81-
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.2/scout-server-0.4.2.tar.gz"
81+
"scout-server": "http://bin.mongodb.org/js/scout-server/v0.4.2/scout-server-0.4.2.tar.gz",
82+
"google-maps": "^3.1.0"
8283
},
8384
"devDependencies": {
8485
"ampersand-app": "^1.0.4",
@@ -91,6 +92,7 @@
9192
"ampersand-sync-localforage": "^0.1.1",
9293
"ampersand-view": "^9.0.0",
9394
"ampersand-view-switcher": "^2.0.0",
95+
"async": "^1.5.0",
9496
"backoff": "^2.4.1",
9597
"bootstrap": "https://github.com/twbs/bootstrap/archive/v3.3.5.tar.gz",
9698
"browserify": "^12.0.1",

src/app.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ var state = new Application({
236236
// via `window.localStorage`.
237237
var FEATURES = {
238238
querybuilder: true,
239-
'First Run Tour': false,
239+
'Geo Minicharts': true,
240240
'Connect with SSL': false,
241241
'Connect with Kerberos': false,
242242
'Connect with LDAP': false,
@@ -245,8 +245,6 @@ var FEATURES = {
245245

246246
app.extend({
247247
client: null,
248-
// @note (imlucas): Backwards compat for querybuilder
249-
features: FEATURES,
250248
/**
251249
* Check whether a feature flag is currently enabled.
252250
*
@@ -256,6 +254,16 @@ app.extend({
256254
isFeatureEnabled: function(id) {
257255
return FEATURES[id] === true;
258256
},
257+
/**
258+
* Enable or disable a feature programatically.
259+
*
260+
* @param {String} id - A key in `FEATURES`.
261+
* @param {Boolean} bool - whether to enable (true) or disable (false)
262+
* @return {Boolean}
263+
*/
264+
setFeature: function(id, bool) {
265+
FEATURES[id] = bool;
266+
},
259267
sendMessage: function(msg) {
260268
ipc.send('message', msg);
261269
},

src/field-list/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ FieldListView = View.extend({
147147
},
148148
makeFieldVisible: function() {
149149
var views = this.fieldCollectionView.views;
150-
_.each(views, function(field_view) {
150+
_.each(views, function(fieldView) {
151151
raf(function() {
152-
field_view.visible = true;
152+
fieldView.visible = true;
153153
});
154154
});
155155
},

src/index.jade

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ doctype html
22
html(lang='en')
33
head
44
title MongoDB
5-
meta(http-equiv="Content-Security-Policy", content="default-src *; script-src 'self' http://localhost:35729; style-src 'self' 'unsafe-inline';")
6-
5+
meta(http-equiv="Content-Security-Policy", content="default-src *; script-src 'self' https://*.googleapis.com https://maps.gstatic.com http://localhost:35729 'unsafe-eval'; style-src 'self' https://fonts.googleapis.com 'unsafe-inline';")
76
meta(name='viewport', content='initial-scale=1')
87
link(rel='stylesheet', href='index.css', charset='UTF-8')
98
body

0 commit comments

Comments
 (0)