webpackJsonp([34],{1:function(t,e,n){"use strict";e.a=function(t,e,n,o,i,a,s,r){var c=typeof(t=t||{}).default;"object"!==c&&"function"!==c||(t=t.default);var d,l="function"==typeof t?t.options:t;e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0);o&&(l.functional=!0);a&&(l._scopeId=a);s?(d=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=d):i&&(d=r?function(){i.call(this,this.$root.$options.shadowRoot)}:i);if(d)if(l.functional){l._injectStyles=d;var u=l.render;l.render=function(t,e){return d.call(e),u(t,e)}}else{var m=l.beforeCreate;l.beforeCreate=m?[].concat(m,d):[d]}return{exports:t,options:l}}},733:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(856),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,function(){return o[t]})}(a);var s=n(984),r=n(1),c=Object(r.a)(i.a,s.a,s.b,!1,null,null,null);e.default=c.exports},856:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(982),a=(o=i)&&o.__esModule?o:{default:o};e.default={props:{for_vertical:{default:"news"},comment_id:{}},components:{"comment-toolbox":a.default},data:function(){return{tekst:"Text",editing:!1,comment_html:!1,langVars:langVars}},watch:{},mounted:function(){},methods:{editCommnet:function(){var t=this;t.$axios.get("/ajax.php?view=json_comment&comment_id="+this.comment_id+"&for_vertical="+this.for_vertical).then(function(e){t.tekst=e.data.komentar,t.editing=!0}).catch(function(t){})},saveCommnet:function(){var t=new URLSearchParams;t.append("action",this.for_vertical+"EditComment"),t.append("item_id",this.comment_id),t.append("komentar",this.tekst),t.append("responseType","json");var e=this;e.$axios.post("/ajax.php?"+(new Date).getTime(),t,{headers:{"content-type":"application/x-www-form-urlencoded"}}).then(function(t){e.comment_html=t.data.komentar_html,e.editing=!1})}}}},857:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"CommentToolbox",props:["comment_id","is_admin","for_vertical"],data:function(){return{visible:!1}},methods:{showDelete:function(){if(confirm("Do you really want to delete this comment?")){var e=new URLSearchParams;e.append("action","delete"+this.for_vertical+"Comment"),e.append("item_id",this.comment_id),e.append("responseType","json");var n=this;this.$axios.post("/ajax.php?"+(new Date).getTime(),e,{headers:{"content-type":"application/x-www-form-urlencoded"}}).then(function(e){t("#cc"+n.comment_id).fadeOut("slow"),t("#dd"+n.comment_id).fadeOut("slow")})}}}}}).call(e,n(10))},982:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(857),i=n.n(o);for(var a in o)"default"!==a&&function(t){n.d(e,t,function(){return o[t]})}(a);var s=n(983),r=n(1),c=Object(r.a)(i.a,s.a,s.b,!1,null,null,null);e.default=c.exports},983:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"toolbox-comments"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticStyle:{"margin-top":"0.2em",padding:"0.5em","background-color":"rgba(220,220,220,0.5)","border-radius":"0.5em"}},[n("button",{staticClass:"button tiny",staticStyle:{"margin-bottom":"0"},on:{click:function(e){t.$emit("show-edit"),t.visible=!1}}},[t._v("Edit\n ")]),t._v(" "),n("button",{staticClass:"button alert tiny",staticStyle:{"margin-bottom":"0"},on:{click:t.showDelete}},[t._v("Delete")])]),t._v(" "),n("span",{staticStyle:{"background-color":"rgba(220,220,220,0.5)",cursor:"pointer","border-radius":"1em",padding:"0.5em","padding-top":"0"},on:{click:function(e){t.visible=!t.visible}}},[t._v("⁝")])])},i=[]},984:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i});var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.editing?n("div",{staticStyle:{background:"#D1EAEB",padding:"0.5rem"}},[n("textarea-autosize",{ref:"autosizeArea",attrs:{"min-height":30,"max-height":350},model:{value:t.tekst,callback:function(e){t.tekst=e},expression:"tekst"}}),t._v(" "),n("button",{staticClass:"button",attrs:{type:"button"},on:{click:function(e){return t.saveCommnet()}}},[n("span",{staticClass:"show-for-sr"},[t._v(t._s(t.langVars.edit))]),t._v(" "),n("span",{attrs:{"aria-hidden":"true"}},[n("i",{staticClass:"fas fa-edit"}),t._v(" "+t._s(t.langVars.edit))])]),t._v(" "),n("button",{staticClass:"hollow button",attrs:{type:"button"},on:{click:function(e){t.editing=!1}}},[n("span",{staticClass:"show-for-sr"},[t._v(t._s(t.langVars.cancel))]),t._v(" "),n("span",{attrs:{"aria-hidden":"true"}},[n("i",{staticClass:"far fa-window-close"}),t._v(" "+t._s(t.langVars.cancel))])])],1):[t.comment_html?n("div",{domProps:{innerHTML:t._s(t.comment_html)}}):t._t("default")],t._v(" "),n("comment-toolbox",{attrs:{comment_id:t.comment_id,is_admin:!1,for_vertical:t.for_vertical},on:{"show-edit":t.editCommnet}})],2)},i=[]}});