YetiForceCompany/YetiForceCRM

View on GitHub
public_html/layouts/basic/modules/Occurrences/resources/CalendarView.min.js

Summary

Maintainability
A
0 mins
Test Coverage
'use strict';

/* {[The file is published on the basis of YetiForce Public License 6.5 that can be found in the following directory: licenses/LicenseEN.txt or yetiforce.com]} */"use strict";function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var descriptor,i=0;i<props.length;i++)descriptor=props[i],descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return "symbol"===_typeof(key)?key:String(key)}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===hint?String:Number)(input)}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),Object.defineProperty(subClass,"prototype",{writable:!1}),superClass&&_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){return o.__proto__=p,o},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var result,Super=_getPrototypeOf(Derived);if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){if(call&&("object"===_typeof(call)||"function"==typeof call))return call;if(void 0!==call)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(self)}function _assertThisInitialized(self){if(void 0===self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return !1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(o){return o.__proto__||Object.getPrototypeOf(o)},_getPrototypeOf(o)}window.Occurrences_Calendar_Js=/*#__PURE__*/function(_Vtiger_Calendar_Js){function Occurrences_Calendar_Js(){return _classCallCheck(this,Occurrences_Calendar_Js),_super.apply(this,arguments)}_inherits(Occurrences_Calendar_Js,_Vtiger_Calendar_Js);var _super=_createSuper(Occurrences_Calendar_Js);return _createClass(Occurrences_Calendar_Js,[{key:"selectCallbackCreateModal",value:/**
     * Callback after shown create modal
     * @param {jQuery} modal
     * @param {object} info
     */function selectCallbackCreateModal(modal,info){var endTimeString,dateFormat=modal.find("[name=\"date_start\"]").data("dateFormat"),timeFormat=modal.find("[name=\"date_start\"]").data("hourFormat"),userFormat=App.Fields.Date.dateToUserFormat(info.date,dateFormat),defaultTimeFormat="hh:mm A";24==timeFormat&&(defaultTimeFormat="HH:mm");var startTimeString=moment(info.date).format(defaultTimeFormat);info.allDay?(startTimeString=moment().format(defaultTimeFormat),endTimeString=moment().add(30,"minutes").format(defaultTimeFormat)):endTimeString=moment(info.date).add(30,"minutes").format(defaultTimeFormat),modal.find("[name=\"date_start\"]").val(userFormat+" "+startTimeString),modal.find("[name=\"date_end\"]").val(userFormat+" "+endTimeString);}}]),Occurrences_Calendar_Js}(Vtiger_Calendar_Js);
//# sourceMappingURL=CalendarView.min.js.map