"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["my_account-notification-NotificationViewController"],{2159:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"NotificationViewController\": () => (/* binding */ NotificationViewController)\n/* harmony export */ });\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\nclass NotificationViewController extends BaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '#notification_view_container',\n\n\t\t\tis_viewing: null,\n\t\t\tstatus_id_array: null,\n\t\t\ttype_id_array: null\n\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit( options ) {\n\t\t//this._super('initialize', options );\n\t\tthis.edit_view_tpl = 'NotificationEditView.html';\n\t\tthis.permission_id = 'notification';\n\t\tthis.viewId = 'Notification';\n\t\tthis.script_name = 'NotificationView';\n\t\tthis.table_name_key = 'Notification';\n\t\tthis.navigate_link = '';\n\t\tthis.selected_payload = {};\n\t\tthis.context_menu_name = $.i18n._( 'Notifications' );\n\t\tthis.navigation_label = $.i18n._( 'Notification' );\n\t\tthis.api = TTAPI.APINotification;\n\n\t\tthis.is_viewing = false;\n\n\t\tthis.render();\n\t\tthis.buildContextMenu();\n\n\t\tthis.initData();\n\t}\n\n\tinitOptions() {\n\t\tthis.initDropDownOption( 'type', 'type_id', this.api );\n\t\tthis.initDropDownOption( 'status', 'status_id', this.api );\n\t}\n\n\tonGridDblClickRow( e ) {\n\t\t// shorten it's path as its only ever a view click\n\t\tProgressBar.showOverlay();\n\t\tthis.onViewClick();\n\t\tthis.setDefaultMenu( true );\n\t}\n\n\tgetFilterColumnsFromDisplayColumns() {\n\t\tvar column_filter = {};\n\n\t\tcolumn_filter.id = true;\n\t\tcolumn_filter.object_id = true;\n\t\tcolumn_filter.payload_data = true;\n\t\tcolumn_filter.status_id = true;\n\n\t\t// Error: Unable to get property 'getGridParam' of undefined or null reference\n\t\tvar display_columns = [];\n\t\tif ( this.grid ) {\n\t\t\tdisplay_columns = this.grid.getGridParam( 'colModel' );\n\t\t}\n\n\t\tif ( display_columns ) {\n\t\t\tvar len = display_columns.length;\n\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar column_info = display_columns[i];\n\t\t\t\tcolumn_filter[column_info.name] = true;\n\t\t\t}\n\t\t}\n\n\t\treturn column_filter;\n\t}\n\n\tsetGridCellBackGround() {\n\t\tvar data = this.grid.getGridParam( 'data' );\n\n\t\t//Error: TypeError: data is undefined in /interface/html5/framework/jquery.min.js?v=7.4.6-20141027-074127 line 2 > eval line 70\n\t\tif ( !data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar len = data.length;\n\n\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\tvar item = data[i];\n\n\t\t\tif ( item.status_id == 10 ) {\n\t\t\t\t$( 'tr[id=\\'' + item.id + '\\'] td' ).css( 'font-weight', 'bold' );\n\t\t\t}\n\t\t}\n\t}\n\n\tgetCustomContextMenuModel() {\n\t\tvar context_menu_model = {\n\t\t\tgroups: {\n\t\t\t\tother: {\n\t\t\t\t\tlabel: $.i18n._( 'Other' ),\n\t\t\t\t\tid: this.script_name + 'other',\n\t\t\t\t\tsort_order: 9000\n\t\t\t\t},\n\t\t\t\tmark: {\n\t\t\t\t\tlabel: $.i18n._( 'Mark' ),\n\t\t\t\t\tid: this.viewId + 'mark',\n\t\t\t\t\tsort_order: 8000\n\t\t\t\t}\n\t\t\t},\n\t\t\texclude: [\n\t\t\t\t'save_and_continue',\n\t\t\t\t'save_and_next',\n\t\t\t\t'save_and_new',\n\t\t\t\t'save_and_copy',\n\t\t\t\t'save',\n\t\t\t\t'copy',\n\t\t\t\t'copy_as_new',\n\t\t\t\t'edit',\n\t\t\t\t'new_add',\n\t\t\t\t'add',\n\t\t\t\t'mass_edit',\n\t\t\t\t'export_excel',\n\t\t\t\t'delete_and_next'\n\n\t\t\t],\n\t\t\tinclude: [\n\t\t\t\t'view',\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Jump To' ),\n\t\t\t\t\tid: 'navigate',\n\t\t\t\t\tvue_icon: 'tticon tticon-north_east_black_24dp',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\tpermission_result: true,\n\t\t\t\t\tpermission: 8200,\n\t\t\t\t\tsort_order: 8100\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: '', //Empty label. vue_icon is displayed instead of text.\n\t\t\t\t\tid: 'other_header',\n\t\t\t\t\tmenu_align: 'right',\n\t\t\t\t\taction_group: 'other',\n\t\t\t\t\taction_group_header: true,\n\t\t\t\t\tvue_icon: 'tticon tticon-more_vert_black_24dp',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Mark: Read' ),\n\t\t\t\t\tid: 'read',\n\t\t\t\t\tmenu_align: 'left',\n\t\t\t\t\taction_group: 'mark',\n\t\t\t\t\tpermission_result: true,\n\t\t\t\t\tpermission: null,\n\t\t\t\t\tsort_order: 8000\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: $.i18n._( 'Mark: UnRead' ),\n\t\t\t\t\tid: 'unread',\n\t\t\t\t\tmenu_align: 'left',\n\t\t\t\t\taction_group: 'mark',\n\t\t\t\t\tpermission_result: true,\n\t\t\t\t\tpermission: null,\n\t\t\t\t\tsort_order: 8100\n\t\t\t\t},\n\t\t\t]\n\t\t};\n\n\t\treturn context_menu_model;\n\t}\n\n\tonCustomContextClick( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'close_misc':\n\t\t\tcase 'cancel':\n\t\t\t\tthis.onCancelClick();\n\t\t\t\tbreak;\n\t\t\tcase 'read':\n\t\t\t\tthis.onReadClick();\n\t\t\t\tbreak;\n\t\t\tcase 'unread':\n\t\t\t\tthis.onUnReadClick();\n\t\t\t\tbreak;\n\t\t\tcase 'navigate':\n\t\t\t\tthis.onNavigateClick();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\toncancelClick() {\n\t\tthis.removeEditView();\n\t}\n\n\tonReadClick() {\n\t\tvar notification_ids = [];\n\t\tif ( this.is_viewing && this.current_edit_record ) {\n\t\t\tnotification_ids.push( this.current_edit_record.id );\n\t\t} else {\n\t\t\tnotification_ids = this.getGridSelectIdArray();\n\t\t}\n\n\t\tif ( notification_ids.length > 0 ) {\n\t\t\tvar $this = this;\n\n\t\t\tthis.api['setNotificationStatus']( notification_ids, 20, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( $this.is_viewing ) {\n\t\t\t\t\t\t$this.removeEditView();\n\t\t\t\t\t}\n\t\t\t\t\t$this.search( false );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonUnReadClick() {\n\t\tvar notification_ids = [];\n\t\tif ( this.is_viewing && this.current_edit_record ) {\n\t\t\tnotification_ids.push( this.current_edit_record.id );\n\t\t} else {\n\t\t\tnotification_ids = this.getGridSelectIdArray();\n\t\t}\n\n\t\tif ( notification_ids.length > 0 ) {\n\t\t\tvar $this = this;\n\n\t\t\tthis.api['setNotificationStatus']( notification_ids, 10, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\tif ( $this.is_viewing ) {\n\t\t\t\t\t\t$this.removeEditView();\n\t\t\t\t\t}\n\t\t\t\t\t$this.search( false );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tonNavigateClick() {\n\t\tif ( this.navigate_link !== '' ) {\n\t\t\t// If viewing a notification the view needs to be closed for window.location to work correctly for links that open another onViewClick view.\n\t\t\tif ( this.is_viewing == true ) {\n\t\t\t\tthis.onCancelClick();\n\t\t\t}\n\n\t\t\tif ( this.navigate_link === 'open_view' ) {\n\t\t\t\tfor ( let i = 0; i < this.selected_payload.timetrex.event.length; i++ ) {\n\t\t\t\t\tif ( this.selected_payload.timetrex.event[i].type === 'open_view' || this.selected_payload.timetrex.event[i].type === 'open_view_immediate' ) {\n\t\t\t\t\t\tNotificationConsumer.openViewLinkedToNotification( this.selected_payload.timetrex.event[i] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( this.selected_payload.link_target && this.selected_payload.link_target === '_blank' ) {\n\t\t\t\t\twindow.open(\n\t\t\t\t\t\tthis.navigate_link,\n\t\t\t\t\t\t'_blank'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location = this.navigate_link;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tsetNavigateLink() {\n\t\tthis.navigate_link = '';\n\n\t\tvar data = this.grid.getGridParam( 'data' );\n\n\t\tif ( !data ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar notification_ids = [];\n\n\t\tif ( this.current_edit_record && this.current_edit_record.id ) {\n\t\t\tnotification_ids.push( this.current_edit_record.id );\n\t\t} else {\n\t\t\tnotification_ids = this.getGridSelectIdArray();\n\t\t}\n\n\t\tif ( notification_ids.length === 1 ) {\n\t\t\tvar len = data.length;\n\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar item = data[i];\n\n\t\t\t\tif ( item.id === notification_ids[0] ) {\n\t\t\t\t\t//Check if payload has an \"open_view\" or \"open_view_immediate\" event for opening and passing data to a edit view.\n\t\t\t\t\tif ( item.payload_data.timetrex !== undefined && item.payload_data.timetrex.event !== undefined ) {\n\t\t\t\t\t\tfor ( let i = 0; i < item.payload_data.timetrex.event.length; i++ ) {\n\t\t\t\t\t\t\tif ( item.payload_data.timetrex.event[i].type === 'open_view' || item.payload_data.timetrex.event[i].type === 'open_view_immediate' ) {\n\t\t\t\t\t\t\t\tthis.navigate_link = 'open_view';\n\t\t\t\t\t\t\t\tthis.selected_payload = item.payload_data;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( item.payload_data.link !== undefined && item.payload_data.link !== '' ) {\n\t\t\t\t\t\t//Normal navigation link found.\n\t\t\t\t\t\tthis.navigate_link = item.payload_data.link;\n\t\t\t\t\t\tthis.selected_payload = item.payload_data;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.navigate_link = '';\n\t\tthis.selected_payload = {};\n\t\treturn false;\n\t}\n\n\tinitEditView() {\n\t\tif ( this.current_edit_record && this.current_edit_record.status_id == 10 ) {\n\t\t\tvar $this = this;\n\n\t\t\t//Set current notification being viewed as read.\n\t\t\t$this.current_edit_record.status_id = 20;\n\t\t\tthis.api['setNotificationStatus']( [this.current_edit_record.id], 20, {\n\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t$this.search( false );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tsuper.initEditView();\n\t}\n\n\tsetCustomDefaultMenuIcon( id, context_btn, grid_selected_length ) {\n\t\tswitch ( id ) {\n\t\t\tcase 'read':\n\t\t\t\tthis.setDefaultMenuReadIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'unread':\n\t\t\t\tthis.setDefaultMenuUnReadIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t\tcase 'navigate':\n\t\t\t\tthis.setDefaultMenuNavigateIcon( context_btn, grid_selected_length );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetCustomEditMenuIcon( id, context_btn ) {\n\t\tswitch ( id ) {\n\t\t\tcase'navigate':\n\t\t\t\tthis.setDefaultMenuNavigateIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase'read':\n\t\t\t\tthis.setEditMenuReadIcon( context_btn );\n\t\t\t\tbreak;\n\t\t\tcase'unread':\n\t\t\t\tthis.setEditMenuUnReadIcon( context_btn );\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tsetDefaultMenuDeleteAndNextIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( this.is_viewing ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuDeleteAndNextIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( this.is_viewing ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuDeleteIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( grid_selected_length >= 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuDeleteIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( this.is_viewing ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuViewIcon( context_btn, grid_selected_length, pId ) {\n\n\t\tif ( this.is_viewing == false && grid_selected_length === 1 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuCancelIcon( context_btn, pId ) {\n\t\tif ( this.is_viewing ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuReadIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( grid_selected_length >= 1 ) {\n\t\t\t//Check if any notifications are unread.\n\t\t\tvar selected_items = this.getSelectedItems();\n\t\t\tfor ( var i = 0; i < selected_items.length; i++ ) {\n\t\t\t\tif ( selected_items[i] !== null && selected_items[i].status_id == 10 ) {\n\t\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuUnReadIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( grid_selected_length >= 1 ) {\n\t\t\t//Check if any notifications are read.\n\t\t\tvar selected_items = this.getSelectedItems();\n\t\t\tfor ( var i = 0; i < selected_items.length; i++ ) {\n\t\t\t\tif ( selected_items[i] !== null && selected_items[i].status_id == 20 ) {\n\t\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetDefaultMenuNavigateIcon( context_btn, grid_selected_length, pId ) {\n\t\tif ( this.is_viewing == true || grid_selected_length === 1 ) {\n\t\t\t// check a link is set in the payload data\n\t\t\tif ( this.setNavigateLink() == true ) {\n\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t\t} else {\n\t\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t\t}\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuReadIcon( context_btn ) {\n\t\t//Because the notification view closes when clicking \"Mark Read / Unread\" this icon will always be disabled as the message is always read when viewed.\n\t\t//But may be needed in the future.\n\t\tif ( this.current_edit_record && this.current_edit_record.status_id == 10 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tsetEditMenuUnReadIcon( context_btn ) {\n\t\tif ( this.current_edit_record && this.current_edit_record.status_id == 20 ) {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, true );\n\t\t} else {\n\t\t\tContextMenuManager.disableMenuItem( this.determineContextMenuMountAttributes().id, context_btn.id, false );\n\t\t}\n\t}\n\n\tbuildEditViewUI() {\n\n\t\tsuper.buildEditViewUI();\n\t\tvar $this = this;\n\n\t\tvar tab_model = {\n\t\t\t'tab_notification': { 'label': $.i18n._( 'Notification' ) }\n\t\t};\n\t\tthis.setTabModel( tab_model );\n\n\t\tvar form_item_input;\n\n\t\tthis.navigation.AComboBox( {\n\t\t\tapi_class: TTAPI.APINotification,\n\t\t\tid: this.script_name + '_navigation',\n\t\t\tallow_multiple_selection: false,\n\t\t\tlayout_name: 'global_notification',\n\t\t\tnavigation_mode: true,\n\t\t\tshow_search_inputs: true\n\t\t} );\n\n\t\tthis.setNavigation();\n\n\t\t//Tab 0 start\n\t\tvar tab_notification = $( '#tab_notification' );\n\n\t\tvar tab_notification_column1 = tab_notification.find( '.first-column' );\n\n\t\tthis.edit_view_tabs[0] = [];\n\n\t\tthis.edit_view_tabs[0].push( tab_notification_column1 );\n\n\t\t// Type\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.COMBO_BOX );\n\t\tform_item_input.TComboBox( { field: 'type_id' } );\n\t\tform_item_input.setSourceData( Global.addFirstItemToArray( $this.type_array ) );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Type' ), form_item_input, tab_notification_column1, '' );\n\n\t\t// Date\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'created_date' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Date' ), form_item_input, tab_notification_column1, '' );\n\n\t\t// Title\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'title_long' } );\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Title' ), form_item_input, tab_notification_column1, '' );\n\n\t\t// Body\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'body_long_text' } );\n\t\tform_item_input.off( 'click' ).on( \"click\", function() {\n\t\t\t$this.onNavigateClick();\n\t\t});\n\t\tthis.addEditFieldToColumn( $.i18n._( 'Message' ), form_item_input, tab_notification_column1, '' );\n\t}\n\n\tbuildSearchFields() {\n\t\tsuper.buildSearchFields();\n\t\tthis.search_fields = [\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Status' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'status_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Type' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'type_id',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tlayout_name: 'global_option_column',\n\t\t\t\tform_item_type: FormItemType.AWESOME_BOX\n\t\t\t} ),\n\t\t\tnew SearchField( {\n\t\t\t\tlabel: $.i18n._( 'Title' ),\n\t\t\t\tin_column: 1,\n\t\t\t\tfield: 'title_long',\n\t\t\t\tmultiple: true,\n\t\t\t\tbasic_search: true,\n\t\t\t\tadv_search: false,\n\t\t\t\tform_item_type: FormItemType.TEXT_INPUT\n\t\t\t} )\n\n\t\t];\n\t}\n\n\t// Search is triggered when a notification is marked as read, unread or deleted.\n\t// Search also pulls in new notifications if any have been created which makes it a good time to update the notification bell.\n\tsearch( set_default_menu, page_action, page_number, callBack ) {\n\t\tsuper.search( set_default_menu, page_action, page_number, callBack );\n\t\tif ( Global.UNIT_TEST_MODE == false ) {\n\t\t\tNotificationConsumer.getUnreadNotifications();\n\t\t}\n\t}\n\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjE1OS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBTztBQUNQLDJCQUEyQjtBQUMzQixFQUFFLENBQUM7QUFDSDs7QUFFQTtBQUNBO0FBQ0E7O0FBRUEsSUFBSTs7QUFFSjtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixDQUFDO0FBQzVCLDBCQUEwQixDQUFDO0FBQzNCOztBQUVBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUEsb0JBQW9CLFNBQVM7QUFDN0I7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E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