/* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Viewer *| (C) Copyright IBM Corp. 2014 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: Viewer *| (C) Copyright IBM Corp. 2013 *| *| US Government Users Restricted Rights - Use, duplication or *| disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *| *+------------------------------------------------------------------------+ */ if (!RV_RES) { var RV_RES = {}; } RV_RES.RV_BROWSER_POPUP_IS_ENABLED = "Your software to block pop-up windows is enabled. Change the settings in your web browser to allow pop-up windows from this website to be displayed."; RV_RES.RV_RUNNING = "Your report is running."; RV_RES.RV_PLEASE_WAIT = "Please wait..."; RV_RES.CANCEL = "Cancel"; RV_RES.IDS_JS_OK = "OK"; RV_RES.IDS_JS_RETRY = "Retry"; RV_RES.IDS_JS_DETAILS = "Details"; RV_RES.RV_BUSY_OPTIONS_SELECTED = "Instead of waiting, you can set it to run in the background with one of the following delivery options:"; RV_RES.RV_BUSY_OPTIONS_UNSELECTED = "Instead of waiting, you can select a delivery method to run the report in the background."; RV_RES.RV_BUSY_OPTIONS_LINK = "Select a delivery method."; RV_RES.PRINT_AS_PDF = "Print as PDF"; RV_RES.COPY = "Copy Widget"; RV_RES.CUT = "Cut Widget"; RV_RES.IDS_PRINT_AS_PDF = "Print as PDF"; RV_RES.RV_EMAIL_REPORT = "Email Report..."; RV_RES.IDS_JS_EMAIL_REPORT_IFRAME_TITLE = "Set the email options dialog"; RV_RES.RV_SAVE_REPORT = "Save Report"; RV_RES.RV_SAVE_AS_REPORT_VIEW = "Save as Report View..."; RV_RES.IDS_JS_SAVE_AS_REPORT_VIEW_IFRAME_TITLE = "Save as report view dialog"; RV_RES.RV_RUN = "Run Report"; RV_RES.RV_VIEW = "View"; RV_RES.RV_VIEW_HTML = "View in HTML Format"; RV_RES.RV_VIEW_PDF = "View in PDF Format"; RV_RES.RV_VIEW_CSV = "View in CSV Format"; RV_RES.RV_PDF = "PDF"; RV_RES.RV_CSV = "CSV"; RV_RES.RV_XML = "XML"; RV_RES.RV_EXCEL_2000 = "Excel 2000"; RV_RES.RV_EXCEL_2000SF = "Excel 2000 Single Sheet"; RV_RES.RV_EXCEL_2002 = "Excel 2002"; RV_RES.RV_EXCEL_2007 = "Excel 2007"; RV_RES.RV_EXCEL_2007_DATA = "Excel 2007 Data"; RV_RES.RV_VIEW_OPTIONS = "View in Excel Options"; RV_RES.RV_VIEW_EXCEL = "View in Excel 2000 Format"; RV_RES.RV_VIEW_XML = "View in XML Format"; RV_RES.RV_VIEW_XLWA = "View in Excel 2002 Format"; RV_RES.RV_VIEW_SINGLE_EXCEL = "View in Excel 2000 Single Sheet Format"; RV_RES.RV_VIEW_SPREADSHEETML = "View in Excel 2007 Format"; RV_RES.RV_VIEW_SPREADSHEETML_DATA = "View in Excel 2007 Data"; RV_RES.RV_PREVIOUS_REPORT = "Previous Report"; RV_RES.RV_DRILL_UP = "Drill Up"; RV_RES.RV_DRILL_DOWN = "Drill Down"; RV_RES.RV_DRILL_DEFAULT = "Default"; RV_RES.RV_NEW = "New"; RV_RES.RV_GO_TO = "Go To"; RV_RES.RV_MORE = "Related Links..."; RV_RES.RV_SEARCH = "Search..."; RV_RES.RV_DOWNLOAD_CHART = "Download Chart"; RV_RES.RV_ALERT_NEW_VERSION = "Alert Me About New Versions"; RV_RES.RV_DO_NOT_ALERT_NEW_VERSION = "Do Not Alert Me About New Versions"; RV_RES.RV_DO_NOT_ALERT_NEW_VERSION_CONFIRM = "You will no longer be alerted when new versions of this report become available."; RV_RES.RV_NEW_WATCH_RULE = "Alert Using New Watch Rule..."; RV_RES.RV_NO_WATCH_RULES = "No entries"; RV_RES.RV_MODIFY_WATCH_RULE = "Modify..."; RV_RES.RV_DELETE_WATCH_RULE = "Delete"; RV_RES.RV_CONFIRM_DELETE_WATCH_RULE = "Are you sure you want to delete this entry?"; RV_RES.GOTO_LOADING = "Loading..."; RV_RES.GOTO_WORKING = "Working."; RV_RES.IDS_JS_ADD_TO_MY_FOLDERS_IFRAME_TITLE = "Add to My Folders dialog"; RV_RES.RV_VIEW_RECENT_REPORT = "View the most recent report"; RV_RES.RV_RUN_REPORT = "Run the report"; RV_RES.RV_VIEW_REPORT = "View the report version"; RV_RES.RV_NEW_COMMENT = "Add a comment..."; RV_RES.RV_VIEW_COMMENT_NAME = "Name:"; RV_RES.RV_VIEW_COMMENT_CONTENTS = "Comment:"; RV_RES.RV_VIEW_COMMENT_MODTIME = "Modification Time:"; RV_RES.RV_VIEW_COMMENT_OWNER = "Owner:"; RV_RES.RV_VIEW_COMMENT = "View"; RV_RES.RV_ABOUT_DESCRIPTION = "About IBM Cognos Viewer"; RV_RES.RV_LINEAGE = "Lineage"; RV_RES.RV_GLOSSARY = "Glossary"; RV_RES.IDS_JS_CALCULATE = "Calculate"; RV_RES.IDS_JS_CALCULATION = "Calculation"; RV_RES.IDS_JS_CALCULATE_PERCENT_DIFFERENCE = "% Difference"; RV_RES.IDS_JS_CALCULATE_NUMBER = "number"; RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_TITLE = "Enter the number"; RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER_DESCRIPTION = "Specify the number to use in the calculation '{0}'"; RV_RES.IDS_JS_CALCULATE_ENTER_NUMBER = "Number:"; RV_RES.IDS_JS_SORT = "Sort"; RV_RES.IDS_JS_DONT_SORT = "Don't Sort"; RV_RES.IDS_JS_NOT_SORTED = "Not Sorted"; RV_RES.IDS_JS_SORT_ASCENDING = "Sort Ascending"; RV_RES.IDS_JS_SORT_DESCENDING = "Sort Descending"; RV_RES.IDS_JS_SORT_BY_ASCENDING = "Ascending"; RV_RES.IDS_JS_SORT_BY_DESCENDING = "Descending"; RV_RES.IDS_JS_SORT_BY_LABEL = "Sort By Label"; RV_RES.IDS_JS_SORT_BY_VALUE = "Sort By Value"; RV_RES.IDS_JS_SORT_APPLIED = "Sort applied"; RV_RES.IDS_JS_SORTED_BY_LABEL = "Sorted by label"; RV_RES.IDS_JS_SORTED_BY_VALUE = "Sorted by value"; RV_RES.IDS_JS_SORT_ASCENDING_ORDER = "ascending"; RV_RES.IDS_JS_SORT_DESCENDING_ORDER = "descending"; RV_RES.IDS_JS_FILTER = "Filter"; RV_RES.IDS_JS_REMOVE_FILTER = "Remove Filter"; RV_RES.IDS_JS_FILTER_INCLUDE = "Include {0}"; RV_RES.IDS_JS_FILTER_EXCLUDE = "Exclude {0}"; RV_RES.IDS_JS_FILTER_GREATER_THAN = ">"; RV_RES.IDS_JS_FILTER_LESS_THAN = "<"; RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL = "≥"; RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL = "≤"; RV_RES.IDS_JS_FILTER_BETWEEN = "Between {0} and {1}"; RV_RES.IDS_JS_FILTER_NOT_BETWEEN = "Not between {0} and {1}"; RV_RES.IDS_JS_FILTER_ENDS_WITH = "ends with"; RV_RES.IDS_JS_FILTER_BEGINS_WITH = "starts with"; RV_RES.IDS_JS_FILTER_CONTAINS = "contains"; RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER = "matches SQL pattern"; RV_RES.IDS_JS_FILTER_IS_NOT = "not"; RV_RES.IDS_JS_FILTER_APPLIED = "Filter applied"; RV_RES.IDS_JS_REMOVE_FILTER_FOR = "Remove filter for"; RV_RES.IDS_JS_REMOVE_ALL_FILTERS = "Remove all filters"; RV_RES.IDS_JS_REMOVE_ALL_FILTERS_FOR_WIDGET = "Remove all filters for this widget"; RV_RES.IDS_JS_DELETE = "Delete"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE = "Change Display Type"; RV_RES.IDS_JS_ANNOTATIONS = "Comments"; RV_RES.IDS_JS_ANNOTATION = "Comment"; RV_RES.IDS_JS_ANNOTATION_WIDGET = "Comment Widget"; RV_RES.IDS_JS_ANNOTATION_NEW = "Add"; RV_RES.IDS_JS_ANNOTATION_EDIT = "Edit Last"; RV_RES.IDS_JS_ANNOTATION_DELETE = "Delete Last"; RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW = "Add"; RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT = "Edit Last"; RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE = "Delete Last"; RV_RES.IDS_JS_GROUP_UNGROUP = "Group / Ungroup"; RV_RES.IDS_JS_SWAP_ROWS_AND_COLUMNS = "Swap Rows and Columns"; RV_RES.IDS_JS_MODAL_BACK_IFRAME = "Empty frame"; RV_RES.IDS_JS_EMPTY_CELL = "Empty cell"; RV_RES.IDS_JS_NO_ENABLED_MENU_ITEMS = "No active links in the opened menu."; RV_RES.IDS_JS_CHANGE_PALETTE = "Change Color Palette"; RV_RES.IDS_JS_SELECTION_FILTER_SWITCH = "Turn on Master filter"; RV_RES.IDS_JS_SELECTION_FILTER_SWITCH_DISABLE = "Turn off Master filter"; RV_RES.IDS_JS_UNDO = "Undo"; RV_RES.IDS_JS_REDO = "Redo"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_BAR = "Bar Chart"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_COLUMN = "Column Chart"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LINE = "Line Chart"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_PIE = "Pie Chart"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_CROSSTAB = "Crosstab"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_LIST = "List Table"; RV_RES.IDS_JS_CHANGE_DISPLAY_TYPE_MORE = "More..."; RV_RES.IDS_JS_CHANGE_DISPLAY_RECOMMENDED = "Recommended"; RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT = "includes {0}"; RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT = "excludes {0}"; RV_RES.IDS_JS_INFOBAR_AND_TEXT = "and"; RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT = "between {0} and {1}"; RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT = "not between {0} and {1}"; RV_RES.IDS_JS_INFOBAR_EXPAND = "Expand"; RV_RES.IDS_JS_INFOBAR_COLLAPSE = "Collapse"; RV_RES.IDS_JS_INFOBAR_ITEM_COUNT = "{0} of {1}"; RV_RES.IDS_JS_INFOBAR_EXPLANATION = "Use the up and down arrow keys to review the filters and sorts applied to the report. You can remove sorts and filters with the delete key."; RV_RES.IDS_JS_INFOBAR_LOCKED = "cannot be deleted"; RV_RES.IDS_JS_INFOBAR_PROMPT = "Prompt details"; RV_RES.IDS_JS_INFOBAR_SLIDER = "Slider filter"; RV_RES.IDS_JS_ANNO_INFOBAR_SHOW = "Show"; RV_RES.IDS_JS_ANNO_INFOBAR_HIDE = "Hide"; RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION = "Filter was applied. Hit tab to focus show/hide button."; RV_RES.IDS_JS_COMMENT_DLG_TITLE = "Add Comment"; RV_RES.IDS_JS_COMMENT_DLG_MESSAGE = "Do you want to save this workspace?"; RV_RES.IDS_JS_COMMENT_DLG_DETAILS = "You must save the workspace to add comments."; RV_RES.IDS_JS_CHANGE_DISPLAY = "Change Display"; RV_RES.IDS_JS_CHANGE_DISPLAY_SELECT_DATA = "Select data first before changing display"; RV_RES.IDS_JS_ADVANCED_EDITING = "Do More"; RV_RES.IDS_JS_RENAME = "Rename"; RV_RES.IDS_JS_FREEZEROWHEADINGS = "Freeze Row Headings"; RV_RES.IDS_JS_UNFREEZEROWHEADINGS = "Unfreeze Row Headings"; RV_RES.IDS_JS_FREEZECOLUMNHEADINGS = "Freeze Column Headings"; RV_RES.IDS_JS_UNFREEZECOLUMNHEADINGS = "Unfreeze Column Headings"; RV_RES.IDS_JS_EXPAND_MEMBER = "Expand"; RV_RES.IDS_JS_COLLAPSE_MEMBER = "Collapse"; RV_RES.IDS_JS_RENAMED_ITEM = "Renamed item"; RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL = "Original label :"; RV_RES.IDS_JS_MOVE = "Move"; RV_RES.IDS_JS_LEFT = "Left"; RV_RES.IDS_JS_RIGHT = "Right"; RV_RES.IDS_JS_CROSSTAB_CORNER = "Crosstab Corner"; RV_RES.IDS_JS_RENAME_LABEL = "Rename type and text"; RV_RES.IDS_JS_LOADING_EDITING_TOOLS = "Loading additional actions"; RV_RES.IDS_JS_DRILL_DOWN_JAWS = "Drill down available."; RV_RES.IDS_JS_DRILL_UP_JAWS = "Drill up available."; RV_RES.IDS_JS_DRILL_DOWN_UP_JAWS = "Drill down and up available."; RV_RES.IDS_JS_DRILL_THROUGH_JAWS = "Drill through available."; RV_RES.IDS_JS_RESET_TO_ORIGINAL = "Reset"; RV_RES.IDS_JS_WIDGET_PROPERTIES = "Set Properties"; RV_RES.IDS_JS_REPORT_INFO_TITLE = "Info"; RV_RES.IDS_JS_REPORT_INFO_TEXT = "A new version of this report is available."; RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT = "Get new version"; RV_RES.IDS_JS_VIEW_ALL_SNAPSHOTS = "More..."; RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_TITLE = "Report Versions"; RV_RES.IDS_JS_SNAPSHOTS_LIVE = "Live"; RV_RES.IDS_JS_SELECT_SNAPSHOT_DIALOG_DESC = "Select a different version of this report."; RV_RES.IDS_JS_MOST_RECENT_SNAPSHOT = "Most Recent"; RV_RES.IDS_JS_LIST_SEPARATOR = ","; RV_RES.IDS_JS_CHART_IMAGE = "Chart image"; RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE = "Maximum number of rows to show per page (maximum: 1000):"; RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR = "This value is out of range."; RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD = "Prompt when workspace is opened (prompted reports only)"; RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON = "Enable expand and collapse controls"; RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT = "Retrieve entire report (saved output only)"; RV_RES.IDS_JS_PROPERTY_DRILL_OPTIONS_LABEL = "Drill options:"; RV_RES.IDS_JS_PROPERTY_ADD_SUMMARY_MEMBERS = "Add summary members"; RV_RES.IDS_JS_PROPERTY_BACKWARDS_COMPATIBLE = "Backwards compatible"; RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION = "Location:"; RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE = "Unavailable"; RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION = "Output Version:"; RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE = "Unavailable"; RV_RES.IDS_JS_CALCULATION_SELECT_DATA = "Select data first before calculating"; RV_RES.IDS_JS_PROPERTY_FLASHCHARTS = "Enable chart animation for applicable charts"; RV_RES.IDS_JS_SHOW_REPORT_SPEC = "View report specification"; RV_RES.IDS_JS_ANNOTATION_JAWS = "Comments are available"; RV_RES.IDS_JS_LABEL_HAS_BEEN_RENAMED = "Label has been renamed"; RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING = "Do you want to reset the widget to the most recent available version?"; RV_RES.IDS_JS_RESET_TO_ORIGINAL_WARNING_DESC = "Reset replaces the widget content and any changes are lost."; RV_RES.IDS_JS_CHART_TABLE = "Table"; RV_RES.IDS_JS_CHART_CROSSTAB = "Crosstab"; RV_RES.IDS_JS_CHART_LIST_TABLE = "List Table"; RV_RES.IDS_JS_CHART_COLUMN = "Column"; RV_RES.IDS_JS_CHART_COLUMN_3D = "Column with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_STACKED_COLUMN = "Stacked Column"; RV_RES.IDS_JS_CHART_STACKED_COLUMN_3D = "Stacked Column with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN = "100% Stacked Column"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_COLUMN_3D = "100% Stacked Column with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_3D_AXIS_COLUMN = "3-D Axis Column"; RV_RES.IDS_JS_CHART_BAR = "Bar"; RV_RES.IDS_JS_CHART_BAR_3D = "Bar with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_STACKED_BAR = "Stacked Bar"; RV_RES.IDS_JS_CHART_STACKED_BAR_3D = "Stacked Bar with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR = "100% Stacked Bar"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_BAR_3D = "100% Stacked Bar with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_LINE = "Line"; RV_RES.IDS_JS_CHART_LINE_WITH_MARKERS = "Line with Markers"; RV_RES.IDS_JS_CHART_LINE_3D = "Line with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_LINE_WITH_3D_MARKERS = "Line with 3-D Visual Effect Markers"; RV_RES.IDS_JS_CHART_STEP_LINE_MARKERS = "Step Line with Markers"; RV_RES.IDS_JS_CHART_STEP_LINE = "Step Line"; RV_RES.IDS_JS_CHART_STEP_LINE_3D = "Step Line with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_STACKED_LINE_MARKERS = "Stacked Line with Markers"; RV_RES.IDS_JS_CHART_STACKED_LINE = "Stacked Line"; RV_RES.IDS_JS_CHART_STACKED_LINE_3D = "Stacked Line with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE_MARKERS = "100% Stacked Line with Markers"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE = "100% Stacked Line"; RV_RES.IDS_JS_CHART_PERCENT_STACKED_LINE__3D = "100% Stacked Line with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_3D_AXIS_LINE = "3-D Axis Line"; RV_RES.IDS_JS_CHART_PIE_DONUT = "Pie, Donut"; RV_RES.IDS_JS_CHART_PIE = "Pie"; RV_RES.IDS_JS_CHART_DONUT = "Donut"; RV_RES.IDS_JS_CHART_PIE_3D = "Pie with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_DONUT_3D = "Donut with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_AREA = "Area"; RV_RES.IDS_JS_CHART_AREA_3D = "Area with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_STACKED_AREA = "Stacked Area"; RV_RES.IDS_JS_CHART_STACKED_AREA_3D = "Stacked Area with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_PERCENT_AREA = "100% Stacked Area"; RV_RES.IDS_JS_CHART_PERCENT_AREA_3D = "100% Stacked Area with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_3D_AXIS_AREA = "3-D Axis Area"; RV_RES.IDS_JS_CHART_SCATTER_BUBBLE_POINT = "Scatter, Bubble, Point"; RV_RES.IDS_JS_CHART_SCATTER = "Scatter"; RV_RES.IDS_JS_CHART_BUBBLE = "Bubble"; RV_RES.IDS_JS_CHART_BUBBLE_3D = "Bubble with 3-D Visual Effect"; RV_RES.IDS_JS_CHART_BUBBLE_WITH_EXCEL_BUBBLE_SIZING = "Bubble with Excel Bubble Sizing"; RV_RES.IDS_JS_CHART_POINT = "Point"; RV_RES.IDS_JS_CHART_POINT_3D = "Point with 3-D Markers"; RV_RES.IDS_JS_CHART_3D_SCATTER = "3-D Scatter"; RV_RES.IDS_JS_CHART_GAUGE = "Gauge"; RV_RES.IDS_JS_CHART_DIAL_GAUGE = "Dial Gauge"; RV_RES.IDS_BROWSER_SUPPORT_ERROR = "The content cannot be displayed in the current web browser. Try using another web browser."; RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR = "The content cannot be saved. You do not have sufficient privileges."; RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR = "Cannot load annotations. The widget or workspace was deleted after this workspace was opened."; RV_RES.IDS_JS_NULL = "Null"; RV_RES.IDS_JS_GLOBAL_PROMPTS_NOT_RESPONDING_WARNING = "To prevent unexpected results, this widget is not currently responding to prompts.\n\nSet the prompts you want this widget to respond to using the Listen for Widget Events."; RV_RES.IDS_JS_WAIT_PAGE_LOADING = "Loading..."; RV_RES.IDS_JS_ERROR = "Error"; RV_RES.IDS_JS_READY = "Ready"; RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Report"; RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE = "Active Report"; RV_RES.IDS_CONV_CANCELED_ERROR = "Cannot complete your request."; RV_RES.IDS_JS_CLIPBOARD = "Clipboard"; RV_RES.IDS_JS_NO_SAVED_OUTPUTS = "There are no available saved report output versions."; RV_RES.UNAVAILABLE = "Unavailable"; RV_RES.IDS_PROP_LEGAL = "Licensed Materials - Property of IBM Corp. © Copyright IBM Corporation and other(s) 2001, 2016. IBM, the IBM logo, ibm.com and Cognos are trademarks or registered trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. A current list of IBM trademarks is available on the Web at www.ibm.com/legal/copytrade.shtml. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates. Other product and service names might be trademarks of IBM or other companies. This Program is licensed under the terms of the license agreement accompanying the Program. This license agreement may be either located in a Program directory folder or library identified as \"License\" or \"Non_IBM_License\", if applicable, or provided as a printed license agreement. Please read the agreement carefully before using the Program. By using the Program you agree to these terms."; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TITLE = "Business Processes"; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_DESC = "Select a process:"; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_TABLE_HEADER = "Process"; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_START_BUTTON_LABEL = "Start"; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS = "None"; RV_RES.IDS_JS_BUSINESS_PROCESS_SELECT_DIALOG_NO_PROCESS_A11Y = "No process is available"; RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_LINK_LABEL = "View input values"; RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_DESCRIPTION = "Input values:"; RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DATA_ITEM = "Data item"; RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_COLUMN_HEADER_DISPLAY_VALUE_HEADER = "Display value"; RV_RES.IDS_JS_BUSINESS_PROCESS_VIEW_INPUT_VALUES_TABLE_NO_INPUT_VALUE_MSG = "No input value selected"; RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_FAILED_MSG = "The process, {0}, failed to start."; RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG = "The process, {0}, started successfully."; RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_DETAIL = "To view the status of the process, open your business process application."; RV_RES.IDS_JS_BUSINESS_PROCESS_GET_PROCESSES_FAIL_MSG = "An error had occured while trying to get processes."; RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_SUCCEED_MSG_TITLE = "Start process"; RV_RES.IDS_JS_BUSINESS_PROCESS_START_PROCESS_A11Y_DESC_VALUE = "value"; RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_WITH_NO_BUA = "Some data referenced in the report no longer exists. Contact the report author."; RV_RES.IDS_JS_MISSING_MEMBER_ERROR_MSG_FOR_SPEC_PARAM = "Some data referenced in the report no longer exists. The affected report areas are report specification and parameter value. Click Edit to update the referenced data now. You can also click Close to dismiss this message."; RV_RES.IDS_JS_EDIT = "Edit"; RV_RES.IDS_JS_CLOSE = "Close"; RV_RES.IDS_JS_ERROR_INVALID_INT = "Page number provided is not a positive integer."; RV_RES.IDS_JS_ERROR_REPORT_NOT_COMPLETE = "Report status is not complete."; RV_RES.IDS_JS_ERROR_INVALID_PAGE_RANGE = "Page range is invalid."; RV_RES.IDS_JS_CWA_DIALOG_TITLE = "Report - Design"; RV_RES.IDS_JS_SAVE_AS_FDG_TITLE = "Save As"; RV_RES.IDS_JS_SELECTION_FILTER_INFO_JAWS = "Filter applied to related widgets."; RV_RES.IDS_JS_A11Y_DYNAMIC_MENU = "Dynamic menu"; function CViewerHelper(){ this.m_oCV=null; }; CViewerHelper.prototype.getCVObjectRef=function(){ return this.getCV().getObjectId(); }; CViewerHelper.prototype.getCV=function(){ if(this.m_oCV){ return this.m_oCV; } return window; }; CViewerHelper.prototype.getCVId=function(){ var _1=""; if(this.m_oCV){ _1=this.m_oCV.getId(); } return _1; }; CViewerHelper.prototype.setCV=function(_2){ this.m_oCV=_2; }; function CObserver(_3){ this.m_subject=_3; this.m_observers=[]; }; function CObserver_attach(_4,_5,_6){ if(_4==null||typeof _4.update!="function"){ alert("Notification Frame Work Error : attach failed"); return false; } var _7=new CState(this.m_subject,_4,_5?_5:null,_6?_6:null); this.m_observers[this.m_observers.length]=_7; return true; }; function CObserver_detach(_8){ }; function CObserver_hasObserver(_9){ var _a=false; for(var _b=0;_b","gi"); if(!_ac.test(s)){ alert("invalid XML "+_ab.getName()+"\n"+s); return null; } return XMLParser(s.replace(RegExp.lastMatch,""),_ab.parentNode); }else{ var _ad=/^\s*<([\w:\-_\.]+)/; if(_ad.test(s)){ var _ae=RegExp.$1; var e=new XMLElement(_ae,_ab); var _b0=new RegExp("^<"+_ae+"[^>]*>"); s=s.replace(_b0,""); var _b1=RegExp.lastMatch; var _b2=/([\w:\-_\.]+)="([^"]*)"/gi; var _b3=_b1.match(_b2); if(_b3!=null){ for(var i=0;i<_b3.length;i++){ var _b5=_b3[i]; (/([\w:\-_\.]+)\s*=\s*"(.*)"/).test(_b5); e.setAttribute(RegExp.$1,RegExp.$2); } } if(!(/\/>$/).test(_b1)){ XMLParser(s,e); return e; }else{ XMLParser(s,_ab); return e; } } } }else{ if(s&&_ab){ var _b6=new RegExp("([^<]*)]*>","gi"); _b6.test(s); var _b7=RegExp.$1; _ab.setValue(_b7); return (XMLParser(s.replace(_b7,""),_ab)); } } return null; }; function XMLElement(s,_b9){ this.nodeName=s; this.nodeValue=""; this.attributes=[]; this.childNodes=[]; this.parentNode=_b9; if(this.parentNode){ this.parentNode.appendChild(this); } }; XMLElement.prototype.appendChild=function(e){ this.childNodes[this.childNodes.length]=e; }; XMLElement.prototype.hasChildNodes=function(){ if(this.childNodes.length>0){ return true; }else{ return false; } }; XMLElement.prototype.findChildByName=function(n,_bc){ if(this.getName()==n){ return (this); } for(var i=0;i"; return s; }; function XMLBuilderLoadXMLFromString(_d0,_d1){ var _d2=null; if(typeof DOMParser!="undefined"){ _d2=new DOMParser().parseFromString(_d0,"application/xml"); }else{ if(typeof ActiveXObject!="undefined"){ try{ _d2=new ActiveXObject("Microsoft.XMLDOM"); _d2.loadXML(_d0); } catch(e){ } } } return _d2; }; function XMLBuilderCreateXMLDocument(_d3,_d4,_d5){ var _d6=null; _d4=_d4||""; _d5=_d5||null; if(document.implementation&&document.implementation.createDocument){ if(typeof _d4=="undefined"){ _d4="http://www.w3.org/2000/xmlns/"; } _d6=document.implementation.createDocument(_d4,_d3,_d5); }else{ if(typeof ActiveXObject!="undefined"){ try{ _d6=new ActiveXObject("Microsoft.XMLDOM"); var _d7=_d6.createNode(1,_d3,_d4); _d6.appendChild(_d7); } catch(e){ } } } return _d6; }; function XMLBuilderCreateElementNS(_d8,_d9,_da){ var _db=null; if(typeof _da.createElementNS!="undefined"){ if(typeof _d8=="undefined"){ _d8="http://www.w3.org/2000/xmlns/"; } _db=_da.createElementNS(_d8,_d9); }else{ if(typeof _da.createNode!="undefined"){ _db=_da.createNode(1,_d9,_d8); } } return _db; }; function XMLBuilderSetAttributeNodeNS(_dc,_dd,_de,_df){ if(typeof _dc.setAttributeNS!="undefined"){ if(typeof _df=="undefined"){ _df="http://www.w3.org/2000/xmlns/"; } _dc.setAttributeNS(_df,_dd,_de); }else{ if(typeof _dc.ownerDocument!="undefined"&&typeof _dc.ownerDocument.createNode!="undefined"){ var _e0=_dc.ownerDocument.createNode(2,_dd,_df); _e0.nodeValue=_de; _dc.setAttributeNode(_e0); } } }; function XMLBuilderSerializeNode(_e1){ var _e2=""; if(typeof XMLSerializer!="undefined"){ try{ _e2=new XMLSerializer().serializeToString(_e1); } catch(e){ } }else{ if(typeof _e1=="object"&&typeof _e1.xml!="undefined"){ _e2=_e1.xml; } } return _e2.replace(/^\s+/g,"").replace(/\s+$/g,""); }; function XMLHelper_GetText(_e3,_e4){ var _e5=""; var _e6=_e3.childNodes; for(var i=0;i<_e6.length;++i){ if(_e6[i].nodeType==3){ _e5+=_e6[i].nodeValue; }else{ if(_e6[i].nodeName=="Value"){ _e5+=_e6[i].getAttribute("display"); }else{ if(_e4){ _e5+=XMLHelper_GetText(_e6[i],true); } } } } return _e5; }; function XMLHelper_GetLocalName(_e8){ if(typeof _e8.baseName!="undefined"){ return _e8.baseName; } return _e8.localName; }; function XMLHelper_FindChildByTagName(_e9,_ea,_eb){ if(typeof _eb=="undefined"||(_eb!=true&&_eb!=false)){ _eb=true; } if(XMLHelper_GetLocalName(_e9)==_ea){ return (_e9); } var i; for(i=0;i<_e9.childNodes.length;i++){ if(XMLHelper_GetLocalName(_e9.childNodes[i])==_ea){ return _e9.childNodes[i]; } } if(_eb!=false){ for(i=0;i<_e9.childNodes.length;i++){ var _ed=XMLHelper_FindChildByTagName(_e9.childNodes[i],_ea,_eb); if(_ed){ return _ed; } } } return null; }; function XMLHelper_FindChildrenByTagName(_ee,_ef,_f0){ if(typeof _f0=="undefined"||(_f0!=true&&_f0!=false)){ _f0=true; } var _f1=[]; var _f2=_ee.childNodes; for(var _f3=0;_f3<_f2.length;_f3++){ if(XMLHelper_GetLocalName(_f2[_f3])==_ef){ _f1[_f1.length]=_f2[_f3]; } if(_f0===true){ var _f4=XMLHelper_FindChildrenByTagName(_f2[_f3],_ef,_f0); if(_f4.length>0){ _f1=_f1.concat(_f4); } } } return _f1; }; function XMLHelper_GetFirstChildElement(oEl){ var _f6=null; if(oEl&&oEl.childNodes&&oEl.childNodes.length){ for(var i=0;i0){ if(_fc){ if(_102.length==1){ return _102; }else{ return [_102[0]]; } }else{ _fd=_fd.concat(_102); } } } } } return _fd; }; var DICTIONARY_INVALID_KEY=-1; var DICTIONARY_SUCCESS=1; function CDictionary(){ this.m_aValues={}; }; function CDictionary_add(sKey,_104){ if(typeof sKey!="string"&&typeof sKey!="number"){ return DICTIONARY_INVALID_KEY; } this.m_aValues[sKey]=_104; return DICTIONARY_SUCCESS; }; function CDictionary_exists(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return false; } return (typeof this.m_aValues[sKey]!="undefined"); }; function CDictionary_get(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return null; } if(this.exists(sKey)===true){ return this.m_aValues[sKey]; }else{ return null; } }; function CDictionary_keys(){ var _107=[]; for(var _108 in this.m_aValues){ _107.push(_108); } return _107.sort(); }; function CDictionary_remove(sKey){ if(typeof sKey!="string"&&typeof sKey!="number"){ return DICTIONARY_INVALID_KEY; } var _10a=this.get(sKey); delete this.m_aValues[sKey]; return _10a; }; function CDictionary_removeAll(){ this.m_aValues=[]; return DICTIONARY_SUCCESS; }; function CDictionary_append(_10b){ if(_10b instanceof CDictionary&&_10b.keys().length>0){ var _10c=_10b.keys(); for(var _10d=0;_10d<_10c.length;_10d++){ this.add(_10c[_10d],_10b.get(_10c[_10d])); } } }; CDictionary.prototype.add=CDictionary_add; CDictionary.prototype.exists=CDictionary_exists; CDictionary.prototype.get=CDictionary_get; CDictionary.prototype.keys=CDictionary_keys; CDictionary.prototype.remove=CDictionary_remove; CDictionary.prototype.removeAll=CDictionary_removeAll; CDictionary.prototype.append=CDictionary_append; function CognosTabControl(_10e,_10f){ this._init(); this._outsideContainer=_10e; this._callback=_10f; }; CognosTabControl.prototype._init=function(){ this._tabs=null; this._tabControlNode=null; this._scrollButtonsVisible=false; this._scrollLeftButton=null; this._scrollRightButton=null; this._selectedTab=null; this._wrapperDiv=null; this._topContainer=null; this._seperator=null; this._isSavedOutput=false; this._isHighContrast=false; }; CognosTabControl.prototype.destroy=function(){ if(this._wrapperDiv){ this._wrapperDiv.parentNode.removeChild(this._wrapperDiv); delete this._wrapperDiv; this._wrapperDiv=null; } }; CognosTabControl.prototype.setHighContrast=function(_110){ this._isHighContrast=_110; }; CognosTabControl.prototype.isHighContrast=function(){ return this._isHighContrast; }; CognosTabControl.prototype.setSpaceSaverContainer=function(node){ this._spaceSaverContainer=node; }; CognosTabControl.prototype.useAbsolutePosition=function(_112){ this._useAbsolutePosition=_112; }; CognosTabControl.prototype.setScrollAttachNode=function(node){ this._scrollAttachNode=node; }; CognosTabControl.prototype.setIsSavedOutput=function(_114){ this._isSavedOutput=_114; }; CognosTabControl.prototype.isSavedOutput=function(){ return this._isSavedOutput; }; CognosTabControl.prototype.getSelectedTabId=function(){ if(this._selectedTab){ return this._selectedTab.getId(); } return null; }; CognosTabControl.prototype.getSelectedTab=function(){ return this._selectedTab?this._selectedTab:null; }; CognosTabControl.prototype.isTopAligned=function(){ return this._isTopAligned; }; CognosTabControl.prototype.getWrapperDiv=function(){ return this._wrapperDiv; }; CognosTabControl.prototype.getVisibleWidth=function(){ var _115=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0; return this._wrapperDiv.clientWidth-_115; }; CognosTabControl.prototype.getMaxRightScroll=function(){ var _116=this._scrollRightButton?this._scrollRightButton.getWidth()+11:0; return this._totalWrapperWidth+_116+8-this._wrapperDiv.clientWidth; }; CognosTabControl.prototype.hide=function(){ this._topContainer.style.display="none"; }; CognosTabControl.prototype.resetPosition=function(){ if(this._useAbsolutePosition===true){ this._outsideContainer.srollLeft="0px"; this._outsideContainer.scrollTop="0px"; this._topContainer.style.top=""; this._topContainer.style.bottom=""; this._topContainer.style.left="0px"; if(this._isTopAligned){ this._topContainer.style.top="0px"; }else{ this._topContainer.style.bottom="0px"; } } }; CognosTabControl.prototype.render=function(_117){ this._updateTabInfo(_117); if(!this._tabControlNode){ var _118=this; var _119=this._scrollAttachNode?this._scrollAttachNode:this._outsideContainer; if(window.attachEvent){ window.attachEvent("onresize",function(){ _118.onResize(); }); if(this._useAbsolutePosition===true){ _119.attachEvent("onscroll",function(){ _118.onContainerScroll(); }); } }else{ window.addEventListener("resize",function(){ _118.onResize(); },false); if(this._useAbsolutePosition===true){ _119.addEventListener("scroll",function(){ _118.onContainerScroll(); },false); } } this._outsideContainer.originalClassName=this._outsideContainer.className; this._outsideContainer.className=this._outsideContainer.className+(this._isTopAligned?" ct_controlTop":" ct_controlBottom"); this._topContainer=document.createElement("div"); this._topContainer.className="ct_wrapperDiv"; if(this._useAbsolutePosition===true){ this._topContainer.style.width="100%"; this._topContainer.style.position="absolute"; this._topContainer.style.left="0px"; if(this._isTopAligned){ this._topContainer.style.top="0px"; }else{ this._topContainer.style.bottom="0px"; } } if(this._isTopAligned&&this._outsideContainer.firstChild){ this._outsideContainer.insertBefore(this._topContainer,this._outsideContainer.firstChild); }else{ this._outsideContainer.appendChild(this._topContainer); } this._wrapperDiv=document.createElement("div"); this._wrapperDiv.setAttribute("role","presentation"); this._wrapperDiv.className="ct_wrapperDiv"; this._topContainer.appendChild(this._wrapperDiv); this._tabControlNode=document.createElement("div"); this._tabControlNode.setAttribute("role","tablist"); this._tabControlNode.className="ct_control"; this._wrapperDiv.appendChild(this._tabControlNode); this._totalWrapperWidth=0; for(var i=0;i=this._tabs.length){ _12e=0; } }else{ _12e--; if(_12e<0){ _12e=this._tabs.length-1; } } this._tabs[_12e].focus(); this._tabs[_12e].scrollIntoView(); }else{ if(evt.keyCode=="32"||evt.keyCode=="13"){ var _12f=this._tabs[_12e].getId(); this.selectTab(_12f,true); } } }; function CognosTab(_130,_131,_132){ if(!_130){ return; } this._id=_130.id; this._label=_130.label; this._position=_132; this._contentClassName=_130.className; this._imgURL=_130.img; this._selected=false; this._tabControl=_131; this._outerTabDiv=null; this._focusDiv=null; }; CognosTab.prototype.getWidth=function(){ return this._outerTabDiv.offsetWidth+1; }; CognosTab.prototype.getHeight=function(){ return this._outerTabDiv.clientHeight; }; CognosTab.prototype.getId=function(){ return this._id; }; CognosTab.prototype.select=function(_133){ if(_133!=this._selected){ this._selected=_133; if(_133){ this.scrollIntoView(); } if(this._outerTabDiv){ this._updateSelectedClass(); this._updateAriaSelected(); } } }; CognosTab.prototype.scrollIntoView=function(){ var _134=this._outerTabDiv.offsetLeft+this._outerTabDiv.clientWidth; var _135=this._tabControl.getVisibleWidth(); var _136=this._tabControl.getScrollPos(); var _137=this._outerTabDiv.offsetLeft; if(_137===0){ this._tabControl.scrollTo(0); }else{ if((_137>=_136)&&(_134<=(_136+_135))){ }else{ if(_137<_136){ var _138=_137<3?0:_137-3; this._tabControl.scrollTo(_138); }else{ if(_134-_135>0||_134<_136){ this._tabControl.scrollTo(_134-_135+10); } } } } }; CognosTab.prototype.render=function(_139){ if(!this._outerTabDiv){ var _13a=this._id; var _13b=this._tabControl; var tab=this; this._outerTabDiv=document.createElement("div"); this._outerTabDiv.onmousedown=function(_13d){ _13b.selectTab(_13a,true,_13d); }; this._outerTabDiv.onmouseover=function(){ this.className=this.className+" ct_highlight"; }; this._outerTabDiv.onmouseout=function(){ tab._updateSelectedClass(); }; this._outerTabDiv.setAttribute("style",""); this._outerTabDiv.setAttribute("role","presentation"); this._updateSelectedClass(); _139.appendChild(this._outerTabDiv); var _13e=document.createElement("div"); _13e.className="ct_content"; _13e.setAttribute("role","presentation"); this._outerTabDiv.appendChild(_13e); this._focusDiv=document.createElement("span"); this._focusDiv.innerHTML=this._label?this._label:" "; this._focusDiv.className="ct_text"; this._focusDiv.setAttribute("tabIndex",this._position===0?"0":"-1"); this._focusDiv.setAttribute("role","tab"); this._focusDiv.onkeydown=function(_13f){ _13b.handleKeyDown(_13f,tab._position); }; this._updateAriaSelected(); _13e.appendChild(this._focusDiv); if(this.isIE()&&this.getWidth()<75){ this._outerTabDiv.style.width="75px"; } }else{ this._updateSelectedClass(); this._updateAriaSelected(); } }; CognosTab.prototype.isIE=function(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; CognosTab.prototype.getFocusableDiv=function(){ return this._focusDiv; }; CognosTab.prototype.focus=function(_140){ if(typeof _140==="undefined"){ _140=true; } this._focusDiv.setAttribute("tabIndex",_140?"0":"-1"); if(_140&&this._focusDiv.focus){ this._focusDiv.focus(); } }; CognosTab.prototype._updateSelectedClass=function(){ this._outerTabDiv.className=this._selected?"ct_outerDiv ct_highlight ct_selected":"ct_outerDiv"; }; CognosTab.prototype._updateAriaSelected=function(){ this._focusDiv.setAttribute("aria-selected",this._selected?"true":"false"); }; function CognosScrollButton(_141,_142,_143){ this._direction=_141; this._height=_142; this._tabControl=_143; this._disabled=true; this._scrolling=false; }; CognosScrollButton.prototype.getWidth=function(){ return this._scrollButtonDiv.offsetWidth+1; }; CognosScrollButton.prototype.show=function(){ this._wrapperDiv.style.display="block"; }; CognosScrollButton.prototype.hide=function(){ this._wrapperDiv.style.display="none"; }; CognosScrollButton.prototype.update=function(){ var _144=this._tabControl.getWrapperDiv(); var _145=false; if(this._direction=="left"){ if(_144.scrollLeft===0){ _145=true; } }else{ if(_144.scrollLeft>=(this._tabControl.getMaxRightScroll()-2)){ _145=true; } } if(_145){ this._disable(); }else{ this._enable(); } }; CognosScrollButton.prototype.isDisabled=function(){ return this._disabled; }; CognosScrollButton.prototype._disable=function(){ this._disabled=true; this._outerDiv.className="ct_outerDiv ct_scrollDisabled"; }; CognosScrollButton.prototype._enable=function(){ this._disabled=false; this._outerDiv.className="ct_outerDiv ct_scrollEnabled"; }; CognosScrollButton.prototype.scroll=function(){ if(!this._scrolling){ this._scrolling=true; var _146=this._tabControl.getWrapperDiv().clientWidth; this._doAnimateScroll(_146,this._tabControl.getMaxRightScroll()); } }; CognosScrollButton.prototype._doAnimateScroll=function(_147,_148){ if(_147>0){ var _149=10; var _14a=this._tabControl.getWrapperDiv(); if(this._direction=="left"){ if(_14a.scrollLeft>_149){ this._tabControl.scrollTo(_14a.scrollLeft-_149); }else{ this._tabControl.scrollTo(0); this._scrolling=false; return; } }else{ if(_14a.scrollLeft+_149<_148){ this._tabControl.scrollTo(_14a.scrollLeft+_149); }else{ this._scrolling=false; this._tabControl.scrollTo(_148); this._tabControl.updateScrollButtons(); return; } } _147-=_149; var _14b=this; setTimeout(function(){ _14b._doAnimateScroll(_147,_148); },3); }else{ this._scrolling=false; this._tabControl.updateScrollButtons(); } }; CognosScrollButton.prototype.isIE=function(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; CognosScrollButton.prototype.render=function(_14c){ this._scrollButtonDiv=document.createElement("div"); this._scrollButtonDiv.className="ct_scrollButton"; var _14d=-1; if(this.isIE()&&document.compatMode!="CSS1Compat"){ _14d=1; } this._scrollButtonDiv.style.height=this._height+_14d+"px"; if(this._tabControl.isHighContrast()){ this._scrollButtonDiv.innerHTML=this._direction=="left"?"«":"»"; } this._outerDiv=document.createElement("div"); this._outerDiv.className="ct_scrollDisabled"; this._outerDiv.appendChild(this._scrollButtonDiv); this._outerDiv.style.height=this._height+"px"; var _14e=this; this._outerDiv.onclick=function(){ _14e.scroll(); }; this._wrapperDiv=document.createElement("div"); this._wrapperDiv.style.height=this._height+"px"; this._wrapperDiv.className="ct_scroll "+(this._direction=="left"?"ct_left":"ct_right")+(this._tabControl.isHighContrast()?" a11y":""); this._wrapperDiv.appendChild(this._outerDiv); if(this._direction=="left"){ _14c.insertBefore(this._wrapperDiv,_14c.firstChild); this._wrapperDiv.style.left="0px"; }else{ _14c.appendChild(this._wrapperDiv); this._wrapperDiv.style.right="0px"; } }; function ActionFactory(_14f){ this.m_cognosViewer=_14f; }; ActionFactory.prototype.load=function(_150){ this.m_cognosViewer.loadExtra(); var _151=null; try{ var _152=_150+"Action"; _151=eval("(typeof "+_152+"=='function'? new "+_152+"():null);"); if(_151){ _151.setCognosViewer(this.m_cognosViewer); } } catch(exception){ _151=null; } return _151; }; function ActionFactory_loadActionHandler(evt,_154){ var _155=getCtxNodeFromEvent(evt); var _156=_154.getSelectionController(); var _157=null; if(_155!==null){ var _158=_155.getAttribute("ctx"); _158=_158.split("::")[0].split(":")[0]; var _159=_155.getAttribute("type")!=null?_155:_155.parentNode; var type=_159.getAttribute("type"); switch(type){ case "columnTitle": var _15b=(_155.getAttribute("dttargets")!=null); var _15c=(_159.getAttribute("CTNM")!=null&&_156.getMun(_158)!=""&&_156.getUsageInfo(_158)!="2"); if(_15b||_15c){ _157=_154.getAction("DrillUpDownOrThrough"); _157.init(_15b,_15c); _157.updateDrillabilityInfo(_154,_155); }else{ _157=_154.getAction("RenameDataItem"); } break; case "datavalue": case "chartElement": case "ordinalAxisLabel": case "legendLabel": case "legendTitle": case "ordinalAxisTitle": var _15b=(_155.getAttribute("dttargets")!=null); var _15c=(_156.getHun(_158)!=""); if(_15b||_15c){ _157=_154.getAction("DrillUpDownOrThrough"); _157.init(_15b,_15c); _157.updateDrillabilityInfo(_154,_155); } break; } } if(_157===null){ _157=_154.getAction("Selection"); } _157.setCognosViewer(_154); return _157; }; ActionFactory.prototype.destroy=function(){ delete this.m_cognosViewer; }; function CSelectionDefaultStyles(_15d){ this.m_primarySelectionColor=null; this.m_highContrastBorderStyle="solid"; this.m_secondarySelectionIsDisabled=false; if(_15d){ this.m_selectionController=_15d; this.m_oCognosViewer=_15d.m_oCognosViewer; if(this.m_oCognosViewer){ var _15e=this.m_oCognosViewer.getUIConfig(); if(_15e){ if(_15e.getPrimarySelectionColor()){ this.m_primarySelectionColor=_15e.getPrimarySelectionColor(); } if(!_15e.getShowSecondarySelection()){ this.m_secondarySelectionIsDisabledConfig=true; }else{ if(_15e.getSeondarySelectionColor()){ this.m_secondarySelectionColor=_15e.getSeondarySelectionColor(); } } } } } }; CSelectionDefaultStyles.prototype.getPrimarySelectionColor=function(_15f){ return this.m_primarySelectionColor; }; CSelectionDefaultStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionDefaultStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionDefaultStyles.prototype.canApplyToSelection=function(_160){ return true; }; CSelectionDefaultStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionDefaultStyles.prototype.setStyleForSelection=function(){ }; function CSelectionFilterStyles(_161){ this.m_selectionController=_161; this.m_primarySelectionColor=this.m_primarySelectionFilterColor="#44BFDD"; this.m_primarySelectionFilterColorForMeasure=null; this.m_secondarySelectionColor=null; this.m_highContrastBorderStyle="dotted"; this.m_secondarySelectionIsDisabled=true; }; CSelectionFilterStyles.prototype=new CSelectionDefaultStyles(); CSelectionFilterStyles.prototype.getPrimarySelectionColor=function(_162){ return this.m_primarySelectionColor; }; CSelectionFilterStyles.prototype.getSecondarySelectionColor=function(){ return this.m_secondarySelectionColor; }; CSelectionFilterStyles.prototype.getHighContrastBorderStyle=function(){ return this.m_highContrastBorderStyle; }; CSelectionFilterStyles.prototype.secondarySelectionIsDisabled=function(){ return this.m_secondarySelectionIsDisabled; }; CSelectionFilterStyles.prototype.canApplyToSelection=function(_163){ return !this.selectionHasOnlyMeasure(_163); }; CSelectionFilterStyles.prototype.selectionHasOnlyMeasure=function(_164){ return (_164.length===1&&_164[0].length===1&&this.m_selectionController.isMeasure(_164[0][0])); }; CSelectionFilterStyles.prototype.setStyleForSelection=function(_165){ this.m_primarySelectionColor=(this.selectionHasOnlyMeasure(_165))?null:this.m_primarySelectionFilterColor; }; function CSelectionFilterContextMenuStyles(_166){ CSelectionDefaultStyles.call(this,_166); this.m_secondarySelectionIsDisabled=true; }; CSelectionFilterContextMenuStyles.prototype=new CSelectionDefaultStyles(); function CSelectionObject(){ this.initialize(); }; CSelectionObject.prototype.initialize=function(){ this.m_oCellRef={}; this.m_sColumnRef=""; this.m_sColumnName=""; this.m_aDataItems=[]; this.m_aUseValues=[]; this.m_aDisplayValues=[]; this.m_sCellTypeId=""; this.m_sLayoutType=""; this.m_sTag=""; this.m_aMuns=[]; this.m_aRefQueries=[]; this.m_aMetadataItems=[]; this.m_aDrillOptions=[]; this.m_selectionController={}; this.m_contextIds=[]; this.m_ctxAttributeString=""; this.m_fetchedContextIds=false; this.m_selectedClass=[]; this.m_cutClass=[]; this.m_dataContainerType=""; this.m_oJsonContext=null; }; CSelectionObject.prototype.isSelectionOnVizChart=function(){ return false; }; CSelectionObject.prototype.getCellRef=function(){ return this.m_oCellRef; }; CSelectionObject.prototype.getColumnRP_Name=function(){ if(this.m_oCellRef!=null){ return this.m_oCellRef.getAttribute("rp_name"); } }; CSelectionObject.prototype.getColumnRef=function(){ return this.m_sColumnRef; }; CSelectionObject.prototype.getColumnName=function(){ if(this.m_sColumnName==""){ if(this.m_selectionController.hasContextData()&&this.m_contextIds.length){ this.m_sColumnName=this.m_selectionController.getRefDataItem(this.m_contextIds[0][0]); } } return this.m_sColumnName; }; CSelectionObject.prototype.getDataItemDisplayValue=function(_167){ var _168=this.getDataItems(); var item=""; if(_168&&_168[0]&&_168[0][0]){ item=this.getDataItems()[0][0]; if(_167&&_167.itemInfo&&_167.itemInfo.length){ var _16a=_167.itemInfo; for(var i=0;i<_16a.length;i++){ if(_16a[i].item===item&&_16a[i].itemLabel){ return _16a[i].itemLabel; } } } } return item; }; CSelectionObject.prototype.getDataItems=function(){ if(!this.m_aDataItems.length){ this.fetchContextIds(); for(var i=0;i0){ return true; } } } return false; }; CSelectionObject.prototype.isHomeCell=function(){ var _18d=this.getCellRef().className; if(_18d&&(_18d=="xm"||_18d.indexOf("xm ")!=-1||_18d.indexOf(" xm")!=-1)){ return true; } return false; }; CSelectionObject.prototype.getDataContainerType=function(){ return this.m_dataContainerType; }; CSelectionObject.prototype.getContextJsonObject=function(_18e,_18f){ if(this.m_oJsonContext===null){ var _190={}; var _191=[]; var _192=null; this.getDataItems(); this.getUseValues(); if(this.m_contextIds.length==0){ return null; } var i=0,j=0; var _195=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_18e); _192=_195; this._populateJsonContextObj(_195,this.m_aUseValues[i][j],_18e.getDisplayValue(this.m_contextIds[i][j]),_18e.getMun(this.m_contextIds[i][j]),_190,_191); j++; for(;i0){ _1c1=true; break; } } if(!_1c1){ j=0; i++; } }while(!_1c1); } var _1c2=this._getBestPossibleItemName(this.m_aDataItems[i][j],this.m_contextIds[i][j],_1ba); var _1c3=_1ba.isMeasure(this.m_contextIds[i][j]); var _1c4=this._getBestPossibleItemReference(this.m_contextIds[i][j],_1c3,_1ba.getCCDManager()); var _1c5=_1ba.getCCDManager().GetQuery(this.m_contextIds[i][j]); var _1c6=this.isDataValueOrChartElement(); var _1c7=this._populateJsonForMarshal(_1c2,_1c4,_1c3,this.m_aUseValues[i][j],_1ba.getDisplayValue(this.m_contextIds[i][j]),_1ba.getMun(this.m_contextIds[i][j]),_1c6); j++; var _1c8=[]; for(;i0){ lid=lid.substring(0,lid.indexOf(_1bb)-1); } this.m_oJsonForMarshal={"lid":lid,"query":_1c5,"selectedItem":_1c7,"context":_1c8}; } return this.m_oJsonForMarshal; }; CSelectionObject.prototype._populateJsonForMarshal=function(_1cb,_1cc,_1cd,_1ce,_1cf,mun,_1d1){ if(_1cb){ var _1d2={}; _1d2["itemName"]=_1cb; _1d2["isMeasure"]=_1cd?"true":"false"; _1d2["mdProperty"]=_1cc.mdProperty; _1d2["mdValue"]=_1cc.mdValue; _1d2["isDataValueOrChartElement"]=_1d1?"true":"false"; if(mun){ _1d2["mun"]=mun; } if(_1ce){ _1d2["use"]=_1ce; } return _1d2; } return null; }; CSelectionObject.prototype._getBestPossibleItemReference=function(_1d3,_1d4,_1d5){ var _1d6=null; var _1d7=null; if(_1d4){ _1d7="i"; _1d6=_1d5.GetQMID(_1d3); if(_1d6==null){ _1d7="m"; _1d6=_1d5.GetMUN(_1d3); } if(_1d6==null){ _1d7="r"; _1d6=_1d5.GetRDIValue(_1d3); } }else{ _1d7="l"; _1d6=_1d5.GetLUN(_1d3); if(_1d6==null){ _1d7="h"; _1d6=_1d5.GetHUN(_1d3); } if(_1d6==null){ _1d7="i"; _1d6=_1d5.GetQMID(_1d3); } if(_1d6==null){ _1d7="r"; _1d6=_1d5.GetRDIValue(_1d3); } } return {"mdProperty":_1d7,"mdValue":_1d6}; }; CSelectionChartObject.prototype=new CSelectionObject(); CSelectionChartObject.prototype.constructor=CSelectionChartObject; CSelectionChartObject.baseclass=CSelectionObject.prototype; function CSelectionChartObject(){ CSelectionChartObject.baseclass.initialize.call(this); this.m_chartArea=null; this.m_context=""; this.m_chartCtxAreas=[]; this.m_selectedVizChart=false; }; CSelectionChartObject.prototype.isSelectionOnVizChart=function(){ return this.m_selectedVizChart; }; CSelectionChartObject.prototype.setSelectionOnVizChart=function(_1d8){ var _1d9=this.m_selectionController.getSelectedChartImageFromChartArea(_1d8); if(_1d9){ this.m_selectedVizChart=_1d9.parentNode.getAttribute("vizchart")=="true"?true:false; } }; CSelectionChartObject.prototype.getArea=function(){ return this.m_chartArea; }; CSelectionChartObject.prototype.getContext=function(){ return this.m_context; }; CSelectionChartObject.prototype.getCtxAreas=function(){ return this.m_chartCtxAreas; }; CSelectionChartObject.prototype.setCtxAreas=function(_1da){ this.m_chartCtxAreas=_1da; }; CSelectionChartObject.prototype.getCtxAttributeString=function(){ return this.m_context; }; function CChartHelper(_1db,_1dc,_1dd){ var _1de=_1db.parentNode; this.m_selectionObjectFactory=_1dc; this.m_map=_1de; _1dd.loadExtra(); this.imageMapHighlighter=new CImageMapHighlight(_1de,_1dd.sWebContentRoot); this.initialize(); }; CChartHelper.prototype.initialize=function(){ this.buildMapCtxAreas(); this.m_chartCtxNodes={}; }; CChartHelper.prototype.buildMapCtxAreas=function(){ var _1df={}; var _1e0=this.m_map.childNodes; var _1e1=_1e0.length; var _1e2=null; for(var i=0;i<_1e1;i++){ var a=_1e0[i]; _1e2=a.getAttribute("ctx"); if(_1e2){ if(_1df[_1e2]){ _1df[_1e2].push(a); }else{ _1df[_1e2]=[a]; } } } this.m_ctxAreas=_1df; }; CChartHelper.prototype.getChartNode=function(_1e5){ if(!this.isAreaInitialized(_1e5)){ var _1e6=_1e5.parentNode; this.m_map=_1e6; this.initialize(); this.imageMapHighlighter.initialize(_1e6); } var _1e7=_1e5.getAttribute("ctx"); if(!this.m_chartCtxNodes[_1e7]){ this.m_chartCtxNodes[_1e7]=this.m_selectionObjectFactory.getSelectionChartObject(_1e5); this.m_chartCtxNodes[_1e7].setCtxAreas(this.m_ctxAreas[_1e7]); } return this.m_chartCtxNodes[_1e7]; }; CChartHelper.prototype.isAreaInitialized=function(_1e8){ return this.imageMapHighlighter.isAreaInitialized(_1e8); }; CChartHelper.prototype.getImageMapHighlighter=function(){ return this.imageMapHighlighter; }; function CSelectionObjectFactory(_1e9){ this.m_selectionController=_1e9; }; CSelectionObjectFactory.prototype.getSelectionController=function(){ return this.m_selectionController; }; CSelectionObjectFactory.prototype.getChildSpans=function(_1ea){ var _1eb=[]; for(var i=0;i<_1ea.childNodes.length;i++){ var _1ed=_1ea.childNodes[i]; if(!_1ed.getAttribute||_1ed.getAttribute("skipSelection")!="true"){ _1eb.push(_1ea.childNodes[i]); } } var _1ee=_1ea; var _1ef=""; while(!_1ef&&_1ee){ _1ef=_1ee.attributes?_1ee.attributes["LID"]:""; _1ee=_1ee.parentNode; } _1ef=_1ef?_1ef.value:""; var _1f0=[]; while(_1eb.length>0){ var _1ed=_1eb.pop(); var lid=_1ed.attributes?_1ed.attributes["LID"]:""; lid=lid?lid.value:""; if(!lid||lid==_1ef){ if(_1ed.nodeName.toLowerCase()=="span"){ _1f0.push(_1ed); }else{ for(i=0;i<_1ed.childNodes.length;i++){ _1eb.push(_1ed.childNodes[i]); } } } } return _1f0; }; CSelectionObjectFactory.prototype.getSelectionObject=function(_1f2,_1f3){ var _1f4=new CSelectionObject(); try{ _1f4.setSelectionController(this.getSelectionController()); _1f4.m_oCellRef=_1f2; _1f4.m_sColumnRef=_1f2.getAttribute("cid"); _1f4.m_sCellTypeId=_1f2.getAttribute("uid"); _1f4.m_sLayoutType=_1f2.getAttribute("type"); _1f4.m_sTag=_1f2.getAttribute("tag"); _1f4.m_layoutElementId=this.getLayoutElementId(_1f2); _1f4.m_dataContainerType=this.getContainerType(_1f2); if(typeof cf!="undefined"){ var _1f5=cf.cfgGet("MiniQueryObj"); if(_1f5){ var _1f6=_1f5.findChildWithAttribute("tag",_1f4.m_sTag); if(_1f6&&_1f6.getAttribute("id")!=null){ _1f4.m_sColumnName=_1f6.getAttribute("id"); } } } var _1f7=this.getChildSpans(_1f2); if(_1f7.length>0){ for(var i=0;i<_1f7.length;i++){ var _1f9=_1f7[i]; if(_1f9.nodeType==1&&_1f9.nodeName.toLowerCase()=="span"&&_1f9.style.visibility!="hidden"){ var _1fa=null; if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""){ _1fa=_1f2; }else{ if(_1f9.getAttribute("ctx")!=null&&_1f9.getAttribute("ctx")!=""){ _1fa=_1f9; }else{ if(_1f9.getAttribute("dtTargets")&&_1f9.childNodes&&_1f9.childNodes.length){ for(var _1fb=0;_1fb<_1f9.childNodes.length;_1fb++){ if(_1f9.childNodes[_1fb].nodeType==1&&_1f9.childNodes[_1fb].style.visibility!="hidden"){ _1fa=_1f9.childNodes[_1fb]; } } }else{ for(var _1fc=0;_1fc<_1f9.childNodes.length;_1fc++){ var _1fd=_1f9.childNodes[_1fc]; if(typeof _1fd.getAttribute!="undefined"&&_1fd.getAttribute("ctx")!=null&&_1fd.getAttribute("ctx")!=""){ _1fa=_1fd; break; } } } } } var _1fe=""; if(_1fa&&_1fa.getAttribute("ctx")){ _1fe=_1fa.getAttribute("ctx"); } _1f4.m_aDisplayValues[_1f4.m_aDisplayValues.length]=this.getSelectionController().getDisplayValue(_1fe,_1f2.parentNode); if(typeof _1f3!="undefined"&&_1f3!=_1fe){ continue; } _1f4=this.processCTX(_1f4,_1fe); } } }else{ if(_1f2.getAttribute("ctx")!=null&&_1f2.getAttribute("ctx")!=""&&_1f4.m_sLayoutType=="datavalue"){ _1f4=this.processCTX(_1f4,_1f2.getAttribute("ctx")); } } this.getSelectionController().processColumnTitleNode(_1f4); } catch(ex){ } return _1f4; }; CSelectionObjectFactory.prototype.processCTX=function(_1ff,_200){ if(typeof _200!="string"||_200.length==0){ return _1ff; } var ctx; if(typeof _1ff.m_contextIds=="object"&&_1ff.m_contextIds!==null&&_1ff.m_contextIds.length>0){ var _202=_200.split("::"); for(ctx=0;ctx<_1ff.m_contextIds.length;++ctx){ try{ if(_202[ctx]){ _1ff.m_contextIds[ctx]=_1ff.m_contextIds[ctx].concat(_202[ctx].split(":")); } } catch(e){ } } }else{ _1ff.m_contextIds=this.m_selectionController.m_oCognosViewer.getReportContextHelper().processCtx(_200); } _1ff.m_ctxAttributeString=_200; return _1ff; }; CSelectionObjectFactory.prototype.getSecondarySelectionObject=function(tag,_204,_205){ if(!_205){ _205=document; } var _206=new CSelectionObject(); _206.setSelectionController(this.getSelectionController()); _206.m_oCellRef=null; _206.m_sColumnRef=null; _206.m_sCellTypeId=null; _206.refQuery=""; var _207=_205.getElementsByTagName("td"); for(var i=0;i<_207.length;i++){ var _209=_207[i].getAttribute("tag"); if(_209!=null&&_209!=""){ if(tag==_209){ var _20a=_207[i].className; if(_20a!=null&&_209!=""){ if((_204=="columnTitle"&&_20a=="lt")||(_204=="datavalue"&&_20a=="lc")){ _206.m_sColumnRef=_207[i].getAttribute("cid"); _206.m_sCellTypeId=_207[i].getAttribute("uid"); break; } } } } } if(_206.m_sCellTypeId==null){ return null; } return _206; }; CSelectionObjectFactory.prototype.getSelectionChartObject=function(_20b){ var _20c=""; if(_20b.getAttribute("flashChart")!=null){ if(typeof _20b.getCtx!="undefined"){ try{ _20c=_20b.getCtx(); } catch(e){ _20c=""; } } }else{ _20c=_20b.getAttribute("ctx"); } var _20d=new CSelectionChartObject(); _20d.setSelectionController(this.getSelectionController()); if(_20c!=null){ _20d.m_contextIds=_20c.split("::"); for(var ctx=0;ctx<_20d.m_contextIds.length;++ctx){ _20d.m_contextIds[ctx]=_20d.m_contextIds[ctx].split(":"); } } _20d.m_layoutElementId=this.getLayoutElementId(_20b); _20d.m_sLayoutType=_20b.getAttribute("type"); _20d.m_chartArea=_20b; _20d.m_context=_20c; _20d.setSelectionOnVizChart(_20b); return _20d; }; CSelectionObjectFactory.prototype.getContainerTypeFromClass=function(_20f){ var _210=""; switch(_20f){ case "ls": _210="list"; break; case "xt": _210="crosstab"; break; case "rt": _210="repeaterTable"; break; } return _210; }; CSelectionObjectFactory.prototype.getContainerType=function(el){ var type=""; if(el){ if(el.className){ type=this.getContainerTypeFromClass(el.className); } if(!type){ var _213=el.parentNode; if(_213){ type=this.getContainerType(_213); } } } return type; }; CSelectionObjectFactory.prototype.getLayoutElementId=function(el){ var id=""; var _216=this.getSelectionController().getNamespace(); if(el){ if(el.getAttribute&&el.getAttribute("chartcontainer")=="true"){ for(var _217=0;_2170){ id=_21b[0].getAttribute("LID"); } } } } return id; }; function CSelectionController(_21c,_21d){ this.m_bSelectionBasedFeaturesEnabled=false; this.m_bDrillUpDownEnabled=false; this.m_bModelDrillThroughEnabled=false; this.m_oCognosViewer=null; this.m_bSavedSelections=false; if(_21d){ this.m_oCognosViewer=_21d; } this.initialize(_21c); this.FILTER_SELECTION_STYLE=0; this.FILTER_SELECTION_CONTEXT_MENU_STYLE=1; }; CSelectionController.prototype.initialize=function(_21e){ this.m_sNamespace=_21e; this.m_aCutColumns=[]; this.m_aSelectedObjects=[]; this.m_selectedClass=[]; this.m_cutClass=[]; this.m_oObserver=new CObserver(this); this.m_bSelectionArraysSetup=false; this.m_aSelectionHoverNodes=[]; this.m_bUsingCCDManager=false; this.m_aReportMetadataArray=[]; this.m_aReportContextDataArray=[]; this.m_oCDManager=new CCDManager(); this.m_oSelectionObjectFactory=new CSelectionObjectFactory(this); this.m_selectedChartArea=null; this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; this.m_chartHelpers={}; if(this.m_oCognosViewer!=null){ this.m_oCDManager.SetCognosViewer(this.m_oCognosViewer); } this.m_maxSecondarySelection=-1; this.c_usageMeasure="2"; this.m_ccl_dateTypes={59:"dateTime",60:"interval"}; this.m_selectionStyles=new CSelectionDefaultStyles(this); this.m_originalSelectionStyles=this.m_selectionStyles; this.m_bAllowHorizontalDataValueSelection=false; }; CSelectionController.prototype.secondarySelectionIsDisabled=function(){ return this.m_selectionStyles.secondarySelectionIsDisabled(); }; CSelectionController.prototype.getPrimarySelectionColor=function(){ return this.m_selectionStyles.getPrimarySelectionColor(); }; CSelectionController.prototype.getHighContrastBorderStyle=function(){ return this.m_selectionStyles.getHighContrastBorderStyle(); }; CSelectionController.prototype.getSecondarySelectionColor=function(){ return this.m_selectionStyles.getSecondarySelectionColor(); }; CSelectionController.prototype.resetSelectionStyles=function(){ this.setSelectionStyles(); }; CSelectionController.prototype.setSelectionStyles=function(_21f){ switch(_21f){ case this.FILTER_SELECTION_STYLE: if(!this.m_selectionFilterStyles){ this.m_selectionFilterStyles=new CSelectionFilterStyles(this); } this.m_selectionStyles=this.m_selectionFilterStyles; break; case this.FILTER_SELECTION_CONTEXT_MENU_STYLE: if(!this.m_selectionFilterContextMenuStyles){ this.m_selectionFilterContextMenuStyles=new CSelectionFilterContextMenuStyles(this); } this.m_selectionStyles=this.m_selectionFilterContextMenuStyles; break; default: this.m_selectionStyles=this.m_originalSelectionStyles; } }; CSelectionController.prototype.resetAllowHorizontalDataValueSelection=function(){ this.m_bAllowHorizontalDataValueSelection=false; }; CSelectionController.prototype.setAllowHorizontalDataValueSelection=function(_220){ this.m_bAllowHorizontalDataValueSelection=_220; }; CSelectionController.prototype.allowHorizontalDataValueSelection=function(){ return this.m_bAllowHorizontalDataValueSelection; }; CSelectionController.prototype.clearSelectionData=function(){ this.m_aSelectedObjects=[]; this.m_selectedChartNodes=[]; this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; }; CSelectionController.prototype.getCCDManager=function(){ return this.m_oCDManager; }; CSelectionController.prototype.getCtxIdFromDisplayValue=function(_221){ if(!this.m_bUsingCCDManager){ var _222=this.getReportContextDataArray(); var _223=1; for(var _224 in _222){ var _225=_222[_224]; if(_225[_223]==_221){ return _224; } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForDisplayValue(_221); return (sId==null)?"":sId; } }; CSelectionController.prototype.getCtxIdFromMetaData=function(sLun,sHun,_229){ return this.m_oCDManager.getContextIdForMetaData(sLun,sHun,_229); }; CSelectionController.prototype.replaceNamespaceForSharedTM1DimensionOnly=function(lun,hun,mun){ var sLun=lun; var sHun=hun; if(mun&&mun.indexOf("->:[TM].")>0){ sLun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(lun); sHun=this.m_oCDManager._replaceNamespaceForSharedTM1DimensionOnly(hun); } return {"lun":sLun,"hun":sHun}; }; CSelectionController.prototype.getCtxIdFromMun=function(sMun){ if(!this.m_bUsingCCDManager){ var _230=this.getReportMetadataArray(); var _231=0; for(var sKey in _230){ var _233=_230[sKey]; if(_233[_231]==sMun){ var _234=2; var _235=this.getReportContextDataArray(); for(var _236 in _235){ var _237=_235[_236]; if(_237[_234]==sKey){ return _236; } } } } return ""; }else{ var sId=this.m_oCDManager.GetContextIdForMUN(sMun); return (sId==null)?"":sId; } }; CSelectionController.prototype.canDrillDown=function(_239){ var _23a=this.getDrillFlagForMember(_239); return (_23a==3||_23a==2); }; CSelectionController.prototype.canDrillUp=function(_23b){ var _23c=this.getDrillFlagForMember(_23b); return (_23c==3||_23c==1); }; CSelectionController.prototype.getQueryModelId=function(_23d){ var qmid=""; if(!this.m_bUsingCCDManager){ var _23f=this.m_aReportContextDataArray[_23d]; if(_23f&&typeof _23f[3]!="undefined"){ var _240=_23f[3]; var _241=this.m_aReportMetadataArray[_240]; if(typeof _241!="undefined"&&typeof _241[1]!="undefined"&&_241[1]=="I"){ qmid=_241[0]; } } }else{ qmid=this.m_oCDManager.GetQMID(_23d); } return qmid; }; CSelectionController.prototype.getRefQuery=function(_242){ if(!this.m_bUsingCCDManager){ return this.getMetaDataItemUseValue(4,_242); }else{ var _243=this.m_oCDManager.GetQuery(_242); return (_243==null)?"":_243; } }; CSelectionController.prototype.getRefDataItem=function(_244){ return this.m_oCognosViewer.getReportContextHelper().getRefDataItem(_244); }; CSelectionController.prototype.getMun=function(_245){ return this.m_oCognosViewer.getReportContextHelper().getMun(_245); }; CSelectionController.prototype.getHun=function(_246){ if(!this.m_bUsingCCDManager){ var sHun=null; var _248=this.getRDI(_246); if(_248&&_248.length>4&&_248[1]=="R"){ var _249=_248[4]; var _24a=this.getReportMetadataArray(); _248=_24a[_249]; } if(_248&&_248.length>1&&_248[1]=="H"){ sHun=_248[0]; } return sHun; }else{ return this.m_oCDManager.GetHUN(_246); } }; CSelectionController.prototype.fetchContextData=function(_24b,_24c){ var _24d=0; if(this.m_bUsingCCDManager){ _24d=this.m_oCDManager.FetchContextData(_24b,_24c); } return _24d; }; CSelectionController.prototype.getMetaDataItem=function(sKey){ var _24f=this.getReportMetadataArray(); if(typeof _24f[sKey]!="undefined"){ return _24f[sKey]; } return null; }; CSelectionController.prototype.getContextDataItem=function(_250){ var _251=this.getReportContextDataArray(); if(typeof _251[_250]!="undefined"){ return _251[_250]; } return null; }; CSelectionController.prototype.getMetaDataItemUseValue=function(_252,_253){ var _254=this.getContextDataItem(_253); if(_254!=null){ var _255=_254[_252]; if(_255!=""){ var _256=this.getMetaDataItem(_255); if(_256!=null){ return _256[0]; } } } return ""; }; CSelectionController.prototype.getRDI=function(_257){ var _258=this.getContextDataItem(_257); if(_258!=null){ var _259=_258[0]; if(_259!=""){ var _25a=this.getMetaDataItem(_259); if(_25a!=null){ return _25a; } } } }; CSelectionController.prototype.getNamespace=function(){ return this.m_sNamespace; }; CSelectionController.prototype.setSelectionBasedFeaturesEnabled=function(_25b){ this.m_bSelectionBasedFeaturesEnabled=_25b; }; CSelectionController.prototype.getSelectionBasedFeaturesEnabled=function(){ return this.m_bSelectionBasedFeaturesEnabled; }; CSelectionController.prototype.setDrillUpDownEnabled=function(_25c){ this.m_bDrillUpDownEnabled=_25c; }; CSelectionController.prototype.getDrillUpDownEnabled=function(){ return this.m_bDrillUpDownEnabled; }; CSelectionController.prototype.setModelDrillThroughEnabled=function(_25d){ this.m_bModelDrillThroughEnabled=_25d; }; CSelectionController.prototype.getBookletItemForCurrentSelection=function(){ var _25e=this.getAllSelectedObjects(); if(_25e&&_25e.length>0){ var _25f=_25e[0]; if(_25f.hasContextInformation()){ var _260=this.m_oCDManager.GetBIValue(_25f.m_contextIds[0][0]); if(!_260){ return null; } return _260; } } return null; }; CSelectionController.prototype.getModelPathForCurrentSelection=function(){ var _261=null; var _262=this.getBookletItemForCurrentSelection(); if(_262){ var _261=this.m_oCDManager.getModelPathFromBookletItem(_262); } return _261; }; CSelectionController.prototype.getModelDrillThroughEnabled=function(){ var _263=this.getBookletItemForCurrentSelection(); if(_263){ var _264=this.m_oCDManager.GetBookletModelBasedDrillThru(_263); return _264==1?true:false; }else{ return this.m_bModelDrillThroughEnabled; } }; CSelectionController.prototype.clearSelectedObjects=function(_265){ try{ if(!_265){ _265=document; } this.updateUI(_265,this.getSelections(),true,false); this.m_aSelectedObjects=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetSelections=function(_266){ try{ if(!_266){ _266=document; } if(this.hasSelectedChartNodes()){ this.resetChartSelections(_266); } this.m_oSelectedDrillThroughImage=null; this.m_oSelectedDrillThroughSingleton=null; if(this.getSelections()){ this.updateUI(_266,this.getSelections(),true,false); this.updateUI(_266,this.getCutColumns(),true,false); this.m_aCutColumns=[]; this.m_aSelectedObjects=[]; this.m_selectedClass=[]; this.m_cutClass=[]; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.resetChartSelections=function(_267){ var _268=this.m_chartHelpers; for(var _269 in _268){ if(_268[_269]){ var _26a=_268[_269].getImageMapHighlighter(); if(_26a.hideAllAreas){ _26a.hideAllAreas(); } } } this.m_selectedChartNodes=[]; this.m_selectionContainerMap=null; }; CSelectionController.prototype.addSelectionObject=function(_26b,_26c){ try{ if(!_26c){ _26c=document; } var _26d=_26b.getCellRef(); if(this.isCellSelected(_26d)!==true||(typeof _26d!="object"||_26d===null)){ if(this.isColumnCut(_26b.getTag())!==true){ this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_26b; if(typeof this.onSelectionChange=="function"){ this.onSelectionChange(); } this.updateUI(_26c,this.getSelections(),false,false); } } return true; } catch(e){ return false; } }; CSelectionController.prototype.removeSelectionObject=function(_26e,_26f){ try{ if(!_26f){ _26f=document; } var _270=[]; var _271; for(_271=0;_2710){ this.updateUI(_26f,this.getSelections(),true,false); var _274=[]; for(_271=0;_2710){ return true; } return false; }; function getStyleFromClass(c){ for(var i=0;i0){ var _2b4,_2b5,_2b6; if(_2b3==1||_2b3==2){ if(_2b2){ this.deselecting(this.m_cutClass); }else{ var _2b7=getStyleFromClass("cutSelection").style.color; var _2b8=getStyleFromClass("cutSelection").style.backgroundColor; _2b4=_2b1.length; for(_2b5=0;_2b5<_2b4;_2b5++){ _2b6=_2b1[_2b5].getCellRef(); var _2b9="cutQS"+_2b6.getAttribute("cid"); this.selecting(_2b9,"\n{ background-color: "+_2b8+"; color: "+_2b7+";}\n"); this.m_cutClass.push(_2b9); } } }else{ if(this.m_oCognosViewer){ this.findSelectionURLs(); _2b6=""; _2b4=_2b1.length; for(_2b5=0;_2b5<_2b4;_2b5++){ _2b6=_2b1[_2b5].getCellRef(); if(_2b6.getAttribute("oldClassName")!=null){ _2b6.className=_2b6.getAttribute("oldClassName"); _2b6.removeAttribute("oldClassName"); } this.setStyleForSelection(_2b1[_2b5].m_contextIds); if(!this.secondarySelectionIsDisabled()||_2b2){ var _2ba=document.getElementById("CVReport"+this.getNamespace()); var _2bb=getElementsByAttribute(_2ba,["td","th"],"name",_2b6.getAttribute("name"),this.m_maxSecondarySelection); for(var _2bc=0;_2bc<_2bb.length;_2bc++){ var cell=_2bb[_2bc]; if(_2b2){ this.restoreOldBackgroundImage(cell); }else{ if(cell.getAttribute("oldBackgroundImageStyle")==null){ this.saveOldCellStyles(cell); this.setSecondarySelectionStyles(cell); } } } } this.saveOldCellStyles(_2b6); if(_2b2){ this.restoreOldBackgroundImage(_2b6); if(this.m_oCognosViewer.isHighContrast()){ this.restoreOldBorder(_2b6); this.restoreOldPadding(_2b6); } }else{ this.setPrimarySelectionStyles(_2b6); if(this.m_oCognosViewer.isHighContrast()){ var size=getBoxInfo(_2b6,true); this.saveOldBorder(_2b6); this.saveOldPadding(_2b6,size); var _2bf=3; var _2c0=size.borderTopWidth+size.paddingTop-_2bf; var _2c1=size.borderBottomWidth+size.paddingBottom-_2bf; var _2c2=size.borderLeftWidth+size.paddingLeft-_2bf; var _2c3=size.borderRightWidth+size.paddingRight-_2bf; _2b6.style.border=_2bf+"px "+this.getHighContrastBorderStyle()+" black"; _2b6.style.padding=_2c0+"px "+_2c3+"px "+_2c1+"px "+_2c2+"px"; } } } } } } return true; } catch(e){ return false; } }; CSelectionController.prototype.findSelectionURLs=function(){ if(!(this.sS_backgroundImageURL&&this.pS_backgroundImageURL)){ if(this.m_oCognosViewer.isBux||isSafari()||this.m_oCognosViewer.isMobile()){ this.pS_backgroundImageURL="url(../common/images/selection_primary.png)"; this.sS_backgroundImageURL="url(../common/images/selection_secondary.png)"; }else{ this.pS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("primarySelection")); this.sS_backgroundImageURL=this.getBackgroundImage(getStyleFromClass("secondarySelection")); } } }; CSelectionController.prototype.setSelectedChartImgArea=function(_2c4){ var _2c5=true; var _2c6=_2c4.getAttribute("rsvpChart"); var _2c7=_2c4.parentNode.getAttribute("chartContainer"); if(_2c6!="true"&&_2c7!="true"){ this.m_selectedChartNodes=[]; _2c5=false; }else{ var _2c8=this.getSelectionObjectFactory().getSelectionChartObject(_2c4); this.m_selectedChartNodes=[_2c8]; } return _2c5; }; CSelectionController.prototype.setSelectedChartArea=function(_2c9,e){ var _2cb=typeof this.m_oCognosViewer.isBux!=="undefined"; var _2cc=false; if(_2c9!==null){ if(_2c9.tagName=="IMG"){ _2cc=this.setSelectedChartImgArea(_2c9); }else{ if(_2c9.nodeName=="AREA"&&_2c9.attributes["ctx"]){ _2cc=true; if(_2cb){ this.setBuxSelectedChartArea(_2c9,e); }else{ this.m_selectedChartNodes=[this.getSelectionObjectFactory().getSelectionChartObject(_2c9)]; } } } if(_2cc){ this.getObservers().notify(); } } return _2cc; }; CSelectionController.prototype.setBuxSelectedChartArea=function(_2cd,e){ var _2cf=this.getChartHelper(_2cd); var _2d0=_2cf.getChartNode(_2cd); this.setStyleForSelection(_2d0.m_contextIds); var _2d1=_2cf.getImageMapHighlighter(); _2d1.setFillColour(this.getPrimarySelectionColor()); _2d1.setStrokeColour(this.getPrimarySelectionColor()); if(typeof e=="undefined"){ e={}; } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ if(_2d1.isAreaHighlighted(_2cd)){ _2d1.hideAreas(_2d0.getCtxAreas()); var _2d2=_2cd.getAttribute("ctx"); var _2d3=this.m_selectedChartNodes.length; for(var i=0;i<_2d3;i++){ var _2d5=this.m_selectedChartNodes[i]; if(_2d2==_2d5.getContext()){ this.m_selectedChartNodes.splice(i,1); break; } } }else{ this.updateSelectionContainer(_2cd); _2d1.highlightAreas(_2d0.getCtxAreas(),true); this.m_selectedChartNodes.push(_2d0); } }else{ if(this.hasSavedSelectedChartNodes()){ var _2d6=this.m_savedSelectedChartNodes.length; var _2d7=this.m_savedSelectedChartNodes; for(var i=0;i<_2d6;i++){ var area=_2d7[i].getArea(); var _2d9=this.getSavedChartHelper(area); var _2da=_2d9.getImageMapHighlighter(); var _2db=_2da.getAreaId(area); if(_2d1.getAreaId(_2cd)===_2db){ _2da.hideAreaById(_2db+this.m_savedPrimarySelectionColor); break; } } } this.updateSelectionContainer(_2cd); _2d1.highlightAreas(_2d0.getCtxAreas()); this.m_selectedChartNodes=[_2d0]; } }; CSelectionController.prototype.updateSelectionContainer=function(_2dc){ var _2dd=_2dc.parentNode; if(this.m_selectionContainerMap&&this.m_selectionContainerMap.name!=_2dd.name){ var _2de=this.getChartHelper(_2dc).getImageMapHighlighter(); _2de.hideAllAreas(); } this.m_selectionContainerMap=_2dd; }; CSelectionController.prototype.getChartHelper=function(_2df){ var _2e0=_2df.parentNode; var _2e1=_2e0.name; if(!this.m_chartHelpers[_2e1]){ this.m_chartHelpers[_2e1]=new CChartHelper(_2df,this.getSelectionObjectFactory(),this.m_oCognosViewer); } return this.m_chartHelpers[_2e1]; }; CSelectionController.prototype.getSavedChartHelper=function(_2e2){ var _2e3=_2e2.parentNode; var _2e4=_2e3.name; return this.m_savedChartHelpers[_2e4]; }; CSelectionController.prototype.getSelectedChartArea=function(){ return this.m_selectedChartArea; }; CSelectionController.prototype.getSelectedChartNodes=function(){ return this.m_selectedChartNodes; }; CSelectionController.prototype.hasSelectedChartNodes=function(){ return this.m_selectedChartNodes&&this.m_selectedChartNodes.length&&this.m_selectedChartNodes.length>0; }; CSelectionController.prototype.getSelectedChartImage=function(){ var _2e5=null; if(this.hasSelectedChartNodes()){ var _2e6=this.m_selectedChartNodes[0]; _2e5=_2e6.getArea(); } if(_2e5===null){ return null; } if(_2e5.tagName=="IMG"){ return _2e5; } return this.getSelectedChartImageFromChartArea(_2e5); }; CSelectionController.prototype.getSelectedChartImageFromChartArea=function(_2e7){ var _2e8=_2e7.parentNode; var _2e9="#"+_2e8.getAttribute("name"); return this.checkChildrenForChart(_2e8.parentNode,_2e9); }; CSelectionController.prototype.checkChildrenForChart=function(_2ea,_2eb){ var _2ec=_2ea.firstChild; while(_2ec!==null){ if(!_2ec.tagName){ return null; }else{ if(_2ec.tagName=="IMG"&&_2ec.getAttribute("usemap")==_2eb){ return _2ec; }else{ if(_2ec.tagName==="DIV"||_2ec.tagName==="SPAN"){ var _2ed=this.checkChildrenForChart(_2ec,_2eb); if(_2ed){ return _2ed; } } } } _2ec=_2ec.nextSibling; } return null; }; CSelectionController.prototype.downloadSelectedChartImage=function(_2ee){ var _2ef=this.getSelectedChartImage(); if(_2ef!==null){ var _2f0=this.getDocumentFromImage(_2ef); var _2f1=_2ef.name.replace(".","_"); var _2f2=_2f1.substr(5); var _2f3="?m_name="; _2f3+=_2f2; _2f3+="&format=png&b_action=xts.run&m=portal/download.xts&m_obj="; if(isIE()){ _2f1=_2f0.parentWindow.eval("graphicSrc"+_2f2); }else{ _2f1=_2f0.defaultView.eval("graphicSrc"+_2f2); } var _2f4=""; if(typeof _2f1!="undefined"&&_2f1!==null){ var _2f5=_2f1.split("&"); if(_2f5.length===0){ return; } if(_2f1.indexOf("/repository/")<0){ for(var i=0;i<_2f5.length;++i){ var _2f7=_2f5[i]; var _2f8=_2f7.indexOf("="); if(_2f8!=-1){ var _2f9=_2f7.substr(0,_2f8); var _2fa=_2f7.slice(_2f8+1); if(_2f9=="search"){ _2f4+=_2fa; break; } } } } if(_2f4==""){ _2f3=_2ef.getAttribute("src"); if(_2f3.indexOf("?")!=-1){ _2f3+="&download=true"; }else{ _2f3+="?download=true"; } } if(typeof getConfigFrame=="function"){ _2f3+=_2f4; _2f3=getConfigFrame().constructGETRequestParamsString(_2f3); window.open(_2f3,"_blank","width=0,height=0"); }else{ _2f3=constructGETRequestParamsString(_2f3); _2f3+=_2f4; var _2fb=this.m_oCognosViewer.getGateway(); var _2fc=document.getElementById("CVIFrame"+this.m_sNamespace); if(_2fc){ var _2fd=_2fc.src; if(_2fd.indexOf("repository")>=0&&_2f3.indexOf("repository")<0){ var _2fe=_2fd.indexOf("content"); _2f3=_2fd.substring(0,_2fe)+_2f3; } } if(_2f3.indexOf(_2fb)==-1){ var _2ff=document.forms["formWarpRequest"+_2ee]; _2f3=_2ff.action+_2f3; } if(typeof window.detachLeavingRV=="function"){ window.detachLeavingRV(); } location.href=_2f3; if(typeof window.attachLeavingRV=="function"){ setTimeout(window.attachLeavingRV,100); } } } } }; CSelectionController.prototype.getDocumentFromImage=function(_300){ var _301=null; if(_300.ownerDocument){ _301=_300.ownerDocument; }else{ _301=_300.document; } return _301; }; CSelectionController.prototype.shouldExecutePageClickedOnMouseDown=function(e){ var _303=this.getSelections(); if(_303.length>1){ if(this.m_oCognosViewer.envParams["ui.action"]!=="view"){ var node=getNodeFromEvent(e); try{ while(node&&(node.nodeType==3||(node.getAttribute&&node.getAttribute("uid")===null))){ node=node.parentNode; } } catch(ex){ } var _305=this.getSelectionObjectFactory().getContainerType(node); if(_305==="list"){ for(var i=0;i<_303.length;i++){ if(_303[i].m_oCellRef==node){ return false; } } } } } return true; }; CSelectionController.prototype.getContainerType=function(){ var _307=""; if(this.hasSelectedChartNodes()){ _307="chart"; }else{ if(this.getDataContainerType()==="list"){ _307="list"; }else{ _307="crosstab"; } } return _307; }; CSelectionController.prototype.getDisplayValues=function(){ var _308={}; var _309=this.getAllSelectedObjects()[0]; if(_309){ var _30a=_309.getSelectedContextIds(); if(_30a){ for(var axis=0;axis<_30a.length;axis++){ var _30c=[]; var _30d=_30a[axis]; for(var _30e=0;_30e<_30d.length;_30e++){ var _30f=_30d[_30e]; var _310=this.getDisplayValue(_30f); _30c.push(_310); if(axis===0){ break; } } var _311=""; switch(axis){ case 0: _311="selected"; break; case 1: _311="rows"; break; default: _311="columns"; } _308[_311]=_30c; } } } return _308; }; CSelectionController.prototype.getChartTooltip=function(){ var _312=this.getAllSelectedObjects()[0]; if(_312){ var area=_312.getArea(); if(area){ var _314=area.getAttribute("title"); if(_314&&_314.length>0){ return area.getAttribute("title"); } } } return ""; }; CSelectionController.prototype.pageClickedForMobile=function(e){ this.pageClicked(e); var _316=this.getAllSelectedObjects().length; if(_316==0){ var node=getNodeFromEvent(e,true); if(!node){ return false; } if(node.nodeName.toLowerCase()=="img"&&node.getAttribute("dttargets")){ this.selectDrillThroughImage(node); return true; }else{ if(node.getAttribute("dttargets")){ this.selectDrillThroughSingleton(node); return true; }else{ if(node.parentNode&&node.parentNode.getAttribute("dttargets")){ this.selectDrillThroughSingleton(node.parentNode); return true; } } } return false; } return true; }; CSelectionController.prototype.clearSavedSelections=function(){ this.m_bSavedSelections=false; if(this.hasSavedSelectedObjects()){ this.updateUI(null,this.getSavedSelectedObjects(),true,false); delete (this.m_aSavedSelectedObjects); } if(this.hasSavedSelectedChartNodes()){ var _318=this.m_savedChartHelpers; for(var _319 in _318){ if(_318[_319]){ var _31a=_318[_319].getImageMapHighlighter(); if(_31a.hideAllAreas){ _31a.hideAllAreas(); } } } delete this.m_savedChartHelpers; delete this.m_savedSelectedChartNodes; } }; CSelectionController.prototype.hasSavedSelectedChartNodes=function(){ return (this.m_savedSelectedChartNodes&&this.m_savedSelectedChartNodes.length>0); }; CSelectionController.prototype.getSavedSelectedChartNodes=function(){ return this.m_savedSelectedChartNodes; }; CSelectionController.prototype.saveSelections=function(){ this.m_savedSelectionStyles=this.m_selectionStyles; if(this.m_aSelectedObjects.length>0){ this.m_aSavedSelectedObjects=[]; var _31b=this.m_aSelectedObjects.length; var temp=[]; for(var i=0;i<_31b;i++){ if(this.isMeasure(this.m_aSelectedObjects[i].m_contextIds[0][0])){ temp.push(this.m_aSelectedObjects[i]); }else{ this.m_aSavedSelectedObjects.push(this.m_aSelectedObjects[i]); } } this.m_aSelectedObjects=temp; } if(this.hasSelectedChartNodes()){ this.m_savedChartHelpers=this.m_chartHelpers; this.m_chartHelpers={}; this.m_savedSelectedChartNodes=[]; var _31e=this.m_selectedChartNodes.length; var temp=[]; for(var i=0;i<_31e;i++){ if(this.isMeasure(this.m_selectedChartNodes[i].m_contextIds[0][0])){ var _31f=this.m_selectedChartNodes[i].getArea(); var _320=this.getImageMapName(_31f); this.m_chartHelpers[_320]=this.m_savedChartHelpers[_320]; delete this.m_savedChartHelpers[_320]; temp.push(this.m_selectedChartNodes[i]); }else{ this.m_savedSelectedChartNodes.push(this.m_selectedChartNodes[i]); } } this.m_selectedChartNodes=temp; } this.m_bSavedSelections=true; }; CSelectionController.prototype.hasSavedSelections=function(){ return this.m_bSavedSelections; }; CSelectionController.prototype.hasSavedSelectedObjects=function(){ return (this.m_aSavedSelectedObjects&&this.m_aSavedSelectedObjects.length>0)||this.hasSavedSelectedChartNodes(); }; CSelectionController.prototype.getSavedSelectedObjects=function(){ return this.m_aSavedSelectedObjects; }; CSelectionController.prototype.getImageMapName=function(_321){ var _322=_321.parentNode; return _322.name; }; CSelectionController.prototype.repaintBUXSelectedChartArea=function(_323,_324,_325){ var _326={}; var _327=_323.length; for(var i=0;i<_327;i++){ var _329=_323[i].getArea(); var _32a=this.getImageMapName(_329); var _32b; if(!_326[_32a]){ _32b=(_324)?this.getSavedChartHelper(_329):this.getChartHelper(_329); _326[_32a]=_32b; var _32c=_32b.getImageMapHighlighter(); _32c.hideAllAreas(); _32c.setFillColour(this.getPrimarySelectionColor()); _32c.setStrokeColour(this.getPrimarySelectionColor()); }else{ _32b=_326[_32a]; } var _32d=_323[i].m_contextIds; if(_325&&_32d.length===1&&_32d[0].length===1&&this.isMeasure(_32d[0][0])){ continue; } _32c.highlightAreas(_323[i].getCtxAreas(),1); } }; CSelectionController.prototype.repaintSavedSelections=function(){ var _32e=this.m_selectionStyles; this.m_selectionStyles=this.m_savedSelectionStyles; var _32f=this.getSavedSelectedChartNodes(); var _330=false; if(_32f&&_32f.length>0){ bIsChart=true; }else{ _32f=this.getSavedSelectedObjects(); } this.repaintSelectionsHelper(_32f,true,_330); this.resetSelectionStyles(); this.m_selectionStyles=_32e; }; CSelectionController.prototype.repaintSelections=function(){ var _331=this.getSelectedChartNodes(); var _332=false; if(_331&&_331.length>0){ _332=true; }else{ _331=this.getSelections(); } this.repaintSelectionsHelper(_331,false,_332); }; CSelectionController.prototype.repaintSelectionsHelper=function(_333,_334,_335){ try{ if(_335){ this.repaintBUXSelectedChartArea(_333,_334); }else{ this.updateUI(document,_333,true,false); this.updateUI(document,_333,false,false); } } catch(e){ return false; } }; CSelectionController.prototype.resetAll=function(){ this.resetSelectionStyles(); this.clearSavedSelections(); this.resetSelections(); this.resetAllowHorizontalDataValueSelection(); }; CSelectionController.prototype.pageClicked=function(e){ try{ var node=getNodeFromEvent(e); if(this.m_aSelectedObjects.length>0&&!this.shiftKeyPressed(e)&&!this.ctrlKeyPressed(e)){ var _338=node; if(!_338.getAttribute("uid")){ var _339=_338.parentNode; if(_339&&_339.nodeType==1&&typeof _339.getAttribute!="undefined"&&_339.getAttribute("uid")!=null){ _338=_339; } } if(this.isCellSelected(_338)){ if(typeof this.m_oCognosViewer.isBux!=="undefined"){ this.repaintSelections(); } if(e.button!==0){ return false; } } } if(node.tagName&&node.tagName.toUpperCase()=="INPUT"){ return true; } if((e.keyCode!=null)&&(e.keyCode!=13)&&(e.keyCode!=32)&&(e.keyCode!=27)&&(e.keyCode!=0)&&(e.keyCode!=121)&&(e.keyCode!=93)){ return false; } var _33a=getDocumentFromEvent(e); if(!this.hasContextData()||!this.hasMetadata()){ if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute=="function"&&node.getAttribute("flashChart")!=null)){ this.setSelectedChartArea(node,e); } this.getObservers().notify(); return false; } if(typeof node.selectedCell!="undefined"){ var _33b=node; node=node.selectedCell; _33b.removeAttribute("selectedCell"); } if(typeof cf!="undefined"&&typeof cf.hidePickers=="function"){ cf.hidePickers(); } if(e.keyCode==27){ if(typeof g_reportSelectionController!="undefined"){ g_reportSelectionController.clearSelections(); } this.resetSelections(_33a); }else{ if(node.nodeName=="AREA"||node.nodeName=="IMG"||(typeof node.getAttribute!="undefined"&&node.getAttribute("flashChart")!=null)){ if(e.button!==2||this.getAllSelectedObjects().length<=1||typeof this.m_oCognosViewer.isBux==="undefined"){ this.selectNode(node,e); this.setSelectedChartArea(node,e); } }else{ if(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null)){ var _33c=this.m_oCognosViewer.getViewerWidget(); this.selectNode(node,e); } } } if(window.gViewerLogger){ window.gViewerLogger.addContextInfo(this); } } catch(e){ } }; CSelectionController.prototype.getSelectionObjectFactory=function(){ return this.m_oSelectionObjectFactory; }; CSelectionController.prototype.isDrillLinkOnCrosstabCell=function(node){ return (node.getAttribute("ctx")==null&&node.parentNode.getAttribute("dtTargets")!=null); }; CSelectionController.prototype.selectObject=function(sMun,sLun,sHun,_341){ var _342=this.getCtxIdFromMun(sMun); if(_342==""){ _342=this.getCtxIdFromMetaData(sLun,sHun,_341); } if(_342!=null&&this.m_oCDManager.GetUsage(_342)!="2"){ var _343=document.getElementById("rt"+this.getNamespace()); if(_343!=null){ var _344=getElementsByAttribute(_343,"*","ctx",_342); if(_344&&_344.length===0){ var _345=new RegExp("(^|:)"+_342+"(:|$)","i"); _344=getElementsByAttribute(_343,"*","ctx",_342,-1,_345); } var _346=null; if(_344!=null&&_344.length>0){ _346=new CSelectionObject(); _346.setSelectionController(this); _346.m_sColumnRef=_344[0].getAttribute("cid"); _346.m_sCellTypeId=_344[0].getAttribute("uid"); _346.m_sLayoutType=_344[0].getAttribute("type"); _346.m_sTag=_344[0].getAttribute("tag"); _346.m_layoutElementId=this.m_oSelectionObjectFactory.getLayoutElementId(_344[0]); _346.m_dataContainerType=this.m_oSelectionObjectFactory.getContainerType(_344[0]); _346.m_contextIds=[[_342]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346; }else{ var _347=getElementsByAttribute(_343,"*","flashChart","true"); if(_347!=null){ for(var _348=0;_348<_347.length;++_348){ var ldx=_347[_348].getLDX(); if(ldx.indexOf(""+_342+"")!=-1){ _346=new CSelectionObject(); _346.setSelectionController(this); var lid=_347[_348].getAttribute("lid"); _346.m_layoutElementId=lid.replace(this.m_oCognosViewer.getId(),""); _346.m_dataContainerType="chart"; _346.m_contextIds=[[_342]]; this.m_aSelectedObjects[this.m_aSelectedObjects.length]=_346; } } } } } } }; CSelectionController.prototype.buildSelectionObject=function(node,e){ var _34d=null; try{ while(node.nodeType==3){ node=node.parentNode; } if(this.isDrillLinkOnCrosstabCell(node)){ node=node.parentNode; } var ctx=node.getAttribute("ctx"); var uid=node.getAttribute("uid"); if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"&&node.parentNode.getAttribute("uid")!=null))){ if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){ return null; } node=node.parentNode; if((node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV")||(node.getAttribute("dtTargets")!=null)){ node=node.parentNode; } uid=node.getAttribute("uid"); } if(uid!=null){ var _350=node.childNodes; for(var i=0;i<_350.length;i++){ if(_350[i].nodeName.toUpperCase()=="TABLE"&&(_350[i].className=="ls"||_350[i].className=="xt")){ var trs=_350[i].rows; for(var j=0;j0){ _360=true; } if(this.hasCutColumns()==true){ this.clearSelectedObjects(_35d); }else{ this.resetSelections(_35d); this.repaintSavedSelections(); if(typeof cf!="undefined"&&typeof cf.removeAllSelectionsFromCfgVariables=="function"){ cf.removeAllSelectionsFromCfgVariables(); } this.m_oCognosViewer.setCurrentNodeFocus(null); } if(this.ctrlKeyPressed(e)||this.shiftKeyPressed(e)){ clearTextSelection(_35d); } if(typeof g_reportSelectionController!="undefined"&&_361==false){ if(g_reportSelectionController.getSelections().length>0){ _360=true; } g_reportSelectionController.clearSelections(); } } var _362=node.getAttribute("dtTargets")?node:null; var _363=(node.nodeName.toLowerCase()==="area"); if((uid==null)&&((ctx!=null)||(node.parentNode&&node.parentNode.nodeType==1&&typeof node.parentNode.getAttribute!="undefined"))){ if(node.nodeName=="IMG"&&(node.src.indexOf("SM=")>-1||(isIE()>-1&&node.src.indexOf("space.gif")>-1))){ return false; } var _364; var _365=3; do{ node=node.parentNode; if(node){ _362=(!_362&&typeof node.getAttribute!="undefined"&&node.getAttribute("dtTargets"))?node:_362; uid=(typeof node.getAttribute!="undefined")?node.getAttribute("uid"):null; _364=node.nodeName.toLowerCase(); } }while((uid==null)&&node&&(--_365>0)&&(_364=="span"||_364=="div")); } if(uid!=null){ var _366=node.childNodes; for(var i=0;i<_366.length;i++){ if(_366[i].nodeName.toUpperCase()=="TABLE"&&(_366[i].className=="ls"||_366[i].className=="xt")){ var trs=_366[i].rows; for(var j=0;j0){ var _36e=_36d[_36d.length-1]; if(_36e.getLayoutType()==_36c.getLayoutType()&&(_36e.getCellRef().parentNode.parentNode==_36c.getCellRef().parentNode.parentNode)){ if(this.cellsAreInSameColumn(_36e.getCellRef(),_36c.getCellRef())){ this.selectVertical(_36e,_36c,_35d); }else{ if(_36e.getCellRef().parentNode.rowIndex==_36c.getCellRef().parentNode.rowIndex){ this.selectHorizontal(_36e,_36c,_35d); } } } } clearTextSelection(_35d); }else{ if(this.ctrlKeyPressed(e)){ clearTextSelection(_35d); } } this.addSelectionObject(_36c,_35d); if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_36c.getColumnName()); } this.m_oCognosViewer.setCurrentNodeFocus(node); }else{ if(this.ctrlKeyPressed(e)){ this.removeSelectionObject(_36c,_35d); if(typeof cf!="undefined"&&typeof cf.removeSelectionFromCfgVariables=="function"){ if(!this.isColumnSelected(_36c.getTag())){ cf.removeSelectionFromCfgVariables(_36c.getTag()); } } clearTextSelection(_35d); }else{ if(this.shiftKeyPressed(e)){ clearTextSelection(_35d); } } } _360=true; }else{ if(_361){ var _36f=null; while((typeof node.id=="undefined"||node.id==null||node.id=="")&&node.parentNode!=null){ node=node.parentNode; } if(node.id=="reportTitle"){ _36f="TitleStyle"; }else{ if(node.id=="reportSubtitle"){ _36f="SubtitleStyle"; }else{ if(node.id.indexOf("reportFilter")==0){ _36f="FilterStyle"; } } } if(_36f!=null){ selectReportElement(e,node.id,_36f); _360=true; } }else{ if(_362!=null&&this.m_oCognosViewer&&this.m_oCognosViewer.isMobile()&&!_363){ var _36c=this.getSelectionObjectFactory().getSelectionObject(_362); this.addSelectionObject(_36c,_35d); } } } if(_360==true&&(typeof cf!="undefined"&&typeof cf.refreshDialog=="function")){ cf.refreshDialog(); } } catch(ex){ } }; CSelectionController.prototype.selectDrillThroughImage=function(node){ this.m_oSelectedDrillThroughImage=node; }; CSelectionController.prototype.getSelectedDrillThroughImage=function(){ return this.m_oSelectedDrillThroughImage?this.m_oSelectedDrillThroughImage:null; }; CSelectionController.prototype.selectDrillThroughSingleton=function(node){ this.m_oSelectedDrillThroughSingleton=node; }; CSelectionController.prototype.getSelectDrillThroughSingleton=function(){ return this.m_oSelectedDrillThroughSingleton?this.m_oSelectedDrillThroughSingleton:null; }; CSelectionController.prototype.getReportContextDataArray=function(){ return this.m_aReportContextDataArray; }; CSelectionController.prototype.getReportMetadataArray=function(){ return this.m_aReportMetadataArray; }; CSelectionController.prototype.setupContextDataArray=function(_372){ this.m_aReportContextDataArray=_372; }; CSelectionController.prototype.setupMetaDataArray=function(_373){ this.m_aReportMetadataArray=_373; }; CSelectionController.prototype.addContextData=function(_374){ this.m_aSelectedObjects=[]; this.m_oCDManager.SetContextData(_374); if(!this.m_bUsingCCDManager){ this.m_bUsingCCDManager=true; } for(var i=0;i2){ _383=parseInt(_384[2],10); } }else{ _383=parseInt(this.m_oCDManager.GetDataType(_382),10); } return _383; }; CSelectionController.prototype.getUsageInfo=function(_385){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetUsage(_385); } }; CSelectionController.prototype.isMeasure=function(_386){ return (this.getUsageInfo(_386)==this.c_usageMeasure); }; CSelectionController.prototype.getDepth=function(_387){ var _388=null; if(!this.m_bUsingCCDManager){ var _389=this.getRDI(_387); if(_389&&_389.length>5&&_389[1]=="R"){ _388=_389[5]; } }else{ _388=this.m_oCDManager.GetDepth(_387); } return _388; }; CSelectionController.prototype.getUseValue=function(_38a){ var _38b=""; if(!this.m_bUsingCCDManager){ var _38c=this.m_aReportContextDataArray[_38a]; if(typeof _38c[1]!="undefined"){ _38b=_38c[1]; } }else{ _38b=this.m_oCDManager.GetDisplayValue(_38a); } return _38b; }; CSelectionController.prototype.getTextValue=function(_38d){ var _38e=null; for(var _38f=0;_38f<_38d.length;_38f++){ if(_38d[_38f].style.visisbility!="hidden"){ if(isIE()){ _38e=_38d[_38f].innerText; }else{ _38e=_38d[_38f].textContent; } var _390=_38d[_38f].nextSibling; while(_390!=null){ if(_390.nodeName.toUpperCase()=="SPAN"&&_390.style.visibility!="hidden"){ if(isIE()){ _38e+=_390.innerText; }else{ _38e+=_390.textContent; } } _390=_390.nextSibling; } break; } } return _38e; }; CSelectionController.prototype.getDisplayValueFromDOM=function(_391,_392){ var _393=null; var _394; var _395=new RegExp("(^|\\s)"+_391+"(\\s|$|:)","i"); if(typeof _392!="undefined"){ _394=getElementsByAttribute(_392,["span","td","th"],"ctx",_391,1,_395); }else{ var _396=document.getElementById("CVIFrame"+this.m_sNamespace); if(typeof _396=="undefined"||_396==null){ var _397=document.getElementById("RVContent"+this.m_sNamespace); if(typeof _397=="undefined"||_397==null){ _394=getElementsByAttribute(document.body,["span","td","th"],"ctx",_391,1,_395); }else{ _394=getElementsByAttribute(_397,["span","td","th"],"ctx",_391,1,_395); } }else{ _394=getElementsByAttribute(_396.contentWindow.document.body,["span","td","th"],"ctx",_391,1,_395); } } var _398; if(_394.length>0&&(_394[0].nodeName.toUpperCase()=="TD"||_394[0].nodeName.toUpperCase()=="TH")){ _398=_394[0].childNodes; }else{ _398=_394; } if(_398.length==0||(_398[0].className.indexOf("chart_area")==-1&&_398[0].className.indexOf("bux-comment")==-1)){ _393=this.getTextValue(_398); } return _393; }; CSelectionController.prototype.getDisplayValue=function(_399,_39a){ var _39b=this.getDisplayValueFromDOM(_399,_39a); if(_39b==null){ _39b=this.getUseValue(_399); } return _39b; }; CSelectionController.prototype.getDun=function(_39c){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetDUN(_39c); }else{ var _39d=this.m_aReportContextDataArray[_39c]; if(_39d&&typeof _39d[5]!="undefined"){ var _39e=_39d[5]; var _39f=this.m_aReportMetadataArray[_39e]; if(typeof _39f!="undefined"&&typeof _39f[1]!="undefined"&&_39f[1]=="D"){ return _39f[0]; } } } }; CSelectionController.prototype.getPun=function(_3a0){ if(this.m_bUsingCCDManager){ return this.m_oCDManager.GetPUN(_3a0); } }; CSelectionController.prototype.getLun=function(_3a1){ var lun=""; if(!this.m_bUsingCCDManager){ var _3a3=this.m_aReportContextDataArray[_3a1]; if(_3a3&&typeof _3a3[3]!="undefined"){ var _3a4=_3a3[3]; var _3a5=this.m_aReportMetadataArray[_3a4]; if(typeof _3a5!="undefined"&&typeof _3a5[1]!="undefined"&&_3a5[1]=="L"){ lun=_3a5[0]; } } }else{ lun=this.m_oCDManager.GetLUN(_3a1); } return lun; }; CSelectionController.prototype.isContextId=function(_3a6){ var _3a7=false; if(!this.m_bUsingCCDManager){ var _3a8=this.m_aReportContextDataArray[_3a6]; _3a7=(typeof _3a8=="object"); }else{ this.m_oCDManager.FetchContextData([_3a6]); _3a7=this.m_oCDManager.ContextIdExists(_3a6); } return _3a7; }; CSelectionController.prototype.hasContextData=function(){ var _3a9=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportContextDataArray&&this.m_aReportContextDataArray.length&&this.m_aReportContextDataArray.length()>0){ return true; } }else{ _3a9=this.m_oCDManager.HasContextData(); } return _3a9; }; CSelectionController.prototype.hasMetadata=function(){ var _3aa=false; if(!this.m_bUsingCCDManager){ if(this.m_aReportMetadataArray&&this.m_aReportMetadataArray.length&&this.m_aReportMetadataArray.length()>0){ return true; } }else{ _3aa=this.m_oCDManager.HasMetadata(); } return _3aa; }; CSelectionController.prototype.getDifferentCellIndex=function(_3ab,_3ac,_3ad){ for(var i=0;i<_3ab.cells.length;i++){ if(this.getSelectionObjectFactory().getSelectionObject(_3ab.cells[i]).getLayoutType()=="datavalue"){ break; } } if(_3ad=="relative"){ return (_3ac-i); }else{ if(_3ad=="actual"){ return (_3ac+i); } } }; CSelectionController.prototype.cellsAreInSameColumn=function(_3af,_3b0){ if(_3af.parentNode.rowIndex==_3b0.parentNode.rowIndex){ return false; } if(_3af.getAttribute("cid")===null){ if(_3af.getAttribute("uid")===_3b0.getAttribute("uid")){ if(_3af.getAttribute("type")!="datavalue"){ return true; }else{ if(this.getDifferentCellIndex(_3af.parentNode,_3af.cellIndex,"relative")==this.getDifferentCellIndex(_3b0.parentNode,_3b0.cellIndex,"relative")){ return true; } } }else{ return false; } }else{ if(_3af.getAttribute("cid")===_3b0.getAttribute("cid")){ return true; }else{ return false; } } }; CSelectionController.prototype.selectVertical=function(_3b1,_3b2,_3b3){ if(!_3b3){ _3b3=document; } var _3b4=_3b1.getCellRef().parentNode; var _3b5,i; var _3b7=(_3b1.getCellRef().parentNode.rowIndex<_3b2.getCellRef().parentNode.rowIndex); var _3b8=(_3b1.getCellRef().parentNode.cells.length-_3b1.getCellRef().cellIndex); while(_3b4.rowIndex!=_3b2.getCellRef().parentNode.rowIndex){ if(_3b7){ _3b4=_3b4.nextSibling; }else{ _3b4=_3b4.previousSibling; } if(_3b4==null){ break; } if(_3b4.cells.length>=_3b8){ for(i=0;i<_3b4.cells.length;i++){ if((_3b4.cells[i].getAttribute("type")==_3b1.getLayoutType())&&this.cellsAreInSameColumn(_3b1.getCellRef(),_3b4.cells[i])){ _3b5=this.getSelectionObjectFactory().getSelectionObject(_3b4.cells[i]); if(this.addSelectionObject(_3b5,_3b3)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_3b5.getColumnName()); } } break; } } } } }; CSelectionController.prototype.selectHorizontal=function(_3b9,_3ba,_3bb){ var _3bc=""; if(_3b9.getColumnRef()==null){ if(_3b9.getCellRef().getAttribute("uid")==_3ba.getCellRef().getAttribute("uid")){ _3bc=_3b9.getCellRef().getAttribute("uid"); }else{ return; } } var _3bd,_3be; var _3bf=_3ba.getCellRef().parentNode; var _3c0; if(_3ba.getCellRef().cellIndex<_3b9.getCellRef().cellIndex){ _3bd=_3ba.getCellRef().cellIndex; _3be=_3b9.getCellRef().cellIndex; }else{ _3be=_3ba.getCellRef().cellIndex; _3bd=_3b9.getCellRef().cellIndex; } for(var i=_3bd+1;i<_3be;i++){ if(((_3b9.getColumnRef()!=null)&&(_3b9.getLayoutType()==_3ba.getLayoutType())&&(_3b9.getLayoutType()!="datavalue")||this.allowHorizontalDataValueSelection())||((_3b9.getColumnRef()==null)&&(_3bf.cells[i].getAttribute("uid")==_3bc))){ _3c0=this.getSelectionObjectFactory().getSelectionObject(_3bf.cells[i]); if(this.addSelectionObject(_3c0,_3bb)){ if(typeof cf!="undefined"&&typeof cf.addSelectionToCfgVariables=="function"){ cf.addSelectionToCfgVariables(_3c0.getColumnName()); } } } } }; CSelectionController.prototype.pageDoubleClicked=function(e){ try{ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _3c4=node; node=node.selectedCell; _3c4.removeAttribute("selectedCell"); } while(node.nodeType==3){ node=node.parentNode; } var ctx=node.getAttribute("ctx"); var uid=node.getAttribute("uid"); if((ctx!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ node=node.parentNode; if(node.className.toUpperCase()=="BLOCK"&&node.nodeName.toUpperCase()=="DIV"){ node=node.parentNode; } uid=node.getAttribute("uid"); } if(uid!=null&&node.firstChild!=null&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){ if(typeof goWindowManager!="undefined"&&goWindowManager&&typeof goWindowManager.getApplicationFrame=="function"){ goWindowManager.getFeatureManager().launchFeature("Rename"); } } if(typeof g_reportSelectionController!="undefined"){ g_reportSelectionController.clearSelections(); } } catch(ex){ } }; CSelectionController.prototype.getSelectionHoverNodes=function(){ return this.m_aSelectionHoverNodes; }; CSelectionController.prototype.setSelectionHoverNodes=function(_3c7){ this.m_aSelectionHoverNodes=_3c7; }; CSelectionController.prototype.addSelectionHoverNode=function(node){ this.m_aSelectionHoverNodes[this.m_aSelectionHoverNodes.length]=node; }; CSelectionController.prototype.pageHover=function(e){ try{ var node=getNodeFromEvent(e); while(node.nodeType==3){ node=node.parentNode; } if((node.getAttribute("ctx")!=null)||(node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ if(node.parentNode.nodeName.toLowerCase()!="tr"){ node=node.parentNode; } } var _3cb=this.getSelectionHoverNodes(); var _3cc=this.getAllSelectedObjects().length; if(!(_3cb.length==1&&_3cb[0]==node)){ for(var i=0;i<_3cb.length;i++){ this.sortIconHover(_3cb[i],true); if(_3cc==0){ this.pageChangeHover(_3cb[i],true); } } this.setSelectionHoverNodes([]); if(_3cc==0){ this.sortIconHover(node,false); if(this.pageChangeHover(node,false)){ this.addSelectionHoverNode(node); } }else{ if(this.sortIconHover(node,false)){ this.addSelectionHoverNode(node); } } } } catch(ex){ } }; CSelectionController.prototype.sortIconHover=function(node,_3cf){ if(!this.isValidColumnTitle(node)){ return false; } var _3d0=this.getSortImgNode(node); if(_3d0!=null&&_3d0!="undefined"){ if(_3d0.getAttribute("sortOrder")==="nosort"){ if(_3cf){ _3d0.style.visibility="hidden"; }else{ _3d0.style.visibility="visible"; } } return true; } return false; }; CSelectionController.prototype.isValidColumnTitle=function(node){ if(node&&node.parentNode){ var uid=node.getAttribute("uid"); if(uid!=null&&(!(node.firstChild==null&&node.cellIndex==0&&node.parentNode.rowIndex==0&&node.getAttribute("cid")==null))&&(node.getAttribute("type")=="columnTitle"||node.getAttribute("type")=="section")){ return true; } } return false; }; CSelectionController.prototype.pageChangeHover=function(node,_3d4){ try{ if((node.getAttribute("ctx")!=null)||(node.parentNode&&node.parentNode.nodeType==1&&node.parentNode.getAttribute("uid")!=null)){ if(node.parentNode.nodeName.toLowerCase()!="tr"){ node=node.parentNode; } } if(this.isValidColumnTitle(node)){ var _3d5=this.isColumnSelected(node.getAttribute("tag")); if(!_3d5){ _3d5=this.isColumnCut(node.getAttribute("tag")); } if(!_3d5){ if(_3d4){ if(node.getAttribute("oldClassName")!=null){ node.className=node.getAttribute("oldClassName"); node.removeAttribute("oldClassName"); } this.restoreOldBackgroundImage(node); }else{ if(node.getAttribute("oldClassName")!=null){ node.className=node.getAttribute("oldClassName"); }else{ node.setAttribute("oldClassName",node.className); } if(node.getAttribute("oldBackgroundImageStyle")!=null){ node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle"); }else{ this.saveOldCellStyles(node); } node.className+=" hoverSelection"; return true; } } } } catch(ex){ } return false; }; CSelectionController.prototype.getSortImgNode=function(node){ var _3d7=node.getElementsByTagName("img"); for(var i=0;i<_3d7.length;i++){ var sId=_3d7[i].id.toString(); if(sId!=null&&sId.length>0&&sId.indexOf("sortimg")>=0){ node=_3d7[i]; return node; } } return null; }; CSelectionController.prototype.restoreOldPadding=function(node){ if(node&&node.style&&node.getAttribute("oldPaddingStyle")!=null){ if(node.getAttribute("oldPaddingStyle").length>0){ node.style.padding=node.getAttribute("oldPaddingStyle"); } node.removeAttribute("oldPaddingStyle"); } }; CSelectionController.prototype.saveOldPadding=function(node,size){ if(node&&node.getAttribute("oldPaddingStyle")==null){ node.setAttribute("oldPaddingStyle",size.paddingTop+"px "+size.paddingRight+"px "+size.paddingBottom+"px "+size.paddingLeft+"px"); } }; CSelectionController.prototype.saveOldBorder=function(node){ if(node&&node.getAttribute("oldBorderStyle")==null){ node.setAttribute("oldBorderStyle",node.style.border); } }; CSelectionController.prototype.restoreOldBorder=function(node){ if(node&&node.style&&node.getAttribute("oldBorderStyle")!=null){ if(node.getAttribute("oldBorderStyle").length>0){ node.style.border=node.getAttribute("oldBorderStyle"); }else{ node.style.borderColor=node.style.borderWidth=node.style.borderStyle=""; } node.removeAttribute("oldBorderStyle"); } }; CSelectionController.prototype.setPrimarySelectionStyles=function(cell){ if(this.getPrimarySelectionColor()){ cell.style.backgroundColor=this.getPrimarySelectionColor(); }else{ cell.style.backgroundImage=this.pS_backgroundImageURL; cell.style.backgroundRepeat="repeat"; } }; CSelectionController.prototype.setSecondarySelectionStyles=function(cell){ if(this.getSecondarySelectionColor()){ cell.style.backgroundColor=this.getSecondarySelectionColor(); }else{ cell.style.backgroundImage=this.sS_backgroundImageURL; cell.style.backgroundRepeat="repeat"; } }; CSelectionController.prototype.saveOldCellStyles=function(node){ if(node&&node.getAttribute("oldBackgroundImageStyle")==null){ node.setAttribute("oldBackgroundColor",this.getStyleProperty(node,"backgroundColor")); node.setAttribute("oldBackgroundImageStyle",this.getBackgroundImage(node)); node.setAttribute("oldBackgroundRepeat",this.getStyleProperty(node,"backgroundRepeat")); node.style.backgroundImage=""; node.style.backgroundRepeat=""; } }; CSelectionController.prototype.restoreOldBackgroundImage=function(node){ if(node&&node.style&&node.getAttribute("oldBackgroundImageStyle")!=null){ node.style.backgroundImage=node.getAttribute("oldBackgroundImageStyle"); node.removeAttribute("oldBackgroundImageStyle"); node.style.backgroundRepeat=node.getAttribute("oldBackgroundRepeat"); node.removeAttribute("oldBackgroundRepeat"); node.style.backgroundColor=node.getAttribute("oldBackgroundColor"); node.removeAttribute("oldBackgroundColor"); } }; CSelectionController.prototype.getStyleProperty=function(node,_3e4){ if(node&&node.style&&node.style[_3e4]){ return node.style[_3e4]; } return ""; }; CSelectionController.prototype.getBackgroundImage=function(node){ if(node&&node.style){ return node.style.backgroundImage; } return ""; }; CSelectionController.prototype.pageContextClicked=function(e){ var node=getNodeFromEvent(e); if(typeof node.selectedCell!="undefined"){ var _3e8=node; node=node.selectedCell; _3e8.removeAttribute("selectedCell"); } while(node!=null&&node.tagName!="TD"){ node=node.parentNode; } if(node!=null){ var _3e9=this.getBackgroundImage(node); this.findSelectionURLs(); if(this.getSelections().length==0||_3e9!=this.pS_backgroundImageURL){ this.pageClicked(e); } } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } var _3ea=false; if(this.showViewerContextMenu()){ if(typeof e.preventDefault=="function"){ e.preventDefault(); } _3ea=true; } return _3ea; }; CSelectionController.prototype.chartContextMenu=function(e){ if(!this.hasSelectedChartNodes()){ return; } if(typeof populateContextMenu!="undefined"){ populateContextMenu(); moveContextMenu(e); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.titleAreaContextMenu=function(e,_3ed,sId){ if(typeof populateContextMenu!="undefined"){ goWindowManager.getApplicationFrame().cfgSet("contextMenuType",_3ed); goWindowManager.getApplicationFrame().cfgSet("contextMenuId",sId); populateContextMenu(_3ed.toUpperCase()); moveContextMenu(e,_3ed.toUpperCase()); } if(typeof e.preventDefault=="function"){ e.preventDefault(); } return false; }; CSelectionController.prototype.selectionsAreAllSameType=function(){ var _3ef=this.getSelections(); if(_3ef.length>0){ var _3f0=_3ef[0].getLayoutType(); for(var i=1;i<_3ef.length;i++){ if(_3f0!=_3ef[i].getLayoutType()){ return 0; } } return 1; } return -1; }; CSelectionController.prototype.selectionsAreAllOnSameColumn=function(){ var _3f2=this.getSelections(); var i=0; if(_3f2.length>0){ var _3f4=_3f2[0].getColumnRef(); if(_3f4!=null&&_3f4!=""){ for(i=1;i<_3f2.length;i++){ if(_3f4!=_3f2[i].getColumnRef()){ return false; } } }else{ var _3f5=_3f2[0].getCellTypeId(); for(i=1;i<_3f2.length;i++){ if(_3f5!=_3f2[i].getCellTypeId()){ return false; } } } return true; } return false; }; CSelectionController.prototype.checkForReportElementNode=function(node){ if(typeof node!="undefined"&&node!=null&&typeof node.className!="undefined"&&node.className!=null){ if(node.className=="tt"){ if(typeof node.parentNode!="undefined"&&node.parentNode!=null&&typeof node.parentNode.parentNode!="undefined"&&node.parentNode.parentNode!=null&&(node.parentNode.className=="reportSubtitleStyle"||node.parentNode.id=="reportTitleLink")){ node=node.parentNode.parentNode; }else{ return false; } }else{ if(typeof node.parentNode!="undefined"&&node.parentNode!=null){ var _3f7=node.parentNode; while(typeof _3f7!="undefined"&&_3f7!=null){ if(typeof _3f7.className!="undefined"&&_3f7.className!=null&&_3f7.className.substr(0,2)=="ft"){ node=_3f7; break; }else{ _3f7=_3f7.parentNode; } } }else{ return false; } } var _3f8=node.className.substr(0,2); if(_3f8=="ta"||_3f8=="ts"||_3f8=="ft"){ return true; } } return false; }; CSelectionController.prototype.chartClicked=function(_3f9){ this.setSelectedChartArea(_3f9); }; CSelectionController.prototype.processColumnTitleNode=function(_3fa){ if(!_3fa||!this.m_oCognosViewer.isBux){ return; } var _3fb=_3fa.getCellRef(); if(_3fb.getAttribute("contextAugmented")=="true"||"list"!=_3fa.getDataContainerType()||"columnTitle"!=_3fa.getLayoutType()){ return; } var _3fc=_3fa.getSelectedContextIds(); var _3fd=false; if(typeof _3fc=="object"&&_3fc!=null&&_3fc.length>0){ if(this.isRelational(_3fc)&&this.getQueryModelId(_3fc[0][0])==null){ _3fd=true; }else{ return; } } var lid=_3fb.parentNode.parentNode.parentNode.getAttribute("lid"); var _3ff=_3fb.parentNode.nextSibling; var _400=getChildElementsByAttribute(_3ff,"td","cid",_3fb.getAttribute("cid")); var _401=null; var _402=true; var _403; if(_400.length>0){ var _404=_400[0]; var _405=_404.childNodes.length; for(var _406=0;_406<_405;_406++){ var _407=_404.childNodes[_406]; if(_407.getAttribute&&((_407.nodeName.toLowerCase()=="table"&&typeof _407.getAttribute("lid")=="string")||_407.nodeName.toLowerCase()=="map"||_407.nodeName.toLowerCase()=="img"||_407.getAttribute("chartcontainer")=="true")){ if(_406==0){ _402=false; } }else{ _403=[]; if(_407.nodeName.toLowerCase()=="span"){ _403.push(_407); } var _408=_407.getElementsByTagName?_407.getElementsByTagName("span"):[]; for(var _409=0;_409<_408.length;++_409){ if(lid==getImmediateLayoutContainerId(_408[_409])){ _403.push(_408[_409]); } } for(var _40a=0;_40a<_403.length;++_40a){ var _40b=_403[_40a]; if(_40b.nodeType==1&&_40b.nodeName.toLowerCase()=="span"&&_40b.style.visibility!="hidden"){ if(_40b.getAttribute("ctx")!=null&&_40b.getAttribute("ctx")!=""){ _401=_40b.getAttribute("ctx"); break; } } } } } } if(_401!=null){ var _40c=_401.split("::")[0].split(":")[0]; if(!_3fd){ _403=_3fb.getElementsByTagName("span"); if(_403.length!=0){ var _40d=this.m_oCDManager.m_cd[_40c]; var _40e=this.getTextValue(_403); var _40f={"u":_40e===null?"":_40e}; if(typeof _40d!="undefined"){ if(typeof _40d["r"]!="undefined"){ _40f.r=_40d["r"]; } if(typeof _40d["q"]!="undefined"){ _40f.q=_40d["q"]; } if(typeof _40d["i"]!="undefined"){ _40f.i=_40d["i"]; } } var _410="cloned"+_40c; this.m_oCDManager.m_cd[_410]=_40f; _403[0].setAttribute("ctx",_410); _3fa=this.getSelectionObjectFactory().processCTX(_3fa,_410); } }else{ var qmid=this.getQueryModelId(_40c); if(qmid==null){ } if(qmid!=null){ var _412=_3fc[0][0]; this.m_oCDManager.m_cd[_412].i=this.m_oCDManager.m_cd[_40c].i; return false; } } }else{ _402=false; } if(!_402){ _3fb.setAttribute("canSort","false"); } _3fb.setAttribute("contextAugmented","true"); }; CSelectionController.prototype.selectionsInSameDataContainer=function(){ try{ var _413=this.getAllSelectedObjects(); var _414=_413[0].getLayoutElementId(); for(var _415=1;_415<_413.length;_415++){ if(_414!=_413[_415].getLayoutElementId()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsFromSameDataItem=function(){ try{ var _416=this.getAllSelectedObjects(); var _417=_416[0].getDataItems()[0][0]; for(var _418=1;_418<_416.length;_418++){ if(_417!=_416[_418].getDataItems()[0][0]){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isRelational=function(_419){ try{ if(!_419){ var _41a=this.getAllSelectedObjects()[0]; _419=_41a.getSelectedContextIds(); } for(var _41b=0;_41b<_419.length;_41b++){ for(var _41c=0;_41c<_419[_41b].length;_41c++){ var ctx=_419[_41b][_41c]; var mun=this.getMun(ctx); var lun=this.getLun(ctx); var hun=this.getHun(ctx); if(mun!=null&&typeof mun!="undefined"&&mun.length>0){ return false; } if(lun!=null&&typeof lun!="undefined"&&lun.length>0){ return false; } if(hun!=null&&typeof hun!="undefined"&&hun.length>0){ return false; } } } return true; } catch(e){ return true; } return true; }; CSelectionController.prototype.getDataContainerType=function(){ try{ if(!this.getAllSelectedObjects()[0]){ return ""; } return this.getAllSelectedObjects()[0].m_dataContainerType; } catch(e){ return ""; } }; CSelectionController.prototype.areSelectionsColumnRowTitles=function(){ try{ var _421=this.getAllSelectedObjects(); for(var _422=0;_422<_421.length;_422++){ var _423=_421[_422]; if(_423.getLayoutType()!="columnTitle"||_423.isHomeCell()){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsAreMeasures=function(){ try{ var _424=this.getAllSelectedObjects(); for(var _425=0;_425<_424.length;_425++){ var _426=_424[_425]; if(this.getUsageInfo(_426.getSelectedContextIds()[0][0])!=this.c_usageMeasure){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.selectionsNonMeasureWithMUN=function(){ var _427=this.getAllSelectedObjects(); if(_427.length==0){ return false; } for(var _428=0;_428<_427.length;_428++){ var _429=_427[0]; if(_429.getSelectedContextIds().length==0){ return false; } var _42a=_429.getSelectedContextIds()[0][0]; var mun=this.getMun(_42a); var _42c=this.getUsageInfo(_42a); if(mun==null||typeof mun=="undefined"||mun.length==0||_42c==this.c_usageMeasure){ return false; } } return true; }; CSelectionController.prototype.areSelectionsMeasureOrCalculation=function(){ var _42d=this.getAllSelectedObjects(); if(_42d.length==0){ return false; } var _42e=this.selectionsHaveCalculationMetadata(); for(var _42f=0;_42f<_42d.length;_42f++){ var _430=_42d[_42f]; var _431=_430.getSelectedContextIds()[0][0]; if(!this.isCalculationOrMeasure(_431,_42e)){ return false; } } return true; }; CSelectionController.prototype.selectionsHaveCalculationMetadata=function(){ try{ var _432=this.getDataContainerType(); var _433=this.getAllSelectedObjects(); for(var _434=0;_434<_433.length;_434++){ var _435=_433[_434]; var _436=_435.getSelectedContextIds(); var _437=_436[0][0]; var sHun=this.getHun(_437); if(!this.hasCalculationMetadata(_437,_436,_432)){ return false; } } } catch(e){ return false; } return true; }; CSelectionController.prototype.isCalculationOrMeasure=function(_439,_43a){ var mun=this.getMun(_439); var _43c=this.getUsageInfo(_439); if(!(((mun==null||typeof mun=="undefined"||mun.length==0)&&_43a)||_43c==this.c_usageMeasure)){ return false; } return true; }; CSelectionController.prototype.hasCalculationMetadata=function(_43d,_43e,_43f){ var sHun=this.getHun(_43d); if(this.getUsageInfo(_43d)!=this.c_usageMeasure){ if((this.isRelational(_43e)&&this.getQueryModelId(_43d)!=null)||(!this.isRelational(_43e)&&_43f=="list"&&(sHun&&sHun!=""))){ return false; } } return true; }; CSelectionController.prototype.selectionsAreDateTime=function(){ try{ var _441=this.getAllSelectedObjects(); for(var _442=0;_442<_441.length;_442++){ var _443=_441[_442]; var _444=_443.getSelectedContextIds(); var _445=_444[0][0]; var _446=this.getDataType(_445); if(_446&&typeof this.m_ccl_dateTypes[_446]!=="undefined"){ return true; } } } catch(e){ return false; } return false; }; CSelectionController.prototype.getSelectedObjectsJsonContext=function(){ try{ var _447=this.getAllSelectedObjects(); if(_447===null||_447.length<=0){ return null; } var _448=this.m_oCognosViewer.getModelPath(); var _449=[]; for(var i=0;i<_447.length;i++){ var obj=_447[i].getContextJsonObject(this,_448); _449.push(obj); } return _449; } catch(e){ } }; CSelectionController.prototype.destroy=function(){ delete this.m_oCognosViewer; delete this.m_aCutColumns; delete this.m_aSelectedObjects; delete this.m_selectedClass; delete this.m_cutClass; if(this.m_oObserver&&this.m_oObserver.destroy){ this.m_oObserver.destroy(); } delete this.m_oObserver; delete this.m_aReportMetadataArray; delete this.m_aReportContextDataArray; if(this.m_oCDManager&&this.m_oCDManager.destroy){ this.m_oCDManager.destroy(); } delete this.m_oCDManager; if(this.m_oSelectionObjectFactory&&this.m_oSelectionObjectFactory.destroy){ this.m_oSelectionObjectFactory.destroy(); } delete this.m_oSelectionObjectFactory; delete this.m_selectedChartArea; delete this.m_selectedChartNodes; delete this.m_selectionContainerMap; delete this.m_chartHelpers; delete this.m_oJsonForMarshal; if(this.hasSavedSelections()){ this.clearSavedSelections(); } }; function clearTextSelection(_44c){ if(!_44c){ _44c=document; } try{ if(typeof _44c.selection=="object"&&_44c.selection!==null){ _44c.selection.empty(); }else{ if(typeof window.getSelection=="function"&&typeof window.getSelection()=="object"&&window.getSelection()!==null){ window.getSelection().removeAllRanges(); } } } catch(e){ } }; function CDrillThroughTarget(_44d,_44e,_44f,_450,_451,path,_453,_454,_455,_456,_457,_458){ this.m_label=_44d; this.m_outputFormat=_44e; this.m_outputLocale=_44f; this.m_showInNewWindow=_450; this.m_method=_451; this.m_path=path; this.m_bookmark=_453; this.m_parameters=_454; this.m_objectPaths=_455; this.m_prompt="false"; this.m_dynamicDrillThrough=false; this.m_parameterProperties=_458; if(typeof _456!="undefined"&&_456!=null){ if(_456=="yes"){ this.m_prompt="true"; }else{ if(_456=="target"){ this.m_prompt=""; } } } if(typeof _457!="undefined"&&_457!=null){ if(typeof _457=="string"){ _457=_457=="true"?true:false; } this.m_dynamicDrillThrough=_457; } }; function CDrillThroughTarget_getParameterProperties(){ return this.m_parameterProperties; }; function CDrillThroughTarget_getLabel(){ return this.m_label; }; function CDrillThroughTarget_getOutputFormat(){ return this.m_outputFormat; }; function CDrillThroughTarget_getOutputLocale(){ return this.m_outputLocale; }; function CDrillThroughTarget_getShowInNewWindow(){ return this.m_showInNewWindow; }; function CDrillThroughTarget_getMethod(){ return this.m_method; }; function CDrillThroughTarget_getPath(){ return this.m_path; }; function CDrillThroughTarget_getBookmark(){ return this.m_bookmark; }; function CDrillThroughTarget_getParameters(){ return this.m_parameters; }; function CDrillThroughTarget_getObjectPaths(){ return this.m_objectPaths; }; function CDrillThroughTarget_getPrompt(){ return this.m_prompt; }; function CDrillThroughTarget_isDynamicDrillThrough(){ return this.m_dynamicDrillThrough; }; CDrillThroughTarget.prototype.getLabel=CDrillThroughTarget_getLabel; CDrillThroughTarget.prototype.getOutputFormat=CDrillThroughTarget_getOutputFormat; CDrillThroughTarget.prototype.getOutputLocale=CDrillThroughTarget_getOutputLocale; CDrillThroughTarget.prototype.getShowInNewWindow=CDrillThroughTarget_getShowInNewWindow; CDrillThroughTarget.prototype.getMethod=CDrillThroughTarget_getMethod; CDrillThroughTarget.prototype.getPath=CDrillThroughTarget_getPath; CDrillThroughTarget.prototype.getBookmark=CDrillThroughTarget_getBookmark; CDrillThroughTarget.prototype.getParameters=CDrillThroughTarget_getParameters; CDrillThroughTarget.prototype.getObjectPaths=CDrillThroughTarget_getObjectPaths; CDrillThroughTarget.prototype.getPrompt=CDrillThroughTarget_getPrompt; CDrillThroughTarget.prototype.isDynamicDrillThrough=CDrillThroughTarget_isDynamicDrillThrough; CDrillThroughTarget.prototype.getParameterProperties=CDrillThroughTarget_getParameterProperties; function sXmlEncode(_459){ var _45a=""+_459; if((_45a=="0")||((_459!=null)&&(_459!=false))){ _45a=_45a.replace(/&/g,"&"); _45a=_45a.replace(//g,">"); _45a=_45a.replace(/"/g,"""); _45a=_45a.replace(/'/g,"'"); }else{ if(_459==null){ _45a=""; } } return _45a; }; function createFormField(name,_45c){ var _45d=document.createElement("input"); _45d.setAttribute("type","hidden"); _45d.setAttribute("name",name); _45d.setAttribute("value",_45c); return (_45d); }; function setBackURLToCloseWindow(_45e){ var _45f=_45e.childNodes; if(_45f){ for(var _460=0;_460<_45f.length;++_460){ var _461=_45f[_460]; var _462=_461.getAttribute("name"); if(_462&&_462=="ui.backURL"){ _45e.removeChild(_461); } } } _45e.appendChild(createFormField("ui.backURL","javascript:window.close();")); }; function doMultipleDrills(_463,cvId){ if(parent!=this&&parent.doMultipleDrills){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doMultipleDrills(_463,cvId); }else{ if(window.gViewerLogger){ window.gViewerLogger.log("Drill Targets",_463,"text"); } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } var _466=buildDrillForm(oCV); addDrillEnvironmentFormFields(_466,oCV); if(typeof oCV!="undefined"&&oCV!=null){ var _467=oCV.getModelPath(); _466.appendChild(createFormField("modelPath",_467)); var _468=oCV.getSelectionController(); var _469=""; if(typeof getViewerSelectionContext!="undefined"&&typeof CSelectionContext!="undefined"){ _469=getViewerSelectionContext(_468,new CSelectionContext(_467)); } _466.appendChild(createFormField("drillContext",_469)); _466.appendChild(createFormField("modelDrillEnabled",_468.getModelDrillThroughEnabled())); if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _466.appendChild(createFormField("drillSource",document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)); }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _466.appendChild(createFormField("sourceSpecification",oCV.envParams["ui.spec"])); } } } _466.setAttribute("launchGotoPage","true"); _466.appendChild(createFormField("drillTargets",_463)); _466.appendChild(createFormField("invokeGotoPage","true")); _466.appendChild(createFormField("m","portal/drillthrough.xts")); _466.appendChild(createFormField("b_action","xts.run")); var _46a="winNAT_"+(new Date()).getTime(); var _46b=".."; if(oCV!=null){ _46b=oCV.getWebContentRoot(); var _46c=oCV.getExecutionParameters(); if(_46c!=""){ _466.appendChild(createFormField("encExecutionParameters",_46c)); } } if(!oCV||!oCV.launchGotoPageForIWidgetMobile(_466)){ if(oCV&&typeof oCV.launchGotoPage==="function"){ oCV.launchGotoPage(_466); }else{ var _46d=_46b+"/rv/blankDrillWin.html"; _466.target=_46a; window.open(_46d,_46a); } } } }; function buildDrillForm(oCV){ var _46f=document.getElementById("drillForm"); if(_46f){ document.body.removeChild(_46f); } _46f=document.createElement("form"); if(typeof oCV!="undefined"&&oCV!=null){ var _470=document.getElementById("formWarpRequest"+oCV.getId()); _46f.setAttribute("target",_470.getAttribute("target")); _46f.setAttribute("action",_470.getAttribute("action")); }else{ _46f.setAttribute("action",location.pathname); } _46f.setAttribute("id","drillForm"); _46f.setAttribute("name","drillForm"); _46f.setAttribute("method","post"); _46f.style.display="none"; document.body.appendChild(_46f); return _46f; }; function addDrillEnvironmentFormFields(_471,oCV){ if(window.g_dfEmail){ _471.appendChild(createFormField("dfemail",window.g_dfEmail)); } if(oCV!=null){ _471.appendChild(createFormField("cv.id",oCV.getId())); if(typeof oCV.envParams["ui.sh"]!="undefined"){ _471.appendChild(createFormField("ui.sh",oCV.envParams["ui.sh"])); } if(oCV.getViewerWidget()==null){ if(typeof oCV.envParams["cv.header"]!="undefined"){ _471.appendChild(createFormField("cv.header",oCV.envParams["cv.header"])); } if(typeof oCV.envParams["cv.toolbar"]!="undefined"){ _471.appendChild(createFormField("cv.toolbar",oCV.envParams["cv.toolbar"])); }else{ var _473=oCV.getAdvancedServerProperty("VIEWER_PASS_PORTLET_TOOLBAR_STATE_ON_DRILLTHROUGH"); if(oCV.m_viewerFragment&&_473!=null&&_473===true){ var _474=oCV.m_viewerFragment.canShowToolbar()?"true":"false"; _471.appendChild(createFormField("cv.toolbar",_474)); } } } if(typeof oCV.envParams["ui.backURL"]!="undefined"){ _471.appendChild(createFormField("ui.backURL",oCV.envParams["ui.backURL"])); } if(typeof oCV.envParams["ui.postBack"]!="undefined"){ _471.appendChild(createFormField("ui.postBack",oCV.envParams["ui.postBack"])); } if(typeof oCV.envParams["savedEnv"]!="undefined"){ _471.appendChild(createFormField("savedEnv",oCV.envParams["savedEnv"])); } if(typeof oCV.envParams["ui.navlinks"]!="undefined"){ _471.appendChild(createFormField("ui.navlinks",oCV.envParams["ui.navlinks"])); } if(typeof oCV.envParams["lang"]!="undefined"){ _471.appendChild(createFormField("lang",oCV.envParams["lang"])); } if(typeof oCV.envParams["ui.errURL"]!="undefined"){ _471.appendChild(createFormField("ui.errURL",oCV.envParams["ui.errURL"])); } var _475=""; if(oCV.envParams["ui.routingServerGroup"]){ _475=oCV.envParams["ui.routingServerGroup"]; } _471.appendChild(createHiddenFormField("ui.routingServerGroup",_475)); }else{ _471.appendChild(createFormField("cv.header","false")); _471.appendChild(createFormField("cv.toolbar","false")); } }; function appendReportHistoryObjects(oCV,_477){ if(oCV!=null&&typeof oCV.rvMainWnd!="undefined"&&_477!=null){ oCV.rvMainWnd.addCurrentReportToReportHistory(); var _478=oCV.rvMainWnd.saveReportHistoryAsXML(); _477.appendChild(createFormField("cv.previousReports",_478)); } }; function doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483){ var _484=""; if(typeof cvId=="string"){ _484=cvId; } var oCV=null; try{ oCV=getCognosViewerObjectRef(cvId); } catch(exception){ } if(!oCV&&parent!=this&&parent.doSingleDrill){ if(getCVId()!=""&&getCVId()!=cvId){ cvId=getCVId(); } return parent.doSingleDrill(_479,args,_47b,_47c,_47d,_47e,_47f,_480,cvId,_482,_483); }else{ if(typeof _47b=="undefined"){ _47b="default"; }else{ if(_47b=="execute"){ _47b="run"; } } if(_47b=="edit"&&oCV!=null&&typeof oCV.m_viewerFragment){ _479="_blank"; } var _486=buildDrillForm(oCV); var _487=""; _487+=""+sXmlEncode(_47b)+""; _487+=""+sXmlEncode(args[0][1])+""; _487+=""+sXmlEncode(_47c)+""; _487+=""+sXmlEncode(_47d)+""; _487+=""+sXmlEncode(_482)+""; _487+=""+sXmlEncode(_483)+""; if(typeof oCV!="undefined"&&oCV!=null){ _487+=""+oCV.getTracking()+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"){ _487+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; } var _488=oCV.getModelPath(); _487+=""+sXmlEncode(_488)+""; _487+=""+sXmlEncode(getViewerSelectionContext(oCV.getSelectionController(),new CSelectionContext(_488)))+""; if(typeof document.forms["formWarpRequest"+oCV.getId()]["ui.object"]!="undefined"&&document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value!=""){ _487+=""+sXmlEncode(document.forms["formWarpRequest"+oCV.getId()]["ui.object"].value)+""; }else{ if(typeof oCV.envParams["ui.spec"]!="undefined"){ _487+=""+sXmlEncode(oCV.envParams["ui.spec"])+""; } } } if(_47e!=""){ _487+=""+_47e+""; } if(_47b!="view"){ if(typeof _47f!="undefined"){ _487+=""+sXmlEncode(_47f)+""; } if(typeof _480!="undefined"){ _487+=""+sXmlEncode(_480)+""; } } var _489=0; _487+=""; var _48a=[]; for(_489=1;_489"; } } } var _48e=args[_489][0]; var _48f=false; for(var i=0;i<_48a.length;i++){ var _491=_48a[i]; if(_491.name===_48e&&_491.value===sSel){ _48f=true; break; } } if(!_48f){ _48a.push({"name":_48e,"value":sSel}); _487+=""+sXmlEncode(sSel)+""; } } _487+=""; _487+=getExecutionParamNode(oCV); _487+=""; _486.appendChild(createFormField("authoredDrill.request",_487)); _486.appendChild(createFormField("ui.action","authoredDrillThrough2")); _486.appendChild(createFormField("b_action","cognosViewer")); addDrillEnvironmentFormFields(_486,oCV); if(!oCV||!oCV.executeDrillThroughForIWidgetMobile(_486)){ if(oCV&&typeof oCV.sendDrillThroughRequest==="function"){ oCV.sendDrillThroughRequest(_486); }else{ if(_479==""&&oCV!=null&&typeof oCV.m_viewerFragment!="undefined"){ oCV.m_viewerFragment.raiseAuthoredDrillEvent(_487); }else{ if((oCV!=null&&oCV.getViewerWidget()!=null)||_479!=""){ setBackURLToCloseWindow(_486); var _492="winNAT_"+(new Date()).getTime(); var _493=".."; if(oCV!=null){ _493=oCV.getWebContentRoot(); } var _494=_493+"/rv/blankDrillWin.html"; if(_484){ _494+="?cv.id="+_484; } if(oCV==null){ _494=window.location.href.substring(0,window.location.href.indexOf("/v1")); _494+="/?perspective=classicviewer"; _494+="&altDrillFlag=true"; _494+="&format="+sXmlEncode(_47c); var _495=_486.getAttribute("name")+Date.now().toString(); _486.setAttribute("name",_495); if(typeof (Storage)!=="undefined"){ localStorage.setItem(_495,_486.outerHTML); _494+="&drillFormLabel="+_495; }else{ console.log("Sorry! No Web Storage support..."); } } if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_487,"xml"); } _486.target=_492; newWindow=window.open(_494,_492); }else{ appendReportHistoryObjects(oCV,_486); if(window.gViewerLogger){ window.gViewerLogger.log("Drill Specification",_487,"xml"); } _486.target=(oCV&&oCV.getDrillFormTarget)?oCV.getDrillFormTarget():"_self"; _486.submit(); if(oCV!=null&&!oCV.getDrillFormTarget){ setTimeout(getCognosViewerObjectRefAsString(oCV.getId())+".getRequestIndicator().show()",10); } } } } } } }; function getExecutionParamNode(oCV){ var _497=""; if(typeof oCV!="undefined"&&oCV!=null){ var _498=oCV.getExecutionParameters(); if(_498!=""){ _497+=""; _497+=sXmlEncode(_498); _497+=""; } } return _497; }; function doSingleDrillThrough(_499,_49a,cvId){ var _49c=_499[0][0]; if(typeof _49c=="undefined"||_49c==null){ return; } var _49d=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_49c]:drillTargets[_49c]; if(typeof _49d=="undefined"){ return; } if(_49a!=""&&_49d.getPath()==""){ document.location="#"+_49a; }else{ var args=[]; args[args.length]=["ui.object",_49d.getPath()]; for(var _49f=1;_49f<_499.length;++_49f){ args[args.length]=_499[_49f]; } var _4a0=""; if(_49d.getShowInNewWindow()=="true"){ _4a0="_blank"; } var _4a1=_49d.getParameters(); var _4a2=_49d.getObjectPaths(); var _4a3=cvId; if(!cvId){ _4a3=getCVId(); } doSingleDrill(_4a0,args,_49d.getMethod(),_49d.getOutputFormat(),_49d.getOutputLocale(),_49a,_4a1,_4a2,_4a3,_49d.getPrompt(),false); } }; function getCVId(){ var _4a4=""; try{ _4a4=this.frameElement.id.substring("CVIFrame".length); } catch(exception){ } return _4a4; }; function doMultipleDrillThrough(_4a5,cvId){ var _4a7=""; for(var _4a8=0;_4a8<_4a5.length;++_4a8){ var _4a9=_4a5[_4a8]; if(_4a9.length<3){ continue; } var _4aa=_4a9[0]; if(typeof _4aa=="undefined"||_4aa==null){ continue; } var _4ab=_4a9[1]; if(typeof _4ab=="undefined"||_4ab==null){ continue; } var _4ac=cvId&&window[cvId+"drillTargets"]?window[cvId+"drillTargets"][_4aa]:drillTargets[_4aa]; if(typeof _4ac=="undefined"||_4ac==null){ continue; } if(_4ab===null||_4ab===""){ _4ab=_4ac.getLabel(); } _4a7+=""; for(var _4ad=2;_4ad<_4a9.length;++_4ad){ _4a7+=_4a9[_4ad]; } _4a7+=_4ac.getParameters(); _4a7+=_4ac.getObjectPaths(); _4a7+=""; } _4a7+=""; if(!cvId){ cvId=getCVId(); } doMultipleDrills(_4a7,cvId); }; function CScriptLoader(_4ae){ this.m_oFiles={}; this.m_aScripts=[]; this.m_aDocumentWriters=[]; this.m_ajaxWarnings=[]; this.m_bIgnoreAjaxWarnings=false; this.m_bHandleStylesheetLimit=false; this.m_iInterval=20; this.m_reFindCssPath=new RegExp("]*href=\"([^\"]*)\"","i"); this.m_reFindInlineStyle=//gi; this.m_reHasCss=//gi; this.m_reIsCss=/\.css$/i; this.m_reIsJavascript=/\.js$/i; this.m_reIsPromptingLocaleJavascript=/prompting.res.[promptingStrings|promptLocale].*\.js$/i; this.m_reScriptTagClose=/\s*<\/script>.*?$/i; this.m_reScriptTagOpen=/^.*?]*>\s*/i; this.m_reStyleTagClose=/(-|>|\s)*<\/style>\s*$/gi; this.m_reStyleTagOpen=/^\s*]*>(\s|<|!|-)*/gi; this.m_reEscapedCharacters=/\\[\\"']/g; this.m_reStringLiterals=/("|')[\s\S]*?\1/g; this.m_sWebContentRoot=_4ae; this.m_bHasCompletedExecution=false; this.m_aScriptLoadQueue=[]; this.m_bBlockScriptLoading=false; this.m_bUseScriptBlocking=false; this.m_bBlockPromptingLocaleScripts=false; this.m_aBlockedPromptingLocaleFileQueue=[]; }; CScriptLoader.prototype.hasCompletedExecution=function(){ return this.m_bHasCompletedExecution; }; CScriptLoader.prototype.setHandlerStylesheetLimit=function(_4af){ this.m_bHandleStylesheetLimit=_4af; }; CScriptLoader.prototype.executeScripts=function(_4b0,_4b1){ if(this.isReadyToExecute()){ for(var _4b2=0;_4b20){ return false; } return true; }; CScriptLoader.prototype.loadCSS=function(_4b7,_4b8,_4b9,_4ba){ var aM=_4b7.match(this.m_reHasCss); if(aM){ for(var i=0;i0){ var _4cf=window.gScriptLoader.m_aBlockedPromptingLocaleFileQueue.shift(); window.gScriptLoader.loadObject(_4cf.sName,_4cf.sNamespaceId); } } if(window.gScriptLoader.m_aScriptLoadQueue.length>0){ window.gScriptLoader.loadObject(); } } }; CScriptLoader.prototype.moveLinks=function(node){ if(!node){ return; } var _4d1=node.getAttribute("href"); if(!_4d1||this.m_oFiles[_4d1]){ return; } this.m_oFiles[_4d1]="complete"; document.getElementsByTagName("head").item(0).appendChild(node); }; CScriptLoader.prototype.loadObject=function(_4d2,_4d3){ var _4d4=null; if(typeof _4d2==="undefined"){ if(this.m_aScriptLoadQueue.length>0){ var _4d5=this.m_aScriptLoadQueue.shift(); _4d2=_4d5.name; _4d3=_4d5.namespaceId; }else{ return; } } if(this.m_oFiles[_4d2]){ return; } if(this.m_bBlockScriptLoading){ this.m_aScriptLoadQueue.push({"name":_4d2,"namespaceId":_4d3}); }else{ if(_4d2.match(this.m_reIsCss)){ _4d4=document.createElement("link"); _4d4.setAttribute("rel","stylesheet"); _4d4.setAttribute("type","text/css"); _4d4.setAttribute("href",_4d2); if(window.isIE&&window.isIE()){ _4d4.onreadystatechange=CScriptLoader_onReadyStateChange; _4d4.onload=CScriptLoader_onReadyStateChange; _4d4.onerror=CScriptLoader_onReadyStateChange; this.m_oFiles[_4d2]="new"; }else{ this.m_oFiles[_4d2]="complete"; } }else{ if(_4d2.match(this.m_reIsJavascript)){ if(_4d2.match(this.m_reIsPromptingLocaleJavascript)){ if(this.m_bBlockPromptingLocaleScripts){ this.m_aBlockedPromptingLocaleFileQueue.push({"sName":_4d2,"sNamespaceId":_4d3}); return; } this.m_bBlockPromptingLocaleScripts=true; } this.m_bBlockScriptLoading=this.m_bUseScriptBlocking; _4d4=document.createElement("script"); _4d4.setAttribute("language","javascript"); _4d4.setAttribute("type","text/javascript"); _4d4.setAttribute("src",_4d2); _4d4.sFilePath=_4d2; _4d4.onreadystatechange=CScriptLoader_onReadyStateChange; _4d4.onload=CScriptLoader_onReadyStateChange; _4d4.onerror=CScriptLoader_onReadyStateChange; this.addNamespaceAttribute(_4d4,_4d3); this.m_oFiles[_4d2]="new"; } } if(_4d4){ document.getElementsByTagName("head").item(0).appendChild(_4d4); } } }; CScriptLoader.prototype.loadScriptsFromDOM=function(_4d6,_4d7,_4d8){ if(!_4d6){ return; } var _4d9=_4d6.getElementsByTagName("script"); while(_4d9.length>0){ var _4da=_4d9[0]; if(_4da.getAttribute("src")!=null&&_4da.getAttribute("src").length>0){ this.loadObject(_4da.getAttribute("src"),_4d7); }else{ var _4db=_4da.innerHTML; var _4dc=false; if(_4db.indexOf("document.write")!=-1){ var _4dd=_4db.replace(this.m_reEscapedCharacters,"").replace(this.m_reStringLiterals,""); _4dc=(_4dd.indexOf("document.write")!=-1); } if(_4dc){ if(_4d8){ var sId="CVScriptFromDOMPlaceHolder"+_4d9.length+_4d7; var _4df=_4da.ownerDocument.createElement("span"); _4df.setAttribute("id",sId); _4da.parentNode.insertBefore(_4df,_4da); this.m_aDocumentWriters.push(new CDocumentWriter(sId,_4db)); } }else{ if(_4db.length>0){ this.m_aScripts.push(_4db); } } } _4da.parentNode.removeChild(_4da); } }; CScriptLoader.prototype.loadStyles=function(_4e0,_4e1){ if(!_4e0||!_4e0.parentNode){ return; } var _4e2=_4e0.parentNode.getElementsByTagName("style"); while(_4e2.length>0){ var _4e3=_4e2[0]; if(_4e1){ this.addNamespaceAttribute(_4e3,_4e1); } if(window.isIE&&window.isIE()&&window.getNavVer()<10){ if((document.getElementsByTagName("style").length+document.getElementsByTagName("link").length)>=30){ if(this.m_bHandleStylesheetLimit){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var i=0;i=30){ if(typeof console!="undefined"&&console&&console.log){ console.log("Stylesheet limit reached."); } this.m_ajaxWarnings.push("Stylesheet limit reached."); return; } } } document.getElementsByTagName("head").item(0).appendChild(_4e3); } }; CScriptLoader.prototype.loadAll=function(_4e5,_4e6,_4e7,_4e8){ this.m_bScriptLoaderCalled=true; this.m_bHasCompletedExecution=false; this.loadScriptsFromDOM(_4e5,_4e7,_4e8); if(this.containsAjaxWarnings()){ return false; } this.loadStyles(_4e5,_4e7); if(this.containsAjaxWarnings()){ return false; } this.executeScripts(_4e6,_4e7); return true; }; CScriptLoader.prototype.setFileState=function(_4e9,_4ea){ this.m_oFiles[_4e9]=_4ea; }; CScriptLoader.prototype.containsAjaxWarnings=function(){ if(this.m_bIgnoreAjaxWarnings){ return false; }else{ return (this.m_ajaxWarnings.length>0); } }; CScriptLoader.prototype.addNamespaceAttribute=function(_4eb,_4ec){ if(typeof _4ec==="string"){ _4eb.setAttribute("namespaceId",_4ec); } }; if(typeof window.gScriptLoader=="undefined"){ window.gScriptLoader=new CScriptLoader(); } var InfoBarHelper={}; InfoBarHelper.getContainerId=function(oCV,_4ee){ var _4ef=oCV.getLayoutElement(_4ee); var lid=_4ef.getAttribute("lid"); var _4f1=lid===null?"":lid; _4f1=_4f1.replace(oCV.getViewerWidget().getViewerId(),"").replace("RAP_NDH_",""); return _4f1; }; InfoBarHelper.infoBarRemoveFilter=function(_4f2,_4f3,_4f4,_4f5){ var oCV=eval("window.oCV"+_4f2); if(typeof oCV!="undefined"){ var _4f7=this.getContainerId(oCV,_4f3); oCV.executeAction("Filter",{type:"remove",id:_4f7,item:_4f4,details:_4f5}); } }; InfoBarHelper.infoBarRemoveSlider=function(_4f8,_4f9){ var oCV=eval("window.oCV"+_4f8); var _4fb={}; _4fb[_4f9]={blockedEvents:["*"]}; oCV.fireWidgetEvent("com.ibm.bux.widget.updateEventFilter",_4fb); if(typeof oCV!="undefined"){ oCV.executeAction("UpdateDataFilter",{"filterPayload":"{ \"clientId\" :\""+_4f9+"\"}"}); } }; InfoBarHelper.infoBarRemoveSort=function(_4fc,_4fd,_4fe,_4ff){ var oCV=eval("window.oCV"+_4fc); if(typeof oCV!="undefined"){ var _501=this.getContainerId(oCV,_4fd); if(_4ff=="true"){ oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe,type:"label"}); }else{ oCV.executeAction("Sort",{order:"none",id:_501,item:_4fe}); } } }; dojo.provide("InfoBarBase"); dojo.declare("InfoBarBase",null,{constructor:function(_502){ this.m_cognosViewer=_502; this.m_parameterValues=new CParameterValues(); var _503=XMLBuilderLoadXMLFromString(this.m_cognosViewer.getExecutionParameters()); if(_503.childNodes.length==1){ this.m_parameterValues.loadWithOptions(_503.childNodes[0],false); } this.m_parameterStringOperators=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN,RV_RES.IDS_JS_INFOBAR_AND_TEXT,RV_RES.IDS_JS_FILTER_EXCLUDE); this.c_SliderCheckboxParameterPrefix="BusinessInsight."; this.m_containerInfo=null; this.m_editableFilters=null; this.m_editableSorts=null; this.m_editableSliders=null; this.m_id=null; this.m_layoutIndex=null; this.m_timingDetails=null; },setContainerInfo:function(_504){ this.m_containerInfo=_504; },setTimingDetails:function(_505){ this.m_timingDetails=_505; },setEditableFilters:function(_506){ this.m_editableFilters=_506; },setId:function(_507){ this.m_id=_507; },getId:function(){ return this.m_id; },hasPrompts:function(){ var _508=this.m_parameterValues.length(); for(var _509=0;_509<_508;++_509){ var _50a=this.m_parameterValues.getAt(_509); if(_50a!==null&&_50a.length()>0&&_50a.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ return true; } } return false; },addPromptDetails:function(_50b){ var _50c=""; var _50d=(_50b!==true); if(this.hasPrompts()){ var _50e=this.m_id+"instructions "+this.m_id+"_promptString "+this.m_id+"_lockedString "; for(var _50f=0,_510=this.m_parameterValues.length();_50f<_510;++_50f){ var _511=_50e+this.m_id+_50f+"_promptDetail"; var _512=this.m_parameterValues.getAt(_50f); var _513=_512.length(); if(_512!==null&&_513>0&&_512.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ _50c+="
":" tabindex=\"-1\">"); _50c+=""; _50c+=this.addInfoBarIcon("infobar_filter.gif",true); _50c+=""; _50c+=(_50d?this.addInfoBarIcon("infobar_locked.gif",false):""); _50c+="
"; _50c+=""; _50c+=html_encode(_512.name()); _50c+=""; _50c+=" : "; _50c+=_512.toString(this.m_parameterStringOperators); _50c+="
"; } } } return _50c; },getPromptDetailsInJSON:function(){ var _514=[]; if(this.hasPrompts()){ for(var _515=0,_516=this.m_parameterValues.length();_515<_516;++_515){ var _517=this.m_parameterValues.getAt(_515); var _518=_517.length(); if(_517!==null&&_518>0&&_517.name().indexOf(this.c_SliderCheckboxParameterPrefix)!==0){ _514.push({"type":"prompt","label":_517.name(),"description":_517.toString(this.m_parameterStringOperators)}); } } } return _514; },addSliderDetails:function(_519){ var _51a=""; var _51b=(_519!==true); if(this.m_containerInfo!==null&&this.m_editableSliders){ var _51c=this.m_id+"instructions "+this.m_id+"_sliderString "; var _51d=this.m_editableSliders.length; for(var _51e=0;_51e<_51d;++_51e){ var _51f=_51c+this.m_id+_51e+"_sliderDetail"; var _520=this.m_editableSliders[_51e]; if(_520&&_520.name){ _51a+="
":" tabindex=\"-1\">"); _51a+=""; if(typeof _520.controlType!="undefined"&&_520.controlType=="checkbox"){ _51a+=this.addInfoBarIcon("infobar_select.gif",true); }else{ _51a+=this.addInfoBarIcon("infobar_slider.gif",true); } _51a+=""; _51a+=(_51b?this.addRemoveSliderButton(_520.clientId):""); _51a+="
"; _51a+=""; _51a+=(_520.label?_520.label:_520.name); _51a+=(_520.attributeName)?(" - "+_520.attributeName):""; _51a+=""; _51a+=" : "; if(typeof _520.values!="undefined"){ _51a+=this.processFilterOperatorItems(_520.values); }else{ if(_520.min==_520.max){ _51a+=_520.min; }else{ _51a+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_520.min,_520.max); } } _51a+="
"; } } } return _51a; },getSliderDetailsInJSON:function(){ var _521=[]; if(this.m_containerInfo!==null&&this.m_editableSliders){ var _522=this.m_id+"instructions "+this.m_id+"_sliderString "; var _523=this.m_editableSliders.length; for(var _524=0;_524<_523;++_524){ var _525=this.m_editableSliders[_524]; if(_525&&_525.name){ var _526=(_525.label?_525.label:_525.name); if(_525.attributeName){ _526+=(" "+_525.attributeName); } var _527=""; if(typeof _525.values!="undefined"){ _527+=this.processFilterOperatorItems(_525.values); }else{ if(_525.min==_525.max){ _527+=_525.min; }else{ _527+=this.processFilterOperatorRange(RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT,_525.min,_525.max); } } _521.push({"type":"slider","label":_526,"description":_527}); } } } return _521; },hasLockedFilters:function(){ var _528=false; if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){ var _529=this.m_containerInfo.lockedFilters.length; for(var _52a=0;_52a<_529;++_52a){ var _52b=this.m_containerInfo.lockedFilters[_52a]; if(typeof _52b.staticText!="undefined"&&_52b.staticText.charAt(0)!==" "){ _528=true; } } } return _528; },addLockedFilterDetails:function(_52c){ var _52d=""; var _52e=(_52c!==true); if(this.m_containerInfo!==null&&typeof this.m_containerInfo.lockedFilters!=="undefined"){ var _52f=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+"_lockedString "; var _530=this.m_containerInfo.lockedFilters.length; for(var _531=0;_531<_530;++_531){ var _532=_52f+this.m_id+_531+"_lockedFilterDetail"; var _533=this.m_containerInfo.lockedFilters[_531]; if(typeof _533.staticText!="undefined"&&_533.staticText.charAt(0)!==" "){ _52d+="
":" tabindex=\"-1\">"); _52d+=""; _52d+=this.addInfoBarIcon("infobar_filter.gif",true); _52d+=""; _52d+=""; _52d+=(_52e?this.addInfoBarIcon("infobar_locked.gif",false):""); _52d+="
"; _52d+=""; _52d+=html_encode(_533.staticText); _52d+=""; _52d+="
"; } } } return _52d; },addFilteredItemsDetails:function(_534){ var _535=""; var _536=(_534!==true); if(this.m_editableFilters){ for(var _537=0,_538=this.m_editableFilters.length;_537<_538;++_537){ var _539=this.m_editableFilters[_537]; var _53a=this.m_id+"instructions "+this.m_id+"_filterString "+this.m_id+_537+"_filterDetail"; var _53b=(typeof _539.itemLabel=="string")?_539.itemLabel:_539.item; _535+="
":" tabindex=\"-1\">"); _535+=""; _535+=this.addInfoBarIcon("infobar_filter.gif",true); _535+=""; _535+=(_536?this.addRemoveFilterButton(_539.item,this.processFilterDetails(_539)):""); _535+="
"; _535+=this.createHiddenSpan(this.m_id+_537+"_filterPosition",getCurrentPosistionString(this.m_cognosViewer,_537+1,_538)); _535+=html_encode(enforceTextDir(_53b)); _535+=this.processFilterOperator(_539); _535+="
"; } } return _535; },getFilteredItemsDetailsInJSON:function(){ var _53c=[]; if(this.m_editableFilters){ for(var _53d=0,_53e=this.m_editableFilters.length;_53d<_53e;++_53d){ var _53f=this.m_editableFilters[_53d]; var _540=(typeof _53f.itemLabel=="string")?_53f.itemLabel:_53f.item; _53c.push({"type":"filter","label":enforceTextDir(_540)+this.processFilterOperator(_53f),"description":""}); } } return _53c; },addSortDetails:function(_541){ var _542=""; var _543=(_541!==true); if(this.m_editableSorts){ for(var _544=0,_545=this.m_editableSorts.length;_544<_545;++_544){ var _546=this.m_editableSorts[_544]; var _547=this.m_id+"instructions "+this.m_id+"_sortString "+this.m_id+_544+"_sortDetail"; _542+="
":" tabindex=\"-1\">"); _542+=""; _542+=this.addInfoBarIcon("infobar_sort.gif",true); var _548; if(typeof _546.labels=="string"||typeof _546.valuesOf=="string"){ var _549=(typeof _546.labels=="string")?_546.labels:_546.valuesOf; _548=(typeof _546.itemLabel=="string")?_546.itemLabel:_549; _542+=""; _542+=(_543?this.addRemoveSortButton(_549,"true"):""); }else{ if(_546.valuesOf instanceof Array){ if(_546.valuesOf.length>0&&typeof _546.valuesOf[0].item=="string"){ _542+=""; _542+=(_543?this.addRemoveSortButton(_546.valuesOf[0].item,"false"):""); } } } _542+="
"; _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545)); _542+=html_encode(_548); _542+=" : "; if(_546.byItems instanceof Array){ for(var _54a=0;_54a<_546.byItems.length;++_54a){ _542+=(_54a>0)?" - ":""; _542+=_546.byItems[_54a].item; _542+=", "; _542+=this.m_sortStrings[_546.byItems[_54a].order]; } }else{ if(typeof _546.valuesOf=="string"){ _542+=this.m_sortStrings["byValue"]; }else{ _542+=this.m_sortStrings["byLabel"]; } _542+=", "; _542+=this.m_sortStrings[_546.order]; } _542+=""; _542+=this.createHiddenSpan(this.m_id+_544+"_sortPosition",getCurrentPosistionString(this.m_cognosViewer,_544+1,_545)); _548=""; if(typeof _546.itemLabel=="string"){ _548=_546.itemLabel; }else{ for(var _54b=0;_54b<_546.valuesOf.length;++_54b){ _548+=" - "; _548+=_546.valuesOf[_54b].item; } _548=_548.substring(3); } _542+=_548; _542+=" : "; _542+=this.m_sortStrings["byValue"]; _542+=", "; _542+=this.m_sortStrings[_546.order]; _542+="
"; } } return _542; },addInfoBarIcon:function(_54c,_54d){ return ""+"\"\""+""; },createHiddenSpan:function(id,text){ return " "+text+" "; },addRemoveFilterButton:function(item,_551){ var _552=""; var _553=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_553.isConsumeUser()){ var _554=RV_RES.IDS_JS_DELETE; var _555=this.m_id+"_delete"; _552=""+""+""; } return _552; },addRemoveSliderButton:function(_556){ var _557=""; var _558=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!_558.isConsumeUser()){ var _559=RV_RES.IDS_JS_DELETE; var _55a=this.m_id+"_delete"; _557=""+""+""; } return _557; },addRemoveSortButton:function(item,_55c){ var _55d=""; var _55e=this.m_cognosViewer.getViewerWidget(); if(!this.m_cognosViewer.isLimitedInteractiveMode()&&!this.m_cognosViewer.isBlacklisted("Sort")){ var _55f=RV_RES.IDS_JS_DELETE; var _560=this.m_id+"_delete"; _55d=""+""+""; } return _55d; },processFilterOperator:function(_561){ var _562=""; if(typeof _561["in"]!="undefined"){ _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_INCLUDE_TEXT,this.processFilterOperatorItems(_561["in"])); }else{ if(typeof _561["notIn"]!="undefined"){ _562+=" "+CViewerCommon.getMessage(RV_RES.IDS_JS_INFOBAR_EXCLUDE_TEXT,this.processFilterOperatorItems(_561["notIn"])); }else{ if(typeof _561["range"]!="undefined"||typeof _561["notRange"]!="undefined"){ var _563=typeof _561["range"]!="undefined"?RV_RES.IDS_JS_INFOBAR_BETWEEN_TEXT:RV_RES.IDS_JS_INFOBAR_NOT_BETWEEN_TEXT; var _564=typeof _561["range"]!="undefined"?_561["range"]:_561["notRange"]; for(var _565=0;_565<_564.length;++_565){ var _566=_564[_565]; _562+=" "+CViewerCommon.getMessage(_563,[_566.from,_566.to]); } }else{ if(typeof _561["lessThan"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN+" "+_561["lessThan"]; }else{ if(typeof _561["lessThanEqual"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_LESS_THAN_EQUAL+" "+_561["lessThanEqual"]; }else{ if(typeof _561["greaterThan"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN+" "+_561["greaterThan"]; }else{ if(typeof _561["greaterThanEqual"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_GREATER_THAN_EQUAL+" "+_561["greaterThanEqual"]; }else{ if(typeof _561["not"]!="undefined"&&_561["not"]=="true"){ _562+=" "+RV_RES.IDS_JS_FILTER_IS_NOT; } if(typeof _561["endsWith"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_ENDS_WITH+" "+_561["endsWith"]; }else{ if(typeof _561["beginsWith"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_BEGINS_WITH+" "+_561["beginsWith"]; }else{ if(typeof _561["contains"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_CONTAINS+" "+_561["contains"]; }else{ if(typeof _561["isMatchesSQLPatternFilter"]!="undefined"){ _562+=" "+RV_RES.IDS_JS_FILTER_IS_MATCHES_SQLPATTERNFILTER+" "+_561["isMatchesSQLPatternFilter"]; } } } } } } } } } } } return _562; },processFilterDetails:function(_567){ return html_encode("["+dojo.toJson(_567)+"]"); },processFilterOperatorItems:function(_568){ var _569=""; for(var _56a=0;_56a<_568.length;++_56a){ if(_56a!==0){ _569+=(RV_RES.IDS_JS_LIST_SEPARATOR+" "); } _569+=enforceTextDir(_568[_56a]); } return _569; },processFilterOperatorRange:function(_56b,_56c,_56d){ if(typeof _56c=="undefined"){ _56c=" "; } if(typeof _56d=="undefined"){ _56d=" "; } return CViewerCommon.getMessage(_56b,[_56c,_56d]); }}); dojo.declare("InfoBar",InfoBarBase,{constructor:function(_56e,_56f,_570,_571,_572){ this.m_layoutElement=_56f; this.m_containerInfo=_570; this.m_bRendered=false; this.initializeEditableSorts(_571); this.initializeEditableFilters(_571); this.initializeEditableSliders(_571); this.m_id=_572+_56e.getId(); this.m_layoutIndex=_572; this.m_sortStrings={byLabel:RV_RES.IDS_JS_SORTED_BY_LABEL,byValue:RV_RES.IDS_JS_SORTED_BY_VALUE,descending:RV_RES.IDS_JS_SORT_DESCENDING_ORDER,ascending:RV_RES.IDS_JS_SORT_ASCENDING_ORDER}; this.connections=[]; },getLayoutElement:function(){ var _573=this.m_layoutElement; var _574=_573.getAttribute("lid"); if(_574==null){ _574=_573.getAttribute("pflid"); } if(_574!==null){ if(_573.tagName.toUpperCase()=="MAP"){ var _575=_573.parentNode.childNodes; for(var _576=0;_576<_575.length;++_576){ var _577=_575[_576].getAttribute("usemap"); if(_577!==null&&_577==("#"+this.m_cognosViewer.getId()+_574)){ return _575[_576]; } } }else{ if(_573.parentNode.getAttribute("chartcontainer")=="true"){ return _573.parentNode; } } return _573; } return null; },initializeEditableSorts:function(_578){ if(this.m_containerInfo!==null){ if(typeof this.m_containerInfo.sort!=="undefined"){ this.m_editableSorts=this.m_containerInfo.sort; } if(typeof _578!=="undefined"){ for(var i=0;i<_578.length;++i){ this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"labels"); this.m_editableSorts=this.mergeChildInfo(this.m_editableSorts,_578[i].sort,"valuesOf"); } } } },initializeEditableFilters:function(_57a){ if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){ if(typeof this.m_containerInfo.filter!=="undefined"){ this.m_editableFilters=this.m_containerInfo.filter; } if(typeof _57a!=="undefined"){ for(var i=0;i<_57a.length;++i){ this.m_editableFilters=this.mergeChildInfo(this.m_editableFilters,_57a[i].filter,"item"); } } } },initializeEditableSliders:function(_57c){ if(typeof this.m_containerInfo!=="undefined"&&this.m_containerInfo!==null){ if(typeof this.m_containerInfo.sliders!=="undefined"){ this.m_editableSliders=this.m_containerInfo.sliders; } if(typeof _57c!=="undefined"){ for(var i=0;i<_57c.length;++i){ this.m_editableSliders=this.mergeChildInfo(this.m_editableSliders,_57c[i].sliders,"name"); } } } },mergeChildInfo:function(_57e,_57f,key){ if(typeof _57f!="undefined"){ if(typeof _57e==="undefined"||_57e===null){ _57e=_57f; }else{ var _581=[]; for(var i=0;i<_57e.length;++i){ _581[_57e[i][key]]=_57e[i]; } for(var j=0;j<_57f.length;++j){ var _584=_57f[j]; if(typeof _581[_584[key]]=="undefined"){ _57e.push(_584); _581[_584.item]=_584; } } } } return _57e; },hasSomethingRendered:function(){ return this.m_bRendered; },render:function(){ var _585=document.getElementById("infoBar"+this.m_id); if(_585===null){ var _586=(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton")?true:false; if(_586&&!this.m_editableFilters&&!this.m_editableSliders){ return; } if(this.m_timingDetails||this.m_editableSorts||this.m_editableFilters||this.m_editableSliders||this.hasPrompts()||this.hasLockedFilters()){ var _587=this.getLayoutElement(); var _588=document.createElement("div"); _588.setAttribute("dir",this.m_cognosViewer.getDirection()==="rtl"?"rtl":"ltr"); _585=document.createElement("div"); _585.className="infoBar"; _585.setAttribute("id","infoBar"+this.m_id); _585.setAttribute("cvid",this.m_cognosViewer.getId()); _585.setAttribute("layoutid",this.m_id); _585.setAttribute("containerid",this.m_layoutIndex); _585.setAttribute("role","region"); _585.setAttribute("aria-label",RV_RES.IDS_JS_REPORT_INFO_TITLE); if(_586){ dojo.style(_585,{opacity:"0.6"}); } _585.appendChild(this.renderHeader()); _585.appendChild(this.renderDetails()); _588.appendChild(_585); _587.parentNode.insertBefore(_588,_587); this.connections.push(dojo.connect(_585,"onkeydown",this,this.onKeyDown)); this.connections.push(dojo.query(".infoBarHeader",_585).connect("onmousedown",this,this.toggle)); this.connections.push(dojo.query(".infoBarLeftIcon",_585).connect("onmousedown",this,this.ignoreEvent)); this.connections.push(dojo.query(".infoBarDetailsText",_585).connect("onmousedown",this,this.ignoreEvent)); this.connections.push(dojo.query(".infoBarLockedItems",_585).connect("onmousedown",this,this.ignoreEvent)); this.m_bRendered=true; if(this.wasInfoBarExpanded(this.m_id)){ this.show(); } } } },renderHeader:function(){ var _589=this.isFilterApplied(); var _58a=this.isSortApplied(); var _58b=document.createElement("div"); _58b.id="infoBarHeader"+this.m_id; _58b.className="infoBarHeaderDiv"; var _58c="
"+this.addHeaderCloseButton()+this.addHeaderNavigationButton(_589,_58a)+this.addHeaderText(_589,_58a)+"
"; _58b.innerHTML=_58c; return _58b; },addHeaderNavigationButton:function(_58d,_58e){ var _58f=RV_RES.IDS_JS_INFOBAR_EXPAND; var _590="infoBarIcon"+(_58d?"Filter":"")+(_58e?"Sort":"")+"Applied"; var _591="infoBarHeaderButton"+this.m_id+" infoBarHeaderText"+this.m_id; return ""; },addHeaderText:function(_592,_593){ var _594=[]; if(_592){ _594.push(RV_RES.IDS_JS_FILTER_APPLIED); } if(_593){ _594.push(RV_RES.IDS_JS_SORT_APPLIED); } return ""+_594.join(", ")+""; },addHeaderCloseButton:function(){ var _595=RV_RES.IDS_JS_INFOBAR_COLLAPSE; var _596=this.m_id+"_collapse"; return ""; },isFilterApplied:function(){ if(this.m_editableFilters||this.m_editableSliders||typeof this.m_containerInfo.lockedFilters!=="undefined"||this.hasPrompts()){ return true; } return false; },isSortApplied:function(){ if(this.m_editableSorts){ return true; } return false; },renderDetails:function(){ var _597=document.getElementById("infoBarFlyout"+this.m_id); var _598=document.getElementById(this.m_id+"instructions"); if(_597===null){ this.getLayoutElement(); _597=document.createElement("div"); _597.setAttribute("id","infoBarFlyout"+this.m_id); _597.setAttribute("cvid",this.m_cognosViewer.getId()); _597.setAttribute("layoutid",this.m_id); _597.setAttribute("containerid",this.m_layoutIndex); _597.className="infoBarFlyout"; _597.style.display="none"; _597.innerHTML="
"+this.addLockedInfoBarDetails()+this.addEditableInfoBarDetails()+this.addRAPTimingDetails()+"
"+this.createHiddenSpan(this.m_id+"_filterString",RV_RES.IDS_JS_FILTER)+this.createHiddenSpan(this.m_id+"_sortString",RV_RES.IDS_JS_SORT)+this.createHiddenSpan(this.m_id+"_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.createHiddenSpan(this.m_id+"_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER)+this.createHiddenSpan(this.m_id+"_lockedString",RV_RES.IDS_JS_INFOBAR_LOCKED)+this.createHiddenSpan(this.m_id+"_collapse",RV_RES.IDS_JS_INFOBAR_COLLAPSE)+this.createHiddenSpan(this.m_id+"_delete",RV_RES.IDS_JS_DELETE); this.connections.push(dojo.connect(_597,"onkeydown",this,this.onKeyDown)); this.connections.push(dojo.query(".infoBarDetailRow",_597).forEach(function(item,_59a,_59b){ dojo.attr(item,{"aria-setsize":_59b.length,"aria-posinset":_59a+1}); }).connect("onfocus",function(e){ dojo.query(e.currentTarget).addClass("infoBarDetailRowHover"); }).connect("onblur",function(e){ var el=typeof e.explicitOriginalTarget!=="undefined"?e.explicitOriginalTarget:document.activeElement; if(dojo.hasClass(el,"infoBarDeleteButton")){ return true; } dojo.query(e.currentTarget).removeClass("infoBarDetailRowHover"); }).connect("onmouseover",this,function(e){ this.focusDetailRow(e.currentTarget); })); } if(_598===null){ _598=document.createElement("span"); _598.id=this.m_id+"instructions"; _598.setAttribute("role","presentation"); _598.style.visibility="hidden"; _598.style.display="none"; document.body.appendChild(_598); _598.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION; } return _597; },addRAPTimingDetails:function(){ if(this.m_timingDetails){ var _5a0=this.m_timingDetails.length-1; var _5a1=this.m_timingDetails[_5a0].time-this.m_timingDetails[0].time; return "
"+""+this.addTimingIcon(_5a1,250,500)+""+""+this.addRAPTimingItemDetails()+"
RAP Total Time: ("+_5a1+")
"; } return ""; },addRAPTimingItemDetails:function(){ var _5a2=""; if(this.m_timingDetails){ for(var _5a3=0;_5a3<=this.m_timingDetails.length-1;++_5a3){ var _5a4=this.m_timingDetails[_5a3]; var _5a5=this.getTimeDiff(_5a3); _5a2+=""; if(_5a4.level){ _5a2+=""+_5a5+":"+html_encode(_5a4.event)+""; }else{ _5a2+=this.addTimingIcon(_5a5,100,500); _5a2+=""; _5a2+=html_encode(_5a4.event); _5a2+=""+_5a5+""; } _5a2+=""; } } return _5a2; },getTimeDiff:function(_5a6){ var _5a7=_5a6+1; if(_5a7>=this.m_timingDetails.length){ return 0; } var _5a8=this.m_timingDetails[_5a6].level; if(!(_5a8==this.m_timingDetails[_5a7].level)){ while(_5a7red){ _5ac="icon_poor_traffic.gif"; }else{ if(_5a9>_5aa){ _5ac="icon_average_traffic.gif"; } } return this.addInfoBarIcon(_5ac,true); },addLockedInfoBarDetails:function(){ if(this.hasPrompts()||typeof this.m_containerInfo.lockedFilters!=="undefined"){ return "
"+this.addPromptDetails()+this.addLockedFilterDetails()+"
"; } return ""; },addEditableInfoBarDetails:function(){ if(this.m_editableFilters||this.m_editableSorts||this.m_editableSliders){ return "
"+this.addFilteredItemsDetails()+this.addSliderDetails()+this.addSortDetails()+"
"; } return ""; },onKeyDown:function(evt){ var _5ae=evt.target; var cvId=this.m_cognosViewer.getId(); var _5b0=document.getElementById("infoBarHeaderButton"+this.m_id); var _5b1=document.getElementById(this.m_id+"instructions"); var node; if(evt.keyCode=="13"){ _5b1.innerHTML=RV_RES.IDS_JS_INFOBAR_EXPLANATION; if(_5ae===_5b0){ this.toggle(); return stopEventBubble(evt); } }else{ if(evt.keyCode=="27"){ var _5b3=this.m_cognosViewer.getA11YHelper(); if(this.m_cognosViewer.getCurrentNodeFocus()){ node=this.m_cognosViewer.getCurrentNodeFocus(); if(node.nodeName.toLowerCase()!="span"){ var _5b4=node.getElementsByTagName("span"); for(var _5b5=0;_5b5<_5b4.length;_5b5++){ if(_5b4[_5b5].style.display!="hidden"){ node=_5b4[_5b5]; break; } } } this.hide(false); _5b3.setFocusToNode(node); }else{ this.hide(); } return stopEventBubble(evt); }else{ if(evt.keyCode=="46"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ node=dojo.query("td.infoBarRightIcon",_5ae)[0]; if(typeof node!=="undefined"){ if(_5ae.getAttribute("type")=="filter"){ InfoBarHelper.infoBarRemoveFilter(cvId,this.m_layoutIndex,node.getAttribute("filterItem"),node.getAttribute("details")); }else{ if(_5ae.getAttribute("type")=="sort"){ InfoBarHelper.infoBarRemoveSort(cvId,this.m_layoutIndex,node.getAttribute("sortItem"),node.getAttribute("byLabel")); }else{ if(_5ae.getAttribute("type")=="slider"){ InfoBarHelper.infoBarRemoveSlider(cvId,node.getAttribute("slider")); } } } } } }else{ if(evt.keyCode=="38"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ this.focusDetailRow(_5ae,"prev"); }else{ this.focusDetailRow(); } _5b1.innerHTML=""; return stopEventBubble(evt); }else{ if(evt.keyCode=="40"){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ this.focusDetailRow(_5ae,"next"); }else{ this.focusDetailRow(); } _5b1.innerHTML=""; return stopEventBubble(evt); }else{ if(evt.keyCode=="9"){ var _5b6=document.getElementById("infoBar"+this.m_id); if(dojo.hasClass(_5b6,"infoBarExpanded")){ if(dojo.hasClass(_5ae,"infoBarDetailRow")){ dojo.byId("infoBarHeaderCloseButton"+this.m_id).focus(); }else{ this.focusDetailRow(); } return stopEventBubble(evt); } } } } } } } },focusDetailRow:function(_5b7,dir){ var _5b9=document.getElementById("infoBarFlyout"+this.m_id); var _5ba=document.getElementById("infoBar"+this.m_id); if(!dojo.hasClass(_5ba,"infoBarExpanded")){ return; } if(typeof _5b7=="undefined"||_5b7===null){ var _5bb=dojo.query(".infoBarLockedItems .infoBarDetailRow, .infoBarEditableItems .infoBarDetailRow",_5b9); _5b7=_5bb[0]; } if(_5b7&&dojo.hasClass(_5b7,"infoBarDetailRow")){ var _5bc,rows,len,i; if(dir==="prev"){ if(_5b7.parentNode.previousSibling){ _5bc=_5b7.parentNode.previousSibling.childNodes[1]; }else{ rows=dojo.query(".infoBarDetailRow",_5b9); len=rows.length; if(_5b7===rows[0]){ _5bc=rows[len-1]; }else{ for(i=1;i_5ce){ _5cc=_5ce-5; } _5c3.style.width=_5cc+"px"; dojo.removeClass(_5c4,"BUXNoPrint"); } },_getTextWidth:function(text){ var div=document.createElement("div"); div.className="infoBar infoBarHeader"; div.style.fontWeight="bold"; div.style.position="absolute"; div.style.visibility="hidden"; div.style.height="auto"; div.style.width="auto"; document.body.appendChild(div); div.innerHTML=text; var _5d1=div.clientWidth; document.body.removeChild(div); return _5d1; },hide:function(_5d2){ var _5d3=document.getElementById("infoBar"+this.m_id); if(dojo.hasClass(_5d3,"infoBarExpanded")){ this.updateInfoBarRenderedState(this.m_id,"false"); var _5d4=document.getElementById("infoBarHeader"+this.m_id); var _5d5=document.getElementById("infoBarFlyout"+this.m_id); var _5d6=document.getElementById("infoBarHeaderButton"+this.m_id); dojo.addClass(_5d4,"BUXNoPrint"); dojo.fx.wipeOut({node:_5d5,duration:300,onEnd:dojo.hitch(this,function(){ dojo.removeClass(_5d3,"infoBarExpanded"); dojo.style(_5d3,"width","auto"); if(this.m_containerInfo&&this.m_containerInfo.displayTypeId==="singleton"){ dojo.style(_5d3,{opacity:"0.6"}); } _5d6.setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND); _5d6.childNodes[0].setAttribute("title",RV_RES.IDS_JS_INFOBAR_EXPAND); if(!_5d2){ _5d6.focus(); } })}).play(); } },updateInfoBarRenderedState:function(_5d7,_5d8){ var _5d9=this.m_cognosViewer.getViewerWidget(); if(_5d9){ var _5da=_5d9.getInfoBarRenderedState(); _5da[_5d7]=_5d8; } },wasInfoBarExpanded:function(_5db){ var _5dc=this.m_cognosViewer.getViewerWidget(); if(_5dc){ var _5dd=_5dc.getInfoBarRenderedState(); if(_5dd){ if(_5dd[_5db]){ if("true"===_5dd[_5db]){ return true; } } } } return false; },destroy:function(){ for(var i=0;i"+this.renderHeader(false)+""; var _5f9="
"+this.renderHeader(true)+this.renderDetails()+"
"; _5f9=this.updateHideButtonLabelledBy(_5f9); var _5fa=document.getElementById("annotationInfoBarInstructions"); if(_5fa===null){ _5fa=document.createElement("span"); _5fa.id="annotationInfoBarInstructions"; _5fa.setAttribute("role","presentation"); _5fa.style.visibility="hidden"; _5fa.style.display="none"; var _5fb=this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBarButtonInstruction",RV_RES.IDS_JS_ANNO_INFOBAR_BUTTON_EXPLANATION)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_filterString",RV_RES.IDS_JS_FILTER)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_promptString",RV_RES.IDS_JS_INFOBAR_PROMPT)+this.m_AnnotationInfoBar.createHiddenSpan("annoInfoBar_sliderString",RV_RES.IDS_JS_INFOBAR_SLIDER); document.body.appendChild(_5fa); _5fa.innerHTML=_5fb; } return _5f8+_5f9; },renderInJSON:function(){ var _5fc=[]; return _5fc.concat(this.m_AnnotationInfoBar.getPromptDetailsInJSON(),this.m_AnnotationInfoBar.getFilteredItemsDetailsInJSON(),this.m_AnnotationInfoBar.getSliderDetailsInJSON()); },renderHeader:function(_5fd){ var mode=(_5fd)?"Hide":"Show"; var _5ff=(_5fd)?RV_RES.IDS_JS_ANNO_INFOBAR_HIDE:RV_RES.IDS_JS_ANNO_INFOBAR_SHOW; var _600=(_5fd)?("XXREPLACEXX"):" annoInfoBarHeaderControlButtonText"+mode+this.m_id; var _601=""+""+""+""+""+"
"+RV_RES.IDS_JS_FILTER_APPLIED+""+""+"
"; return _601; },renderDetails:function(){ var _602=this.m_AnnotationInfoBar.addPromptDetails(true); var _603=this.m_AnnotationInfoBar.addFilteredItemsDetails(true); var _604=this.m_AnnotationInfoBar.addSliderDetails(true); var _605="
"+_602+_603+_604+"
"; this.m_labelledByHideButton=(_602.length===0)?"":(" annoInfoBar_promptString "+this.m_AnnotationInfoBar.getId()+"0_promptDetail "); this.m_labelledByHideButton+=(_603.length===0)?"":(" annoInfoBar_filterString "+this.m_AnnotationInfoBar.getId()+"0_filterDetail "); this.m_labelledByHideButton+=(_604.length===0)?"":(" annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"0_sliderDetail annoInfoBar_sliderString "+this.m_AnnotationInfoBar.getId()+"1_sliderDetail "); this.m_labelledByHideButton+=" annoInfoBarHeaderControlButtonTextHide"+this.m_id; return _605; },updateHideButtonLabelledBy:function(_606){ return _606.replace("XXREPLACEXX",this.m_labelledByHideButton); }}); function annotationInfoBarToggle(mId,_608){ var _609=document.getElementById("infoBarHeaderExpanded"+mId); var _60a=document.getElementById("infoBarHeaderCollapsed"+mId); var _60b=null; if("Show"===_608){ dojo.style(_609,{display:""}); dojo.style(_60a,{display:"none"}); _60b=document.getElementById("annoInfoBarHeaderControlHide"+mId); }else{ dojo.style(_60a,{display:""}); dojo.style(_609,{display:"none"}); _60b=document.getElementById("annoInfoBarHeaderControlShow"+mId); } if(_60b){ _60b.focus(); } }; var CV_BACKGROUND_LAYER_ID="CV_BACK"; if(typeof window.gaRV_INSTANCES=="undefined"){ window.gaRV_INSTANCES=[]; } if(!window.gViewerLogger){ window.gViewerLogger={log:function(hint,_60d,type){ },addContextInfo:function(_60f){ }}; } function CognosViewerSession(oCV){ this.m_sConversation=oCV.getConversation(); this.m_sParameters=oCV.getExecutionParameters(); this.m_envParams={}; applyJSONProperties(this.m_envParams,oCV.envParams); this.m_bRefreshPage=false; }; function CCognosViewer(sId,_612){ if(typeof window.gCognosViewer=="undefined"){ window.gCognosViewer=this; } if(typeof ViewerConfig=="function"){ this.m_viewerConfig=new ViewerConfig(); try{ if(typeof window.getViewerConfiguration=="function"){ this.m_viewerConfig.configure(window.getViewerConfiguration()); }else{ if(window.parent&&typeof window.parent.getViewerConfiguration=="function"){ this.m_viewerConfig.configure(window.parent.getViewerConfiguration()); } } } catch(e){ } this.m_viewerUIConfig=this.m_viewerConfig.getUIConfig(); } this.m_sActionState=""; this.m_bKeepSessionAlive=false; this.m_undoStack=[]; this.m_aSecRequests=[]; this.m_bDebug=false; this.m_sCAFContext=""; this.m_sContextInfoXML=""; this.m_sConversation=""; this.m_sStatus=""; this.m_sGateway=_612; this.m_sId=sId; this.m_sMetadataInfoXML=""; this.m_sParameters=""; this.m_sReportState=""; this.envParams={}; this.m_sTracking=""; this.m_sSoapFault=""; this.m_sWaitHTML=""; this.m_oDrillMgr=null; this.goDrillManager=null; this.m_oWorkingDialog=null; this.m_oRequestExecutedIndicator=null; this.m_bUseWorkingDialog=true; this.m_oSubscriptionManager=null; this.m_oCVMgr=null; this.m_bUseSafeMode=true; if(typeof CViewerManager=="function"){ this.m_oCVMgr=new CViewerManager(this); } if(window.gaRV_INSTANCES){ var _613=false; for(var _614=0;_614"; var _646=new ViewerDispatcherEntry(this); _646.addFormField("ui.action","reportAction"); _646.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",_63c); if(this.m_viewerWidget){ this.m_viewerWidget.placeTabControlInView(); } this.dispatchRequest(_646); } }; CCognosViewer.prototype._removeTabContent=function(_647,_648){ var _649=this._findChildWithTabId(_647,_648); while(_649){ _649.parentNode.removeChild(_649); _649=this._findChildWithTabId(_647,_648); } }; CCognosViewer.prototype._findChildWithTabId=function(_64a,_64b){ var _64c=null; for(var i=0;i<_64a.childNodes.length;i++){ var _64e=_64a.childNodes[i]; if(_64e.getAttribute("tabId")==_64b){ _64c=_64e; break; } } return _64c; }; CCognosViewer.prototype.clearTabs=function(){ if(!this.m_bHasTabs){ return; } this.m_tabInfo={}; var _64f=this.getReportDiv(); var _650=_64f.parentNode; for(var i=0;i<_650.childNodes.length;i++){ var node=_650.childNodes[i]; if(node.getAttribute("id")!="CVReport"+this.m_sId){ _650.removeChild(node); i--; } } }; CCognosViewer.prototype.isSavedOutput=function(){ var _653=this.envParams["ui.action"]; return _653==="view"||_653==="buxView"; }; CCognosViewer.prototype.renderSavedOutputIFrame=function(url,_655,_656){ var _657=document.getElementById("CVReport"+this.getId()); var _658=document.createElement("iframe"); _658.style.width="100%"; _658.style.height="99%"; _658.id="CVIFrame"+this.getId(); _658.title=_655; _658.setAttribute("frameBorder","0"); _657.appendChild(_658); var obj=this; var func=function(){ obj.renderTabs(); }; setTimeout(function(){ if(_656){ if(_658.attachEvent){ _658.attachEvent("onload",func); }else{ _658.addEventListener("load",func,true); } } _658.src=url; },1); }; CCognosViewer.prototype.updatePageState=function(_65b){ if(_65b&&this.getState()){ this.getState().setPageState(_65b); } }; CCognosViewer.prototype.getPageInfo=function(){ if(this.m_viewerState&&this.m_viewerState.getPageState()){ var _65c=this.m_viewerState.getPageState(); return {"currentPage":_65c.getCurrentPage(),"pageCount":_65c.getPageCount()}; } return {}; }; CCognosViewer.prototype.isIWidgetMobile=function(){ return this.m_viewerWidget&&this.m_viewerWidget.isMobile(); }; CCognosViewer.prototype.isInteractiveViewer=function(){ return false; }; CCognosViewer.prototype.launchGotoPageForIWidgetMobile=function(form){ if(this.isIWidgetMobile()){ this.m_viewerWidget.launchGotoPageForIWidgetMobile(form); return true; } return false; }; CCognosViewer.prototype.executeDrillThroughForIWidgetMobile=function(form){ if(this.isIWidgetMobile()){ this.m_viewerWidget.executeDrillThroughForIWidgetMobile(form); return true; } return false; }; CCognosViewer.prototype.getState=function(){ return this.m_viewerState; }; CCognosViewer.prototype.getConfig=function(){ return this.m_viewerConfig; }; CCognosViewer.prototype.getUIConfig=function(){ return this.m_viewerUIConfig; }; CCognosViewer.prototype.setCurrentNodeFocus=function(node){ this.m_currentNodeFocus=node; }; CCognosViewer.prototype.getCurrentNodeFocus=function(node){ return this.m_currentNodeFocus; }; CCognosViewer.prototype.setCurrentPromptControlFocus=function(node){ this.m_CurrentPromptControlFocus=node; }; CCognosViewer.prototype.getCurrentPromptControlFocus=function(node){ return this.m_CurrentPromptControlFocus; }; CCognosViewer.prototype.loadExtra=function(){ }; CCognosViewer.prototype.setRetryDispatcherEntry=function(_663){ this.m_retryDispatcherEntry=_663; }; CCognosViewer.prototype.getRetryDispatcherEntry=function(){ return this.m_retryDispatcherEntry; }; CCognosViewer.prototype.resetViewerDispatcher=function(){ if(this.m_viewerDispatcher!==null){ delete this.m_viewerDispatcher; this.m_viewerDispatcher=new ViewerDispatcher(); } }; CCognosViewer.prototype.getViewerDispatcher=function(){ return this.m_viewerDispatcher; }; CCognosViewer.prototype.setFaultDispatcherEntry=function(_664){ this.m_faultDispatcherEntry=_664; }; CCognosViewer.prototype.getFaultDispatcherEntry=function(){ return this.m_faultDispatcherEntry; }; CCognosViewer.prototype.dispatchRequest=function(_665){ this.setFaultDispatcherEntry(null); this.getViewerDispatcher().dispatchRequest(_665); }; CCognosViewer.prototype.getActiveRequest=function(){ return this.getViewerDispatcher().getActiveRequest(); }; CCognosViewer.prototype.getProductLocale=function(){ if(this.sProductLocale){ return this.sProductLocale; } return "en"; }; CCognosViewer.prototype.getDirection=function(){ if(this.sDirection){ return this.sDirection; } return "ltr"; }; CCognosViewer.prototype.isBidiEnabled=function(){ if(this.bIsBidiEnabled){ return true; } return false; }; CCognosViewer.prototype.getBaseTextDirection=function(){ if(this.isBidiEnabled()){ if(this.sBaseTextDirection){ return this.sBaseTextDirection; } } return ""; }; CCognosViewer.prototype.getActionFactory=function(){ if(!this.m_actionFactory){ this.m_actionFactory=new ActionFactory(this); } return this.m_actionFactory; }; CCognosViewer.prototype.getAction=function(_666){ var _666=this.getActionFactory().load(_666); _666.setCognosViewer(this); return _666; }; CCognosViewer.prototype.getCalculationCache=function(){ return this.m_calculationCache; }; CCognosViewer.prototype.updateOutputForA11ySupport=function(){ this.updateBorderCollapse(); if(this.getA11YHelper()){ this.getA11YHelper().addLabelledByForItemsOutsideOfContainers(); } var _667=navigator.userAgent.toLowerCase(); var _668=_667.indexOf("iphone")!=-1; var _669=_667.indexOf("ipod")!=-1; var _66a=_667.indexOf("ipad")!=-1; var _66b=_668||_669||_66a; var _66c=_667.indexOf("android")!=-1; if(_66b||_66c){ document.body.classList.add("clsViewerMobile"); } }; CCognosViewer.prototype.checkForHighContrast=function(){ if(this.isBux){ this.m_bHighContrast=dojo.hasClass(document.body,"dijit_a11y")?true:false; }else{ var _66d=document.createElement("div"); _66d.id=this.m_sId+"hc"; _66d.style.border="1px solid"; _66d.style.borderColor="red green"; _66d.style.height="10px"; _66d.style.top="-999px"; _66d.style.position="absolute"; document.body.appendChild(_66d); var _66e=null; if(isIE()){ _66e=_66d.currentStyle; }else{ _66e=_66d.ownerDocument.defaultView.getComputedStyle(_66d,null); } if(!_66e){ return; } this.m_bHighContrast=_66e.borderTopColor==_66e.borderRightColor; document.body.removeChild(_66d); } }; CCognosViewer.prototype.isHighContrast=function(){ if(typeof this.m_bHighContrast==="undefined"){ this.checkForHighContrast(); } return this.m_bHighContrast; }; CCognosViewer.prototype.isLimitedInteractiveMode=function(){ return this.envParams&&this.envParams.limitedInteractiveMode&&this.envParams.limitedInteractiveMode==="true"; }; CCognosViewer.prototype.updateBorderCollapse=function(){ if(this.isHighContrast()==true){ var _66f=null; if(this.envParams["ui.action"]=="view"&&!this.isBux){ var _670=document.getElementById("CVIFrame"+this.getId()); _66f=_670.contentWindow.document; }else{ _66f=document.getElementById("CVReport"+this.getId()); } var _671=_66f.getElementsByTagName("table"); for(var i=0;i<_671.length;i++){ if(_671[i].style.borderCollapse=="collapse"){ _671[i].style.borderCollapse="separate"; } } } }; CCognosViewer.prototype.isAccessibleMode=function(){ if(this.m_bAccessibleMode==true){ return true; } return false; }; CCognosViewer.prototype.isSinglePageReport=function(){ for(var _673 in this.m_aSecRequests){ if(this.m_aSecRequests[_673]=="nextPage"||this.m_aSecRequests[_673]=="previousPage"){ return false; } } return true; }; CCognosViewer.prototype.hasNextPage=function(){ for(var _674 in this.m_aSecRequests){ if(this.m_aSecRequests[_674]=="nextPage"){ return true; } } return false; }; CCognosViewer.prototype.hasPrevPage=function(){ for(var _675 in this.m_aSecRequests){ if(this.m_aSecRequests[_675]=="previousPage"){ return true; } } return false; }; CCognosViewer.prototype.captureHotkeyPageNavigation=function(evt){ evt=(evt)?evt:((event)?event:null); if(evt){ var node=getNodeFromEvent(evt); var _678=(node&&node.nodeName)?node.nodeName.toLowerCase():null; if((evt.keyCode==8&&_678!="input"&&_678!="textarea")||(evt.altKey==true&&(evt.keyCode==37||evt.keyCode==39))){ evt.returnValue=false; evt.cancelBubble=true; if(typeof evt.stopPropagation!="undefined"){ evt.stopPropagation(); } if(typeof evt.preventDefault!="undefined"){ evt.preventDefault(); } return false; } } return true; }; CCognosViewer.prototype.setUseWorkingDialog=function(_679){ this.m_bUseWorkingDialog=_679; }; CCognosViewer.prototype.getWorkingDialog=function(){ if(!this.m_oWorkingDialog&&this.m_bUseWorkingDialog&&typeof WorkingDialog!=="undefined"){ if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getWorkingDialog()){ this.m_oWorkingDialog=this.getConfig().getHttpRequestConfig().getWorkingDialog(); }else{ this.m_oWorkingDialog=new WorkingDialog(this); } } return this.m_oWorkingDialog; }; CCognosViewer.prototype.getRequestIndicator=function(){ if(this.m_bUseWorkingDialog&&!this.m_oRequestExecutedIndicator&&typeof RequestExecutedIndicator!=="undefined"){ if(this.getConfig()&&this.getConfig().getHttpRequestConfig()&&this.getConfig().getHttpRequestConfig().getRequestIndicator()){ this.m_oRequestExecutedIndicator=this.getConfig().getHttpRequestConfig().getRequestIndicator(); }else{ this.m_oRequestExecutedIndicator=new RequestExecutedIndicator(this); } } return this.m_oRequestExecutedIndicator; }; CCognosViewer.prototype.disableBrowserHotkeyPageNavigation=function(){ if(document.attachEvent){ document.attachEvent("onkeydown",this.captureHotkeyPageNavigation); }else{ if(document.addEventListener){ document.addEventListener("keydown",this.captureHotkeyPageNavigation,false); } } }; CCognosViewer.prototype.setHasPrompts=function(_67a){ if(!_67a){ this.preProcessControlArray=[]; } this.m_bReportHasPrompts=_67a; }; CCognosViewer.prototype.getHasPrompts=function(){ return this.m_bReportHasPrompts; }; CCognosViewer.prototype.setUsePageRequest=function(_67b){ this.m_viewerDispatcher.setUsePageRequest(_67b); }; CCognosViewer.prototype.getUsePageRequest=function(){ return this.m_viewerDispatcher.getUsePageRequest(); }; CCognosViewer.prototype.setKeepSessionAlive=function(_67c){ this.m_bKeepSessionAlive=_67c; }; CCognosViewer.prototype.getKeepSessionAlive=function(){ return this.m_bKeepSessionAlive; }; CCognosViewer.prototype.getWebContentRoot=function(){ if(typeof this.sWebContentRoot!="undefined"){ return this.sWebContentRoot; }else{ return ".."; } }; CCognosViewer.prototype.getSkin=function(){ if(typeof this.sSkin!="undefined"){ return this.sSkin; }else{ return this.getWebContentRoot()+"/skins/corporate"; } }; CCognosViewer.prototype.getSelectionController=function(){ var _67d; try{ _67d=getCognosViewerSCObjectRef(this.m_sId); } catch(e){ _67d=null; } return _67d; }; CCognosViewer.prototype.addCallback=function(_67e,oFct,_680){ if(!this.m_aCallback){ this.m_aCallback=[]; } this.m_aCallback=this.m_aCallback.concat({m_sEvent:_67e,m_oCallback:oFct,m_bCaptureEvent:(_680===true)}); }; CCognosViewer.prototype.canDrillDown=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _683=this.getSelectionController(); if(_683){ return (_683.canDrillDown(sCtx)); } } return false; }; CCognosViewer.prototype.canDrillUp=function(sId){ var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _686=this.getSelectionController(); if(_686){ return (_686.canDrillUp(sCtx)); } } return false; }; CCognosViewer.prototype.canSubmitPrompt=function(){ var _687=null; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ var _688=this.preProcessControlArray.length; for(var k=0;k<_688;k++){ _687=eval(this.preProcessControlArray[k]); if(_687.isValid()===false){ if(!this.m_reportRenderingDone||!_687.getCascadeOnParameter||!_687.getCascadeOnParameter()){ return false; } } } } return true; }; CCognosViewer.prototype.closeContextMenuAndToolbarMenus=function(){ if(this.rvMainWnd){ this.rvMainWnd.closeContextMenuAndToolbarMenus(); } }; CCognosViewer.prototype.dcm=function(_68a,_68b){ if(this.canDisplayContextMenu()){ if(this.preSelectNode==true){ _68b=false; this.preSelectNode=false; } if(this.rvMainWnd.displayContextMenu(_68a,_68b)!=false){ return stopEventBubble(_68a); } } }; CCognosViewer.prototype.canDisplayContextMenu=function(){ if(!this.getUIConfig()||this.getUIConfig().getShowContextMenu()){ return (!this.isWorkingOrPrompting()&&this.rvMainWnd!=null&&typeof this.bCanUseCognosViewerContextMenu!="undefined"&&this.bCanUseCognosViewerContextMenu); } return false; }; CCognosViewer.prototype.de=function(_68c){ var _68d=this.getDrillMgr(); if(_68d){ _68d.singleClickDrillEvent(_68c,"RV"); } }; CCognosViewer.prototype.debug=function(sMsg){ if(this.m_bDebug){ var _68f=""; var _690=this.debug.caller; if(typeof _690=="object"&&_690!==null){ _68f=_690.toString().match(/function (\w*)/)[1]; } if(!_68f){ _68f="?"; } alert(_68f+": "+sMsg); } }; CCognosViewer.prototype.callbackExists=function(_691){ var _692=false; if(this.m_aCallback&&this.m_aCallback.length){ for(var _693=0;_6931&&_6cb<_6ce.length){ aIds=_6ce[_6cb].split(":"); } } return aIds; }; CCognosViewer.prototype.getRowContextIds=function(sId){ return this.getContextIds(sId,1); }; CCognosViewer.prototype.getPageContextIds=function(sId){ return this.getContextIds(sId,3); }; CCognosViewer.prototype.getString=function(sKey){ if(RV_RES&&RV_RES[sKey]){ return RV_RES[sKey]; } return sKey; }; CCognosViewer.prototype.getRV=function(){ if(typeof this.m_oCVMgr=="object"){ return this.m_oCVMgr; } return window; }; CCognosViewer.prototype.getSecondaryRequests=function(){ return this.m_aSecRequests; }; CCognosViewer.prototype.getTracking=function(){ return this.m_sTracking; }; CCognosViewer.prototype.findCtx=function(sId){ var sCtx=""; if(typeof sId=="string"){ var aCtx=this.getReportContextHelper().processCtx(sId); var _6d5=aCtx[0][0]; var _6d6=this.getSelectionController(); if(_6d6){ if(_6d6.isContextId(_6d5)){ sCtx=sId; } } } if(!sCtx){ var _6d7=this.findElementWithCtx(sId); if(_6d7){ sCtx=_6d7.getAttribute("ctx"); } } return sCtx; }; CCognosViewer.prototype.findElementWithCtx=function(sId){ var _6d9=sId; if(typeof sId=="string"){ _6d9=this.findElementWithCtx(document.getElementById(sId)); } if(_6d9){ if(_6d9.getAttribute&&_6d9.getAttribute("ctx")){ return _6d9; } for(var _6da=0;_6da<_6d9.childNodes.length;_6da++){ var _6db=this.findElementWithCtx(_6d9.childNodes[_6da]); if(_6db){ return _6db; } } } return null; }; CCognosViewer.prototype.getUseValue=function(sId){ var sVal=null; var sCtx=this.findCtx(sId).split("::")[0]; if(sCtx){ var _6df=this.getSelectionController(); if(_6df){ sVal=_6df.getUseValue(sCtx); } } return sVal; }; CCognosViewer.prototype.init=function(_6e0){ if(_6e0&&typeof _6e0=="object"){ for(var _6e1 in _6e0){ this[_6e1]=_6e0[_6e1]; } } }; CCognosViewer.prototype.initViewer=function(_6e2){ var _6e3=new RequestHandler(this); var _6e4=document.getElementById("formBackJax"+this.getId()); if(_6e4&&typeof _6e4.state!="undefined"&&_6e4.state.value.length>0){ _6e3.loadReportHTML(_6e4.result.value); var _6e5=eval("("+_6e4.state.value+")"); _6e3.updateViewerState(_6e5); _6e3.postComplete(); }else{ if(this.getUsePageRequest()){ var _6e6=_6e2?_6e2.m_sStatus:null; if(isIE()){ if(window.location.hash=="#working"){ window.history.go(-2); return; }else{ if(_6e6==="working"||_6e6==="stillWorking"){ window.location.hash="#working"; } } }else{ if(_6e4&&_6e4.working){ if(_6e4.working.value=="true"){ window.history.go(-1); return; }else{ if(_6e6==="working"||_6e6==="stillWorking"){ _6e4.working.value="true"; } } } } } _6e3.processInitialResponse(_6e2); } }; CCognosViewer.prototype.saveBackJaxInformation=function(_6e7){ var _6e8=document.getElementById("formBackJax"+this.getId()); if(_6e8){ if(typeof _6e8.state!="undefined"){ _6e8.state.value=_6e7.getResponseStateText(); } if(typeof _6e8.result!="undefined"){ _6e8.result.value=_6e7.getResult(); } } }; CCognosViewer.prototype.pcc=function(evt){ if(evt&&typeof evt.button!="undefined"&&evt.button!="1"){ this.preSelectNode=true; var _6ea=this.getSelectionController(); if(_6ea){ _6ea.pageContextClicked(evt); } } }; CCognosViewer.prototype.isValidAjaxResponse=function(_6eb){ return (_6eb&&_6eb.childNodes&&_6eb.childNodes.length>0&&_6eb.childNodes[0].nodeName!="parsererror"?true:false); }; CCognosViewer.prototype.resubmitInSafeMode=function(_6ec){ if(this.m_bUseSafeMode){ this.resetViewerDispatcher(); this.setUsePageRequest(true); this.envParams["cv.useAjax"]="false"; if(_6ec){ _6ec.retryRequest(); } } }; CCognosViewer.prototype.showLoadedContent=function(_6ed){ if(_6ed!==null&&typeof _6ed!="undefined"){ _6ed.style.display="block"; } this.m_resizeReady=true; this.doneLoading(); var obj=this; setTimeout(function(){ obj.renderTabs(); },1); }; CCognosViewer.prototype.doneLoading=function(){ var _6ef=this.getViewerWidget(); if(_6ef){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } var _6f0=this.getStatus(); if(!this.m_reportRenderingDone&&this.m_resizeReady&&this.m_stateSet){ var _6f1=_6f0=="working"||_6f0=="stillWorking"||_6f0=="fault"; _6ef.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:_6f1}); if(_6f0=="complete"){ if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_doneLoading",this); } if(typeof _6ef.postLoadContent=="function"){ _6ef.postLoadContent(); } this.m_reportRenderingDone=true; if(!_6f1){ var _6f2=this; setTimeout(function(){ _6f2.m_readyToRespondToResizeEvent=true; },20); } } } if(_6f0!="fault"){ _6ef.clearErrorDlg(); } this.doneLoadingUpdateA11Y(_6f0); }else{ var _6f0=this.getStatus(); if(_6f0=="complete"){ this.m_reportRenderingDone=true; this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_6f0=="working"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.doneLoadingUpdateA11Y=function(_6f3){ if(this.getKeepFocus()!==false&&this.getKeepFocus()!=null){ var _6f4=this.getKeepFocus(); if(_6f3=="complete"){ this.setKeepFocus(false); } var _6f5=null; if(this.getVisibleDialog()!==null){ _6f5=this.getVisibleDialog().getDialogDiv(); }else{ if(_6f4===true){ _6f5=document.getElementById("CVReport"+this.getId()); }else{ if(typeof _6f4=="string"){ _6f5=document.getElementById(_6f4); }else{ if(_6f4!==null){ _6f5=_6f4; if(this.isBux){ dojo.window.scrollIntoView(_6f5); } } } } } if(_6f5){ setFocusToFirstTabItem(_6f5); } if(_6f3=="complete"){ this.JAWSTalk(RV_RES.IDS_JS_READY); }else{ if(_6f3=="working"||_6f3=="stillWorking"){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); } } } }; CCognosViewer.prototype.JAWSTalk=function(_6f6){ if(this.isMobile()||this.isIWidgetMobile()){ return; } var id=this.getId(); var div=document.getElementById("JAWS_Alert_"+id); if(div){ div.parentNode.removeChild(div); } div=document.createElement("div"); div.id="JAWS_Alert_"+id; div.style.position="absolute"; div.style.top="-9000px"; div.style.display="none"; div.setAttribute("role","alert"); div.appendChild(document.createTextNode(_6f6)); var _6f9=document.getElementById("RVContent"+id); if(_6f9){ _6f9.appendChild(div); }else{ if(typeof console!="undefined"&&console&&console.log){ console.log("CCognosViewer: Could not find the Viewer div to append the JAWS alert."); } } }; CCognosViewer.prototype.canInsertExpandIconsForAllCrosstabs=function(){ if(this.isLimitedInteractiveMode()||this.isBlacklisted("ExpandMember")||this.isIWidgetMobile()){ return false; } var _6fa=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); if(_6fa===null){ return false; } var _6fb=this.getViewerWidget().getProperties().getShowExpandCollapseIconFlag(); return (_6fa.toLowerCase()==="on"&&_6fb!==false)||(_6fa.toLowerCase()==="off"&&_6fb===true); }; CCognosViewer.prototype.setMaxContentSize=function(){ if("10"!=window.getIEVersion()){ return; } if(document.body.className==="viewer"){ var _6fc=document.body.offsetHeight; var _6fd=this.getNonReportHeight(document.getElementById("CVReport"+this.getId())); var _6fe=document.getElementById("mainViewerTable"+this.getId()); _6fe.style.maxHeight=_6fc-_6fd-2+"px"; var _6ff=GUtil.generateCallback(this.setMaxContentSize,[true],this); if(!this.attachedOnResize){ this.attachedOnResize=true; if(window.attachEvent){ window.attachEvent("onresize",_6ff); }else{ if(window.addEventListener){ window.addEventListener("resize",_6ff,false); } } } } }; CCognosViewer.prototype.getNonReportHeight=function(node){ var _701=0; var _702=node.parentNode; if(!_702){ return _701; } if(_702.childNodes.length>1){ for(var i=0;i<_702.childNodes.length;i++){ var _704=_702.childNodes[i]; if(_704!=node&&!isNaN(_704.clientHeight)&&_704.style.display!="none"){ _701+=_704.clientHeight; } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _701+=this.getNonReportHeight(_702); } return _701; }; CCognosViewer.prototype.addPageAdornments=function(){ this.m_layoutElements=null; this.m_lidToElement=null; this.initFlashCharts(); this.insertSortIconsForAllLists(); var _705=this.getViewerWidget().getProperties(); if(this.canInsertExpandIconsForAllCrosstabs()){ this.insertExpandIconsForAllCrosstabs(); } var _706=document.getElementById("CVReport"+this.getId()); if(_706){ var oCV=this; setTimeout(function(){ if(oCV.getPinFreezeManager()&&oCV.getPinFreezeManager().hasFrozenContainers()){ oCV.getPinFreezeManager().renderReportWithFrozenContainers(_706); } oCV.addInfoBar(); },1); } this.getViewerWidget().reselectSelectionFilterObjects(); this.getViewerWidget().addChromeWhitespaceHandler(this.getId()); }; CCognosViewer.prototype.addFlashChart=function(_708){ this.m_flashChartsObjectIds.push(_708); }; CCognosViewer.prototype.flashChartError=function(_709){ var _70a=this.getViewerWidget(); var _70b=_70a.getProperties(); _70b.setProperty("flashCharts",false); var _70c=this.getAction("Redraw"); _70c.isUndoable=function(){ return false; }; _70c.execute(); }; CCognosViewer.prototype.initFlashCharts=function(){ var _70d=this.getViewerWidget(); if(this.m_flashChartsObjectIds.length>0){ var _70e=document.getElementById("rt"+this.getId()); if(window.addEventListener){ _70e.addEventListener("mousedown",onFlashChartRightClick,true); }else{ var _70f={}; var _710=function(){ this.releaseCapture(); }; var _711=function(){ onFlashChartRightClick(event); this.setCapture(); }; for(var i=0;i0){ _70e.attachEvent("oncontextmenu",function(){ if(_70f[window.event.srcElement.id]){ return false; } }); } } if(_70d){ _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,true); } }else{ if(_70d){ _70d.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,false); } } }; CCognosViewer.prototype.initializeLayoutElements=function(){ var _715=document.getElementById("rt"+this.getId()); var _716=getElementsByAttribute(_715,"*","lid"); this.m_lidToElement={}; this.m_layoutElements=[]; var _717=0; var _718=this.getPinFreezeManager(); for(var i=0;i<_716.length;i++){ var e=_716[i]; if(!_718||!_718.getContainerElement(e)||_718.isElementInMainOutput(e)){ this.m_layoutElements[_717]=e; this.m_lidToElement[e.getAttribute("lid")]=e; _717++; } } }; CCognosViewer.prototype.getLayoutElement=function(_71b){ if(!this.m_layoutElements){ this.initializeLayoutElements(); } if(this.m_layoutElements){ return this.m_layoutElements[_71b]; } return null; }; CCognosViewer.prototype.getLayoutElementFromLid=function(lid){ if(!this.m_lidToElement){ this.initializeLayoutElements(); } return this.m_lidToElement[lid]; }; CCognosViewer.prototype.getInfoBars=function(){ return this.m_aInfoBar?this.m_aInfoBar:null; }; CCognosViewer.prototype.addInfoBar=function(){ if(this.getAdvancedServerProperty("VIEWER_JS_HIDE_INFO_BAR")==="true"){ return; } var _71d=this.getRAPReportInfo(); if(_71d){ var _71e=document.getElementById("rt"+this.getId()); this.initializeLayoutElements(); var _71f=[]; this.m_aInfoBar=[]; for(var _720=0;_720-1){ lid=lid.substring(8); } lid=lid.substring(0,lid.indexOf(this.getId())); } var _723=_71d.getContainer(lid); if(_723&&typeof _723.parentContainer=="undefined"){ var _724=this.collectChildContainers(_723.container); if(this.getPinFreezeManager()){ oPinFreezeContainerElement=this.getPinFreezeManager().getContainerElement(_721); _721=(oPinFreezeContainerElement)?oPinFreezeContainerElement:_721; } var _725=new InfoBar(this,_721,_723,_724,_720); _725.setTimingDetails(_71d._getEventTimings()); _725.render(); if(_725.hasSomethingRendered()){ _71f.push(_725.getId()); } this.m_aInfoBar.push(_725); } } var _726=this.getViewerWidget(); if(_726){ _726.refreshInfoBarRenderedState(_71f); } } }; CCognosViewer.prototype.collectChildContainers=function(_727){ var _728=[]; var _729=this.getRAPReportInfo(); if(_729){ var _72a=_729.getContainerCount(); for(var cidx=0;cidx<_72a;++cidx){ var _72c=_729.getContainerFromPos(cidx); if(typeof _72c.parentContainer!="undefined"&&_72c.parentContainer==_727){ _728.push(_72c); } } } return _728; }; CCognosViewer.prototype.addReportInfo=function(){ var _72d=this.getViewerWidget(); if(typeof _72d==="undefined"||_72d===null){ return; } if(!_72d.getAttributeValue("originalReport")||this.isIWidgetMobile()){ return; } var _72e=this.envParams["baseReportModificationTime"]; var _72f=_72d.getAttributeValue("baseReportModificationTime"); if(typeof _72e!=="undefined"&&typeof _72f!=="undefined"&&_72f&&_72f!=""&&_72e!==_72f){ var cvid=this.getId(); var _731=document.getElementById("CVReport"+cvid); var _732=_731.parentNode; var id="ReportInfo"+cvid; var _734=document.createElement("div"); _734.setAttribute("id",id+"_container"); _734.setAttribute("cvid",cvid); _734.className="new-info-indicator BUXNoPrint"; var _735=document.createElement("img"); var img=null; if(this.getDirection()==="rtl"){ img="/rv/images/action_show_info_rtl.png"; }else{ img="/rv/images/action_show_info.png"; } _735.src=this.getWebContentRoot()+img; _735.className="reportInfoIcon"; _735.setAttribute("tabIndex","0"); _735.setAttribute("alt",""); _735.setAttribute("title",""); _735.setAttribute("role","presentation"); var _737=RV_RES.IDS_JS_REPORT_INFO_TITLE; var _738=RV_RES.IDS_JS_REPORT_INFO_TEXT; var _739=RV_RES.IDS_JS_REPORT_INFO_LINK_TEXT; _734.appendChild(_735); _732.insertBefore(_734,_731); this.m_reportInfoTooltip=new bux.reportViewer.ReportInfo({connectId:[id+"_container"],focusElement:_735,position:["above","below"],title:_737,text:_738,linkText:_739,linkScript:getCognosViewerObjectRefAsString(cvid)+".reportInfoResetReport();",allowMouseOverToolTip:true}); } }; CCognosViewer.prototype.reportInfoResetReport=function(){ this.executeAction("ResetToOriginal"); }; CCognosViewer.prototype.hideReportInfo=function(){ var _73a=document.getElementById("ReportInfo"+this.getId()+"_container"); if(typeof _73a!=="undefined"&&_73a!==null){ _73a.style.visibility="hidden"; } }; CCognosViewer.prototype.insertSortIcons=function(){ var _73b=this.envParams?this.envParams.limitedInteractiveMode:true; if(typeof _73b==="undefined"||_73b===true){ return; } if(this.envParams["ui.action"]==="run"||this.envParams["ui.primaryAction"]==="run"){ this.insertSortIconsForAllLists(); } }; CCognosViewer.prototype._getContainers=function(_73c){ var _73d=[]; var _73e="",_73f=""; if(_73c==="list"){ _73e="list"; _73f="ls"; }else{ if(_73c==="crosstab"){ _73e="crosstab"; _73f="xt"; } } var _740=document.getElementById("CVReport"+this.getId()); if(this.getRAPReportInfo()){ var _741=this.getRAPReportInfo().getContainerIds(_73e); for(var i=0;i<_741.length;++i){ var _743=getElementsByAttribute(_740,"table","lid",_741[i]+this.getId(),1); if(_743&&_743.length>0){ _73d.push(_743[0]); } } }else{ _73d=getElementsByClassName(_740,"table",_73f); } return _73d; }; CCognosViewer.prototype.insertSortIconsForAllLists=function(){ var _744=this._getContainers("list"); for(var i=0;i<_744.length;++i){ this.insertSortIconsToList(_744[i]); } }; CCognosViewer.prototype.insertSortIconsToList=function(_746){ var _747=getElementsByAttribute(_746,"*","type","columnTitle"); for(var i=0;i<_747.length;++i){ var _749=_747[i]; this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_749); if(_749.getAttribute("canSort")!="false"&&_749.getAttribute("CTNM")===null&&_749.getAttribute("CC")===null){ var _74a=false; for(var _74b=0;_74b<_749.childNodes.length;_74b++){ var _74c=_749.childNodes[_74b]; if(_74c.nodeName.toLowerCase()=="img"){ if(_74c.id&&_74c.id.indexOf("sortimg")===0){ _74a=true; break; } var sLid=_74c.getAttribute("lid"); if(sLid&&sLid.indexOf("SortIcon")!==-1){ _749.removeChild(_74c); break; } } } if(!_74a&&this.canInsertSortIcon(_749)){ this.insertSortIconToColumnHeader(_749); } } } }; CCognosViewer.prototype.isDrillBlackListed=function(){ if(typeof this.m_bDrillBlacklisted=="undefined"){ this.m_bDrillBlacklisted=this.isBlacklisted("DrillDown")||this.isBlacklisted("DrillUp"); } return this.m_bDrillBlacklisted; }; CCognosViewer.prototype.isBlacklisted=function(item){ return this.UIBlacklist&&this.UIBlacklist.indexOf(" "+item+" ")>0; }; CCognosViewer.prototype.canInsertSortIcon=function(_74f){ var _750=_74f.getAttribute("rp_sort"); return ((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))||(_750!==undefined&&_750!==null&&_750.length>0)); }; CCognosViewer.prototype.insertSortIconToColumnHeader=function(_751){ if(!_751.style.whiteSpace){ _751.style.whiteSpace="nowrap"; } var _752=document.createElement("img"); _752.setAttribute("id","sortimg"+Math.random()); if((!this.isLimitedInteractiveMode()&&!this.isBlacklisted("Sort"))){ _752.onmouseover=function(){ this.setAttribute("oldClassName",this.className); this.className+=" sortIconOver"; }; _752.onmouseout=function(){ this.className=this.getAttribute("oldClassName"); this.removeAttribute("oldClassName"); }; } _752.src=this.getImgSrc(_751); var _753=this.getSortInfo(_751); var _754=this.getSortOrder(_753); _752.setAttribute("alt",this.getSortAltText(_754)); _752.setAttribute("title",this.getSortAltText(_754)); _752.className=this.getSortClass(_753); _752.setAttribute("sortOrder",_754); _751.appendChild(_752); }; CCognosViewer.prototype.canInsertShowExpandCollapseIconForNode=function(_755,_756){ var _757=this.getSelectionController(); var _758=_757.hasCalculationMetadata(_756,[_756],"crosstab"); return ((_757.canDrillDown(_756)||_755.alwaysCanExpandCollapse)&&!_757.isCalculationOrMeasure(_756,_758)); }; CCognosViewer.prototype.insertExpandIconsForAllCrosstabs=function(){ var _759=this._getContainers("crosstab"); var _75a=this; var _75b=this.getRAPReportInfo(); var _75c=this.getReportContextHelper(); for(var i=0;i<_759.length;i++){ var _75e=_759[i]; var _75f=_75e.getAttribute("lid"); _75f=_75f.substring(0,_75f.length-this.getId().length); var _760=getElementsByAttribute(_75e,["td","th"],"ctnm","true"); for(var j=0;j<_760.length;j++){ var _762=_760[j]; var sCtx=this.findCtx(_762); var _764=_75c.getDataItemName(sCtx); if(_764){ var _765=_75b.getItemInfo(_75f,_764); var _766=_75c.processCtx(sCtx); if(this.canInsertShowExpandCollapseIconForNode(_765,_766[0][0])){ var sMun=_75c.getMun(sCtx); var _768=sMun&&_765.expandedMembers&&_765.expandedMembers[sMun]===true; var _769=document.createElement("div"); _769.setAttribute("skipSelection","true"); _769.className="expandButton "+(_768?"collapse":"expand"); _762.insertBefore(_769,_762.firstChild); var _76a=document.createElement("span"); _76a.className="expandButtonCaption"; _76a.innerHTML=(_768?"[-]":"[+]"); _769.appendChild(_76a); } } } } }; CCognosViewer.prototype.removeExpandIconsForAllCrosstabs=function(){ var _76b=this._getContainers("crosstab"); for(var i=0;i<_76b.length;i++){ var _76d=_76b[i]; var _76e=_76d.getAttribute("lid"); _76e=_76e.substring(0,_76e.length-this.getId().length); var _76f=getElementsByAttribute(_76d,"td","ctnm","true"); for(var j=0;j<_76f.length;j++){ var _771=_76f[j]; if(_771.firstChild.className==="expandButton collapse"||_771.firstChild.className==="expandButton expand"){ _771.removeChild(_771.firstChild); } } } }; CCognosViewer.prototype.fillInContextData=function(){ if(!this.isLimitedInteractiveMode()){ var _772=document.getElementById("CVReport"+this.getId()); var _773=getElementsByClassName(_772,"table","ls"); for(var i=0;i<_773.length;++i){ var _775=getElementsByAttribute(_773[i],"*","type","columnTitle"); for(var j=0;j<_775.length;++j){ this.getSelectionController().getSelectionObjectFactory().getSelectionObject(_775[j]); } } } }; CCognosViewer.prototype.getSortAltText=function(_777){ if(_777==="ascending"){ return RV_RES.IDS_JS_SORT_ASCENDING; }else{ if(_777==="descending"){ return RV_RES.IDS_JS_SORT_DESCENDING; }else{ if(_777==="nosort"){ return RV_RES.IDS_JS_NOT_SORTED; } } } }; CCognosViewer.prototype.getSortInfo=function(_778){ var _779=_778.getAttribute("rp_sort"); if(_779){ _779=_779.split("."); } return _779; }; CCognosViewer.prototype.getSortClass=function(_77a){ var _77b="sortIconHidden"; if(_77a){ if(_77a[0]==="d"||_77a[0]==="a"){ _77b="sortIconVisible"; } } return _77b; }; CCognosViewer.prototype.getSortOrder=function(_77c){ var _77d="nosort"; if(_77c){ if(_77c[0]==="d"){ _77d="descending"; }else{ if(_77c[0]==="a"){ _77d="ascending"; } } } return _77d; }; CCognosViewer.prototype.getImgSrc=function(_77e){ var _77f=_77e.getAttribute("rp_sort"); var src=this.getWebContentRoot()+"/rv/images/"+this.getSortIconName(_77f); return src; }; CCognosViewer.prototype.getSortIconName=function(_781){ var _782="sort_no.gif"; if(_781){ _781=_781.split("."); if(_781[0]==="d"){ _782="sort_descending.gif"; }else{ if(_781[0]==="a"){ _782="sort_ascending.gif"; } } } return _782; }; CCognosViewer.prototype.shouldWriteNavLinks=function(){ if(this.envParams["cv.navlinks"]=="false"){ return false; }else{ if(!this.getUIConfig()||this.getUIConfig().getShowPageNavigation()){ if(this.rvMainWnd||(this.isBux&&!this.isActiveReport())){ return true; } } } return false; }; CCognosViewer.prototype.isActiveReport=function(){ if(this.envParams["cv.responseFormat"]==="activeReport"){ return true; } return false; }; CCognosViewer.prototype.resetRaiseSharePromptEventFlag=function(){ this.m_raiseSharePromptEvent=true; }; CCognosViewer.prototype.resetbHasPromptFlag=function(){ this.m_bHasPrompt=null; }; CCognosViewer.prototype.disableRaiseSharePromptEvent=function(){ this.m_raiseSharePromptEvent=false; }; CCognosViewer.prototype.widgetHasPromptParameters=function(){ var _783=this.getViewerWidget(); return (_783&&_783.promptParametersRetrieved==true&&this.envParams&&typeof this.envParams["reportPrompts"]!="undefined"&&this.envParams["reportPrompts"]!=null&&this.envParams["reportPrompts"].length>0); }; CCognosViewer.prototype.getPromptParametersInfo=function(){ var _784=null; if(this.widgetHasPromptParameters()){ _784=""+sXmlEncode(this.getExecutionParameters())+""+this.envParams["reportPrompts"]+""; } return _784; }; CCognosViewer.prototype.raisePromptEvent=function(_785,_786,_787){ try{ var _788=this.getViewerWidget(); _788.getWidgetContextManager().raisePromptEvent(_785,_786,_786.get("ui.action"),this.getModelPath(),_787); } catch(e){ } }; CCognosViewer.prototype.getModelPath=function(){ var _789=this.getSelectionController().getModelPathForCurrentSelection(); if(_789){ return _789; }else{ if(this.envParams.modelPath){ return this.envParams.modelPath; }else{ if(typeof document.forms["formWarpRequest"+this.getId()].modelPath!=="undefined"){ return document.forms["formWarpRequest"+this.getId()].modelPath.value; } } } return ""; }; CCognosViewer.prototype.setKeepFocus=function(_78a){ this._keepFocus=_78a; }; CCognosViewer.prototype.getKeepFocus=function(){ if(typeof this._keepFocus!="undefined"){ return this._keepFocus; } return false; }; CCognosViewer.prototype.onFocus=function(evt){ var _78c=this.getA11YHelper(); if(_78c){ _78c.onFocus(evt); } }; CCognosViewer.prototype.getA11YHelper=function(){ if(!this.a11yHelper){ this.loadExtra(); if(typeof ViewerA11YHelper=="function"){ this.a11yHelper=new ViewerA11YHelper(this); }else{ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: Could not create ViewerA11YHelper object."); } return null; } } return this.a11yHelper; }; CCognosViewer.prototype.onKeyDown=function(evt){ if(this.getA11YHelper()){ this.getA11YHelper().onKeyDown(evt); } }; CCognosViewer.prototype.updateSkipToReportLink=function(){ var _78e=this.getStatus(); var _78f=document.getElementById("cvSkipToReport"+this.getId()); if(_78f){ _78f.style.display=_78e=="prompting"?"none":""; } }; CCognosViewer.prototype.updateSkipToNavigationLink=function(_790){ var _791=document.getElementById("cvSkipToNavigation"+this.getId()); if(_791){ _791.style.display=_790?"none":""; } }; CCognosViewer.prototype.pageAction=function(_792){ this.setKeepFocus("CVNavLinks"+this.getId()); var _793=new ViewerDispatcherEntry(this); _793.addFormField("ui.action",_792); if(this.getCurrentlySelectedTab()){ _793.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getCurrentlySelectedTab()); } this.dispatchRequest(_793); }; CCognosViewer.prototype.writeNavLink=function(_794,_795,_796,_797){ var _798=""; if(_796){ _798=""+"\"\""+""+""; if(_797){ _798+=""; }else{ _798=""+"\"\""+""+"LINK_TEXT "; } var sImg=this.sSkin+(!_796&&_794.sImgDisabled?_794.sImgDisabled:_794.sImg); return _798.replace(/LINK_REQUEST/g,_795).replace(/LINK_TEXT/g,_794.sText).replace(/LINK_IMG/g,sImg); }; CCognosViewer.prototype.loadNavLinks=function(){ var _79a=window.gScriptLoader.loadFile(this.getGateway(),"b_action=xts.run&m=portal/report-viewer-navlinks.xts"); if(_79a){ this.init(eval("("+_79a+")")); } }; CCognosViewer.prototype.writeNavLinks=function(sSR,_79c){ var _79d=document.getElementById("CVNavLinks"+this.getId()); if(_79d){ var _79e=document.getElementById("CVNavLinks_Container"+this.getId()); if(typeof this.oNavLinks!="object"||typeof sSR!="string"||!sSR.match(/\bfirstPage\b|\bpreviousPage\b|\bnextPage\b|\blastPage\b|\bplayback\b/i)){ _79d.style.display="none"; if(_79e){ _79e.style.display="none"; } this.updateSkipToNavigationLink(true); return; } this.updateSkipToNavigationLink(false); if(_79e){ _79e.style.display=""; } _79d.style.display=(isIE()?"block":"table-cell"); var _79f=""; _79f+=""; _79f+=this.writeNavLink(this.oNavLinks.oFirst,"firstPage",sSR.match(/\bfirstPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oPrevious,"previousPage",sSR.match(/\bpreviousPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oNext,"nextPage",sSR.match(/\bnextPage\b/gi),_79c); _79f+=this.writeNavLink(this.oNavLinks.oLast,"lastPage",sSR.match(/\blastPage\b/gi),_79c); _79f+="
"; var _7a0=document.getElementById("CVNavLinks_label"+this.getId()); var _7a1=""; if(_7a0){ _7a1+=""+_7a0.innerHTML+""; } _79d.innerHTML=_7a1+_79f; }else{ if(this.shouldWriteNavLinks()){ setTimeout(getCognosViewerObjectRefAsString(this.getId())+".writeNavLinks(\""+sSR+"\",\""+_79c+"\");",100); } } }; function CVBackgroundLayer_ignoreMouseClick(e){ if(e.returnValue){ e.returnValue=false; }else{ if(e.preventDefault){ e.preventDefault(); }else{ return false; } } }; CCognosViewer.prototype.createTransparentBackgroundLayer=function(){ this.removeTransparentBackgroundLayer(); var oBL=document.createElement("div"); oBL.id=CV_BACKGROUND_LAYER_ID; oBL.style.display="none"; oBL.style.position="absolute"; oBL.setAttribute("role","region"); oBL.setAttribute("aria-label",RV_RES.IDS_JS_A11Y_BACKGROUND_TINT); oBL.style.top="0px"; oBL.style.left="0px"; oBL.style.zIndex=98; oBL.style.width="100%"; oBL.style.height="100%"; oBL.style.backgroundColor="rgb(238, 238, 238)"; oBL.style.opacity="0"; oBL.style.filter="alpha(opacity:0)"; oBL.innerHTML="
"; oBL.style.display="inline"; document.body.appendChild(oBL); }; CCognosViewer.prototype.removeTransparentBackgroundLayer=function(){ var oBL=document.getElementById(CV_BACKGROUND_LAYER_ID); if(oBL){ oBL.parentNode.removeChild(oBL); } }; CCognosViewer.prototype.closeActiveHTTPConnection=function(){ var _7a5=this.getActiveRequest(); if(_7a5){ _7a5.abortHttpRequest(); } }; CCognosViewer.prototype.canCancel=function(){ var _7a6=this.getTracking(); var _7a7=this.getStatus(); return _7a6!=""&&_7a7!="complete"; }; CCognosViewer.prototype.cancel=function(_7a8){ if(this.getWorkingDialog()&&this.getWorkingDialog().disableCancelButton){ this.getWorkingDialog().disableCancelButton(_7a8); } this.removeTransparentBackgroundLayer(); this.clearPrompts(); if(this.m_viewerFragment&&this.envParams["fragment.fireEventWhenComplete"]){ this.envParams["fragment.fireEventWhenComplete"]=""; } var _7a9=null; if(this.m_undoStack.length>0){ _7a9=this.m_undoStack.pop(); } var _7aa=this.getActiveRequest(); if(this.canCancel()===true||_7aa){ if(_7aa){ _7aa.cancelRequest(true); }else{ var _7ab=null; var _7ac=_7a9!=null&&_7a9.m_bRefreshPage; if(typeof this.getCancelDispatcherEntry=="function"){ _7ab=this.getCancelDispatcherEntry(); }else{ if(_7ac||this.m_viewerFragment){ _7ab=new ViewerDispatcherEntry(this); }else{ if(this.getId()=="RS"){ _7ab=new ViewerDispatcherEntry(this); _7ab.addFormField("cv.responseFormat","rs"); }else{ _7ab=new DispatcherEntry(this); _7ab.addFormField("cv.responseFormat","successfulRequest"); } } } _7ab.forceSynchronous(); _7ab.addFormField("ui.action","cancel"); _7ab.addFormField("m_tracking",this.getTracking()); this.setTracking(""); if(_7ac){ var _7ad=""; _7ad+=_7a9.m_sConversation; _7ad+=""; _7ab.addFormField("cv.previousSession",_7ad); } this.dispatchRequest(_7ab); if(!this.isBux&&!this.m_viewerFragment&&(this.getUsePageRequest()||!this.isReportRenderingDone())){ this.executeCallback("cancel"); } } this.setStatus("complete"); var _7ae=this.envParams["ui.action"]; var _7af=this.getUsePageRequest(); var _7b0=this.m_undoStack.length; if(_7a9!=null){ this.m_sConversation=_7a9.m_sConversation; this.m_sParameters=_7a9.m_sParameters; this.envParams={}; applyJSONProperties(this.envParams,_7a9.m_envParams); this.m_undoStack.push(_7a9); } this.setTracking(""); if(this.previouslySelectedTab){ this.cancelTabSwitch(); }else{ if(_7ae!="view"&&_7b0<=0&&this.rvMainWnd){ this.rvMainWnd.executePreviousReport(-1); } } return true; }else{ if(this.rvMainWnd&&typeof this.envParams!="undefined"&&(this.envParams["ui.primaryAction"]=="authoredDrillThrough"||this.envParams["ui.primaryAction"]=="authoredDrillThrough2")){ this.rvMainWnd.executePreviousReport(-1); return true; }else{ if(!this.isBux){ executeBackURL(this.getId()); } return true; } } return false; }; CCognosViewer.prototype.clearPrompts=function(){ if(this.preProcessControlArray){ var _7b1=this.preProcessControlArray.length; var k=0; for(k=0;k<_7b1;k++){ var _7b3=eval(this.preProcessControlArray[k]); if(_7b3){ if(_7b3.clearSubmit){ _7b3.clearSubmit(); } } } } }; CCognosViewer.prototype.wait=function(){ if(this.isWorking()){ this.JAWSTalk(RV_RES.IDS_JS_WAIT_PAGE_LOADING); var _7b4=new ViewerDispatcherEntry(this); _7b4.addFormField("ui.action","wait"); _7b4.addFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _7b4.addFormField("cv.actionState",this.envParams["cv.actionState"]); _7b4.addNonEmptyStringFormField("bux",this.envParams["bux"]); _7b4.addNonEmptyStringFormField("ui.preserveRapTags",this.envParams["ui.preserveRapTags"]); this.dispatchRequest(_7b4); return true; } return false; }; CCognosViewer.prototype.setCAFContext=function(_7b5){ this.m_sCAFContext=_7b5; }; CCognosViewer.prototype.setContextInfo=function(sXML){ this.m_sContextInfoXML=sXML; }; CCognosViewer.prototype.setConversation=function(_7b7){ this.m_sConversation=_7b7; }; CCognosViewer.prototype.setActionState=function(_7b8){ this.m_sActionState=_7b8; }; CCognosViewer.prototype.setStatus=function(_7b9){ this.m_sStatus=_7b9; }; CCognosViewer.prototype.setDebug=function(_7ba){ this.m_bDebug=_7ba; }; CCognosViewer.prototype.setExecutionParameters=function(_7bb){ this.m_sParameters=_7bb; }; CCognosViewer.prototype.setMetadataInfo=function(sXML){ this.m_sMetadataInfoXML=sXML; }; CCognosViewer.prototype.setSecondaryRequests=function(_7bd){ if(_7bd){ this.m_aSecRequests=_7bd; }else{ this.m_aSecRequests=[]; } }; CCognosViewer.prototype.setTracking=function(_7be){ this.m_sTracking=_7be; }; CCognosViewer.prototype.setSoapFault=function(_7bf){ this.m_sSoapFault=_7bf; }; CCognosViewer.prototype.showOutputInNewWindow=function(sURL){ var _7c1=document.getElementById("formWarpRequest"+this.getId()); var _7c2=_7c1.elements["ui.postBack"]; var _7c3=_7c1.elements["ui.backURL"]; if(this.isAccessibleMode()&&this.envParams["run.outputFormat"]=="PDF"&&window.detachLeavingRV){ window.detachLeavingRV(); } if(window.opener||_7c2||(_7c3&&_7c3.value!=="javascript:window.close();")){ window.open(sURL,"",""); this.updateNewBrowserWindow(); }else{ window.location=sURL; } }; CCognosViewer.prototype.hideToolbar=function(_7c4){ this.m_bHideToolbar=_7c4; }; CCognosViewer.prototype.showExcel=function(sURL){ var _7c6=true; var _7c7=document.getElementById("formWarpRequest"+this.getId()); var _7c8=_7c7.elements["ui.backURL"]; if(_7c8&&_7c8.value.indexOf("javascript:window.close()")!==0&&_7c8.value.indexOf("close.html")===-1){ _7c6=false; } if(window.detachLeavingRV){ window.detachLeavingRV(); } var _7c9=window; if(window.opener&&(isIE()||isFF())&&_7c6){ _7c9=window.opener?window.opener:window; }else{ if(!window.opener&&_7c6){ window.location=sURL; return; } } var _7ca=null; var _7cb=""; try{ if(this.envParams["cv.excelWindowOpenProperties"]){ _7cb=this.envParams["cv.excelWindowOpenProperties"]; } _7ca=_7c9.open(sURL,"",_7cb); } catch(e){ _7c9=window; _7ca=_7c9.open(sURL,"",_7cb); } if(!_7ca||_7ca.closed||typeof _7ca.closed=="undefined"){ alert(RV_RES.RV_BROWSER_POPUP_IS_ENABLED); } this.updateNewBrowserWindow(); }; CCognosViewer.prototype.updateNewBrowserWindow=function(){ var id=this.getId(); var _7cd=document.forms["formWarpRequest"+id].elements["ui.postBack"]; var _7ce=document.forms["formWarpRequest"+id].elements["ui.backURL"]; if(_7cd&&_7cd.value){ setTimeout(getCognosViewerObjectRefAsString(id)+".getRV().doPostBack();",100); }else{ if(_7ce&&_7ce.value){ if(_7ce.value.length<2048){ setTimeout("location.replace(\""+_7ce.value+"\");",100); }else{ _7ce=decodeURIComponent(_7ce.value); var _7cf=_7ce.split("?"); var _7d0=document.createElement("form"); _7d0.style.display="none"; _7d0.setAttribute("target","_self"); _7d0.setAttribute("method","post"); _7d0.setAttribute("action",_7cf[0]); var _7d1=_7cf[1].split("&"); for(var _7d2=0;_7d2<_7d1.length;_7d2++){ var _7d3=_7d1[_7d2].indexOf("="); var _7d4=_7d1[_7d2].substr(0,_7d3); var _7d5=_7d1[_7d2].substr(_7d3+1); var _7d6=document.createElement("img"); _7d6.setAttribute("type","hidden"); _7d6.setAttribute("name",decodeURIComponent(_7d4)); _7d6.setAttribute("value",decodeURIComponent(_7d5)); _7d0.appendChild(_7d6); } document.body.appendChild(_7d0); _7d0.submit(); } }else{ window.close(); } } }; CCognosViewer.prototype.showWaitPage=function(){ }; CCognosViewer.prototype.sendRequest=function(_7d7){ var _7d8=new ViewerDispatcherEntry(this); _7d8.addFormField("ui.action",_7d7.getAction()); if(_7d7.getCallback()!=null){ _7d8.setCallbacks({"complete":{"object":null,"method":_7d7.getCallback()}}); } var _7d9=_7d7.getFormFields().keys(); for(var _7da=0;_7da<_7d9.length;_7da++){ _7d8.addFormField(_7d9[_7da],_7d7.getFormFields().get(_7d9[_7da])); } var _7db=_7d7.m_oOptions.keys(); for(var _7dc=0;_7dc<_7db.length;_7dc++){ _7d8.addFormField(_7db[_7dc],_7d7.getOption(_7db[_7dc])); } var _7dd=_7d7.m_oParams.keys(); for(var _7de=0;_7de<_7dd.length;_7de++){ _7d8.addFormField(_7dd[_7de],_7d7.getParameter(_7dd[_7de])); } this.dispatchRequest(_7d8); }; CCognosViewer.prototype.promptAction=function(_7df,sUrl){ this.setKeepFocus(true); if(typeof datePickerObserverNotify=="function"){ datePickerObserverNotify(); } var _7e1=this.getViewerWidget(); if(_7df=="cancel"){ this.cancelPrompt(sUrl); if(_7e1){ if(!this.isReportRenderingDone()){ var _7e2={action:"deleteWidget"}; _7e1.fireEvent("com.ibm.bux.widget.action",null,_7e2); } } }else{ var oReq=new ViewerDispatcherEntry(this); oReq.addFormField("ui.action",_7df=="back"?"back":"forward"); if(_7df=="finish"){ oReq.addFormField("run.prompt",false); }else{ if(_7df=="back"||_7df=="next"){ oReq.addFormField("run.prompt",true); } } if(_7df=="reprompt"){ if(typeof repromptObserverNotify=="function"){ repromptObserverNotify(this); } oReq.addFormField("_promptControl",_7df); }else{ oReq.addFormField("_promptControl","prompt"); } if(_7e1){ _7e1.fireEvent("com.ibm.bux.widget.modified",null,{"modified":true}); if(_7e1.isSelectionFilterEnabled){ _7e1.clearSelectionFilter(); } } this.submitPromptValues(oReq); } }; CCognosViewer.prototype.cancelPrompt=function(sUrl){ this.cancel(); }; CCognosViewer.prototype.notify=function(_7e5,_7e6){ var _7e7=0,k=0; var _7e9=null; if(this.rangeObserverArray&&this.rangeObserverArray instanceof Array){ _7e7=this.rangeObserverArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.rangeObserverArray[k]); if(_7e9&&typeof _7e9=="object"&&typeof _7e9.update=="function"){ _7e9.update(); } } } var _7ea=true; if(this.preProcessControlArray&&this.preProcessControlArray instanceof Array){ _7e7=this.preProcessControlArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.preProcessControlArray[k]); if((typeof _7e9.getValid=="function")&&!_7e9.getValid()){ _7ea=false; break; } } } this.notifyPageNavEnabled(_7ea); if(this.multipleObserverArray&&this.multipleObserverArray instanceof Array){ _7e7=this.multipleObserverArray.length; for(k=0;k<_7e7;k++){ _7e9=eval(this.multipleObserverArray[k]); if(_7e9&&typeof _7e9=="object"&&typeof _7e9.checkInsertRemove=="function"){ _7e9.checkInsertRemove(); } } } for(var _7eb=0;_7eb0){ portletSharePrompt(_814); } } this.dispatchRequest(oReq); }; CCognosViewer.prototype.portletPromptParams=function(oReq){ var _816=[]; var _817=null; var _818=true; var _819=oReq.getFormFields().keys(); for(var _81a=0;_81a<_819.length;_81a++){ _817=_819[_81a]; if(_817=="_promptControl"&&oReq.getFormField(_817)=="search"){ _818=false; break; }else{ if(_817.indexOf("p_")===0){ if(_817.indexOf("p_credential")===0){ _818=false; break; }else{ _816.push([_817,oReq.getFormField(_817)]); } } } } if(_816&&!_818){ _816=[]; } return _816; }; CCognosViewer.prototype.preparePromptValues=function(oReq){ var _81c=[]; if(this.preProcessControlArray){ var _81d=this.preProcessControlArray.length; var k=0; for(k=0;k<_81d;k++){ var _81f=eval(this.preProcessControlArray[k]); var _820=(typeof _81f.isEnabled=="function"?_81f.isEnabled():true); if(_81f&&typeof _81f.preProcess=="function"&&_820){ _81f.preProcess(); if(_81f.m_oSubmit){ if(oReq.addParameter){ oReq.addParameter(_81f.m_oSubmit.name,_81f.m_oSubmit.value); }else{ oReq.addFormField(_81f.m_oSubmit.name,_81f.m_oSubmit.value); } _81c.push(_81f.m_oSubmit); if(_81f.m_sPromptId&&_81f.m_oForm&&_81f.m_oForm.elements&&typeof _81f.m_oForm.elements["p_"+_81f.m_sRef]=="object"){ if(oReq.addParameter){ oReq.addParameter("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value); }else{ oReq.addFormField("p_"+_81f.m_sPromptId,_81f.m_oForm.elements["p_"+_81f.m_sRef].value); } } } } } } var _821=document.getElementById("formWarpRequest"+this.getId()); if(_821){ var _822=_821.elements; for(var _823=0;_823<_822.length;_823++){ var _824=_822[_823]; if(!_824.name||!_824.name.match(/^p_/)){ continue; } var _825=true; for(var _826=0;_826<_81c.length;_826++){ if(_81c[_826]==_824){ _825=false; break; } } if(_825){ oReq.addFormField(_824.name,_824.value); _81c.push(_824); } } } var oRM=this["CognosReport"]; if(oRM){ var _828=oRM.prompt.getParameters(); for(var i=0;i<_828.length;i++){ var _82a="p_"+_828[i].getName(); if(!oReq.getFormField(_82a)){ oReq.addFormField(_82a,_828[i].getXML()); } } } return oReq; }; CCognosViewer.prototype.setViewerWidget=function(_82b){ this.m_viewerWidget=_82b; }; CCognosViewer.prototype.getViewerWidget=function(){ return this.m_viewerWidget; }; CCognosViewer.prototype.getFlashChartOption=function(){ var _82c=this.getViewerWidget(); var _82d=null; if(_82c){ var _82e=_82c.getProperties(); if(_82e){ _82d=_82e.getFlashCharts(); } } return _82d; }; CCognosViewer.prototype.fireWidgetEvent=function(evt,_830){ var _831=this.getViewerWidget(); if(_831!=null){ _831.fireEvent(evt,null,_830); } }; CCognosViewer.prototype.isMobile=function(){ return false; }; CCognosViewer.prototype.setVisibleDialog=function(_832){ this.m_visibleDialog=_832; }; CCognosViewer.prototype.getVisibleDialog=function(){ if(typeof this.m_visibleDialog!="undefined"){ return this.m_visibleDialog; } return null; }; CCognosViewer.prototype.getContentLocale=function(){ var _833=document.getElementById("formWarpRequest"+this.getId()); if(_833&&_833["ui.contentLocale"]&&_833["reRunObj"]&&_833["reRunObj"].value.length>0){ return _833["ui.contentLocale"].value; } return null; }; CCognosViewer.prototype.updateLayout=function(_834){ var cvid=this.getId(); var _836=document.getElementById("CVHeader"+cvid); var _837=document.getElementById("CVToolbar"+cvid); if(!_836&&!_837){ setTimeout(getCognosViewerObjectRefAsString(cvid)+".updateLayout(\""+_834+"\");",100); return; } if(_836){ var _838=this.getUIConfig()&&!this.getUIConfig().getShowBanner(); if((_834=="prompting"&&!this.bShowHeaderWithPrompts)||_838){ _836.parentNode.style.display="none"; }else{ _836.parentNode.style.display=""; } } if(_837){ if(_834=="prompting"||this.m_bHideToolbar==true){ _837.parentNode.style.display="none"; }else{ _837.parentNode.style.display=""; } } }; CCognosViewer.prototype.updateResponseSpecification=function(_839){ this.sResponseSpecification=_839; }; CCognosViewer.prototype.getResponseSpecification=function(){ return this.sResponseSpecification; }; CCognosViewer.prototype.release=function(_83a){ if(this.getStatus()!="fault"){ this._release(_83a); } }; CCognosViewer.prototype._release=function(_83b){ var form=document.getElementById("formWarpRequest"+this.getId()); var _83d=this.getTracking(); if(!_83d&&form&&form["m_tracking"]&&form["m_tracking"].value){ _83d=form["m_tracking"].value; form["m_tracking"].value=""; } this.setTracking(""); if(_83d){ var _83e=new DispatcherEntry(this); if(this.isWorkingOrPrompting()){ _83e.addFormField("ui.action","cancel"); }else{ _83e.addFormField("ui.action","release"); } _83e.addFormField("cv.responseFormat","successfulRequest"); _83e.addNonEmptyStringFormField("ui.primaryAction",this.envParams["ui.primaryAction"]); _83e.addNonEmptyStringFormField("ui.objectClass",this.envParams["ui.objectClass"]); _83e.addFormField("m_tracking",_83d); if(_83b!=true){ _83e.forceSynchronous(); } var _83f=this.getActiveRequest()?this.getActiveRequest():this.getFaultDispatcherEntry(); if(_83f&&_83f.getFormField("cv.outputKey")){ _83e.addFormField("b_action","cvx.high"); _83e.addFormField("cv.outputKey",_83f.getFormField("cv.outputKey")); _83e.addFormField("cv.waitForResponse","false"); _83e.setHeaders(_83f.getHeaders()); } var _840=_83e.getRequest().getFormFields(); var _841=_840.keys(); var data=new URLSearchParams(); for(var _843=0;_843<_841.length;_843++){ data.append(_841[_843],_840.get(_841[_843])); } if(!navigator.sendBeacon(this.getGateway(),data)){ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: release sendBeacon failed."); } } return true; } return false; }; CCognosViewer.prototype.cleanupStyles=function(){ if(this.getViewerWidget()){ this.getViewerWidget().cleanupStyles(); } }; CCognosViewer.prototype.destroy=function(_844){ this.release(_844); if(!this.m_destroyed){ if(typeof window.gaRV_INSTANCES!="undefined"){ for(var _845=0;_845=this.m_drillTargets.length){ return null; } return this.m_drillTargets[idx]; }; CCognosViewer.prototype.getNumberOfDrillTargets=function(){ return this.m_drillTargets.length; }; CCognosViewer.prototype.isReportRenderingDone=function(){ return this.m_reportRenderingDone; }; CCognosViewer.prototype.setReportRenderingDone=function(flag){ this.m_reportRenderingDone=flag; }; CCognosViewer.prototype.hasAVSChart=function(){ var _86a=this.getRAPReportInfo(); if(_86a){ var _86b=_86a.getDisplayTypes(); return _86b.match("_v2")!=null||_86b.match("v2_")!=null; } return false; }; CCognosViewer.prototype.getPinFreezeManager=function(){ return this.m_pinFreezeManager; }; CCognosViewer.prototype.getReportContextHelper=function(){ if(!this.m_reportContextHelper){ this.m_reportContextHelper=new ReportContextHelper(this.getSelectionController().getCCDManager()); } return this.m_reportContextHelper; }; CCognosViewer.prototype.getRAPReportInfo=function(){ return this.m_RAPReportInfo; }; CCognosViewer.prototype.setRAPReportInfo=function(_86c){ this.m_RAPReportInfo=_86c; }; CCognosViewer.prototype.isNodeVisible=function(node){ if(this.m_pinFreezeManager){ return this.m_pinFreezeManager.isNodeVisible(node); } return true; }; CCognosViewer.prototype.getWarpRequestForm=function(){ return document.getElementById("formWarpRequest"+this.getId()); }; CCognosViewer.prototype.getBrowser=function(){ return this.sBrowser; }; CCognosViewer.prototype.repaintDiv=function(oDiv){ var _86f=oDiv.style.display; oDiv.style.display="none"; oDiv.style.display=_86f; }; CCognosViewer.prototype.isMetadataEmpty=function(){ var oSC=this.getSelectionController(); if(oSC){ var _871=oSC.getCCDManager(); if(_871){ return _871.isMetadataEmpty(); } } return true; }; CCognosViewer.prototype.setContextMenu=function(_872){ this.m_contextMenu=_872; }; CCognosViewer.prototype.getContextMenu=function(){ return this.m_contextMenu; }; CCognosViewer.prototype.setToolbar=function(_873){ this.m_toolbar=_873; }; CCognosViewer.prototype.getToolbar=function(){ return this.m_toolbar; }; CCognosViewer.prototype.getAdvancedServerProperty=function(_874){ if(this.m_advancedProperties&&this.m_advancedProperties[_874]!==undefined&&this.m_advancedProperties[_874]!==null){ return this.m_advancedProperties[_874]; }else{ return null; } }; CCognosViewer.prototype.hasPrompt=function(){ if(typeof this.m_bHasPrompt==="undefined"||this.m_bHasPrompt===null){ var _875=false; if(this.getAdvancedServerProperty("VIEWER_JS_PROMPT_AGAIN_SHOW_ALWAYS")==="true"||(this.envParams.reportPrompts&&this.envParams.reportPrompts.length>0)){ _875=true; }else{ var _876=new CParameterValues(); var _877=XMLBuilderLoadXMLFromString(this.getExecutionParameters()); if(_877.childNodes.length==1){ _876.loadWithOptions(_877.childNodes[0],true); var _878=_876.length(); for(var _879=0;_879<_878;++_879){ var _87a=_876.getAt(_879); if(_87a!==null&&_87a.length()>0&&_87a.name().indexOf("credential:")!=-1){ _875=true; break; } } } } this.m_bHasPrompt=_875; } return this.m_bHasPrompt; }; CCognosViewer.prototype.getDrillState=function(){ return this.m_sStateData?this.m_sStateData:""; }; CCognosViewer.prototype.isSelectionFilterEnabled=function(){ if(typeof this.m_bSelectionFilterSwitch=="undefined"){ this.m_bSelectionFilterSwitch=false; } return this.m_bSelectionFilterSwitch; }; CCognosViewer.prototype.broadcastContextChange=function(evt,_87c){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastContextChange(_87c); } stopEventBubble(evt); }; CCognosViewer.prototype.broadcastParameterChange=function(evt,_87e){ if(this.getViewerWidget()){ this.getViewerWidget().broadcastParameterChange(_87e); } stopEventBubble(evt); }; CCognosViewer.prototype.getReportDiv=function(){ if(!this.m_nReportDiv){ this.m_nReportDiv=document.getElementById("CVReport"+this.m_sId); } return this.m_nReportDiv; }; function CDocumentWriter(sId,_880){ this.m_sId=sId; this.m_sText=""; this.m_sScript=_880; }; CDocumentWriter.prototype.isValid=function(){ if(typeof this.m_sScript!="undefined"&&this.m_sScript&&window.gScriptLoader){ return true; } return false; }; CDocumentWriter.prototype.execute=function(){ if(this.isValid()&&window.gScriptLoader){ var _881=/document\.write(ln)?\s*\(/gi; var _882=this.m_sScript.replace(_881,"this.write(").replace(window.gScriptLoader.m_reScriptTagOpen,"").replace(window.gScriptLoader.m_reScriptTagClose,""); try{ eval(_882); var _883=document.getElementById(this.m_sId); if(_883){ _883.innerHTML=this.m_sText; return true; } } catch(e){ } } return false; }; CDocumentWriter.prototype.write=function(_884){ var _885=""; if(typeof _884=="function"){ _885=eval(_884); }else{ if(typeof _884=="string"){ _885=_884; } } this.m_sText+=_885; }; function setFocusToFirstTabItem(_886){ if(!window.dojo){ return; } var _887=dojo.query("*",_886); var _888=_887.length; for(var i=0;i<_888;i++){ var node=_887[i]; if(!node.style||(node.style.display!="none"&&node.style.visibility!="hidden")){ if(node.getAttribute("tabIndex")==0){ try{ node.focus(); } catch(e){ } break; } } } }; function ReportContextHelper(_88b){ this.m_oCDManager=_88b; }; ReportContextHelper.prototype.destroy=function(){ if(this.m_oCDManager&&this.m_oCDManager.destroy){ this.m_oCDManager.destroy(); } delete this.m_oCDManager; }; ReportContextHelper.prototype.processCtx=function(sCtx){ var _88d=sCtx.split("::"); var _88e=[]; for(var i=0;i<_88d.length;++i){ _88e[i]=_88d[i].split(":"); } if(_88e&&_88e.length&&_88e[0].length){ return _88e; }else{ return null; } }; ReportContextHelper.prototype.getDataItemName=function(sCtx){ var _891=this.processCtx(sCtx); if(_891){ return this.getRefDataItem(_891[0][0]); } return null; }; ReportContextHelper.prototype.getRefDataItem=function(_892){ var _893=this.m_oCDManager.GetRDIValue(_892); return (_893==null)?"":_893; }; ReportContextHelper.prototype.getMun=function(_894){ var aCtx=null; if(typeof _894==="string"){ aCtx=this.processCtx(_894); }else{ if(typeof _894==="number"){ aCtx=this.processCtx(_894.toString()); }else{ aCtx=_894; } } if(aCtx){ var sMun=this.m_oCDManager.GetMUN(aCtx[0][0]); return (sMun==null)?"":sMun; } return ""; }; function ViewerConfig(){ this.uiConfig=new ViewerUIConfig(); this.findConfig=typeof ViewerFindActionConfig=="function"?new ViewerFindActionConfig():null; this.httpRequestConfig=typeof ViewerHttpRequestConfig=="function"?new ViewerHttpRequestConfig():null; this.eventsConfig=typeof ViewerEventsConfig=="function"?new ViewerEventsConfig():null; }; ViewerConfig.prototype.configure=function(_897){ if(!_897){ return; } if(_897.findAction&&this.findConfig){ this.findConfig.configure(_897.findAction); } if(_897.UI){ this.uiConfig.configure(_897.UI); } if(_897.httpRequestCallbacks&&this.httpRequestConfig){ this.httpRequestConfig.configure(_897.httpRequestCallbacks); } if(_897.events&&this.eventsConfig){ this.eventsConfig.configure(_897.events); } }; ViewerConfig.prototype.getUIConfig=function(){ return this.uiConfig; }; ViewerConfig.prototype.getFindActionConfig=function(){ return this.findConfig; }; ViewerConfig.prototype.getHttpRequestConfig=function(){ return this.httpRequestConfig; }; ViewerConfig.prototype.getEventsConfig=function(){ return this.eventsConfig; }; function ViewerUIConfig(){ this.showBanner=true; this.showToolbar=true; this.showContextMenu=true; this.showPageNavigation=true; this.primarySelectionColor=null; this.secondarySelectionColor=null; this.showSecondarySelection=true; }; ViewerUIConfig.prototype.configure=function(_898){ applyJSONProperties(this,_898); }; ViewerUIConfig.prototype.getShowBanner=function(){ return this.showBanner; }; ViewerUIConfig.prototype.getShowToolbar=function(){ return this.showToolbar; }; ViewerUIConfig.prototype.getShowContextMenu=function(){ return this.showContextMenu; }; ViewerUIConfig.prototype.getShowPageNavigation=function(){ return this.showPageNavigation; }; ViewerUIConfig.prototype.getPrimarySelectionColor=function(){ return this.primarySelectionColor; }; ViewerUIConfig.prototype.getSeondarySelectionColor=function(){ return this.secondarySelectionColor; }; ViewerUIConfig.prototype.getShowSecondarySelection=function(){ return this.showSecondarySelection; }; function ViewerHttpRequestConfig(){ this.reportStatus={}; this.UI={}; }; ViewerHttpRequestConfig.prototype.configure=function(_899){ applyJSONProperties(this,_899); }; ViewerHttpRequestConfig.prototype.getRequestIndicator=function(){ if(this.UI){ return this.UI.requestIndicator?this.UI.requestIndicator:null; } }; ViewerHttpRequestConfig.prototype.getWorkingDialog=function(){ if(this.UI){ return this.UI.workingDialog?this.UI.workingDialog:null; } }; ViewerHttpRequestConfig.prototype.getReportStatusCallback=function(_89a){ if(this.reportStatus){ var _89b=this.reportStatus[_89a]; if(_89b){ return _89b; } if(_89a=="complete"&&this.reportStatus["initialComplete"]){ var _89c=this.reportStatus["initialComplete"]; this.reportStatus["initialComplete"]=null; return _89c; } } return null; }; function ViewerState(){ this.findState=null; this.pageState=null; }; ViewerState.prototype.setFindState=function(_89d){ if(typeof ViewerFindState!="function"){ return; } if(!this.findState){ this.findState=new ViewerFindState(); } this.findState.setState(_89d); }; ViewerState.prototype.clearFindState=function(){ this.findState=null; }; ViewerState.prototype.getFindState=function(){ return this.findState; }; ViewerState.prototype.setPageState=function(_89e){ if(typeof ViewerPageState!="function"){ return; } if(!this.pageState){ this.pageState=new ViewerPageState(); } this.pageState.setState(_89e); }; ViewerState.prototype.clearPageState=function(){ this.pageState=null; }; ViewerState.prototype.getPageState=function(){ return this.pageState; }; function ViewerEventsConfig(){ this.showContextMenuOnClick=false; }; ViewerEventsConfig.prototype.configure=function(_89f){ applyJSONProperties(this,_89f); }; ViewerEventsConfig.prototype.getShowContextMenuOnClick=function(){ return this.showContextMenuOnClick; }; CCognosViewer.prototype.loadExtra=function(){ var _8a0=this.getViewerWidget(); if(_8a0){ _8a0.loadExtraJavascriptFiles(this.getWebContentRoot()); } }; function CCognosViewerToolbarHelper(){ }; CCognosViewerToolbarHelper.updateToolbarForCurrentSelection=function(oCV,_8a2){ if(_8a2){ var _8a3=oCV.getActionFactory(); for(var _8a4=0;_8a4<_8a2.length;++_8a4){ var name=_8a2[_8a4]["name"]; if(typeof name!="undefined"&&name!=null){ var _8a6=_8a3.load(name); if(_8a6!=null&&typeof _8a6!="undefined"){ var _8a7=_8a6.updateMenu(_8a2[_8a4]); if(_8a7.visible==false){ if(_8a7.save){ oCV.getViewerWidget().addButtonToSavedToolbarButtons(name,_8a2[_8a4],_8a4); } _8a2.splice(_8a4,1); --_8a4; }else{ _8a2[_8a4]=_8a7; } } }else{ if(typeof _8a2[_8a4]._root!="undefined"){ CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(oCV,_8a2[_8a4]._root); }else{ if(_8a2[_8a4].separator){ if(_8a4==0||(_8a4>0&&_8a2[_8a4-1].separator)||_8a4==_8a2.length){ _8a2.splice(_8a4,1); --_8a4; } } } } } } }; CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection=function(oCV,_8a9){ var _8aa=[]; if(_8a9){ var _8ab=oCV.getActionFactory(); for(var _8ac=0;_8ac<_8a9.length;++_8ac){ var _8ad=_8a9[_8ac]; var name=_8a9[_8ac]["name"]; var _8af=true; if(typeof name!="undefined"){ var _8b0=_8ab.load(name); if(!_8b0){ if(name=="drillDown"){ _8b0=_8ab.load("DrillDown"); }else{ if(name=="drillUp"){ _8b0=_8ab.load("DrillUp"); } } } if(_8b0!=null&&typeof _8b0!="undefined"){ if(typeof _8b0.buildMenu=="function"){ _8ad=_8b0.buildMenu(_8a9[_8ac]); }else{ _8ad=_8b0.updateMenu(_8a9[_8ac]); } _8af=_8b0.isValidMenuItem(); }else{ if(typeof _8ad.items!="undefined"){ _8ad.items=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad.items); _8af=(_8ad.items&&_8ad.items.length>0)?true:false; if(_8af&&_8ad.items.length==1){ _8ad=_8ad.items[0]; } } } } if(_8ad&&_8ad.visible!==false&&_8af){ if(_8ad.separator===true){ if(_8aa.length>0&&typeof _8aa[_8aa.length-1].separator=="undefined"){ _8aa[_8aa.length]=_8ad; } }else{ if(_8ad.useChildrenItems==true&&_8ad.items&&_8ad.items.length>0){ if(!_8ad.disabled){ for(var _8b1=0;_8b1<_8ad.items.length;_8b1++){ _8aa[_8aa.length]=_8ad.items[_8b1]; } } }else{ if(typeof _8ad._root!="undefined"){ _8aa[_8aa.length]={"_root":CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(oCV,_8ad._root)}; }else{ _8aa[_8aa.length]=_8ad; } } } } } if(_8aa.length>1){ if(_8aa[_8aa.length-1].separator){ _8aa=_8aa.splice(0,_8aa.length-1); } } } return _8aa; }; function CCDManager(cv){ this.m_cd=null; this.m_md=null; this.m_oCV=null; this.m_dataItemInfo=null; }; CCDManager.prototype.SetContextData=function(CD){ if(this.m_cd){ this.m_cd=null; } this.m_cd=CD; }; CCDManager.prototype.SetMetadata=function(MD){ if(this.m_md){ this.m_md=null; } this.m_md=MD; }; CCDManager.prototype.AddContextData=function(CD){ if(!this.m_cd){ this.m_cd=CD; }else{ for(var i in CD){ this.m_cd[i]=CD[i]; } } }; CCDManager.prototype.AddMetadata=function(MD){ if(!this.m_md){ this.m_md=MD; }else{ for(var j in MD){ this.m_md[j]=MD[j]; } } }; CCDManager.prototype.getClonedMetadataArray=function(){ var _8b9={}; applyJSONProperties(_8b9,this.m_md); return _8b9; }; CCDManager.prototype.getClonedContextdataArray=function(){ var _8ba={}; applyJSONProperties(_8ba,this.m_cd); return _8ba; }; CCDManager.prototype.SetCognosViewer=function(_8bb){ if(_8bb){ this.m_oCV=_8bb; } }; CCDManager.prototype.onComplete_GetCDRequest=function(_8bc,_8bd){ if(_8bc){ var _8be=_8bc.getResult(); var _8bf=XMLBuilderLoadXMLFromString(_8be); if(_8bf){ var _8c0=_8bf.getElementsByTagName("Block"); for(var i=0;i<_8c0.length;i++){ var _8c2=""; var _8c3=_8c0[i].firstChild; while(_8c3){ _8c2+=_8c3.nodeValue; _8c3=_8c3.nextSibling; } var cd=eval("("+_8c2+")"); this.AddContextData(cd); } } } if(_8bd&&typeof _8bd=="function"){ _8bd(); } }; CCDManager.prototype.FetchContextData=function(_8c5,_8c6){ var _8c7=[]; var c=null,_8c9=_8c5.length; for(var i=0;i<_8c9;++i){ c=_8c5[i]; if(c!=""&&!this.ContextIdExists(c)){ _8c7.push(c); } } if(_8c7.length){ if(this.m_oCV){ this.getContextData(_8c7,_8c6); } } return _8c7.length; }; CCDManager.prototype.getContextData=function(_8cb,_8cc){ var oCV=this.m_oCV; var _8ce=new AsynchDataDispatcherEntry(oCV); _8ce.setCanBeQueued(false); if(!oCV.isBux){ _8ce.forceSynchronous(); } var form=document["formWarpRequest"+oCV.getId()]; var _8d0=oCV.getConversation(); var _8d1=oCV.getTracking(); if(!_8d1&&form&&form["m_tracking"]&&form["m_tracking"].value){ _8d1=form["m_tracking"].value; } if(oCV.m_viewerFragment){ var _8d2=oCV.getActiveRequest(); if(_8d2&&_8d2.getFormField("m_tracking")==_8d1){ return; } } var _8d3={customArguments:[_8cc],"complete":{"object":this,"method":this.onComplete_GetCDRequest}}; if(oCV.getStatus()=="prompting"){ _8d3["prompting"]={"object":this,"method":this.onComplete_GetCDRequest}; } _8ce.setCallbacks(_8d3); if(_8d0&&oCV.envParams["ui.action"]!="view"){ _8ce.addFormField("ui.action","getContext"); _8ce.addFormField("ui.conversation",_8d0); }else{ var _8d4=form["ui.object"]; if(typeof _8d4.length!="undefined"&&_8d4.length>1){ _8ce.addFormField("ui.object",form["ui.object"][0].value); }else{ _8ce.addFormField("ui.object",form["ui.object"].value); } _8ce.addFormField("ui.action","getObjectContext"); } _8ce.addFormField("cv.responseFormat","asynchDetailContext"); _8ce.addFormField("context.format","initializer"); _8ce.addFormField("context.type","reportService"); _8ce.addFormField("context.selection",_8cb.join(",")); _8ce.addNonEmptyStringFormField("m_tracking",_8d1); oCV.dispatchRequest(_8ce); }; CCDManager.prototype.ContextIdExists=function(_8d5){ return (this.m_cd&&this.m_cd[_8d5]?true:false); }; CCDManager.prototype.HasContextData=function(){ return (this.m_cd?true:false); }; CCDManager.prototype.HasMetadata=function(){ return (this.m_md?true:false); }; CCDManager.prototype._getMDPropertyFromCD=function(_8d6,_8d7,_8d8){ var p=null; this.FetchContextData([_8d6]); var cd=this.m_cd&&this.m_cd[_8d6]; if(cd){ var md=this.m_md[cd[_8d7]]; if(md){ p=md[_8d8]; } } return p; }; CCDManager.prototype.GetDrillFlag=function(_8dc){ return this._getMDPropertyFromCD(_8dc,"r","drill"); }; CCDManager.prototype.getModelPathFromBookletItem=function(_8dd){ var mp=null; var md=this.m_md[_8dd]; if(md){ mp=md.mp; if(mp&&this.m_md[mp]){ mp=this.m_md[mp].mp; } } return mp?mp:null; }; CCDManager.prototype.GetBookletModelBasedDrillThru=function(_8e0){ var p=null; var md=this.m_md[_8e0]; if(md){ p=md.modelBasedDrillThru; } return p?p:0; }; CCDManager.prototype.GetDrillFlagForMember=function(_8e3){ var _8e4=null; var d=this._getMDPropertyFromCD(_8e3,"r","drill"); if(d!==null&&this.m_cd[_8e3].m){ _8e4=d; } return _8e4; }; CCDManager.prototype.GetDataType=function(_8e6){ return this._getMDPropertyFromCD(_8e6,"r","dtype"); }; CCDManager.prototype.GetUsage=function(_8e7){ return this._getMDPropertyFromCD(_8e7,"r","usage"); }; CCDManager.prototype.GetHUN=function(_8e8){ var hun=this._getMDPropertyFromCD(_8e8,"h","h"); if(!hun){ var h=this._getMDPropertyFromCD(_8e8,"r","h"); if(h){ hun=this.m_md[h].h; } } if(hun!=null&&hun.indexOf("[__ns_")==0){ hun=null; } return hun; }; CCDManager.prototype.GetQuery=function(_8eb){ var qry=null; var q=this._getMDPropertyFromCD(_8eb,"r","q"); if(q){ qry=this.m_md[q].q; } return qry; }; CCDManager.prototype.GetDepth=function(_8ee){ return this._getMDPropertyFromCD(_8ee,"r","level"); }; CCDManager.prototype.GetDisplayValue=function(_8ef){ var _8f0=null; this.FetchContextData([_8ef]); if(this.ContextIdExists(_8ef)&&this.m_cd[_8ef]){ _8f0=this.m_cd[_8ef].u; } return _8f0; }; CCDManager.prototype.GetPUN=function(_8f1){ return this._getMDPropertyFromCD(_8f1,"p","p"); }; CCDManager.prototype.GetLUN=function(_8f2){ return this._getMDPropertyFromCD(_8f2,"l","l"); }; CCDManager.prototype.GetMUN=function(_8f3){ return this._getMDPropertyFromCD(_8f3,"m","m"); }; CCDManager.prototype.GetDUN=function(_8f4){ return this._getMDPropertyFromCD(_8f4,"d","d"); }; CCDManager.prototype.GetQMID=function(_8f5){ return this._getMDPropertyFromCD(_8f5,"i","i"); }; CCDManager.prototype.GetRDIValue=function(_8f6){ return this._getMDPropertyFromCD(_8f6,"r","r"); }; CCDManager.prototype.GetBIValue=function(_8f7){ return this._getMDPropertyFromCD(_8f7,"r","bi"); }; CCDManager.prototype.getContextIdForMetaData=function(lun,hun,_8fa){ var _8fb=[{"expression":lun,"type":"l"},{"expression":hun,"type":"h"}]; for(var _8fc=0;_8fc<_8fb.length;++_8fc){ var _8fd=_8fb[_8fc].expression; var _8fe=_8fb[_8fc].type; if(_8fd==""){ continue; } for(var _8ff in this.m_md){ if(this.m_md[_8ff][_8fe]==_8fd){ for(var _900 in this.m_md){ if(this.m_md[_900].r&&this.m_md[_900][_8fe]==_8ff){ if(this.m_md[_900].drill!=0||_8fa==true){ for(var ctx in this.m_cd){ if(this.m_cd[ctx].r==_900&&this.m_cd[ctx].m){ return ctx; } } } } } } } } return ""; }; CCDManager.prototype.GetContextIdForMUN=function(mun){ var _903=null; var _904=null; for(var i in this.m_md){ if(this.m_md[i].m==mun){ _903=i; break; } } if(_903!=null){ for(var j in this.m_cd){ if(this.m_cd[j].m==_903){ _904=j; break; } } } return _904; }; CCDManager.prototype.GetContextIdsForRDI=function(rdi){ var _908=[]; for(var i in this.m_md){ if(this.m_md[i].r==rdi){ _908.push(i); } } return _908; }; CCDManager.prototype.getMUNForRDIAndUseValue=function(rdi,_90b){ var _90c=this.GetContextIdsForRDI(rdi); for(var i in this.m_cd){ for(var j in _90c){ if(this.m_cd[i].r==_90c[j]&&this.m_cd[i].u==_90b){ var _90f=this.m_cd[i].m; if(_90f){ return this.m_md[_90f].m; } } } } return null; }; CCDManager.prototype.GetPageMinMaxForRDI=function(rdi){ var _911=null; var _912=null; var _913=this.GetContextIdsForRDI(rdi); this.FetchContextData([0]); for(var i in this.m_cd){ for(var j in _913){ if(this.m_cd[i].r==_913[j]){ var _916=parseFloat(this.m_cd[i].u); if(_916==this.m_cd[i].u){ if(_911==null||_916<_911){ _911=_916; } if(_912==null||_916>_912){ _912=_916; } } } } } if(_911!=null&&_912!=null){ return eval("({ pageMin: "+_911+", pageMax: "+_912+"})"); } }; CCDManager.prototype.GetContextIdForDisplayValue=function(_917){ var _918=null; for(var i in this.m_cd){ if(this.m_cd[i].u==_917){ _918=i; break; } } return _918; }; CCDManager.prototype.GetContextIdForUseValue=function(_91a){ var _91b=null; var _91c=null; var _91d=null; for(var i in this.m_md){ var md=this.m_md[i]; for(var j in md){ if(md[j]==_91a){ _91b=i; _91c=j; break; } } } if(_91b!=null){ for(var k in this.m_cd){ if(this.m_cd[k][_91c]==_91b){ _91d=k; break; } } } return _91d; }; CCDManager.prototype.getDataItemInfo=function(){ if(this.m_cd){ var _922={}; this.m_dataItemInfo={}; for(var i in this.m_cd){ var _924=this.m_cd[i].r; if(typeof _924!="undefined"){ var _925=this.m_md[_924].r; if(this.m_dataItemInfo[_925]==null){ this.m_dataItemInfo[_925]=1; }else{ this.m_dataItemInfo[_925]++; } } } return CViewerCommon.toJSON(this.m_dataItemInfo); } return ""; }; CCDManager.prototype.DataItemInfoToJSON=function(){ return this.getDataItemInfo(); }; CCDManager.prototype.MetadataToJSON=function(){ if(this.m_md){ return CViewerCommon.toJSON(this.m_md); } return ""; }; CCDManager.prototype.ContextDataToJSON=function(){ if(this.m_cd){ return CViewerCommon.toJSON(this.m_cd); } return ""; }; CCDManager.prototype.ContextDataSubsetToJSON=function(_926){ if(_926<=0){ return this.ContextDataToJSON(); } if(this.m_cd){ var _927={}; var _928={}; for(var i in this.m_cd){ var _92a=this.m_cd[i].r; if(typeof _92a!="undefined"){ if(_927[_92a]==null){ _927[_92a]=0; }else{ _927[_92a]++; } if(_927[_92a]<_926){ _928[i]=this.m_cd[i]; } } } return CViewerCommon.toJSON(_928); } return ""; }; CCDManager.prototype.GetHUNForRDI=function(rdi,_92c){ for(var i in this.m_md){ if(this.m_md[i].r==rdi&&this.m_md[i].q==_92c){ var _92e=this.m_md[i].h; if(_92e){ return this.m_md[_92e].h; } } } return null; }; CCDManager.prototype.GetMetadataIdForQueryName=function(_92f){ for(var i in this.m_md){ if(this.m_md[i].q===_92f){ return i; } } return null; }; CCDManager.prototype._isEmptyObject=function(obj){ for(var _932 in obj){ return false; } return true; }; CCDManager.prototype.isMetadataEmpty=function(){ if(this.m_md){ return this._isEmptyObject(this.m_md); } return true; }; CCDManager.prototype.GetBestPossibleItemName=function(_933){ var item=this.m_cd[_933]; if(!item){ return null; } if(item.l&&this.m_md[item.l].l){ return this._getStringInLastBracket(this.m_md[item.l].l); } if(item.r&&this.m_md[item.r].r){ return this._getStringInLastBracket(this.m_md[item.r].r); } if(item.h&&this.m_md[item.h].h){ return this._getStringInLastBracket(this.m_md[item.h].h); } if(item.i&&this.m_md[item.i].i){ return this._getStringInLastBracket(this.m_md[item.i].i); } return null; }; CCDManager.prototype.GetBestPossibleDimensionMeasureName=function(_935){ var item=this.m_cd[_935]; if(item&&item.m&&this.m_md[item.m]&&this.m_md[item.m].m){ return this._getStringInLastBracket(this.m_md[item.m].m); } return null; }; CCDManager.prototype._getStringInLastBracket=function(str){ if(str&&str.indexOf("].[")>0){ var _938=str.split("].["); var _939=_938[_938.length-1]; return _939.substring(0,_939.length-1); } return str; }; CCDManager.prototype._replaceNamespaceForSharedTM1DimensionOnly=function(_93a){ var _93b=this._getNamespaceAndDimensionFromUniqueName(_93a); if(_93b&&this.m_md){ for(var _93c in this.m_md){ var sMun=this.m_md[_93c].m; if(sMun&&sMun.length>0){ if(sMun.indexOf("->:[TM].")>0){ var oObj=this._getNamespaceAndDimensionFromUniqueName(sMun); if(oObj.dimension&&oObj.dimension===_93b.dimension&&oObj.namespace!==_93b.namespace){ var _93f=_93a.indexOf("."); return oObj.namespace+_93a.substr(_93f,_93a.length); } }else{ var _940=sMun.indexOf("->:["); if(_940>0){ if(sMun.substr(_940+4,4)!=="TM]."){ return _93a; } } } } } } return _93a; }; CCDManager.prototype._getNamespaceAndDimensionFromUniqueName=function(_941){ if(_941&&_941.length>0&&_941.indexOf("].[")>0){ var _942=_941.split("].["); if(_942.length>1){ return {"namespace":_942[0]+"]","dimension":"["+_942[1]+"]"}; } } return null; }; CCDManager.prototype.destroy=function(){ delete this.m_cd; delete this.m_md; delete this.m_oCV; delete this.m_dataItemInfo; }; var GUtil={}; GUtil.createHiddenForm=function(name,_944,_945,_946){ var form=document.getElementById(name); if(form){ document.body.removeChild(form); } form=document.createElement("form"); form.id=name; form.name=name; form.method=_944; form.style.display="none"; form.action=document.forms["formWarpRequest"+_945].action; form.target=_946+(new Date()).getTime(); document.body.appendChild(form); return form; }; GUtil.createFormField=function(el,name,_94a){ var _94b=document.createElement("input"); _94b.type="hidden"; _94b.name=name; _94b.value=_94a; el.appendChild(_94b); }; GUtil.generateCallback=function(func,_94d,_94e){ if(func){ var _94f=_94e||this; _94d=(_94d instanceof Array)?_94d:[]; return (function(_950){ if(typeof _950!="undefined"&&_94d.length==0){ _94d.push(_950); } return func.apply(_94f,_94d); }); }else{ return (function(){ }); } }; GUtil.destroyProperties=function(_951,_952){ var _953; if(_951 instanceof Array){ for(var i=0;i<_951.length;i++){ _953=_951[i]; if(_953 instanceof String){ _953=null; }else{ if(_953&&_953.destroy&&!_953._beingDestroyed){ _953.destroy(); } GUtil.destroyProperties(_953); } } }else{ if(_951 instanceof Object){ if(_951._beingDestroyed){ return; } var obj=_951; obj._beingDestroyed=true; for(var _956 in obj){ _953=obj[_956]; if(_956==="_beingDestroyed"||_956==="m_destroyed"||_956==="_destroyed"||typeof _953=="function"){ continue; } if(_953 instanceof Array){ GUtil.destroyProperties(_953); }else{ if(_953 instanceof Object){ if(typeof _953.destroy=="function"&&!_953._destroyed&&(_953!==CCognosViewer||_952)){ _953.destroy(); } } } delete obj[_956]; } } } }; cvLoadDialog=function(_957,_958,_959,_95a,_95b,_95c){ _95c=((_95c===undefined)?true:_95c); var _95d=document.getElementById("formWarpRequest"+_957.getId()); if(_95d&&_957){ _957.getWorkingDialog().hide(); var _95e=""; var _95f=""; var _960=null; if(_957.isAccessibleMode()){ _95e="winNAT_"+(new Date()).getTime(); _95f=_957.getWebContentRoot()+"/"+"rv/blankNewWin.html?cv.id="+this.getCVId(); }else{ var _961=document.body; _960=new CModal("","",_961,null,null,_95a,_959,true,true,false,true,_957.getWebContentRoot()); if(typeof _95b=="string"){ document.getElementById(CMODAL_CONTENT_ID).setAttribute("title",_95b); } document.getElementById(CMODAL_BACK_IFRAME_ID).setAttribute("title",RV_RES.IDS_JS_MODAL_BACK_IFRAME); _95e=CMODAL_CONTENT_ID; } var _962=document.createElement("FORM"); _962.method="POST"; _962.action=_957.getGateway(); _962.target=_95e; _962.style.margin="0px"; document.body.appendChild(_962); for(var _963 in _958){ _962.appendChild(createHiddenFormField(_963,_958[_963])); } if(_95c){ _962.appendChild(createHiddenFormField("cv.id",_957.getId())); _962.appendChild(createHiddenFormField("b_action","xts.run")); _962.appendChild(createHiddenFormField("ui.action",_95d["ui.action"].value)); _962.appendChild(createHiddenFormField("ui.object",_95d["ui.object"].value)); if(typeof _957.rvMainWnd!="undefined"){ _962.appendChild(createHiddenFormField("run.outputFormat",_957.rvMainWnd.getCurrentFormat())); } if(typeof _95d["run.outputLocale"]!="undefined"){ _962.appendChild(createHiddenFormField("run.outputLocale",_95d["run.outputLocale"].value)); } if(typeof _962["backURL"]=="undefined"&&typeof _962["ui.backURL"]=="undefined"&&typeof _95d["ui.backURL"]!="undefined"){ _962.appendChild(createHiddenFormField("ui.backURL",_95d["ui.backURL"].value)); } if(typeof _957!="undefined"&&typeof _957.getConversation!="undefined"&&typeof _957.getTracking!="undefined"){ _962.appendChild(createHiddenFormField("ui.conversation",_957.getConversation())); _962.appendChild(createHiddenFormField("m_tracking",_957.getTracking())); if(_957.envParams["ui.name"]!="undefined"){ _962.appendChild(createHiddenFormField("ui.name",_957.envParams["ui.name"])); } } } var _964=window.onbeforeunload; window.onbeforeunload=null; if(_957.isAccessibleMode()){ window.open(_95f,_95e,"rv"); _962.submit(); }else{ _962.submit(); _960.show(); } window.onbeforeunload=_964; document.body.removeChild(_962); _957.modalShown=true; } }; function createHiddenFormField(name,_966){ var _967=document.createElement("input"); _967.setAttribute("type","hidden"); _967.setAttribute("name",name); _967.setAttribute("id",name); _967.setAttribute("value",_966); return (_967); }; function isAuthenticationFault(_968){ if(_968!=null){ var _969=XMLHelper_FindChildByTagName(_968,"CAM",true); return (_969!=null&&XMLHelper_FindChildByTagName(_969,"promptInfo",true)!=null); } }; function processAuthenticationFault(_96a,_96b){ if(isAuthenticationFault(_96a)){ launchLogOnDialog(_96b,_96a); return true; } return false; }; function isObjectEmpty(_96c){ for(var _96d in _96c){ if(_96c.hasOwnProperty(_96d)){ return false; } } return true; }; function launchLogOnDialog(cvID,_96f){ try{ var oCV=getCognosViewerObjectRef(cvID); var _971={"b_action":"xts.run","m":"portal/close.xts","h_CAM_action":"logonAs"}; if(_96f!=null){ var _972=XMLHelper_FindChildrenByTagName(_96f,"namespace",true); if(_972!=null){ for(var _973=0;_973<_972.length;++_973){ var _974=_972[_973]; if(_974!=null){ var _975=XMLHelper_FindChildByTagName(_974,"name",false); var _976=XMLHelper_FindChildByTagName(_974,"value",false); if(_975!=null&&_976!=null){ var _977=XMLHelper_GetText(_975); var _978=XMLHelper_GetText(_976); if(_977!=null&&_977.length>0){ _971[_977]=_978; } } } } } } cvLoadDialog(oCV,_971,540,460,null,false); } catch(exception){ } }; function getCVWaitingOnFault(){ var oCV=null; for(var _97a=0;_97a0&&_98f.childNodes[0].className=="textItem"){ try{ _98f.childNodes[0].focus(); } catch(e){ if(typeof console!=="undefined"&&console.log){ console.log("CCognosViewer: Could not set focus to node. setNodeFocus method common.js"); } } } } }; function html_encode(str){ return str.replace(/&/g,"&").replace(//g,">").replace(/"/g,"""); }; function replaceNewLine(_992){ var regX=/\r\n|\r|\n/g; var _994="
"; return _992.replace(regX,_994); }; function xml_encode(_995){ var _996=""+_995; if((_996=="0")||((_995!=null)&&(_995!=false))){ _996=_996.replace(/&/g,"&"); _996=_996.replace(//g,">"); _996=_996.replace(/"/g,"""); _996=_996.replace(/'/g,"'"); }else{ if(_995==null){ _996=""; } } return _996; }; function xml_decodeParser(sAll,_998){ var _999=sAll; switch(_998){ case "amp": _999="&"; break; case "lt": _999="<"; break; case "gt": _999=">"; break; case "quot": _999="\""; break; case "apos": _999="'"; break; } return _999; }; function xml_decode(_99a){ var _99b=""+_99a; if((_99b=="0")||((_99a!=null)&&(_99a!=false))){ _99b=_99b.replace(/&(amp|lt|gt|quot|apos);/g,xml_decodeParser); }else{ if(_99a==null){ _99b=""; } } return _99b; }; function xpath_attr_encode(_99c){ var _99d=null; if(_99c.indexOf("'")>=0&&_99c.indexOf("\"")>=0){ var _99e=_99c.split("\""); _99d="concat("; for(var i=0;i<_99e.length;++i){ if(i>0){ _99d+=","; } if(_99e[i].length>0){ _99d+=("\""+_99e[i]+"\""); }else{ _99d+="'\"'"; } } _99d+=")"; }else{ if(_99c.indexOf("'")>=0){ _99d="\""+_99c+"\""; }else{ _99d="'"+_99c+"'"; } } return _99d; }; function getCognosViewerObjectString(sId){ return "oCV"+sId; }; function getCognosViewerObjectRefAsString(sId){ return "window."+getCognosViewerObjectString(sId); }; function getCognosViewerObjectRef(sId){ return window[getCognosViewerObjectString(sId)]; }; function getCognosViewerSCObjectString(sId){ return "oCVSC"+sId; }; function getCognosViewerSCObjectRefAsString(sId){ return "window."+getCognosViewerSCObjectString(sId); }; function getCognosViewerSCObjectRef(sId){ return window[getCognosViewerSCObjectString(sId)]; }; function cleanupGlobalObjects(sId){ cleanupVariable(getCognosViewerObjectString(sId)); cleanupVariable(getCognosViewerSCObjectString(sId)); }; function cleanupVariable(_9a7){ if(typeof window[_9a7]!="undefined"&&window[_9a7]){ if(isIE()){ eval("delete "+_9a7); }else{ delete window[_9a7]; } } }; function loadClass(_9a8){ try{ var _9a9=eval("new "+_9a8+"();"); return _9a9; } catch(e){ return null; } }; function getElementsByClassName(oElm,_9ab,_9ac){ var _9ad=(_9ab=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9ab); var _9ae=[]; var _9af=new RegExp("(^|\\s)"+_9ac+"(\\s|$)"); var _9b0=_9ad.length; for(var i=0;i<_9b0;i++){ var _9b2=_9ad[i]; if(_9af.test(_9b2.className)){ _9ae.push(_9b2); } } return _9ae; }; function getImmediateLayoutContainerId(node){ var _9b4=node; while(_9b4!=null){ if(_9b4.getAttribute&&_9b4.getAttribute("lid")!=null){ return _9b4.getAttribute("lid"); } _9b4=_9b4.parentNode; } return null; }; function getChildElementsByAttribute(oElm,_9b6,_9b7,_9b8){ return getDescendantElementsByAttribute(oElm,_9b6,_9b7,_9b8,true); }; function getElementsByAttribute(oElm,_9ba,_9bb,_9bc,_9bd,_9be){ return getDescendantElementsByAttribute(oElm,_9ba,_9bb,_9bc,false,_9bd,_9be); }; function getDescendantElementsByAttribute(oElm,_9c0,_9c1,_9c2,_9c3,_9c4,_9c5){ var _9c6=[]; var _9c7=null; if(typeof _9c5==="undefined"){ _9c7=(typeof _9c2!="undefined")?new RegExp("(^|\\s)"+_9c2+"(\\s|$)","i"):null; }else{ _9c7=_9c5; } if(typeof _9c0=="string"){ _9c0=[_9c0]; } var _9c8=(oElm?_9c0.length:0); for(var _9c9=0;_9c9<_9c8;_9c9++){ var _9ca=null; if(_9c3){ if(_9c0[_9c9]=="*"&&oElm.all){ _9ca=oElm.childNodes; }else{ _9ca=[]; var _9cb=oElm.childNodes; for(var i=0;i<_9cb.length;++i){ if(_9cb[i].nodeName.toLowerCase()==_9c0[_9c9].toLowerCase()){ _9ca.push(_9cb[i]); } } } }else{ _9ca=(_9c0[_9c9]=="*"&&oElm.all)?oElm.all:oElm.getElementsByTagName(_9c0[_9c9]); } var _9cd=_9ca.length; for(var idx=0;idx<_9cd;idx++){ var _9cf=_9ca[idx]; var _9d0=_9cf.getAttribute&&_9cf.getAttribute(_9c1); if(_9d0!==null){ var _9d1=null; if(typeof _9d0==="number"){ _9d1=String(_9d0); }else{ if(typeof _9d0==="string"&&_9d0.length>0){ _9d1=_9d0; } } if(_9d1!==null){ if(typeof _9c2=="undefined"||(_9c7&&_9c7.test(_9d1))){ _9c6.push(_9cf); if(_9c4!=-1&&_9c6.length>_9c4){ return []; }else{ if(_9c4==1&&_9c6.length==1){ return _9c6; } } } } } } } return _9c6; }; function savedOutputDoneLoading(cvId,_9d3){ var oCV=window["oCV"+cvId]; var _9d5=(oCV&&oCV.getViewerWidget?oCV.getViewerWidget():null); var _9d6=(_9d5?_9d5.getSavedOutput():null); if(_9d6){ _9d6.outputDoneLoading(); }else{ if(_9d3<5){ _9d3++; var _9d7=function(){ savedOutputDoneLoading(cvId,_9d3); }; setTimeout(_9d7,100); } } }; function getNavVer(){ var temp; if(isIE()){ return getIEVersion(); }else{ temp=navigator.userAgent.split("/"); return parseFloat(temp[temp.length-1]); } }; function isSafari(){ return (navigator.userAgent.toLowerCase().indexOf("safari")!=-1&&navigator.userAgent.toLowerCase().indexOf("chrome")==-1); }; function isIE(){ return (navigator.userAgent.indexOf("MSIE")!=-1||navigator.userAgent.indexOf("Trident")!=-1); }; function getIEVersion(){ var _9d9=navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/); return _9d9?parseFloat(_9d9[1]):null; }; function isFF(){ return (navigator.userAgent.indexOf("Firefox")!=-1); }; function isIOS(){ return navigator.userAgent.indexOf("iPad")!=-1||navigator.userAgent.indexOf("iPhone")!=-1; }; function displayChart(_9da,_9db,_9dc,_9dd){ if(_9db.length>1){ document.images[_9da].src=_9db; } }; function isFlashChartNode(evt){ var node=getNodeFromEvent(evt); if(node!=null&&typeof node.getAttribute=="function"){ return node.getAttribute("flashChart")!=null; } return false; }; function onFlashChartRightClick(evt){ if(evt&&evt.button&&evt.button!=0&&isFlashChartNode(evt)){ return onViewerChartFocus(evt); } }; function onViewerChartFocus(evt){ if(evt.stopPropagation){ evt.stopPropagation(); } if(evt.preventDefault){ evt.preventDefault(); } if(evt.preventCapture){ evt.preventCapture(); } if(evt.preventBubble){ evt.preventBubble(); } var node=getNodeFromEvent(evt); var _9e3=node.getAttribute("viewerId"); if(!_9e3){ _9e3=node.parentNode.getAttribute("viewerId"); } if(!_9e3){ return; } var oCV=window["oCV"+_9e3]; var _9e5=oCV.getAction("Selection"); _9e5.pageClicked(evt); return stopEventBubble(evt); }; function clientToScreenCoords(_9e6,_9e7){ var _9e8=_9e6; var _9e9={topCoord:0,leftCoord:0}; while(_9e8!=null&&_9e8!=_9e7){ _9e9.topCoord+=_9e8.offsetTop; _9e9.leftCoord+=_9e8.offsetLeft; _9e8=_9e8.offsetParent; } return _9e9; }; function getCurrentPosistionString(oCV,_9eb,_9ec){ var _9ed=RV_RES.IDS_JS_INFOBAR_ITEM_COUNT; var _9ee=/\{0\}/; var _9ef=/\{1\}/; _9ed=_9ed.replace(_9ee,_9eb); _9ed=" "+_9ed.replace(_9ef,_9ec)+" "; return _9ed; }; function applyJSONProperties(obj,_9f1){ for(property in _9f1){ if(typeof _9f1[property]=="object"&&!(_9f1[property] instanceof Array)){ if(typeof obj[property]=="undefined"){ obj[property]={}; } applyJSONProperties(obj[property],_9f1[property]); }else{ obj[property]=_9f1[property]; } } }; function CViewerCommon(){ }; CViewerCommon.openNewWindowOrTab=function(sURL,_9f3){ return window.open(sURL,_9f3); }; CViewerCommon.toJSON=function(obj){ var type=typeof (obj); if(type!="object"||type===null){ if(type==="string"){ obj="\""+obj+"\""; } return String(obj); }else{ var _9f6; var prop; var json=[]; var _9f9=(obj&&obj.constructor==Array); for(_9f6 in obj){ prop=obj[_9f6]; type=typeof (prop); if(type==="string"){ prop="\""+prop+"\""; }else{ if(type=="object"&&prop!==null){ prop=CViewerCommon.toJSON(prop); } } json.push((_9f9?"":"\""+_9f6+"\":")+String(prop)); } return (_9f9?"[":"{")+String(json)+(_9f9?"]":"}"); } }; function resizePinnedContainers(){ var oCV=window.gaRV_INSTANCES[0]; if(oCV&&!oCV.m_viewerFragment){ var _9fb=oCV.getPinFreezeManager(); if(_9fb&&_9fb.hasFrozenContainers()){ var _9fc=document.getElementById("RVContent"+oCV.getId()); var _9fd=document.getElementById("mainViewerTable"+oCV.getId()); var _9fe=_9fc.clientWidth; var _9ff=_9fd.clientHeight; _9fb.resize(_9fe,_9ff); if(isIE()){ oCV.repaintDiv(_9fc); } } } }; function setWindowHref(url){ var _a01=window.onbeforeunload; window.onbeforeunload=null; window.location.href=url; window.onbeforeunload=_a01; }; CViewerCommon.getMessage=function(msg,args){ if(typeof args=="undefined"){ return msg; }else{ if(typeof args=="string"){ msg=msg.replace("{0}",args); }else{ if(args.length){ for(var i=0;i0){ var _a1d=new CParameterValueStringOperators(RV_RES.IDS_JS_FILTER_BETWEEN,RV_RES.IDS_JS_FILTER_NOT_BETWEEN,RV_RES.IDS_JS_FILTER_LESS_THAN,RV_RES.IDS_JS_FILTER_GREATER_THAN); for(var _a1e=0;_a1e<_a1b;++_a1e){ var _a1f=_a1a.getAt(_a1e); if(_a1f!=null){ _a1c+=""; _a1c+=""; _a1c+=xml_encode(_a1f.name()); _a1c+=""; _a1c+=""; _a1c+=xml_encode(_a1f.toString(_a1d)); _a1c+=""; _a1c+=""; } } } _a1c+=""; return _a1c; }; function PinFreezeContainer(_a20,lid,_a22,_a23,_a24,_a25,_a26){ this.m_pinFreezeManager=_a20; this.m_lid=lid; this.m_lidNS=lid+_a22+_a26; this.m_viewerId=_a22; this.m_freezeTop=_a23; this.m_freezeSide=_a24; this.m_cachedReportDiv=null; this.m_cachedPFContainer=null; this.m_cachedBaseContainer=_a25; this.m_containerMargin={"top":0,"left":0}; if(this.m_cachedBaseContainer&&this.m_cachedBaseContainer.style){ if(this.m_cachedBaseContainer.style.marginTop){ this.m_containerMargin.top=Number(this.m_cachedBaseContainer.style.marginTop.replace("px","")); } if(this.m_cachedBaseContainer.style.marginLeft){ this.m_containerMargin.left=Number(this.m_cachedBaseContainer.style.marginLeft.replace("px","")); } } this.m_cachedContainerIndex=_a26; this.m_sectionCache=null; this.m_homeCellNodes={}; this.m_fixedWidth=null; this.m_clientWidth=700; this.m_scrollableClientWidth=700; this.m_fixedHeight=null; this.m_clientHeight=300; this.m_scrollableClientHeight=300; this.m_wrapFlag=false; this.c_pageMargin=(this.m_freezeTop&&this.m_freezeSide)?50:20; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; }; PinFreezeContainer.prototype.toJSONString=function(){ var _a27="{"; _a27+="\"m_clientWidth\":"+this.m_clientWidth+""; _a27+=",\"m_scrollableClientWidth\":"+this.m_scrollableClientWidth+""; _a27+=",\"m_clientHeight\":"+this.m_clientHeight+""; _a27+=",\"m_scrollableClientHeight\":"+this.m_scrollableClientHeight+""; _a27+="}"; return _a27; }; PinFreezeContainer.prototype.copyProperties=function(_a28){ this.m_clientWidth=_a28.m_clientWidth; this.m_scrollableClientWidth=_a28.m_scrollableClientWidth; this.m_clientHeight=_a28.m_clientHeight; this.m_scrollableClientHeight=_a28.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setViewerId=function(id){ this.m_viewerId=id; }; PinFreezeContainer.prototype.getLid=function(){ return this.m_lid; }; PinFreezeContainer.prototype.createPFContainer=function(_a2a,_a2b){ var _a2c=document.createElement("temp"); if(this.m_cachedBaseContainer){ this.applyAuthoredFixedSizes(this.m_cachedBaseContainer); this.m_cachedReportDiv=_a2a; var _a2d=this.m_cachedBaseContainer.parentNode; var _a2e=this.loadTemplateHTML(); if(_a2e){ _a2c.innerHTML=_a2e; var _a2f=this.getContainerByLID(_a2c); var _a30=this.getSectionByLID(_a2c.firstChild,"pfMainOutput"); if(_a30){ var i=this.getChildPosition(_a2d,this.m_cachedBaseContainer); if(i!=-1){ var _a32=this.m_pinFreezeManager.m_oCV; if(_a32&&_a32.envParams["freezeDefaultWrap"]){ if(this.m_cachedBaseContainer.style.whiteSpace===""&&_a32.envParams["freezeDefaultWrap"].toLowerCase()==="true"){ var _a33=this.m_cachedBaseContainer.getElementsByTagName("span"); if(_a33){ for(var k=0;k<_a33.length;k++){ _a33[k].style.whiteSpace="nowrap"; } } this.m_wrapFlag=true; } } if(!_a2b){ if(!this._getFixedWidth()){ this.m_cachedBaseContainer.setAttribute("authoredFixedWidth","false"); this.m_addedFixedWidth=this.m_cachedBaseContainer.clientWidth+1; this.m_cachedBaseContainer.style.width=this.m_addedFixedWidth+"px"; } if(!this._getFixedHeight()){ this.m_cachedBaseContainer.setAttribute("authoredFixedHeight","false"); this.m_addedFixedHeight=this.m_cachedBaseContainer.clientHeight; this.m_cachedBaseContainer.style.height=this.m_addedFixedHeight+"px"; } _a30.style.width=this.m_cachedBaseContainer.clientWidth+2+"px"; _a30.style.height=this.m_cachedBaseContainer.clientHeight+2+"px"; } _a30.appendChild(this.m_cachedBaseContainer); this.insertAt(_a2d,_a2f,i); } if(this.m_cachedBaseContainer.style.border!==""){ _a2f.style.border=this.m_cachedBaseContainer.style.border; this.m_cachedBaseContainer.style.border=""; } } } } }; PinFreezeContainer.prototype._getFixedWidth=function(_a35){ if(_a35&&_a35.style.width&&!_a35.getAttribute("authoredFixedWidth")){ var _a36=Number(_a35.style.width.split("px")[0]); return isNaN(_a36)?null:_a36; } return null; }; PinFreezeContainer.prototype._getFixedHeight=function(_a37){ if(_a37&&_a37.style.height&&!_a37.getAttribute("authoredFixedHeight")){ var _a38=Number(_a37.style.height.split("px")[0]); return isNaN(_a38)?null:_a38; } return null; }; PinFreezeContainer.prototype.applyAuthoredFixedSizes=function(_a39){ var _a3a=this._getFixedWidth(_a39); if(_a3a){ this.m_fixedWidth=_a3a; this.m_clientWidth=this.m_fixedWidth; this.m_scrollableClientWidth=this.m_fixedWidth; } var _a3b=this._getFixedHeight(_a39); if(_a3b){ this.m_fixedHeight=_a3b; this.m_clientHeight=this.m_fixedHeight; this.m_scrollableClientHeight=this.m_fixedHeight; } }; PinFreezeContainer.prototype.loadFreezeBothTemplateHTML=function(){ var _a3c=""+""+""+""+""+""+""+"
"+"
"+"
"+"
"+"
"+"
"+"
"+"
 
"+"
"+"
"; return _a3c; }; PinFreezeContainer.prototype.loadFreezeSideTemplateHTML=function(){ var _a3d=""+""+""+""+"
"+"
"+"
"+"
 
"+"
"+"
"; return _a3d; }; PinFreezeContainer.prototype.loadFreezeTopTemplateHTML=function(){ var _a3e=""+""+""+""+"
"+"
"+"
"+"
"+"
"; return _a3e; }; PinFreezeContainer.prototype.loadTemplateHTML=function(){ if(this.m_freezeSide&&this.m_freezeTop){ return this.loadFreezeBothTemplateHTML(); }else{ if(this.m_freezeSide){ return this.loadFreezeSideTemplateHTML(); }else{ if(this.m_freezeTop){ return this.loadFreezeTopTemplateHTML(); } } } return null; }; PinFreezeContainer.prototype.createSideHeadings=function(_a3f){ var _a40=this.getSection("pfMainOutput"); var _a41=_a40.getAttribute("pfslid"); var _a42=this.getSection("pfSideHeadings"); var _a43=_a42.getAttribute("pfslid"); var _a44=this.getMainOutputHomeCell(); if(!_a44){ return; } var _a45=_a3f; var _a46=_a42; var _a47=this.isA11yEnabled(_a45); var _a48=this.m_pinFreezeManager.deepCloneNode(_a45); _a46.appendChild(_a48); var _a49=this.getSectionHomeCell(_a42); if(!_a49){ return; } var _a4a=_a45.getElementsByTagName("tbody"); var _a4b=_a48.getElementsByTagName("tbody"); if(_a4a.length>0&&_a4b.length>0){ var _a4c=_a4a[0]; var _a4d=_a4b[0]; var _a4e=_a4c.firstChild; var _a4f=_a4d.firstChild; var _a50=_a44.rowSpan; this.markAsCopy(_a44,_a49,_a41,_a43); for(var r=0;r<_a50;++r){ var _a52=_a4d.rows[r]; this.removeCTX(_a52); } for(var r=_a50;r<_a4d.rows.length;++r){ var _a53=_a4c.rows[r]; var _a52=_a4d.rows[r]; _a52.style.visibility="hidden"; for(var c=0;c<_a52.cells.length;++c){ var _a55=_a52.cells[c]; if(_a47){ _a55=this.m_pinFreezeManager.removeIdAttribute(_a55); } if(_a55.getAttribute("type")=="datavalue"){ _a55.removeAttribute("ctx"); _a55.removeAttribute("uid"); _a55.removeAttribute("name"); }else{ var _a56=_a53.cells[c]; this.markAsCopy(_a56,_a55,_a41,_a43); } } _a52.style.visibility="visible"; } } }; PinFreezeContainer.prototype.applyNeighbouringBorderStylesToHomeCell=function(_a57,_a58){ if(isFF()||isIE()){ if(_a57&&_a57.length&&_a57[0].cells&&_a57[0].cells.length>1){ if(this.m_freezeSide){ var _a59=this.getBorderInfo(_a57[0].cells[1],"right"); if(_a59){ _a58.style.borderRightWidth=_a59.borderRightWidth; _a58.style.borderRightStyle=_a59.borderRightStyle; _a58.style.borderRightColor=_a59.borderRightColor; } } if(this.m_freezeTop){ var _a59=this.getBorderInfo(_a57[0].cells[1],"bottom"); if(_a59){ _a58.style.borderBottomWidth=_a59.borderBottomWidth; _a58.style.borderBottomStyle=_a59.borderBottomStyle; _a58.style.borderBottomColor=_a59.borderBottomColor; } } } } }; PinFreezeContainer.prototype.createTopHeadings=function(_a5a){ var _a5b=this.getSection("pfMainOutput"); var _a5c=_a5b.getAttribute("pfslid"); var _a5d=this.getSection("pfTopHeadings"); var _a5e=_a5d.getAttribute("pfslid"); var _a5f=this.getMainOutputHomeCell(); if(!_a5f){ return; } var _a60=_a5a; var _a61=_a5d; var _a62=this.isA11yEnabled(_a60); var _a63=this.m_pinFreezeManager.deepCloneNode(_a60); _a63.setAttribute("clonednode","true"); _a61.appendChild(_a63); var _a64=_a60.getElementsByTagName("tbody"); var _a65=_a63.getElementsByTagName("tbody"); if(_a64.length>0&&_a65.length>0){ var _a66=_a64[0]; var _a67=_a65[0]; var _a68=_a5f.rowSpan; for(var r=0;r<_a67.rows.length;++r){ var _a6a=_a66.rows[r]; var _a6b=_a67.rows[r]; if(_a62){ _a6b=this.m_pinFreezeManager.removeIdAttribute(_a6b); } _a6b.style.visibility="hidden"; for(var c=0;c<_a6b.cells.length;++c){ var _a6d=_a6b.cells[c]; if(r>_a68||_a6d.getAttribute("type")=="datavalue"){ _a6d.removeAttribute("ctx"); _a6d.removeAttribute("uid"); _a6d.removeAttribute("name"); }else{ var _a6e=_a6a.cells[c]; this.markAsCopy(_a6e,_a6d,_a5c,_a5e); if(_a6e===_a5f){ this.initializeHomeCellTabIndex(_a6d); this.applyNeighbouringBorderStylesToHomeCell(_a66.rows,_a6d); } } } _a6b.style.visibility="visible"; } } }; PinFreezeContainer.prototype.createHomeCellHeading=function(){ var _a6f=this.getSection("pfMainOutput"); var _a70=_a6f.getAttribute("pfslid"); var _a71=this.getSection("pfHomeCell"); var _a72=_a71.parentNode; var _a73=_a71.getAttribute("pfslid"); var _a74=this.getMainOutputHomeCell(); if(!_a74){ return; } _a72.style.height="100%"; var _a75=this.getTopHeadingSectionHeight(_a74); _a71.style.height=_a75-this.m_containerMargin.top+"px"; _a71.style.width=this.getSideHeadingSectionWidth(_a74)-this.m_containerMargin.left+"px"; _a71.style.marginTop=this.m_containerMargin.top+"px"; _a71.style.marginLeft=this.m_containerMargin.left+"px"; var _a76=_a74.parentNode; var _a77=_a76.cloneNode(false); var _a78=this._findBestGuessHomeCell(_a74); var _a79=document.createElement("div"); _a79.style.width="100%"; _a79.style.height="100%"; while(_a74.offsetLeft<=_a78.offsetLeft){ oTargetHomeCell=this.m_pinFreezeManager.deepCloneNode(_a74); if(isFF()||isIE()){ _a74.appendChild(_a79); oTargetHomeCell.style.width=_a79.clientWidth+"px"; _a74.removeChild(_a79); }else{ oTargetHomeCell.style.width=_a74.clientWidth+1+"px"; } oTargetHomeCell.style.borderBottomWidth="0px"; _a77.appendChild(oTargetHomeCell); this.markAsCopy(_a74,oTargetHomeCell,_a70,_a73); if(_a74.nextSibling){ _a74=_a74.nextSibling; }else{ break; } } if(oTargetHomeCell){ oTargetHomeCell.style.borderRightWidth="0px"; } var _a7a=_a76.parentNode; var _a7b=_a7a.cloneNode(false); _a7b.appendChild(_a77); var _a7c=_a7a.parentNode; var _a7d=_a7c.cloneNode(false); _a7d.appendChild(_a7b); _a7d.style.width="100%"; _a7d.style.height="100%"; _a7d.style.marginLeft=""; _a7d.style.marginTop=""; _a71.appendChild(_a7d); this.initializeHomeCellTabIndex(oTargetHomeCell); this.applyNeighbouringBorderStylesToHomeCell(_a6f.firstChild.rows,_a71); }; PinFreezeContainer.prototype.markAsCopy=function(main,copy,_a80,_a81){ if(!main.pfCopy){ main.setAttribute("pfslid",_a80); main.pfCopy=[]; } main.pfCopy.push(copy); copy.pfMain=main; copy.setAttribute("pfslid",_a81); }; PinFreezeContainer.prototype.getCopy=function(_a82){ if(_a82.pfCopy){ var _a83={}; for(var i in _a82.pfCopy){ var copy=_a82.pfCopy[i]; if(copy.getAttribute){ var _a86=copy.getAttribute("pfslid"); if(_a86){ var _a87=PinFreezeContainer.getSectionNameFromSlid(_a86); var _a88=this.getSection(_a87); if(_a88&&PinFreezeContainer.isSectionVisible(_a88)){ _a83[_a87]=copy; } } } } if(_a83["pfHomeCell"]){ return _a83["pfHomeCell"]; } for(i in _a83){ return _a83[i]; } } return null; }; PinFreezeContainer.prototype.getMain=function(_a89){ if(_a89.pfMain){ return _a89.pfMain; } return null; }; PinFreezeContainer.isSectionVisible=function(_a8a){ var node=_a8a; if(!node){ return false; } while(node.parentNode&&!node.getAttribute("pfclid")){ if(node.style&&node.style.display==="none"){ return false; } node=node.parentNode; } return (!node.style||node.style.display!=="none"); }; PinFreezeContainer.prototype.getSectionStructure=function(){ var _a8c={isSideFrozen:false,isTopFrozen:false}; if(this.m_freezeSide){ var side=this.getSection("pfSideHeadings"); if(side){ _a8c.isSideFrozen=PinFreezeContainer.isSectionVisible(side); } } if(this.m_freezeTop){ var top=this.getSection("pfTopHeadings"); if(top){ _a8c.isTopFrozen=PinFreezeContainer.isSectionVisible(top); } } return _a8c; }; PinFreezeContainer.prototype.checkSectionStructureChange=function(_a8f,_a90){ if(_a8f.isSideFrozen!==_a90.isSideFrozen||_a8f.isTopFrozen!==_a90.isTopFrozen){ this.m_pinFreezeManager.sectionStructureChange(); } }; PinFreezeContainer.prototype.freezeContainerInReport=function(_a91){ this.cacheContainerAndSections(this.getContainerByLID(_a91)); this.m_homeCellNodes={}; this.updateContainer(); }; PinFreezeContainer.prototype.frozenSectionsRequired=function(){ return (this.frozenSideHeadingsRequired()||this.frozenTopHeadingsRequired()); }; PinFreezeContainer.prototype.frozenSideHeadingsRequired=function(){ var _a92=this.getSection("pfMainOutput"); if(_a92){ if(this.m_freezeSide){ var _a93=_a92.scrollWidth; return ((this.m_clientWidth<_a93)||_a93==0); } } return false; }; PinFreezeContainer.prototype.frozenTopHeadingsRequired=function(){ var _a94=this.getSection("pfMainOutput"); if(_a94){ if(this.m_freezeTop){ var _a95=_a94.scrollHeight; return ((this.m_clientHeight<_a95)||_a95==0); } } return false; }; PinFreezeContainer.prototype.showTemplatePart=function(_a96,_a97){ var _a98=this.getContainer().rows; for(var r=0;r<_a98.length;++r){ if(_a98[r].getAttribute("templatePart")===_a96){ _a98[r].style.display=((_a97)?"":"none"); }else{ var _a9a=_a98[r].cells; for(var c=0;c<_a9a.length;++c){ if(_a9a[c].getAttribute("templatePart")===_a96){ _a9a[c].style.display=((_a97)?"":"none"); } } } } }; PinFreezeContainer.prototype.showFreezeTopOnly=function(_a9c){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _a9d=(_a9c.scrollWidth==0)?_a9c.clientWidth:_a9c.scrollWidth; this.updateMainOutputWidth(_a9d); this.setScrollX(_a9c,0); if(this.getSection("pfTopHeadings")){ this.getSection("pfTopHeadings").style.width=_a9d+"px"; this.setScrollX(this.getSection("pfTopHeadings"),0); } this.showTemplatePart("freezeSide",false); }; PinFreezeContainer.prototype.showFreezeSideOnly=function(_a9e){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } var _a9f=(_a9e.scrollHeight==0)?_a9e.clientHeight:_a9e.scrollHeight; this.updateMainOutputHeight(_a9f); this.setScrollY(_a9e,0); if(this.getSection("pfSideHeadings")){ this.getSection("pfSideHeadings").style.height=_a9f+"px"; this.setScrollY(this.getSection("pfSideHeadings"),0); } this.showTemplatePart("freezeTop",false); }; PinFreezeContainer.prototype.showAll=function(){ if(!(this.m_freezeTop&&this.m_freezeSide)){ return; } this.showTemplatePart("freezeTop",true); this.showTemplatePart("freezeSide",true); }; PinFreezeContainer.prototype.showMainOutputOnly=function(_aa0){ this.updateMainOutputWidth((_aa0.scrollWidth==0)?_aa0.clientWidth:_aa0.scrollWidth); this.updateMainOutputHeight((_aa0.scrollHeight==0)?_aa0.clientHeight:_aa0.scrollHeight); this.setInitialScrollPosition(_aa0,0,0); if(this.m_freezeSide&&this.m_freezeTop){ this.getSection("pfHomeCell").style.display="none"; } if(this.m_freezeSide){ this.getSection("pfSideHeadings").style.display="none"; this.getSection("pfHorizontalScrollBar").style.display="none"; } if(this.m_freezeTop){ this.getSection("pfTopHeadings").style.display="none"; this.getSection("pfVerticalScrollBar").style.display="none"; } }; PinFreezeContainer.prototype.getWrap=function(el){ if(el.currentStyle){ return el.currentStyle.whiteSpace; }else{ if(window.getComputedStyle){ return window.getComputedStyle(el,null).getPropertyValue("white-space"); }else{ return el.style.whiteSpace; } } }; PinFreezeContainer.prototype.getStyleDisplay=function(el){ if(el.currentStyle){ return el.currentStyle.display; }else{ if(window.getComputedStyle){ return window.getComputedStyle(el,null).getPropertyValue("display"); }else{ return el.style.display; } } }; PinFreezeContainer.prototype.headingsCreated=function(_aa3){ return _aa3.firstChild?true:false; }; PinFreezeContainer.prototype.updateContainer=function(){ var _aa4=this.getSection("pfMainOutput"); var _aa5=this.getMainOutputHomeCell(); if(_aa5){ if(this.m_scrollableClientHeight===this.m_clientHeight||!this.m_scrollableClientHeight){ this.m_scrollableClientHeight-=_aa5.offsetHeight; var _aa6=this.calculateMinCrossTabScrollableClientHeight(); if(_aa6>this.m_scrollableClientHeight){ this.m_scrollableClientHeight=_aa6; } } if(this.m_scrollableClientWidth===this.m_clientWidth||!this.m_scrollableClientWidth){ this.m_scrollableClientWidth-=this.getHomeCellOffsetWidth(_aa5); } } if(_aa4&&_aa5){ this.showAll(); if(this.frozenSectionsRequired()){ this.updateMainOutputSize(); this.initializeHomeCellTabIndex(_aa5); if(this.m_freezeSide){ var _aa7=this.getSection("pfSideHeadings"); if(!this.headingsCreated(_aa7)){ this.createSideHeadings(this.m_cachedBaseContainer); if(this.m_freezeTop){ this.initializeTouchScrolling(_aa7); } } var _aa8=this.getSection("pfHorizontalScrollBar"); _aa8.scrollLeft="0px"; } if(this.m_freezeTop){ var _aa9=this.getSection("pfTopHeadings"); if(!this.headingsCreated(_aa9)){ this.createTopHeadings(this.m_cachedBaseContainer); if(this.m_freezeSide){ this.initializeTouchScrolling(_aa9); } } var _aaa=this.getSection("pfVerticalScrollBar"); _aaa.scrollTop="0px"; } if(this.m_freezeSide&&this.m_freezeTop){ var _aab=this.getSection("pfHomeCell"); if(!this.headingsCreated(_aab)){ this.createHomeCellHeading(); } _aab.style.display=""; } var _aac=this.updateSideHeadingSize(_aa5); var _aad=this.updateTopHeadingSize(_aa5); if(!this.frozenSectionsRequired()){ this.showMainOutputOnly(_aa4); } this.setInitialScrollPosition(_aa4,_aac,_aad); if(this.m_freezeTop&&this.m_freezeSide){ this.setInitialScrollPosition(this.getSection("pfSideHeadings"),0,_aad); this.setInitialScrollPosition(this.getSection("pfTopHeadings"),_aac,0); } this.initializeTouchScrolling(_aa4); }else{ this.showMainOutputOnly(_aa4); this.removeTouchScrolling(); } this.updateTabIndexValues(); } }; PinFreezeContainer.prototype.calculateMinCrossTabScrollableClientHeight=function(){ var _aae=0; if(this.m_cachedPFContainer){ var _aaf=this.getElementByLID(this.m_cachedPFContainer,"table",this.m_lid+this.m_viewerId); if(_aaf){ var _ab0=0; for(var r=0;r<_aaf.rows.length;r++){ var row=_aaf.rows[r]; for(var c=0;c=2){ break; } } } } return _aae; }; PinFreezeContainer.prototype.updateSideHeadingSize=function(_ab6){ var _ab7=0; if(this.m_freezeSide){ var _ab8=this.getSection("pfMainOutput"); if(!_ab8){ return 0; } if(!this.frozenSideHeadingsRequired()){ this.showFreezeTopOnly(_ab8); return 0; } var _ab9=this.getSection("pfSideHeadings"); _ab7=this.getSideHeadingSectionWidth(_ab6); var _aba=this.getSection("pfHorizontalScrollBar"); var _abb=this.getSectionHomeCell(_ab9); if(_ab9.style.display=="none"){ _ab9.style.display=""; _aba.style.display=""; } _ab9.style.width=_ab7+"px"; _ab9.style.height=_ab8.clientHeight+"px"; } return _ab7; }; PinFreezeContainer.prototype.updateTopHeadingSize=function(_abc){ var _abd=0; if(this.m_freezeTop){ var _abe=this.getSection("pfMainOutput"); if(!_abe){ return 0; } if(!this.frozenTopHeadingsRequired()){ this.showFreezeSideOnly(_abe); return 0; } var _abf=this.getSection("pfTopHeadings"); _abd=this.getTopHeadingSectionHeight(_abc); var _ac0=this.getSection("pfVerticalScrollBar"); var _ac1=this.getSectionHomeCell(_abf); if(_abf.style.display=="none"){ _abf.style.display=""; _ac0.style.display=""; } _abf.style.height=_abd+"px"; _abf.style.width=_abe.clientWidth+"px"; } return _abd; }; PinFreezeContainer.prototype.setScrollX=function(_ac2,_ac3){ if(getElementDirection(_ac2)==="rtl"){ setScrollRight(_ac2,_ac3); }else{ setScrollLeft(_ac2,_ac3); } }; PinFreezeContainer.prototype.setScrollY=function(_ac4,_ac5){ _ac4.scrollTop=_ac5; }; PinFreezeContainer.prototype.setInitialScrollPosition=function(_ac6,_ac7,_ac8){ if(getElementDirection(_ac6)==="rtl"){ setScrollRight(_ac6,_ac7); }else{ setScrollLeft(_ac6,_ac7); } _ac6.scrollTop=_ac8; }; PinFreezeContainer.prototype.getScrollableClientWidth=function(){ return this.m_scrollableClientWidth; }; PinFreezeContainer.prototype.setScrollableClientWidth=function(_ac9){ this.m_scrollableClientWidth=_ac9; }; PinFreezeContainer.prototype.getContainerWidth=function(){ return this.m_addedFixedWidth?this.m_addedFixedWidth:this.m_clientWidth; }; PinFreezeContainer.prototype.getClientWidth=function(){ return this.m_clientWidth; }; PinFreezeContainer.prototype.getScrollableClientHeight=function(){ return this.m_scrollableClientHeight; }; PinFreezeContainer.prototype.setScrollableClientHeight=function(_aca){ this.m_scrollableClientHeight=_aca; }; PinFreezeContainer.prototype.getClientHeight=function(){ return this.m_clientHeight; }; PinFreezeContainer.prototype.clientHeight=function(_acb){ return _acb.clientHeight; }; PinFreezeContainer.prototype.findBestContainerHeight=function(_acc){ if(this.m_freezeTop&&this.m_cachedReportDiv){ var _acd=this.m_cachedReportDiv.parentNode; if(_acd){ var _ace=this._findRestOfPageHeight(this.getContainer()); return _acc-_ace-(this.c_pageMargin/2)-this.m_containerMargin.top; } } return _acc-this.c_pageMargin; }; PinFreezeContainer.prototype.findBestContainerWidth=function(_acf){ var node=this.getContainer(); while(node&&node.nodeName.toLowerCase()!="td"&&node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ node=node.parentNode; } if(!node){ return -1; } if(node.nodeName.toLowerCase()=="td"){ var _ad1=0; var _ad2=node.parentNode.childNodes; for(var i=0;i<_ad2.length;i++){ if(_ad2[i]!==node){ _ad1+=_ad2[i].clientWidth; } } return _acf-_ad1-(this.c_pageMargin/2); } return _acf; }; PinFreezeContainer.prototype._findRestOfPageHeight=function(node){ var _ad5=0; var _ad6=node.parentNode; if(!_ad6){ return _ad5; } if(_ad6.childNodes.length>1){ for(var i=0;i<_ad6.childNodes.length;i++){ var _ad8=_ad6.childNodes[i]; if(_ad8.nodeType==1){ var _ad9=this.getStyleDisplay(_ad8); if(_ad8!=node&&!isNaN(_ad8.clientHeight)&&_ad9!="none"&&_ad9!="table-cell"){ _ad5+=this.clientHeight(_ad8); } } } } if(node.getAttribute("id")!=("mainViewerTable"+this.m_viewerId)){ _ad5+=this._findRestOfPageHeight(_ad6); } return _ad5; }; PinFreezeContainer.prototype.resize=function(_ada,_adb,_adc,_add){ if(this.m_fixedWidth&&this.m_fixedHeight){ return; } _ada=(this.m_fixedWidth)?this.m_fixedWidth:_ada; _adb=(this.m_fixedHeight)?this.m_fixedHeight:_adb; var _ade=this.getSectionStructure(); if(this.m_sectionCache&&this.m_cachedPFContainer){ var _adf=0; if(_adb!==0){ _adf=this.findBestContainerHeight(_adb); if(_adc&&_adf<300){ _adf=300; }else{ if(_adf<100){ _adf=100; } } } this.m_clientHeight=_adf>0?_adf:this.m_clientHeight; var _ae0=0; if(_ada!==0){ _ae0=this.findBestContainerWidth(_ada); } this.m_clientWidth=(_ae0>0)?_ae0-5-(this.c_pageMargin/2):this.m_clientWidth; var _ae1=this.getSection("pfMainOutput"); var _ae2=this.getSectionHomeCell(_ae1); if(_ae2){ this.m_scrollableClientWidth=this.m_clientWidth-this.getSideHeadingSectionWidth(_ae2); this.m_scrollableClientHeight=this.m_clientHeight-_ae2.offsetHeight; } if(_add){ var _ae3=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",_add.lid); if(_ae3){ var node=_ae3[0]; while(node.nodeName.toLowerCase()!="table"){ node=node.parentNode; } node.style.width=_add.width+"px"; } } this.updateContainer(); }else{ this.m_clientWidth=_ada-this.c_pageMargin; this.m_clientHeight=_adb-this.c_pageMargin; } var _ae5=this.getSectionStructure(); this.checkSectionStructureChange(_ade,_ae5); }; PinFreezeContainer.prototype.updateMainOutputSize=function(){ if(this.m_freezeSide&&this.m_freezeTop){ if(this.frozenSideHeadingsRequired()){ this.updateMainOutputWidth(this.getScrollableClientWidth()); } if(this.frozenTopHeadingsRequired()){ this.updateMainOutputHeight(this.getScrollableClientHeight()); } }else{ if(this.m_freezeSide){ this.updateMainOutputWidth(this.getScrollableClientWidth()); }else{ if(this.m_freezeTop){ this.updateMainOutputHeight(this.getScrollableClientHeight()); } } } }; PinFreezeContainer.prototype.updateMainOutputWidth=function(_ae6){ var _ae7=this.getSection("pfMainOutput"); if(!_ae7){ return; } if(this.m_freezeSide==true){ _ae7.style.width=(_ae6+"px"); if(this.m_freezeTop==false||!this.frozenTopHeadingsRequired()){ _ae7.style.height=_ae7.firstChild.clientHeight+"px"; } var _ae8=this.getSection("pfHorizontalScrollBar"); if(_ae8){ _ae8.style.width=(_ae6+"px"); var _ae9=_ae8.firstChild; if(_ae9){ var _aea=this.getSectionHomeCell(_ae7); var _aeb=_ae7.scrollWidth-this.getHomeCellOffsetWidth(_aea); _ae9.style.width=_aeb+"px"; } } } }; PinFreezeContainer.prototype.updateMainOutputHeight=function(_aec){ var _aed=this.getSection("pfMainOutput"); if(!_aed){ return; } _aed.style.height=(_aec+"px"); if(!this.m_freezeSide||!this.frozenSideHeadingsRequired()){ _aed.style.width=_aed.firstChild.clientWidth+2+"px"; } var _aee=this.getSection("pfVerticalScrollBar"); if(_aee){ _aee.style.height=(_aec+"px"); var _aef=_aee.firstChild; if(_aef){ var _af0=this.getSectionHomeCell(_aed); var _af1=_aed.scrollHeight-_af0.offsetHeight; _aef.style.height=_af1+"px"; } } }; PinFreezeContainer.prototype.getElementByLID=function(_af2,tag,lid){ var _af5=getElementsByAttribute(_af2,tag,"lid",lid); if(_af5.length>0){ return _af5[0]; } return null; }; PinFreezeContainer.prototype.getContainerByLID=function(_af6){ var _af7=getElementsByAttribute(_af6,"table","pfclid","pfContainer_"+this.m_lidNS); if(_af7.length>0){ return _af7[0]; } return null; }; PinFreezeContainer.prototype.getSectionByLID=function(_af8,_af9){ var _afa=getElementsByAttribute(_af8,"div","pfslid",_af9+"_"+this.m_lidNS); if(_afa.length>0){ return _afa[0]; } return null; }; PinFreezeContainer.getSectionNameFromSlid=function(slid){ return slid?slid.split("_")[0]:null; }; PinFreezeContainer.getLidFromSlid=function(slid){ return slid.split("_")[1]; }; PinFreezeContainer.nodeToSlid=function(_afd){ while(_afd.parentNode&&!_afd.getAttribute("pfslid")){ _afd=_afd.parentNode; } if(_afd.getAttribute){ return _afd.getAttribute("pfslid"); } return null; }; PinFreezeContainer.prototype.cacheContainerAndSections=function(_afe){ if(!_afe){ return _afe; } this.m_cachedPFContainer=_afe; var _aff=getElementsByAttribute(this.m_cachedPFContainer,"div","pflid",this.m_lidNS); this.m_sectionCache={}; for(var i=0;i<_aff.length;++i){ var key=_aff[i].getAttribute("pfslid"); key=key.split("_",1); this.m_sectionCache[key]=_aff[i]; } return _afe; }; PinFreezeContainer.prototype.getContainer=function(){ return this.m_cachedPFContainer; }; PinFreezeContainer.prototype.getSection=function(key){ if(!this.m_sectionCache){ return null; } if(!this.m_sectionCache[key]){ this.m_sectionCache[key]=this.getSectionByLID(this.m_cachedPFContainer,key); } return this.m_sectionCache[key]; }; PinFreezeContainer.prototype.initializeHomeCellTabIndex=function(_b03){ var slid=PinFreezeContainer.nodeToSlid(_b03); if(!this.m_homeCellNodes[slid]){ var _b05=getElementsByAttribute(_b03,"*","tabIndex","*"); for(var i in _b05){ if(!_b05[i].getAttribute("widgetid")){ this.m_homeCellNodes[slid]=_b05[i]; break; } } } }; PinFreezeContainer.prototype.updateTabIndexValues=function(){ if(this.isContainerFrozen()){ for(var slid in this.m_homeCellNodes){ var _b08=this.m_pinFreezeManager.isNodeVisible(this.m_homeCellNodes[slid])?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08); } }else{ for(var slid in this.m_homeCellNodes){ var _b08=(PinFreezeContainer.getSectionNameFromSlid(slid)==="pfMainOutput")?"0":"-1"; this.m_homeCellNodes[slid].setAttribute("tabIndex",_b08); } } }; PinFreezeContainer.prototype.getSectionHomeCell=function(_b09){ if(_b09){ var _b0a=this.getElementByLID(_b09,"table",this.m_lid+this.m_viewerId); if(_b0a&&_b0a.rows.length&&_b0a.rows[0].cells.length){ return _b0a.rows[0].cells[0]; } } return null; }; PinFreezeContainer.prototype.getMainOutputHomeCell=function(){ var _b0b=this.getSection("pfMainOutput"); if(!_b0b){ _b0b=this.getSectionByLID(this.m_cachedPFContainer,"pfMainOutput"); } return this.getSectionHomeCell(_b0b); }; PinFreezeContainer.prototype.getChildPosition=function(_b0c,_b0d){ for(var i=0;i<_b0c.childNodes.length;++i){ if(_b0c.childNodes[i]==_b0d){ return i; } } return -1; }; PinFreezeContainer.prototype.insertAt=function(_b0f,_b10,_b11){ if(_b11==_b0f.childNodes.length){ _b0f.appendChild(_b10); }else{ _b0f.insertBefore(_b10,_b0f.childNodes[_b11]); } }; PinFreezeContainer.prototype.synchScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _b12=this.getMainOutputHomeCell(); var _b13=this.getSection("pfMainOutput"); var _b14=this.getSection("pfSideHeadings"); if(_b14!=null){ var _b15=this.getSection("pfHorizontalScrollBar"); if(_b15){ var _b16=this.getSideHeadingSectionWidth(_b12); if(getElementDirection(_b13)==="rtl"){ _b16=0; } setScrollLeft(_b13,getScrollLeft(_b15)+_b16); if(this.m_freezeTop){ setScrollLeft(this.getSection("pfTopHeadings"),getScrollLeft(_b15)+_b16); } } } }; PinFreezeContainer.prototype.updateScroll=function(_b17){ var slid=PinFreezeContainer.nodeToSlid(_b17); if(!slid){ return; } var _b19=PinFreezeContainer.getSectionNameFromSlid(slid); if(!_b19){ return; } var _b1a=document.getElementById("CVReport"+this.m_viewerId); if(!_b1a){ return; } if(!this.m_cachedPFContainer){ return; } var _b1b=_b17.parentNode; if(_b1b){ var _b1c=_b1b.tagName.toLowerCase(); if(_b1c==="td"||_b1c==="th"){ var _b1d=this.getMainOutputHomeCell(); var _b1e=this.getSection("pfMainOutput"); if(_b19==="pfMainOutput"||_b19==="pfTopHeadings"){ var _b1f=this.getSection("pfHorizontalScrollBar"); if(_b1f){ var _b20=PinFreezeContainer.calculateNewPosition(_b1b.offsetLeft,_b1b.offsetWidth,getScrollLeft(_b1e),_b1e.offsetWidth); var _b21=this.getHomeCellOffsetWidth(_b1d); if(getElementDirection(_b1e)==="rtl"){ _b21=0; } setScrollLeft(_b1f,_b20-_b21); setScrollLeft(_b1e,_b20); } } if(_b19==="pfMainOutput"||_b19==="pfSideHeadings"){ var _b22=this.getSection("pfVerticalScrollBar"); if(_b22){ var _b23=PinFreezeContainer.calculateNewPosition(_b1b.offsetTop,_b1b.offsetHeight,_b1e.scrollTop,_b1e.offsetHeight); _b22.scrollTop=_b23-_b1d.offsetHeight; _b1e.scrollTop=_b23; } } } } }; PinFreezeContainer.calculateNewPosition=function(_b24,_b25,_b26,_b27){ var _b28=_b24+_b25; var _b29=_b26+_b27; if(_b26>_b24){ return _b24; }else{ if(_b29<_b28){ if(_b25>_b27){ return _b24; } return _b28-_b27; } } return _b26; }; PinFreezeContainer.prototype.synchVScroll=function(){ if(!this.m_cachedPFContainer){ return; } var _b2a=this.getMainOutputHomeCell(); var _b2b=this.getSection("pfMainOutput"); var _b2c=this.getSection("pfTopHeadings"); if(_b2c!=null){ var _b2d=this.getSection("pfVerticalScrollBar"); if(_b2d){ _b2b.scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a); if(this.m_freezeSide){ this.getSection("pfSideHeadings").scrollTop=_b2d.scrollTop+this.getTopHeadingSectionHeight(_b2a); } } } }; PinFreezeContainer.prototype.getTopHeadingSectionHeight=function(_b2e){ return _b2e.offsetHeight+_b2e.offsetTop+this.m_containerMargin.top; }; PinFreezeContainer.prototype._findBestGuessHomeCell=function(_b2f){ if(this.m_bestGuessHomeCell){ return this.m_bestGuessHomeCell; } if(_b2f){ var _b30=_b2f.parentNode.parentNode; var _b31=_b2f.rowSpan?(_b2f.rowSpan):1; var tr=_b30.childNodes[_b31]; if(tr){ var _b33=tr.childNodes.length; var _b34=null; var td=null; for(var i=0;i<_b33;i++){ td=tr.childNodes[i]; if(td.getAttribute("type")=="datavalue"){ break; } _b34=td; } if(_b34){ this.m_bestGuessHomeCell=_b34; return this.m_bestGuessHomeCell; } }else{ return _b2f; } } return null; }; PinFreezeContainer.prototype.getHomeCellOffsetWidth=function(_b37){ var _b38=this._findBestGuessHomeCell(_b37); return _b38?_b38.offsetWidth:0; }; PinFreezeContainer.prototype.getSideHeadingSectionWidth=function(_b39){ var _b3a=this._findBestGuessHomeCell(_b39); if(_b3a){ return _b3a.offsetWidth+_b3a.offsetLeft+this.m_containerMargin.left; }else{ return _b39.offsetWidth+_b39.offsetLeft; } }; PinFreezeContainer.prototype.isContainerFrozen=function(){ return (this.m_freezeTop||this.m_freezeSide); }; PinFreezeContainer.prototype.unfreeze=function(_b3b){ var _b3c=this.getContainerByLID(_b3b); this.m_freezeTop=false; this.m_freezeSide=false; if(_b3c){ var _b3d=_b3c.parentNode; pfMainOutput=this.getSectionByLID(_b3c,"pfMainOutput"); if(pfMainOutput&&_b3d){ if(_b3c.style.border!==""){ pfMainOutput.firstChild.style.border=_b3c.style.border; _b3c.style.border=""; } if(this.m_wrapFlag){ var _b3e=pfMainOutput.firstChild.getElementsByTagName("span"); if(_b3e){ for(var k=0;k<_b3e.length;k++){ _b3e[k].style.whiteSpace=""; } } this.m_wrapFlag=false; } this.updateTabIndexValues(); if(this.m_cachedBaseContainer.getAttribute("authoredFixedWidth")){ this.m_cachedBaseContainer.removeAttribute("authoredFixedWidth"); this.m_cachedBaseContainer.style.width="auto"; this.m_addedFixedWidth=null; } if(this.m_cachedBaseContainer.getAttribute("authoredFixedHeight")){ this.m_cachedBaseContainer.removeAttribute("authoredFixedHeight"); this.m_cachedBaseContainer.style.height="auto"; this.m_addedFixedHeight=null; } _b3d.replaceChild(this.m_pinFreezeManager.deepCloneNode(pfMainOutput.firstChild),_b3c); } } }; PinFreezeContainer.prototype.getBorderInfo=function(el,_b41){ var _b42={}; var _b43="border-"+_b41+"-"; var _b44="border"+_b41.charAt(0).toUpperCase()+_b41.substring(1); if(el.currentStyle){ _b42[_b44+"Width"]=el.currentStyle[_b44+"Width"]; _b42[_b44+"Style"]=el.currentStyle[_b44+"Style"]; _b42[_b44+"Color"]=el.currentStyle[_b44+"Color"]; }else{ if(window.getComputedStyle){ _b42[_b44+"Width"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"width"); _b42[_b44+"Style"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"style"); _b42[_b44+"Color"]=window.getComputedStyle(el,null).getPropertyValue(_b43+"color"); }else{ return null; } } return _b42; }; PinFreezeContainer.prototype.isA11yEnabled=function(_b45){ return (_b45.getAttribute("role")==="grid"); }; PinFreezeContainer.isElementInMainOutput=function(_b46){ var _b47=PinFreezeContainer.nodeToSlid(_b46); if(_b47){ return (_b47.indexOf("pfMainOutput_")===0); } return false; }; PinFreezeContainer.prototype.removeCTX=function(_b48){ _b48.removeAttribute("ctx"); var _b49=getElementsByAttribute(_b48,"*","ctx","*"); if(_b49&&_b49.length){ for(var i=0;i<_b49.length;i++){ _b49[i].removeAttribute("ctx"); } } }; PinFreezeContainer.prototype.initializeTouchScrolling=function(_b4b){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_b4b){ _b4b.m_pinFreezeContainer=this; if(document.attachEvent){ _b4b.attachEvent("touchstart",this.touchStart); _b4b.attachEvent("touchmove",this.touchMove); _b4b.attachEvent("touchend",this.touchEnd); }else{ _b4b.addEventListener("touchstart",this.touchStart,false); _b4b.addEventListener("touchmove",this.touchMove,false); _b4b.addEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.removeTouchScrolling=function(){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } this.removeTouchScrollingEvents(this.getSection("pfMainOutput")); this.removeTouchScrollingEvents(this.getSection("pfSideHeadings")); this.removeTouchScrollingEvents(this.getSection("pfTopHeadings")); }; PinFreezeContainer.prototype.removeTouchScrollingEvents=function(_b4c){ if(!this.m_pinFreezeManager.isIWidgetMobile()){ return; } if(_b4c){ if(document.detachEvent){ _b4c.detachEvent("touchstart",this.touchStart); _b4c.detachEvent("touchmove",this.touchMove); _b4c.detachEvent("touchend",this.touchEnd); }else{ _b4c.removeEventListener("touchstart",this.touchStart,false); _b4c.removeEventListener("touchmove",this.touchMove,false); _b4c.removeEventListener("touchend",this.touchEnd,false); } } }; PinFreezeContainer.prototype.touchMove=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _b4e=e.changedTouches[0]; if(_b4e&&_b4e.clientX&&_b4e.clientY){ var _b4f=parseInt(_b4e.clientX); var _b50=parseInt(_b4e.clientY); if(this.m_pinFreezeContainer.touchMoveHandler(_b4f,_b50)){ return stopEventBubble(e); } } } }; PinFreezeContainer.prototype.touchStart=function(e){ if(this.m_pinFreezeContainer&&e&&e.changedTouches&&e.touches&&e.touches.length==1){ var _b52=e.changedTouches[0]; if(_b52&&_b52.clientX&&_b52.clientY){ var _b53=parseInt(_b52.clientX); var _b54=parseInt(_b52.clientY); this.m_pinFreezeContainer.touchStartHandler(_b53,_b54); } } }; PinFreezeContainer.prototype.touchStartHandler=function(_b55,_b56){ this.touchScrollSections=false; this.touchPreviousX=_b55; this.touchPreviousY=_b56; }; PinFreezeContainer.prototype.touchEnd=function(e){ if(this.m_pinFreezeContainer&&this.m_pinFreezeContainer.touchEndHandler()){ stopEventBubble(e); } }; PinFreezeContainer.prototype.touchEndHandler=function(){ var _b58=this.touchScrollSections; this.touchScrollSections=false; this.touchPreviousX=-1; this.touchPreviousY=-1; return _b58; }; PinFreezeContainer.prototype.touchMoveHandler=function(_b59,_b5a){ var _b5b=this.getSection("pfMainOutput"); if(!_b5b){ return; } var _b5c=this.getSectionHomeCell(_b5b); var _b5d=this.getTopHeadingSectionHeight(_b5c); var _b5e=this.getSideHeadingSectionWidth(_b5c); var _b5f=_b5a-this.touchPreviousY; var _b60=_b59-this.touchPreviousX; if(this.touchScrollSections){ if(_b5f!=0){ var _b61=_b5b.scrollTop-_b5f; _b61=(_b61>_b5d)?_b61:_b5d; _b5b.scrollTop=_b61; var _b62=this.getSection("pfSideHeadings"); if(_b62){ _b62.scrollTop=_b61; } } if(_b60!=0){ var _b63=_b5b.scrollLeft-_b60; _b63=(_b63>_b5e)?_b63:_b5e; _b5b.scrollLeft=_b63; var _b64=this.getSection("pfTopHeadings"); if(_b64){ _b64.scrollLeft=_b63; } } }else{ this.firstTouchMove(_b5b,_b60,_b5f,_b5e,_b5d); } this.touchPreviousX=_b59; this.touchPreviousY=_b5a; return this.touchScrollSections; }; PinFreezeContainer.prototype.firstTouchMove=function(_b65,_b66,_b67,_b68,_b69){ var _b6a=this.mostlyVerticalTouchMove(_b66,_b67); var _b6b=PinFreezeContainer.isSectionVisible(this.getSection("pfTopHeadings")); var _b6c=PinFreezeContainer.isSectionVisible(this.getSection("pfSideHeadings")); if(_b6a&&(!_b6b||(_b67>0&&_b65.scrollTop<=_b69)||(_b67<0&&_b65.scrollTop+_b65.clientHeight>=_b65.scrollHeight))){ this.touchScrollSections=false; }else{ if(!_b6a&&(!_b6c||(_b66>0&&_b65.scrollLeft<=_b68)||(_b66<0&&_b65.scrollLeft+_b65.clientWidth>=_b65.scrollWidth))){ this.touchScrollSections=false; }else{ this.touchScrollSections=true; } } }; PinFreezeContainer.prototype.mostlyVerticalTouchMove=function(_b6d,_b6e){ var _b6f=(_b6d>0)?_b6d:0-_b6d; var _b70=(_b6e>0)?_b6e:0-_b6e; return (_b70>_b6f); }; PinFreezeContainer.prototype.destroy=function(){ this.removeTouchScrolling(); GUtil.destroyProperties(this); }; function PinFreezeManager(oCV){ this.m_oCV=oCV; this.m_viewerId=oCV.getId(); this.m_frozenInfo=null; this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this.c_resizeTweekLimit=5; this.m_repaintOnVisible=false; }; PinFreezeManager.prototype.addContainerObject=function(lid,_b73,_b74,_b75,_b76){ if(_b73||_b74){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } this.m_frozenInfo[lid].freezeTop=_b73; this.m_frozenInfo[lid].freezeSide=_b74; var _b77=this.newContainer(lid,_b73,_b74,_b75,_b76); this.m_frozenInfo[lid].pinFreezeContainers.push(_b77); return _b77; } return null; }; PinFreezeManager.prototype.newContainer=function(lid,_b79,_b7a,_b7b,_b7c){ return new PinFreezeContainer(this,lid,this.m_viewerId,_b79,_b7a,_b7b,_b7c); }; PinFreezeManager.prototype.clearPinInfo=function(lid){ if(!this.m_frozenInfo){ return; } if(lid){ if(this.m_frozenInfo[lid]){ delete this.m_frozenInfo[lid]; } }else{ delete this.m_frozenInfo; this.m_frozenInfo=null; } }; PinFreezeManager.prototype._createDefaultFrozenInfo=function(lid){ this.m_frozenInfo[lid]={"lid":lid,"freezeTop":false,"freezeSide":false,"pinFreezeContainers":[],"childContainers":{}}; }; PinFreezeManager.prototype._resetFrozenInfo=function(lid){ var _b80=this.m_frozenInfo[lid]; if(_b80){ delete _b80.pinFreezeContainers; _b80.pinFreezeContainers=[]; _b80.freezeTop=false; _b80.freezeSide=false; } }; PinFreezeManager.prototype.prepopulateFrozenInfo=function(_b81){ var _b82=getDescendantElementsByAttribute(_b81,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_b82){ if(!this.m_frozenInfo){ this.m_frozenInfo={}; } for(var i=0;i<_b82.length;i++){ var _b84=_b82[i]; if(_b84.getAttribute("id")=="rt"+this.m_viewerId){ continue; } var lid=this.removeNamespace(_b84.getAttribute("lid")); if(this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].childContainers){ continue; } if(!this.m_frozenInfo[lid]){ this._createDefaultFrozenInfo(lid); } if(!this.m_frozenInfo[lid].childContainers){ this.m_frozenInfo[lid].childContainers={}; } var _b86=getDescendantElementsByAttribute(_b84,"table","lid","",false,-1,new RegExp("[\\s\\S]*")); if(_b86){ for(var _b87=0;_b87<_b86.length;_b87++){ var _b88=_b86[_b87]; var _b89=this.removeNamespace(_b88.getAttribute("lid")); if(!this.m_frozenInfo[lid].childContainers[_b89]){ var _b8a=_b88.parentNode; while(_b8a&&!_b8a.getAttribute("lid")){ _b8a=_b8a.parentNode; } if(_b8a&&this.removeNamespace(_b8a.getAttribute("lid"))==lid){ this.m_frozenInfo[lid].childContainers[_b89]=true; } } } } } this._updateParentContainerInfo(); } }; PinFreezeManager.prototype._updateParentContainerInfo=function(){ for(var _b8b in this.m_frozenInfo){ var _b8c=this.m_frozenInfo[_b8b].childContainers; if(_b8c){ for(var _b8d in _b8c){ if(this.m_frozenInfo[_b8d]){ this.m_frozenInfo[_b8d].parentContainer=_b8b; break; } } } } }; PinFreezeManager.prototype.getTopLevelContainerLID=function(lid){ if(this.m_frozenInfo[lid]){ while(this.m_frozenInfo[lid].parentContainer){ lid=this.m_frozenInfo[lid].parentContainer; } } return lid; }; PinFreezeManager.prototype.freezeContainer=function(lid,_b90,_b91){ var _b92=document.getElementById("CVReport"+this.m_viewerId); this.prepopulateFrozenInfo(_b92); var _b93=this.getTopLevelContainerLID(lid); this.unfreezeAllNestedContainers(_b93,_b92); this.m_frozenInfo[lid].freezeTop=_b90; this.m_frozenInfo[lid].freezeSide=_b91; var _b94=this._createPinAndFreezeObject(_b92,_b93); this.m_lastWidthProcessed=0; this.m_lastHeightProcessed=0; this._resizePinFreezeObjects(_b94); this.sectionStructureChange(); if(isIE()){ var obj=this; setTimeout(function(){ obj.refresh(); },1); var _b96=document.getElementById("RVContent"+this.m_viewerId); this.m_oCV.repaintDiv(_b96); } return _b94; }; PinFreezeManager.prototype.getInitialWidthThreshold=function(){ return document.body.clientWidth*3/4; }; PinFreezeManager.prototype.getInitialHeightThreshold=function(){ return document.body.clientWidth*9/10; }; PinFreezeManager.prototype.hasFrozenContainers=function(){ return ((this.m_frozenInfo)?true:false); }; PinFreezeManager.prototype.hasFrozenRowHeadings=function(lid){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ return this.m_frozenInfo[lid].freezeSide?this.m_frozenInfo[lid].freezeSide:false; } return false; }; PinFreezeManager.prototype.hasFrozenColumnHeadings=function(lid){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ return this.m_frozenInfo[lid].freezeTop?this.m_frozenInfo[lid].freezeTop:false; } return false; }; PinFreezeManager.prototype.removeNamespace=function(idNS){ if(idNS.length>this.m_viewerId.length){ if(idNS.indexOf(this.m_viewerId)>0){ return idNS.substring(0,idNS.indexOf(this.m_viewerId)); } } return idNS; }; PinFreezeManager.prototype.getContainer=function(lid,_b9b){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]&&this.m_frozenInfo[lid].pinFreezeContainers[0]){ _b9b=_b9b?_b9b:0; return this.m_frozenInfo[lid].pinFreezeContainers[_b9b]; } return null; }; PinFreezeManager.prototype.nodeToContainer=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); var _b9e=null; if(slid){ var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); _b9e=this.getContainer(lid); } return _b9e; }; PinFreezeManager.prototype.getContainerElement=function(_ba0){ var lid=this.removeNamespace(_ba0.getAttribute("lid")); if(lid){ var _ba2=this.getContainer(lid); if(_ba2){ return _ba2.getContainer(); } } return null; }; PinFreezeManager.prototype._createPinAndFreezeObject=function(_ba3,lid){ var _ba5=null; if(this.m_frozenInfo){ var _ba6=this.m_frozenInfo[lid]; var _ba7=_ba6.initialLoad; if(_ba7){ delete _ba6.initialLoad; } var _ba8=_ba6.freezeTop; var _ba9=_ba6.freezeSide; var _baa=null; if(_ba7&&_ba6.pinFreezeContainers&&(_ba8||_ba9)){ _baa=_ba6.pinFreezeContainers.slice(0); } var _bab=_ba3; if(_ba6&&_ba6.parentContainer){ var _bac=getElementsByAttribute(_ba3,"table","lid",_ba6.parentContainer+this.m_viewerId); if(_bac){ for(parentIndex=0;parentIndex<_bac.length;parentIndex++){ if(!_bac[parentIndex].getAttribute("clonednode")){ _bab=_bac[parentIndex]; break; } } } } if(_ba6.childContainers){ for(var _bad in _ba6.childContainers){ var _bae=this._createPinAndFreezeObject(_bab,_bad); _ba5=_ba5?_ba5:_bae; } } var _baf=getElementsByAttribute(_bab,"table","lid",lid+this.m_viewerId); if(_baf&&_baf.length>0){ delete _ba6.pinFreezeContainers; _ba6.pinFreezeContainers=[]; }else{ return null; } if(_baf&&(_ba8||_ba9)){ var _bb0=(_ba5!==null); for(var i=0;i<_baf.length;i++){ var _bb2=_baf[i]; if(_bb2.getAttribute("clonednode")=="true"){ continue; } _ba5=this.addContainerObject(lid,_ba8,_ba9,_bb2,i); if(_ba5){ _ba5.createPFContainer(_bab,_bb0); if(_ba7){ _ba5.copyProperties(_baa[0]); } _ba5.freezeContainerInReport(_ba3); } } } } return _ba5; }; PinFreezeManager.prototype.renderReportWithFrozenContainers=function(_bb3){ if(this.m_frozenInfo){ var _bb4=false; var _bb5=null; for(var _bb6 in this.m_frozenInfo){ var _bb7=this.m_frozenInfo[_bb6]; if(!_bb4){ _bb4=_bb7.initialLoad; } if(!_bb7.parentContainer){ var temp=this._createPinAndFreezeObject(_bb3,_bb7.lid); _bb5=_bb5?_bb5:temp; } } if(!_bb4&&_bb5){ this._resizePinFreezeObjects(_bb5); } this.refresh(); } }; PinFreezeManager.prototype._resizePinFreezeObjects=function(_bb9){ var _bba,_bbb; var _bbc=this.m_oCV.getViewerWidget(); if(_bbc){ var size=_bbc.getWidgetSize(); _bbb=(size&&size.w&&(size.w2)?_bc0:0; var _bc5=(Math.abs(_bc1-this.m_lastHeightProcessed)>2)?_bc1:0; for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,_bc4,_bc5); } } this.m_lastWidthProcessed=_bc0; this.m_lastHeightProcessed=_bc1; }; PinFreezeManager.prototype.resizeContainer=function(lid,_bc8,_bc9){ var _bca=this.m_frozenInfo[lid]; if(_bca){ var _bcb=null; if(_bca.childContainers){ var _bcc=_bc8>10?_bc8-10:_bc8; var _bcd=_bc9>10?_bc9-10:_bc9; for(var _bce in _bca.childContainers){ _bcb=this.resizeContainer(_bce,_bcc,_bcd); } } var _bcf=_bca.pinFreezeContainers; var _bd0=null; var _bd1=null; if(_bcf){ for(var i=0;i<_bcf.length;i++){ _bd0=_bcf[i]; _bd0.resize(_bc8,_bc9,_bca.parentContainer,_bcb); var _bd3=_bd0.getContainer(); if(_bd3&&(!_bd1||(_bd1.width<_bd3.clientWidth))){ _bd1={"width":_bd3.clientWidth,"lid":_bd0.m_lidNS}; } } } return _bd1; } }; PinFreezeManager.prototype.processAutoResize=function(_bd4,_bd5){ this.m_lastWidthProcessed=_bd4; this.m_lastHeightProcessed=_bd5; }; PinFreezeManager.prototype.onSetVisible=function(){ this.refresh(); if(this.m_repaintOnVisible){ this.rePaint(); this.m_repaintOnVisible=false; } }; PinFreezeManager.prototype.onResizeCanvas=function(_bd6){ if(_bd6){ this.rePaint(); }else{ this.m_repaintOnVisible=true; } }; PinFreezeManager.prototype.rePaint=function(){ for(var lid in this.m_frozenInfo){ if(!this.m_frozenInfo[lid].parentContainer){ this.resizeContainer(lid,this.m_lastWidthProcessed,this.m_lastHeightProcessed); } } }; PinFreezeManager.prototype.refresh=function(){ for(var _bd8 in this.m_frozenInfo){ var _bd9=this.m_frozenInfo[_bd8].pinFreezeContainers; if(_bd9){ for(var i=0;i<_bd9.length;i++){ var _bdb=_bd9[i]; _bdb.synchScroll(); _bdb.synchVScroll(); } } } }; PinFreezeManager.prototype.freezeContainerRowHeadings=function(lid){ return this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),true); }; PinFreezeManager.prototype.freezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ this.m_oCV.getSelectionController().resetSelections(); return this.freezeContainerRowHeadings(lid); } return null; }; PinFreezeManager.prototype.canFreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ return (!this.hasFrozenRowHeadings(lid)); } return false; }; PinFreezeManager.prototype.unfreezeContainerRowHeadings=function(lid){ this.freezeContainer(lid,this.hasFrozenColumnHeadings(lid),false); }; PinFreezeManager.prototype.unfreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ this.m_oCV.getSelectionController().resetSelections(); this.unfreezeContainerRowHeadings(lid); } }; PinFreezeManager.prototype.canUnfreezeSelectedRowHeadings=function(){ var lid=this.getValidSelectedContainerId(false); if(lid){ return (this.hasFrozenRowHeadings(lid)); } return false; }; PinFreezeManager.prototype.freezeContainerColumnHeadings=function(lid){ return this.freezeContainer(lid,true,this.hasFrozenRowHeadings(lid)); }; PinFreezeManager.prototype.freezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ this.m_oCV.getSelectionController().resetSelections(); return this.freezeContainerColumnHeadings(lid); } return null; }; PinFreezeManager.prototype.canFreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ return (!this.hasFrozenColumnHeadings(lid)); } return false; }; PinFreezeManager.prototype.unfreezeContainerColumnHeadings=function(lid){ this.freezeContainer(lid,false,this.hasFrozenRowHeadings(lid)); }; PinFreezeManager.prototype.unfreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ this.m_oCV.getSelectionController().resetSelections(); this.unfreezeContainerColumnHeadings(lid); } }; PinFreezeManager.prototype.canUnfreezeSelectedColumnHeadings=function(){ var lid=this.getValidSelectedContainerId(true); if(lid){ return (this.hasFrozenColumnHeadings(lid)); } return false; }; PinFreezeManager.prototype.getValidSelectedContainerId=function(_be8){ var _be9=this.m_oCV.getSelectionController().getAllSelectedObjects(); if(_be9&&_be9.length&&(_be9[0].getDataContainerType()==="crosstab"||(_be8&&_be9[0].getDataContainerType()==="list"))){ var lid=(_be9[0].getLayoutElementId()); if(lid){ if(!this.hasPromptControlsInFreezableCells(lid)){ return this.removeNamespace(lid); } } } return null; }; PinFreezeManager.prototype.hasPromptControlsInFreezableCells=function(lid){ var _bec=this.m_oCV.getLayoutElementFromLid(lid); var _bed=getElementsByAttribute(_bec,["td","th"],"type","columnTitle"); var _bee=new RegExp("(^|[W])clsPromptComponent($|[W])"); var _bef=isIE()?"className":"class"; for(var j in _bed){ if(_bed.hasOwnProperty(j)){ var _bf1=getElementsByAttribute(_bed[j],"*",_bef,null,1,_bee); if(_bf1.length>0){ return true; } } } return false; }; PinFreezeManager.prototype.unfreeze=function(lid,_bf3,_bf4){ if(this.m_frozenInfo&&this.m_frozenInfo[lid]){ var _bf5=this.m_frozenInfo[lid].pinFreezeContainers; if(_bf5){ for(var i=0;i<_bf5.length;i++){ var _bf7=_bf5[i]; _bf7.unfreeze(_bf3); } if(_bf4){ this._resetFrozenInfo(lid); } } } }; PinFreezeManager.prototype.unfreezeAllNestedContainers=function(lid,_bf9){ var _bfa=this.m_frozenInfo[lid]; if(_bfa){ if(_bfa.freezeTop||_bfa.freezeSide){ this.unfreeze(lid,_bf9,false); } if(_bfa.childContainers){ for(var _bfb in _bfa.childContainers){ this.unfreezeAllNestedContainers(_bfb,_bf9); } } } }; PinFreezeManager.prototype.isNodeVisible=function(node){ var slid=PinFreezeContainer.nodeToSlid(node); if(!slid){ return true; } var lid=this.removeNamespace(PinFreezeContainer.getLidFromSlid(slid)); var _bff=this.getContainer(lid); if(!_bff){ return true; } var _c00=PinFreezeContainer.getSectionNameFromSlid(slid); var _c01=_bff.getSection(_c00); var _c02=null,_c03=null; var _c04=node; var _c05=null; while(_c04&&_c04!==_c01&&!_c02&&!_c03){ _c02=_bff.getMain(_c04); _c03=_bff.getCopy(_c04); _c05=_c04; _c04=_c04.parentNode; } var _c06=_c02?true:false; var _c07=_c03?true:false; if(_c06){ return _bff.getCopy(_c02)===_c05; }else{ if(_c07){ return _bff.getCopy(_c05)?false:true; }else{ return true; } } }; PinFreezeManager.prototype.sectionStructureChange=function(){ var _c08=this.m_oCV.getViewerWidget(); if(_c08&&_c08.getAnnotationHelper()){ _c08.getAnnotationHelper().repositionCommentIndicators(); } }; PinFreezeManager.prototype.deepCloneNode=function(_c09){ var copy=_c09.cloneNode(true); var _c0b=this.m_oCV.getViewerWidget(); if(_c0b){ if(_c0b.reportContainsDijits()){ var _c0c=getElementsByAttribute(copy,"*","widgetid","*"); if(_c0c&&_c0c.length){ for(var i=0;i<_c0c.length;i++){ _c0c[i].parentNode.removeChild(_c0c[i]); } } } } return copy; }; PinFreezeManager.prototype.toJSONString=function(){ var _c0e=""; var _c0f=""; for(var _c10 in this.m_frozenInfo){ if(_c0e.length>0){ _c0e+=","; } var _c11=this.m_frozenInfo[_c10]; _c0e+="{"; _c0e+="\"lid\":\""+_c11.lid.replace("\"","\\\"")+"\","; _c0e+="\"freezeTop\":"+_c11.freezeTop+","; _c0e+="\"freezeSide\":"+_c11.freezeSide+","; if(_c11.parentContainer){ _c0e+="\"parentContainer\":\""+_c11.parentContainer+"\","; } if(_c11.pinFreezeContainers&&_c11.pinFreezeContainers.length>0){ _c0e+="\"properties\":"+_c11.pinFreezeContainers[0].toJSONString()+","; } _c0e+="\"childContainers\": {"; if(_c11.childContainers){ var _c12=true; for(var _c13 in _c11.childContainers){ if(!_c12){ _c0e+=","; } _c0e+="\""+_c13+"\":true"; _c12=false; } } _c0e+="}}"; } if(_c0e.length>0){ _c0f="{\"version\":1, \"containers\":["+_c0e+"]}"; } return _c0f; }; PinFreezeManager.prototype.fromJSONString=function(_c14){ if(!_c14||_c14.length===0){ return; } var _c15=null; try{ _c15=eval("("+_c14+")"); } catch(e){ if(typeof console!="undefined"){ console.log("PinFreezeManager.prototype.fromJSON could not parse JSON - "+_c14); console.log(e); } } if(!_c15){ return; } var _c16=_c15.containers; var _c17=_c15.version; if(_c16.length>0){ this.m_frozenInfo={}; } for(var _c18=0;_c18<_c16.length;_c18++){ var _c19=_c16[_c18]; var lid=_c19.lid; var _c1b=_c19.freezeTop; var _c1c=_c19.freezeSide; var _c1d=document.getElementById("CVReport"+this.m_viewerId); var _c1e=getElementsByAttribute(_c1d,"table","lid",lid+this.m_viewerId); var _c1f=[]; if(_c1e&&(_c1b||_c1c)){ for(var i=0;i<_c1e.length;i++){ var _c21=_c1e[i]; var _c22=new PinFreezeContainer(this,lid,this.m_viewerId,_c19.freezeTop,_c19.freezeSide,_c21,i); if(_c19.properties){ applyJSONProperties(_c22,_c19.properties); } _c1f.push(_c22); } } this.m_frozenInfo[lid]={"lid":lid,"freezeTop":_c1b,"freezeSide":_c1c,"pinFreezeContainers":_c1f,"initialLoad":true}; if(_c17>=1){ if(_c19.childContainers){ this.m_frozenInfo[lid].childContainers=_c19.childContainers; } if(_c19.parentContainer){ this.m_frozenInfo[lid].parentContainer=_c19.parentContainer; } } } }; PinFreezeManager.prototype.removeIdAttribute=function(_c23){ var _c24=_c23.getAttribute("id"); if(_c24!==null&&_c24!==""){ _c23.removeAttribute("id"); } var _c25=getElementsByAttribute(_c23,"*","id","*"); if(_c25&&_c25.length){ for(var i=0;i<_c25.length;i++){ _c25[i].removeAttribute("id"); } } return _c23; }; PinFreezeManager.prototype.isElementInMainOutput=function(_c27){ return PinFreezeContainer.isElementInMainOutput(_c27); }; PinFreezeManager.prototype.isIWidgetMobile=function(){ return (this.m_oCV&&this.m_oCV.isIWidgetMobile()); }; PinFreezeManager.prototype.destroy=function(){ GUtil.destroyProperties(this); }; dojo.provide("WidgetContextManager"); dojo.declare("WidgetContextManager",null,{PP_WIDGET_CONTEXT:"com.ibm.widget.context",PP_REPORT_PROMPT_CONTEXT:"com.ibm.widget.context.report.prompt",PP_REPORT_DRILL_CONTEXT:"com.ibm.widget.context.report.drill",PP_VALUES:"values",PP_RANGES:"ranges",PP_MULTIVALUED:"multivalued",PP_MODELITEM:"modelItem",PP_MODELINFO:"modelInfo",PP_PROMPT:"prompt",PP_DRILL:"drill",PP_SELECT_CHOICES:"selectChoices",PP_BUX_SELECTVALUECONTROL_CONTEXT:"com.ibm.widget.context.bux.selectValueControl",PP_BUX_SELECTION_CONTEXT:"com.ibm.widget.context.bux.selection",PP_CASCADEPROMPT_CLEAR:"clearCascadePromptParams",EVENT_NAME_PROMPT:"com.ibm.widget.contextChanged.prompt",EVENT_NAME_DRILL:"com.ibm.widget.contextChanged.drill",EVENT_NAME_SELECTVALUECONTROL:"com.ibm.widget.contextChanged.selectValueControl",DEFAULT_MODEL_PATH:".",m_widget:null,m_oWidgetContextContainer:null,m_oPromptContextContainer:null,m_oDrillContextContainer:null,m_oPromptGenericContext:null,m_oDrillGenericContext:null,m_oFilterGenericContext:null,m_oSelectionFilterContext:null,m_oContextCollection:null,m_oWidgetContextObject:null,m_oPromptContextObject:null,m_oDrillContextObject:null,m_aSelectionFilterObjects:null,constructor:function(_c28){ this.m_widget=_c28; this.m_oWidgetContextContainer={}; this.m_oPromptContextContainer={}; this.m_oDrillContextContainer={}; this.m_oPromptGenericContext={}; this.m_oDrillGenericContext={}; this.m_oFilterGenericContext={}; this.m_oSelectionFilterContext={}; this.m_oContextCollection={}; this.m_oWidgetContextObject={}; this.m_oPromptContextObject={}; this.m_oDrillContextObject={}; this.m_aSelectionFilterObjects=null; },getWidgetContextObject:function(){ var _c29={}; if(this.m_oWidgetContextContainer){ _c29[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextContainer; if(this.m_widget){ _c29.clientId=this.m_widget.getWidgetId(); } } return _c29; },getFilterFirstItemName:function(){ var _c2a=this.m_oFilterGenericContext; if(_c2a){ var _c2b=(_c2a.values?_c2a.values:_c2a.ranges); for(_c2c in _c2b){ return _c2c; } } for(var _c2c in _c2a){ return _c2c; } return null; },getItemNames:function(_c2d){ var _c2e=[]; var _c2f=_c2d[this.PP_WIDGET_CONTEXT]; if(_c2f){ var _c30=(_c2f.values?_c2f.values:_c2f.ranges); for(var _c31 in _c30){ _c2e.push(_c31); } return _c2e; } for(var _c31 in _c2f){ _c2e.push(_c31); } return _c2e; },raisePromptEvent:function(_c32,_c33,_c34,_c35,_c36){ var _c37=this._buildGeneralizedPromptPayload(_c32,_c33,_c34,_c35,_c36); if(_c37){ this.m_widget.fireEvent(this.EVENT_NAME_PROMPT,null,_c37); this._updatePromptContext(_c37); this._updateWidgetContextContainer(); } },_updatePromptContext:function(_c38){ this._updatePromptGenericContext(_c38); this._updatePromptContextContainer(_c38); },_resetWorkingMembers:function(){ this.m_oWidgetContextObject={}; this.m_oPromptContextObject={}; this.m_oDrillContextObject={}; },updateFilterContext:function(_c39){ this.m_oFilterGenericContext=_c39[this.PP_WIDGET_CONTEXT]; this._updateWidgetContextContainer(); },getSelectValueControlTypeFromPayload:function(_c3a){ var _c3b=_c3a[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_c3b&&_c3b["selectValueControl"]){ return _c3b["selectValueControl"]["controlType"]; } return null; },getSelectValuePropertyFromPayload:function(_c3c,_c3d){ var _c3e=_c3c[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_c3e&&_c3e["selectValueControl"]){ return _c3e["selectValueControl"][_c3d]; } return null; },_updateWidgetContextContainer:function(){ this.m_oWidgetContextContainer={}; var _c3f=null; if(this.m_oDrillGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oDrillGenericContext[this.PP_VALUES]); } if(this.m_oPromptGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oPromptGenericContext[this.PP_VALUES]); } if(this.m_oFilterGenericContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oFilterGenericContext[this.PP_VALUES]); } if(this.m_oSelectionFilterContext[this.PP_VALUES]){ _c3f=dojo.mixin(_c3f,this.m_oSelectionFilterContext[this.PP_VALUES]); } if(_c3f){ this.m_oWidgetContextContainer[this.PP_VALUES]=_c3f; } var _c40=null; if(this.m_oPromptGenericContext[this.PP_RANGES]){ _c40=dojo.mixin(_c40,this.m_oPromptGenericContext[this.PP_RANGES]); } if(this.m_oFilterGenericContext[this.PP_RANGES]){ _c40=dojo.mixin(_c40,this.m_oFilterGenericContext[this.PP_RANGES]); } if(_c40){ this.m_oWidgetContextContainer[this.PP_RANGES]=_c40; } },_updatePromptGenericContext:function(_c41){ if(_c41[this.PP_WIDGET_CONTEXT]){ this.m_oPromptGenericContext=_c41[this.PP_WIDGET_CONTEXT]; } },_updatePromptContextContainer:function(_c42){ if(_c42[this.PP_REPORT_PROMPT_CONTEXT]&&_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]){ this.m_oPromptContextContainer=_c42[this.PP_REPORT_PROMPT_CONTEXT][this.PP_PROMPT]; } },_buildGeneralizedPromptPayload:function(_c43,_c44,_c45,_c46,_c47){ var _c48=null; this._resetWorkingMembers(); var _c49=this._buildContextsFromPrompt(_c43,_c44); if(_c49){ _c48={}; _c48[this.PP_WIDGET_CONTEXT]=this.m_oWidgetContextObject; var _c4a={}; _c4a[_c46]=this.m_oPromptContextObject; _c48[this.PP_REPORT_PROMPT_CONTEXT]={"prompt":{"id":this.m_widget.iContext.widgetId,"action":_c45,"itemSpecification":_c4a}}; _c48[this.PP_CASCADEPROMPT_CLEAR]=_c47; } return _c48; },_getReportParameterNodes:function(_c4b){ var _c4c=XMLBuilderLoadXMLFromString(_c4b); if(!_c4c){ return null; } var _c4d=_c4c.firstChild; if(!_c4d){ return null; } var _c4e=XMLHelper_FindChildByTagName(_c4d,"reportParameters",true); if(!_c4e){ return null; } var _c4f=XMLHelper_FindChildrenByTagName(_c4e,"reportParameter",false); if(!_c4f){ return null; } return _c4f; },_getSelectChoicesXMLString:function(_c50,_c51){ var _c52=null; var _c53="p_"+_c50; if(_c51.get(_c53)){ _c52=_c51.get(_c53); } return _c52; },_getSelectChoicesNode:function(_c54){ var _c55=null; if(_c54){ var _c56=XMLBuilderLoadXMLFromString(_c54,true); if(_c56&&_c56.firstChild){ _c55=_c56.firstChild; } } return _c55; },_buildContextsFromPrompt:function(_c57,_c58){ var _c59=this._getReportParameterNodes(_c57); if(_c59===null){ return false; } for(var i in _c59){ var _c5b=_c59[i]; var _c5c=_c5b.getAttribute("parameterName"); var _c5d=this._getSelectChoicesXMLString(_c5c,_c58); var _c5e=this._getSelectChoicesNode(_c5d); if(_c5e){ var _c5f,_c60,_c61; if(!this._isPromptRangeType(_c5d)){ var _c62=this._buildReportContextValuesFromPromptSelectOption(_c5e); _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c62); _c60=this._buildValuesArrayFromReportContextValueArray(_c62); _c61=this.PP_VALUES; }else{ _c60=this._buildMinMaxArrayFromRangePrompt(_c5e); _c5f=this._createPromptDetailObject(_c5d,_c5b.getAttribute("modelItem"),_c5b.getAttribute("multivalued"),_c60); _c61=this.PP_RANGES; } this.m_oPromptContextObject[_c5c]=_c5f; if(!this.m_oWidgetContextObject[_c61]){ this.m_oWidgetContextObject[_c61]={}; } this.m_oWidgetContextObject[_c61][_c5c]=_c60; } } return true; },_createPromptDetailObject:function(_c63,_c64,_c65,_c66){ var _c67={}; _c67[this.PP_SELECT_CHOICES]=_c63; if(_c64!==null){ _c67[this.PP_MODELITEM]=_c64; } if(_c65!==null){ _c67[this.PP_MULTIVALUED]=true; } _c67[this.PP_VALUES]=_c66; return _c67; },_isPromptRangeType:function(_c68){ var _c69=new RegExp(/^0){ for(var i=0;i<_c6c.length;i++){ var _c6e=_c6c[i].getAttribute("displayValue"); var _c6f=_c6c[i].getAttribute("useValue"); var _c70={"caption":_c6e,"use":_c6f}; _c6b.push(_c70); } } } return _c6b; },_buildValuesArrayFromReportContextValueArray:function(_c71){ var _c72=[]; if(_c71&&_c71.length>0){ for(var i=0;i<_c71.length;i++){ var _c74=_c71[i].caption; if(_c74){ _c72.push(_c74); } } } return _c72; },_buildMinMaxArrayFromRangePrompt:function(_c75){ var _c76=[]; if(_c75&&_c75.childNodes&&_c75.childNodes.length>0){ var _c77=_c75.childNodes.length; for(var i=0;i<_c77;i++){ var _c79=this._buildMinMaxFromSelectAnyRange(_c75.childNodes[i]); if(_c79){ _c76.push(_c79); } } } return _c76; },_buildMinMaxFromSelectAnyRange:function(_c7a){ var _c7b=null; if(_c7a){ var _c7c=dojo.query("[displayValue]",_c7a); if(_c7c.length>0){ _c7b={}; for(var i=0;i<_c7c.length;i++){ var node=_c7c[i]; var _c7f=(node.nodeName==="start")?"min":"max"; _c7b[_c7f]=node.getAttribute("useValue"); _c7b[_c7f+"Display"]=node.getAttribute("displayValue"); } } } return _c7b; },handleIncomingPromptEvent:function(evt){ if(!evt||!evt.payload){ return; } var _c81=this._convertToLegacyPromptPayload(evt.payload); if(_c81){ var _c82={"payload":_c81}; this.m_widget.onPromptLegacyPayload(_c82); } },_convertToLegacyPromptPayload:function(_c83){ var _c84=null; var _c85=_c83[this.PP_REPORT_PROMPT_CONTEXT]; if(_c85&&_c85.prompt){ _c85=_c85.prompt; _c84={}; _c84.cv_id=_c85.id; _c84.parameters=this._genLegacyPromptParameterArrayFromItemSpec(_c85.itemSpecification); _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR]; }else{ if(_c83[this.PP_WIDGET_CONTEXT]&&_c83[this.PP_WIDGET_CONTEXT].values){ _c84={}; _c84.parameters=[]; var _c86=_c83[this.PP_WIDGET_CONTEXT].values; for(var _c87 in _c86){ var _c88=_c86[_c87]; if(_c88&&_c88.length>0){ if(_c88.length==1&&_c88[0].indexOf("")===0){ _c84.parameters.push({"parmName":_c87,"parmValue":_c88[0]}); }else{ var _c89=""; for(var i=0;i<_c88.length;i++){ _c89+=""; } _c89+=""; _c84.parameters.push({"parmName":_c87,"parmValue":_c89}); } } } _c84.clearCascadePromptParams=_c83[this.PP_CASCADEPROMPT_CLEAR]; } } return _c84; },_genLegacyPromptParameterArrayFromItemSpec:function(_c8b){ if(!_c8b){ return null; } var _c8c=this._getFirstPropertyOfObject(_c8b); var _c8d=[]; for(var _c8e in _c8c){ var _c8f=_c8c[_c8e]; var _c90={parmName:_c8e,parmValue:_c8f[this.PP_SELECT_CHOICES],modelItem:_c8f[this.PP_MODELITEM]}; if(_c8f[this.PP_MULTIVALUES]!==null){ _c90.multivalued=true; } _c8d.push(_c90); } return _c8d; },_isRangeTypeValues:function(_c91){ if(_c91){ if(_c91.min||_c91.max){ return true; } } return false; },_getFirstPropertyOfObject:function(_c92){ var _c93=null; for(var _c94 in _c92){ _c93=_c92[_c94]; break; } return _c93; },_getFirstPropertyNameOfObject:function(_c95){ var _c96=null; for(var _c97 in _c95){ _c96=_c97; break; } return _c96; },extractWidgetContextObject:function(_c98){ if(_c98){ var _c99=_c98[this.PP_WIDGET_CONTEXT]; if(_c99){ var obj={}; obj[this.PP_WIDGET_CONTEXT]=_c99; return obj; } } return null; },genMergedWidgetContextObject:function(){ var _c9b=null; var _c9c=null; for(var key in this.m_oContextCollection){ var _c9e=this.m_oContextCollection[key]; if(_c9e){ var _c9f=_c9e[this.PP_WIDGET_CONTEXT]; if(_c9f){ if(_c9f[this.PP_VALUES]){ _c9b=dojo.mixin(_c9b,_c9f[this.PP_VALUES]); } if(_c9f[this.PP_RANGES]){ _c9c=dojo.mixin(_c9c,this._convertRangeArrayToObjectForActiveReport(_c9f[this.PP_RANGES])); } } } } if(_c9b||_c9c){ var obj={}; obj[this.PP_WIDGET_CONTEXT]={}; if(_c9b){ obj[this.PP_WIDGET_CONTEXT][this.PP_VALUES]=_c9b; } if(_c9c){ obj[this.PP_WIDGET_CONTEXT][this.PP_RANGES]=_c9c; } return obj; } return null; },raiseDrillEvent:function(_ca1,_ca2,_ca3){ var _ca4=this._buildGeneralizedDrillPayload(_ca1,_ca2,_ca3); if(_ca4){ this.m_widget.fireEvent(this.EVENT_NAME_DRILL,null,_ca4); this._updateDrillContext(_ca4); this._updateWidgetContextContainer(); } },_updateDrillContext:function(_ca5){ this._updateDrillGenericContext(_ca5); this._updateDrillContextContainer(_ca5); },_updateDrillGenericContext:function(_ca6){ if(_ca6[this.PP_WIDGET_CONTEXT]){ this.m_oDrillGenericContext=_ca6[this.PP_WIDGET_CONTEXT]; } },_updateDrillContextContainer:function(_ca7){ if(_ca7[this.PP_REPORT_DRILL_CONTEXT]&&_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]){ this.m_oDrillContextContainer=_ca7[this.PP_REPORT_DRILL_CONTEXT][this.PP_DRILL]; } },_buildGeneralizedDrillPayload:function(_ca8,_ca9,_caa){ if(!_ca8||!_ca9){ return null; } var _cab={}; var _cac={}; for(var i in _ca8){ var _cae=_ca8[i]; var mun=(_cae.mun)?_cae.mun:""; var lun=(_cae.lun)?_cae.lun:""; var hun=(_cae.hun)?_cae.hun:""; var _cb2={}; _cb2[this.PP_VALUES]=[{"caption":_cae.displayValue,"mun":mun,"lun":lun,"hun":hun}]; if(_cae.summary){ _cb2["summary"]=_cae.summary; } _cab[_cae.dataItem]=_cb2; _cac[_cae.dataItem]=[_cae.displayValue]; } var _cb3={}; _cb3[this.PP_VALUES]=_cac; var _cb4={}; _cb4[_caa]=_cab; var _cb5={}; _cb5[_ca9]={"id":this.m_widget.iContext.widgetId,"action":_ca9,"itemSpecification":_cb4}; var _cb6={}; _cb6[this.PP_WIDGET_CONTEXT]=_cb3; _cb6[this.PP_REPORT_DRILL_CONTEXT]=_cb5; return _cb6; },genDrillSpecObjects:function(_cb7){ if(!_cb7||!_cb7[this.PP_REPORT_DRILL_CONTEXT]){ return null; } var _cb8=[]; var _cb9=_cb7[this.PP_REPORT_DRILL_CONTEXT]; var _cba=this._getFirstPropertyOfObject(_cb9); var _cbb=this._getFirstPropertyOfObject(_cba.itemSpecification); for(var _cbc in _cbb){ var _cbd=_cbb[_cbc]; var _cbe=_cbd[this.PP_VALUES]; if(_cbe&&_cbe.length>0){ var _cbf=_cbe[0]; var _cc0={"dataItem":_cbc,"displayValue":_cbf.caption,"mun":_cbf.mun,"lun":_cbf.lun,"hun":_cbf.hun}; if(_cbf.summary){ _cc0["summary"]=_cbf.summary; } _cb8.push(_cc0); } } return (_cb8.length>0)?_cb8:null; },getDrillActionType:function(_cc1){ if(!_cc1||!_cc1[this.PP_REPORT_DRILL_CONTEXT]){ return null; } return this._getFirstPropertyNameOfObject(_cc1[this.PP_REPORT_DRILL_CONTEXT]); },_convertRangeArrayToObjectForActiveReport:function(_cc2){ if(_cc2){ var _cc3={}; for(var name in _cc2){ var _cc5=_cc2[name]; if(_cc5&&_cc5.length>0){ _cc3[name]=_cc5[0]; }else{ _cc3[name]=_cc5; } } return _cc3; } return _cc2; },getItemsInItemSpecification:function(_cc6){ var _cc7=_cc6[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]; if(_cc7&&_cc7["selectValueControl"]&&_cc7["selectValueControl"]["itemSpecification"]){ return this._getFirstPropertyOfObject(_cc7["selectValueControl"]["itemSpecification"]); } return null; },genRemoveDiscreteFilterPayload:function(_cc8){ var _cc9={"clientId":_cc8,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selectValueControl":{"selectValueControl":{"id":_cc8,"controlType":"selectValueFilter","type":"discrete","valueType":"string"}}}; return _cc9; },genEmptySelectionPayload:function(oCV,_ccb){ var obj={"clientId":_ccb,"com.ibm.widget.context":{},"com.ibm.widget.context.bux.selection":{"selection":{"id":_ccb,"valueType":"string"}}}; this.m_oSelectionFilterContext={}; this._updateWidgetContextContainer(); this.setSelectionFilterObjects(null); return obj; },genSelectionPayload:function(oCV,_cce,_ccf){ var _cd0={}; var _cd1={"id":_cce,"valueType":"string"}; var obj={"clientId":_cce,"com.ibm.widget.context":_cd0,"com.ibm.widget.context.bux.selection":{"selection":_cd1}}; var _cd3=false; var _cd4=[]; var oSC=oCV.getSelectionController(); var _cd6=oSC.getAllSelectedObjects(); if(_cd6&&_cd6.length>0){ var _cd7={}; var _cd8=null; var _cd9={}; var _cda={}; for(var i=0;i<_cd6.length;i++){ if(_cd6[i].populateSelectionPayload(_cd9,_cda,_ccf)){ _cd3=true; _cd8=_cd6[i].getCtxAttributeString(); if(typeof _cd7[_cd8]=="undefined"){ _cd7[_cd8]=true; _cd4.push(_cd6[i].marshal(oSC,oCV.getId())); } } } if(_cd3){ _cd0.values=_cd9; var _cdc={}; var _cdd=oCV.getModelPath(); var _cde=(_cdd)?_cdd:"."; _cdc[_cde]=_cda; _cd1.itemSpecification=_cdc; } } this.m_oSelectionFilterContext=obj[this.PP_WIDGET_CONTEXT]; this._updateWidgetContextContainer(); this.setSelectionFilterObjects(_cd4.length>0?_cd4:null); return obj; },isSelectionPayloadForReset:function(obj){ if(obj&&obj[this.PP_WIDGET_CONTEXT]){ return this.isEmptyObject(obj[this.PP_WIDGET_CONTEXT]); } return true; },setSelectionFilterObjects:function(_ce0){ this.m_aSelectionFilterObjects=_ce0; },getSelectionFilterObjects:function(){ return this.m_aSelectionFilterObjects; },toStringSelectionFilterObjects:function(){ var str=""; for(var idx in this.m_aSelectionFilterObjects){ if(str.length>0){ str+=","; } str+=JSON.stringify(this.m_aSelectionFilterObjects[idx]); } return "["+str+"]"; },convertSelectionToSelectValueControlPayload:function(_ce3){ if(_ce3["com.ibm.widget.context.bux.selection"]){ var _ce4=_ce3["com.ibm.widget.context.bux.selection"]["selection"]; _ce4.controlType="selectValueFilter"; _ce4.type="discrete"; _ce3["com.ibm.widget.context.bux.selectValueControl"]={"selectValueControl":_ce4}; delete _ce3["com.ibm.widget.context.bux.selection"]; } return _ce3; },convertGenericToSelectValueControlPayload:function(_ce5){ if(this._hasItemSpecification(_ce5)){ return; } if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; for(dataItem in _ce6){ if(_ce6[dataItem].length==0){ delete _ce6[dataItem]; } } var _ce7=true; for(dataItem in _ce6){ _ce7=false; break; } if(_ce7){ delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; } } if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]){ var _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; var _ce7=true; for(dataItem in _ce6){ _ce7=false; break; } if(_ce7){ delete _ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; } } var _ce6=null; if(_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ key=this.PP_VALUES; _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; }else{ key=this.PP_RANGES; _ce6=_ce5[this.PP_WIDGET_CONTEXT][this.PP_RANGES]; } var cv=this.m_widget.getViewerObject(); var _ce9=null; if(cv){ var sc=cv.getSelectionController(); _ce9=sc.getCCDManager(); } for(dataItem in _ce6){ var _ceb=true; var _cec={}; for(var _ced in _ce6){ var _cee=[]; for(var i=0;i<_ce6[_ced].length;i++){ var _cf0=_ce6[_ced][i]; var _cf1={"caption":_cf0}; if(_ceb){ var mun=_ce9?_ce9.getMUNForRDIAndUseValue(_ced,_cf0):null; if(mun!=null){ _cf1.mun=mun; }else{ _ceb=false; for(var i=0;i<_cee.length;i++){ delete _cee[i].mun; } } } _cee.push(_cf1); } _cec[_ced]={"values":_cee}; } var _cf3={}; var _cf4=cv?cv.getModelPath():null; var _cf5=(_cf4)?_cf4:"unknown"; _cf3[_cf5]=_cec; _ce5[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]={"selectValueControl":{"valueType":"string","type":"discrete","controlType":"selectValueFilter","id":_ce5.clientId?_ce5.clientId:"","itemSpecification":_cf3}}; } },getMUNOfItemValueInItemSpecification:function(_cf6,_cf7){ var _cf8=this.getItemsInItemSpecification(_cf6); if(_cf8&&_cf8[_cf7]){ var _cf9=_cf8[_cf7]; if(_cf9.values&&_cf9.values.length>0){ return _cf9.values[0].mun; } } return null; },_hasItemSpecification:function(_cfa){ if(_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfa[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["itemSpecification"]){ return true; } if(_cfa[this.PP_BUX_SELECTION_CONTEXT]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfa[this.PP_BUX_SELECTION_CONTEXT]["selection"]["itemSpecification"]){ return true; } return false; },getSourceUniqueId:function(_cfb,_cfc){ var id=null; var _cfe=null; if(_cfb["clientId"]){ id=_cfb["clientId"]; } if(_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]){ _cfe="selectValueControl"; if(!id&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]&&_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]){ id=_cfb[this.PP_BUX_SELECTVALUECONTROL_CONTEXT]["selectValueControl"]["id"]; } }else{ if(_cfb[this.PP_BUX_SELECTION_CONTEXT]){ _cfe="selection"; if(!id&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]&&_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]){ id=_cfb[this.PP_BUX_SELECTION_CONTEXT]["selection"]["id"]; } }else{ if(_cfb[this.PP_REPORT_PROMPT_CONTEXT]){ _cfe="prompt"; if(!id&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]&&_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]){ id=_cfb[this.PP_REPORT_PROMPT_CONTEXT]["prompt"]["id"]; } }else{ if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){ _cfe="drill"; if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]){ id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillUp"]["id"]; } }else{ if(_cfb[this.PP_REPORT_DRILL_CONTEXT]){ _cfe="drill"; if(!id&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]&&_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]){ id=_cfb[this.PP_REPORT_DRILL_CONTEXT]["DrillDown"]["id"]; } } } } } } if(!id){ id="unknown"; } if(!_cfe){ _cfe="unknown"; } if(typeof _cfc=="string"){ _cfe=_cfc; } return id+"_"+_cfe; },isWidgetContextEmpty:function(_cff){ return (this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT])||(this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_VALUES])&&this.isEmptyObject(_cff[this.PP_WIDGET_CONTEXT][this.PP_RANGES]))); },isEmptyObject:function(obj){ var _d01=true; if(obj){ for(var _d02 in obj){ _d01=false; break; } } return _d01; },updateContextCollection:function(_d03){ if(!this.isEmptyObject(_d03)){ var _d04=this.getSourceUniqueId(_d03); if(this.isWidgetContextEmpty(_d03)){ if(this.m_oContextCollection[_d04]){ this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d04]); }else{ var _d05=this.getSourceUniqueId(_d03,"unknown"); if(this.m_oContextCollection[_d05]){ this.setEmptyArrayToWidgetContextValues(this.m_oContextCollection[_d05]); } } }else{ if(_d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ for(var name in _d03[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ for(var key in this.m_oContextCollection){ var _d08=this.m_oContextCollection[key]; if(_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES]&&_d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]){ delete _d08[this.PP_WIDGET_CONTEXT][this.PP_VALUES][name]; } } } } this.m_oContextCollection[_d04]=dojo.clone(_d03); } return this.m_oContextCollection; } },setEmptyArrayToWidgetContextValues:function(_d09){ if(_d09&&_d09[this.PP_WIDGET_CONTEXT]&&_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]){ var _d0a=_d09[this.PP_WIDGET_CONTEXT][this.PP_VALUES]; for(var name in _d0a){ _d0a[name]=[]; } } }}); dojo.provide("viewer.AnnotationHelper"); dojo.declare("viewer.AnnotationHelper",null,{m_loadAnnotationsDfd:null,m_bCallGetAnnotations:true,m_bAnnotationsEnabled:null,constructor:function(_d0c){ this.m_viewerIWidget=_d0c; this.m_bCallGetAnnotations=true; this.m_bAnnotationsEnabled=null; },getAnnotationStore:function(){ return this.m_viewerIWidget.getAnnotationStore(); },setCallGetAnnotations:function(flag){ this.m_bCallGetAnnotations=flag; },isEnabled:function(){ if(this.m_bAnnotationsEnabled===null){ this.m_bAnnotationsEnabled=this.m_viewerIWidget.getViewerObject().bBuxAnnotationsAvailable; } return this.m_bAnnotationsEnabled; },refreshAnnotationData:function(){ if(this.m_loadAnnotationsDfd){ return null; } this.m_loadAnnotationsDfd=new dojo.Deferred(); this.fetchAnnotationData(); return this.m_loadAnnotationsDfd; },fetchAnnotationData:function(){ var _d0e=this.m_viewerIWidget; if(!this.m_bCallGetAnnotations||!this.isEnabled()){ return; } dojo.when(_d0e.getWidgetStoreID(),dojo.hitch(this,function(_d0f){ if(!_d0f){ return; } this.m_viewerIWidget.getLoadManager().runWhenHasViewer(dojo.hitch(this,this._fetchAnnotationData,_d0f)); })); },_fetchAnnotationData:function(_d10){ var _d11=this.m_viewerIWidget.getViewerObject(); var _d12=_d11.getSelectionController(); var _d13=_d12.getCCDManager().m_md; if(!_d13){ _d13={}; } _d13=dojo.toJson(_d13); var _d14=_d12.getCCDManager().m_cd; if(!_d14){ _d14={}; } _d14=dojo.toJson(_d14); var _d15={"complete":{},"fault":{}}; _d15.complete["object"]=this; _d15.complete["method"]=this.fetchAnnotationDataResponse; _d15.fault["object"]=this; _d15.fault["method"]=this.fetchAnnotationDataResponseFault; var _d16=new AsynchJSONDispatcherEntry(_d11); _d16.setCallbacks(_d15); _d16.addFormField("widgetStoreID",_d10); _d16.addFormField("ui.action","getAnnotations"); _d16.addFormField("cv.metatdata",_d13); _d16.addFormField("cv.context",_d14); _d16.sendRequest(); },fetchAnnotationDataResponseFault:function(_d17){ this.m_bCallGetAnnotations=false; var _d18=new FaultDialog(this.m_viewerIWidget.getViewerObject()); var _d19=_d17.getSoapFault(); var _d1a=null; var _d1b=XMLHelper_FindChildByTagName(_d19,"exception",true); if(_d1b){ var _d1c=XMLHelper_FindChildByTagName(_d1b,"errorCode",false); if(_d1c){ _d1a=XMLHelper_GetText(_d1c); } } if(_d1a==="0"){ var _d1d=null; var _d1e=XMLHelper_FindChildByTagName(_d1b,"message",false); if(_d1e){ var _d1f=XMLHelper_FindChildByTagName(_d1e,"messageString",true); if(_d1f){ _d1d=XMLHelper_GetText(_d1f,false); } } if(_d1d){ var _d20=/ANS-GEN-(\d{2,4})/; var _d21=_d20.exec(_d1d); if(_d21&&_d21.length&&_d21.length>1){ var _d22=_d21[1]; if(_d22==="0075"){ _d18.setErrorMessage(RV_RES.IDS_ANNOTATION_WIDGET_DELETED_ERROR); } } } } this._cleanupPreviousAnnotations(); this.getAnnotationStore().clear(); _d18.show(_d19); if(this.m_loadAnnotationsDfd){ this.m_loadAnnotationsDfd.errback(); this.m_loadAnnotationsDfd=null; } },fetchAnnotationDataResponse:function(_d23){ var _d24=window["CVEditContentActionInstance"]; var _d25=_d23.getResult(); this.m_bCallGetAnnotations=this.m_bCallGetAnnotations&&_d25!==null; if(_d25===null){ _d25=[]; } var _d26=this.m_viewerIWidget.getViewerObject(); _d26.envParams["cv.annotationData"]=_d25; this._cleanupPreviousAnnotations(); if(_d25.length>0){ if(this.getAnnotationStore()){ var _d27=this._generateMatchedAnnotationsFromViewerObject(); this.getAnnotationStore().load(_d27); this.displayCommentIndicators(); } } if(this.m_loadAnnotationsDfd){ this.m_loadAnnotationsDfd.callback(); this.m_loadAnnotationsDfd=null; } },_cleanupPreviousAnnotations:function(){ var _d28=this.getAnnotationStore(); if(_d28){ var _d29=_d28.getAll(); for(var _d2a in _d29){ var _d2b=this.m_viewerIWidget.getWidgetId()+"_"+_d2a+"_comment"; var _d2c=dijit.byId(_d2b); if(typeof _d2c!="undefined"&&_d2c!=null){ _d2c.destroy(); delete _d2c; } _d28.clear(_d2a); } } },_generateMatchedAnnotationsFromViewerObject:function(){ var _d2d=this.m_viewerIWidget.getViewerObject(); var _d2e=[]; if(_d2d&&_d2d.envParams&&_d2d.envParams["cv.annotationData"]){ _d2e=eval(_d2d.envParams["cv.annotationData"]); } var _d2f=this._generateAnnotationListWithoutORoperator(_d2e); return this._updateAnnotationCtxWithMatchedCellCtx(_d2f,_d2d); },_generateAnnotationListWithoutORoperator:function(_d30){ var _d31=[]; for(var i=0,len=_d30.length;i"]; if(_d9f&&_d9f.length>0){ _da0.push(_d9f); } var _da1=this.getDisplayName(); if(_da1&&_da1.length>0){ _da0.push("",xml_encode(_da1),""); } if(this._BUXDBInfoArray&&this._BUXDBInfoArray.length>0){ _da0=_da0.concat(this._BUXDBInfoArray); } _da0.push(""); return _da0.length>2?_da0.join(""):""; },getBUXDBInfoArray:function(_da2){ var _da3=null; var _da4=null; if(_da2){ _da3=_da2.dbTitle; _da4=_da2.dbSearchPath; }else{ var _da5=this.iContext.getItemSet("buxrtstate",false); if(_da5){ _da3=_da5.getItemValue("dbTitle"); _da4=_da5.getItemValue("dbSearchPath"); } } var _da6=[]; if(_da3&&_da4&&_da4.length>0){ _da6.push("",xml_encode(_da3),"",xml_encode(_da4),""); } return _da6; },loadExtraJavascriptFiles:function(_da7){ if(typeof CSelectionContext=="undefined"){ this._loadFile("/drill/CSelectionContextBuilder.js",_da7); } this._loadFile("/mdsrv/lineage.js",_da7); if(window.cognosViewerDebug){ this._loadFile("/rv/viewer.extra.debug.js",_da7); }else{ this._loadFile("/rv/viewer.extra.js",_da7); } },_loadFile:function(_da8,_da9){ if(dojo.isIE||dojo.isTrident||_da9.indexOf("..")==0){ var _daa=window.gScriptLoader.loadFile(_da9+_da8,"","GET"); var _dab=document.createElement("script"); _dab.type="text/javascript"; _dab.text=_daa; document.getElementsByTagName("head")[0].appendChild(_dab); }else{ dojo._loadPath(_da9+_da8,null); } },_getCWALaunchInformation:function(){ var args={url:this.buildPostUrl(),sync:false,handleAs:"json",preventCache:true,content:{"b_action":"cognosViewer","ui.action":"noOp","cv.responseFormat":"getCWALaunchParameters"},error:dojo.hitch(this,function(_dad){ this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true}); this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dad.message,description:_dad.description}); }),load:dojo.hitch(this,function(_dae,_daf){ var _db0=_daf.xhr.getResponseHeader("Content-Type"); if(_db0&&_db0.indexOf("text/html")!=-1&&_dae&&_dae.match(/CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){ this.handlePassportErrorFromDispatcher(); }else{ this._launchCWA(_dae); } })}; dojo.xhrPost(args); },_launchCWA:function(_db1){ if(_db1){ if(typeof NewReportAction=="undefined"){ this.loadExtraJavascriptFiles(_db1.webContentRoot); if(_db1.productLocale!="en"){ this._loadFile("rv/res/viewer_"+_db1.productLocale+".js",_db1.webContentRoot); } } var _db2=new NewReportAction(); _db2.setRequestParms({"packageSearchPath":this.getAttributeValue("packageSearchPath"),"viewerIWidget":this,"webContentRoot":_db1.webContentRoot,"gateway":_db1.gateway,"capabilitiesXml":_db1.capabilitiesXML,"cafContextId":_db1.cafContextId}); this.removeAttributeValue("packageSearchPath"); _db2.execute(); } },setNewReportInfo:function(info){ this._newReportInfo=info; },_handleFileDialogCancel:function(){ this.fireEvent("com.ibm.bux.widget.action",null,{action:"deleteWidget"}); },_handleFileDialogOk:function(_db4){ this.removeAttributeValue("newReport"); this.setAttributeValue("packageSearchPath","storeID(\""+_db4+"\")"); this.onLoad(); },onLoad:function(){ this.sViewerIWidgetId=this.iContext.getRootElement().id; if(this.getAttributeValue("packageSearchPath")){ this._getCWALaunchInformation(); return; }else{ if(this.getAttributeValue("newReport")==="true"){ dojo["require"]("bux.dialogs.FileDialog"); var oDlg=new bux.dialogs.PackageDialog({onCancelHandler:dojo.hitch(this,this._handleFileDialogCancel),selectPackageHandler:dojo.hitch(this,this._handleFileDialogOk)}); oDlg.startup(); oDlg.show(); return; } } var _db6=this.getAttributeValue("ViewerConcurrentRequestLimit"); if(_db6){ this.removeAttributeValue("ViewerConcurrentRequestLimit"); if(!window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"]=new ReportWidgetLoadQueue(_db6); } } this._isMobile=this.getEmbeddedMobileItem(); this._BUXDBInfoArray=this.getBUXDBInfoArray(); var _db7=this.getAttributeValue("viewerProperties"); var _db8=this.getAttributeValue("promptParametersRetrieved"); if(_db8!==null&&_db8=="true"){ this.promptParametersRetrieved=true; } this.properties=this.createProperties(_db7); this.savedOutput.setPagedOutput(!this.properties.getRetrieveAll()); this.setWidgetCopyPasteParameters(); this.m_bSelectionFilterSwitch=this.getAttributeValue("selectionFilterEnabled")=="true"?true:false; if(this.isOpeningSavedDashboard()&&this.copyPasteResource==null){ this.disableListenToIfFullReportUpgraded(); this.enableFlashChartsToIfReportPartUpgraded(); this.disableListenToIfReportPartUpgraded(); if(this.isVisible()){ if(window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"].add(this); }else{ this.postReport(null); } } }else{ var _db9={action:"canvas.filters"}; this.fireEvent("com.ibm.bux.widget.action",null,_db9); this.getLoadManager().viewerLoadInitiated(); this.m_visible=true; } this.addWidgetEventListeners(); this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.widget.contextChanged","widgetBuxCanvasTabs","com.ibm.widget.contextChanged"); this.iContext.iEvents.svc.addWire(this.iContext.widgetId,"com.ibm.bux.data.filterCache.init","widgetBuxCanvasTabs","com.ibm.bux.data.filterCache.init"); this.fireEvent("com.ibm.bux.widget.updateStoreID",null,{}); },addWindowEventListeners:function(){ if(!this.dojoConnections){ this.dojoConnections=[]; } this.dojoConnections.push(dojo.connect(window,"onresize",this,this.onBrowserResize)); this.dojoConnections.push(dojo.connect(window,"onbeforeunload",this,this.possibleUnloadEvent)); },addWidgetEventListeners:function(){ if(this.isMobile()){ this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchstart",this,this.onTouchStart)); this.dojoConnections.push(dojo.connect(this.iContext.getRootElement(),"touchmove",this,this.onTouchMove)); } },addChromeWhitespaceHandler:function(_dba){ if(isIE()){ var _dbb=document.getElementById("mainViewerTR"+_dba); if(_dbb){ this.dojoConnections.push(dojo.connect(_dbb,"onmousedown",this,this.onMouseDownOnChromeDiv)); } } },onMouseDownOnChromeDiv:function(evt){ if(evt.srcElement.id.indexOf("PRMT",0)===0){ return; } var oCV=this.getViewerObject(); if(oCV){ var _dbe=oCV.getReportDiv(); if(_dbe){ var _dbf=_dbe.getBoundingClientRect(); var _dc0=_dbf.top+_dbe.offsetHeight; if(evt.clientY>_dc0&&evt.button!==2){ if(oCV.getSelectionController()){ oCV.getSelectionController().clearSelectedObjects(); this.onSelectionChange(); stopEventBubble(evt); } } } } },removeWindowEventListeners:function(){ if(this.dojoConnections){ for(var i=0;i10){ this.touchPaging=true; this.m_oCV.pageAction("nextPage"); this.m_oCV.setKeepFocus(false); }else{ if(this.m_oCV.hasPrevPage()&&_dc7-this.touchStartX>10){ this.touchPaging=true; this.m_oCV.pageAction("previousPage"); this.m_oCV.setKeepFocus(false); }else{ this.touchPaging=false; this.touchStartX=-1; } } } } if(this.touchStartX>0){ stopEventBubble(e); } },isLiveReport:function(){ return this.isSavedOutput()===false&&!this.isLimitedInteractiveMode(); },createProperties:function(_dc8){ return new bux.reportViewer.Properties(this,_dc8); },disableListenToIfFullReportUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ if(this.getAttributeValue("flexParam_properties")==null){ var _dc9={}; _dc9["*"]={blockedEvents:["com.ibm.bux.data.filter","com.ibm.bux.filter.values.get","com.ibm.bux.filter.items.get"]}; this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dc9); } } },enableFlashChartsToIfReportPartUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ var _dca=this.getAttributeValue("originalReportPart"); if(typeof _dca!=="undefined"&&_dca!==null){ this.properties.setProperty("flashCharts","true"); } } },disableListenToIfReportPartUpgraded:function(){ if(this.isGoDashboardReportUpgrade()){ var _dcb=this.getAttributeValue("originalReportPart"); if(typeof _dcb!=="undefined"&&_dcb!==null){ var _dcc={}; _dcc["*"]={blockedEvents:["com.ibm.bux.viewer.drill","com.ibm.bux.viewer.prompt"]}; this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,_dcc); } } },possibleUnloadEvent:function(){ var oCV=this.getViewerObject(); if(oCV){ oCV.getViewerDispatcher().possibleUnloadEvent(); } },onUnload:function(){ this.onUnloadInProgress=true; this.destroy(); this.iContext=null; },onGetFiltersDone:function(evt){ if(typeof this.filterRequiredAction!="undefined"&&this.filterRequiredAction!=null){ var _dcf=this.buildDataFiltersParam(evt.payload.filters); var _dd0=new ActionFactory(this.getViewerObject()); var _dd1=_dd0.load(this.filterRequiredAction); _dd1.dispatchRequest(_dcf,this.filterRequiredAction); this.filterRequiredAction=null; }else{ this.postReport(evt.payload.filters); this.postSetWidgetCopyPasteParameters(); } },getOriginalFormFields:function(){ return this.m_originalFormFields; },setOriginalFormFields:function(_dd2){ this.m_originalFormFields=_dd2; },getXNodeId:function(){ return this.xNodeId; },setXNodeId:function(_dd3){ this.xNodeId=_dd3; },postReport:function(_dd4){ this.getLoadManager().viewerLoadInitiated(); this.viewerWidgetLastAction={"functionName":"postReport","param":[_dd4]}; if(this.getRunReportOption()!==false){ this.m_oLoadManager.runningReport(); } var _dd5=this.buildPostContent(_dd4); if(_dd5["ui.reportDrop"]=="true"){ this.m_bReportDropped=true; } this.m_originalFormFields=new CDictionary(); for(var _dd6 in _dd5){ if(_dd6!="cv.outputKey"){ this.m_originalFormFields.add(_dd6,_dd5[_dd6]); } } var _dd7={}; if(this.getAttributeValue("X-Node-ID")){ this.setXNodeId(this.getAttributeValue("X-Node-ID")); _dd7["X-Node-ID"]=this.getAttributeValue("X-Node-ID"); this.removeAttributeValue("X-Node-ID"); } var args={url:this.buildPostUrl(),sync:false,preventCache:true,content:_dd5,headers:_dd7,error:dojo.hitch(this,function(_dd9){ this.fireEvent("com.ibm.bux.widget.render.done",null,{noAutoResize:true}); this.fireEvent("com.ibm.bux.widget.notification",null,{type:"error",message:_dd9.message,description:_dd9.description}); })}; if(typeof xhrMultiPart!=="undefined"&&xhrMultiPart.active){ args.load=dojo.hitch(this,function(_dda){ this.loadContent(_dda.responseText); }); xhrMultiPart.Post(args); }else{ args.load=dojo.hitch(this,function(_ddb,_ddc){ var _ddd=_ddc.xhr.getResponseHeader("Content-Type"); if(_ddd&&_ddd.indexOf("text/html")!=-1&&_ddb&&_ddb.match(/CAM_PASSPORT_ERROR<\/ERROR_CODE>/)){ this.handlePassportErrorFromDispatcher(); }else{ this.loadContent(_ddb); } }); dojo.xhrPost(args); } },isDropped:function(){ return this.m_bReportDropped; },cleanupStyles:function(){ this._cssLimitReached=true; if(!this.isVisible()){ if(!this._styles){ this._styles=[]; } var id=this.getViewerId(); var _ddf=document.getElementsByTagName("head").item(0).getElementsByTagName("style"); for(var i=0;i<_ddf.length;i++){ var _de1=_ddf[i]; if(_de1.getAttribute&&_de1.getAttribute("namespaceId")==id){ _de1.parentNode.removeChild(_de1); this._styles.push(_de1); i--; } } } },reloadStyles:function(){ if(this._styles){ while(this._styles.length>0){ var _de2=this._styles.pop(); document.getElementsByTagName("head").item(0).appendChild(_de2); } } },loadStylesAndScripts:function(_de3,_de4,_de5){ window.gScriptLoader.m_bIgnoreAjaxWarnings=true; window.gScriptLoader.setHandlerStylesheetLimit(true); var _de6=this.iContext.getRootElement(); if(!_de6){ return; } _de3=window.gScriptLoader.loadCSS(_de3,_de4,true,this.getViewerId()); if(dojo.isIE||dojo.isTrident){ _de3=" "+_de3; } _de4.innerHTML=_de3; if(this.isSelectionFilterEnabled()){ this.updateDrillThroughLinks(); } var _de7=GUtil.generateCallback(this.fireResizeEvent,[],this); this.m_sScriptLoaderNamespace=this.getViewerId(); window.gScriptLoader.loadAll(_de4,_de7,this.m_sScriptLoaderNamespace,_de5); },fireResizeEvent:function(){ var _de8=this.getViewerObject(); if(_de8==null){ this.fireEvent("com.ibm.bux.widget.render.done",null,{}); }else{ var _de9=_de8.getViewerWidget(); if(_de9){ _de8.m_resizeReady=true; _de8.doneLoading(); }else{ var _dea=this; setTimeout(function(){ _dea.fireResizeEvent(); },100); } } },getSavedReportSearchPath:function(_deb){ var _dec=this.getAttributeValue("savedReportPath"); if(_dec){ return _dec; } var _ded=this.getAttributeValue("dashboardID"); _ded=_ded.substr("$$dbid$$".length); var _dee="storeID(\""+_ded+"\")/*[@name="+xpath_attr_encode(_deb)+"]"; return _dee; },isSavedReport:function(_def,_df0){ return (typeof _df0!=="undefined"&&_df0!==null&&_df0.length>0&&_def!==_df0); },getGlobalPromptsInfo:function(){ var _df1=null; var oCV=null; var _df3=[]; var _df4=null; if(window.gaRV_INSTANCES){ for(var _df5=0;_df50){ _df1=""+_df3.join("")+""; } return _df1; },buildPostUrl:function(){ return this.getAttributeValue("gateway"); },getSavedItem:function(){ var _df6=this.getAttributeValue("savedReportPath"); if(!_df6){ _df6=this.getAttributeValue("savedReportName"); } return _df6; },setRunReportOption:function(_df7){ this.m_bRunReportOption=_df7; },getRunReportOption:function(){ return this.m_bRunReportOption; },resetRunReportOption:function(){ this.m_bRunReportOption=null; },buildPostContent:function(_df8){ var _df9=this.getAttributeValue("originalReport"); var _dfa=this.getSavedItem(); var _dfb=this.getAttributeValue("originalReportPart"); var _dfc=this.getAttributeValue("flexParam_properties"); var _dfd=this.getAttributeValue("flexParam_promptData"); var _dfe=this.isSavedReport(_df9,_dfa); var _dff=this.getPromptRunOption(_dfd,_dfe); var _e00=this.getAttributeValue("cv.outputKey")?"cvx.high":"cognosViewer"; var _e01={"b_action":_e00,"run.outputFormat":"HTML","bux":"true","cv.responseFormat":"iWidget","cv.id":this.getViewerId()}; if(this.isMobile()){ _e01["container"]="mobile"; } if(this.getAttributeValue("cv.outputKey")){ _e01["cv.outputKey"]=this.getAttributeValue("cv.outputKey"); this.removeAttributeValue("cv.outputKey"); _e01["widget.id"]=this.getWidgetId(); } if(this.getAttributeValue("gateway")){ _e01["cv.gateway"]=this.getAttributeValue("gateway"); } if(this.getAttributeValue("webcontent")){ _e01["cv.webcontent"]=this.getAttributeValue("webcontent"); } this.sInitialSpec=this.getAttributeValue("specification"); if(_dfe){ this.addUserParamsToContent(_e01); } if(!this.sInitialSpec||this.copyPasteResource){ if(_dfe){ _e01["ui.object"]=this.getSavedReportSearchPath(_dfa); if(!this.getAttributeValue("savedReportPath")&&this.getAttributeValue("savedReportName")){ _e01["savedReportName"]=_dfa; } _e01["widget.isSavedReport"]="true"; _e01["ui.reRunObj"]=this.getSavedReportSearchPath(_dfa); }else{ _e01["ui.object"]=_df9; if(_dfc&&_dfc.length>0){ _e01["flexParamProperties"]=_dfc; } if(_dfd&&_dfd.length>0){ _e01["gdPromptAnswers"]=_dfd; } } _e01["originalReport"]=_df9; } if(this.getAttributeValue("savedOutputSearchPath")!=null){ this.setSavedOutputSearchPath(this.getAttributeValue("savedOutputSearchPath")); _e01["ui.savedOutputSearchPath"]=this.getAttributeValue("savedOutputSearchPath"); _e01["ui.action"]="buxView"; }else{ if(this.getAttributeValue("mostRecentSavedOutput")=="true"){ _e01["ui.action"]="buxView"; }else{ if(_dfe){ if(this.getAttributeValue("limitedInteractiveMode")==="true"){ _e01["limitedInteractiveMode"]="true"; _e01["ui.action"]="run"; _e01["run.xslURL"]="bux.xsl"; }else{ _e01["ui.action"]="bux"; } if(this.getRunReportOption()!==null){ _e01["widget.runReport"]=(this.getRunReportOption())?"true":"false"; if(this.getDoGetParametersOnLoad()){ _e01["widget.globalPromptInfo"]=""; } this.resetRunReportOption(); } }else{ if(_dfb&&_dfb.length>0&&this.copyPasteResource==null){ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="bux"; _e01["reportpart_id"]=_dfb; }else{ if(this.copyPasteResource){ if(this.ciPublishedReportPath!=null){ _e01["ui.object"]=this.ciPublishedReportPath; } var _e02=dojo.fromJson(this.copyPasteResource); if(_e02[0]&&_e02[0].body){ var _e03=this.getAttributeValue("copy.conversation"); if(_e03){ _e01["ui.conversation"]=_e03; } if(_e02[0].body.specification){ _e01["ui.spec"]=_e02[0].body.specification; _e01["ui.action"]="buxCopyPaste"; if(this.getAttributeValue("reportCreatedInCW")==="true"){ _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; } }else{ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="buxDropReportOnCanvas"; } } }else{ if(this.sInitialSpec){ _e01["ui.spec"]=this.sInitialSpec; _e01["ui.action"]="buxRunSpecification"; _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; }else{ if(this._newReportInfo){ for(prop in this._newReportInfo){ _e01[prop]=this._newReportInfo[prop]; } _e01["ui.reportDrop"]="true"; _e01["ui.action"]="bux"; _e01["cv.objectPermissions"]="read write execute setPolicy traverse"; _e01["ui.objectClass"]="report"; _e01["openReportFromClipboard"]="true"; }else{ _e01["ui.reportDrop"]="true"; _e01["ui.action"]="buxDropReportOnCanvas"; } } } } } } } if(_dff!==null){ _e01["run.prompt"]=(_dff?"true":"false"); } if(this.getAttributeValue("lastLocaleSaved")!=null){ _e01["lastLocaleSaved"]=this.getAttributeValue("lastLocaleSaved"); } var _e04=""; if(this.copyPasteResource){ _e04=this.updateCopyPasteFilters(_df8); }else{ _e04=this.buildDataFiltersParam(_df8); if(typeof _df8=="undefined"||_df8==null){ _e04=this.buildFiltersParamFromLoadedSliderState(); } } if(_e04!=""){ _e01["cv.updateDataFilters"]=_e04; } if(this.properties&&this.properties.getFlashCharts()!==null){ _e01["savedFlashChartOption"]=(this.properties.getFlashCharts()?"true":"false"); var _e05=this.getAttributeValue("hasAVSChart"); if(_e05=="true"){ _e01["hasAVSChart"]="true"; }else{ _e01["hasAVSChart"]="false"; } } if(this.properties.getRowsPerPage()!=null){ _e01["run.verticalElements"]=this.properties.getRowsPerPage(); } var _e06=this.getAttributeValue("syncNewWidgets"); if(_e06===null||_e06==="true"){ _e06=true; }else{ _e06=false; } if(!_dfe&&_e06){ var _e07=this.getGlobalPromptsInfo(); if(_e07!==null){ _e01["widget.globalPromptInfo"]=_e07; } } if(this.isOpeningSavedDashboard()){ _e01["ui.preserveRapTags"]="true"; } if(_dfe===true&&this.getAttributeValue("limitedInteractiveMode")!=="true"){ this.getUserId(); } if(window.cognosViewerDebug){ _e01.debug=true; } _e01["cv.buxCurrentUserRole"]=this.getUserRole(); if(this.shouldUseSavedReportInfo()){ _e01["rap.getReportInfo"]="false"; } if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){ this.addBUXRTStateInfoToContent(_e01); } this.addBUXWidgetTitleToContent(_e01); return _e01; },addBUXRTStateInfoToContent:function(_e08){ if(_e08!=null){ var _e09=this.getBUXRTStateInfoMap(); if(_e09&&_e09.length>0){ _e08["cv.buxRTStateInfo"]=_e09; } } },addBUXWidgetTitleToContent:function(_e0a){ if(_e0a!=null){ var _e0b=this.getAttributeValue("widgetTitle"); if(_e0b&&_e0b.length>0){ _e0a["widgetTitle"]=_e0b; } var _e0c=this.getDisplayName(); if(_e0c&&_e0c.length>0){ _e0a["displayTitle"]=_e0c; } } },addUserParamsToContent:function(_e0d){ var _e0e=this.getAttributeValue("userParams"); if(!_e0e){ return; } var doc=XMLBuilderLoadXMLFromString(_e0e); if(!doc){ return; } var _e10=XMLHelper_FindChildrenByTagName(doc.documentElement,"item",false); var _e11=_e10.length; for(var i=0;i<_e11;i++){ if(!_e10[i]){ continue; } var _e13=XMLHelper_FindChildByTagName(_e10[i],"name",false); if(!_e13){ continue; } var _e14=XMLHelper_FindChildByTagName(_e10[i],"value",false); _e0d[XMLHelper_GetText(_e13)]=(!_e14?"":XMLHelper_GetText(_e14)); } if(_e11>0){ _e0d["widget.userParameters"]="true"; if(this.getAttributeValue("viewerReportPrompts")){ _e0d["viewerReportPrompts"]=this.getAttributeValue("viewerReportPrompts"); } } this.removeAttributeValue("userParams"); },shouldUseSavedReportInfo:function(){ return this.getAttributeValue("rapReportInfoVersion")===this.RAP_REPORT_INFO_VERSION&&this.getAttributeValue("rapReportInfo")!=null; },isConsumeUser:function(){ return this.getUserRole()==="consume"; },getUserRole:function(){ var _e15=null; var _e16=this.iContext.getItemSet("buxuserprofile",false); if(_e16){ _e15=_e16.getItemValue("currentUserRole"); } return _e15==null?"assemble":_e15; },getUserId:function(){ dojo["require"]("bux.UserAccount"); return bux.UserAccount.getUserAccount().then(dojo.hitch(this,function(_e17){ this.m_sUserId=_e17.cm$searchPath; return this.m_sUserId; })); },_genMobileFormFieldPayload:function(form){ var _e19={}; var _e1a=form.getElementsByTagName("input"); if(_e1a){ for(var i=0;i<_e1a.length;i++){ var name=_e1a[i].getAttribute("name"); var _e1d=_e1a[i].getAttribute("value"); if(name&&_e1d){ _e19[name]=_e1d; } } } return _e19; },launchGotoPageForIWidgetMobile:function(form){ var _e1f={"action":"goto","payload":this._genMobileFormFieldPayload(form)}; if(typeof console!="undefined"&&console&&console.log){ console.log(_e1f); } this.fireEvent("com.ibm.bux.widget.openView",null,_e1f); },executeDrillThroughForIWidgetMobile:function(form){ var _e21=getChildElementsByAttribute(form,"input","name","ui.action"); if(_e21&&_e21.length>0){ _e21[0].setAttribute("value","authoredDrillThroughMobile"); } var _e22={"action":"drillThrough","payload":this._genMobileFormFieldPayload(form)}; if(typeof console!="undefined"&&console&&console.log){ console.log(_e22); } this.fireEvent("com.ibm.bux.widget.openView",null,_e22); },isBuxAvailable:function(){ return (this.bux&&this.bux._base?true:false); },getDrillOptions:function(){ return this.properties.getDrillOptions(); },getPromptRunOption:function(_e23,_e24){ if(!_e24&&_e23&&_e23.length>0){ return false; }else{ if(_e24){ return this.properties.getPromptUserOnLoad(); }else{ return null; } } },buildDataFiltersParam:function(_e25){ var _e26=""; if(_e25&&_e25.length>0){ this.sliderState={}; _e26=""; for(var _e27=0;_e27<_e25.length;++_e27){ var _e28=_e25[_e27]; var _e29=dojo.fromJson(_e28); if(_e29.clientId==this.getWidgetId()){ continue; } if(!(_e29["com.ibm.widget.context.bux.selectValueControl"])){ this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e29); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e29); _e28=dojo.toJson(_e29); } _e26+=""+xml_encode(_e28)+""; this.sliderState[_e29.clientId]=_e28; } _e26+=""; } return _e26; },updateCopyPasteFilters:function(_e2a){ this.loadSliderState(); if(this.sliderState){ for(var _e2b in this.sliderState){ this.sliderState[_e2b]="{'clientId':'"+_e2b+"',\t'com.ibm.widget.context':{},'com.ibm.widget.context.bux.selectValueControl':"+"{'selectValueControl':{'id':'"+_e2b+"','controlType':'slider','type':'discrete','valueType':'string'}}}"; } } if(_e2a&&_e2a.length>0){ for(var _e2c=0;_e2c<_e2a.length;++_e2c){ var _e2d=_e2a[_e2c]; var _e2e=dojo.fromJson(_e2d); if(_e2e["com.ibm.widget.context.bux.selection"]){ this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_e2e); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_e2e); _e2d=dojo.toJson(_e2e); } this.sliderState[_e2e.clientId]=_e2d; } } return this.buildDataFiltersParam_fromState(); },buildFiltersParamFromLoadedSliderState:function(){ var _e2f=""; this.loadSliderState(); _e2f=this.buildDataFiltersParam_fromState(); return _e2f; },loadSliderState:function(){ this.sliderState={}; var _e30=dojo.fromJson(this.getAttributeValue("sliderIDs")); if(_e30){ for(var i=0;i<_e30.length;++i){ var _e32=_e30[i]; var _e33=this.getItemValue("sliderState_"+_e32); if(_e33!=null&&_e33!=""){ this.sliderState[_e32]=_e33; } } } },buildDataFiltersParam_fromState:function(){ var _e34=""; if(this.sliderState){ for(var _e35 in this.sliderState){ _e34+=""+xml_encode(this.sliderState[_e35])+""; } if(_e34!==""){ return (""+_e34+""); } } return _e34; },loadContent:function(_e36){ var _e37=dojo.byId("_"+this.iContext.widgetId+"_cv"); this.loadStylesAndScripts(_e36,_e37,true); if(!window.gScriptLoader.hasCompletedExecution()){ var obj=this; this.timer=setInterval(function(){ window.gInitializeViewer(obj); },this.timerInterval); }else{ window.gInitializeViewer(this); } this.viewerWidgetLastAction=null; },executeAction:function(evt,_e3a){ var _e3b=this.getViewerObject(); if(evt&&_e3b){ var _e3c=_e3a?_e3a:evt.payload.name; var _e3d=evt.payload; if(_e3c&&typeof _e3d!="undefined"&&_e3d!=null){ if(evt.payload.payload){ _e3d=evt.payload.payload; } _e3b.executeAction(_e3c,_e3d); } } },onContextMenuAction:function(evt){ this.executeAction(evt); },onToolbarAction:function(evt){ this.executeAction(evt); },updateToolbar:function(){ var _e40=this.getViewerObject(); if(!_e40||(!this.bToolbarInitialized&&typeof CognosViewerAction!="function")){ return; } if(_e40.getStatus()==="prompting"){ return; } var _e41=_e40.getToolbar(); CCognosViewerToolbarHelper.updateToolbarForCurrentSelection(_e40,_e41); this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init",null,_e40.getToolbar()); },onSelect:function(){ if(!this.bToolbarInitialized){ this.bToolbarInitialized=true; var _e42=this.getViewerObject(); if(_e42){ var _e43=_e42.getStatus(); if(_e43!=="prompting"&&_e43!=="working"&&_e43!="stillWorking"){ this.updateToolbar(); } } } this.fireEvent("com.ibm.bux.widget.select.done",null,{}); },hideToolbarAndContextMenu:function(){ this.fireEvent("com.ibm.bux.widget.contextMenu.update"); this.fireEvent("com.ibm.bux.widgetchrome.toolbar.init"); },updateSavedAttributes:function(_e44){ this.setAttributeValue("version",this.BUX_REPORT_VERSION); this.setAttributeValue("viewerProperties",this.properties.toString()); if(this.m_oWidgetContextManager.getSelectionFilterObjects()){ this.setAttributeValue("selectionObjects",this.m_oWidgetContextManager.toStringSelectionFilterObjects()); } if(_e44==="live"){ var oCV=this.getViewerObject(); var _e46=this.getEnvParam("reportPrompts"); if(this.promptParametersRetrieved==true&&_e46&&_e46.length>0){ this.setAttributeValue("viewerReportPrompts",this.getEnvParam("reportPrompts")); } this.setAttributeValue("promptParametersRetrieved",(this.promptParametersRetrieved?"true":"false")); this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false"); if(this.getEnvParam("reportpart_id")&&this.getEnvParam("reportpart_id").length>0){ this.setAttributeValue("fromReportPart","true"); } if(this.isLimitedInteractiveMode()){ this.setAttributeValue("limitedInteractiveMode","true"); }else{ this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]); } var _e47=oCV.envParams["contentLocale"]; if(_e47!=null){ this.saveSliderState(); this.setAttributeValue("lastLocaleSaved",_e47); } this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]); this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false"); this.setAttributeValue("displayTypes",this.getDisplayTypes()); this.setSavedOutputsCMResponse(null); if(oCV.getPinFreezeManager()){ var _e48=oCV.getPinFreezeManager().toJSONString(); this.setAttributeValue("PinFreezeInfo",_e48); } if(oCV.envParams["rapReportInfo"]){ this.setAttributeValue("rapReportInfoVersion",this.RAP_REPORT_INFO_VERSION); this.setAttributeValue("rapReportInfo",oCV.envParams["rapReportInfo"]); } } if(_e44==="savedOutput"){ if(this.getSavedOutputSearchPath()==null){ this.setAttributeValue("mostRecentSavedOutput","true"); }else{ this.setAttributeValue("savedOutputSearchPath",this.getSavedOutputSearchPath()); } this.setAttributeValue("selectionFilterEnabled",this.m_bSelectionFilterSwitch?"true":"false"); } },onItemSetChanged:function(_e49){ if(this.getViewerObject()){ var _e4a=_e49.payload.changes; for(var i in _e4a){ if(_e4a[i].id==="savedReportPath"&&_e4a[i].newVal){ this.updateCVEnvParam(); } } } },updateCVEnvParam:function(){ var oCV=this.getViewerObject(); oCV.envParams["ui.objectClass"]=this.isSavedOutput()?"reportView":"report"; oCV.envParams["widget.isSavedReport"]="true"; var _e4d=this.getAttributeValue("savedReportName"); if(_e4d){ oCV.envParams["ui.object"]=_e4d; oCV.envParams["savedReportName"]=_e4d; }else{ oCV.envParams["ui.object"]=this.getAttributeValue("savedReportPath"); } },onWidgetSave:function(evt){ var _e4f=this.getViewerObject(); var _e50={"status":false}; if(evt&&evt.payload&&evt.payload.isCopy===true){ this.setAttributeValue("copy.conversation",_e4f.getConversation()); }else{ this.removeItem("copy.conversation"); this.removeItem("copy.ciPublishedReportPath"); } var _e51=evt&&evt.payload&&evt.payload.operation=="saveAs"?true:false; if(!_e4f&&!_e51){ this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); return; } this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e52=this.getViewerObject(); _e52.loadExtra(); if(this.isSavedOutput()){ this.cleanSavedAttributes(); this.updateSavedAttributes("savedOutput"); _e50.status=true; this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); }else{ if(this.sInitialSpec){ _e50.status=true; this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); }else{ var _e53=this.getEnvParam("cv.objectPermissions"); var _e54=new ViewerIWidgetSave(this,evt.payload); if(!_e54.canSave(_e53)){ this.showErrorMessage(RV_RES.IDS_CANNOT_SAVE_CONTENT_ERROR); this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); return; } if(this.isLimitedInteractiveMode()||(_e52.envParams["ui.spec"]&&_e52.envParams["ui.spec"].length>0)){ this.cleanSavedAttributes(); this.updateSavedAttributes("live"); if(_e54.doGetSavePropertiesFromServer()){ _e54.getSavePropertiesFromServer(); }else{ this.doWidgetSaveDone(_e54); } }else{ if(!_e52.envParams["ui.spec"]){ _e54.setDoCWCopy(true); this.doWidgetSaveDone(_e54); }else{ this.fireEvent("com.ibm.bux.widget.save.done",null,_e50); } } } } }),evt); },doWidgetSaveDone:function(_e55){ var _e56=_e55.getPayload(); _e56.status=true; if(window.icdConfig&&window.icdConfig.ZIPIMode!="0"){ var _e57=_e55.m_payload.dashboard; if(_e57){ this._BUXDBInfoArray=this.getBUXDBInfoArray({dbTitle:_e57.title._text,dbSearchPath:_e57.cm$searchPath}); } } this.fireEvent("com.ibm.bux.widget.save.done",null,_e56); },handleGetSavePropertiesFromServerResponse:function(_e58,_e59){ var _e5a=new ViewerIWidgetSave(this,_e59); if(_e58&&_e58.getJSONResponseObject()){ applyJSONProperties(this.getViewerObject(),_e58.getJSONResponseObject()); } this.doWidgetSaveDone(_e5a); },isPreCaspianRP1BUXReport:function(){ var _e5b=this.getAttributeValue("version"); if(!_e5b||_e5b0){ this.setAttributeValue("fromReportPart","true"); } if(this.isLimitedInteractiveMode()){ this.setAttributeValue("limitedInteractiveMode","true"); }else{ this.setAttributeValue("baseReportModificationTime",oCV.envParams["baseReportModificationTime"]); } var _e63=oCV.envParams["contentLocale"]; if(_e63!=null){ this.saveSliderState(); this.setAttributeValue("lastLocaleSaved",_e63); } this.setAttributeValue("originalReportLocation",oCV.envParams["originalReportLocation"]); oCV.envParams["ui.object"]=this.getSavedReportSearchPath(_e61); oCV.envParams["savedReportName"]=_e61; this.setAttributeValue("hasAVSChart",oCV.hasAVSChart()?"true":"false"); this.setAttributeValue("displayTypes",this.getDisplayTypes()); this.setSavedOutputsCMResponse(null); var _e64={"status":true}; this.fireEvent("com.ibm.bux.widget.save.done",null,_e64); },getDisplayTypes:function(){ var oCV=this.getViewerObject(); if(oCV.getRAPReportInfo()){ return oCV.getRAPReportInfo().getDisplayTypes(); } },saveSliderState:function(){ var _e66=this.getViewerObject(); var _e67=_e66.getRAPReportInfo(); var _e68={}; if(_e67){ _e68=_e67.collectSliderSetFromReportInfo(); } var i=0; var _e6a=[]; for(var _e6b in this.sliderState){ if(typeof _e68[_e6b]!="undefined"){ this.setItemValue("sliderState_"+_e6b,this.sliderState[_e6b]); _e6a[i++]=_e6b; }else{ this.removeItem("sliderState_"+_e6b); } } this.setAttributeValue("sliderIDs",dojo.toJson(_e6a)); },onWidgetRefresh:function(evt){ var _e6d={}; var _e6e=this.getViewerObject(); if(evt&&_e6e){ if(_e6e.envParams["ui.action"]=="view"||_e6e.envParams["ui.action"]=="buxView"){ _e6e.executeAction("RefreshViewEvent"); }else{ if(evt.payload&&evt.payload.refreshType=="preferencesChanged"){ this.clearRAPCache(); _e6e.executeAction("EditContent",{"preferencesChanged":true}); _e6e.executeAction("Reprompt",{"preferencesChanged":true}); }else{ if(!this.isVisible()){ this.getDelayedLoadingContext().setForceRunReport(true); }else{ _e6e.executeAction("Refresh"); } } } this.fireEvent("com.ibm.bux.widget.refresh.done",null,_e6d); } },invokeDisplayTypeDialog:function(_e6f,_e70){ if(!this.m_chart){ this.m_chart=new bux.reportViewer.chart(); } var _e71=this.m_chart.getDisplayTypeDialogDefinition(_e6f); var _e72={"supportedChartTypes":_e71,"suggestedDisplayTypes":_e70}; this.fireEvent("com.ibm.bux.widget.invokeDisplayTypeDialog",null,_e72); },onChangeDisplayType:function(evt){ var _e74=this.getViewerObject(); if(evt&&_e74){ _e74.executeAction("ChangeDisplayType",evt.payload); } },onDisplayTypeDialogVariations:function(evt){ var _e76=this.getViewerObject(); if(evt&&_e76){ _e76.executeAction("ChangeDisplayVariations",evt.payload); } },updateDisplayTypeDialogVariations:function(_e77,_e78){ if(!this.m_chart){ this.m_chart=new bux.reportViewer.chart(); } var _e79=this.m_chart.getDisplayTypeDialogDefinition(_e77); var _e7a={"supportedChartTypes":_e79,"variationGroups":_e78}; this.fireEvent("com.ibm.bux.widget.updateDisplayTypeDialogVariations",null,_e7a); },onGetDisplayTitleDone:function(evt){ if(evt&&evt.payload&&evt.payload.callback){ evt.payload.callback(evt.payload.title); } },getWidgetStoreID:function(){ if(typeof this.widgetStoreId==="undefined"){ if(!this.widgetStoreIdDfd){ this.widgetStoreIdDfd=new dojo.Deferred(); } return this.widgetStoreIdDfd; } return this.widgetStoreId; },setWidgetStoreID:function(_e7c){ this.widgetStoreId=_e7c; if(this.widgetStoreIdDfd){ this.widgetStoreIdDfd.callback(this.widgetStoreId); this.widgetStoreIdDfd=null; } },onUpdateWidgetStoreIDDone:function(evt){ var _e7e=evt.payload.storeID; var _e7f="storeID(\""; if(_e7e&&(_e7e.indexOf(_e7f)>-1)){ _e7e=_e7e.substr(_e7f.length,_e7e.length-_e7f.length-1); } dojo.when(this.getWidgetStoreID(),dojo.hitch(this,function(_e80){ if(_e80&&_e80!=_e7e){ this._copyComments(_e80,_e7e); } })); this.setWidgetStoreID(_e7e); },_copyComments:function(_e81,_e82){ var _e83=this.buildPostUrl(); if(_e83){ var _e84=new XmlHttpObject(); _e84.addFormField("b_action","cognosViewer"); _e84.addFormField("widgetOldStoreID",_e81); _e84.addFormField("widgetStoreID",_e82); _e84.addFormField("ui.action","cloneAnnotations"); _e84.addFormField("cv.responseFormat","json"); _e84.sendHtmlRequest("POST",_e83,"",true); } },onRemoveDone:function(evt){ this.destroy(); },onGetProperties:function(evt){ this.initializeProperties(); this.fireEvent("com.ibm.bux.widget.properties.get.done",null,this.properties.onGet()); },onSetProperties:function(evt){ if(evt&&evt.payload&&evt.payload.properties){ this.properties.onSet(evt.payload); } this.fireEvent("com.ibm.bux.widget.properties.set.done"); var _e88={"modified":true}; this.fireEvent("com.ibm.bux.widget.modified",null,_e88); },getProperties:function(){ return this.properties; },clearPropertiesDialog:function(){ if(this.properties){ this.properties.clearDialogSpec(); } },onGenericSelectValueControl:function(evt,_e8a){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e8b=false; var _e8c=this._getFilterPayload(evt); var _e8d=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e8c):null; if(_e8d&&_e8d!=="facet"){ var _e8e=dojo.clone(evt); this.preProcessFilterValues(_e8e); this.m_oWidgetContextManager.updateFilterContext(_e8e.payload); _e8b=this.onFilter(_e8e,_e8a); }else{ this.m_oWidgetContextManager.updateFilterContext(_e8c); _e8b=this.onFilter(evt,_e8a); } return _e8b; }),evt.source); } },onFilter:function(evt,_e90){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _e91=false; if(this.isLiveReport()===false){ return _e91; } var _e92=this._getFilterPayload(evt); var _e93=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValueControlTypeFromPayload(_e92):null; var _e94=null; var _e95=this.m_oWidgetContextManager.getItemNames(_e92); var _e96=false; for(var i=0;!_e96&&i<_e95.length;i++){ _e94=_e95[i]; _e96=this.canFilter(_e92,_e94,_e93,evt); } if(_e94==null&&!_e96){ _e96=this.canFilter(_e92,_e94,_e93,evt); } if(_e96){ var _e98={}; var _e99=this._getDrillResetHUNForFacet(_e94,_e93); if(_e99&&_e99.length>0){ _e98.drillResetHUN=_e99; } var _e9a=(evt.type=="string")?evt.payload:dojo.toJson(evt.payload); this.sliderState[evt.source]=_e9a; _e98.filterPayload=_e9a; _e98.isFacet=("facet"===_e93); if(_e90){ _e98.forceCleanup=this.m_oWidgetContextManager.genRemoveDiscreteFilterPayload(this.getWidgetId()); } this.getViewerObject().executeAction("UpdateDataFilter",_e98); if(!this.shouldReportBeRunOnAction()){ this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true); } _e91=true; } return _e91; }),evt.source); } },clearSelectionFilter:function(){ if(this.m_oWidgetContextManager){ var _e9b=this.m_oWidgetContextManager.genEmptySelectionPayload(this.getViewerObject(),this.getWidgetId()); this._fireContextChangedEvent(_e9b,false); } },broadcastSelectionFilter:function(){ this.onSelectionChange(); },onSelectionChange:function(){ if(this.isSelectionFilterEnabled()){ var _e9c=(this.getContainerTypeForSelection()==="list"); var _e9d=this.m_oWidgetContextManager.genSelectionPayload(this.getViewerObject(),this.getWidgetId(),_e9c); this._fireContextChangedEvent(_e9d,!this.m_oWidgetContextManager.isSelectionPayloadForReset(_e9d)); } },_fireContextChangedEvent:function(_e9e,_e9f){ this.setSelectionFilterSent(_e9f); this.fireEvent("com.ibm.widget.contextChanged",null,_e9e); },somethingSelected:function(){ var oCV=this.getViewerObject(); return (oCV&&oCV.getSelectionController()&&oCV.getSelectionController().getAllSelectedObjects().length>0); },selectionFilterSent:function(){ return this.m_bSelectionFilterSent; },setSelectionFilterSent:function(flag){ this.m_bSelectionFilterSent=flag; },reselectSelectionFilterObjects:function(){ if(this.isSelectionFilterEnabled()){ var oCV=this.getViewerObject(); var _ea3=oCV.getSelectionController(); var _ea4=this.m_oWidgetContextManager.getSelectionFilterObjects(); if(!_ea4){ var str=this.getAttributeValue("selectionObjects"); if(str&&str.length>0){ _ea4=eval(str); this.m_oWidgetContextManager.setSelectionFilterObjects(_ea4); this.removeAttributeValue("selectionObjects"); } } if(_ea4&&_ea4.length>0){ var _ea6=new ReselectAction(oCV,_ea4); _ea6.executeAction(); } } },_getFilterPayload:function(evt){ return (evt.type=="string"?dojo.fromJson(evt.payload):evt.payload); },_getFilterPayloadItemName:function(_ea8){ var _ea9=_ea8.name; if(!_ea8.name){ _ea9=this.m_oWidgetContextManager.getFilterFirstItemName(); } return _ea9; },canFilter:function(_eaa,_eab,_eac,evt){ var _eae; var _eaf=this.getRAPCachedItem("filterableItems"); if(_eac!=="facet"&&typeof _eab!="undefined"&&_eab!=null&&_eaf!=null){ for(var type in _eaf){ for(_eae=0;_eae<_eaf[type].length;++_eae){ if(_eaf[type][_eae].name==_eab||_eaf[type][_eae].label==_eab){ return true; } } } }else{ var _eb1=this.getViewerObject(); var _eb2=_eb1.getRAPReportInfo(); if(_eb2){ var _eb3=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"dimension"):null; var _eb4=_eb2.getContainers(); for(var lid in _eb4){ var _eb6=_eb4[lid]; var _eb7=_eb6.sliders; if(_eb7&&_eb7.length){ for(var _eb8=0;_eb8<_eb7.length;++_eb8){ var _eb9=_eb7[_eb8]; if(_eb9.clientId==_eaa.clientId||(_eb9.clientId==evt.source)||(_eb9.clientId==_eb9.name&&_eb9.name==_eab)){ return true; } } } var _eba=_eb6.itemInfo; if(_eba&&_eba.length){ for(var _ebb=0;_ebb<_eba.length;++_ebb){ if(_eba[_ebb].item==_eab){ return true; } if(_eac==="facet"&&_eba[_ebb].dimensionName==_eab){ return true; } if(_eac==="facet"&&_eba[_ebb].dimensionName===_eb3){ return true; } } } if(_eac==="facet"){ var _ebc=(this.m_oWidgetContextManager)?this.m_oWidgetContextManager.getSelectValuePropertyFromPayload(_eaa,"filterType"):null; if(_eac==="facet"&&_ebc==="attribute"){ return true; } var _ebd=_eb6.filter; if(_ebd&&_ebd.length){ for(var _ebe=0;_ebe<_ebd.length;++_ebe){ if(_ebd[_ebe].hierarchyName===_eab){ return true; } } } }else{ if(_eb2.getFilterObjectFromContainer(lid,_eab,false)){ return true; } } } if(_eb2.isReportLevel_nonVisibleFilterItem(_eab)){ return true; } } } return false; },_getDrillResetHUNForFacet:function(_ebf,_ec0){ if(_ec0!=="facet"){ return null; } var _ec1=null; var _ec2=this.getViewerObject(); if(_ec2.getRAPReportInfo()){ _ec1=_ec2.getRAPReportInfo().getDrilledOnHUNs(); } if(!_ec1){ return null; } var _ec3=[]; for(var i=0;i<_ec1.length;i++){ if(_ec1[i].indexOf(_ebf)!==-1){ _ec3.push(_ec1[i]); break; } } return _ec3; },preProcessFilterValues:function(evt){ var _ec6=evt.payload["com.ibm.widget.context"]["values"]; _ec6=(_ec6)?_ec6:evt.payload["com.ibm.widget.context"]["ranges"]; var _ec7=this.m_oWidgetContextManager.getItemsInItemSpecification(evt.payload); var _ec8=(_ec6)?false:true; if(_ec8){ _ec6=evt.payload["com.ibm.widget.context"]; } var _ec9=this.getViewerObject(); if(_ec9){ var _eca=_ec9.getRAPReportInfo(); for(var _ecb in _ec6){ if(!_eca.isReferenced(_ecb)||_ec8){ delete _ec6[_ecb]; if(_ec7&&_ec7[_ecb]){ delete _ec7[_ecb]; } } } } if(isObjectEmpty(_ec6)){ evt.payload["com.ibm.widget.context"]={}; } },isLimitedInteractiveMode:function(){ var _ecc=this.getViewerObject(); if(_ecc){ return _ecc.isLimitedInteractiveMode(); } return false; },onMouseOver:function(evt){ if(DragDropAction_isDragging(evt)==false&&this.getViewerObject().getStatus()=="complete"){ var _ece=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ece){ return _ece.onMouseOver(evt); } } return true; },onMouseOut:function(evt){ var _ed0=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ed0&&this.getViewerObject().getStatus()=="complete"){ return _ed0.onMouseOut(evt); } return true; },onMouseOverRenamedItem:function(evt){ var node=getNodeFromEvent(evt); if(node.getAttribute){ var _ed3=node.getAttribute("rp_name"); if(_ed3!=null){ var _ed4=this.getViewerObject().getSelectionController().getTextValue(node.childNodes); if(_ed3!=_ed4){ var id=node.getAttribute("id"); node.m_tooltip=new bux.reportViewer.ReportInfo({connectId:[id],position:["above","below"],title:RV_RES.IDS_JS_RENAMED_ITEM,text:RV_RES.IDS_JS_RENAMED_ITEM_ORIGINAL_LABEL+" "+node.getAttribute("rp_name")}); node.m_tooltip.open(); } } } },onMouseOutRenamedItem:function(evt){ var node=getNodeFromEvent(evt); node.m_tooltip=null; },onDoubleClick:function(evt){ var _ed9=ActionFactory_loadActionHandler(evt,this.getViewerObject()); if(_ed9&&this.getViewerObject().getStatus()=="complete"){ return _ed9.onDoubleClick(evt); } return true; },onMouseDown:function(evt){ var oCV=this.getViewerObject(); var _edc=oCV.getActionFactory(); this._selectionAction=_edc.load("Selection"); if(this.isMobile()){ var _edd=oCV.getSelectionController(); var _ede=_edd.pageClickedForMobile(evt); if(this.isSelectionFilterEnabled()){ this.onSelectionChange(); }else{ if(_ede){ this.onContextMenu(evt); } } }else{ if(oCV.envParams["ui.action"]=="view"){ this._selectionAction.onMouseDown(evt); }else{ if(oCV.getStatus()=="complete"){ if((evt.button==1||evt.button==0)){ if(!this._selectionAction.onMouseDown(evt)&&!_edc.load("RenameDataItem").onMouseDown(evt)){ this.initDragAndDrop(); _edc.load("DragDrop").onMouseDown(evt); } }else{ this._selectionAction.onMouseDown(evt); } } } } },onMouseUp:function(evt){ if(this.isMobile()){ return; } var _ee0=getCrossBrowserNode(evt); try{ var _ee1=_ee0.nodeName.toLowerCase(); if(_ee1=="input"||_ee1=="textarea"){ evt.cancelBubble=true; return false; } } catch(ex){ } var _ee2=false; if(this.getViewerObject().envParams["ui.action"]=="view"){ setNodeFocus(evt); }else{ if(this.getViewerObject().getStatus()=="complete"){ _ee2|=DragDropAction_isDragging(evt); DragDropAction_onmouseup(evt); this.removeDragAndDrop(); setNodeFocus(evt); } } if(!this._selectionAction){ var oCV=this.getViewerObject(); var _ee4=oCV.getActionFactory(); this._selectionAction=_ee4.load("Selection"); } this._selectionAction.onMouseUp(evt,_ee2); clearTextSelection(); },getContainerTypeForSelection:function(){ var _ee5=this.getViewerObject(); if(_ee5){ var _ee6=_ee5.getSelectionController(); return _ee6.getDataContainerType(); } return null; },onContextMenu:function(evt){ var _ee8=this.getViewerObject(); if(_ee8.getStatus()=="complete"||this.isSavedOutput()){ var _ee9=_ee8.getContextMenu(); var _eea=CCognosViewerToolbarHelper.updateContextMenuForCurrentSelection(_ee8,_ee9); if(this.isMobile()){ var _eeb=_ee8.getSelectionController(); var _eec=_eeb.getContainerType(); var _eed=_eec==="chart"?_eeb.getChartTooltip():null; if(this.getAnnotationStore()&&this.getAnnotationStore().hasAnnotation()){ var _eee=this._genMobileCommentMenuItem(_eeb); if(_eee){ _eea.push(_eee); } var _eef=this._genMobileCommentMenuItem(); if(_eef){ var _ef0=_ee8.findBlueDotMenu(_eea); if(_ef0){ _ef0.push(_eef); } } } var _ef1={"context":{"event":evt,"viewerContext":{"displayValues":_eeb.getDisplayValues(),"chartTooltip":_eed,"containerType":_eec}},"menuItems":_eea}; if(typeof console!="undefined"&&console&&console.log){ console.log(_ef1); } this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_ef1); }else{ this.fireEvent("com.ibm.bux.widget.contextMenu.update",null,_eea); } } },_genMobileCommentMenuItem:function(_ef2){ var ctx=null; if(_ef2){ if(_ef2.getSelections().length==1){ ctx=_ef2.getSelections()[0].getCtxAttributeString(); } if(!ctx){ return null; } } var _ef4=this.getAnnotationStore().getAsJSON(ctx); if(_ef4.length>0){ return {"name":RV_RES.IDS_JS_ANNOTATIONS,"label":RV_RES.IDS_JS_ANNOTATIONS,"flatten":false,"comments":_ef4}; } return null; },initDragAndDrop:function(){ if(window.attachEvent){ document.attachEvent("onmouseup",DragDropAction_onmouseup); document.attachEvent("onmousemove",DragDropAction_onmousemove); }else{ if(document.addEventListener){ document.addEventListener("mouseup",DragDropAction_onmouseup,false); document.addEventListener("mousemove",DragDropAction_onmousemove,false); } } },removeDragAndDrop:function(){ if(window.detachEvent){ document.detachEvent("onmouseup",DragDropAction_onmouseup); document.detachEvent("onmousemove",DragDropAction_onmousemove); }else{ if(document.removeEventListener){ document.removeEventListener("mouseup",DragDropAction_onmouseup,false); document.removeEventListener("mousemove",DragDropAction_onmousemove,false); } } },onWidgetResize:function(evt){ var _ef6=evt.payload.resize; if(_ef6){ if(!this.m_visible||(this.widgetSize&&this.widgetSize.h===_ef6.h&&this.widgetSize.w===_ef6.w)){ return; } var _ef7=!this.widgetSize; this.widgetSize={h:_ef6.h,w:_ef6.w}; if(_ef7){ return; } if(!_ef6.autoResize){ this.executeAction(evt,"ResizeChart"); } var oCV=this.getViewerObject(); if(oCV&&oCV.getPinFreezeManager()){ if(_ef6.autoResize){ oCV.getPinFreezeManager().processAutoResize(_ef6.w,_ef6.h); } setTimeout(function(){ oCV.getPinFreezeManager().refresh(); },100); } if(oCV.getTabController()){ oCV.getTabController().onResize(evt); } } },getWidgetSize:function(){ return this.widgetSize; },refreshAnnotationData:function(){ return this.getAnnotationHelper().refreshAnnotationData(); },fetchAnnotationData:function(){ this.getAnnotationHelper().fetchAnnotationData(); },reportContainsDijits:function(){ var _ef9=this.getAnnotationStore(); var _efa=_ef9.getAll(); for(var key in _efa){ if(typeof _efa[key]!=="function"){ return true; } } return false; },isSaveNecessary:function(){ var _efc=false; if(this.isSavedOutput()){ var _efd=this.getAttributeValue("mostRecentSavedOutput"); var _efe=_efd==="true"||_efd===true; var _eff=this.getAttributeValue("savedOutputSearchPath"); _efc=!_efe&&_eff==null; }else{ var _f00=this.getAttributeValue("originalReport"); var _f01=this.getAttributeValue("savedReportName")||this.getAttributeValue("savedReportPath"); if(!this.isSavedReport(_f00,_f01)){ _efc=true; } } return _efc; },addAsNewComment:function(_f02,text){ this.getAnnotationHelper().addAsNewComment(_f02,text); },onWidgetActionDone:function(_f04){ if(_f04&&_f04.payload&&_f04.payload.status===true){ this.getAnnotationHelper().addNewComment(this._pendingContextId,this._pendingCellValue); } this._pendingContextId=null; this._pendingCellValue=null; },commitComment:function(_f05){ if(!_f05.isNew){ return null; } if(!_f05.isLoaded){ return this.getAnnotationHelper().commitComment(_f05); } return null; },getAnnotationStore:function(){ if(!this.annotationStore){ dojo["require"]("bux.data.AnnotationStore"); this.annotationStore=new bux.data.AnnotationStore(this,this.commitComment,this); } return this.annotationStore; },fireEvent:function(_f06,arg,_f08){ if(window.gViewerLogger){ var id=this.getViewerObject()?this.getViewerObject().getId()+" ":""; window.gViewerLogger.log(id+_f06,_f08,"json"); } this.iContext.iEvents.fireEvent(_f06,arg,_f08); },onGetFilterableItems:function(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f0b=false; var _f0c=this.getRAPCachedItem("filterableItems"); if(_f0c==null&&this.isLiveReport()&&(this.getViewerObject().getStatus()=="complete"||this.isFaultStatusWithSpec())){ this.executeAction(evt,"GetFilterableItems"); _f0b=true; }else{ if(!_f0c){ _f0c={visible:[],hidden:[]}; } if(this.isLiveReport()){ this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f0c); }else{ this.savedOutputResponseHandler("com.ibm.bux.filter.items.get.done",_f0c); } } return _f0b; })); },isFaultStatusWithSpec:function(){ var oVO=this.getViewerObject(); if(oVO.getStatus()==="fault"){ if(oVO.envParams["ui.spec"]){ return true; } } return false; },onGetFilterValues:function(oEvt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f0f=oEvt.payload; if(typeof oEvt.source!="undefined"&&typeof _f0f!="undefined"){ if(typeof _f0f.payload!="undefined"){ _f0f=_f0f.payload; } if(typeof _f0f.source=="undefined"){ _f0f.source=oEvt.source; } } var _f10=false; var _f11=this.isLiveReport(); var _f12=this.getViewerObject().getStatus(); var _f13=this.isFaultStatusWithSpec(); if(_f11&&(_f12==="complete"||_f13)){ var _f14=null; if(!_f0f.forceRefresh&&_f0f.name){ _f14=this.getRAPCachedItem("filterValues."+_f0f.name); } if(_f14){ this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f14); }else{ this.executeAction(oEvt,"GetFilterValues"); _f10=true; } }else{ if(this.getViewerObject().isWorking(_f12)){ var self=this; var _f16=function(){ self.onGetFilterValues(oEvt); }; setTimeout(_f16,10); }else{ var _f17={}; if(_f0f.name){ _f17.name=_f0f.name; } this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f17); } } return _f10; })); },onGetFilterValuesCancel:function(evt){ if(evt&&evt.payload){ var oCV=this.getViewerObject(); var _f1a=oCV.getAction("GetFilterValues"); _f1a.setRequestParms(evt); var _f1b=_f1a.getActionKey(); if(_f1b){ oCV.getViewerDispatcher().cancelRequest(_f1b); } } },savedOutputResponseHandler:function(_f1c,_f1d){ var oCV=this.getViewerObject(); var _f1f=dojo.toJson(_f1d); var _f20="window[\"oCV"+oCV.getId()+"\"].getViewerWidget().fireEvent(\""+_f1c+"\", null, "+_f1f+");"; if(oCV){ var _f21=window["oCV"+oCV.getId()]; if(typeof _f21=="object"){ setTimeout(_f20,1); } } return _f20; },handleGetFilterableItemsResponse:function(_f22){ var _f23={}; var json=this.getJsonFromResponse(_f22); if(json){ _f23=json.filterableItems; if(!_f23){ _f23={"visible":[],"invisible":[]}; } this.addToRAPCache("filterableItems",_f23); } this.fireEvent("com.ibm.bux.filter.items.get.done",null,_f23); },handleGetFilterValuesResponse:function(_f25,_f26){ var _f27={}; var json=this.getJsonFromResponse(_f25); if(json&&json.filterValues){ _f27=json.filterValues; if(_f27&&_f27.name){ this.addToRAPCache("filterValues."+_f27.name,_f27); } } if(_f26&&_f26.name&&!_f27.name){ _f27.name=_f26.name; } _f27=dojo.clone(_f27); this.fireEvent("com.ibm.bux.filter.values.get.done",null,_f27); },getJsonFromResponse:function(_f29){ var json=null; if(_f29&&_f29.m_jsonResponse&&_f29.m_jsonResponse.json){ json=dojo.eval("("+_f29.m_jsonResponse.json+")"); }else{ if(_f29&&_f29.responseText){ json=dojo.eval("["+_f29.responseText+"]"); if(json&&json[0]){ json=json[0]; } } } return json; },onContextChanged:function(evt){ if(evt){ this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f2c=false; var _f2d=dojo.clone(evt); var _f2e=this._getFilterPayload(_f2d); this.m_oWidgetContextManager.convertSelectionToSelectValueControlPayload(_f2e); this.m_oWidgetContextManager.convertGenericToSelectValueControlPayload(_f2e); var _f2f=this.getViewerObject(); var _f30=_f2f.getRAPReportInfo(); if(_f30&&(_f30.containsFilters()||_f30.hasSlider())){ var _f31=_f2e["com.ibm.widget.context"].values; var _f32=this.m_oWidgetContextManager.getItemsInItemSpecification(_f2e); var _f33=dojo.clone(_f32); for(var _f34 in _f33){ if(!_f30.isReferenced(_f34)&&_f32[_f34].values){ var mun=_f32[_f34].values[0].mun; var _f36=_f30.hunHasFilterOrSlider(mun); if(_f36&&!_f32[_f36]){ _f32[_f36]=_f32[_f34]; delete _f32[_f34]; _f31[_f36]=_f31[_f34]; delete _f31[_f34]; } } } } _f2d.payload=_f2e; _f2c=this.onGenericSelectValueControl(_f2d,true); return _f2c; }),evt.source); } },broadcastParameterChange:function(_f37){ var _f38={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f37}; this.fireEvent("com.ibm.widget.contextChanged.prompt",null,_f38); },broadcastContextChange:function(_f39){ if(this.isSelectionFilterEnabled()){ var _f3a={"clientId":this.getWidgetId(),"com.ibm.widget.context":_f39,"com.ibm.widget.context.bux.selection":{"selection":{"id":this.getWidgetId(),"valueType":"string"}}}; this.m_oWidgetContextManager.updateFilterContext(_f3a); this.m_oWidgetContextManager.setSelectionFilterObjects(null); this._fireContextChangedEvent(_f3a,true); } },onGenericDrill:function(evt){ this.m_handleDrill=false; this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(){ var _f3c=false; if(!(evt&&evt.payload)||this.isLimitedInteractiveMode()){ return _f3c; } if(evt.payload.cv_id===this.iContext.widgetId){ return _f3c; } var _f3d=this.m_oWidgetContextManager.getDrillActionType(evt.payload); var _f3e=this.m_oWidgetContextManager.genDrillSpecObjects(evt.payload); var _f3f=null; if(_f3d==="DrillDown"){ _f3f=this.getViewerObject().getAction("DrillDown"); }else{ if(_f3d==="DrillUp"){ _f3f=this.getViewerObject().getAction("DrillUp"); }else{ return _f3c; } } _f3f.setKeepFocusOnWidget(false); if(this.getViewerObject().isMetadataEmpty()||!this.shouldReportBeRunOnAction()){ _f3f.setUseReportInfoSelection(true); } if(_f3f.parseDrillSpecObjects(_f3e)){ if(!this.shouldReportBeRunOnAction()){ this.getLoadManager().getDelayedLoadingContext().setForceRunReport(true); } _f3f.execute(); _f3c=true; } this.m_handleDrill=true; return _f3c; })); },setDoGetParametersOnLoad:function(_f40){ this.m_doGetParametersOnLoad=_f40; },getDoGetParametersOnLoad:function(){ return this.m_doGetParametersOnLoad; },onPromptLegacyPayload:function(evt){ try{ if(evt.payload.cv_id===this.iContext.widgetId){ return false; } var _f42=null; this.getLoadManager().runWhenHasViewer(dojo.hitch(this,function(_f43){ _f42=false; if(this.isSavedOutput()){ return _f42; } if(this.promptParametersRetrieved===false){ var _f44=this.getViewerObject().getAction("GetParameters"); _f44.setRequestParms(evt.payload); _f44.execute(); _f42=true; }else{ _f42=this.sharePrompts(evt.payload); } return _f42; })); return _f42; } catch(e){ return false; } },sharePrompts:function(_f45){ var _f46=this.getViewerObject().getAction("SharePrompt"); _f46.setRequestParms(_f45); if(this.shouldReportBeRunOnAction()){ var _f47=this.getViewerObject().getDrillResetHUNs(_f45); if(!_f47||_f47.length===0){ return _f46.executePrompt(); }else{ var _f48={"drilledResetHUNs":_f47,"promptValues":_f46.getPromptValues()}; this.getViewerObject().executeAction("DrillReset",_f48); } return true; } var _f49=this.getLoadManager().getDelayedLoadingContext(); _f49.setPromptValues(_f46.getPromptValues()); _f49.setCascadingPromptParamsToClear(_f45.clearCascadePromptParams); return false; },onGenericPrompt:function(evt){ this.clearRAPCacheFilterValues(); this.m_oWidgetContextManager.handleIncomingPromptEvent(evt); },setPromptParametersRetrieved:function(_f4b){ this.promptParametersRetrieved=_f4b; },getEnvParam:function(_f4c){ return this.getViewerObject().envParams[_f4c]; },destroy:function(){ var _f4d=this.getViewerObject(); if(_f4d){ if(this.isSelectionFilterEnabled()){ if(this.selectionFilterSent()){ this.clearSelectionFilter(); } } if(this.onUnloadInProgress){ _f4d.destroy(false); }else{ _f4d.destroy(true); } var _f4e=function(_f4f){ if(_f4f&&_f4f.parentNode&&_f4f.parentNode.removeChild){ _f4f.parentNode.removeChild(_f4f); } }; var _f50=dojo.query("[namespaceId='"+this.getViewerId()+"'],[namespaceId='"+this.m_sScriptLoaderNamespace+"']",document.getElementsByTagName("head").item(0)); if(_f50&&_f50.length>0){ _f50.forEach(_f4e); } _f50=dojo.query("> [namespaceId=\""+this.getViewerId()+"\"]",document.getElementsByTagName("body").item(0)); if(typeof _f50!="undefined"&&_f50&&_f50.length>0){ _f50.forEach(_f4e); } if(this.getAnnotationHelper()){ this.getAnnotationHelper()._cleanupPreviousAnnotations(); } } if(this.annotationHelper){ this.annotationHelper.m_viewerIWidget=null; } this.annotationHelper=null; if(this.savedOutput){ this.savedOutput.iWidget=null; } this.savedOutput=null; if(this.m_oLoadManager){ this.m_oLoadManager.m_oWidget=null; } this.m_oLoadManager=null; if(this.m_oWidgetContextManager){ this.m_oWidgetContextManager.m_widget=null; } this.m_oWidgetContextManager=null; this.removeWindowEventListeners(); if(this.undoRedoQueue){ GUtil.destroyProperties(this.undoRedoQueue); delete this.undoRedoQueue; } GUtil.destroyProperties(this.getAnnotationStore()); delete this.getAnnotationStore(); GUtil.destroyProperties(this.savedOutput); delete this.savedOutput; delete this.m_oCV; _f4d=null; },setSavedOutputsCMResponse:function(_f51){ this.savedOutputsCMResponse=_f51; if(_f51==null){ var _f52=this.getViewerObject().getActionFactory(); var _f53=_f52.load("Snapshots"); _f53.resetMenu(); } },getSavedOutputsCMResponse:function(){ if(typeof this.savedOutputsCMResponse=="undefined"||this.savedOutputsCMResponse==null){ return null; } return this.savedOutputsCMResponse; },setSavedOutputSearchPath:function(_f54){ this.m_savedOutputSearchPath=_f54; },getSavedOutputSearchPath:function(){ if(typeof this.m_savedOutputSearchPath=="undefined"){ return null; } return this.m_savedOutputSearchPath; },initializeProperties:function(){ if(this.properties){ var _f55=this.getViewerObject(); this.properties.initialize(_f55.envParams); } },addToRAPCache:function(name,_f57){ if(!this.m_RAPCache){ this.m_RAPCache={}; } this.m_RAPCache[name]=_f57; },getRAPCachedItem:function(name){ if(this.m_RAPCache&&typeof this.m_RAPCache[name]!="undefined"){ return this.m_RAPCache[name]; } return null; },clearRAPCacheFilterValues:function(){ for(var key in this.m_RAPCache){ if(key.indexOf("filterValues.")===0){ delete this.m_RAPCache[key]; } } },clearRAPCache:function(){ this.m_RAPCache=null; },reset:function(){ this.m_bCallGetAnnotations=true; this.promptParametersRetrieved=false; this.getViewerObject().envParams["reportPrompts"]=""; this.setSavedOutputsCMResponse(null); this.getUndoRedoQueue().clearQueue(); if(this.isSelectionFilterEnabled){ this.clearSelectionFilter(); } this.m_bSelectionFilterSwitch=false; },handleFault:function(){ if(typeof console!="undefined"&&console&&console.log){ console.log("ViewrIWidget:handle fault is deprecated and should not be used anymore."); } var _f5a=this.getViewerObject(); var _f5b=new RequestHandler(_f5a); _f5b.onFault(); },disableListenToForGlobalPrompt:function(){ this.fireEvent("com.ibm.bux.widget.updateEventFilter",null,{"*":{blockedEvents:["com.ibm.widget.contextChanged.prompt"]}}); var _f5c=this.getViewerObject(); if(window.gaRV_INSTANCES){ var _f5d={}; _f5d[this.iContext.widgetId]={blockedEvents:["com.ibm.widget.contextChanged.prompt"]}; for(var _f5e=0;_f5e0){ this.m_queue.pop(); } this.m_iCurrentPos=0; }; UndoRedoQueue.prototype.getPosition=function(){ return this.m_iCurrentPos; }; UndoRedoQueue.prototype.hasBeenUsed=function(){ return this.beenUsed; }; UndoRedoQueue.prototype.getLength=function(){ return this.m_queue.length; }; UndoRedoQueue.prototype.initUndoObj=function(obj){ if(this.m_queue.length==0){ var oCV=this.m_widget.getViewerObject(); var spec=this.m_originalSpec==null?oCV.envParams["ui.spec"]:this.m_originalSpec; this.m_originalSpec=null; this.m_queue.push({"spec":spec,"parameters":oCV.getExecutionParameters(),"tooltip":obj.tooltip,"infoBar":oCV.envParams["rapReportInfo"],"widgetProperties":this.m_widget.getProperties().getOldProperties(),"hasAVSChart":oCV.hasAVSChart(),"undoType":"server"}); this.m_iCurrentPos=this.m_queue.length-1; this.beenUsed=true; } this.currentUndoObj=obj; }; UndoRedoQueue.prototype.add=function(obj){ if(this.m_bUndoRedoCalled){ this.m_bUndoRedoCalled=false; return; }else{ if(this.currentUndoObj==null){ return; }else{ if(obj.reportUpdated==true){ while(this.m_queue.length>this.m_queueLimit){ this.m_queue.shift(); } this.clearEnd(); var _fa4=this.m_widget.getViewerObject(); if(this.currentUndoObj.saveSpec==true||_fa4.envParams["ui.doNotUseConversationForUndo"]==="true"){ this.currentUndoObj.spec=_fa4.envParams["ui.spec"]; this.currentUndoObj.parameters=_fa4.getExecutionParameters(); }else{ this.currentUndoObj.conversation=_fa4.getConversation(); } if(_fa4.envParams["rapReportInfo"]){ this.currentUndoObj.infoBar=_fa4.envParams["rapReportInfo"]; } this.currentUndoObj.widgetProperties=this.m_widget.getProperties().getUndoInfo(); this.currentUndoObj.palette=_fa4.m_sPalette; if(this.m_widget.getProperties().getFlashCharts()){ this.currentUndoObj.hasAVSChart=_fa4.hasAVSChart(); } this.currentUndoObj.undoType="server"; this.finalizeAdd(); } } } }; UndoRedoQueue.prototype.addClientSideUndo=function(obj){ if(this.m_bUndoRedoCalled){ this.m_bUndoRedoCalled=false; return; } if(obj.undoCallback&&obj.redoCallback){ this.initUndoObj(obj); this.currentUndoObj.undoType="client"; this.finalizeAdd(); } }; UndoRedoQueue.prototype.finalizeAdd=function(){ this.m_queue.push(this.currentUndoObj); this.m_iCurrentPos=this.m_queue.length-1; this.m_bUndoRedoCalled=false; this.m_lastAction=""; this.currentUndoObj=null; this.beenUsed=true; }; UndoRedoQueue.prototype.moveBack=function(){ if(this.m_iCurrentPos<=0){ return null; } var _fa6=this.m_queue[this.m_iCurrentPos].undoType; this.m_bUndoRedoCalled=true; this.m_lastAction="undo"; this.m_iCurrentPos--; this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]}; if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){ this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette; if(_fa6=="client"){ return this.m_queue[this.m_iCurrentPos+1]; } var _fa7=this.m_iCurrentPos; while(_fa7>0&&this.m_queue[_fa7]&&this.m_queue[_fa7].undoType!="server"){ _fa7--; } return this.m_queue[_fa7]; } return null; }; UndoRedoQueue.prototype.moveForward=function(){ if(this.m_iCurrentPos>=this.m_queue.length){ return null; } this.m_bUndoRedoCalled=true; this.m_iCurrentPos++; this.m_lastAction="redo"; this.m_viewerState={"parameters":this.m_widget.getViewerObject().getExecutionParameters(),"spec":this.m_widget.getViewerObject().envParams["ui.spec"]}; if(typeof this.m_queue[this.m_iCurrentPos]!="undefined"){ this.m_widget.getViewerObject().m_sPalette=this.m_queue[this.m_iCurrentPos].palette; return this.m_queue[this.m_iCurrentPos]; } return null; }; UndoRedoQueue.prototype.clearEnd=function(){ while(this.m_queue.length-1>this.m_iCurrentPos){ this.m_queue.pop(); } }; UndoRedoQueue.prototype.handleCancel=function(){ if(this.m_lastAction=="undo"){ this.m_iCurrentPos++; }else{ if(this.m_lastAction=="redo"){ this.m_iCurrentPos--; } } if(this.m_lastAction=="redo"||this.m_lastAction=="undo"){ var _fa8=this.m_widget.getProperties(); var _fa9=this.m_queue[this.m_iCurrentPos]; if(_fa8&&_fa9&&_fa9.widgetProperties){ _fa8.doUndo(_fa9.widgetProperties); } } this.m_lastAction=""; this.m_bUndoRedoCalled=false; this.currentUndoObj=null; }; UndoRedoQueue.prototype.handleFault=function(){ this.currentUndoObj=null; this.m_bUndoRedoCalled=false; }; UndoRedoQueue.prototype.getUndoTooltip=function(){ if(this.m_iCurrentPos>0){ return RV_RES.IDS_JS_UNDO+" "+this.m_queue[this.m_iCurrentPos].tooltip; } return RV_RES.IDS_JS_UNDO; }; UndoRedoQueue.prototype.getRedoTooltip=function(){ if(this.m_iCurrentPos<(this.m_queue.length-1)){ return RV_RES.IDS_JS_REDO+" "+this.m_queue[this.m_iCurrentPos+1].tooltip; } return RV_RES.IDS_JS_REDO; }; function CIWidgetSavedOutput(_faa){ this.iWidget=_faa; this.bContainsChart=false; this.bContainsDrillThrough=false; this.bPagedOutput=true; }; CIWidgetSavedOutput.prototype.getIWidget=function(){ return this.iWidget; }; CIWidgetSavedOutput.prototype.isPagedOutput=function(){ return this.bPagedOutput; }; CIWidgetSavedOutput.prototype.setPagedOutput=function(_fab){ this.bPagedOutput=_fab; }; CIWidgetSavedOutput.prototype.getCognosViewer=function(){ return this.getIWidget().getViewerObject(); }; CIWidgetSavedOutput.prototype.getIframeWindow=function(){ return this.savedOutputWindow; }; CIWidgetSavedOutput.prototype.getSavedOutputDiv=function(){ return this.savedOutputDiv; }; CIWidgetSavedOutput.prototype.render=function(){ if(this.isPagedOutput()&&this.getFirstPage()){ this.currentPageIndex=0; this._showPages([this.getFirstPage()]); }else{ if(this.tabbedSavedOutput&&this.currentPageIndex&&this.pageNodes){ var _fac=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); this.switchSavedOutputTab(_fac); }else{ if(this.getCognosViewer()&&this.getCognosViewer().getCurrentlySelectedTab()){ this.switchSavedOutputTab(this.getCognosViewer().getCurrentlySelectedTab()); }else{ this.showHTMLFragment(this.getIframeWindow().document.body.innerHTML); } } } }; CIWidgetSavedOutput.prototype.outputDoneLoading=function(){ if(window["gReportWidgetLoadQueue"]){ window["gReportWidgetLoadQueue"].widgetDoneLoading(this.getIWidget()); } this.getIWidget().setOriginalFormFields(null); var _fad=this.getCognosViewer(); var _fae=_fad.getId(); this.savedOutputWindow=dojo.byId("CVHiddenIFrame"+_fae).contentWindow; this.savedOutputDiv=dojo.byId("CVSavedOutputDiv"+_fae); var sc=_fad.getSelectionController(); if(!sc.hasContextData()&&this.savedOutputWindow.onLoadEvent){ this.savedOutputWindow.onLoadEvent(); } this._populatePageNode(); var _fb0=dojo.byId("_"+this.iWidget.iContext.widgetId+"_cv"); this.loadStyleInfoFromIframe(_fb0); this.bContainsChart=typeof this.savedOutputWindow.displayChart=="function"?true:false; this.bContainsDrillThrough=typeof this.savedOutputWindow.drillThroughTarget!="undefined"?true:false; this.render(); this.getMetaDataFromIFrame(); if(this.bContainsDrillThrough){ window[_fae+"drillTargets"]=this.getIframeWindow().drillTargets; } _fad.fillInContextData(); _fad.updateBorderCollapse(); this.getIWidget().updateToolbar(); _fad.setReportRenderingDone(true); var _fb1=GUtil.generateCallback(this.getIWidget().fetchAnnotationData,[],this.getIWidget()); var _fb2=this.getPageContextData(_fb1); if(_fb2==0){ this.getIWidget().fetchAnnotationData(); } this.fixDuplicateFormFields(); this.getIWidget().getLoadManager().processQueue(); delete _fad.envParams["cv.outputKey"]; this.getIWidget().setXNodeId(null); var _fb3=this.getIWidget(); var _fb4=function(){ _fb3.iContext.iEvents.fireEvent("com.ibm.bux.widget.render.done",null,{}); _fad.renderTabs(); if(_fad.getCurrentlySelectedTab()!=null){ _fb3.getSavedOutput().tabbedSavedOutput=true; _fb3.getSavedOutput().switchSavedOutputTab(_fad.getCurrentlySelectedTab()); } }; setTimeout(_fb4,100); }; CIWidgetSavedOutput.prototype._populatePageNode=function(){ this.pageNodes=[]; var node=this.getIframeWindow().document.body.firstChild; while(node){ if(node.nodeName.toLowerCase()=="table"){ this.pageNodes.push(node); } node=node.nextSibling; } }; CIWidgetSavedOutput.prototype.switchSavedOutputTab=function(_fb6,_fb7){ if(!this.pageNodes){ return; } if(_fb7){ if(!this.lastVisitedPage){ this.lastVisitedPage={}; } if(this.isPagedOutput()){ var _fb8=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); this.lastVisitedPage[_fb8]=this.currentPageIndex; if(this.lastVisitedPage[_fb6]){ this.currentPageIndex=this.lastVisitedPage[_fb6]; this._showPages([this.pageNodes[this.currentPageIndex]]); return; } } } var _fb9=[]; for(var i=0;i0){ if(_fbc[name].length>1){ var _fbf=_fbc[name][_fbc[name].length-1].value; while(_fbc[name].length>1){ _fbc[name][1].parentNode.removeChild(_fbc[name][1]); } if(_fbc[name][0]){ _fbc[name][0].value=_fbf; } _fbc[name].value=_fbf; } } } } }; CIWidgetSavedOutput.prototype.getPageContextData=function(_fc0){ var _fc1={}; dojo.query("[ctx]",this.getSavedOutputDiv()).forEach(function(item){ var ctx=item.getAttribute("ctx"); var _fc4=ctx.split(":"); for(var i=0;i<_fc4.length;i++){ var _fc6=_fc4[i]; if(_fc6&&_fc6.length>0){ _fc1[_fc6]=true; } } }); var _fc7=[]; for(var item in _fc1){ _fc7.push(item); } return this.getCognosViewer().getSelectionController().fetchContextData(_fc7,_fc0); }; CIWidgetSavedOutput.prototype.loadStyleInfoFromIframe=function(_fc9){ var _fca=null; var _fcb=this.savedOutputWindow.document; for(var _fcc=0;_fcc<_fcb.childNodes.length;_fcc++){ if(_fcb.childNodes[_fcc].childNodes&&_fcb.childNodes[_fcc].childNodes.length>0){ _fca=_fcb.childNodes[_fcc]; break; } } window.gScriptLoader.loadStyles(_fca.firstChild,this.iWidget.getViewerId()); var _fcd=dojo.query("link",_fca); var _fce=""; for(i=0;i<_fcd.length;i++){ var href=_fcd[i].getAttribute("href"); if(href){ _fce+=""; } } window.gScriptLoader.loadCSS(_fce,_fc9,true,this.iWidget.getViewerId()); }; CIWidgetSavedOutput.prototype.getFirstPage=function(){ return this.pageNodes[0]; }; CIWidgetSavedOutput.prototype.getLastPage=function(){ return this.pageNodes?this.pageNodes[this.pageNodes.length-1]:null; }; CIWidgetSavedOutput.prototype.writeNavLinks=function(){ var _fd0=""; if(this.isPagedOutput()){ if(this.tabbedSavedOutput&&!isNaN(this.currentPageIndex)){ var _fd1=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); if(this.currentPageIndex>0&&this.pageNodes[this.currentPageIndex-1].getAttribute("tabid")==_fd1){ _fd0+=" firstPage previousPage "; } if(this.currentPageIndex<(this.pageNodes.length-1)&&this.pageNodes[this.currentPageIndex+1].getAttribute("tabid")==_fd1){ _fd0+=" nextPage lastPage "; } }else{ if(this.currentPageIndex>0){ _fd0+=" firstPage previousPage "; } if(this.currentPageIndex<(this.pageNodes.length-1)){ _fd0+=" nextPage lastPage "; } } } this.getCognosViewer().writeNavLinks(_fd0,true); }; CIWidgetSavedOutput.prototype.pageAction=function(_fd2){ switch(_fd2){ case "firstPage": if(this.tabbedSavedOutput){ var _fd3=this.pageNodes[this.currentPageIndex].getAttribute("tabid"); for(var i=0;i0&&aM[0].indexOf("'_THIS_'")>0){ this.bOldOutput=false; }else{ this.bOldOutput=true; var _fe2=""; var quot="'"; if(aM.length>0){ _fe2=aM[0].charAt(aM[0].length-1); } if(_fe2=="'"){ quot="\""; } for(var i=0;i=0){ var _fe9=_fe8.indexOf("content"); var _fea=_fe8.substring(0,_fe9); _fe5=_fe5.replace(/src\=\"images\//g,"src=\""+_fea+"images/"); } _fe5=this.fixupChartUseMapValue(_fe5); return _fe5.replace(/displayChart[^;].*;|var graphicSrc[^;].*;|var graphicName[^;].*;/g,""); }; CIWidgetSavedOutput.prototype.fixupChartUseMapValue=function(_feb){ var re=/usemap\s*=\s*"*#(\w+)"*/gi; var _fed,_fee=[]; while((_fed=re.exec(_feb))){ _fee.push(_fed[1]); } for(var i=0;i<_fee.length;i++){ var _ff0=new RegExp(_fee[i],"g"); _feb=_feb.replace(_ff0,_fee[i]+this.getCognosViewer().getId()); } return _feb; }; CIWidgetSavedOutput.prototype.showHTMLFragment=function(_ff1){ if(this.bContainsChart){ _ff1=this.processChart(_ff1); } _ff1=this.processDrillThrough(_ff1); _ff1=_ff1.replace(/_THIS_/g,this.getCognosViewer().getId()); this.getIWidget().loadStylesAndScripts(_ff1,this.getSavedOutputDiv(),false); this.getIWidget().reselectSelectionFilterObjects(); this.getIWidget().addChromeWhitespaceHandler(this.getCognosViewer().getId()); }; function gInitializeViewer(obj){ if(window.gScriptLoader.hasCompletedExecution()){ var _ff3=obj.getViewerObject(); if(_ff3&&_ff3.inlineScriptsDoneExecuting==true){ clearInterval(obj.timer); if(typeof _ff3.errorOccured!="undefined"){ obj.fireEvent("com.ibm.bux.widget.render.done",null,{}); }else{ if(typeof _ff3.getToolbar()!="undefined"){ _ff3.setViewerWidget(obj); if(obj.isSelectionFilterEnabled()){ obj.updateDrillThroughLinks(); } if(obj.isDashboardOwner()){ _ff3.addReportInfo(); } if(obj.promptParametersRetrieved==true){ var _ff4=obj.getAttributeValue("viewerReportPrompts"); _ff3.envParams["reportPrompts"]=_ff4; }else{ if(_ff3.envParams&&_ff3.envParams["widget.promptParametersRetrievedOnDrop"]=="true"){ obj.promptParametersRetrieved=true; } } var _ff5=obj.getAttributeValue("syncNewWidgets"); if(_ff5===null||_ff5==="true"){ _ff5=true; }else{ _ff5=false; } if(!_ff5&&(obj.isPastedWidget()||obj.isOpeningSavedDashboard()==false)){ obj.disableListenToForEvent(["com.ibm.widget.contextChanged.drill","com.ibm.widget.contextChanged.prompt","com.ibm.widget.contextChanged"]); } obj.fireEvent("com.ibm.bux.widget.setShowBordersWhenInnactive",null,(_ff3.m_flashChartsObjectIds.length!==0)); } } } } }; function gVWEvent(sId,evt,_ff8){ var oCV=window["oCV"+sId]; if(oCV){ oCV.loadExtra(); var _ffa=oCV.getViewerWidget(); if(_ffa){ _ffa[_ff8](evt); } } }; function ReportWidgetLoadQueue(_ffb){ this._concurrentLoadSetting=_ffb; this._widgetsRunning=[]; this._queue=[]; }; ReportWidgetLoadQueue.prototype.add=function(_ffc){ this._queue.push(_ffc); this.loadNextWidget(); }; ReportWidgetLoadQueue.prototype.widgetDoneLoading=function(_ffd){ for(var i=0;i0){ text+=" - "+enforceTextDir(_100c); } return text; }; CognosViewerCellAnnotation.prototype.hasAnnotaionsOnSelectedCell=function(){ var _1010=this.getSelections(); if(_1010&&_1010.length==1){ var _1011=_1010[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_1011); var _1013=this.getCognosViewer().getViewerWidget(); if(_1013){ var _1014=_1013.getAnnotationStore(); if(_1014){ var _1015=_1014.get(ctxId); if(_1015&&_1015.length>0){ return true; } } } } return false; }; CognosViewerCellAnnotation.prototype.getChangeableAnnotation=function(){ var _1016=this.getSelections(); if(_1016&&_1016.length==1){ var _1017=_1016[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_1017); var _1019=this.getCognosViewer().getViewerWidget(); if(_1019){ var _101a=_1019.getAnnotationStore(); if(_101a){ return _101a.getChangeableAnnotation(ctxId); } } } return null; }; CognosViewerCellAnnotation.prototype.hasValidContextOnSelectedCell=function(){ var _101b=this.getSelections(); if(_101b&&_101b.length==1){ var _101c=_101b[0].getCellRef(); var ctxId=this.getCognosViewer().findCtx(_101c); if(ctxId){ var ids=AnnotationCTXLookup.generateIDArrayFromCellCtxValue(ctxId); for(var i=0;i0){ _1025=enforceTextDir(_1025); text+=" - "+_1025; } return text; }; CognosViewerWidgetAnnotation.prototype.hasWidgetLevelAnnotations=function(){ var _1027=false; var _1028=this.getCognosViewer().getViewerWidget(); if(_1028){ var _1029=_1028.getAnnotationStore(); var _102a=_1029.get(_1029.WIDGET_CONTEXT); if(_102a&&_102a.length>0){ _1027=true; } } return _1027; }; CognosViewerWidgetAnnotation.prototype.getWidgetLevelChangeableAnnotation=function(){ var _102b=this.getCognosViewer().getViewerWidget(); if(_102b){ var _102c=_102b.getAnnotationStore(); if(_102c){ return _102c.getChangeableAnnotation(_102c.WIDGET_CONTEXT); } } return null; }; CognosViewerWidgetAnnotation.prototype.hasValidSelection=function(_102d){ var _102e=this.m_oCV.getSelectionController(); var _102f=_102e.getSelections(); var _1030=false; if(_102e.hasSelectedChartNodes()){ _1030=(_102e.getSelectedChartNodes()[0].m_contextIds.length>0); } return (_102d==="widgetActions")||(_102f.length!=1&&!_1030); }; function NewWidgetAnnotation(){ }; NewWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); NewWidgetAnnotation.prototype.isEnabled=function(_1031){ return this.areAnnotationsEnabled()&&(_1031!=="contextMenu")&&this.hasValidSelection(_1031); }; NewWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_NEW; }; NewWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "NewWidgetAnnotation"; }; function EditWidgetAnnotation(){ }; EditWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); EditWidgetAnnotation.prototype.isEnabled=function(_1032){ return (this.areAnnotationsEnabled()&&(_1032!=="contextMenu")&&this.hasValidSelection(_1032)&&this.getWidgetLevelChangeableAnnotation())?true:false; }; EditWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_EDIT; }; EditWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "EditWidgetAnnotation"; }; function DeleteWidgetAnnotation(){ }; DeleteWidgetAnnotation.prototype=new CognosViewerWidgetAnnotation(); DeleteWidgetAnnotation.prototype.isEnabled=function(_1033){ return (this.areAnnotationsEnabled()&&(_1033!=="contextMenu")&&this.hasValidSelection(_1033)&&this.getWidgetLevelChangeableAnnotation())?true:false; }; DeleteWidgetAnnotation.prototype.getMenuItemBaseString=function(){ return RV_RES.IDS_JS_WIDGET_ANNOTATION_DELETE; }; DeleteWidgetAnnotation.prototype.getMenuItemIconClass=function(){ return "DeleteWidgetAnnotation"; }; function AnnotationCTXLookup(_1034){ this.m_ccdManager=_1034; this.m_md=this.m_ccdManager.m_md; this.m_cd=this.m_ccdManager.m_cd; this.m_RDIVALUE_KEY="annotationHook"; this.m_oContextDetailsMap={}; }; AnnotationCTXLookup.prototype.populateCtxDetailsForAllAnnotations=function(_1035){ for(var i=0,len=_1035.length;i=2&&_1054[this.m_RDIVALUE_KEY][2]){ rdi=_1054[this.m_RDIVALUE_KEY][2]; } return this._compareWithoutNS(_1052.rdi,rdi); }else{ return false; } }else{ return _1051===id; } }; AnnotationCTXLookup.prototype._compareWithoutNS=function(rdi1,rdi2){ if(!rdi1||!rdi2){ return false; } if(rdi1!==rdi2){ var _1058=rdi2.indexOf("].["); if(_1058>0){ return rdi1.lastIndexOf(rdi2.substr(_1058))>0; } return false; } return true; }; AnnotationCTXLookup.prototype.isAnnotatedCell=function(_1059,_105a){ if(!_1059||!_1059.ctx||!_105a){ return false; } this._populateCtxDetailsForOneCtxValue(_105a); var _105b=this.generateIDArrayFromCellCtxValue(_1059.ctx); var _105c=this.generateIDArrayFromCellCtxValue(_105a); if(!this.isAnnotatedId(_105b[0],_1059,_105c[0])){ return false; } var _105d=this._generateDataItemIDArrayFromAnnotationIDs(_105b); var _105e=this._generateDataItemIDArrayFromCellIDs(_105c); if(_105d.length>_105e.length){ return false; } for(var i=0,len=_105d.length;i\n\t
\n\t
\n\n",title:"",text:"",linkText:null,linkScript:null,constructor:function(args){ if(args.focusElement){ dojo.connect(args.focusElement,"onfocus",this,"_onHover"); dojo.connect(args.focusElement,"onblur",this,"_onUnHover"); } },createMarkup:function(){ var _1072=this.connectId+"_linkId"; var _1073=dojo.isIE||dojo.isTrident?"\"#\"":"\"javascript:void(0);\""; var _1074=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; _1074+=""; if(this.linkScript){ _1074+=""; }else{ _1074+=""; } _1074+=""; _1074+="
"; _1074+=html_encode(this.title); _1074+="
"; _1074+=html_encode(this.text); _1074+="
"; _1074+=""+html_encode(this.linkText)+""; _1074+="
"; return _1074; }}); dojo.provide("ViewerIWidgetInlineDialog"); dojo.require("dijit._base.focus"); dojo.declare("ViewerIWidgetInlineDialog",null,{constructor:function(oCV,sHTML,_1077,_1078){ this.initialize(oCV,sHTML); this.m_aButtons=_1077; this.m_sButtonContainerId=_1078; },initialize:function(oCV,sHTML){ this.m_oCV=oCV; this.m_html=sHTML; this.m_viewerDiv=dojo.byId("RVContent"+this.m_oCV.getId()); this.positionOptions={horizontal:"center",vertical:"center"}; this.onScrollHandle=null; this.m_dialogDiv=null; if(this.m_oCV.getViewerWidget){ this.m_background=this.m_oCV.getViewerWidget().getReportBlocker(); } },setVerticalPositionOption:function(_107b){ this.positionOptions.vertical=_107b; },getDialogDiv:function(){ return this.m_dialogDiv; },initializeDialog:function(){ this.m_dialogDiv=document.createElement("div"); dojo.addClass(this.m_dialogDiv,"inlineDialog"); this.m_dialogDiv.style.display="none"; this.m_dialogDiv.innerHTML=this.m_html; dojo.place(this.m_dialogDiv,this.m_background.getNode().nextSibling,"before"); var _107c=dojo.byId(this.m_sButtonContainerId); if(_107c&&this.m_aButtons&&this.m_aButtons.length>0){ dojo.forEach(this.m_aButtons,function(_107d){ var span=document.createElement("span"); _107c.appendChild(span); var _107f=new dijit.form.Button(_107d,span); }); } },createBackgroundTabCatchDiv:function(){ if(this.m_tabCatch==null){ this.m_tabCatch=dojo.byId("BACKGROUND_TABCATCH"+this.m_oCV.getId()); if(!this.m_tabCatch){ this.m_tabCatch=document.createElement("div"); this.m_tabCatch.id="BACKGROUND_TABCATCH"+this.m_oCV.getId(); this.m_tabCatch.style.display="none"; this.m_tabCatch.style.position="absolute"; this.m_tabCatch.style.left="0"; this.m_tabCatch.style.top="0"; this.m_tabCatch.style.height="0px"; this.m_tabCatch.style.width="0px"; this.m_tabCatch.setAttribute("tabIndex","0"); if(this.m_viewerDiv.firstChild){ dojo.place(this.m_tabCatch,this.m_viewerDiv.firstChild,"before"); }else{ this.m_viewerDiv.appendChild(this.m_tabCatch); } } } },initializeBackground:function(){ this.createBackgroundTabCatchDiv(); },initializeKeyboardSupport:function(){ var _1080=dijit._getTabNavigable(this.m_dialogDiv); var _1081=_1080.lowest||_1080.first; var _1082=_1080.last||_1080.highest||_1081; if(_1081){ this.m_tabCatch.onfocus=function(){ dijit.focus(_1081); }; this.m_background.getNode().onfocus=function(){ dijit.focus(_1081); }; } if(_1082&&_1081){ _1082.onblur=function(){ dijit.focus(_1081); }; }else{ if(_1081){ _1081.onblur=function(){ dijit.focus(_1081); }; } } if(this.m_oCV.getKeepFocus()!=false&&_1081&&_1081.focus){ _1081.focus(); } },show:function(){ this.m_oCV.setVisibleDialog(this); if(this.m_tabCatch==null){ this.initializeBackground(); } if(this.m_dialogDiv==null){ this.initializeDialog(); } this.m_background.setClassNameOverride("inlineDialog-background-error"); this.m_background.show(); this.m_tabCatch.style.display="block"; this.m_dialogDiv.style.display="block"; this.initializeKeyboardSupport(); },hide:function(){ this.m_oCV.setVisibleDialog(null); if(this.onScrollHandle!=null){ dojo.disconnect(this.onScrollHandle); this.onScrollHandle=null; } if(this.m_background!=null){ this.m_background.hide(); } if(this.m_tabCatch!=null){ this.m_tabCatch.style.display="none"; } if(this.m_dialogDiv!=null){ this.m_dialogDiv.style.display="none"; } },destroy:function(){ this.hide(); if(this.m_dialogDiv!=null){ this.m_dialogDiv.parentNode.removeChild(this.m_dialogDiv); this.m_dialogDiv=null; } if(this.m_tabCatch!=null){ this.m_tabCatch.parentNode.removeChild(this.m_tabCatch); this.m_tabCatch=null; } if(this.m_background!=null){ this.m_background.destroy(); this.m_background=null; } },setDebugHelper:function(_1083){ var _1084=document.createElement("div"); _1084.style.zIndex="100"; _1084.style.display="block"; _1084.style.position="relative"; _1084.style.backgroundColor="#FFFFFF"; _1084.innerHTML="
"+"show"+" "+"hide
"; document.body.insertBefore(_1084,document.body.firstChild); }}); dojo.provide("bux.reportViewer.Properties"); dojo.declare("bux.reportViewer.Properties",null,{iWidget:null,masterDialogSpec:null,masterDialogSpecProperties:null,flashChartSpec:null,isFlashChartOptionEnabled:true,oldProperties:null,dialogDisplayValues:null,constructor:function(_1085,_1086){ this.isInitialized=false; this.initializeDialogDisplayValues(); this.oldProperties={}; this.iWidget=_1085; if(_1086===""){ return; } var json=dojo.eval("["+_1086+"]"); if(json&&json[0]){ this.initializeWithSavedPropertyValues(json[0]); } },initializeDialogDisplayValues:function(){ this.dialogDisplayValues={flashCharts:{value:null,canUndo:true,runReport:true},rowsPerPage:{value:null,canUndo:true,runReport:true},promptUserOnLoad:{value:false},retrieveAll:{value:false,refreshSavedOutput:true},showExpandCollapseIcon:{value:null}}; },clearDialogSpec:function(){ this.masterDialogSpec=null; this.masterDialogSpecProperties=null; },initializeWithSavedPropertyValues:function(_1088){ for(var prop in _1088){ if(typeof prop!="undefined"&&prop!=null){ if(this.dialogDisplayValues[prop]){ this.dialogDisplayValues[prop].value=_1088[prop]; }else{ this.dialogDisplayValues[prop]={value:_1088[prop],canUndo:false}; } } } },setProperty:function(_108a,value){ this.dialogDisplayValues[_108a].value=value; },getProperty:function(_108c){ if(this.dialogDisplayValues[_108c]){ return this.dialogDisplayValues[_108c].value; } return null; },getOldProperty:function(_108d){ if(this.oldProperties&&this.oldProperties[_108d]){ return this.oldProperties[_108d].value; } return null; },getOldProperties:function(){ var _108e={}; for(var prop in this.oldProperties){ if(this.dialogDisplayValues[prop].canUndo===true){ _108e[prop]={}; _108e[prop].value=this.oldProperties[prop].value; } } return _108e; },onGet:function(){ this.copyPropertyValues(this.dialogDisplayValues,this.oldProperties); if(!this.masterDialogSpec){ this.initializeDialogSpec(); }else{ this.updateDialogSpec(); } var _1090={tabTitle:this._getReportWidgetTabTitle(),properties:this.dialogDisplayValues,propertiesDialogSpec:this.masterDialogSpec}; return _1090; },_getReportWidgetTabTitle:function(){ var _1091; if(this.iWidget&&this.iWidget.getViewerObject()){ _1091=RV_RES.IDS_REPORT_WIDGET_PROPERTY_TAB_TITLE; } return _1091; },onSet:function(_1092){ if(this.isSavedOutput()){ this.updateSavedOutput(); }else{ if(!this.runReportWithNewOptions()){ this._updateReport(); } } },_updateReport:function(){ var _1093=this.getProperty("showExpandCollapseIcon"); if(this.getOldProperty("showExpandCollapseIcon")!=_1093){ var oCV=this.iWidget.getViewerObject(); if(_1093===true){ oCV.insertExpandIconsForAllCrosstabs(); }else{ oCV.removeExpandIconsForAllCrosstabs(); } } },copyPropertyValues:function(from,to){ for(var prop in from){ if(!to[prop]){ to[prop]={}; } to[prop].value=from[prop].value; } },doUndo:function(_1098){ this.copyPropertyValues(_1098,this.dialogDisplayValues); },getUndoInfo:function(){ if(!this.isInitialized){ var oCV=this.iWidget.getViewerObject(); this.initialize(oCV.envParams); } var _109a={}; for(var prop in this.dialogDisplayValues){ if(this.dialogDisplayValues[prop].canUndo===true){ _109a[prop]={value:this.getProperty(prop)}; } } return _109a; },shouldUpdateReport:function(_109c){ for(var prop in this.dialogDisplayValues){ if(this.dialogDisplayValues[prop][_109c]==true&&this.getOldProperty(prop)!=this.getProperty(prop)){ return true; } } return false; },runReportWithNewOptions:function(){ if(this.shouldUpdateReport("runReport")){ var oCV=this.iWidget.getViewerObject(); var _109f=oCV.getAction("RunReport"); _109f.setReuseQuery(true); _109f.execute(); this.iWidget.getUndoRedoQueue().initUndoObj({"tooltip":this.getUndoHint(),"saveSpec":this.saveSpecForUndo()}); return true; } return false; },updateSavedOutput:function(){ if(this.shouldUpdateReport("refreshSavedOutput")){ var _10a0=this.iWidget.getSavedOutput(); _10a0.setPagedOutput(!this.getRetrieveAll()); _10a0.render(); } },toString:function(){ var str="{"; for(var prop in this.dialogDisplayValues){ var _10a3=this.getProperty(prop); if(_10a3!=null&&typeof _10a3!=="undefined"){ if(str!="{"){ str+=", "; } str+="\""+prop+"\": "; str+=(typeof (_10a3)=="string")?_10a3.toString():dojo.toJson(_10a3); } } str+="}"; return str; },isSavedOutput:function(){ return this.iWidget.getViewerObject().envParams["ui.action"]==="view"; },getUndoHint:function(){ return RV_RES.IDS_JS_WIDGET_PROPERTIES; },saveSpecForUndo:function(){ return false; },getRetrieveAll:function(){ return this.getProperty("retrieveAll"); },getPromptUserOnLoad:function(){ return this.getProperty("promptUserOnLoad"); },getFlashCharts:function(){ return this.getProperty("flashCharts"); },getRowsPerPage:function(){ return this.getProperty("rowsPerPage"); },getOriginalReportLocation:function(_10a4){ if(_10a4.getAttributeValue&&!_10a4.getAttributeValue("originalReport")){ return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE; } var _10a5=_10a4.getViewerObject().envParams["originalReportLocation"]; if(typeof _10a5=="undefined"||_10a5==null||_10a5=="Unavailable"){ return RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION_UNAVAILABLE; } return (RV_RES.IDS_JS_PROPERTY_ORIGINAL_REPORT_LOCATION+" "+_10a5); },getShowExpandCollapseIconFlag:function(){ return this.getProperty("showExpandCollapseIcon"); },getAdvancedServerProperty:function(_10a6){ if(!this.iWidget&&!this.iWidget.getViewerObject()){ return null; } return this.iWidget.getViewerObject().getAdvancedServerProperty(_10a6); },initializeShowExpandCollapseIconFlag:function(){ var _10a7=this.getAdvancedServerProperty("VIEWER_JS_EXPAND_COLLAPSE_CONTROLS_DEFAULT"); this.bHideExpandCollapseOption=(!_10a7); if(this.bHideExpandCollapseOption){ return; } if(this.getShowExpandCollapseIconFlag()===null){ this.setProperty("showExpandCollapseIcon",_10a7.toLowerCase()==="on"); } },initialize:function(_10a8){ if(this.isInitialized){ return; } this.isInitialized=true; this.initializeFlashChartSettings(_10a8.flashChartOption); this.initializeShowExpandCollapseIconFlag(); if(this.getRowsPerPage()==null){ if(_10a8["run.verticalElements"]!=null){ this.setProperty("rowsPerPage",_10a8["run.verticalElements"]); }else{ this.setProperty("rowsPerPage",20); } } this.initializeDialogSpec(); },createViewReportSpecLink:function(){ var oCV=this.iWidget.getViewerObject(); var _10aa=oCV.envParams["ui.spec"]; if(oCV.bCanUseReportStudio&&_10aa&&_10aa.length>0&&oCV.envParams["ui.action"]!="view"){ return {columns:[{propertyName:"viewReportSpecification",uiElementType:"link",label:RV_RES.IDS_JS_SHOW_REPORT_SPEC,eventHandler:this,onClickAction:dojo.hitch(this,this.onClickViewReportSpecification)}]}; }else{ return {}; } },isBlackListedOption:function(_10ab){ return this.iWidget.getViewerObject().isBlacklisted(_10ab); },createFlashChartOption:function(){ var _10ac=[{columns:[{propertyName:"flashCharts",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_FLASHCHARTS}]},{columns:[{uiElementType:"hSpacer"}]}]; return _10ac; },getShowExpandCollapseIconOptionSpec:function(){ var spec=[{columns:[{propertyName:"showExpandCollapseIcon",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_SHOW_EXPAND_COLLAPSE_ICON}]},{columns:[{uiElementType:"hspacer"}]}]; return spec; },generateDialogSpec:function(role){ var _10af; if(role=="consume"){ _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE}]}]; this.masterDialogSpec={rows:_10af}; }else{ var _10b0=this.createViewReportSpecLink(); _10af=[{columns:[{propertyName:"rowsPerPage",uiElementType:"textBox",type:"number",label:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE,constraints:{min:1,max:1000},required:true,invalidMessage:RV_RES.IDS_JS_PROPERTY_ROWS_PER_PAGE_ERROR}]},{columns:[{uiElementType:"hspacer"}]},{columns:[{propertyName:"promptUserOnLoad",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_PROMPT_ON_LOAD}]},{columns:[{propertyName:"retrieveAll",uiElementType:"checkBox",label:RV_RES.IDS_JS_PROPERTY_RETRIEVE_ENTIRE_REPORT}]},_10b0,{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]}]; if(this.isFlashChartOptionEnabled&&!this.hasAVSChart()&&role!=="consume"){ var _10b1=this.createFlashChartOption(); _10af=_10b1.concat(_10af); } if(!this.bHideExpandCollapseOption&&!this.isBlackListedOption("ExpandMember")){ _10af=this.getShowExpandCollapseIconOptionSpec().concat(_10af); } this.masterDialogSpec={rows:_10af}; } if(this.masterDialogSpec&&this.masterDialogSpec.rows){ this.masterDialogSpecProperties={}; for(var r in this.masterDialogSpec.rows){ var row=this.masterDialogSpec.rows[r]; if(row.columns){ for(var c in row.columns){ var col=row.columns[c]; if(col.propertyName){ this.masterDialogSpecProperties[col.propertyName]=col; } } } } } },updateDialogSpec:function(){ if(this.masterDialogSpecProperties){ if(this.masterDialogSpecProperties.originalReportLocation){ this.masterDialogSpecProperties.originalReportLocation.label=this.getOriginalReportLocation(this.iWidget); } } },initializeDialogSpec:function(){ var _10b6=this.iWidget.getUserRole(); this.generateDialogSpec(_10b6); },hasAVSChart:function(){ if(this.iWidget==null||typeof this.iWidget.getViewerObject()=="undefined"){ return false; } var oCV=this.iWidget.getViewerObject(); if(typeof oCV=="undefined"){ return false; } return oCV.hasAVSChart(); },initializeFlashChartSettings:function(value){ if(!value){ return; } var json=(typeof value==="string")?(eval(value)):value; var _10ba=json[0]; this.setProperty("flashCharts",_10ba.defaultValue); this.isFlashChartOptionEnabled=!_10ba.isOptionDisabled; },onClickViewReportSpecification:function(){ var _10bb=this.iWidget.getViewerObject().envParams["ui.spec"]; this._viewSpecInWindow(_10bb); },_getWindowOptions:function(w,h){ var _10be="resizable=yes,scrollbars=yes,menubar=no,directories=no,location=no,status=no,toolbar=no,titlebar=no"; var left=(screen.width-w)/2; var top=(screen.height-h)/2; _10be+=",top="+top; _10be+=",left="+left; _10be+=",width="+w; _10be+=",height="+h; return _10be; },_viewSpecInWindow:function(_10c1){ var _10c2=dijit.getViewport(); var _10c3="debugWindow"+this.iWidget.getViewerObject().getId(); var _10c4=this._getWindowOptions(_10c2.w,_10c2.h); var _10c5=window.open("",_10c3,_10c4); var head=""+"
"+"
"; _10c5.document.write(head+html_encode(_10c1)+tail); }}); dojo.require("bux.reportViewer.Properties"); dojo.provide("ActiveReportIWidgetProperties"); dojo.declare("ActiveReportIWidgetProperties",[bux.reportViewer.Properties],{initializeDialogDisplayValues:function(){ this.dialogDisplayValues={activeReportState:{value:null,canUndo:false,runReport:false}}; },getActiveReportState:function(){ return this.getProperty("activeReportState"); },setActiveReportState:function(_10c8){ this.setProperty("activeReportState",_10c8); },initialize:function(_10c9){ if(this.isInitialized){ return; } this.isInitialized=true; this.initializeDialogSpec(); },initializeDialogSpec:function(){ var _10ca=[{columns:[{propertyName:"originalReportLocation",uiElementType:"text",label:this.getOriginalReportLocation(this.iWidget),allowWrapping:true}]},{columns:[{propertyName:"ActiveReportOutputVersion",uiElementType:"text",label:this._getAcitveReportOutputVersion(this.iWidget),allowWrapping:true}]}]; if(this.iWidget.isDebugMode()){ _10ca.push({columns:[{propertyName:"PublicVariables",uiElementType:"text",label:this._getPublicVariableNames(this.iWidget),allowWrapping:true}]}); } this.masterDialogSpec={rows:_10ca}; },_getAcitveReportOutputVersion:function(_10cb){ var _10cc=_10cb.getActiveReportOutputVersion(); if(_10cc==null){ _10cc=RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION_UNAVAILABLE; } return (RV_RES.IDS_JS_PROPERTY_ACTIVEREPORT_OUTPUT_VERSION+" "+_10cc); },_getPublicVariableNames:function(_10cd){ var _10ce=_10cd.getPublicVariableNames(); var _10cf=""; for(var name in _10ce){ var sType=_10ce[name]; if(_10cf.length>0){ _10cf+=", "; } _10cf+=name; _10cf+=(sType==="D")?" (Discrete)":"(Range)"; } if(_10cf.length>0){ _10cf="Public Variables: "+_10cf; } return _10cf; },_getReportWidgetTabTitle:function(){ var _10d2; if(this.iWidget&&this.iWidget.getViewerObject()){ _10d2=RV_RES.IDS_ACTIVE_REPORT_WIDGET_PROPERTY_TAB_TITLE; } return _10d2; }}); function RAPReportInfo(_10d3,oCV){ this.m_reportInfoJSON=_10d3; this.m_containerInfoJSON={}; this.m_iContainerCount=0; this.m_bPromptPart=null; this.m_bSingleContainer=null; this.m_bDetailFilteringDisabled=null; this.m_aDrilledOnHUNs=null; this.m_bPassTrackingToBUA=null; this.m_sDisplayTypes=null; this.m_bContainsInteractiveDataContainer=null; this.m_bContainsFilters=false; this.m_bContainsSlider=false; this.m_referenceInfoObject={}; this.initializeContainerInfo(); this._addNonVisibleReferences(this.m_reportInfoJSON.reportLevelProperties); this._populateHun(oCV); }; RAPReportInfo.prototype.initializeContainerInfo=function(){ if(this.m_reportInfoJSON){ var _10d5=this.m_reportInfoJSON.containers; if(_10d5){ this.m_iContainerCount=_10d5.length; for(var _10d6=0;_10d60){ var _10ef=this.m_reportInfoJSON.reportLevelProperties; if(_10ef){ if(_10ef&&_10ef.nonVisibleFiltersMemberItemInfo){ for(var i=0;i<_10ef.nonVisibleFiltersMemberItemInfo.length;i++){ if(_10ee===_10ef.nonVisibleFiltersMemberItemInfo[i]){ return true; } } } } } return false; }; RAPReportInfo.prototype.isChildContainer=function(lid){ return ((this.m_containerInfoJSON[lid]&&this.m_containerInfoJSON[lid].parentContainer)?true:false); }; RAPReportInfo.prototype.getItemDetails=function(_10f2,sHun){ var obj=null; for(var lid in this.m_containerInfoJSON){ var oItem=this.getItemInfo(lid,_10f2); if(oItem&&oItem.hun===sHun){ obj={}; obj.item=oItem.item; if(oItem.hun){ obj.hun=oItem.hun; } obj.lid=lid; obj.queryName=oItem.queryName; break; } } return (obj)?obj:null; }; RAPReportInfo.prototype.getItemDetailsByHun=function(sHun){ var _10f8=null; for(var lid in this.m_containerInfoJSON){ var _10fa=this.getItemInfo(lid); for(var sName in _10fa){ var oItem=_10fa[sName]; if(oItem.hun===sHun){ _10f8=sName; break; } } } return (_10f8?this.getItemDetails(_10f8,sHun):null); }; RAPReportInfo.prototype._populateHun=function(oCV){ if(oCV){ var _10fe=oCV.getSelectionController().getCCDManager(); var _10ff=oCV.envParams; var _1100=oCV.getRAPReportInfo(); var _1101=false; for(var lid in this.m_containerInfoJSON){ var _1103=this.m_containerInfoJSON[lid].m_itemInfoJSON; for(var _1104 in _1103){ var oItem=_1103[_1104]; if(oItem.hun){ continue; } var sHun=this.getHUNForItem(oItem,_10fe,lid,_1100); if(sHun){ oItem.hun=sHun; _1101=true; } } } if(_1101&&typeof JSON!="undefined"&&JSON!=null&&JSON.stringify){ _10ff["rapReportInfo"]=JSON.stringify(this.m_reportInfoJSON); } } }; RAPReportInfo.prototype.getHUNForItem=function(oItem,_1108,lid,_110a){ var sHun=this.getHUNFromCCDManager(_1108,oItem); var _110c=null; if(!sHun&&_110a){ _110c=_110a.getItemInfo(lid,oItem.item); if(_110c){ sHun=_110c.hun; } } return sHun; }; RAPReportInfo.prototype.getHUNFromCCDManager=function(_110d,oItem){ var _110f={}; var sHUN=null; var _1111=this._findQueryMetadataId(_110d,_110f,oItem.queryName); if(_1111){ sHUN=_110d.GetHUNForRDI(oItem.item,_1111); } return sHUN; }; RAPReportInfo.prototype._findQueryMetadataId=function(_1112,oMap,_1114){ if(oMap[_1114]){ return oMap[_1114]; } var ctxId=_1112.GetMetadataIdForQueryName(_1114); if(ctxId){ oMap[_1114]=ctxId; return ctxId; } return null; }; RAPReportInfo.prototype.isPromptPart=function(){ if(this.m_bPromptPart===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.promptWidget===true){ this.m_bPromptPart=true; }else{ this.m_bPromptPart=false; } } return this.m_bPromptPart; }; RAPReportInfo.prototype.getContainerCount=function(){ return this.m_iContainerCount; }; RAPReportInfo.prototype.isSingleContainer=function(){ if(this.m_bSingleContainer===null){ if(this.m_iContainerCount===1&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.singleContainerReport===true){ this.m_bSingleContainer=true; }else{ this.m_bSingleContainer=false; } } return this.m_bSingleContainer; }; RAPReportInfo.prototype.isDetailFilteringDisabled=function(){ if(this.m_bDetailFilteringDisabled===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.detailFilteringDisabled===true){ this.m_bDetailFilteringDisabled=true; }else{ this.m_bDetailFilteringDisabled=false; } } return this.m_bDetailFilteringDisabled; }; RAPReportInfo.prototype.getPassTrackingtoBUA=function(){ if(this.m_bPassTrackingToBUA===null){ if(this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.shouldNotPassTrackingtoBUA===true){ this.m_bPassTrackingToBUA=false; }else{ this.m_bPassTrackingToBUA=true; } } return this.m_bPassTrackingToBUA; }; RAPReportInfo.prototype.getDrilledOnHUNs=function(){ if(!this.m_aDrilledOnHUNs&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs){ this.m_aDrilledOnHUNs=this.m_reportInfoJSON.reportLevelProperties.drilledOnHUNs; } return this.m_aDrilledOnHUNs; }; RAPReportInfo.prototype.getDisplayTypes=function(_1116){ if(this.m_sDisplayTypes===null||_1116){ var _1117=""; var _1118=[]; for(var lid in this.m_containerInfoJSON){ if(!_1116||lid!=_1116){ _1118.push(this.m_containerInfoJSON[lid].displayTypeId); } } _1117=_1118.join(","); if(_1117==""&&this.isPromptPart()){ _1117="promptWidget"; } if(!_1116){ this.m_sDisplayTypes=_1117; } return _1117; } return this.m_sDisplayTypes; }; RAPReportInfo.prototype.isChart=function(lid){ var id=lid.toLowerCase(); return id!="mapchart"&&id.match("chart$")=="chart"; }; RAPReportInfo.prototype.isViz=function(lid){ if(this.m_containerInfoJSON[lid]){ var _111d=this.m_containerInfoJSON[lid].displayTypeId; if(_111d){ return (_111d.toLowerCase()=="viz"); } } return false; }; RAPReportInfo.prototype.isInteractiveDataContainer=function(lid){ var _111f=false; if(this.m_containerInfoJSON[lid]){ var _1120=this.m_containerInfoJSON[lid].displayTypeId; if(_1120){ var id=_1120.toLowerCase(); _111f=id=="crosstab"||id=="list"||id=="viz"||this.isChart(id); } } return _111f; }; RAPReportInfo.prototype.containsInteractiveDataContainer=function(){ if(this.m_bContainsInteractiveDataContainer==null){ this.m_bContainsInteractiveDataContainer=false; for(var lid in this.m_containerInfoJSON){ if(this.isInteractiveDataContainer(lid)){ this.m_bContainsInteractiveDataContainer=true; break; } } } return this.m_bContainsInteractiveDataContainer; }; RAPReportInfo.prototype.containsFilters=function(){ return this.m_bContainsFilters; }; RAPReportInfo.prototype.getFilterObject=function(_1123,_1124){ for(var lid in this.m_containerInfoJSON){ var _1126=this.getFilterObjectFromContainer(lid,_1123,_1124); if(_1126){ return _1126; } } return null; }; RAPReportInfo.prototype.getFilterObjectFromContainer=function(lid,_1128,_1129){ var _112a=this.m_containerInfoJSON[lid]; if(_112a&&_112a.filter){ var _112b=_112a.filter.length; for(var i=0;i<_112b;++i){ var _112d=_112a.filter[i]; if(_1128==_112d.item){ if(!_1129||(_112d.itemLabel&&_112d.itemLabel.length>0)){ return _112d; } } } } return null; }; RAPReportInfo.prototype.hunHasFilterOrSlider=function(_112e){ if(!_112e){ return null; } for(var lid in this.m_containerInfoJSON){ var _1130=this.m_containerInfoJSON[lid]; if(_1130&&_1130.filter){ var _1131=_1130.filter.length; for(var i=0;i<_1131;++i){ var _1133=_1130.filter[i]; if(_1133.HUN&&_112e.indexOf(_1133.HUN)==0){ return _1133.item; } } } if(_1130&&_1130.sliders){ var _1131=_1130.sliders.length; for(var i=0;i<_1131;++i){ var _1134=_1130.sliders[i]; if(_1134.hun&&_112e.indexOf(_1134.hun)==0){ return _1134.name; } } } } return null; }; RAPReportInfo.prototype.hasSlider=function(){ return this.m_bContainsSlider; }; RAPReportInfo.prototype.collectSliderSetFromReportInfo=function(){ var _1135={}; for(var lid in this.m_containerInfoJSON){ var _1137=this.m_containerInfoJSON[lid].sliders; if(_1137){ for(var _1138=0;_1138<_1137.length;++_1138){ var _1139=_1137[_1138].clientId; _1135[_1139]=_1137[_1138]; } } } return _1135; }; RAPReportInfo.prototype._getEventTimings=function(){ return (this.m_reportInfoJSON&&this.m_reportInfoJSON.reportLevelProperties&&this.m_reportInfoJSON.reportLevelProperties.eventTimings)?this.m_reportInfoJSON.reportLevelProperties.eventTimings:null; }; RAPReportInfo.prototype.destroy=function(){ GUtil.destroyProperties(this); }; function DelayedLoadingContext(id){ this.widgetid=id; this.m_promptValues=null; }; DelayedLoadingContext.prototype.setPromptValues=function(_113b){ if(_113b===null){ this.m_promptValues=null; return; } if(!this.m_promptValues){ this.m_promptValues={}; } applyJSONProperties(this.m_promptValues,_113b); }; DelayedLoadingContext.prototype.getPromptValues=function(){ return this.m_promptValues; }; DelayedLoadingContext.prototype.setForceRunReport=function(_113c){ this.m_forceRunReport=_113c; }; DelayedLoadingContext.prototype.getForceRunReport=function(){ return this.m_forceRunReport; }; DelayedLoadingContext.prototype.isEmpty=function(){ return !(this.m_promptValues||this.m_forceRunReport); }; DelayedLoadingContext.prototype.reset=function(){ delete (this.m_promptValues); this.m_promptValues=null; this.m_forceRunReport=false; delete (this._cascadingPromptParamsToClear); }; DelayedLoadingContext.prototype.setCascadingPromptParamsToClear=function(_113d){ this._cascadingPromptParamsToClear=_113d; }; DelayedLoadingContext.prototype.getCascadingPromptParamsToClear=function(){ return this._cascadingPromptParamsToClear; }; function ViewerLoadManager(_113e){ this.m_oWidget=_113e; this.m_oDelayedLoadingContext=new DelayedLoadingContext(); this.m_aQueue=[]; this.m_fOnEmptyCallback=null; this.m_bPendingRequest=false; this.m_bViewerLoadInitiated=false; this.m_bCanRunReports=false; }; ViewerLoadManager.prototype.viewerLoadInitiated=function(){ this.m_bViewerLoadInitiated=true; }; ViewerLoadManager.prototype.isViewerLoadInitiated=function(){ return this.m_bViewerLoadInitiated; }; ViewerLoadManager.prototype.canRunReports=function(){ return this.m_bCanRunReports; }; ViewerLoadManager.prototype.runningReport=function(){ if(!this.m_bCanRunReports){ this._queue({fCallback:dojo.hitch(this,function(){ this.m_bCanRunReports=true; return false; })}); } }; ViewerLoadManager.prototype.isViewerReady=function(){ if(!this.isViewerLoaded()){ return false; } if(!this._isEmpty()||this.m_fOnEmptyCallback||this.m_bPendingRequest){ return false; } return true; }; ViewerLoadManager.prototype.isViewerLoaded=function(){ var oCV=this.m_oWidget.getViewerObject(); if(!oCV){ return false; } if(this.m_oWidget.isLiveReport()){ var _1140=oCV.getStatus(); return _1140==="complete"||_1140==="prompting"||_1140==="fault"; } return true; }; ViewerLoadManager.prototype.runWhenHasViewer=function(f,_1142){ if(this.isViewerReady()){ this._run(f); return true; }else{ var _1143={fCallback:f}; if(_1142){ _1143.sGroupId=_1142; } this._queue(_1143); if(!this.m_bViewerLoadInitiated){ this.getDelayedLoadingContext().setForceRunReport(true); this.m_oWidget.setRunReportOption(false); this.m_oWidget.postReport(null); } return false; } }; ViewerLoadManager.prototype.processQueue=function(){ this.m_bPendingRequest=false; var _1144=false; while(!_1144&&!this._isEmpty()){ var _1145=this.m_aQueue.shift(); while(_1145.sGroupId&&!this._isEmpty()&&this.m_aQueue[0].sGroupId===_1145.sGroupId){ _1145=this.m_aQueue.shift(); } _1144=this._run(_1145.fCallback); } if(this._isEmpty()&&!_1144&&this.m_fOnEmptyCallback){ var _1146=this.m_fOnEmptyCallback; this.m_fOnEmptyCallback=null; _1146(); } }; ViewerLoadManager.prototype._run=function(f){ var _1148=f.call(); if(_1148){ this.m_bPendingRequest=true; } return _1148; }; ViewerLoadManager.prototype._isEmpty=function(){ return !this.m_aQueue.length; }; ViewerLoadManager.prototype._queue=function(_1149){ this.m_aQueue.push(_1149); }; ViewerLoadManager.prototype.setOnEmptyCallback=function(_114a){ this.m_fOnEmptyCallback=_114a; }; ViewerLoadManager.prototype.getDelayedLoadingContext=function(){ return this.m_oDelayedLoadingContext; }; function XmlHttpObject(){ this.m_formFields=new CDictionary(); this.xmlHttp=XmlHttpObject.createRequestObject(); this.m_requestIndicator=null; this.m_httpCallbacks={}; this.m_asynch=true; this.m_headers=null; }; XmlHttpObject.prototype.setHeaders=function(_114b){ this.m_headers=_114b; }; XmlHttpObject.prototype.getHeaders=function(){ return this.m_headers; }; XmlHttpObject.prototype.newRequest=function(){ var _114c=new XmlHttpObject(); _114c.init(this.m_action,this.m_gateway,this.m_url,this.m_asynch); this.executeHttpCallback("newRequest"); return _114c; }; XmlHttpObject.prototype.abortHttpRequest=function(){ if(this.xmlHttp!=null){ this.xmlHttp.abort(); this.xmlHttp=null; this.executeHttpCallback("cancel"); this.m_httpCallbacks={}; } }; XmlHttpObject.prototype.cancel=function(){ this.abortHttpRequest(); }; XmlHttpObject.prototype.executeHttpCallback=function(_114d){ if(this.m_httpCallbacks&&this.m_httpCallbacks[_114d]){ var _114e=this.concatResponseArguments(this.m_httpCallbacks.customArguments); var _114f=GUtil.generateCallback(this.m_httpCallbacks[_114d].method,_114e,this.m_httpCallbacks[_114d].object); _114f(); return true; } return false; }; XmlHttpObject.prototype.setCallbacks=function(_1150){ if(!this.m_httpCallbacks){ this.m_httpCallbacks={}; } for(callback in _1150){ this.m_httpCallbacks[callback]=_1150[callback]; } }; XmlHttpObject.prototype.getCallbacks=function(){ return this.m_httpCallbacks; }; XmlHttpObject.createRequestObject=function(){ var _1151=null; if(window.XMLHttpRequest){ _1151=new XMLHttpRequest(); }else{ if(window.ActiveXObject){ _1151=new ActiveXObject("Msxml2.XMLHTTP"); }else{ } } return _1151; }; XmlHttpObject.prototype.waitForXmlHttpResponse=function(){ var _1152=this.xmlHttp; if(_1152&&_1152.readyState===4){ if(_1152.status===200){ this.httpSuccess(); }else{ this.httpError(); } }else{ } }; XmlHttpObject.prototype.init=function(_1153,_1154,url,_1156){ this.m_action=_1153; this.m_gateway=_1154; this.m_url=url; this.m_asynch=_1156; }; XmlHttpObject.prototype.httpSuccess=function(){ this.executeHttpCallback("postHttpRequest"); this.executeHttpCallback("entryComplete"); this.executeHttpCallback("complete"); this.m_httpCallbacks=null; }; XmlHttpObject.prototype.httpError=function(){ this.executeHttpCallback("entryFault"); this.executeHttpCallback("fault"); this.m_httpCallbacks=null; }; XmlHttpObject.prototype.forceSynchronous=function(){ this.m_asynch=false; }; XmlHttpObject.prototype.sendRequest=function(){ this.sendHtmlRequest(this.m_action,this.m_gateway,this.m_url,this.m_asynch); }; XmlHttpObject.prototype.sendHtmlRequest=function(_1157,_1158,url,async){ var _115b=this.xmlHttp; if(_115b){ _115b.open(_1157,_1158,async); if(async){ _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); }else{ _115b.onreadystatechange=GUtil.generateCallback(this.waitForXmlHttpResponse,[],this); if(!isIE()){ _115b.onload=GUtil.generateCallback(this.httpSuccess,[],this); _115b.onerror=GUtil.generateCallback(this.httpError,[],this); } } _115b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); if(this.m_headers){ for(header in this.m_headers){ _115b.setRequestHeader(header,this.m_headers[header]); } } this.executeHttpCallback("preHttpRequest"); var _115c=this.convertFormFieldsToUrl(); if(url){ _115c+=url; } _115b.send(_115c); } }; XmlHttpObject.prototype.getResponseXml=function(){ return (this.xmlHttp)?this.xmlHttp.responseXML:null; }; XmlHttpObject.prototype.getResponseText=function(){ return (this.xmlHttp)?this.xmlHttp.responseText:""; }; XmlHttpObject.prototype.getResponseHeader=function(item){ return (this.xmlHttp)?this.xmlHttp.getResponseHeader(item):null; }; XmlHttpObject.prototype.getStatus=function(){ return this.xmlHttp.status; }; XmlHttpObject.prototype.addFormField=function(name,value){ this.m_formFields.add(name,value); }; XmlHttpObject.prototype.getFormFields=function(){ return this.m_formFields; }; XmlHttpObject.prototype.getFormField=function(_1160){ return this.m_formFields.get(_1160); }; XmlHttpObject.prototype.clearFormFields=function(){ this.m_formFields=new CDictionary(); }; XmlHttpObject.prototype.convertFormFieldsToUrl=function(){ var url=""; var _1162=this.m_formFields.keys(); for(var index=0;index<_1162.length;index++){ if(index>0){ url+="&"; } url+=encodeURIComponent(_1162[index])+"="+encodeURIComponent(this.m_formFields.get(_1162[index])); } return url; }; XmlHttpObject.prototype.concatResponseArguments=function(_1164){ var _1165=[this]; if(_1164){ _1165=_1165.concat(_1164); } return _1165; }; function AsynchRequest(_1166,_1167){ AsynchRequest.baseConstructor.call(this); this.m_gateway=_1166; this.m_webContentRoot=_1167; this.m_callbacks={}; this.m_soapFault=null; this.m_faultDialog=null; this.m_promptDialog=null; this.m_logonDialog=null; }; AsynchRequest.prototype=new XmlHttpObject(); AsynchRequest.baseConstructor=XmlHttpObject; AsynchRequest.prototype.parent=XmlHttpObject.prototype; AsynchRequest.prototype.getTracking=function(){ return ""; }; AsynchRequest.prototype.getConversation=function(){ return ""; }; AsynchRequest.prototype.getPrimaryAction=function(){ return ""; }; AsynchRequest.prototype.getActionState=function(){ return ""; }; AsynchRequest.prototype.getAsynchStatus=function(){ return ""; }; AsynchRequest.prototype.getResult=function(){ return null; }; AsynchRequest.prototype.getSoapFault=function(){ return this.m_soapFault; }; AsynchRequest.prototype.constructFaultEnvelope=function(){ return null; }; AsynchRequest.prototype.getPromptHTMLFragment=function(){ return ""; }; AsynchRequest.prototype.isRAPWaitTrue=function(){ return false; }; AsynchRequest.prototype.getRAPRequestCache=function(){ return null; }; AsynchRequest.prototype.getMainConversation=function(){ return null; }; AsynchRequest.prototype.getMainTracking=function(){ return null; }; AsynchRequest.prototype.construct=function(){ }; AsynchRequest.prototype.executeCallback=function(_1168){ if(this.m_callbacks[_1168]){ var _1169=this.concatResponseArguments(this.m_callbacks.customArguments); var _116a=GUtil.generateCallback(this.m_callbacks[_1168].method,_1169,this.m_callbacks[_1168].object); _116a(); return true; } return false; }; AsynchRequest.prototype.setCallbacks=function(_116b){ if(!this.m_callbacks){ this.m_callbacks={}; } for(callback in _116b){ this.m_callbacks[callback]=_116b[callback]; } }; AsynchRequest.prototype.getCallbacks=function(){ return this.m_callbacks; }; AsynchRequest.prototype.newRequest=function(){ var _116c=this.construct(); _116c.setHeaders(this.getHeaders()); if(this.getFormFields().exists("b_action")){ _116c.addFormField("b_action",this.getFormField("b_action")); } if(this.getFormFields().exists("cv.catchLogOnFault")){ _116c.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } _116c.setPromptDialog(this.m_promptDialog); _116c.setFaultDialog(this.m_faultDialog); _116c.setLogonDialog(this.m_logonDialog); _116c.m_asynch=this.m_asynch; if(this.m_callbacks.newRequest){ var _116d=GUtil.generateCallback(this.m_callbacks.newRequest.method,[_116c],this.m_callbacks.newRequest.object); _116d(); } return _116c; }; AsynchRequest.prototype.success=function(){ var _116e=this.getAsynchStatus(); switch(_116e){ case "stillWorking": case "working": this.working(); break; case "prompting": this.prompting(); break; case "fault": case "complete": case "conversationComplete": this.complete(); break; default: this.complete(); break; } }; AsynchRequest.prototype.setFaultDialog=function(_116f){ if(_116f instanceof IFaultDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setFaultDialog is deprecated"); } this.m_faultDialog=_116f; }else{ if(_116f&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } }; AsynchRequest.prototype.setPromptDialog=function(_1170){ if(_1170 instanceof IPromptDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setPromptDialog is deprecated"); } this.m_promptDialog=_1170; }else{ if(_1170&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } }; AsynchRequest.prototype.setLogonDialog=function(_1171){ if(_1171 instanceof ILogOnDialog){ if(typeof console!="undefined"){ console.log("AsynchRequest.prototype.setLogonDialog is deprecated"); } this.m_logonDialog=_1171; }else{ if(_1171&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } }; AsynchRequest.prototype.resubmitRequest=function(){ var _1172=this.newRequest(); _1172.m_formFields=this.m_formFields; _1172.sendRequest(); return _1172; }; AsynchRequest.prototype.sendRequest=function(){ var _1173=this; var _1174={"complete":{"object":_1173,"method":_1173.successHandler},"fault":{"object":_1173,"method":_1173.errorHandler}}; this.init("POST",this.m_gateway,"",this.m_asynch); this.executeCallback("preHttpRequest"); this.parent.setCallbacks.call(this,_1174); this.parent.sendRequest.call(this); }; AsynchRequest.prototype.errorHandler=function(){ this.executeCallback("postHttpRequest"); this.executeCallback("entryFault"); this.executeCallback("error"); }; AsynchRequest.prototype.successHandler=function(){ this.executeCallback("postHttpRequest"); if(typeof window["AsynchRequestPromptDialog"]!="undefined"&&window["AsynchRequestPromptDialog"]!=null){ window["AsynchRequestPromptDialog"].hide(); window["AsynchRequestPromptDialog"]=null; } if(this.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _1175=this.getResponseText(); if(_1175.indexOf("CAM_PASSPORT_ERROR")!=-1){ this.passportTimeout(); }else{ if((_1175.indexOf("http-equiv=\"refresh\"")!=-1)||(_1175.indexOf("http-equiv='refresh'")!=-1)){ this.passportTimeout(); }else{ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ var _1176=window.open("","","height=400,width=500"); if(_1176!=null){ _1176.document.write(_1175); } } } } }else{ this.m_soapFault=this.constructFaultEnvelope(); if(this.m_soapFault!=null){ var _1177=XMLHelper_FindChildByTagName(this.m_soapFault,"CAM",true); if(_1177!=null&&XMLHelper_FindChildByTagName(_1177,"promptInfo",true)){ this.passportTimeout(); }else{ this.fault(); } }else{ this.success(); } } }; AsynchRequest.prototype.cancel=function(){ this.parent.cancel.call(this); var _1178=this.getFormField("m_tracking"); if(_1178){ var _1179=new XmlHttpObject(); _1179.init("POST",this.m_gateway,"",false); if(this.getFormField("cv.outputKey")){ _1179.addFormField("b_action","cvx.high"); _1179.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _1179.setHeaders(this.getHeaders()); }else{ _1179.addFormField("b_action","cognosViewer"); } _1179.addFormField("cv.responseFormat","successfulRequest"); _1179.addFormField("ui.action","cancel"); _1179.addFormField("m_tracking",_1178); if(this.getFormField("cv.debugDirectory")){ _1179.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _1179.sendRequest(); this.executeCallback("cancel"); } }; AsynchRequest.prototype.working=function(){ this.executeCallback("working"); var _117a=this.newRequest(); _117a.addFormField("m_tracking",this.getTracking()); if(this.getFormField("cv.outputKey")){ _117a.addFormField("cv.outputKey",this.getFormField("cv.outputKey")); _117a.addFormField("b_action","cvx.high"); } if(this.isRAPWaitTrue()){ _117a.m_formFields=this.m_formFields; _117a.addFormField("m_tracking",this.getTracking()); _117a.addFormField("rapWait","true"); var _117b=this.getRAPRequestCache(); if(_117b!==null&&typeof _117b!="undefined"){ _117a.addFormField("rapRequestCache",_117b); } var _117c=this.getMainConversation(); if(_117c){ _117a.addFormField("mainConversation",_117c); } var _117d=this.getMainTracking(); if(_117d){ _117a.addFormField("mainTracking",_117d); } }else{ _117a.addFormField("ui.action","wait"); _117a.addFormField("ui.primaryAction",this.getPrimaryAction()); _117a.addFormField("cv.actionState",this.getActionState()); if(this.getFormField("ui.preserveRapTags")){ _117a.addFormField("ui.preserveRapTags",this.getFormField("ui.preserveRapTags")); } if(this.getFormField("ui.backURL")){ _117a.addFormField("ui.backURL",this.getFormField("ui.backURL")); } if(this.getFormField("errURL")){ _117a.addFormField("errURL",this.getFormField("errURL")); } if(this.getFormField("cv.showFaultPage")){ _117a.addFormField("cv.showFaultPage",this.getFormField("cv.showFaultPage")); } if(this.getFormField("cv.catchLogOnFault")){ _117a.addFormField("cv.catchLogOnFault",this.getFormField("cv.catchLogOnFault")); } } if(this.getFormField("bux")){ _117a.addFormField("bux",this.getFormField("bux")); } if(this.getFormField("cv.debugDirectory")){ _117a.addFormField("cv.debugDirectory",this.getFormField("cv.debugDirectory")); } _117a.sendRequest(); }; AsynchRequest.prototype.prompting=function(){ this.executeCallback("entryComplete"); if(!this.executeCallback("prompting")){ if(this.m_promptDialog!=null){ this.showPromptPage(); }else{ if(typeof console!="undefined"){ console.log("An unhandled prompt response was returned: %o",this.xmlHttp); } } } this.executeCallback("postEntryComplete"); }; AsynchRequest.prototype.promptPageOkCallback=function(_117e){ var _117f=this.newRequest(); _117f.addFormField("ui.action","forward"); _117f.addFormField("m_tracking",this.getTracking()); _117f.addFormField("ui.conversation",this.getConversation()); _117f.addFormField("ui.primaryAction",this.getPrimaryAction()); _117f.addFormField("cv.actionState",this.getActionState()); for(var _1180 in _117e){ _117f.addFormField(_1180,_117e[_1180]); } _117f.sendRequest(); window["AsynchRequestObject"]=null; }; AsynchRequest.prototype.promptPageCancelCallback=function(){ window["AsynchRequestPromptDialog"].hide(); this.complete(); }; AsynchRequest.prototype.showPromptPage=function(){ window["AsynchRequestObject"]=this; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _1181=this.m_promptDialog.getViewerId()==null?"":"?cv.id="+this.m_promptDialog.getViewerId(); window["AsynchRequestPromptDialog"].initialize(this.m_webContentRoot+"/rv/showStandalonePrompts.html"+_1181,400,400); window["AsynchRequestPromptDialog"].show(); }; AsynchRequest.prototype.passportTimeout=function(){ this.executeCallback("entryFault"); if(!this.executeCallback("passportTimeout")){ if(this.m_logonDialog!=null){ this.m_logonDialog.show(response.getSoapFault()); }else{ if(typeof console!="undefined"){ console.log("An unhandled passport timeout fault was returned: %o",this.getSoapFault()); } } } }; AsynchRequest.prototype.fault=function(){ this.executeCallback("entryFault"); if(!this.executeCallback("fault")){ if(this.m_faultDialog!=null){ this.m_faultDialog.show(this.getSoapFault()); }else{ if(typeof console!="undefined"){ console.log("An unhandled soap fault was returned: %o",this.getSoapFault()); } } } }; AsynchRequest.prototype.complete=function(){ this.executeCallback("entryComplete"); this.executeCallback("complete"); this.executeCallback("postEntryComplete"); }; AsynchRequest.prototype.getSoapFaultCode=function(){ var _1182=this.constructFaultEnvelope(); if(_1182){ var _1183=XMLHelper_FindChildByTagName(_1182,"faultcode",true); if(_1183!=null){ return XMLHelper_GetText(_1183); } } return null; }; AsynchRequest.prototype.getSoapFaultDetailMessageString=function(){ var _1184=this.constructFaultEnvelope(); if(_1184){ var entry=XMLHelper_FindChildByTagName(_1184,"messageString",true); if(entry!=null){ return XMLHelper_GetText(entry); } } return null; }; function AsynchDATARequest(_1186,_1187){ AsynchDATARequest.baseConstructor.call(this,_1186,_1187); this.m_oResponseState=null; this.m_sResponseState=null; this.m_endOfStateIdx=-1; this.cStatePrefix=""; this.cStateSuffix=""; }; AsynchDATARequest.prototype=new AsynchRequest(); AsynchDATARequest.baseConstructor=AsynchRequest; AsynchDATARequest.prototype.getEndOfStateIdx=function(){ if(this.m_endOfStateIdx==-1){ var _1188=this.getResponseText().substring(0,12); if(_1188==this.cStatePrefix){ this.m_endOfStateIdx=this.getResponseText().indexOf(this.cStateSuffix); if(this.m_endOfStateIdx!=-1){ this.m_endOfStateIdx+=this.cStateSuffix.length; } } } return this.m_endOfStateIdx; }; AsynchDATARequest.prototype.getResponseStateText=function(){ if(!this.m_sResponseState){ this.getResponseState(); } return this.m_sResponseState; }; AsynchDATARequest.prototype.getResponseState=function(){ if(this.m_oResponseState==null&&this.getEndOfStateIdx()!=-1){ this.m_sResponseState=this.getResponseText().substring(this.cStatePrefix.length,this.getEndOfStateIdx()-this.cStateSuffix.length); if(this.m_sResponseState!=null){ this.m_sResponseState=xml_decode(this.m_sResponseState); this.m_oResponseState=eval("("+this.m_sResponseState+")"); } } return this.m_oResponseState; }; AsynchDATARequest.prototype.getAsynchStatus=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sStatus!="undefined"){ return this.getResponseState().m_sStatus; } return "unknown"; }; AsynchDATARequest.prototype.getTracking=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sTracking!="undefined"){ return this.getResponseState().m_sTracking; } return ""; }; AsynchDATARequest.prototype.getConversation=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sConversation!="undefined"){ return this.getResponseState().m_sConversation; } return ""; }; AsynchDATARequest.prototype.getPrimaryAction=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().envParams!="undefined"&&this.getResponseState().envParams["ui.primaryAction"]!="undefined"){ return this.getResponseState().envParams["ui.primaryAction"]; } return ""; }; AsynchDATARequest.prototype.getActionState=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().m_sActionState!="undefined"){ return this.getResponseState().m_sActionState; } return ""; }; AsynchDATARequest.prototype.getResult=function(){ if(this.getEndOfStateIdx()!=-1){ return this.getResponseText().substring(this.getEndOfStateIdx(),this.getResponseText().length); } return ""; }; AsynchDATARequest.prototype.getDebugLogs=function(){ if(this.getResponseState()!=null&&typeof this.getResponseState().debugLogs!="undefined"){ return this.getResponseState().debugLogs; } return ""; }; AsynchDATARequest.prototype.getPromptHTMLFragment=function(){ return this.getResult(); }; AsynchDATARequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var state=this.getResponseState(); if(state!=null){ if(state.m_sSoapFault){ var _118a=state.m_sSoapFault; this.m_soapFault=XMLBuilderLoadXMLFromString(_118a); } } } return this.m_soapFault; }; AsynchDATARequest.prototype.construct=function(){ var _118b=new AsynchDATARequest(this.m_gateway,this.m_webContentRoot); _118b.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _118b.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _118b.addFormField("cv.responseFormat","data"); } return _118b; }; AsynchDATARequest.prototype.getEnvParam=function(param){ var _118d=this.getResponseState(); if(_118d&&typeof _118d.envParams!="undefined"&&typeof _118d.envParams[param]!="undefined"){ return _118d.envParams[param]; } return null; }; AsynchDATARequest.prototype.isRAPWaitTrue=function(){ var _118e=this.getEnvParam("rapWait"); if(_118e!=null){ return _118e=="true"?true:false; } return false; }; AsynchDATARequest.prototype.getRAPRequestCache=function(){ return this.getEnvParam("rapRequestCache"); }; AsynchDATARequest.prototype.getMainConversation=function(){ return this.getEnvParam("mainConversation"); }; AsynchDATARequest.prototype.getMainTracking=function(){ return this.getEnvParam("mainTracking"); }; function AsynchJSONRequest(_118f,_1190){ AsynchJSONRequest.baseConstructor.call(this,_118f,_1190); this.m_jsonResponse=null; }; AsynchJSONRequest.prototype=new AsynchRequest(); AsynchJSONRequest.baseConstructor=AsynchRequest; AsynchJSONRequest.prototype.getJSONResponseObject=function(){ if(this.m_jsonResponse==null){ if(this.getResponseHeader("Content-type").indexOf("application/json")!=-1){ var text=this.getResponseText(); if(text!=null){ var _1192=this.removeInvalidCharacters(text); this.m_jsonResponse=eval("("+_1192+")"); } } } return this.m_jsonResponse; }; AsynchJSONRequest.prototype.getTracking=function(){ var _1193=this.getJSONResponseObject(); if(_1193){ return _1193.tracking; } return ""; }; AsynchJSONRequest.prototype.getConversation=function(){ var _1194=this.getJSONResponseObject(); if(_1194){ return _1194.conversation; } return ""; }; AsynchJSONRequest.prototype.getAsynchStatus=function(){ var _1195=this.getJSONResponseObject(); if(_1195){ return _1195.status; } return "unknown"; }; AsynchJSONRequest.prototype.getPrimaryAction=function(){ var _1196=this.getJSONResponseObject(); if(_1196){ return _1196.primaryAction; } return ""; }; AsynchJSONRequest.prototype.getActionState=function(){ var _1197=this.getJSONResponseObject(); if(_1197){ return _1197.actionState; } return ""; }; AsynchJSONRequest.prototype.getDebugLogs=function(){ var _1198=this.getJSONResponseObject(); if(_1198){ return _1198.debugLogs; } return ""; }; AsynchJSONRequest.prototype.isRAPWaitTrue=function(){ var _1199=this.getJSONResponseObject(); if(_1199){ return (_1199.rapWait==="true"); } return false; }; AsynchJSONRequest.prototype.getRAPRequestCache=function(){ var _119a=this.getJSONResponseObject(); if(_119a){ var _119b=_119a.rapRequestCache; if(_119b!==null&&typeof _119b!="undefined"){ return _119b; } } return null; }; AsynchJSONRequest.prototype.getMainConversation=function(){ var _119c=this.getJSONResponseObject(); if(_119c){ return _119c.mainConversation; } return null; }; AsynchJSONRequest.prototype.getMainTracking=function(){ var _119d=this.getJSONResponseObject(); if(_119d){ return _119d.mainTracking; } return null; }; AsynchJSONRequest.prototype.getResult=function(){ var _119e=this.getJSONResponseObject(); if(_119e&&_119e.json){ var _119f=this.removeInvalidCharacters(_119e.json); return eval("("+_119f+")"); } return null; }; AsynchJSONRequest.prototype.removeInvalidCharacters=function(text){ if(text){ text=text.replace(/(\n|\r|\t)+/g,""); } return text; }; AsynchJSONRequest.prototype.getPromptHTMLFragment=function(){ var _11a1=this.getJSONResponseObject(); if(_11a1&&_11a1.promptHTMLFragment){ return _11a1.promptHTMLFragment; } return ""; }; AsynchJSONRequest.prototype.constructFaultEnvelope=function(){ if(this.m_soapFault==null){ var _11a2=this.getJSONResponseObject(); if(_11a2.status=="fault"){ this.m_soapFault=XMLBuilderLoadXMLFromString(_11a2.fault); } } return this.m_soapFault; }; AsynchJSONRequest.prototype.construct=function(){ var _11a3=new AsynchJSONRequest(this.m_gateway,this.m_webContentRoot); _11a3.setCallbacks(this.m_callbacks); if(this.getFormFields().exists("cv.responseFormat")){ _11a3.addFormField("cv.responseFormat",this.getFormField("cv.responseFormat")); }else{ _11a3.addFormField("cv.responseFormat","asynchJSON"); } return _11a3; }; function IFaultDialog(){ }; IFaultDialog.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IFaultDialog:show not implemented."); } }; IFaultDialog.prototype.handleUnknownHTMLResponse=function(){ if(typeof console!="undefined"){ console.log("Required method IFaultDialog:handlerUnknownHTMLResponse not implemented."); } }; function ILogOnDialog(){ }; ILogOnDialog.prototype.show=function(_11a4){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:show not implemented."); } }; ILogOnDialog.prototype.handleUnknownHTMLResponse=function(_11a5){ if(typeof console!="undefined"){ console.log("Required method ILogOnDialog:handleUnknownHTMLResponse not implemented."); } }; function IPromptDialog(){ }; IPromptDialog.prototype.initialize=function(url,width,_11a8){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:initialize not implemented."); } }; IPromptDialog.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:show not implemented."); } }; IPromptDialog.prototype.hide=function(){ if(typeof console!="undefined"){ console.log("Required method IModalDialog:hide not implemented."); } }; function IRequestHandler(){ }; IRequestHandler.prototype.preHttpRequest=function(_11a9){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:preHttpRequest not implemented."); } }; IRequestHandler.prototype.postHttpRequest=function(_11aa){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postHttpRequest not implemented."); } }; IRequestHandler.prototype.postComplete=function(_11ab){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:postComplete not implemented."); } }; IRequestHandler.prototype.onComplete=function(_11ac){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onComplete not implemented."); } }; IRequestHandler.prototype.onPostEntryComplete=function(_11ad){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPostEntryComplete not implemented."); } }; IRequestHandler.prototype.onFault=function(_11ae){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onFault not implemented."); } }; IRequestHandler.prototype.onPrompting=function(_11af){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onPrompting not implemented."); } }; IRequestHandler.prototype.onWorking=function(_11b0){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:onWorking not implemented."); } }; IRequestHandler.prototype.setWorkingDialog=function(_11b1){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setWorkingDialog not implemented."); } }; IRequestHandler.prototype.setRequestIndicator=function(_11b2){ if(typeof console!="undefined"){ console.log("Required method IRequestHandler:setExecutionCursor not implemented."); } }; function IRequestIndicator(){ }; IRequestIndicator.prototype.show=function(){ if(typeof console!="undefined"){ console.log("Required method IRequestIndicator:show not implemented."); } }; IRequestIndicator.prototype.hide=function(){ if(typeof console!="undefined"){ console.log("Required method IRequestIndicator:hide not implemented."); } }; function BaseRequestHandler(oCV){ if(oCV){ this.m_oCV=oCV; this.m_workingDialog=null; this.m_requestIndicator=null; this.m_faultDialog=null; this.m_logOnDialog=null; this.m_promptDialog=null; this.m_httpRequestConfig=this.m_oCV.getConfig()&&this.m_oCV.getConfig().getHttpRequestConfig()?this.m_oCV.getConfig().getHttpRequestConfig():null; } }; BaseRequestHandler.prototype=new IRequestHandler(); BaseRequestHandler.prototype.onError=function(_11b4){ }; BaseRequestHandler.prototype.onComplete=function(){ }; BaseRequestHandler.prototype.onPrompting=function(){ }; BaseRequestHandler.prototype.resubmitInSafeMode=function(){ }; BaseRequestHandler.prototype.massageHtmlBeforeDisplayed=function(){ }; BaseRequestHandler.prototype.onPostEntryComplete=function(){ this._processDelayedLoadingQueue(); }; BaseRequestHandler.prototype.getViewer=function(){ return this.m_oCV; }; BaseRequestHandler.prototype.setDispatcherEntry=function(_11b5){ this.m_oDispatcherEntry=_11b5; }; BaseRequestHandler.prototype.getDispatcherEntry=function(){ return this.m_oDispatcherEntry; }; BaseRequestHandler.prototype.processInitialResponse=function(_11b6){ this.updateViewerState(_11b6); }; BaseRequestHandler.prototype.setLogOnDialog=function(_11b7){ if(_11b7==null){ this.m_logOnDialog=null; }else{ if(_11b7 instanceof ILogOnDialog){ this.m_logOnDialog=_11b7; }else{ if(_11b7&&typeof console!="undefined"){ console.log("The parameter logOnDialog must be an instance of ILogOnDialog"); } } } }; BaseRequestHandler.prototype.setWorkingDialog=function(_11b8){ if(_11b8==null){ this.m_workingDialog=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getWorkingDialog()){ this.m_workingDialog=this.m_httpRequestConfig.getWorkingDialog(); }else{ if(_11b8 instanceof IRequestIndicator){ this.m_workingDialog=_11b8; }else{ if(_11b8&&typeof console!="undefined"){ console.log("The parameter workingDialog must be an instance of IRequestIndicator"); } } } } }; BaseRequestHandler.prototype.getWorkingDialog=function(){ return this.m_workingDialog; }; BaseRequestHandler.prototype.setRequestIndicator=function(_11b9){ if(_11b9==null){ this.m_requestIndicator=null; }else{ if(this.m_httpRequestConfig&&this.m_httpRequestConfig.getRequestIndicator()){ this.m_requestIndicator=this.m_httpRequestConfig.getRequestIndicator(); }else{ if(_11b9 instanceof IRequestIndicator){ this.m_requestIndicator=_11b9; }else{ if(_11b9&&typeof console!="undefined"){ console.log("The parameter requestIndicator must be an instance of IRequestIndicator"); } } } } }; BaseRequestHandler.prototype.getRequestIndicator=function(){ return this.m_requestIndicator; }; BaseRequestHandler.prototype.setFaultDialog=function(_11ba){ if(_11ba==null){ this.m_faultDialog=null; }else{ if(_11ba instanceof IFaultDialog){ this.m_faultDialog=_11ba; }else{ if(_11ba&&typeof console!="undefined"){ console.log("The parameter faultDialog must be an instance of IFaultDialog"); } } } }; BaseRequestHandler.prototype.setPromptDialog=function(_11bb){ if(_11bb==null){ this.m_promptDialog=null; }else{ if(_11bb instanceof IPromptDialog){ this.m_promptDialog=_11bb; }else{ if(_11bb&&typeof console!="undefined"){ console.log("The parameter promptDialog must be an instance of IPromptDialog"); } } } }; BaseRequestHandler.prototype.preHttpRequest=function(_11bc){ if(_11bc&&typeof _11bc.getFormField=="function"){ if(_11bc.getFormField("ui.action")!="wait"&&_11bc.getFormField("rapWait")!="true"){ if(this.m_requestIndicator){ this.m_requestIndicator.show(); } } } }; BaseRequestHandler.prototype.postHttpRequest=function(_11bd){ if(_11bd&&typeof _11bd.getAsynchStatus=="function"){ var _11be=_11bd.getAsynchStatus(); if(_11be!="working"&&_11be!="stillWorking"){ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } } }else{ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } } }; BaseRequestHandler.prototype.onFault=function(_11bf){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(typeof FaultDialog=="undefined"){ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_11bf); } return; } if(!this.m_faultDialog){ this.m_faultDialog=new FaultDialog(this.getViewer()); } if(_11bf&&_11bf.getResponseHeader&&_11bf.getResponseHeader("Content-type").indexOf("text/html")!=-1){ this.m_faultDialog.handleUnknownHTMLResponse(_11bf.getResponseText()); }else{ if(_11bf&&_11bf.getSoapFault){ this.m_faultDialog.show(_11bf.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _11c1=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_faultDialog.show(_11c1); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("An unhandled fault was returned: %o",_11bf); } } } } }; BaseRequestHandler.prototype.isAuthenticationFault=function(_11c2){ var oCV=this.getViewer(); var _11c4=null; if(_11c2&&_11c2.getSoapFault){ _11c4=_11c2.getSoapFault(); }else{ if(oCV.getSoapFault()){ _11c4=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); } } if(_11c4!=null){ var _11c5=XMLHelper_FindChildByTagName(_11c4,"CAM",true); return (_11c5!=null&&XMLHelper_FindChildByTagName(_11c5,"promptInfo",true)!=null); } return false; }; BaseRequestHandler.prototype.onPassportTimeout=function(_11c6){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(!this.m_logOnDialog){ this.m_logOnDialog=new LogOnDialog(this.getViewer()); } if(_11c6&&_11c6.getResponseHeader&&_11c6.getResponseHeader("Content-type").indexOf("text/html")!=-1){ var _11c8=""; if(_11c6.getResponseText){ _11c8=_11c6.getResponseText(); } if((_11c8.indexOf("http-equiv=\"refresh\"")!=-1)||(_11c8.indexOf("http-equiv='refresh'")!=-1)){ this.m_logOnDialog.show(null); }else{ this.m_logOnDialog.handleUnknownHTMLResponse(_11c8); } }else{ if(_11c6&&_11c6.getSoapFault){ this.m_logOnDialog.show(_11c6.getSoapFault()); }else{ if(oCV.getSoapFault()){ var _11c9=XMLBuilderLoadXMLFromString(oCV.getSoapFault()); this.m_logOnDialog.show(_11c9); oCV.setSoapFault(""); }else{ if(typeof console!="undefined"){ console.log("BaseRequestHandler.prototype.onPassportTimeout: An unhandled authentication fault was returned: %o",_11c6); } } } } }; BaseRequestHandler.prototype.onWorking=function(_11ca){ if(this.m_workingDialog){ var _11cb=_11ca&&typeof _11ca.getAsynchStatus=="function"&&_11ca.getAsynchStatus()=="stillWorking"?true:false; if(!_11cb){ if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } this.m_workingDialog.show(); } } }; BaseRequestHandler.prototype.onCancel=function(){ if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } var oCV=this.getViewer(); oCV.gbPromptRequestSubmitted=false; this._processDelayedLoadingQueue(); }; BaseRequestHandler.prototype._processDelayedLoadingQueue=function(){ var oCV=this.getViewer(); if(oCV&&oCV.getViewerWidget()){ var _11ce=oCV.getViewerWidget(); if(_11ce.getLoadManager()){ _11ce.getLoadManager().processQueue(); } } }; BaseRequestHandler.prototype.onPrompting=function(_11cf){ var oCV=this.getViewer(); if(this.m_workingDialog){ this.m_workingDialog.hide(); } if(this.m_requestIndicator){ this.m_requestIndicator.hide(); } if(!this.m_promptDialog){ this.m_promptDialog=new PromptDialog(this.getViewer()); } window["AsynchRequestObject"]=_11cf; window["AsynchRequestPromptDialog"]=this.m_promptDialog; var _11d1="?cv.id="+oCV.getId(); window["AsynchRequestPromptDialog"].initialize(oCV.getWebContentRoot()+"/rv/showStandalonePrompts.html"+_11d1,400,400); window["AsynchRequestPromptDialog"].show(); }; BaseRequestHandler.prototype.processDATAReportResponse=function(_11d2){ var oCV=this.getViewer(); if(!oCV||oCV.m_destroyed){ if(console){ console.warn("Tried to process a data response on an invalid CCognosViewer",oCV); } return; } var _11d4=_11d2.getResponseState(); if(!_11d4){ this.resubmitInSafeMode(); } if(this.loadReportHTML(_11d2.getResult())===false){ this.resubmitInSafeMode(); } this.updateViewerState(_11d4); }; BaseRequestHandler.prototype.updateViewerState=function(_11d5){ var oCV=this.getViewer(); applyJSONProperties(oCV,_11d5); var _11d7=oCV.getStatus(); if(typeof oCV.envParams["ui.spec"]!="undefined"&&oCV.envParams["ui.spec"].indexOf("<")===0){ oCV.envParams["ui.spec"]=xml_decode(oCV.envParams["ui.spec"]); } if(_11d7!="fault"){ if(oCV.envParams["rapReportInfo"]){ this._processRapReportInfo(oCV); } if(typeof _11d5.clientunencodedexecutionparameters!="undefined"){ var _11d8=document.getElementById("formWarpRequest"+oCV.getId()); if(_11d8!=null&&typeof _11d8["clientunencodedexecutionparameters"]!="undefined"){ _11d8["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters; } if(typeof document.forms["formWarpRequest"]!="undefined"&&typeof document.forms["formWarpRequest"]["clientunencodedexecutionparameters"]!="undefined"){ document.forms["formWarpRequest"]["clientunencodedexecutionparameters"].value=_11d5.clientunencodedexecutionparameters; } } }else{ oCV.setTracking(""); } }; BaseRequestHandler.prototype._processRapReportInfo=function(oCV){ if(oCV.envParams["rapReportInfo"]){ var _11da=eval("("+oCV.envParams["rapReportInfo"]+")"); if(typeof RAPReportInfo!="undefined"){ var _11db=new RAPReportInfo(_11da,oCV); oCV.setRAPReportInfo(_11db); } } }; BaseRequestHandler.prototype.loadReportHTML=function(_11dc){ if(!_11dc){ return true; } var oCV=this.getViewer(); if(window.IBM&&window.IBM.perf){ window.IBM.perf.log("viewer_gotHtml",oCV); } if(oCV.m_undoStack.length>0){ oCV.m_undoStack[oCV.m_undoStack.length-1].m_bRefreshPage=true; } oCV.pageNavigationObserverArray=[]; oCV.m_flashChartsObjectIds=[]; var sHTML=_11dc.replace(/]*>/gi,"").replace(/<\/form[^>]*>/gi,""); oCV.m_sHTML=sHTML; oCV.setHasPrompts(false); var id=oCV.getId(); var _11e0=document.getElementById("RVContent"+id); var _11e1=document.getElementById("CVReport"+id); if(window.gScriptLoader){ var _11e2=oCV.getViewerWidget()?true:false; var _11e3=oCV.getViewerWidget()?document.getElementById("_"+oCV.getViewerWidget().iContext.widgetId+"_cv"):_11e1; sHTML=window.gScriptLoader.loadCSS(sHTML,_11e3,_11e2,id); } if(oCV.sBrowser=="ie"){ sHTML=" "+sHTML; } _11e1.innerHTML=sHTML; this.massageHtmlBeforeDisplayed(); if(window.gScriptLoader){ var _11e4=GUtil.generateCallback(oCV.showLoadedContent,[_11e0],oCV); oCV.m_resizeReady=false; if(!window.gScriptLoader.loadAll(_11e1,_11e4,id,true)){ if(window.gScriptLoader.containsAjaxWarnings()){ return false; } } }else{ _11e0.style.display="block"; } var _11e5=document.querySelectorAll("button"); var _11e6=_11e5.length; for(var k=0;k<_11e6;k++){ var _11e8=_11e5[k]; var id=_11e8.id; var _11e9=id.match(/reprompt/); if(_11e9){ var _11ea=_11e8.outerHTML; var _11eb=_11ea.match(/layoutname="\w+"/); if(_11eb!==null){ var _11ec=_11eb[0]; var _11ed=/".*"/; var _11ee=_11ed.exec(_11ec); if(oCV.getCurrentPromptControlFocus()==_11ee){ _11e8.focus(); oCV.setCurrentPromptControlFocus(null); _11e8=null; } }else{ oCV.setCurrentPromptControlFocus(null); _11e8=null; } } } oCV.updateOutputForA11ySupport(); this._clearFindState(); return true; }; BaseRequestHandler.prototype._clearFindState=function(){ var oCV=this.getViewer(); var _11f0=oCV.getState()&&oCV.getState().getFindState()?oCV.getState().getFindState():null; if(_11f0&&!_11f0.findOnServerInProgress()){ oCV.getState().clearFindState(); } }; BaseRequestHandler.prototype.showReport=function(){ var oCV=this.getViewer(); var _11f2=document.getElementById("CVReport"+oCV.getId()); if(_11f2){ _11f2.style.display=""; } }; BaseRequestHandler.prototype.postComplete=function(){ var oCV=this.getViewer(); if(oCV.shouldWriteNavLinks()){ oCV.writeNavLinks(oCV.getSecondaryRequests().join(" ")); } if(oCV.getStatus()==="complete"){ oCV.m_undoStack=[new CognosViewerSession(oCV)]; } }; BaseRequestHandler.prototype.onAsynchStatusUpdate=function(_11f4){ if(this.m_httpRequestConfig){ var _11f5=this.m_httpRequestConfig.getReportStatusCallback(_11f4); if(_11f5){ _11f5(); } } }; BaseRequestHandler.prototype.addCallbackHooks=function(){ if(!this.m_httpRequestConfig){ return; } this._addCallback("complete","onComplete"); this._addCallback("working","onWorking"); this._addCallback("prompting","onPrompting"); }; BaseRequestHandler.prototype._addCallback=function(_11f6,_11f7){ var _11f8=_11f6; var _11f9=this[_11f7]; this[_11f7]=function(_11fa){ _11f9.apply(this,arguments); var _11fb=null; if(_11fa&&typeof _11fa.getAsynchStatus=="function"){ _11fb=_11fa.getAsynchStatus(); }else{ _11fb=_11f8=="complete"?this.getViewer().getStatus():_11f8; } if(_11fb=="stillWorking"){ return; } var _11fc=this.m_httpRequestConfig.getReportStatusCallback(_11fb); if(typeof _11fc=="function"){ setTimeout(_11fc,10); } }; }; dojo.provide("FaultDialog"); dojo.declare("FaultDialog",IFaultDialog,{m_soapFault:null,m_errorMessage:null,m_oCV:null,constructor:function(oCV){ this.m_oCV=oCV; },show:function(_11fe){ this.m_soapFault=_11fe; this.m_oCV.m_resizeReady=true; this.renderInlineDialog(); this.m_oCV.getViewerWidget().setErrorDlg(this); },handleUnknownHTMLResponse:function(_11ff){ if(_11ff){ var _1200=window.open("","","height=400,width=500"); if(_1200!=null){ _1200.document.write(_11ff); } } },canRetryRequest:function(){ var _1201=true; var _1202=XMLHelper_FindChildrenByTagName(this.m_soapFault,"allowRetry",true); if(_1202.length>0){ _1201=(XMLHelper_GetText(_1202[0],false)==="true"); } return _1201; },isWarningMessage:function(){ return false; },getButtons:function(){ var _1203=[{label:RV_RES.IDS_JS_OK,action:dojo.hitch(this,this.ok)}]; if(this.canRetryRequest()){ _1203.push({label:RV_RES.IDS_JS_RETRY,action:dojo.hitch(this,this.retry)}); } return _1203; },renderInlineDialog:function(){ var _1204={"type":this.isWarningMessage()?"warning":"error","message":this.getErrorMessage(),"buttons":this.getButtons()}; var _1205=this.getDetails(); if(_1205&&_1205.length>0){ _1204.details=_1205; } this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,_1204); },setErrorMessage:function(_1206){ this.m_errorMessage=_1206; },getErrorMessage:function(){ if(this.m_errorMessage==null){ var _1207=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true); if(_1207.length>0){ var _1208=XMLHelper_FindChildByTagName(_1207[0],"messageString",false); this.checkAndSetErrorMessage(XMLHelper_GetText(_1208,false)); } } return this.m_errorMessage; },checkAndSetErrorMessage:function(_1209){ this.m_detailMessageStartIndex=1; if(_1209.indexOf("RSV-BBP-0038")==0){ _1209=RV_RES.IDS_CONV_CANCELED_ERROR; this.m_detailMessageStartIndex=0; } this.m_errorMessage=_1209; },getDetails:function(){ var _120a=""; var _120b=XMLHelper_FindChildrenByTagName(this.m_soapFault,"message",true); if(_120b.length>0){ if(typeof this.m_detailMessageStartIndex==="undefined"||this.m_detailMessageStartIndex===null){ this.m_detailMessageStartIndex=1; } for(var _120c=this.m_detailMessageStartIndex;_120c<_120b.length;++_120c){ var _120d=XMLHelper_FindChildByTagName(_120b[_120c],"messageString",false); _120a+=XMLHelper_GetText(_120d,false)+"\n"; } } return _120a; },retry:function(){ var _120e=this.m_oCV.getRetryDispatcherEntry(); this.hide(); if(_120e){ _120e.retryRequest(); }else{ var _120f=this.m_oCV.getViewerWidget().getOriginalFormFields(); if(_120f&&(_120f.get("b_action")=="cvx"||_120f.get("b_action")=="cvx.high")){ _120f.add("b_action","cognosViewer"); } this.m_oCV.executeAction("RetryRequest",_120f); } },ok:function(){ var _1210=this.m_oCV.getRetryDispatcherEntry(); this.hide(); if(_1210){ _1210.onCloseErrorDlg(); } },hide:function(){ this.m_oCV.getViewerWidget().fireEvent("com.ibm.bux.widget.notification",null,{remove:1}); this.m_oCV.getViewerWidget().setErrorDlg(null); this.m_oCV.setRetryDispatcherEntry(null); }}); function buxErrorPage_toggleErrorDetails(event,cvId,_1213){ if((event.button==0&&(event.keyCode=="0"||typeof event.keyCode=="undefined"))||event.keyCode=="32"||event.keyCode=="13"){ var _1214=document.getElementById("buxErrorPageDetailContentOuter"+cvId); var _1215=document.getElementById("buxErrorPageDetails"+cvId); var _1216=document.getElementById("titlePaneTitle"+cvId); var _1217=(_1215.style.display=="none"); dojo.removeClass(_1214,_1217?"dijitTitlePaneContentOuterClosed":"dijitTitlePaneContentOuterOpen"); dojo.addClass(_1214,_1217?"dijitTitlePaneContentOuterOpen":"dijitTitlePaneContentOuterClosed"); dojo.removeClass(_1216,_1217?"dijitClose":"dijitOpen"); dojo.addClass(_1216,_1217?"dijitOpen":"dijitClose"); _1215.style.display=_1217?"":"none"; } }; function ModalFaultDialog(){ }; ModalFaultDialog.prototype=new FaultDialog(); ModalFaultDialog.prototype.show=function(_1218){ var _1219=""; var _121a="",_121b=""; var _121c=XMLHelper_FindChildrenByTagName(_1218,"message",true); if(_121c.length>0){ for(var _121d=1;_121d<_121c.length;++_121d){ _121b=XMLHelper_FindChildByTagName(_121c[_121d],"messageString",false); _1219+=XMLHelper_GetText(_121b,false)+"\n"; } _121b=XMLHelper_FindChildByTagName(_121c[0],"messageString",false); _121a=XMLHelper_GetText(_121b,false); } bux.messageBox(bux.MB_ERROR,_121a,"",_1219); }; dojo.provide("GlobalPromptFaultDialog"); dojo.require("FaultDialog"); dojo.declare("GlobalPromptFaultDialog",FaultDialog,{m_sendRequestOnOK:false,setSendRequestOnOK:function(_121e){ this.m_sendRequestOnOK=_121e; },ok:function(){ this.hide(); this.m_oCV.getViewerWidget().disableListenToForGlobalPrompt(); if(this.m_sendRequestOnOK){ var _121f=this.m_oCV.getRetryDispatcherEntry(); var _1220=null; if(_121f){ _1220=_121f.getOriginalFormFields(); }else{ _1220=this.m_oCV.getViewerWidget().getOriginalFormFields(); } if(_1220&&_1220.exists("widget.globalPromptInfo")){ _1220.remove("widget.globalPromptInfo"); } this.retry(); } }}); dojo.provide("FaultMessageDialog"); dojo.declare("FaultMessageDialog",FaultDialog,{m_oCV:null,m_errorMessage:"",constructor:function(oCV,_1222){ this.m_errorMessage=_1222; },getErrorMessage:function(){ return this.m_errorMessage; },getDetails:function(){ return ""; },canRetryRequest:function(){ return false; }}); dojo.provide("WarningMessageDialog"); dojo.declare("WarningMessageDialog",FaultMessageDialog,{constructor:function(oCV,_1224){ },isWarningMessage:function(){ return true; }}); function LogOnDialog(oCV){ if(oCV){ this.m_oCV=oCV; } }; LogOnDialog.prototype=new ILogOnDialog(); LogOnDialog.prototype.getViewer=function(){ return this.m_oCV; }; LogOnDialog.prototype.handleUnknownHTMLResponse=function(_1226){ this.show(null); }; LogOnDialog.prototype.show=function(_1227){ var _1228=this.getPromptInfoNamespacesFromAuthenticationFault(_1227); if(window["CVEditContentActionInstance"]){ window["CVEditContentActionInstance"].transitionFromBUA(); } IWidgetLogonhandler.handleLogon(this.getViewer().getId(),_1228); }; LogOnDialog.prototype.getPromptInfoNamespacesFromAuthenticationFault=function(_1229){ if(!_1229){ return null; } var _122a=XMLHelper_FindChildByTagName(_1229,"CAM",true); if(_122a==null){ return null; } var _122b=XMLHelper_FindChildByTagName(_122a,"promptInfo",true); if(_122b==null){ return null; } var _122c=XMLHelper_FindChildByTagName(_122a,"displayObjects",true); if(_122c==null){ return null; } var items=XMLHelper_FindChildrenByTagName(_122c,"item",true); if(items==null||items.length!=1){ return null; } var _122e=items[0]; if(_122e==null){ return null; } var _122f=XMLHelper_FindChildByTagName(_122e,"name",true); var name=XMLHelper_GetText(_122f,false); if(name==="CAMNamespace"){ var _1231=XMLHelper_FindChildByTagName(_122e,"value",true); var value=XMLHelper_GetText(_1231,false); if(value!=null){ return value; } } return null; }; dojo.provide("LogOnHandler"); dojo.declare("LogOnHandler",null,{constructor:function(){ this.m_cvIdList=[]; },handleLogon:function(cvId,_1234){ this.m_cvIdList.push(cvId); if(this.m_cvIdList.length==1){ dojo["require"]("bux.dialogs.IFrameDialog"); var _1235=(_1234==null||_1234.length==0)?new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this)}):new bux.dialogs.LogonDialog({okHandler:GUtil.generateCallback(this.okHandler,[],this),cancelHandler:GUtil.generateCallback(this.cancelHandler,[],this),params:{"h_CAM_action":"logonAs","CAMNamespace":_1234}}); _1235.startup(); _1235.show(); } },okHandler:function(){ for(var index=0;index"; _1295.innerHTML=_1297; _1296.appendChild(_1295); } this.parent.show.call(this); }; RequestExecutedIndicator.prototype.hide=function(){ var _1298=document.getElementById("executionCursor"+this.getViewer().getId()); if(_1298!=null){ _1298.parentNode.removeChild(_1298); } this.parent.hide.call(this); }; dojo.provide("WorkingDialog"); dojo.declare("WorkingDialog",IRequestIndicator,{constructor:function(oCV){ this.m_oCV=oCV; this.m_sNamespace=oCV.getId(); this.m_sGateway=oCV.getGateway(); try{ var _129a=[]; if(oCV.getAdvancedServerProperty("VIEWER_JS_HIDE_CANCEL_BUTTON")!="true"){ _129a.push({"class":"icdDialogButton",label:RV_RES.CANCEL,onClick:dojo.hitch(this,this.doCancel)}); } this.m_waitPageDialog=new ViewerIWidgetInlineDialog(this.getCognosViewer(),this.getWaitPageHTML(),_129a,"waitButtonContainer_"+this.getCognosViewer().getId()); } catch(e){ if(console&&console.log){ console.log(e); } } },setSimpleWorkingDialogFlag:function(flag){ },getCognosViewer:function(){ return this.m_oCV; },show:function(){ this.m_waitPageDialog.show(); },getWaitPageHTML:function(){ var id=this.getCognosViewer().getId(); return ""+""+"
"+"
"+"
"+RV_RES.IDS_JS_WAIT_PAGE_LOADING+"
"+"
"+"
"+"
"; },hide:function(){ this.m_waitPageDialog.hide(); this.m_cancelCallback=null; },setCancelCallback:function(_129d){ this.m_cancelCallback=_129d; },doCancel:function(){ var oCV=this.getCognosViewer(); if(this.m_cancelCallback){ this.m_cancelCallback(); this.m_cancelCallback=null; }else{ var _129f=oCV.cancel(); if(_129f){ var _12a0=oCV.getViewerWidget().getUndoRedoQueue(); if(_12a0){ _12a0.handleCancel(); } } } if(oCV.isReportRenderingDone()){ this.hide(); }else{ var _12a1={action:"deleteWidget"}; oCV.getViewerWidget().iContext.iEvents.fireEvent("com.ibm.bux.widget.action",null,_12a1); } }}); dojo.provide("ModalFaultMessageDialog"); dojo.declare("ModalFaultMessageDialog",IFaultDialog,{m_errorMessage:"",m_errorDetails:"",constructor:function(_12a2,_12a3){ this.m_errorMessage=_12a2; this.m_errorDetails=_12a3; },getErrorMessage:function(){ return this.m_errorMessage; },getDetails:function(){ return this.m_errorDetails; },show:function(){ bux.messageBox(bux.MB_ERROR,this.getErrorMessage(),"",this.getDetails()); }}); dojo.provide("MissingMemberFaultDialog"); dojo.declare("MissingMemberFaultDialog",FaultDialog,{m_oCV:null,m_errorMessage:null,m_bHasBUACapability:false,m_bHasParameters:false,constructor:function(oCV,_12a5,_12a6,_12a7){ this.m_errorMessage=_12a5; this.m_bHasBUACapability=_12a6; this.m_bHasParameters=_12a7; },getErrorMessage:function(){ return this.m_errorMessage; },canRetryRequest:function(){ return false; },getButtons:function(){ var _12a8=[]; if(this.m_bHasBUACapability){ _12a8.push({label:RV_RES.IDS_JS_EDIT,action:dojo.hitch(this,this.invokeEditContentAction)}); } _12a8.push({label:RV_RES.IDS_JS_CLOSE,action:dojo.hitch(this,this.ok)}); return _12a8; },invokeEditContentAction:function(){ var _12a9={}; _12a9.oFaultDialog=this; _12a9.bHasParameters=this.m_bHasParameters; this.m_oCV.executeAction("EditContent",{"MissingMemberRecoveryMode":_12a9}); }}); function ViewerDispatcher(){ this.m_activeRequest=null; this.m_requestQueue=[]; this.m_bUsePageRequest=false; }; ViewerDispatcher.prototype.getActiveRequest=function(){ return this.m_activeRequest; }; ViewerDispatcher.prototype.setUsePageRequest=function(_12aa){ this.m_bUsePageRequest=_12aa; }; ViewerDispatcher.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; ViewerDispatcher.prototype.dispatchRequest=function(_12ab){ if(this.m_activeRequest==null){ this.startRequest(_12ab); }else{ if(_12ab.canBeQueued()==true){ this.m_requestQueue.push(_12ab); }else{ if(window.cognosViewerDebug&&console&&console.warn){ console.warn("Warning! Dropped a dispatcher entry!"); } } } }; ViewerDispatcher.prototype.startRequest=function(_12ac){ this.m_activeRequest=_12ac; if(_12ac!=null){ _12ac.setUsePageRequest(this.m_bUsePageRequest); _12ac.sendRequest(); } }; ViewerDispatcher.prototype.cancelRequest=function(key){ for(var i=0;i0){ _12b1=this.m_requestQueue.shift(); if(_12b1.getKey()!=null){ while(this.m_requestQueue.length>0&&this.m_requestQueue[0].getKey()==_12b1.getKey()){ _12b1=this.m_requestQueue.shift(); } } } return _12b1; }; ViewerDispatcher.prototype.queueIsEmpty=function(){ return (this.m_requestQueue.length==0); }; function DispatcherEntry(oCV){ this.m_oCV=oCV; this.m_requestKey=null; this.m_canBeQueued=false; this.m_originalFormFields=null; this.m_bUsePageRequest=false; if(oCV){ if(!this.m_request){ this.m_request=new XmlHttpObject(); this.m_request.init("POST",this.m_oCV.getGateway(),"",true); } if(!this.m_requestHandler){ this.setRequestHandler(new BaseRequestHandler(oCV)); } DispatcherEntry.prototype.setDefaultFormFields.call(this); this.setCallbacks({"entryComplete":{"object":this,"method":this.onEntryComplete},"entryFault":{"object":this,"method":this.onEntryFault},"newRequest":{"object":this,"method":this.onNewRequest},"fault":{"object":this,"method":this.onFault},"error":{"object":this,"method":this.onError},"passportTimeout":{"object":this,"method":this.onPassportTimeout},"working":{"object":this,"method":this.onWorking},"prompting":{"object":this,"method":this.onPrompting},"preHttpRequest":{"object":this,"method":this.onPreHttpRequest},"postHttpRequest":{"object":this,"method":this.onPostHttpRequest},"postEntryComplete":{"object":this,"method":this.onPostEntryComplete}}); } }; DispatcherEntry.prototype.setHeaders=function(_12b3){ this.m_request.setHeaders(_12b3); }; DispatcherEntry.prototype.getHeaders=function(){ return this.m_request.getHeaders(); }; DispatcherEntry.prototype.setOriginalFormFields=function(_12b4){ this.m_originalFormFields=_12b4; }; DispatcherEntry.prototype.getOriginalFormFields=function(){ return this.m_originalFormFields; }; DispatcherEntry.prototype.setRequestHandler=function(_12b5){ _12b5.addCallbackHooks(); this.m_requestHandler=_12b5; }; DispatcherEntry.prototype.getRequestHandler=function(){ return this.m_requestHandler; }; DispatcherEntry.prototype.setWorkingDialog=function(_12b6){ if(this.getRequestHandler()){ this.m_requestHandler.setWorkingDialog(_12b6); } }; DispatcherEntry.prototype.setRequestIndicator=function(_12b7){ if(this.getRequestHandler()){ this.getRequestHandler().setRequestIndicator(_12b7); } }; DispatcherEntry.prototype.forceSynchronous=function(){ this.getRequest().forceSynchronous(); }; DispatcherEntry.prototype.setUsePageRequest=function(_12b8){ this.m_bUsePageRequest=_12b8; }; DispatcherEntry.prototype.getUsePageRequest=function(){ return this.m_bUsePageRequest; }; DispatcherEntry.prototype.setDefaultFormFields=function(){ var _12b9=this.getViewer().envParams; this.addFormField("b_action","cognosViewer"); this.addFormField("cv.catchLogOnFault","true"); this.addDefinedNonNullFormField("protectParameters",_12b9["protectParameters"]); this.addDefinedNonNullFormField("ui.routingServerGroup",_12b9["ui.routingServerGroup"]); this.addDefinedNonNullFormField("cv.debugDirectory",_12b9["cv.debugDirectory"]); this.addDefinedNonNullFormField("cv.showFaultPage",_12b9["cv.showFaultPage"]); this.addDefinedNonNullFormField("cv.useRAPDrill",_12b9["cv.useRAPDrill"]); this.addDefinedNonNullFormField("container",_12b9["container"]); this.addNonEmptyStringFormField("cv.objectPermissions",_12b9["cv.objectPermissions"]); }; DispatcherEntry.prototype.getViewer=function(){ return this.m_oCV; }; DispatcherEntry.prototype.prepareRequest=function(){ }; DispatcherEntry.addWidgetInfoToFormFields=function(_12ba,_12bb){ if(_12ba){ var _12bc=_12ba.getBUXRTStateInfoMap(); if(_12bc){ _12bb.addFormField("cv.buxRTStateInfo",_12bc); } var _12bd=_12ba.getDisplayName(); if(_12bd&&_12bd.length>0){ _12bb.addFormField("displayTitle",_12bd); } } }; DispatcherEntry.prototype.canBeQueued=function(){ return this.m_canBeQueued; }; DispatcherEntry.prototype.setCanBeQueued=function(_12be){ this.m_canBeQueued=_12be; }; DispatcherEntry.prototype.getKey=function(){ return this.m_requestKey; }; DispatcherEntry.prototype.setKey=function(key){ this.m_requestKey=key; }; DispatcherEntry.prototype.setRequest=function(_12c0){ this.m_request=_12c0; }; DispatcherEntry.prototype.getRequest=function(){ return this.m_request; }; DispatcherEntry.prototype.setCallbacks=function(_12c1){ this.getRequest().setCallbacks(_12c1); }; DispatcherEntry.prototype.getCallbacks=function(){ return this.getRequest().getCallbacks(); }; DispatcherEntry.prototype.sendRequest=function(){ this.prepareRequest(); var _12c2=this.getRequest().getFormFields(); var _12c3=_12c2.keys(); if(!this.m_originalFormFields){ this.m_originalFormFields=new CDictionary(); for(var index=0;index<_12c3.length;index++){ this.m_originalFormFields.add(_12c3[index],_12c2.get(_12c3[index])); } } this.getRequest().sendRequest(); }; DispatcherEntry.prototype.onNewRequest=function(_12c5){ this.setRequest(_12c5); }; DispatcherEntry.prototype.retryRequest=function(){ var oCV=this.getViewer(); oCV.setRetryDispatcherEntry(null); var _12c7=this.getRequest().newRequest(); _12c7.setHeaders(null); this.setRequest(_12c7); var _12c8=this.m_originalFormFields.keys(); for(var index=0;index<_12c8.length;index++){ var _12ca=_12c8[index]; var _12cb=this.m_originalFormFields.get(_12ca); if(_12ca=="cv.responseFormat"&&_12cb=="iWidget"){ this.addFormField("cv.responseFormat","data"); }else{ if(_12ca=="ui.action"&&_12cb=="wait"){ this.addFormField("ui.action",this.m_originalFormFields.get("ui.primaryAction")); }else{ if(_12ca!="m_tracking"&&_12ca!="cv.outputKey"){ this.addFormField(_12ca,_12cb); } } } } this.addFormField("widget.reloadToolbar","true"); if(this.m_oCV.getViewerWidget()){ this.addFormField("cv.buxCurrentUserRole",this.m_oCV.getViewerWidget().getUserRole()); } this.addNonEmptyStringFormField("cv.objectPermissions",oCV.envParams["cv.objectPermissions"]); this.addNonEmptyStringFormField("limitedInteractiveMode",oCV.envParams["limitedInteractiveMode"]); this.m_oCV.getViewerDispatcher().dispatchRequest(this); }; DispatcherEntry.prototype.abortHttpRequest=function(){ if(!this.m_bCancelCalled){ if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } this.m_bCancelCalled=true; this.getRequest().abortHttpRequest(); this.onEntryComplete(); } }; DispatcherEntry.prototype.cancelRequest=function(_12cc){ if(!this.m_bCancelCalled){ this.m_bCancelCalled=true; if(this.getRequestHandler()){ this.getRequestHandler().onCancel(); } if(_12cc){ this.getRequest().forceSynchronous(); } this.getRequest().cancel(); this.onEntryComplete(); } }; DispatcherEntry.prototype.getFormFields=function(){ return this.m_request.getFormFields(); }; DispatcherEntry.prototype.getFormField=function(name){ if(this.m_request){ return this.m_request.getFormField(name); }else{ return ""; } }; DispatcherEntry.prototype.clearFormFields=function(){ this.m_request.clearFormFields(); }; DispatcherEntry.prototype.formFieldExists=function(name){ if(this.m_request){ return this.m_request.getFormFields().exists(name); } return false; }; DispatcherEntry.prototype.removeFormField=function(name){ if(this.formFieldExists(name)){ this.m_request.getFormFields().remove(name); } }; DispatcherEntry.prototype.addFormField=function(name,value){ this.m_request.addFormField(name,value); }; DispatcherEntry.prototype.addDefinedNonNullFormField=function(name,value){ if(typeof value!="undefined"&&value!=null){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addDefinedFormField=function(name,value){ if(typeof value!="undefined"){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addNonNullFormField=function(name,value){ if(value!=null){ this.addFormField(name,value); } }; DispatcherEntry.prototype.addNonEmptyStringFormField=function(name,value){ if(typeof value!="undefined"&&value!=null&&value!=""){ this.addFormField(name,value); } }; DispatcherEntry.prototype.onWorking=function(_12da,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onWorking(_12da); } }; DispatcherEntry.prototype.onFault=function(_12dc){ if(this.getRequestHandler()){ this.getRequestHandler().onFault(_12dc); } }; DispatcherEntry.prototype.onError=function(_12dd){ if(this.m_bCancelCalled){ return; } if(this.getRequestHandler()){ this.getRequestHandler().onError(_12dd); } }; DispatcherEntry.prototype.possibleUnloadEvent=function(){ this.setCallbacks({"error":{}}); }; DispatcherEntry.prototype.onPreHttpRequest=function(_12de){ if(this.getRequestHandler()){ this.getRequestHandler().preHttpRequest(_12de); } }; DispatcherEntry.prototype.onPostHttpRequest=function(_12df){ if(this.getRequestHandler()){ this.getRequestHandler().postHttpRequest(_12df); } }; DispatcherEntry.prototype.onPassportTimeout=function(_12e0){ if(this.getRequestHandler()){ this.getRequestHandler().onPassportTimeout(_12e0); } }; DispatcherEntry.prototype.onPrompting=function(_12e1){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_12e1); } }; DispatcherEntry.prototype.onEntryComplete=function(_12e2){ if(!this.m_oCV._beingDestroyed){ this.m_oCV.getViewerDispatcher().requestComplete(this); } }; DispatcherEntry.prototype.onEntryFault=function(_12e3){ this.m_oCV.setFaultDispatcherEntry(this); this.m_oCV.resetViewerDispatcher(); if(!this.m_bCancelCalled){ this.m_oCV.setRetryDispatcherEntry(this); } }; DispatcherEntry.prototype.onCloseErrorDlg=function(){ var _12e4=this.getCallbacks(); if(_12e4["closeErrorDlg"]){ var _12e5=GUtil.generateCallback(_12e4["closeErrorDlg"].method,[],_12e4["closeErrorDlg"].object); _12e5(); } }; DispatcherEntry.prototype.onPostEntryComplete=function(){ if(this.getRequestHandler()){ this.getRequestHandler().onPostEntryComplete(); } this.executeCallback("postComplete"); }; DispatcherEntry.prototype.executeCallback=function(_12e6){ var _12e7=this.getCallbacks(); if(_12e7[_12e6]){ var _12e8=(_12e7.customArguments)?[this,_12e7.customArguments]:[this]; var _12e9=GUtil.generateCallback(_12e7[_12e6].method,_12e8,_12e7[_12e6].object); _12e9(); return true; } return false; }; function DataDispatcherEntry(oCV){ if(oCV){ this.setRequest(new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot())); } DataDispatcherEntry.baseConstructor.call(this,oCV); }; DataDispatcherEntry.prototype=new DispatcherEntry(); DataDispatcherEntry.baseConstructor=DispatcherEntry; function JSONDispatcherEntry(oCV){ if(oCV){ this.setRequest(new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot())); } JSONDispatcherEntry.prototype.setDefaultFormFields.call(this); JSONDispatcherEntry.baseConstructor.call(this,oCV); }; JSONDispatcherEntry.prototype=new DispatcherEntry(); JSONDispatcherEntry.baseConstructor=DispatcherEntry; JSONDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","JSON"); }; function AsynchDataDispatcherEntry(oCV){ if(oCV){ var _12ed=new AsynchDATARequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_12ed); AsynchDataDispatcherEntry.baseConstructor.call(this,oCV); AsynchDataDispatcherEntry.prototype.setDefaultFormFields.call(this); } }; AsynchDataDispatcherEntry.prototype=new DispatcherEntry(); AsynchDataDispatcherEntry.baseConstructor=DispatcherEntry; AsynchDataDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","data"); }; function AsynchJSONDispatcherEntry(oCV){ if(oCV){ var _12ef=new AsynchJSONRequest(oCV.getGateway(),oCV.getWebContentRoot()); this.setRequest(_12ef); AsynchJSONDispatcherEntry.baseConstructor.call(this,oCV); AsynchJSONDispatcherEntry.prototype.setDefaultFormFields.call(this); } }; AsynchJSONDispatcherEntry.prototype=new DispatcherEntry(); AsynchJSONDispatcherEntry.baseConstructor=DispatcherEntry; AsynchJSONDispatcherEntry.prototype.setDefaultFormFields=function(){ this.addFormField("cv.responseFormat","asynchJSON"); }; function ReportDispatcherEntry(oCV){ ReportDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ ReportDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setRequestHandler(new RequestHandler(oCV)); this.setWorkingDialog(oCV.getWorkingDialog()); this.setRequestIndicator(oCV.getRequestIndicator()); this.setCallbacks({"complete":{"object":this,"method":this.onComplete},"prompting":{"object":this,"method":this.onComplete}}); } }; ReportDispatcherEntry.prototype=new AsynchDataDispatcherEntry(); ReportDispatcherEntry.baseConstructor=AsynchDataDispatcherEntry; ReportDispatcherEntry.prototype.parent=AsynchDataDispatcherEntry.prototype; ReportDispatcherEntry.prototype.prepareRequest=function(){ var _12f1=this.getFormField("ui.action"); var _12f2=this.getViewer().getActionState(); if(_12f2!==""&&(_12f1=="wait"||_12f1=="forward"||_12f1=="back")){ this.addFormField("cv.actionState",_12f2); } var _12f3=["nextPage","previousPage","firstPage","lastPage","reportAction","cancel","wait"]; var _12f4=true; for(var i=0;i<_12f3.length;i++){ if(_12f3[i]==_12f1){ _12f4=false; break; } } if(_12f4){ this.getViewer().clearTabs(); } if(this.getViewer().getCurrentlySelectedTab()&&!this.formFieldExists("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup")&&this.getViewer().getStatus()!="prompting"){ this.addFormField("generic.anyURI.http://developer.cognos.com/ceba/constants/runOptionEnum#pageGroup",this.getViewer().getCurrentlySelectedTab()); } }; ReportDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var _12f7=oCV.envParams; this.addFormField("cv.id",oCV.getId()); if(_12f7["cv.showFaultPage"]){ this.addFormField("cv.showFaultPage",_12f7["cv.showFaultPage"]); }else{ this.addFormField("cv.showFaultPage","false"); } this.addDefinedNonNullFormField("ui.object",_12f7["ui.object"]); this.addDefinedNonNullFormField("ui.primaryAction",_12f7["ui.primaryAction"]); this.addDefinedNonNullFormField("ui.objectClass",_12f7["ui.objectClass"]); this.addNonEmptyStringFormField("specificationType",_12f7["specificationType"]); this.addNonEmptyStringFormField("cv.promptForDownload",_12f7["cv.promptForDownload"]); this.addNonEmptyStringFormField("ui.conversation",oCV.getConversation()); this.addNonEmptyStringFormField("m_tracking",oCV.getTracking()); var _12f8=oCV.getExecutionParameters(); this.addNonEmptyStringFormField("executionParameters",_12f8); var sCAF=oCV.getCAFContext(); this.addDefinedNonNullFormField("ui.cafcontextid",sCAF); }; ReportDispatcherEntry.prototype.onWorking=function(_12fa,arg1){ var _12fc=_12fa.getResponseState(); var _12fd=this.getRequestHandler(); if(_12fd){ var _12fe=_12fd.getWorkingDialog(); if(_12fe&&_12fe.setSecondaryRequests&&_12fc.m_aSecRequests){ _12fe.setSecondaryRequests(_12fc.m_aSecRequests); } } DispatcherEntry.prototype.onWorking.call(this,_12fa,arg1); if(_12fd){ this.getRequestHandler().updateViewerState(_12fc); } }; ReportDispatcherEntry.prototype.onComplete=function(_12ff,arg1){ if(this.getRequestHandler()){ this.getRequestHandler().onComplete(_12ff); } }; function ViewerDispatcherEntry(oCV){ ViewerDispatcherEntry.baseConstructor.call(this,oCV); if(oCV){ ViewerDispatcherEntry.prototype.setDefaultFormFields.call(this); this.setCallbacks({"prompting":{"object":this,"method":this.onPrompting}}); var _1302=oCV.getViewerWidget(); if(_1302.m_originalFormFields){ this.setOriginalFormFields(_1302.m_originalFormFields); _1302.m_originalFormFields=null; } } }; ViewerDispatcherEntry.prototype=new ReportDispatcherEntry(); ViewerDispatcherEntry.baseConstructor=ReportDispatcherEntry; ViewerDispatcherEntry.prototype.parent=ReportDispatcherEntry.prototype; ViewerDispatcherEntry.prototype.prepareRequest=function(){ this.parent.prepareRequest.call(this); var _1303=this.getViewer().getViewerWidget(); if(this.getFormField("widget.reloadToolbar")){ this.addFormField("cv.buxCurrentUserRole",_1303.getUserRole()); } if(_1303){ DispatcherEntry.addWidgetInfoToFormFields(_1303,this); } this.getViewer().inlineScriptsDoneExecuting=false; }; ViewerDispatcherEntry.prototype.setDefaultFormFields=function(){ var oCV=this.getViewer(); var _1305=oCV.getViewerWidget(); var _1306=oCV.envParams; this.addFormField("bux","true"); this.addFormField("cv.showFaultPage","false"); this.addDefinedNonNullFormField("baseReportModificationTime",_1306["baseReportModificationTime"]); this.addDefinedNonNullFormField("originalReport",_1306["originalReport"]); this.addDefinedNonNullFormField("ui.reportDrop",_1306["ui.reportDrop"]); this.addDefinedNonNullFormField("ui.preserveRapTags",_1306["ui.preserveRapTags"]); if(_1305.getProperties()){ var _1307=_1305.getProperties().getFlashCharts(); if(_1307!=null){ this.addDefinedNonNullFormField("savedFlashChartOption",_1307); if(_1306.hasAVSChart){ this.addDefinedNonNullFormField("hasAVSChart",_1306.hasAVSChart); }else{ this.addDefinedNonNullFormField("hasAVSChart",oCV.hasAVSChart()); } } } var _1308=_1305.getAttributeValue("gateway"); if(_1308){ this.addDefinedNonNullFormField("cv.gateway",_1308); } var _1309=_1305.getAttributeValue("webcontent"); if(_1309){ this.addDefinedNonNullFormField("cv.webcontent",_1309); } if(oCV.envParams["cv.outputKey"]){ this.addFormField("cv.outputKey",oCV.envParams["cv.outputKey"]); this.addFormField("b_action","cvx.high"); delete oCV.envParams["cv.outputKey"]; } if(_1305.getXNodeId()){ this.setHeaders({"X-Node-ID":_1305.getXNodeId()}); _1305.setXNodeId(null); } }; ViewerDispatcherEntry.prototype.onPrompting=function(_130a){ if(this.getRequestHandler()){ this.getRequestHandler().onPrompting(_130a); } }; function Blocker(oCVId){ this.oCV_Id=oCVId; this.m_viewerDiv=dojo.byId("RVContent"+this.oCV_Id); this.m_containerDiv=this._findContainerDiv(); this.initialize(); }; Blocker.prototype._findContainerDiv=function(){ var _130c=null; if(!this.m_containerDiv){ _130c=this.m_viewerDiv; while(_130c){ if(_130c.style&&_130c.style.height&&_130c.style.height.indexOf("px")!=-1){ return _130c; } _130c=_130c.parentNode; } } if(typeof console!="undefined"&&console&&console.log){ console.log("ViewerIWidgetInlineDialog: Could not find the container div for showing the dialog."); } return this.m_viewerDiv; }; Blocker.prototype.setClassNameOverride=function(_130d){ if(!_130d){ return; } this.m_classNameOverride=_130d; this.applyClassNameOverride(); }; Blocker.prototype.applyClassNameOverride=function(){ if(!this.m_classNameOverride||!this.m_background){ return; } dojo.removeClass(this.m_background); dojo.addClass(this.m_background,this.m_classNameOverride); }; Blocker.prototype.getNode=function(){ return this.m_background; }; Blocker.prototype.initialize=function(){ if(!this.m_background){ this.m_background=dojo.byId("BACKGROUND"+this.oCV_Id); if(!this.m_background){ this.m_background=document.createElement("div"); this.m_background.id="BACKGROUND"+this.oCV_Id; this.m_background.className="report-blocker"; this.m_background.tabIndex="0"; dojo.place(this.m_background,this.m_containerDiv,"before"); } } }; Blocker.prototype.show=function(){ if(this.m_background){ this.m_background.style.display="block"; } }; Blocker.prototype.hide=function(){ if(this.m_background){ this.m_background.style.display="none"; } }; Blocker.prototype.destroy=function(){ if(this.m_background!=null){ this.m_background.parentNode.removeChild(this.m_background); this.m_background=null; } }; function ReselectAction(oCV,_130f){ this.m_aSelectionFilterObjects=_130f; this.m_oCV=oCV; this.m_oSC=oCV.getSelectionController(); this.m_cd=this.m_oSC.getCCDManager().m_cd; this.m_md=this.m_oSC.getCCDManager().m_md; this.m_nReportDiv=oCV.getReportDiv(); this.m_oRAPReportContainers=oCV.getRAPReportInfo().getContainers(); }; ReselectAction.prototype.executeAction=function(){ this.mapCdMd(); if(this.show()){ var oVW=this.m_oCV.getViewerWidget(); if(oVW){ var _1311=oVW.m_oWidgetContextManager.genSelectionPayload(this.m_oCV,oVW.getWidgetId()); oVW.setSelectionFilterSent(true); oVW.fireEvent("com.ibm.bux.data.filterCache.init",null,_1311); if(oVW.isPastedWidget()&&!oVW.pastedSelectedBroadcasted){ oVW.pastedSelectedBroadcasted=true; oVW.onSelectionChange(); } } } }; ReselectAction.prototype.mapCdMd=function(){ var _1312=this.m_aSelectionFilterObjects; for(var i in _1312){ var _1314=_1312[i]; var oItem=_1314.selectedItem; var aCtx=[]; var _1317=null; var _1318=this._findMdIndex("q",_1314.query); _1317=this._setNewCtx(oItem,_1318); if(_1317){ aCtx.push(_1317); }else{ continue; } for(var j in _1314.context){ var _131a=_1314.context[j]; _1317=this._setNewCtx(_131a,_1318); if(_1317){ aCtx.push(_1317); } } _1314.ctxArray=aCtx; } }; ReselectAction.prototype._setNewCtx=function(oItem,_131c){ var _131d=null; var ctxId=null; if(oItem.isMeasure==="true"){ _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c); if(_131d){ oItem.ctxRef={"property":oItem.mdProperty,"mdIndex":_131d}; return oItem.ctxRef; } }else{ if(oItem.mun){ _131d=this._findMdIndex("m",oItem.mun,_131c); ctxId=this._getContextIdForCdProperty(_131c,"m",_131d); }else{ _131d=this._findMdIndex(oItem.mdProperty,oItem.mdValue,_131c); ctxId=this._getContextIdForCdPropertyAndMdProperty(_131c,"u",oItem.use,oItem.mdProperty,_131d); } if(ctxId){ oItem.ctxId=ctxId; return oItem.ctxId; } } return null; }; ReselectAction.prototype._getContextIdForCdProperty=function(_131f,_1320,_1321){ var ctxid=null; for(var j in this.m_cd){ if(this.m_cd[j].q==_131f&&this.m_cd[j][_1320]==_1321){ ctxid=j; break; } } return ctxid; }; ReselectAction.prototype._getContextIdForCdPropertyAndMdProperty=function(_1324,_1325,_1326,_1327,_1328){ var ctxid=null; for(var j in this.m_cd){ if(this.m_cd[j].q==_1324&&this.m_cd[j][_1327]==_1328&&this.m_cd[j][_1325]==_1326){ ctxid=j; break; } } return ctxid; }; ReselectAction.prototype._findMdIndex=function(_132b,value,_132d){ var _132e=null; for(var j in this.m_md){ if(this.m_md[j][_132b]===value){ if(this.m_md[j]["q"]&&_132d){ if(this.m_md[j]["q"]==_132d){ _132e=j; break; } }else{ _132e=j; break; } } } return _132e; }; ReselectAction.prototype.show=function(){ var _1330=false; var oCV=this.m_oCV; var oVW=oCV.getViewerWidget(); var _1333=oCV.getReportDiv(); var _1334=null; var _1335=null; var _1336=null; oVW.preprocessPageClicked(false); if(oVW&&_1333){ for(var _1337 in this.m_aSelectionFilterObjects){ var _1338=this.m_aSelectionFilterObjects[_1337]; var _1339=(_1338.selectedItem.isMeasure==="true"); var _133a=true; if(_1339){ var _133b=_1338.context; for(var idx in _133b){ if(_133b[idx].isMeasure!=="true"){ _133a=false; break; } } if(_133a){ continue; } } var aCtx=_1338.ctxArray; if(aCtx&&aCtx.length>0){ _1334=this._getLayoutContainers(_1338.lid); var _133e=false; for(var _133f=0;!_133e&&_133f<_1334.length;_133f++){ if(/img|IMG/.test(_1334[_133f].tagName)){ var _1340=_1334[_133f]; for(_1336=null;!_1336&&_1340.parentNode;){ _1340=_1340.parentNode; var _1341=_1340.getElementsByTagName("map"); if(_1341&&_1341.length>0){ _1336=_1341[0]; } } }else{ _1336=_1334[_133f].parentNode; } if(_1336){ var _1342=this._buildCtxQueryRegExp(aCtx); _1335=getElementsByAttribute(_1336,"*","ctx",null,-1,_1342); var _1343=_1338.selectedItem; for(var idx in _1335){ if(_1335[idx].getAttribute){ if(_1339&&_1343.isDataValueOrChartElement==="false"&&(_1335[idx].getAttribute("type")==="datavalue"||_1335[idx].getAttribute("type")==="chartElement")){ continue; } if(this.isMatchingCell(aCtx,_1335[idx])){ var _1344=_1335[idx]; if(_1344.tagName==="SPAN"||_1344.tagName==="span"){ var _1345=_1344.parentNode.tagName; if(_1345=="td"||_1345=="TD"||_1345=="TH"||_1345=="th"){ if(_1344.parentNode.getAttribute("ctx")==_1344.getAttribute("ctx")){ continue; } } } var evt={"target":_1344,"button":1,"ctrlKey":true}; this.m_oSC.pageClicked(evt); _133e=true; _1330=true; } } } } } } } } return _1330; }; ReselectAction.prototype.isMatchingCell=function(aCtx,_1348){ var _1349=_1348.getAttribute("ctx"); if(!_1349||_1349.length==0){ return false; } var _134a=_1349.replace(/::/g,":").split(":"); var _134b=0; var _134c=null; var _134d=0; var _134e=null; var _134f=0; var _1350=false; for(;_134b<_134a.length;_134b++){ if(_134a[_134b].length>0){ _134c=_134a[_134b++]; break; } } _134e=aCtx[_134d]; if(typeof _134e=="string"){ if(_134e==_134c){ _134f++; } }else{ if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){ _134f++; } } if(_134f!=1){ return false; } if(aCtx.length==1){ _1350=true; } for(_134d=1;!_1350&&_134d0&&_134a[_134b]!="0"){ _134c=_134a[_134b]; if(_134e==_134c){ _134f++; _134a[_134b]="0"; break; } } } }else{ for(_134b=1;_134b<_134a.length;_134b++){ if(_134a[_134b].length>0&&_134a[_134b]!="0"){ _134c=_134a[_134b]; if(this.m_cd[_134c][_134e.property]==_134e.mdIndex){ _134f++; _134a[_134b]="0"; break; } } } } if(aCtx.length==_134f){ _1350=true; } } return _1350; }; ReselectAction.prototype._buildCtxQueryRegExp=function(aCtx){ var _1352=""; var _1353=false; var i=0; if(typeof aCtx[i]=="string"){ _1352+="^"+aCtx[i]; }else{ _1352+="^[\\d:]+"; } i++; var _1355=""; for(;!_1353&&i0){ _1355+="+"; } _1355+=aCtx[i]; _1353=true; }else{ if(i0){ _1355+="+"; } _1355+="[\\d:]"; } } } if(_1355.length>0){ _1352+=":{1,}"+_1355; } return new RegExp(_1352); }; ReselectAction.prototype._getLayoutContainers=function(sLid){ var _1357=""; if(this.m_oRAPReportContainers&&this.m_oRAPReportContainers[sLid]){ _1357=sLid+".+"; }else{ for(var name in this.m_oRAPReportContainers){ if(_1357.length>0){ _1357+="|"; } _1357+=name+".+"; } } return getElementsByAttribute(this.m_nReportDiv,"*","lid",null,-1,new RegExp(_1357)); };