1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-07 22:45:24 +02:00

Clean up helpers

This commit is contained in:
zinyando 2016-06-08 15:10:27 +02:00
parent 99e4057fad
commit 05bd894d45
3 changed files with 3 additions and 7 deletions

View file

@ -4,15 +4,15 @@ const userNotification = Ember.Component.extend({
notifications: [],
didInsertElement() {
this.eventBus.subscribe('notifyUser', this, 'notifyHandler');
// this.eventBus.subscribe('notifyUser', this, 'notifyHandler');
},
willDestroyElement() {
this.eventBus.unsubscribe('notifyUser');
// this.eventBus.unsubscribe('notifyUser');
},
showNotification(msg) {
return msg;
// return msg;
}
});

View file

@ -6,11 +6,9 @@ function isVisible(selector) {
function checkVisibility(selector, interval, resolve, visibility) {
if (isVisible(selector) === visibility) {
console.log("found in appear");
resolve($(selector));
} else {
Ember.run.later(null, function() {
console.log("waiting in appear");
checkVisibility(selector, interval, resolve, visibility);
}, interval);
}

View file

@ -6,11 +6,9 @@ function isVisible(selector) {
function checkVisibility(selector, interval, resolve, visibility) {
if (isVisible(selector) === visibility) {
console.log("found");
resolve($(selector));
} else {
Ember.run.later(null, function() {
console.log("waiting");
checkVisibility(selector, interval, resolve, visibility);
}, interval);
}