mirror of
https://github.com/documize/community.git
synced 2025-08-07 06:25:23 +02:00
v12.1 Trello redirect no more popups
This commit is contained in:
parent
2c526ed304
commit
77849d175f
4 changed files with 23 additions and 14 deletions
|
@ -35,9 +35,9 @@ export default Ember.Component.extend(NotifierMixin, {
|
|||
|
||||
this.set("sections", sections);
|
||||
|
||||
if (this.session.get('popupBlocked')) {
|
||||
this.showNotification("Hmm, looks like your browser is blocking popups...");
|
||||
}
|
||||
// if (this.session.get('popupBlocked')) {
|
||||
// this.showNotification("Hmm, looks like your browser is blocking popups...");
|
||||
// }
|
||||
},
|
||||
|
||||
onCancel() {
|
||||
|
|
|
@ -55,6 +55,15 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
|||
|
||||
this.set('config', config);
|
||||
|
||||
// On auth callback capture user token
|
||||
let hashToken = window.location.hash;
|
||||
if (is.not.undefined(hashToken) && is.not.null(hashToken)) {
|
||||
let token = hashToken.replace("#token=", "");
|
||||
if (is.not.empty(token)) {
|
||||
this.set('config.token', token);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.get('config.appKey') !== "" && this.get('config.token') !== "") {
|
||||
this.send('auth');
|
||||
}
|
||||
|
@ -148,8 +157,8 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
|
|||
|
||||
Ember.$.getScript("https://api.trello.com/1/client.js?key=" + this.get('config.appKey'), function() {
|
||||
Trello.authorize({
|
||||
type: "popup",
|
||||
// interactive: false,
|
||||
type: "redirect",
|
||||
interactive: true,
|
||||
name: "Documize",
|
||||
scope: {
|
||||
read: true,
|
||||
|
|
|
@ -183,14 +183,14 @@ 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);
|
||||
}
|
||||
// var blockedPopupTest = window.open("http://maintenance.documize.com", "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) {
|
||||
$.ajax({
|
||||
|
|
|
@ -30,7 +30,7 @@ const (
|
|||
// AppVersion does what it says
|
||||
// Versioning scheme major.minor where "minor" is optional
|
||||
// e.g. 1, 2, 3, 4.1, 4.2, 5, 6, 7, 7.1, 8, 9, 10, ..... 127, 127.1, 128
|
||||
AppVersion = "12"
|
||||
AppVersion = "12.1"
|
||||
)
|
||||
|
||||
var port, certFile, keyFile, forcePort2SSL string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue