diff --git a/app/assets/javascripts/discourse.js b/app/assets/javascripts/discourse.js index 1aa7fe924..36a73256d 100644 --- a/app/assets/javascripts/discourse.js +++ b/app/assets/javascripts/discourse.js @@ -107,7 +107,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { $('noscript').remove(); - Ember.keys(requirejs._eak_seen).forEach(function(key) { + Object.keys(requirejs._eak_seen).forEach(function(key) { if (/\/pre\-initializers\//.test(key)) { var module = require(key, null, null, true); if (!module) { throw new Error(key + ' must export an initializer.'); } @@ -115,7 +115,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, { } }); - Ember.keys(requirejs._eak_seen).forEach(function(key) { + Object.keys(requirejs._eak_seen).forEach(function(key) { if (/\/initializers\//.test(key)) { var module = require(key, null, null, true); if (!module) { throw new Error(key + ' must export an initializer.'); } diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 26521ca4d..01afbacd9 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -218,7 +218,7 @@ export default Ember.Component.extend({ const mouseTrap = Mousetrap(this.$('.d-editor-input')[0]); const shortcuts = this.get('toolbar.shortcuts'); - Ember.keys(shortcuts).forEach(sc => { + Object.keys(shortcuts).forEach(sc => { const button = shortcuts[sc]; mouseTrap.bind(sc, () => { this.send(button.action, button); @@ -244,7 +244,7 @@ export default Ember.Component.extend({ this.appEvents.off('composer:insert-text'); const mouseTrap = this._mouseTrap; - Ember.keys(this.get('toolbar.shortcuts')).forEach(sc => mouseTrap.unbind(sc)); + Object.keys(this.get('toolbar.shortcuts')).forEach(sc => mouseTrap.unbind(sc)); this.$('.d-editor-preview').off('click.preview'); }, diff --git a/app/assets/javascripts/discourse/controllers/discovery-sortable.js.es6 b/app/assets/javascripts/discourse/controllers/discovery-sortable.js.es6 index 8786828d7..5ac8d4b73 100644 --- a/app/assets/javascripts/discourse/controllers/discovery-sortable.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery-sortable.js.es6 @@ -12,7 +12,7 @@ export var queryParams = { // Basic controller options var controllerOpts = { needs: ['discovery/topics'], - queryParams: Ember.keys(queryParams), + queryParams: Object.keys(queryParams), }; // Aliases for the values diff --git a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 index cc411691c..008ab29a3 100644 --- a/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 +++ b/app/assets/javascripts/discourse/controllers/discovery/topics.js.es6 @@ -142,7 +142,7 @@ const controllerOpts = { }; -Ember.keys(queryParams).forEach(function(p) { +Object.keys(queryParams).forEach(function(p) { // If we don't have a default value, initialize it to null if (typeof controllerOpts[p] === 'undefined') { controllerOpts[p] = null; diff --git a/app/assets/javascripts/discourse/ember/resolver.js.es6 b/app/assets/javascripts/discourse/ember/resolver.js.es6 index adf2e0f92..8f41a2c50 100644 --- a/app/assets/javascripts/discourse/ember/resolver.js.es6 +++ b/app/assets/javascripts/discourse/ember/resolver.js.es6 @@ -70,7 +70,7 @@ export default Ember.DefaultResolver.extend({ // If we end with the name we want, use it. This allows us to define components within plugins. const suffix = parsedName.type + 's/' + parsedName.fullNameWithoutType, dashed = Ember.String.dasherize(suffix), - moduleName = Ember.keys(requirejs.entries).find(function(e) { + moduleName = Object.keys(requirejs.entries).find(function(e) { return (e.indexOf(suffix, e.length - suffix.length) !== -1) || (e.indexOf(dashed, e.length - dashed.length) !== -1); }); diff --git a/app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6 b/app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6 index 6da20c342..f55beeba5 100644 --- a/app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6 +++ b/app/assets/javascripts/discourse/helpers/plugin-outlet.js.es6 @@ -60,7 +60,7 @@ function findOutlets(collection, callback) { const disabledPlugins = Discourse.Site.currentProp('disabled_plugins') || []; - Ember.keys(collection).forEach(function(res) { + Object.keys(collection).forEach(function(res) { if (res.indexOf("/connectors/") !== -1) { // Skip any disabled plugins for (let i=0; i { + Object.keys(requirejs.entries).forEach(entry => { if ((/\/helpers\//).test(entry)) { require(entry, null, null, true); } diff --git a/app/assets/javascripts/discourse/models/post.js.es6 b/app/assets/javascripts/discourse/models/post.js.es6 index 37005bc99..c2403aafa 100644 --- a/app/assets/javascripts/discourse/models/post.js.es6 +++ b/app/assets/javascripts/discourse/models/post.js.es6 @@ -108,7 +108,7 @@ const Post = RestModel.extend({ // Put the metaData into the request if (metaData) { data.meta_data = {}; - Ember.keys(metaData).forEach(function(key) { data.meta_data[key] = metaData.get(key); }); + Object.keys(metaData).forEach(function(key) { data.meta_data[key] = metaData.get(key); }); } return data; diff --git a/app/assets/javascripts/discourse/models/site.js.es6 b/app/assets/javascripts/discourse/models/site.js.es6 index 988ba1eac..76d9d49e7 100644 --- a/app/assets/javascripts/discourse/models/site.js.es6 +++ b/app/assets/javascripts/discourse/models/site.js.es6 @@ -41,7 +41,7 @@ const Site = RestModel.extend({ } }); - Ember.keys(remaining).forEach(parentCategoryId => { + Object.keys(remaining).forEach(parentCategoryId => { const category = result.findBy('id', parseInt(parentCategoryId, 10)), index = result.indexOf(category); diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index b74c2cd2c..6e0d2aa41 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -136,7 +136,7 @@ const User = RestModel.extend({ }, copy() { - return Discourse.User.create(this.getProperties(Ember.keys(this))); + return Discourse.User.create(this.getProperties(Object.keys(this))); }, save() { diff --git a/app/assets/javascripts/discourse/router.js.es6 b/app/assets/javascripts/discourse/router.js.es6 index 950e78cb8..0223dfe41 100644 --- a/app/assets/javascripts/discourse/router.js.es6 +++ b/app/assets/javascripts/discourse/router.js.es6 @@ -15,7 +15,7 @@ export function mapRoutes() { // will be built automatically. You can supply a `resource` property to // automatically put it in that resource, such as `admin`. That way plugins // can define admin routes. - Ember.keys(requirejs._eak_seen).forEach(function(key) { + Object.keys(requirejs._eak_seen).forEach(function(key) { if (/route-map$/.test(key)) { var module = require(key, null, null, true); if (!module || !module.default) { throw new Error(key + ' must export a route map.'); } diff --git a/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 b/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 index 990a88215..b2e5f3281 100644 --- a/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 +++ b/app/assets/javascripts/discourse/routes/build-topic-route.js.es6 @@ -4,7 +4,7 @@ import { queryParams } from 'discourse/controllers/discovery-sortable'; function filterQueryParams(params, defaultParams) { const findOpts = defaultParams || {}; if (params) { - Ember.keys(queryParams).forEach(function(opt) { + Object.keys(queryParams).forEach(function(opt) { if (params[opt]) { findOpts[opt] = params[opt]; } }); } @@ -38,7 +38,7 @@ function findTopicList(store, tracking, filter, filterParams, extras) { // Clean up any string parameters that might slip through filterParams = filterParams || {}; - Ember.keys(filterParams).forEach(function(k) { + Object.keys(filterParams).forEach(function(k) { const val = filterParams[k]; if (val === "undefined" || val === "null" || val === 'false') { filterParams[k] = undefined; diff --git a/test/javascripts/helpers/fixture-pretender.js.es6 b/test/javascripts/helpers/fixture-pretender.js.es6 index dea96b35a..80b208099 100644 --- a/test/javascripts/helpers/fixture-pretender.js.es6 +++ b/test/javascripts/helpers/fixture-pretender.js.es6 @@ -3,12 +3,12 @@ export default function(helpers) { const fixturesByUrl = {}; // Load any fixtures automatically - Ember.keys(require._eak_seen).forEach(entry => { + Object.keys(require._eak_seen).forEach(entry => { if (/^fixtures/.test(entry)) { const fixture = require(entry, null, null, true); if (fixture && fixture.default) { const obj = fixture.default; - Ember.keys(obj).forEach(url => { + Object.keys(obj).forEach(url => { fixturesByUrl[url] = obj[url]; this.get(url, () => response(obj[url])); }); diff --git a/test/javascripts/test_helper.js b/test/javascripts/test_helper.js index 852a67d18..7362298d1 100644 --- a/test/javascripts/test_helper.js +++ b/test/javascripts/test_helper.js @@ -132,7 +132,7 @@ window.asyncTestDiscourse = helpers.asyncTestDiscourse; window.controllerFor = helpers.controllerFor; window.fixture = helpers.fixture; -Ember.keys(requirejs.entries).forEach(function(entry) { +Object.keys(requirejs.entries).forEach(function(entry) { if ((/\-test/).test(entry)) { require(entry, null, null, true); }