1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
"use strict";(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["common-EmbeddedMessageCommon"],{7664:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"EmbeddedMessage\": () => (/* binding */ EmbeddedMessage)\n/* harmony export */ });\n/* harmony import */ var linkifyjs_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5853);\n/* harmony import */ var linkifyjs_string__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(linkifyjs_string__WEBPACK_IMPORTED_MODULE_0__);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\nvar EmbeddedMessage = {\n\tmessage_control_api: null,\n\tevent_bus: new TTEventBus({ view_id: 'embedded_message' }),\n\t/**\n\t * Initializes embedded messages with a call to EmbeddedMessage.init()\n\t * Requires that initUI be called when the editviewui is built\n\t *\n\t * @param item_id (current_edit_record.id)\n\t * @param object_type (50 for requests)\n\t */\n\tinit: function( item_id, object_type, view_object, edit_view, edit_view_tab, edit_view_ui_dic, callback ) {\n\t\tvar args = {};\n\t\targs.filter_data = {};\n\t\targs.filter_data.object_type_id = object_type;\n\t\targs.filter_data.object_id = item_id;\n\t\tvar read_ids = [];\n\t\tthis.message_control_api = TTAPI.APIMessageControl;\n\n\t\tvar $this = this;\n\t\tthis.message_control_api['getEmbeddedMessage']( args, {\n\t\t\tonResult: function( res ) {\n\t\t\t\t// Error: Uncaught TypeError: Cannot read property 'setValue' of undefined in interface/html5/#!m=RequestAuthorization&id=1306 line 1547\n\t\t\t\tif ( !edit_view || !edit_view_ui_dic['from'] ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar data = res.getResult();\n\t\t\t\tif ( Global.isArray( data ) ) {\n\t\t\t\t\t$( edit_view.find( '.separate' ) ).css( 'display', 'block' );\n\n\t\t\t\t\tview_object.messages = data;\n\n\t\t\t\t\tvar container = $( '<div></div>' );\n\n\t\t\t\t\tfor ( var key in data ) {\n\n\t\t\t\t\t\tvar currentItem = data[key];\n\t\t\t\t\t\t/* jshint ignore:start */\n\t\t\t\t\t\tif ( currentItem.status_id == 10 ) {\n\t\t\t\t\t\t\tread_ids.push( currentItem.id );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* jshint ignore:end */\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * This can be a little confusing to look at so here's the process:\n\t\t\t\t\t\t * 1. Set the hidden fields' values\n\t\t\t\t\t\t * 2. Clone the message template\n\t\t\t\t\t\t * 3. Append the message templage to container\n\t\t\t\t\t\t * 4. Append the contents of the the container variable to the visible form\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar from = currentItem.from_first_name + ' ' + currentItem.from_last_name + ' @ ' + currentItem.updated_date;\n\t\t\t\t\t\tedit_view_ui_dic['from'].setValue( from );\n\n\t\t\t\t\t\tedit_view_ui_dic['subject'].setValue( Global.htmlDecode( currentItem.subject ) );\n\t\t\t\t\t\t// The function setValue is not used on the body to avoid double encoding issues on the content as linkify (parses links in text) already handles that.\n\t\t\t\t\t\tedit_view_ui_dic['body'].html( Global.htmlDecode( currentItem.body ).linkify( { nl2br: true, className: 'linkified' } ) );\n\t\t\t\t\t\tedit_view_ui_dic['body'].setResizeEvent();\n\n\t\t\t\t\t\tvar cloneMessageControl = $( edit_view_tab.find( '#tab_request' ).find( '.edit-view-tab' ).find( '.embedded-message-template' ) ).clone();\n\t\t\t\t\t\tcloneMessageControl.removeClass( 'embedded-message-template' );\n\t\t\t\t\t\tcloneMessageControl.addClass( 'embedded-message-container' );\n\t\t\t\t\t\tcloneMessageControl.css( 'display', 'block' );\n\t\t\t\t\t\tcloneMessageControl.css( 'margin', '0px' );\n\t\t\t\t\t\tcloneMessageControl.appendTo( container );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( read_ids.length > 0 ) {\n\t\t\t\t\t\t$this.message_control_api['markRecipientMessageAsRead']( read_ids, {\n\t\t\t\t\t\t\tonResult: function( res ) {\n\t\t\t\t\t\t\t\t//commented out as it is needed on the message screen, but not here and results in a big api call we'd rather avoid.\n\t\t\t\t\t\t\t\t//$this.search( false );\n\t\t\t\t\t\t\t\t//Update message badge counts so we do not have a mismatch in badge counts such as when opening a request.\n\t\t\t\t\t\t\t\t$this.event_bus.emit( 'tt_topbar', 'profile_pending_counts', {\n\t\t\t\t\t\t\t\t\tobject_types: [ 'notification', 'message' ]\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\t$( edit_view_tab.find( '#tab_request' ).find( '.edit-view-tab' ).find( '.embedded-message-column' ) ).hide();\n\t\t\t\t\tedit_view_tab.find( '#tab_request' ).find( '.edit-view-tab' ).find( '.embedded-message-container' ).hide();\n\t\t\t\t\tedit_view_tab.find( '#tab_request' ).find( '.edit-view-tab' ).find( '.embedded-message-container' ).remove();\n\t\t\t\t\tedit_view_tab.find( '#tab_request' ).find( '.edit-view-tab' ).append( container.html() );\n\t\t\t\t} else {\n\t\t\t\t\t$( edit_view.find( '.separate' ) ).css( 'display', 'none' );\n\t\t\t\t}\n\n\t\t\t\tcallback();\n\t\t\t}\n\t\t} );\n\t},\n\n\t/**\n\t * Requires a full width column with the class embedded-message-template\n\t *\n\t * @param view_object\n\t * @param tab_object\n\t */\n\tinitUI: function( view_object, tab_object ) {\n\n\t\tvar separate_box = tab_object.find( '.separate' ).css( 'display', 'none' );\n\n\t\t// Messages title bar\n\t\tvar form_item_input = Global.loadWidgetByName( FormItemType.SEPARATED_BOX );\n\t\tform_item_input.SeparatedBox( { label: $.i18n._( 'Messages' ) } );\n\t\tview_object.addEditFieldToColumn( null, form_item_input, separate_box );\n\n\t\tvar column = tab_object.find( '.embedded-message-template' );\n\n\t\t// From\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'from', selected_able: true } );\n\t\tview_object.addEditFieldToColumn( $.i18n._( 'From' ), form_item_input, column, '' );\n\n\t\t// Subject\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'subject', selected_able: true } );\n\t\tview_object.addEditFieldToColumn( $.i18n._( 'Subject' ), form_item_input, column );\n\n\t\t// Body\n\t\tform_item_input = Global.loadWidgetByName( FormItemType.TEXT );\n\t\tform_item_input.TText( { field: 'body', width: 600, height: 400, selected_able: true } );\n\t\tview_object.addEditFieldToColumn( $.i18n._( 'Body' ), form_item_input, column, '', null, null, true );\n\n\t\t// Tab 0 second column end\n\t\tview_object.edit_view_tabs[0].push( column );\n\t\tcolumn.css( 'display', 'none' );\n\t\treturn;\n\t},\n\n\t/**\n\t * The record array must be an array containing a single record\n\t * The callback function must take the result object as an argument\n\t *\n\t * @param record_array\n\t * @param ignoreWarning\n\t * @param callback\n\t */\n\treply: function( record_array, ignoreWarning, callback ) {\n\t\tthis.message_control_api['setMessageControl']( record_array, false, ignoreWarning, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback( result );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNzY2NC5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQTBDO0FBQ25DO0FBQ1A7QUFDQSw2QkFBNkIsNkJBQTZCO0FBQzFEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLEtBQUssQ0FBQzs7QUFFTjs7QUFFQSxxQkFBcUIsQ0FBQzs7QUFF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