1 line
47 KiB
JavaScript
1 line
47 KiB
JavaScript
|
"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\
|