DEV: s/Em/Ember (#6874)

approved

#1

DEV: s/Em/Ember (#6874)

diff --git a/.eslintrc b/.eslintrc
index d84c9eb..148fa3b 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -28,7 +28,6 @@
     "currentURL": true,
     "define": true,
     "Discourse": true,
-    "Em": true,
     "Ember": true,
     "exists": true,
     "expandSelectKit": true,
diff --git a/app/assets/javascripts/admin/components/color-input.js.es6 b/app/assets/javascripts/admin/components/color-input.js.es6
index 17ae5a9..2880143 100644
--- a/app/assets/javascripts/admin/components/color-input.js.es6
+++ b/app/assets/javascripts/admin/components/color-input.js.es6
@@ -34,7 +34,7 @@ export default Ember.Component.extend({
   didInsertElement() {
     loadScript("/javascripts/spectrum.js").then(() => {
       loadCSS("/javascripts/spectrum.css").then(() => {
-        Em.run.schedule("afterRender", () => {
+        Ember.run.schedule("afterRender", () => {
           this.$(".picker")
             .spectrum({ color: "#" + this.get("hexValue") })
             .on("change.spectrum", (me, color) => {
@@ -44,7 +44,7 @@ export default Ember.Component.extend({
         });
       });
     });
-    Em.run.schedule("afterRender", () => {
+    Ember.run.schedule("afterRender", () => {
       this.hexValueChanged();
     });
   }
diff --git a/app/assets/javascripts/admin/components/ip-lookup.js.es6 b/app/assets/javascripts/admin/components/ip-lookup.js.es6
index 357ba10..1ddb37f 100644
--- a/app/assets/javascripts/admin/components/ip-lookup.js.es6
+++ b/app/assets/javascripts/admin/components/ip-lookup.js.es6
@@ -21,7 +21,7 @@ export default Ember.Component.extend({
         ajax("/admin/users/ip-info", {
           data: { ip: this.get("ip") }
         }).then(function(location) {
-          self.set("location", Em.Object.create(location));
+          self.set("location", Ember.Object.create(location));
         });
       }
 
diff --git a/app/assets/javascripts/admin/components/permalink-form.js.es6 b/app/assets/javascripts/admin/components/permalink-form.js.es6
index 0bd547c..c0c2f24 100644
--- a/app/assets/javascripts/admin/components/permalink-form.js.es6
+++ b/app/assets/javascripts/admin/components/permalink-form.js.es6
@@ -34,7 +34,7 @@ export default Ember.Component.extend({
             self.set("permalink_type_value", "");
             self.set("formSubmitted", false);
             self.action(Permalink.create(result.permalink));
-            Em.run.schedule("afterRender", function() {
+            Ember.run.schedule("afterRender", function() {
               self.$(".permalink-url").focus();
             });
           },
@@ -60,7 +60,7 @@ export default Ember.Component.extend({
   didInsertElement: function() {
     var self = this;
     self._super();
-    Em.run.schedule("afterRender", function() {
+    Ember.run.schedule("afterRender", function() {
       self.$(".external-url").keydown(function(e) {
         if (e.keyCode === 13) {
           // enter key
diff --git a/app/assets/javascripts/admin/components/resumable-upload.js.es6 b/app/assets/javascripts/admin/components/resumable-upload.js.es6
index 0073047..e462d9e 100644
--- a/app/assets/javascripts/admin/components/resumable-upload.js.es6
+++ b/app/assets/javascripts/admin/components/resumable-upload.js.es6
@@ -55,7 +55,7 @@ export default Ember.Component.extend(
       if (this.get("isUploading")) {
         this.resumable.cancel();
         var self = this;
-        Em.run.later(function() {
+        Ember.run.later(function() {
           self._reset();
         });
         return false;
@@ -83,20 +83,20 @@ export default Ember.Component.extend(
         // automatically upload the selected file
         self.resumable.upload();
         // mark as uploading
-        Em.run.later(function() {
+        Ember.run.later(function() {
           self.set("isUploading", true);
         });
       });
 
       this.resumable.on("fileProgress", function(file) {
         // update progress
-        Em.run.later(function() {
+        Ember.run.later(function() {
           self.set("progress", parseInt(file.progress() * 100, 10));
         });
       });
 
       this.resumable.on("fileSuccess", function(file) {
-        Em.run.later(function() {
+        Ember.run.later(function() {
           // mark as not uploading anymore
           self._reset();
           // fire an event to allow the parent route to reload its model
@@ -105,7 +105,7 @@ export default Ember.Component.extend(
       });
 
       this.resumable.on("fileError", function(file, message) {
-        Em.run.later(function() {
+        Ember.run.later(function() {
           // mark as not uploading anymore
           self._reset();
           // fire an event to allow the parent route to display the error message
@@ -116,7 +116,7 @@ export default Ember.Component.extend(
 
     _assignBrowse: function() {
       var self = this;
-      Em.run.schedule("afterRender", function() {
+      Ember.run.schedule("afterRender", function() {
         self.resumable.assignBrowse(self.$());
       });
     }.on("didInsertElement"),
diff --git a/app/assets/javascripts/admin/components/tags-uploader.js.es6 b/app/assets/javascripts/admin/components/tags-uploader.js.es6
index 60b4297..1373792 100644
--- a/app/assets/javascripts/admin/components/tags-uploader.js.es6
+++ b/app/assets/javascripts/admin/components/tags-uploader.js.es6
@@ -1,9 +1,9 @@
 import UploadMixin from "discourse/mixins/upload";
 
-export default Em.Component.extend(UploadMixin, {
+export default Ember.Component.extend(UploadMixin, {
   type: "csv",
   uploadUrl: "/tags/upload",
-  addDisabled: Em.computed.alias("uploading"),
+  addDisabled: Ember.computed.alias("uploading"),
   elementId: "tag-uploader",
 
   validateUploadedFilesOptions() {
diff --git a/app/assets/javascripts/admin/components/themes-list-item.js.es6 b/app/assets/javascripts/admin/components/themes-list-item.js.es6
index 0bd69f9..fad6702 100644
--- a/app/assets/javascripts/admin/components/themes-list-item.js.es6
+++ b/app/assets/javascripts/admin/components/themes-list-item.js.es6
@@ -9,9 +9,9 @@ export default Ember.Component.extend({
   childrenExpanded: false,
   classNames: ["themes-list-item"],
   classNameBindings: ["theme.selected:selected"],
-  hasComponents: Em.computed.gt("children.length", 0),
-  displayComponents: Em.computed.and("hasComponents", "theme.isActive"),
-  displayHasMore: Em.computed.gt("theme.childThemes.length", MAX_COMPONENTS),
+  hasComponents: Ember.computed.gt("children.length", 0),
+  displayComponents: Ember.computed.and("hasComponents", "theme.isActive"),
+  displayHasMore: Ember.computed.gt("theme.childThemes.length", MAX_COMPONENTS),
 
   click(e) {
     if (!$(e.target).hasClass("others-count")) {
diff --git a/app/assets/javascripts/admin/components/themes-list.js.es6 b/app/assets/javascripts/admin/components/themes-list.js.es6
index da14b64..abb03af 100644
--- a/app/assets/javascripts/admin/components/themes-list.js.es6
+++ b/app/assets/javascripts/admin/components/themes-list.js.es6
@@ -7,12 +7,12 @@ export default Ember.Component.extend({
 
   classNames: ["themes-list"],
 
-  hasThemes: Em.computed.gt("themesList.length", 0),
-  hasUserThemes: Em.computed.gt("userThemes.length", 0),
-  hasInactiveThemes: Em.computed.gt("inactiveThemes.length", 0),
+  hasThemes: Ember.computed.gt("themesList.length", 0),
+  hasUserThemes: Ember.computed.gt("userThemes.length", 0),
+  hasInactiveThemes: Ember.computed.gt("inactiveThemes.length", 0),
 
-  themesTabActive: Em.computed.equal("currentTab", THEMES),
-  componentsTabActive: Em.computed.equal("currentTab", COMPONENTS),
+  themesTabActive: Ember.computed.equal("currentTab", THEMES),
+  componentsTabActive: Ember.computed.equal("currentTab", COMPONENTS),
 
   @computed("themes", "components", "currentTab")
   themesList(themes, components) {
@@ -79,7 +79,7 @@ export default Ember.Component.extend({
       }
     },
     navigateToTheme(theme) {
-      Em.getOwner(this)
+      Ember.getOwner(this)
         .lookup("router:main")

[... diff too long, it was truncated ...]

GitHub sha: 1a3655b7


#2