1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-10 07:55:25 +02:00

v12.1 Trello redirect no more popups

This commit is contained in:
Harvey Kandola 2016-05-22 15:47:00 -07:00
parent 2c526ed304
commit 77849d175f
4 changed files with 23 additions and 14 deletions

View file

@ -35,9 +35,9 @@ export default Ember.Component.extend(NotifierMixin, {
this.set("sections", sections); this.set("sections", sections);
if (this.session.get('popupBlocked')) { // if (this.session.get('popupBlocked')) {
this.showNotification("Hmm, looks like your browser is blocking popups..."); // this.showNotification("Hmm, looks like your browser is blocking popups...");
} // }
}, },
onCancel() { onCancel() {

View file

@ -55,6 +55,15 @@ export default Ember.Component.extend(SectionMixin, NotifierMixin, TooltipMixin,
this.set('config', config); 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') !== "") { if (this.get('config.appKey') !== "" && this.get('config.token') !== "") {
this.send('auth'); 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() { Ember.$.getScript("https://api.trello.com/1/client.js?key=" + this.get('config.appKey'), function() {
Trello.authorize({ Trello.authorize({
type: "popup", type: "redirect",
// interactive: false, interactive: true,
name: "Documize", name: "Documize",
scope: { scope: {
read: true, read: true,

View file

@ -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"); // 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) { // if (!blockedPopupTest) {
this.set('popupBlocked', true); // this.set('popupBlocked', true);
} else { // } else {
blockedPopupTest.close(); // blockedPopupTest.close();
this.set('popupBlocked', false); // this.set('popupBlocked', false);
} // }
return new Ember.RSVP.Promise(function(resolve) { return new Ember.RSVP.Promise(function(resolve) {
$.ajax({ $.ajax({

View file

@ -30,7 +30,7 @@ const (
// AppVersion does what it says // AppVersion does what it says
// Versioning scheme major.minor where "minor" is optional // 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 // 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 var port, certFile, keyFile, forcePort2SSL string