Compare commits
4 Commits
fcy/QB-520
...
0.82.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed50a8f3d3 | ||
|
|
cca315efbb | ||
|
|
c888dd9fe4 | ||
|
|
467948a46c |
@@ -24,7 +24,8 @@ gulp.task('qext', function () {
|
||||
repository: pkg.repository,
|
||||
dependencies: {
|
||||
'qlik-sense': '>=5.5.x'
|
||||
}
|
||||
},
|
||||
__next: true
|
||||
};
|
||||
if (pkg.contributors) {
|
||||
qext.contributors = pkg.contributors;
|
||||
|
||||
18
src/index.js
18
src/index.js
@@ -12,7 +12,7 @@ if (!window._babelPolyfill) {
|
||||
require("@babel/polyfill"); // eslint-disable-line global-require
|
||||
}
|
||||
|
||||
export default {
|
||||
export default ({ flags }) => ({
|
||||
design: {
|
||||
dimensions: {
|
||||
max: 1,
|
||||
@@ -104,12 +104,22 @@ export default {
|
||||
);
|
||||
return snapshotLayout;
|
||||
},
|
||||
getContextMenu (obj, menu) {
|
||||
async getContextMenu (obj, menu) {
|
||||
if (!this.$scope.layout.allowexportxls) {
|
||||
return menu;
|
||||
}
|
||||
|
||||
if (this.backendApi.model.layout.qMeta.privileges.indexOf('exportdata') !== -1) {
|
||||
const app = this.backendApi.model.app;
|
||||
const isPersonalResult = await app.global.isPersonalMode();
|
||||
|
||||
// Export as XLS option is removed from desktop because the desktop wrapper blocks downloads.
|
||||
// Enabled for windows and QCS
|
||||
// isPersonalMode returns true for both desktop and QCS
|
||||
// By checking both if has download dialog and if is QCS can enable Export as XLS option on QCS
|
||||
if (
|
||||
(this.backendApi.model.layout.qMeta.privileges.includes('exportdata') && !isPersonalResult) ||
|
||||
(flags.isEnabled('DOWNLOAD_USE_REPORTING') && isPersonalResult)
|
||||
) {
|
||||
menu.addItem({
|
||||
translation: 'Export as XLS',
|
||||
tid: 'export-excel',
|
||||
@@ -127,4 +137,4 @@ export default {
|
||||
return menu;
|
||||
},
|
||||
version: 1.0
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user