mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-05 08:03:11 +00:00
1 line
5.5 KiB
Plaintext
1 line
5.5 KiB
Plaintext
{"version":3,"sources":["webpack:///admin.js","webpack:///./app/javascript/packs/admin.js"],"names":["webpackJsonp","661","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","batchCheckboxClassName","_ref","target","checked","checkAllElement","every","indeterminate","some","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,IAG3C,IAAMqB,GAAyB,wCAE/BV,QAAAG,EAAA,UAASR,SAAU,sBAAuB,SAAU,SAAAgB,GAAgB,GAAbC,GAAaD,EAAbC,UAClDP,QAAQC,KAAKX,SAASY,iBAAiBG,GAAyB,SAACF,GAClEA,EAAQK,QAAUD,EAAOC,YAI7Bb,OAAAG,EAAA,UAASR,SAAUe,EAAwB,SAAU,WACnD,GAAMI,GAAkBnB,SAASC,cAAc,sBAC3CkB,KACFA,EAAgBD,WAAaE,MAAMT,KAAKX,SAASY,iBAAiBG,GAAyB,SAACF,GAAD,MAAaA,GAAQK,UAChHC,EAAgBE,eAAiBF,EAAgBD,YAAcI,KAAKX,KAAKX,SAASY,iBAAiBG,GAAyB,SAACF,GAAD,MAAaA,GAAQK,aAIrJb,OAAAG,EAAA,UAASR,SAAU,6BAA8B,QAAS,cACrDU,QAAQC,KAAKX,SAASY,iBAAiB,wBAAyB,SAACb,GAClEA,EAAQwB,YAIZlB,OAAAG,EAAA,UAASR,SAAU,6BAA8B,QAAS,cACrDU,QAAQC,KAAKX,SAASY,iBAAiB,kDAAmD,SAACb,GAC5FA,EAAQwB,eDuBT","file":"admin.js","sourcesContent":["webpackJsonp([85],{\n\n/***/ 661:\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__(152);\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 checkAllElement.indeterminate = !checkAllElement.checked && [].some.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},[661]);\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(document, '#batch_checkbox_all', 'change', ({ target }) => {\n [].forEach.call(document.querySelectorAll(batchCheckboxClassName), (content) => {\n content.checked = target.checked;\n });\n});\n\ndelegate(document, batchCheckboxClassName, 'change', () => {\n const checkAllElement = document.querySelector('#batch_checkbox_all');\n if (checkAllElement) {\n checkAllElement.checked = [].every.call(document.querySelectorAll(batchCheckboxClassName), (content) => content.checked);\n checkAllElement.indeterminate = !checkAllElement.checked && [].some.call(document.querySelectorAll(batchCheckboxClassName), (content) => content.checked);\n }\n});\n\ndelegate(document, '.media-spoiler-show-button', 'click', () => {\n [].forEach.call(document.querySelectorAll('button.media-spoiler'), (element) => {\n element.click();\n });\n});\n\ndelegate(document, '.media-spoiler-hide-button', 'click', () => {\n [].forEach.call(document.querySelectorAll('.spoiler-button.spoiler-button--visible button'), (element) => {\n element.click();\n });\n});\n\n\n\n// WEBPACK FOOTER //\n// ./app/javascript/packs/admin.js"],"sourceRoot":""} |