1 line
3.6 KiB
JavaScript
1 line
3.6 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.taskStatus=e():(t.ntt=t.ntt||{},t.ntt.smartit=t.ntt.smartit||{},t.ntt.smartit.taskStatus=e())}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.r(e),n.d(e,"taskStatus",function(){return c}),n(1);var c=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),u(this,i(e).apply(this,arguments))}var n,r,c;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(e,ntt.smartit.api.ICustomModule),n=e,(r=[{key:"name",value:function(){return"taskStatus"}},{key:"injectTemplates",value:function(){return{"views/layout-configuration/status-bar-component/status-bar.html":[{id:"customTaskStatusExtender",method:"add",mode:"partial",type:"jquery",selector:function(t){return t.find("div")[0]},snippet:'<scope-controller-task-status-bar variable="itemList"></scope-controller-task-status-bar>'}]}}},{key:"injectDynTemplates",value:function(){return{}}},{key:"templates",value:function(){return[{},{},{},{},{},{},{}]}},{key:"i18nLocales",value:function(){return{}}}])&&o(n.prototype,r),c&&o(n,c),e}();ntt.smartit.api.nttSmartitModules.push(new c)},function(t,e){angular.module("myitsmApp").directive("scopeControllerTaskStatusBar",["ModuleConfigService","events",function(t,e){return{restrict:"E",scope:{},link:function(t,e){},controller:["$element","$attrs","$scope",function(t,n,r){r.$parent.$on(e.WIDGET_VALUE_CHANGE,function(t,e){if("Closed"==t.targetScope.statusField.value&&"taskStatus"==e.memberName){var n=t.targetScope.selected.status.statusReasons.find(function(t){return"Success"===t.name});n&&t.targetScope.changeStatusReason(n)}})}]}}])}])}); |