1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- define(['bi/content_apps/authoring/OutputHandler', 'bi/authoring/utils/rsCommon', 'bi/authoring/utils/rsOpenHelper'], function (OutputHandler, rsCommon, rsOpenHelper) {
- 'use strict';
- var _HANDLED_FORMATS = ['HTML', 'PDF'];
- function f_getType(options)
- {
- var v_sType;
- if (options.report) {
- if (options.report.base) {
- v_sType = options.report.base[0] ? options.report.base[0].type : options.report.base.type;
- }
- else {
- v_sType = options.report.type;
- }
- }
- return v_sType;
- }
- var ViewOutputHandler = OutputHandler.extend({
- getPriority: function() {
-
- return 25;
- },
-
- canExecute: function(options) {
- var v_sFormat = options.output.format;
- var v_sType = f_getType( options );
- return (_HANDLED_FORMATS.indexOf(v_sFormat) !== -1 || v_sType == 'interactiveReport');
- },
-
- execute: function(options) {
-
- rsOpenHelper.openView( {
- cmProperties: {
- id: options.output.id,
- type: "output" },
- glassContext: options.glassContext
- } );
- }
- });
- return ViewOutputHandler;
- });
|