PageSourceSearch

https://codename.online/build/assets/PageContentEditable.f4d3095e.js

js codename.online collected 2026-10-06 22:45:20 UTC 9,066 bytes, 1 lines download raw bytes

1import{d as a}from"./vuedraggable.umd.dba24c2a.js";import{n}from"./plugin-vue2_normalizer.000ba15c.js";import"./_commonjsHelpers.712cc82f.js";const r={props:["pageId"],components:{draggable:a,"question-number-editable":require("./fragments/QuestionNumberEditable"),"question-range-editable":require("./fragments/QuestionRangeEditable"),"question-order-editable":require("./fragments/QuestionOrderEditable"),"question-match-editable":require("./fragments/QuestionMatchEditable")},data(){return{fragments:[],newFragmentOrder:[],draggableOptions:{scroll:!0,scrollSensitivity:200},showAddContentOptions:!1,showAddGalleryForm:!1,showAddVideoForm:!1,showAddQuestionForm:!1,showAddIframeForm:!1,showAddHeadingForm:!1}},created(){this.getFragments(),this.$root.$on("updateQuestions",()=>{this.getFragments()})},methods:{getFragments(){axios.get(`/api/page/${this.pageId}/fragments`).then(s=>{this.fragments=s.data}).catch(s=>{this.$toast.error("Er is iets mis gegaan met het ophalen van de fragments. Probeer het nogmaals.",this.$t("general.failed"),this.$root.notificationSystem.options.error)})},updateFragmentOrder(){axios.post("/api/fragments/order",{order:this.newFragmentOrder}).then(s=>{this.$toast.success("De aangepaste volgorde is opgeslagen",this.$t("general.success"),this.$root.notificationSystem.options.success)}).catch(s=>{this.$toast.error("Er is iets mis gegaan bij het opslaan van de volgorde. Probeer het nogmaals.",this.$t("general.failed"),this.$root.notificationSystem.options.error)})},onFragmentMove({relatedContext:s}){this.newFragmentOrder=s.list},moveFragment(s,e){axios.post(`/api/fragment/${s.id}/move`,{direction:e}).then(o=>{this.getFragments(),this.$toast.success("De aangepaste volgorde is opgeslagen",this.$t("general.success"),this.$root.notificationSystem.options.success)}).catch(o=>{this.$toast.error("Er is iets mis gegaan bij het opslaan van de volgorde. Probeer het nogmaals.",this.$t("general.failed"),this.$root.notificationSystem.options.error)})},toggleShowAddContentOptions(){this.showAddContentOptions=this.showAddContentOptions!=!0},addTextFragment(){axios.post("/api/fragment/store",{page_id:this.pageId,type:"text"}).then(s=>{this.getFragments(),document.getElementById("content-bottom").scrollIntoView(),this.$toast.success("Het fragment is toegevoegd. U kunt deze nu bewerken.",this.$t("general.success"),this.$root.notificationSystem.options.success)}).catch(s=>{this.$toast.error("Er is iets mis gegaan bij het aanmaken van het fragment. Probeer het nogmaals.",this.$t("general.failed"),this.$root.notificationSystem.options.error)})},toggleShowAddGalleryForm(){this.showAddGalleryForm=this.showAddGalleryForm!=!0,this.showAddGalleryForm&&(document.getElementById("content-bottom").scrollIntoView(),this.toggleShowAddContentOptions())},toggleShowAddVideoForm(){this.showAddVideoForm=this.showAddVideoForm!=!0,this.showAddVideoForm&&(document.getElementById("content-bottom").scrollIntoView(),this.toggleShowAddContentOptions())},toggleShowAddIframeForm(){this.showAddIframeForm=this.showAddIframeForm!=!0,this.showAddIframeForm&&(document.getElementById("content-bottom").scrollIntoView(),this.toggleShowAddContentOptions())},toggleShowAddQuestionForm(){this.showAddQuestionForm=this.showAddQuestionForm!==!0,this.showAddQuestionForm&&(document.getElementById("content-bottom").scrollIntoView(),this.toggleShowAddContentOptions())},toggleShowAddHeadingForm(){this.showAddHeadingForm=this.showAddHeadingForm!==!0,this.showAddHeadingForm&&(document.getElementById("content-bottom").scrollIntoView(),this.toggleShowAddContentOptions())}}};var i=function(){var e=this,o=e._self._c;return o("div",{staticClass:"list-group"},[o("draggable",{ref:"draggableFragments",attrs:{list:e.fragments,options:e.draggableOptions,move:e.onFragmentMove},on:{end:e.updateFragmentOrder}},e._l(e.fragments,function(t){return o("div",{staticClass:"row mb-4"},[t.fragmentable_type==="text"?o("text-editable",{key:t.id,attrs:{fragment:t},on:{update:e.getFragments,moveFragment:e.moveFragment}}):e._e(),t.fragmentable_type==="gallery"?o("gallery-editable",{key:t.id,attrs:{fragment:t},on:{update:e.getFragments,moveFragment:e.moveFragment}}
1):e._e(),t.fragmentable_type==="video"?o("video-editable",{key:t.id,attrs:{fragment:t},on:{update:e.getFragments,moveFragment:e.moveFragment}}):e._e(),t.fragmentable_type==="iframe"?o("iframe-editable",{key:t.id,attrs:{fragment:t},on:{update:e.getFragments,moveFragment:e.moveFragment}}):e._e(),t.fragmentable_type==="heading"?o("heading-editable",{key:t.id,attrs:{fragment:t},on:{update:e.getFragments,moveFragment:e.moveFragment}}):e._e(),t.fragmentable_type=="question"&&t.fragmentable.question_type=="proposition"?o("question-proposition-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type=="question"&&t.fragmentable.question_type=="multiplechoice"?o("question-multiplechoice-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type=="question"&&t.fragmentable.question_type=="tick"?o("question-tick-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type=="question"&&t.fragmentable.question_type=="open"?o("question-open-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type==="question"&&t.fragmentable.question_type==="number"?o("question-number-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type==="question"&&t.fragmentable.question_type==="range"?o("question-range-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type==="question"&&t.fragmentable.question_type==="order"?o("question-order-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e(),t.fragmentable_type==="question"&&t.fragmentable.question_type==="match"?o("question-match-editable",{key:t.id,attrs:{container:t,question:t.fragmentable},on:{update:e.getFragments,movePosition:e.moveFragment}}):e._e()],1)}),0),o("div",{attrs:{id:"content-bottom"}}),e.showAddGalleryForm?o("gallery-add",{attrs:{"page-id":e.pageId},on:{closeGalleryAddForm:e.toggleShowAddGalleryForm,update:e.getFragments}}):e._e(),e.showAddVideoForm?o("video-add",{attrs:{"page-id":e.pageId},on:{closeVideoAddForm:e.toggleShowAddVideoForm,update:e.getFragments}}):e._e(),e.showAddIframeForm?o("iframe-add",{attrs:{"page-id":e.pageId},on:{closeIframeAddForm:e.toggleShowAddIframeForm,update:e.getFragments}}):e._e(),e.showAddHeadingForm?o("heading-add",{attrs:{"page-id":e.pageId},on:{closeHeadingAddForm:e.toggleShowAddHeadingForm,update:e.getFragments}}):e._e(),e.showAddQuestionForm?o("question-add",{attrs:{"parent-type":"page","parent-id":e.pageId},on:{closeQuestionAddForm:e.toggleShowAddQuestionForm,update:e.getFragments}}):e._e(),o("div",{staticClass:"add-content-control-wrapper justify-content-end d-flex mb-3"},[o("div",{staticClass:"add-content ml-auto"},[o("div",{directives:[{name:"show",rawName:"v-show",value:e.showAddContentOptions,expression:"showAddContentOptions"}],staticClass:"open"},[o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddHeadingForm.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-heading mr-3"})]),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddIframeForm.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-window-restore mr-3"})]),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.addTextFragment.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-align-left mr-3"})]),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddGalleryForm.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-image mr-3"})]),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddVideoForm.apply(null,arguments)}}},[o("i",{staticClass:"fab fa-youtube mr-3"})]),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddQuestionForm.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-list"})]),o("span",{staticClass:"separator mr-3 ml-3"}),o("a",{attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddContentOptions.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-times"})])]),o("a",{directives:[{name:"show",rawName:"v-show",value:e.showAddContentOptions===!1,expression:"showAddContentOptions === false"}],staticClass:"closed",attrs:{href:"#"},on:{click:function(t){return t.preventDefault(),e.toggleShowAddContentOptions.apply(null,arguments)}}},[o("i",{staticClass:"fas fa-plus"}
1)])])])],1)},d=[],l=n(r,i,d,!1,null,null,null,null);const p=l.exports;export{p as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.