DEV: s/Em/Ember (#6874)

This commit is contained in:
Joffrey JAFFEUX
2019-01-11 17:54:23 +01:00
committed by GitHub
parent dbe42068a2
commit 1a3655b787
125 changed files with 315 additions and 306 deletions

View File

@ -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"),