qb_akkoma/priv/static/packs/admin.js.map
Haelwenn (lanodan) Monnier 83e3afac2c Update mastodon frontend
2018-09-20 16:13:13 +00:00

1 line
No EOL
3.3 KiB
Text

{"version":3,"sources":["webpack:///./app/javascript/packs/admin.js"],"names":["handleDeleteStatus","event","data","detail","element","document","querySelector","id","parentNode","removeChild","forEach","call","querySelectorAll","content","addEventListener","batchCheckboxClassName","Object","rails_ujs__WEBPACK_IMPORTED_MODULE_0__","_ref","target","checked","checkAllElement","every","indeterminate","some","click","_ref2","rejectMediaDiv","style","display","value"],"mappings":"8GAEA,SAASA,EAAmBC,GAAO,IAC1BC,EAAQD,EAAME,OADY,GAE3BC,EAAUC,SAASC,cAAT,aAAoCJ,EAAKK,GAAzC,MACZH,GACFA,EAAQI,WAAWC,YAAYL,MAIhCM,QAAQC,KAAKN,SAASO,iBAAiB,iBAAkB,SAACC,GAC3DA,EAAQC,iBAAiB,eAAgBd,KAG3C,IAAMe,EAAyB,yCAE/BC,OAAAC,EAAA,SAAAD,CAASX,SAAU,sBAAuB,SAAU,SAAAa,GAAgB,IAAbC,EAAaD,EAAbC,UAClDT,QAAQC,KAAKN,SAASO,iBAAiBG,GAAyB,SAACF,GAClEA,EAAQO,QAAUD,EAAOC,YAI7BJ,OAAAC,EAAA,SAAAD,CAASX,SAAUU,EAAwB,SAAU,WACnD,IAAMM,EAAkBhB,SAASC,cAAc,uBAC3Ce,IACFA,EAAgBD,WAAaE,MAAMX,KAAKN,SAASO,iBAAiBG,GAAyB,SAACF,GAAD,OAAaA,EAAQO,UAChHC,EAAgBE,eAAiBF,EAAgBD,YAAcI,KAAKb,KAAKN,SAASO,iBAAiBG,GAAyB,SAACF,GAAD,OAAaA,EAAQO,aAIrJJ,OAAAC,EAAA,SAAAD,CAASX,SAAU,6BAA8B,QAAS,cACrDK,QAAQC,KAAKN,SAASO,iBAAiB,wBAAyB,SAACR,GAClEA,EAAQqB,YAIZT,OAAAC,EAAA,SAAAD,CAASX,SAAU,6BAA8B,QAAS,cACrDK,QAAQC,KAAKN,SAASO,iBAAiB,kDAAmD,SAACR,GAC5FA,EAAQqB,YAIZT,OAAAC,EAAA,SAAAD,CAASX,SAAU,yBAA0B,SAAU,SAAAqB,GAAgB,IAAbP,EAAaO,EAAbP,OAClDQ,EAAiBtB,SAASC,cAAc,+CAC1CqB,IACFA,EAAeC,MAAMC,QAA4B,YAAjBV,EAAOW,MAAuB,OAAS","file":"admin.js","sourcesContent":["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\ndelegate(document, '#domain_block_severity', 'change', ({ target }) => {\n const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media');\n if (rejectMediaDiv) {\n rejectMediaDiv.style.display = (target.value === 'suspend') ? 'none' : 'block';\n }\n});\n"],"sourceRoot":""}