mirror of
https://github.com/documize/community.git
synced 2025-08-08 06:55:28 +02:00
Clean up helpers
This commit is contained in:
parent
99e4057fad
commit
05bd894d45
3 changed files with 3 additions and 7 deletions
|
@ -4,15 +4,15 @@ const userNotification = Ember.Component.extend({
|
||||||
notifications: [],
|
notifications: [],
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
this.eventBus.subscribe('notifyUser', this, 'notifyHandler');
|
// this.eventBus.subscribe('notifyUser', this, 'notifyHandler');
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
this.eventBus.unsubscribe('notifyUser');
|
// this.eventBus.unsubscribe('notifyUser');
|
||||||
},
|
},
|
||||||
|
|
||||||
showNotification(msg) {
|
showNotification(msg) {
|
||||||
return msg;
|
// return msg;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,11 +6,9 @@ function isVisible(selector) {
|
||||||
|
|
||||||
function checkVisibility(selector, interval, resolve, visibility) {
|
function checkVisibility(selector, interval, resolve, visibility) {
|
||||||
if (isVisible(selector) === visibility) {
|
if (isVisible(selector) === visibility) {
|
||||||
console.log("found in appear");
|
|
||||||
resolve($(selector));
|
resolve($(selector));
|
||||||
} else {
|
} else {
|
||||||
Ember.run.later(null, function() {
|
Ember.run.later(null, function() {
|
||||||
console.log("waiting in appear");
|
|
||||||
checkVisibility(selector, interval, resolve, visibility);
|
checkVisibility(selector, interval, resolve, visibility);
|
||||||
}, interval);
|
}, interval);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,9 @@ function isVisible(selector) {
|
||||||
|
|
||||||
function checkVisibility(selector, interval, resolve, visibility) {
|
function checkVisibility(selector, interval, resolve, visibility) {
|
||||||
if (isVisible(selector) === visibility) {
|
if (isVisible(selector) === visibility) {
|
||||||
console.log("found");
|
|
||||||
resolve($(selector));
|
resolve($(selector));
|
||||||
} else {
|
} else {
|
||||||
Ember.run.later(null, function() {
|
Ember.run.later(null, function() {
|
||||||
console.log("waiting");
|
|
||||||
checkVisibility(selector, interval, resolve, visibility);
|
checkVisibility(selector, interval, resolve, visibility);
|
||||||
}, interval);
|
}, interval);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue