mirror of
https://github.com/documize/community.git
synced 2025-08-08 06:55:28 +02:00
popup blocker detection code
This commit is contained in:
parent
434358088d
commit
d74a56aac1
2 changed files with 18 additions and 3 deletions
|
@ -34,6 +34,10 @@ export default Ember.Component.extend(NotifierMixin, {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.set("sections", sections);
|
this.set("sections", sections);
|
||||||
|
|
||||||
|
if (this.session.get('popupBlocked')) {
|
||||||
|
this.showNotification("Hmm, looks like your browser is blocking popups...");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
|
@ -55,6 +59,8 @@ export default Ember.Component.extend(NotifierMixin, {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.audit.record('added section' + section.contentType);
|
||||||
|
|
||||||
this.attrs.onAction(title, contentType);
|
this.attrs.onAction(title, contentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
// Copyright 2016 Documize Inc. <legal@documize.com>. All rights reserved.
|
||||||
//
|
//
|
||||||
// This software (Documize Community Edition) is licensed under
|
// This software (Documize Community Edition) is licensed under
|
||||||
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html
|
||||||
//
|
//
|
||||||
// You can operate outside the AGPL restrictions by purchasing
|
// You can operate outside the AGPL restrictions by purchasing
|
||||||
// Documize Enterprise Edition and obtaining a commercial license
|
// Documize Enterprise Edition and obtaining a commercial license
|
||||||
// by contacting <sales@documize.com>.
|
// by contacting <sales@documize.com>.
|
||||||
//
|
//
|
||||||
// https://documize.com
|
// https://documize.com
|
||||||
|
|
||||||
|
@ -183,6 +183,15 @@ export default Ember.Service.extend({
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var blockedPopupTest = window.open("http://d27wjpa4h6c9yx.cloudfront.net/", "directories=no,height=1,width=1,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,top=0,location=no");
|
||||||
|
|
||||||
|
if (!blockedPopupTest) {
|
||||||
|
this.set('popupBlocked', true);
|
||||||
|
} else {
|
||||||
|
blockedPopupTest.close();
|
||||||
|
this.set('popupBlocked', false);
|
||||||
|
}
|
||||||
|
|
||||||
return new Ember.RSVP.Promise(function(resolve) {
|
return new Ember.RSVP.Promise(function(resolve) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: self.get('appMeta').getUrl("public/meta"),
|
url: self.get('appMeta').getUrl("public/meta"),
|
||||||
|
@ -230,4 +239,4 @@ export default Ember.Service.extend({
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue