(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["portal-hr-recruitment-PortalJobVacancyDetailViewController","portal-hr-recruitment-PortalJobVacancyDetailController","filebrowser-TImageBrowser"],{3807:(module,__unused_webpack_exports,__webpack_require__)=>{eval('/* provided dependency */ var jQuery = __webpack_require__(9755);\n/*!\n * Responsive Bootstrap Toolkit\n * Author: Maciej Gurban\n * License: MIT\n * Version: 2.6.3 (2016-06-21)\n * Origin: https://github.com/maciej-gurban/responsive-bootstrap-toolkit\n */\nvar ResponsiveBootstrapToolkit=function(i){var e={detectionDivs:{bootstrap:{xs:i(\'
\'),sm:i(\'
\'),md:i(\'
\'),lg:i(\'
\')},foundation:{small:i(\'
\'),medium:i(\'
\'),large:i(\'
\'),xlarge:i(\'
\')}},applyDetectionDivs:function(){i(document).ready(function(){i.each(o.breakpoints,function(i){o.breakpoints[i].appendTo(".responsive-bootstrap-toolkit")})})},isAnExpression:function(i){return"<"==i.charAt(0)||">"==i.charAt(0)},splitExpression:function(i){var e=i.charAt(0),o="="==i.charAt(1),s=1+(o?1:0),n=i.slice(s);return{operator:e,orEqual:o,breakpointName:n}},isAnyActive:function(e){var s=!1;return i.each(e,function(i,e){return o.breakpoints[e].is(":visible")?(s=!0,!1):void 0}),s},isMatchingExpression:function(i){var s=e.splitExpression(i),n=Object.keys(o.breakpoints),r=n.indexOf(s.breakpointName);if(-1!==r){var t=0,a=0;"<"==s.operator&&(t=0,a=s.orEqual?++r:r),">"==s.operator&&(t=s.orEqual?r:++r,a=void 0);var l=n.slice(t,a);return e.isAnyActive(l)}}},o={interval:300,framework:null,breakpoints:null,is:function(i){return e.isAnExpression(i)?e.isMatchingExpression(i):o.breakpoints[i]&&o.breakpoints[i].is(":visible")},use:function(i,s){o.framework=i.toLowerCase(),"bootstrap"===o.framework||"foundation"===o.framework?o.breakpoints=e.detectionDivs[o.framework]:o.breakpoints=s,e.applyDetectionDivs()},current:function(){var e="unrecognized";return i.each(o.breakpoints,function(i){o.is(i)&&(e=i)}),e},changed:function(i,e){var s;return function(){clearTimeout(s),s=setTimeout(function(){i()},e||o.interval)}}};return i(document).ready(function(){i(\'
\').appendTo("body")}),null===o.framework&&o.use("bootstrap"),o}(jQuery); true&&module.exports&&(module.exports=ResponsiveBootstrapToolkit);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzgwNy5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwyQ0FBMkMsT0FBTyxlQUFlLFdBQVcsd1FBQXdRLGFBQWEseVBBQXlQLCtCQUErQiw2QkFBNkIsaUNBQWlDLDJEQUEyRCxFQUFFLEVBQUUsNEJBQTRCLHlDQUF5Qyw2QkFBNkIsOERBQThELE9BQU8sdUNBQXVDLHlCQUF5QixTQUFTLDhCQUE4Qix3REFBd0QsSUFBSSxrQ0FBa0Msc0ZBQXNGLFdBQVcsWUFBWSx1RkFBdUYsbUJBQW1CLDBCQUEwQixJQUFJLDREQUE0RCx1R0FBdUcsbUJBQW1CLG9LQUFvSyxvQkFBb0IscUJBQXFCLHdDQUF3QyxlQUFlLElBQUksdUJBQXVCLE1BQU0sa0JBQWtCLHdDQUF3QyxJQUFJLG1CQUFtQixvQ0FBb0MsdUVBQXVFLDJDQUEyQyxDQUFDLE1BQU0sRUFBRSxLQUEwQiIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL2ludGVyZmFjZS9odG1sNS9mcmFtZXdvcmsvYm9vdHN0cmFwLXRvb2xraXQubWluLmpzPzEwZmEiXSwic291cmNlc0NvbnRlbnQiOlsiLyohXG4gKiBSZXNwb25zaXZlIEJvb3RzdHJhcCBUb29sa2l0XG4gKiBBdXRob3I6ICAgIE1hY2llaiBHdXJiYW5cbiAqIExpY2Vuc2U6ICAgTUlUXG4gKiBWZXJzaW9uOiAgIDIuNi4zICgyMDE2LTA2LTIxKVxuICogT3Jp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ldJiZvLmJyZWFrcG9pbnRzW2ldLmlzKFwiOnZpc2libGVcIil9LHVzZTpmdW5jdGlvbihpLHMpe28uZnJhbWV3b3JrPWkudG9Mb3dlckNhc2UoKSxcImJvb3RzdHJhcFwiPT09by5mcmFtZXdvcmt8fFwiZm91bmRhdGlvblwiPT09by5mcmFtZXdvcms/by5icmVha3BvaW50cz1lLmRldGVjdGlvbkRpdnNbby5mcmFtZXdvcmtdOm8uYnJlYWtwb2ludHM9cyxlLmFwcGx5RGV0ZWN0aW9uRGl2cygpfSxjdXJyZW50OmZ1bmN0aW9uKCl7dmFyIGU9XCJ1bnJlY29nbml6ZWRcIjtyZXR1cm4gaS5lYWNoKG8uYnJlYWtwb2ludHMsZnVuY3Rpb24oaSl7by5pcyhpKSYmKGU9aSl9KSxlfSxjaGFuZ2VkOmZ1bmN0aW9uKGksZSl7dmFyIHM7cmV0dXJuIGZ1bmN0aW9uKCl7Y2xlYXJUaW1lb3V0KHMpLHM9c2V0VGltZW91dChmdW5jdGlvbigpe2koKX0sZXx8by5pbnRlcnZhbCl9fX07cmV0dXJuIGkoZG9jdW1lbnQpLnJlYWR5KGZ1bmN0aW9uKCl7aSgnPGRpdiBjbGFzcz1cInJlc3BvbnNpdmUtYm9vdHN0cmFwLXRvb2xraXRcIj48L2Rpdj4nKS5hcHBlbmRUbyhcImJvZHlcIil9KSxudWxsPT09by5mcmFtZXdvcmsmJm8udXNlKFwiYm9vdHN0cmFwXCIpLG99KGpRdWVyeSk7XCJ1bmRlZmluZWRcIiE9dHlwZW9mIG1vZHVsZSYmbW9kdWxlLmV4cG9ydHMmJihtb2R1bGUuZXhwb3J0cz1SZXNwb25zaXZlQm9vdHN0cmFwVG9vbGtpdCk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///3807\n')},8326:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.TImageBrowser = function( options ) {\n\t\tGlobal.addCss( 'global/widgets/filebrowser/TImageBrowser.css' );\n\t\tvar opts = $.extend( {}, $.fn.TImageBrowser.defaults, options );\n\n\t\tvar $this = this;\n\t\tvar field;\n\t\tvar id = 'file_browser';\n\t\tvar name = 'filedata';\n\t\tvar browser;\n\n\t\tvar accept_filter = '';\n\n\t\tvar default_width = 177;\n\t\tvar default_height = 42;\n\t\tvar enabled = true;\n\n\t\tthis.setEnabled = function( val ) {\n\t\t\tenabled = val;\n\n\t\t\tvar btn = this.find( '.browser-form input' );\n\n\t\t\tif ( !val ) {\n\t\t\t\tbtn.attr( 'disabled', true );\n\t\t\t\tbtn.removeClass( 'disable-element' ).addClass( 'disable-element' );\n\t\t\t} else {\n\t\t\t\tbtn.removeAttr( 'disabled' );\n\t\t\t\tbtn.removeClass( 'disable-element' );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.clearErrorStyle = function() {\n\n\t\t};\n\n\t\tthis.getFileName = function() {\n\n\t\t\treturn browser.val();\n\t\t};\n\n\t\tthis.getField = function() {\n\t\t\treturn field;\n\t\t};\n\n\t\tthis.setEnableDelete = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\tif ( !val ) {\n\t\t\t\timage.removeAttr( 'enable-delete' );\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\timage.attr( 'enable-delete', 1 );\n\t\t\t}\n\t\t};\n\n\t\tthis.getValue = function() {\n\t\t\tvar form_data;\n\t\t\tif ( browser && browser.val() ) {\n\n\t\t\t\tif ( typeof FormData == 'undefined' ) {\n\t\t\t\t\tform_data = $this.find( '.browser-form' );\n\t\t\t\t} else {\n\t\t\t\t\tform_data = new FormData( $( $this.find( '.browser-form' ) )[0] );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tform_data = null;\n\t\t\t}\n\n\t\t\treturn form_data;\n\t\t};\n\n\t\tthis.getImageSrc = function() {\n\t\t\tvar image = $this.find( '.image' );\n\t\t\treturn image.attr( 'src' );\n\t\t};\n\n\t\tthis.setImage = function( val ) {\n\t\t\tvar image = $this.find( '.image' );\n\n\t\t\tif ( !val ) {\n\t\t\t\timage.attr( 'src', '' );\n\t\t\t\timage.hide();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar d = new Date();\n\t\t\timage.hide();\n\t\t\timage.attr( 'src', val + '&t=' + d.getTime() );\n\t\t\timage.css( 'height', 'auto' );\n\t\t\timage.css( 'width', 'auto' );\n\n\t\t};\n\n\t\tvar onImageLoad = function( image ) {\n\n\t\t\tvar image_height = $( image ).height() > 0 ? $( image ).height() : image.naturalHeight;\n\t\t\tvar image_width = $( image ).width() > 0 ? $( image ).width() : image.naturalWidth;\n\n\t\t\tif ( image_height > default_height ) {\n\t\t\t\t$( image ).css( 'height', default_height );\n\n\t\t\t}\n\n\t\t\tif ( image_width > default_width ) {\n\t\t\t\t$( image ).css( 'width', default_width );\n\t\t\t\t$( image ).css( 'height', 'auto' );\n\t\t\t}\n\n\t\t\t$this.trigger( 'setSize' );\n\n\t\t\tif ( image_height < 5 ) {\n\t\t\t\t$( image ).hide();\n\t\t\t} else {\n\t\t\t\t$( image ).show();\n\t\t\t}\n\t\t};\n\n\t\tthis.setValue = function( val ) {\n\n\t\t\tif ( !val ) {\n\t\t\t\tval = '';\n\t\t\t}\n\n\t\t};\n\n\t\tthis.each( function() {\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tfield = o.field;\n\n\t\t\t// var $this = this;\n\n\t\t\tif ( o.default_width > 0 ) {\n\t\t\t\tdefault_width = o.default_width;\n\t\t\t}\n\n\t\t\tif ( o.default_height > 0 ) {\n\t\t\t\tdefault_height = o.default_height;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( o.name ) ) {\n\t\t\t\tname = o.name;\n\t\t\t}\n\n\t\t\tif ( Global.isSet( accept_filter ) ) {\n\t\t\t\taccept_filter = o.accept_filter;\n\t\t\t}\n\n\t\t\tbrowser = $( this ).find( '.browser' );\n\t\t\tvar image = $( this ).find( '.image' );\n\t\t\timage.hide();\n\t\t\timage.on( 'load', function() {\n\t\t\t\tonImageLoad( this );\n\n\t\t\t} );\n\n\t\t\tif ( accept_filter ) {\n\t\t\t\tbrowser.attr( 'accept', accept_filter );\n\t\t\t} else {\n\t\t\t\taccept_filter = 'image/*';\n\t\t\t\tbrowser.attr( 'accept', 'image/*' );\n\t\t\t}\n\n\t\t\tbrowser.attr( 'id', id );\n\t\t\tbrowser.attr( 'name', name );\n\n\t\t\tif ( Global.isSet( o.changeHandler ) ) {\n\n\t\t\t\t$this.bind( 'imageChange', o.changeHandler );\n\t\t\t}\n\t\t\tif ( Global.isSet( o.deleteImageHandler ) ) {\n\t\t\t\tthis.find( '.file-browser' ).on( 'deleteClick', function() {\n\t\t\t\t\to.deleteImageHandler();\n\t\t\t\t} );\n\n\t\t\t}\n\n\t\t\tbrowser.bind( 'change', function() {\n\t\t\t\timage.hide();\n\n\t\t\t\tif ( typeof FileReader != 'undefined' ) {\n\n\t\t\t\t\tvar files = !!this.files ? this.files : [];\n\n\t\t\t\t\t// If no files were selected, or no FileReader support, return\n\t\t\t\t\tif ( !files.length || !window.FileReader ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( accept_filter === 'image/*' ) {\n\t\t\t\t\t\t// Create a new instance of the FileReader\n\t\t\t\t\t\tvar reader = new FileReader();\n\n\t\t\t\t\t\t// Read the local file as a DataURL\n\t\t\t\t\t\treader.readAsDataURL( files[0] );\n\n\t\t\t\t\t\t// When loaded, set image data as background of div\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = this.result;\n\t\t\t\t\t\t\timage.attr( 'src', url );\n\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$this.trigger( 'imageChange', [$this] );\n\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.f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uXHR9O1xuXG5cdCQuZm4uVEltYWdlQnJvd3Nlci5kZWZhdWx0cyA9IHt9O1xuXHQkLmZuLlRJbWFnZUJyb3dzZXIuaHRtbF90ZW1wbGF0ZSA9IGBcblx0PGRpdiBjbGFzcz1cImZpbGUtYnJvd3NlclwiPlxuXHRcdDxpbWcgY2xhc3M9XCJpbWFnZVwiPlxuXHRcdDxmb3JtIGVuY3R5cGU9XCJtdWx0aXBhcnQvZm9ybS1kYXRhXCIgY2xhc3M9XCJicm93c2VyLWZvcm1cIj5cblx0XHRcdDxpbnB1dCBuYW1lPVwiZmlsZWRhdGFcIiBjbGFzcz1cImJyb3dzZXJcIiB0eXBlPVwiZmlsZVwiLz5cblx0XHQ8L2Zvcm0+XG5cdDwvZGl2PlxuXHRgO1xuXG59ICkoIGpRdWVyeSApOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8326\n")},86:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PortalJobVacancyDetailController\": () => (/* binding */ PortalJobVacancyDetailController)\n/* harmony export */ });\n/* harmony import */ var _framework_bootstrap_toolkit_min__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3807);\n/* harmony import */ var _framework_bootstrap_toolkit_min__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_framework_bootstrap_toolkit_min__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97);\n/* harmony import */ var _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7526);\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8326);\n/* harmony import */ var _global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_global_widgets_filebrowser_TImageBrowser__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _services_ServiceCaller__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12);\n/* harmony import */ var _global_TTUUID__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4936);\n/* harmony import */ var tinymce_tinymce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7575);\n/* harmony import */ var tinymce_tinymce__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(tinymce_tinymce__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var tinymce_icons_default__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6890);\n/* harmony import */ var tinymce_icons_default__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(tinymce_icons_default__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var tinymce_themes_silver__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8860);\n/* harmony import */ var tinymce_themes_silver__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(tinymce_themes_silver__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var tinymce_plugins_link__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2682);\n/* harmony import */ var tinymce_plugins_link__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(tinymce_plugins_link__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var tinymce_plugins_autoresize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5209);\n/* harmony import */ var tinymce_plugins_autoresize__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(tinymce_plugins_autoresize__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _css_loader_tinymce_skins_ui_oxide_content_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5634);\n/* harmony import */ var _css_loader_tinymce_skins_content_default_content_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(5797);\n/* provided dependency */ var _ = __webpack_require__(9050);\n/* provided dependency */ var $ = __webpack_require__(9755);\n\n\n\n\n\n\n\n\n // Default icons are required for TinyMCE 5.3 or above\n\n\n\n\n // https://www.tiny.cloud/docs/advanced/usage-with-module-loaders/webpack/webpack_es6_npm/\n // https://www.tiny.cloud/docs/advanced/usage-with-module-loaders/webpack/webpack_es6_npm/\n\nclass PortalJobVacancyDetailController extends _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_1__.PortalBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tedit_view_error_ui_dic: {},\n\t\t\tevents: {\n\t\t\t\t'click #applyBtn': 'onApplyJobClick',\n\t\t\t\t'click #available_jobs': 'availableJobsClick',\n\t\t\t\t'click #applied_jobs': 'appliedJobsClick',\n\t\t\t\t'click #applied_btn': 'appliedJobsClick',\n\t\t\t\t'click .sign-in': 'signIN'\n\t\t\t}\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit() {\n\t\tthis.viewId = 'PortalJobVacancyDetail';\n\t\tthis.script_name = 'JobVacancyDetailView';\n\t\tthis.job_applicant_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIJobApplicantPortal */ .y.APIJobApplicantPortal;\n\t\tthis.viewport = $.extend( {}, (_framework_bootstrap_toolkit_min__WEBPACK_IMPORTED_MODULE_0___default()) );\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tvar $this = this;\n\t\tif ( LocalCacheData.getPortalLoginUser() ) {\n\t\t\tthis.setRegisterContainerStatus( function( applied ) {\n\t\t\t\t$this.showJobVacancy( { applied: applied } );\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.showJobVacancy();\n\t\t}\n\t}\n\n\tshowJobVacancy( options ) {\n\t\tvar $this = this;\n\t\tvar row = Global.loadWidget( 'views/portal/hr/recruitment/PortalJobVacancyDetail.html' );\n\t\tvar user_data = { first_name: '', last_name: '', email: '', applied: false };\n\t\tif ( LocalCacheData.getPortalLoginUser() ) {\n\t\t\tuser_data = {\n\t\t\t\tfirst_name: LocalCacheData.getPortalLoginUser().first_name,\n\t\t\t\tlast_name: LocalCacheData.getPortalLoginUser().last_name,\n\t\t\t\temail: LocalCacheData.getPortalLoginUser().email\n\t\t\t};\n\t\t}\n\t\tif ( Global.isSet( options ) && Global.isSet( options.applied ) ) {\n\t\t\tuser_data.applied = options.applied;\n\t\t}\n\t\tfor ( var key in this.model.attributes ) {\n\t\t\tif ( this.model.get( key ) == false ) {\n\t\t\t\tthis.model.set( key, '' );\n\t\t\t}\n\t\t}\n\t\tthis.$el.html( _.template( row )( $.extend( user_data, this.model.toJSON() ) ) );\n\t\tif ( !_.isUndefined( $( '.tinymce-textarea' )[0] ) ) {\n\t\t\tvar calc_tinymce_height = setInterval( function() {\n\t\t\t\tvar iframe_height = $( '.tinymce-textarea' ).find( 'iframe' ).height();\n\t\t\t\tvar body_height = $( '.tinymce-textarea' ).find( 'iframe' ).contents().find( 'body' ).height();\n\t\t\t\tif ( _.isUndefined( $( '.job-detail-summary-description' )[0] ) ) {\n\t\t\t\t\t$( '.tinymce-textarea' ).find( 'iframe' ).contents().find( 'body' ).css( {\n\t\t\t\t\t\t'background-color': '#F6F6F6',\n\t\t\t\t\t\t'font-size': '14px',\n\t\t\t\t\t\t'margin-top': 0,\n\t\t\t\t\t\t'color': '#404042'\n\t\t\t\t\t} );\n\t\t\t\t\t$( '.tinymce-textarea' ).find( 'iframe' ).contents().find( 'body p:first-child' ).css( 'margin-top', 0 );\n\t\t\t\t} else {\n\t\t\t\t\t$( '.tinymce-textarea' ).find( 'iframe' ).contents().find( 'body' ).css( {\n\t\t\t\t\t\t'margin': 0,\n\t\t\t\t\t\t'background-color': '#E8E8E8',\n\t\t\t\t\t\t'font-size': '14px',\n\t\t\t\t\t\t'margin-top': 0,\n\t\t\t\t\t\t'color': '#404042'\n\t\t\t\t\t} );\n\t\t\t\t\t$( '.tinymce-textarea' ).find( 'iframe' ).contents().find( 'body p:first-child' ).css( 'margin-top', 0 );\n\t\t\t\t}\n\t\t\t\tif ( iframe_height > body_height ) {\n\t\t\t\t\tclearInterval( calc_tinymce_height );\n\t\t\t\t\t$( '.tinymce-textarea' ).find( 'iframe' ).css( 'height', body_height );\n\t\t\t\t}\n\t\t\t}, 50 );\n\t\t}\n\t\tthis.$( 'input[type=\"text\"], input[type=\"email\"]' ).each( function() {\n\t\t\t$( this ).unbind( 'focus' ).bind( 'focus', function() {\n\t\t\t\t$( this ).parent().addClass( 'job-apply-form-focus' );\n\t\t\t} );\n\t\t} );\n\t\tthis.$( 'input[type=\"text\"], input[type=\"email\"]' ).each( function() {\n\t\t\t$( this ).unbind( 'blur' ).bind( 'blur', function() {\n\t\t\t\t$( this ).parent().removeClass( 'job-apply-form-focus' );\n\t\t\t} );\n\t\t} );\n\n\t\tthis.setDetailAndApplyFormHeight();\n\t\t$( window ).resize(\n\t\t\t$this.viewport.changed( function() {\n\t\t\t\t$this.setDetailAndApplyFormHeight();\n\t\t\t} )\n\t\t);\n\t\t// if ( LocalCacheData.getPortalLoginUser() ) {\n\t\t// \tthis.setRegisterContainerStatus();\n\t\t// } else {\n\t\t// \t$this.$('.apply-form .form-group').show();\n\t\t// }\n\t\tthis.uploader = this.$( '.register-resume' ).TImageBrowser( {\n\t\t\tfield: 'file',\n\t\t\tname: 'filedata',\n\t\t\taccept_filter: '*',\n\t\t\tchangeHandler: function( a ) {\n\t\t\t\tvar file_name = $( this ).find( '.browser' )[0].files[0].name;\n\t\t\t\t$this.$( '.apply-form #file_name' ).val( file_name );\n\t\t\t}\n\t\t} );\n\n\t\t// start- from html PortalJobVacancyDetail.html\n\n\t\t// if ( $.browser.mozilla ) {\n\t\t// tinymce.editors = [];\n\t\t// } else {\n\t\tvar i, t = (tinymce_tinymce__WEBPACK_IMPORTED_MODULE_6___default().editors);\n\t\tfor ( i in t ) {\n\t\t\tif ( t.hasOwnProperty( i ) ) {\n\t\t\t\tt[i].remove();\n\t\t\t}\n\t\t}\n\t\t// }\n\t\ttinymce.init( {\n\t\t\tplugins: \"autoresize, link\",\n\t\t\t// height: '300px',\n\t\t\treadonly: true,\n\t\t\tselector: '#description',\n\t\t\tmenubar: false,\n\t\t\tstatusbar: false,\n\t\t\ttoolbar: false,\n\t\t\ttheme: 'silver',\n\t\t\tskin: false,\n\t\t\tcontent_css: false,\n\t\t\tcontent_style: _css_loader_tinymce_skins_ui_oxide_content_css__WEBPACK_IMPORTED_MODULE_11__/* [\"default\"].toString */ .Z.toString() + '\\n'\n\t\t\t\t\t\t + _css_loader_tinymce_skins_content_default_content_css__WEBPACK_IMPORTED_MODULE_12__/* [\"default\"].toString */ .Z.toString(),\n\t\t} );\n\n\t\t$( '.apply-form' ).unbind( 'keydown' ).bind( 'keydown', function( e ) {\n\t\t\tif ( e.keyCode === 13 ) {\n\t\t\t\t$this.onApplyJobClick();\n\t\t\t}\n\t\t} );\n\n\t\t// end - from html\n\t}\n\n\tsetDetailAndApplyFormHeight() {\n\t\tvar detail_panel_header_height = this.$( '.job-header' ).height();\n\t\tvar apply_form__header_height = this.$( '.job-apply' ).height();\n\t\tif ( this.viewport.is( 'md' ) || this.viewport.is( '>md' ) ) {\n\t\t\tif ( detail_panel_header_height !== apply_form__header_height ) {\n\t\t\t\tif ( detail_panel_header_height > apply_form__header_height ) {\n\t\t\t\t\tthis.$( '.job-apply' ).height( detail_panel_header_height - 20 );\n\t\t\t\t} else {\n\t\t\t\t\tthis.$( '.job-header' ).height( apply_form__header_height + 20 );\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( this.viewport.is( '<=sm' ) ) {\n\t\t\tthis.$( '.job-apply' ).height( 70 );\n\t\t}\n\t}\n\n\tonApplyJobClick() {\n\t\tvar $this = this;\n\t\tif ( LocalCacheData.getPortalLoginUser() ) {\n\t\t\tthis.getJobApplication( function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t\tif ( !Global.isArray( result_data ) ) {\n\t\t\t\t\t\tresult_data = [];\n\t\t\t\t\t}\n\t\t\t\t\tif ( result_data.length > 0 ) {\n\t\t\t\t\t\tvar location = Global.getBaseURL() + '#!m=MyProfile&company_id=' + LocalCacheData.getAllURLArgs()['company_id'];\n\t\t\t\t\t\twindow.location = location;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this.uploadResume();\n\t\t\t\t\t\t$this.saveCurrentJobVacancy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.registerNewUser( function( user_name, password ) {\n\t\t\t\tvar recruitment_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIRecruitmentAuthentication */ .y.APIRecruitmentAuthentication;\n\t\t\t\trecruitment_api.Login( user_name, password, {\n\t\t\t\t\tonResult: function( e ) {\n\t\t\t\t\t\t$this.onLoginSuccess( e );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\t}\n\n\tavailableJobsClick() {\n\t\twindow.location = Global.getBaseURL() + '#!m=PortalJobVacancy&company_id=' + LocalCacheData.getAllURLArgs().company_id;\n\t\tLocalCacheData.setAllURLArgs( {} );\n\t}\n\n\tappliedJobsClick() {\n\t\tvar $this = this;\n\t\twindow.location = Global.getBaseURL() + '#!m=MyJobApplication&company_id=' + LocalCacheData.getAllURLArgs().company_id;\n\t\tLocalCacheData.setAllURLArgs( {} );\n\t}\n\n\tsignIN() {\n\t\tvar sign_controller = new SignInController( {\n\t\t\t_delegate: this\n\t\t} );\n\t}\n\n\tonLoginSuccess( e, session_id ) {\n\t\tvar result;\n\t\tvar $this = this;\n\t\tif ( !session_id ) {\n\t\t\tresult = e.getResult();\n\t\t} else {\n\t\t\tresult = session_id;\n\t\t}\n\t\t_services_ServiceCaller__WEBPACK_IMPORTED_MODULE_4__/* .ServiceCaller.cancel_all_error */ .n.cancel_all_error = false;\n\t\tLocalCacheData.setSessionID( result );\n\t\tsetCookie( Global.getSessionIDKey(), result );\n\t\tvar jobapplicant_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIJobApplicantPortal */ .y.APIJobApplicantPortal;\n\t\tjobapplicant_api.getJobApplicant( {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\tLocalCacheData.setPortalLoginUser( result.getResult()[0] );\n\t\t\t\t\tIndexViewController.instance.router.headerView.render();\n\t\t\t\t\t$this.uploadResume();\n\t\t\t\t\t$this.saveCurrentJobVacancy();\n\t\t\t\t} else {\n\t\t\t\t\tProgressBar.closeOverlay();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tsetRegisterContainerStatus( callback ) {\n\t\tvar $this = this;\n\t\tthis.getJobApplication( function( res ) {\n\t\t\tvar result = false;\n\t\t\tif ( res.isValid() ) {\n\t\t\t\tvar result_data = res.getResult();\n\t\t\t\tif ( !Global.isArray( result_data ) ) {\n\t\t\t\t\tresult_data = [];\n\t\t\t\t}\n\t\t\t\tif ( result_data.length > 0 ) {\n\t\t\t\t\t// $this.$('.apply-form .form-group').hide();\n\t\t\t\t\t// $this.hideApplyForm();\n\t\t\t\t\tresult = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcallback( result );\n\t\t} );\n\t}\n\n\t// hideApplyForm: function () {\n\t// \tthis.$('.apply-form .form-group').hide();\n\t// \tthis.$('.apply-form button[id=\"applyBtn\"]').text( $.i18n._('Applied') ).attr('disabled', 'disabled');\n\t// },\n\n\t// showApplyForm: function () {\n\t// \tthis.$('.apply-form .form-group').show();\n\t// \tthis.$('.apply-form button[id=\"applyBtn\"]').html( $.i18n._('Apply') + '' ).removeAttr('disabled');\n\t// },\n\n\tgetJobApplication( callback ) {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tfilter.filter_data.job_vacancy_id = this.model.id;\n\t\tthis.job_applicant_api.getJobApplication( filter, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tcallback( result );\n\t\t\t}\n\t\t} );\n\t}\n\n\tsaveCurrentJobVacancy( callback ) {\n\t\tvar $this = this;\n\t\tvar record = {};\n\t\trecord.job_vacancy_id = this.model.id;\n\t\tthis.job_applicant_api.setJobApplication( record, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( !result.isValid() ) {\n\t\t\t\t\t$this.showValidateErrorTips( result );\n\t\t\t\t} else {\n\t\t\t\t\t$this.render();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tshowAlert( content ) {\n\t\tIndexViewController.instance.router.showTipModal( content, {\n\t\t\tstyle: {\n\t\t\t\t'border': '2px solid #154575',\n\t\t\t\t'color': '#154575'\n\t\t\t}\n\t\t} );\n\t}\n\n\tuploadResume() {\n\t\tif ( !this.uploader ) {\n\t\t\treturn false;\n\t\t}\n\t\tvar uploader = this.uploader;\n\t\tvar name = uploader.attr( 'file_name' );\n\t\tvar file = uploader.getValue();\n\t\tif ( file ) {\n\t\t\tthis.document_api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_2__/* .TTAPI.APIDocumentPortal */ .y.APIDocumentPortal;\n\t\t\tvar document_name = 'Resume' + ' - ' + this.$( '.apply-form input[id=\"first_name\"]' ).val() + ' ' + this.$( '.apply-form input[id=\"last_name\"]' ).val();\n\t\t\tvar document_revision_id = this.document_api.addAttachment( document_name, '', { async: false } ).getResult()['document_revision_id'];\n\t\t\tthis.uploadFile( file, document_revision_id );\n\t\t} else {\n\t\t\tthis.applySuccess();\n\t\t}\n\t}\n\n\tapplySuccess() {\n\t\tvar url = Global.getBaseURL() + '#!m=MyProfile&company_id=' + LocalCacheData.getAllURLArgs()['company_id'];\n\t\tvar content = $( '
' );\n\t\tcontent.append( '

' + $.i18n._( 'Application sent successfully!' ) + '

' );\n\t\tcontent.append( '

' + $.i18n._( 'Please ensure that your profile is accurate and complete.' ) + '

' );\n\t\tthis.showAlert( content );\n\t\twindow.location = url;\n\t}\n\n\tuploadFile( file_data, document_revision_id ) {\n\t\tvar $this = this;\n\t\tvar url = _services_ServiceCaller__WEBPACK_IMPORTED_MODULE_4__/* .ServiceCaller.getAPIURL */ .n.getAPIURL( 'Class=' + this.document_api.className + '&Method=uploadAttachment' + '&v=2' );\n\t\tif ( LocalCacheData.getAllURLArgs().company_id ) {\n\t\t\turl = url + '&company_id=' + LocalCacheData.getAllURLArgs().company_id;\n\t\t}\n\t\turl = url + '&object_id=' + document_revision_id;\n\t\tvar message_id = _global_TTUUID__WEBPACK_IMPORTED_MODULE_5__/* .TTUUID.generateUUID */ .d.generateUUID();\n\t\tProgressBar.showProgressBar( message_id );\n\t\tProgressBar.changeProgressBarMessage( 'File Uploading' );\n\t\t$.ajax( {\n\t\t\turl: url, //Server script to process data\n\t\t\theaders: {\n\t\t\t\t//Handle CSRF tokens and related headers here.\n\t\t\t\t'X-Client-ID': 'Browser-TimeTrex',\n\t\t\t\t'X-CSRF-Token': getCookie( 'CSRF-Token' ),\n\t\t\t},\n\t\t\ttype: 'POST',\n\t\t\tdata: file_data,\n\t\t\tsuccess: function( res ) {\n\t\t\t\tProgressBar.removeProgressBar();\n\t\t\t\tif ( res.error == '' ) {\n\t\t\t\t\t$this.applySuccess();\n\t\t\t\t}\n\t\t\t},\n\t\t\tcache: false,\n\t\t\tcontentType: false,\n\t\t\tprocessData: false\n\t\t} );\n\t}\n\n\tregisterNewUser( callBack ) {\n\t\tvar $this = this;\n\t\tvar data = {};\n\t\tdata.first_name = this.$( '.apply-form input[id=\"first_name\"]' ).val();\n\t\tdata.last_name = this.$( '.apply-form input[id=\"last_name\"]' ).val();\n\t\tdata.user_name = this.$( '.apply-form input[id=\"email\"]' ).val();\n\t\tdata.email = data.user_name;\n\t\tdata.password = Math.random().toString( 36 ).replace( /[^a-z0-9]+/g, '' ); //Use a random password for new users.\n\t\tdata.company_id = LocalCacheData.getAllURLArgs().company_id;\n\t\tif ( this.$( '.apply-form input[id=\"email\"]' ).val() === this.$( '.apply-form input[id=\"confirm_email\"]' ).val() ) {\n\t\t\tif ( this.edit_view_error_ui_dic.hasOwnProperty( 'confirm_email' ) ) {\n\t\t\t\tthis.edit_view_error_ui_dic['confirm_email'].removeClass( 'error-tip' );\n\t\t\t\tthis.edit_view_error_ui_dic['confirm_email'].tooltip().qtip( 'destroy' );\n\t\t\t}\n\t\t\tif ( data.first_name != '' && data.last_name != '' && data.email != '' ) {\n\t\t\t\tif ( !this.uploader.getValue() ) {\n\t\t\t\t\tIndexViewController.instance.router.showConfirmModal( $.i18n._( 'Are you sure you want to apply for this position without uploading a resume?' ), {\n\t\t\t\t\t\ttitle: '',\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: 'No', isClose: true, callBack: function( e ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: 'Yes', callBack: function( e ) {\n\t\t\t\t\t\t\t\t\tIndexViewController.instance.router.hideConfirmModal();\n\t\t\t\t\t\t\t\t\t$this.setJobApplicant( data, callBack );\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\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setJobApplicant( data, callBack );\n\t\t} else {\n\t\t\tthis.removeValidateErrorTips();\n\t\t\tvar field_obj = this.$( '.apply-form' ).find( 'input[id=\"confirm_email\"]' );\n\t\t\tfield_obj.addClass( 'error-tip' );\n\t\t\tfield_obj.tooltip( {\n\t\t\t\t'title': $.i18n._( 'Confirm email does not match email' )\n\t\t\t} );\n\t\t\tfield_obj.tooltip( 'show' );\n\t\t\tthis.edit_view_error_ui_dic['confirm_email'] = field_obj;\n\t\t}\n\t}\n\n\tsetJobApplicant( data, callBack ) {\n\t\tvar $this = this;\n\t\tthis.job_applicant_api.setJobApplicant( data, {\n\t\t\tonResult: function( result ) {\n\t\t\t\tif ( result.isValid() ) {\n\t\t\t\t\t$this.removeValidateErrorTips();\n\t\t\t\t\t$this.edit_view_error_ui_dic = {};\n\t\t\t\t\tcallBack( data.user_name, data.password );\n\t\t\t\t} else {\n\t\t\t\t\t$this.showValidateErrorTips( result );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\tshowValidateErrorTips( result, stepsWidgetDic ) {\n\t\tvar $this = this;\n\n\t\tvar details = result.getDetails();\n\t\tif ( !details ) {\n\t\t\tdetails = result.getDescription(); // If the details is empty, try to get description to show.\n\t\t}\n\n\t\tvar $this = this;\n\t\tif ( Global.isArray( details ) || typeof details === 'object' ) {\n\t\t\tthis.removeValidateErrorTips();\n\t\t\t$.each( details, function( index, val ) {\n\t\t\t\tif ( val.hasOwnProperty( 'error' ) ) {\n\t\t\t\t\tval = val.error;\n\t\t\t\t}\n\t\t\t\t// var row = Global.loadWidget( 'views/portal/alert/alert.html' );\n\t\t\t\t// $this.$('.apply-form').before( row );\n\t\t\t\tfor ( var key in val ) {\n\t\t\t\t\tif ( !val.hasOwnProperty( key ) ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar error_string = '';\n\t\t\t\t\tif ( key === 'user_name' ) {\n\t\t\t\t\t\t// error_string = val[key][0];\n\t\t\t\t\t\tkey = 'email';\n\t\t\t\t\t\terror_string = $.i18n._( 'Email address already exists, please login instead' );\n\t\t\t\t\t}\n\n\t\t\t\t\tvar field_obj = null;\n\t\t\t\t\tif ( $this.$( '.apply-form' ).find( 'input[id=\"' + key + '\"]' )[0] ) {\n\t\t\t\t\t\tfield_obj = $this.$( '.apply-form' ).find( 'input[id=\"' + key + '\"]' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//If no form field is found, show error attached to the form itself.\n\t\t\t\t\t\tfield_obj = $this.$( '.apply-form' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( field_obj ) {\n\t\t\t\t\t\tfield_obj.addClass( 'error-tip' );\n\t\t\t\t\t\tif ( !error_string ) {\n\t\t\t\t\t\t\tif ( _.isArray( val[key] ) ) {\n\t\t\t\t\t\t\t\terror_string = val[key][0];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\terror_string = val[key];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// field_obj.tooltip({\n\t\t\t\t\t\t// \t'title': error_string,\n\t\t\t\t\t\t// })\n\t\t\t\t\t\tfield_obj.attr( { 'title': error_string, 'data-original-title': error_string } );\n\t\t\t\t\t\tfield_obj.tooltip( 'show' );\n\t\t\t\t\t\t$this.edit_view_error_ui_dic[key] = field_obj;\n\t\t\t\t\t\t// sort_array.push( field_obj.attr('data-sort') );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\treturn false;\n\t}\n\n\tremoveValidateErrorTips() {\n\t\t// this.$('.apply-form').find('input').css('border', '1px solid #c7e0f2');\n\t\tfor ( var key in this.edit_view_error_ui_dic ) {\n\t\t\tif ( key === 'email' || key === 'confirm_email' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( this.edit_view_error_ui_dic[key].val() !== '' ) {\n\t\t\t\tthis.edit_view_error_ui_dic[key].removeClass( 'error-tip' );\n\t\t\t\tthis.edit_view_error_ui_dic[key].tooltip().qtip( 'destroy', true );\n\t\t\t}\n\t\t\t// this.edit_view_error_ui_dic[key].removeClass('error-tip');\n\t\t\t// this.edit_view_error_ui_dic[key].tooltip('destroy');\n\t\t}\n\t\t// this.edit_view_error_ui_dic = {};\n\t\t// if ( typeof this.$('.job-apply-form .alert')[0] !== 'undefined' ) {\n\t\t// \tthis.$('.job-apply-form .alert').remove();\n\t\t// }\n\t}\n}\n//# sourceURL=[module]\n//#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VxuXHRcdC8vIHRoaXMuZWRpdF92aWV3X2Vycm9yX3VpX2RpYyA9IHt9O1xuXHRcdC8vIGlmICggdHlwZW9mIHRoaXMuJCgnLmpvYi1hcHBseS1mb3JtIC5hbGVydCcpWzBdICE9PSAndW5kZWZpbmVkJyApIHtcblx0XHQvLyBcdHRoaXMuJCgnLmpvYi1hcHBseS1mb3JtIC5hbGVydCcpLnJlbW92ZSgpO1xuXHRcdC8vIH1cblx0fVxufVxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///86\n")},5246:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"PortalJobVacancyDetailViewController\": () => (/* binding */ PortalJobVacancyDetailViewController)\n/* harmony export */ });\n/* harmony import */ var _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);\n/* harmony import */ var _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7526);\n/* harmony import */ var _views_portal_hr_recruitment_PortalJobVacancyDetailController__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86);\n/* harmony import */ var _portal_recruitment_IndexController__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1748);\n/* provided dependency */ var _ = __webpack_require__(9050);\n\n\n\n\n\nclass PortalJobVacancyDetailViewController extends _views_portal_PortalBaseViewController__WEBPACK_IMPORTED_MODULE_0__.PortalBaseViewController {\n\tconstructor( options = {} ) {\n\t\t_.defaults( options, {\n\t\t\tel: '.job-vacancy-detail-view',\n\t\t\tapi: null,\n\n\t\t\t// _required_files: ['PortalJobVacancyDetailController']\n\t\t} );\n\n\t\tsuper( options );\n\t}\n\n\tinit() {\n\t\tthis.script_name = 'JobVacancyDetailView';\n\t\tthis.api = _services_TimeTrexClientAPI__WEBPACK_IMPORTED_MODULE_1__/* .TTAPI.APIJobVacancyPortal */ .y.APIJobVacancyPortal;\n\t\tthis.job_detail_panel = this.$( '.search-result' );\n\t\tthis.job_detail_panel.empty();\n\t\tthis.render();\n\t}\n\n\trender() {\n\t\tvar $this = this;\n\t\tProgressBar.showOverlay();\n\t\tthis.search();\n\t}\n\n\tsearch() {\n\t\tvar $this = this;\n\t\tvar filter = {};\n\t\tfilter.filter_data = {};\n\t\tif ( LocalCacheData.edit_id_for_next_open_view ) {\n\t\t\tthis.view_id = LocalCacheData.edit_id_for_next_open_view;\n\t\t\tfilter.filter_data.id = [this.view_id];\n\t\t\tProgressBar.showOverlay();\n\t\t\tthis.api.getJobVacancy( filter, {\n\t\t\t\tonResult: function( result ) {\n\t\t\t\t\tvar result_data = result.getResult();\n\t\t\t\t\tif ( !result_data ) {\n\t\t\t\t\t\tresult_data = [];\n\t\t\t\t\t}\n\t\t\t\t\tresult_data = result_data[0];\n\t\t\t\t\t// $this.current_edit_record = result_data;\n\t\t\t\t\tif ( result_data ) {\n\t\t\t\t\t\tvar detail_model = new Backbone.Model( result_data );\n\t\t\t\t\t\tvar portal_job_vacancy_detail = new _views_portal_hr_recruitment_PortalJobVacancyDetailController__WEBPACK_IMPORTED_MODULE_2__.PortalJobVacancyDetailController( {\n\t\t\t\t\t\t\tmodel: detail_model,\n\t\t\t\t\t\t\tel: $this.$el\n\t\t\t\t\t\t} );\n\t\t\t\t\t\t_portal_recruitment_IndexController__WEBPACK_IMPORTED_MODULE_3__/* .IndexViewController.instance.router.headerView.jobVacancyDetailController */ .g.instance.router.headerView.jobVacancyDetailController = portal_job_vacancy_detail;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t\tLocalCacheData.edit_id_for_next_open_view = null;\n\t\t}\n\t}\n\n\tgoPortalLogin() {\n\t\tif ( window.location.href === Global.getBaseURL() + '#!m=PortalJobVacancy' ) {\n\t\t\t_portal_recruitment_IndexController__WEBPACK_IMPORTED_MODULE_3__/* .IndexViewController.instance.router.reloadView */ .g.instance.router.reloadView( 'PortalJobVacancy' );\n\t\t} else {\n\t\t\tvar location = Global.getBaseURL() + '#!m=PortalJobVacancy';\n\t\t\tif ( LocalCacheData.getAllURLArgs().company_id ) {\n\t\t\t\tfor ( var key in LocalCacheData.getAllURLArgs() ) {\n\t\t\t\t\tif ( key !== 'm' ) {\n\t\t\t\t\t\tlocation = location + '&' + key + '=' + LocalCacheData.getAllURLArgs()[key];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twindow.location = location;\n\t\t\t}\n\t\t}\n\t}\n}\n\nPortalJobVacancyDetailViewController.html_template = `\n
`;//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTI0Ni5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBbUY7QUFDOUI7QUFDNkQ7QUFDeEM7O0FBRW5FLG1EQUFtRCw0RkFBd0I7QUFDbEYsMkJBQTJCO0FBQzNCLEVBQUUsQ0FBQztBQUNIO0FBQ0E7O0FBRUE7QUFDQSxJQUFJOztBQUVKO0FBQ0E7O0FBRUE7QUFDQTtBQUNBLGFBQWEsK0dBQXlCO0FBQ3RDO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMENBQTBDLDJIQUFnQztBQUMxRTtBQUNBO0FBQ0EsUUFBUTtBQUNSLE1BQU0seU1BQXlFO0FBQy9FO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxHQUFHLG1KQUE4QztBQUNqRCxJQUFJO0FBQ0o7QUFDQTtBQUNBO0FBQ0E7QUFDQ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xuXHRcdH0gZWxzZSB7XG5cdFx0XHR2YXIgbG9jYXRpb24gPSBHbG9iYWwuZ2V0QmFzZVVSTCgpICsgJyMhbT1Qb3J0YWxKb2JWYWNhbmN5Jztcblx0XHRcdGlmICggTG9jYWxDYWNoZURhdGEuZ2V0QWxsVVJMQXJncygpLmNvbXBhbnlfaWQgKSB7XG5cdFx0XHRcdGZvciAoIHZhciBrZXkgaW4gTG9jYWxDYWNoZURhdGEuZ2V0QWxsVVJMQXJncygpICkge1xuXHRcdFx0XHRcdGlmICgga2V5ICE9PSAnbScgKSB7XG5cdFx0XHRcdFx0XHRsb2NhdGlvbiA9IGxvY2F0aW9uICsgJyYnICsga2V5ICsgJz0nICsgTG9jYWxDYWNoZURhdGEuZ2V0QWxsVVJMQXJncygpW2tleV07XG5cdFx0XHRcdFx0fVxuXHRcdFx0XHR9XG5cdFx0XHRcdHdpbmRvdy5sb2NhdGlvbiA9IGxvY2F0aW9uO1xuXHRcdFx0fVxuXHRcdH1cblx0fVxufVxuXG5Qb3J0YWxKb2JWYWNhbmN5RGV0YWlsVmlld0NvbnRyb2xsZXIuaHRtbF90ZW1wbGF0ZSA9IGBcbjxkaXYgY2xhc3M9XCJ2aWV3IGpvYi12YWNhbmN5LWRldGFpbC12aWV3XCI+PC9kaXY+YDsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5246\n")},5209:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("// Exports the \"autoresize\" plugin for usage with module loaders\n// Usage:\n// CommonJS:\n// require('tinymce/plugins/autoresize')\n// ES2015:\n// import 'tinymce/plugins/autoresize'\n__webpack_require__(8578);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNTIwOS5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQkFBTyxDQUFDLElBQWEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9ub2RlX21vZHVsZXMvdGlueW1jZS9wbHVnaW5zL2F1dG9yZXNpemUvaW5kZXguanM/NzE5MyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBFeHBvcnRzIHRoZSBcImF1dG9yZXNpemVcIiBwbHVnaW4gZm9yIHVzYWdlIHdpdGggbW9kdWxlIGxvYWRlcnNcbi8vIFVzYWdlOlxuLy8gICBDb21tb25KUzpcbi8vICAgICByZXF1aXJlKCd0aW55bWNlL3BsdWdpbnMvYXV0b3Jlc2l6ZScpXG4vLyAgIEVTMjAxNTpcbi8vICAgICBpbXBvcnQgJ3RpbnltY2UvcGx1Z2lucy9hdXRvcmVzaXplJ1xucmVxdWlyZSgnLi9wbHVnaW4uanMnKTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///5209\n")},8578:()=>{eval("/**\n * Copyright (c) Tiny Technologies, Inc. All rights reserved.\n * Licensed under the LGPL or a commercial license.\n * For LGPL see License.txt in the project root for license information.\n * For commercial licenses see https://www.tiny.cloud/\n *\n * Version: 5.10.5 (2022-05-25)\n */\n(function () {\n 'use strict';\n\n var Cell = function (initial) {\n var value = initial;\n var get = function () {\n return value;\n };\n var set = function (v) {\n value = v;\n };\n return {\n get: get,\n set: set\n };\n };\n\n var hasOwnProperty = Object.hasOwnProperty;\n var has = function (obj, key) {\n return hasOwnProperty.call(obj, key);\n };\n\n var global$2 = tinymce.util.Tools.resolve('tinymce.PluginManager');\n\n var global$1 = tinymce.util.Tools.resolve('tinymce.Env');\n\n var global = tinymce.util.Tools.resolve('tinymce.util.Delay');\n\n var fireResizeEditor = function (editor) {\n return editor.fire('ResizeEditor');\n };\n\n var getAutoResizeMinHeight = function (editor) {\n return editor.getParam('min_height', editor.getElement().offsetHeight, 'number');\n };\n var getAutoResizeMaxHeight = function (editor) {\n return editor.getParam('max_height', 0, 'number');\n };\n var getAutoResizeOverflowPadding = function (editor) {\n return editor.getParam('autoresize_overflow_padding', 1, 'number');\n };\n var getAutoResizeBottomMargin = function (editor) {\n return editor.getParam('autoresize_bottom_margin', 50, 'number');\n };\n var shouldAutoResizeOnInit = function (editor) {\n return editor.getParam('autoresize_on_init', true, 'boolean');\n };\n\n var isFullscreen = function (editor) {\n return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();\n };\n var wait = function (editor, oldSize, times, interval, callback) {\n global.setEditorTimeout(editor, function () {\n resize(editor, oldSize);\n if (times--) {\n wait(editor, oldSize, times, interval, callback);\n } else if (callback) {\n callback();\n }\n }, interval);\n };\n var toggleScrolling = function (editor, state) {\n var body = editor.getBody();\n if (body) {\n body.style.overflowY = state ? '' : 'hidden';\n if (!state) {\n body.scrollTop = 0;\n }\n }\n };\n var parseCssValueToInt = function (dom, elm, name, computed) {\n var value = parseInt(dom.getStyle(elm, name, computed), 10);\n return isNaN(value) ? 0 : value;\n };\n var shouldScrollIntoView = function (trigger) {\n if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') {\n var setContentEvent = trigger;\n return setContentEvent.selection === true || setContentEvent.paste === true;\n } else {\n return false;\n }\n };\n var resize = function (editor, oldSize, trigger) {\n var dom = editor.dom;\n var doc = editor.getDoc();\n if (!doc) {\n return;\n }\n if (isFullscreen(editor)) {\n toggleScrolling(editor, true);\n return;\n }\n var docEle = doc.documentElement;\n var resizeBottomMargin = getAutoResizeBottomMargin(editor);\n var resizeHeight = getAutoResizeMinHeight(editor);\n var marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);\n var marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);\n var contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;\n if (contentHeight < 0) {\n contentHeight = 0;\n }\n var containerHeight = editor.getContainer().offsetHeight;\n var contentAreaHeight = editor.getContentAreaContainer().offsetHeight;\n var chromeHeight = containerHeight - contentAreaHeight;\n if (contentHeight + chromeHeight > getAutoResizeMinHeight(editor)) {\n resizeHeight = contentHeight + chromeHeight;\n }\n var maxHeight = getAutoResizeMaxHeight(editor);\n if (maxHeight && resizeHeight > maxHeight) {\n resizeHeight = maxHeight;\n toggleScrolling(editor, true);\n } else {\n toggleScrolling(editor, false);\n }\n if (resizeHeight !== oldSize.get()) {\n var deltaSize = resizeHeight - oldSize.get();\n dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');\n oldSize.set(resizeHeight);\n fireResizeEditor(editor);\n if (global$1.browser.isSafari() && global$1.mac) {\n var win = editor.getWin();\n win.scrollTo(win.pageXOffset, win.pageYOffset);\n }\n if (editor.hasFocus() && shouldScrollIntoView(trigger)) {\n editor.selection.scrollIntoView();\n }\n if (global$1.webkit && deltaSize < 0) {\n resize(editor, oldSize, trigger);\n }\n }\n };\n var setup = function (editor, oldSize) {\n editor.on('init', function () {\n var overflowPadding = getAutoResizeOverflowPadding(editor);\n var dom = editor.dom;\n dom.setStyles(editor.getDoc().documentElement, { height: 'auto' });\n dom.setStyles(editor.getBody(), {\n 'paddingLeft': overflowPadding,\n 'paddingRight': overflowPadding,\n 'min-height': 0\n });\n });\n editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', function (e) {\n resize(editor, oldSize, e);\n });\n if (shouldAutoResizeOnInit(editor)) {\n editor.on('init', function () {\n wait(editor, oldSize, 20, 100, function () {\n wait(editor, oldSize, 5, 1000);\n });\n });\n }\n };\n\n var register = function (editor, oldSize) {\n editor.addCommand('mceAutoResize', function () {\n resize(editor, oldSize);\n });\n };\n\n function Plugin () {\n global$2.add('autoresize', function (editor) {\n if (!has(editor.settings, 'resize')) {\n editor.settings.resize = false;\n }\n if (!editor.inline) {\n var oldSize = Cell(0);\n register(editor, oldSize);\n setup(editor, oldSize);\n }\n });\n }\n\n Plugin();\n\n}());\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiODU3O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sbCgwKTtcbiAgICAgICAgICByZWdpc3RlcihlZGl0b3IsIG9sZFNpemUpO1xuICAgICAgICAgIHNldHVwKGVkaXRvciwgb2xkU2l6ZSk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cblxuICAgIFBsdWdpbigpO1xuXG59KCkpO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///8578\n")}}]);