Skip to content
Snippets Groups Projects
Commit 3af8210d authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] remove debug log on github deployment script

[fix] Try to whow titlebar on desktop, when opening a link
parent 4df0c1fb
No related branches found
No related tags found
No related merge requests found
Pipeline #2939 passed
......@@ -66,7 +66,7 @@ case "$1" in
echo " - tag: v$current"
echo " - description: $description"
result=`curl -H ''"$GITHUT_AUTH"'' -i $REPO_URL/releases -d '{"tag_name": "v'"$current"'","target_commitish": "master","name": "'"$current"'","body": "'"$description"'","draft": false,"prerelease": '"$prerelease"'}'`
echo "$result"
#echo "DEBUG - $result"
upload_url=`echo "$result" | grep -P "\"upload_url\": \"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+"`
### Sending files
......
......@@ -340,7 +340,7 @@ angular.module('cesium.http.services', ['cesium.cache.services'])
uri = parts.protocol + uri;
}
// Check if device is enable, on spcial tel: or mailto: protocole
// Check if device is enable, on special tel: or mailto: protocole
var validProtocol = (parts.protocol == 'mailto:' || parts.protocol == 'tel:') && Device.enable;
if (!validProtocol) {
if (options.onError && typeof options.onError == 'function') {
......@@ -352,15 +352,22 @@ angular.module('cesium.http.services', ['cesium.cache.services'])
// Note: If device enable, then target=_system will use InAppBrowser cordova plugin
var openTarget = (options.target || (Device.enable ? '_system' : '_blank'));
var openOptions;
// If desktop, should always open in new window (no tabs)
if (openTarget == '_blank' && Device.isDesktop() && $window.screen && $window.screen.width && $window.screen.height) {
openOptions= "width={0},height={1},location=1,menubar=1,toolbar=1,resizable=1,scrollbars=1".format($window.screen.width/2, $window.screen.height/2);
var openOptions;
if (openTarget == '_blank' && Device.isDesktop()) {
openOptions= "location=1,titlebar=1,status=1,menubar=1,toolbar=1,resizable=1,scrollbars=1";
// Add width/height
if ($window.screen && $window.screen.width && $window.screen.height) {
openOptions += ",width={0},height={1}".format(Math.trunc($window.screen.width/2), Math.trunc($window.screen.height/2));
}
}
var win = $window.open(uri,
openTarget,
openOptions);
if (openOptions) {
// Center the opened window
if (openOptions && $window.screen && $window.screen.width && $window.screen.height) {
win.moveTo($window.screen.width/2/2, $window.screen.height/2/2);
win.focus();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment