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:
parent
99e4057fad
commit
05bd894d45
3 changed files with 3 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue