Created
February 15, 2016 15:35
-
-
Save marcsolanadal/2b5c2039382ee095261b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showLicenseConditions: function (firstAcc) { | |
var self = this; | |
Hybreed.UI.showSpinner(); | |
if (firstAcc) { | |
navigator.silkUA.checkUserAgreement(this.language, function (res) { | |
console.log('<Controller.js> language: ' + res); | |
Hybreed.UI.hideSpinner(); | |
Broker.reqres.request("dbManager:setFirstAccess", {firstAccess: 0}) | |
.then(function () { | |
Hybreed.UI.hideSpinner(); | |
self.showLoginView(); | |
}); | |
}, function (err) { | |
console.log(err); | |
}); | |
} else { | |
navigator.silkUA.showUserAgreement(this.language, function(html) { | |
console.log(html); | |
var wnd = window.open("about:blank","_blank","directories=no,status=no,menubar=no,scrollbars=no,resizable=no,EnableViewPortScale=yes"); | |
wnd.addEventListener("loadstop", function(res) { | |
console.log(res); | |
alert("Before write"); | |
wnd.executeScript({ code: 'document.write(' + html + ');' }); | |
alert("after write"); | |
Hybreed.UI.hideSpinner(); | |
}); | |
}, function(err) { | |
console.log(err); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment