Skip to content

Commit

Permalink
bug-fixes for "Open URL" action
Browse files Browse the repository at this point in the history
  • Loading branch information
djaskowiak committed Sep 20, 2021
1 parent b84371f commit 3f7aaa2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var DIST = './dist';

/* true = directy distribute to extension folder in QS, false = just distribute to dist */
var toQlikFolder = true;
var VERSION = process.env.VERSION || '0.1.8';
var VERSION = process.env.VERSION || '0.1.9';

function copyExtFiles() {
return gulp.src('./dist/*').pipe(gulp.dest(`${pkg.qlikshare}/StaticContent/Extensions/${pkg.name}`));
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "advanced-kpi",
"version": "0.1.8",
"version": "0.1.9",
"description": "Advanced-KPI is about creating a smart KPI object that fits to 90% of the needs of Qlik Sense users.",
"homepage": "",
"repository": "https://github.com/djaskowiak/advanced-kpi",
Expand Down
8 changes: 4 additions & 4 deletions src/definition.js
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ define(['qlik'], function (qlik, utils) {
expression: "optional",
defaultValue: "Headline text",
show: function (data) {
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch) { return true; }
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch || data.prop.actions.url.switch) { return true; }
}
};

Expand All @@ -1590,7 +1590,7 @@ define(['qlik'], function (qlik, utils) {
expression: "optional",
defaultValue: "Subline text",
show: function (data) {
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch) { return true; }
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch || data.prop.actions.url.switch) { return true; }
}
};

Expand Down Expand Up @@ -1990,7 +1990,7 @@ define(['qlik'], function (qlik, utils) {
label: 'If an action is set you can type in a head- and a subline to describe what is going to happen after clicking on the object.',
component: 'text',
show: function (data) {
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch) { return true; }
if (data.prop.actions.variable.switch || data.prop.actions.jump.switch || data.prop.actions.bookmark.switch || data.prop.actions.url.switch) { return true; }
}
}
}
Expand Down Expand Up @@ -2039,7 +2039,7 @@ define(['qlik'], function (qlik, utils) {
component: 'text'
},
paragraph3: {
label: 'Version: 0.1.8',
label: 'Version: 0.1.9',
component: 'text'
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default {

//Actions
try {
if (!this.$scope.isInEdit && (layout.prop.actions.jump.switch || layout.prop.actions.variable.switch || layout.prop.actions.bookmark.switch)) {
if (!this.$scope.isInEdit && (layout.prop.actions.jump.switch || layout.prop.actions.variable.switch || layout.prop.actions.bookmark.switch || layout.prop.actions.url.switch)) {
layout.prop.actions.hover = true;
//eventlistener for Actions
$element.find('.adv-kpi-overlay').on("click", function () {
Expand All @@ -92,12 +92,12 @@ export default {
}
//open URL
if (layout.prop.actions.url.switch) {
if(layout.prop.actions.url.newtabset) {
window.open(layout.prop.actions.url.set,'_blank');
if (layout.prop.actions.url.newtabset) {
window.open(layout.prop.actions.url.set, '_blank');
} else {
window.open(layout.prop.actions.url.set,'_self');
}
}
window.open(layout.prop.actions.url.set, '_self');
}
}
});
} else {
layout.prop.actions.hover = false;
Expand Down

0 comments on commit 3f7aaa2

Please sign in to comment.