Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / dashboardItem / dashboardItem.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xc923=['DashboardItem','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x42ead5,_0x58c1b8){var _0x1c08cc=function(_0x19efa2){while(--_0x19efa2){_0x42ead5['push'](_0x42ead5['shift']());}};_0x1c08cc(++_0x58c1b8);}(_0xc923,0x1ef));var _0x3c92=function(_0x51fa5c,_0x4ab762){_0x51fa5c=_0x51fa5c-0x0;var _0x1a7131=_0xc923[_0x51fa5c];return _0x1a7131;};'use strict';var EventEmitter=require(_0x3c92('0x0'));var DashboardItem=require(_0x3c92('0x1'))['db'][_0x3c92('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5ebcfd){return function(_0x3fd700,_0x3b52a5,_0x166f22){DashboardItemEvents[_0x3c92('0x3')](_0x5ebcfd+':'+_0x3fd700['id'],_0x3fd700);DashboardItemEvents[_0x3c92('0x3')](_0x5ebcfd,_0x3fd700);_0x166f22(null);};}for(var e in events){if(events[_0x3c92('0x4')](e)){var event=events[e];DashboardItem[_0x3c92('0x5')](e,emitEvent(event));}}module[_0x3c92('0x6')]=DashboardItemEvents;