2018-06-02 17:45:23 +00:00
|
|
|
{"version":3,"sources":["webpack:///admin.js","webpack:///./app/javascript/packs/admin.js"],"names":["webpackJsonp","658","module","__webpack_exports__","__webpack_require__","handleDeleteStatus","event","_event$detail","detail","data","element","document","querySelector","id","parentNode","removeChild","Object","defineProperty","value","__WEBPACK_IMPORTED_MODULE_0_rails_ujs__","n","forEach","call","querySelectorAll","content","addEventListener","_ref","target","checked","checkAllElement","every","click"],"mappings":"AAAAA,cAAc,KAERC,IACA,SAAUC,EAAQC,EAAqBC,GAE7C,YCHA,SAASC,GAAmBC,GAAO,GAAAC,GAClBD,EAAME,OAAdC,EAD0BF,EAAA,GAE3BG,EAAUC,SAASC,cAAT,aAAoCH,EAAKI,GAAzC,KACZH,IACFA,EAAQI,WAAWC,YAAYL,GDAnCM,OAAOC,eAAed,EAAqB,cAAgBe,OAAO,GAC7C,IAAIC,GAA0Cf,EAAoB,IACZA,GAAoBgB,EAAED,MCE9FE,QAAQC,KAAKX,SAASY,iBAAiB,iBAAkB,SAACC,GAC3DA,EAAQC,iBAAiB,eAAgBpB,IAK3CW,QAAAG,EAAA,UAASR,SAAU,sBAAuB,SAAU,SAAAe,GAAgB,GAAbC,GAAaD,EAAbC,UAClDN,QAAQC,KAAKX,SAASY,iBAHI,0CAGsC,SAACC,GAClEA,EAAQI,QAAUD,EAAOC,YAI7BZ,OAAAG,EAAA,UAASR,SARsB,yCAQY,SAAU,WACnD,GAAMkB,GAAkBlB,SAASC,cAAc,sBAC3CiB,KACFA,EAAgBD,WAAaE,MAAMR,KAAKX,SAASY,iBAXtB,0CAWgE,SAACC,GAAD,MAAaA,GAAQI,aAIpHZ,OAAAG,EAAA,UAASR,SAAU,6BAA8B,QAAS,cACrDU,QAAQC,KAAKX,SAASY,iBAAiB,wBAAyB,SAACb,GAClEA,EAAQqB,YAIZf,OAAAG,EAAA,UAASR,SAAU,6BAA8B,QAAS,cACrDU,QAAQC,KAAKX,SAASY,iBAAiB,kDAAmD,SAACb,GAC5FA,EAAQqB,eDqBT","file":"admin.js","sourcesContent":["webpackJsonp([69],{\n\n/***/ 658:\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_rails_ujs__ = __webpack_require__(144);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_rails_ujs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_rails_ujs__);\n\n\nfunction handleDeleteStatus(event) {\n var _event$detail = event.detail,\n data = _event$detail[0];\n\n var element = document.querySelector('[data-id=\"' + data.id + '\"]');\n if (element) {\n element.parentNode.removeChild(element);\n }\n}\n\n[].forEach.call(document.querySelectorAll('.trash-button'), function (content) {\n content.addEventListener('ajax:success', handleDeleteStatus);\n});\n\nvar batchCheckboxClassName = '.batch-checkbox input[type=\"checkbox\"]';\n\nObject(__WEBPACK_IMPORTED_MODULE_0_rails_ujs__[\"delegate\"])(document, '#batch_checkbox_all', 'change', function (_ref) {\n var target = _ref.target;\n\n [].forEach.call(document.querySelectorAll(batchCheckboxClassName), function (content) {\n content.checked = target.checked;\n });\n});\n\nObject(__WEBPACK_IMPORTED_MODULE_0_rails_ujs__[\"delegate\"])(document, batchCheckboxClassName, 'change', function () {\n var checkAllElement = document.querySelector('#batch_checkbox_all');\n if (checkAllElement) {\n checkAllElement.checked = [].every.call(document.querySelectorAll(batchCheckboxClassName), function (content) {\n return content.checked;\n });\n }\n});\n\nObject(__WEBPACK_IMPORTED_MODULE_0_rails_ujs__[\"delegate\"])(document, '.media-spoiler-show-button', 'click', function () {\n [].forEach.call(document.querySelectorAll('button.media-spoiler'), function (element) {\n element.click();\n });\n});\n\nObject(__WEBPACK_IMPORTED_MODULE_0_rails_ujs__[\"delegate\"])(document, '.media-spoiler-hide-button', 'click', function () {\n [].forEach.call(document.querySelectorAll('.spoiler-button.spoiler-button--visible button'), function (element) {\n element.click();\n });\n});\n\n/***/ })\n\n},[658]);\n\n\n// WEBPACK FOOTER //\n// admin.js","import { delegate } from 'rails-ujs';\n\nfunction handleDeleteStatus(event) {\n const [data] = event.detail;\n const element = document.querySelector(`[data-id=\"${data.id}\"]`);\n if (element) {\n element.parentNode.removeChild(element);\n }\n}\n\n[].forEach.call(document.querySelectorAll('.trash-button'), (content) => {\n content.addEventListener('ajax:success', handleDeleteStatus);\n});\n\nconst batchCheckboxClassName = '.batch-checkbox input[type=\"checkbox\"]';\n\ndelegate
|