PageSourceSearch

https://app.aliaddo.com/js/desk-solutions-show-article.8bf44b9f.js

js aliaddo.com collected 2026-10-02 00:30:45 UTC 8,720 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkerp_frontend"]=self["webpackChunkerp_frontend"]||[]).push([[1086],{1131:function(t,e,a){a.r(e),a.d(e,{default:function(){return g}});var i=function(){var t=this,e=t._self._c;return e("div",[e("app-breadcrumb",{attrs:{"current-view":"Artículo","last-view":"Manage","last-route-name":"desk-solutions-manage-categories",params:{id:t.$route.query.categoryId,folderId:t.$route.query.folderId}}}),e("validation-observer",{ref:"observer"},[e("app-page-header",{attrs:{title:t.i18n.tc("Article"),icon:"atlas"},scopedSlots:t._u([{key:"actions",fn:function(){return[e("div",{staticClass:"buttons"},[e("b-button",{attrs:{loading:t.loading,tag:"router-link",to:{name:"desk-solutions-edit-articles"}}},[t._v(" Editar ")]),e("div",{staticClass:"buttons field has-addons mb-0 mr-4"},[e("p",{staticClass:"control"},[e("b-button",{class:t.article.isPublic?"readonly":"",style:t.article.isPublic?"pointer-events: none;":"pointer-events: auto;",attrs:{label:"Publicar",type:"is-primary","icon-left":"bullhorn",loading:t.loadingPublic},on:{click:function(e){return t.updatePublicArticle(!0)}}})],1),t.article.isPublic?e("p",{staticClass:"control"},[e("b-dropdown",{attrs:{"aria-role":"list",position:"is-bottom-left"},scopedSlots:t._u([{key:"trigger",fn:function(){return[e("b-button",{attrs:{type:"is-primary","icon-right":"angle-down"}})]},proxy:!0}],null,!1,1992181224)},[e("b-dropdown-item",{on:{click:function(e){return t.updatePublicArticle(!1)}}},[t._v(" Anular publicación ")])],1)],1):t._e()])],1)]},proxy:!0}])}),e("div",[e("div",{staticClass:"columns"},[e("div",{staticClass:"column is-8"},[e("div",{staticClass:"box content-article",staticStyle:{"min-height":"305px"},on:{click:t.handleImageClick}},[e("p",{staticClass:"title"},[t._v(" "+t._s(t.article.title)+" ")]),e("div",{domProps:{innerHTML:t._s(t.processedContent)}})])]),e("div",{staticClass:"column is-4"},[e("app-loading",{attrs:{loading:t.loading}}),e("div",{staticClass:"box"},[e("div",{staticClass:"is-flex is-justify-content-space-between"},[e("p",{staticClass:"subtitle is-5 i"},[e("b-icon",{attrs:{icon:"sliders-h"}}),t._v(" "+t._s(t.i18n.tc("ArticlePropertie"))+" ")],1),e("b-tag",{attrs:{size:"is-medium",type:t.article.isPublic?"is-success is-light":"is-info is-light"}},[t._v(" "+t._s(t.article.isPublic?"Publicado":"Borrador")+" ")])],1),e("div",{staticClass:"card-content"},[e("b-field",{attrs:{label:"Autor"}},[e("p",[t._v(t._s(t.getCreatedBy(t.article.createdBy)))])]),e("b-field",{attrs:{label:"Categoria"}},[e("p",[t._v(t._s(t.article.articleCategoryName))])]),e("b-field",{attrs:{label:"Carpeta"}},[e("p",[t._v(t._s(t.article.name))])])],1)])],1)])])],1),e("b-modal",{attrs:{width:t.modalWidth,height:t.modalHeight,"has-modal-card":!0,"destroy-on-hide":!1,scroll:"keep","custom-class":t.modalCustomClass,"content-class":t.modalContentClass},model:{value:t.showImageModal,callback:function(e){t.showImageModal=e},expression:"showImageModal"}},[e("div",{staticClass:"modal-card",style:t.modalCardStyle},[t.fullscreenMode?t._e():e("header",{staticClass:"modal-card-head"},[e("p",{staticClass:"modal-card-title"},[t._v(" Vista previa de imagen ")]),e("div",{staticStyle:{display:"contents"}},[e("b-button",{staticClass:"mr-2",attrs:{"icon-left":"expand",size:"is-small"},on:{click:t.toggleFullscreen}}),e("button",{staticClass:"delete",attrs:{type:"button"},on:{click:t.closeImageModal}})],1)]),t.fullscreenMode?e("header",{staticClass:"fullscreen-header"},[e("div",{staticClass:"fullscreen-controls"},[e("b-button",{staticClass:"mr-2",attrs:{"icon-left":"compress",size:"is-small"},on:{click:t.toggleFullscreen}}),e("b-button",{attrs:{size:"is-small"},on:{click:t.closeImageModal}},[t._v(" Cerrar ")])],1)]):t._e(),e("section",{staticClass:"modal-card-body",class:{"p-0":t.fullscreenMode,"fullscreen-body":t.fullscreenMode}},[e("div",{staticClass:"image-modal-content",style:t.imageContainerStyle},[e("img",{staticClass:"modal-image",style:t.imageStyle,attrs:{src:t.currentImage.src,alt:t.currentImage.alt},on:{load:t.onImageLoad}})])]),t.fullscreenMode?t._e():e("footer",{staticClass:"modal-card-foot"},[e("div",{staticClass:"is-flex is-justify-content-space-between is-align-items-center w-100"},[e("span",{staticClass:"image-info"},[t._v(t._s(t.currentImage.alt))]),e("div",[e("b-button",{attrs:{label:"Cerrar"},on:{click:t.closeImageModal}}
1)],1)])])])])],1)},s=[],l=(a(18111),a(20116),a(7588),a(69112),a(95170)),r=a(93011),o=a(90488),n=a(31973),c={data(){return{loading:!1,loadingPublic:!1,isPublic:!1,i18n:l.R,article:{createdBy:"",files:[]},processedContent:"",apiErpUrl:"https://app.aliaddo.net/",showImageModal:!1,currentImage:{src:"",alt:"",naturalWidth:0,naturalHeight:0},modalWidth:800,modalHeight:"auto",fullscreenMode:!1,imageLoaded:!1}},computed:{modalCustomClass(){return this.fullscreenMode?"fullscreen-modal":""},modalContentClass(){return this.fullscreenMode?"fullscreen-modal-content":""},modalCardStyle(){return this.fullscreenMode?{width:"100vw",height:"100vh",maxWidth:"none",maxHeight:"none",margin:"0",borderRadius:"0"}:{}},imageContainerStyle(){return this.fullscreenMode?{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"}:{}},imageStyle(){return this.fullscreenMode?{maxWidth:"100%",maxHeight:"100%",width:"auto",height:"auto",objectFit:"contain"}:{maxWidth:"100%",maxHeight:"70vh",width:"auto",height:"auto",objectFit:"contain"}}},created(){this.getArticle()},methods:{getCreatedBy(t){const e=localStorage.getItem(`users_company_${(0,n.A)()?.companyKey}`)?JSON.parse(localStorage.getItem(`users_company_${(0,n.A)()?.companyKey}`)):null;console.log("🚀 ~ users:",e);let a=e.find(e=>e.id===t);return a||(a=e.find(e=>e.email===t)),a?a.userFullName:""},getArticle(){this.loading=!0,r.A.get("desk/articles/"+this.$route.params.id).then(t=>{this.article=t.data||{},this.processArticleContent()}).catch(t=>{console.error("Error al obtener el artículo:",t),this.article={}}).finally(()=>{this.loading=!1})},processArticleContent(){const t=new DOMParser,e=t.parseFromString(this.article.content,"text/html");e.querySelectorAll("img").forEach(t=>{const e=t.getAttribute("src");if(e){t.setAttribute("data-src",e),t.removeAttribute("src"),t.classList.add("lazy-image"),t.classList.add("clickable-image"),t.setAttribute("data-image-src",e),t.setAttribute("data-image-alt",t.getAttribute("alt")||"Imagen del artículo");const a=t.closest("a");a&&a.replaceWith(t)}}),this.processedContent=e.body.innerHTML,this.$nextTick(()=>{this.applyIntersectionObserver()})},applyIntersectionObserver(){const t=this.$el.querySelectorAll(".lazy-image"),e=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const a=t.target,i=a.getAttribute("data-src");i&&(a.setAttribute("src",i),a.removeAttribute("data-src")),e.unobserve(a)}})},{threshold:.1,rootMargin:"50px"});t.forEach(t=>e.observe(t))},handleImageClick(t){const e=t.target;if("IMG"===e.tagName||e.classList.contains("clickable-image")){t.preventDefault(),t.stopPropagation();const a=e.getAttribute("src")||e.getAttribute("data-src")||e.getAttribute("data-image-src"),i=e.getAttribute("alt")||e.getAttribute("data-image-alt")||"Imagen del artículo";a&&this.openImageModal(a,i)}},openImageModal(t,e){this.currentImage={src:t,alt:e,naturalWidth:0,naturalHeight:0},this.fullscreenMode=!1,this.imageLoaded=!1,this.modalWidth=800,this.modalHeight="auto",this.showImageModal=!0},closeImageModal(){this.showImageModal=!1,this.currentImage={src:"",alt:"",naturalWidth:0,naturalHeight:0},this.fullscreenMode=!1,this.imageLoaded=!1},onImageLoad(t){const e=t.target;this.currentImage.naturalWidth=e.naturalWidth,this.currentImage.naturalHeight=e.naturalHeight,this.imageLoaded=!0,this.checkImageSize()},checkImageSize(){const t=window.innerWidth,e=window.innerHeight,a=this.currentImage.naturalWidth,i=this.currentImage.naturalHeight;a>.8*t&&i>.8*e?this.fullscreenMode=!0:this.calculateModalSize()},calculateModalSize(){const t=window.innerWidth,e=window.innerHeight,a=this.currentImage.naturalWidth,i=this.currentImage.naturalHeight,s=.9*t,l=.8*e;let r=a;if(a>s||i>l){const t=s/a,e=l/i,o=Math.min(t,e);r=a*o}this.modalWidth=Math.max(r+60,400)},toggleFullscreen(){this.fullscreenMode=!this.fullscreenMode,this.fullscreenMode?(this.modalWidth="100%",this.modalHeight="100%"):(this.calculateModalSize(),this.modalHeight="auto")},updatePublicArticle(t){this.loadingPublic=!0,r.A.put("desk/articles/update-public?id="+this.$route.params.id+"&isPublic="+t).then(e=>{(0,o.Q$)(t?"Artículo publicado con éxito":"Se anuló la publicación con éxito"),this.getArticle()}).catch(t=>{console.error("error save() >> ",t)}).finally(()=>{this.loadingPublic=!1})}}},d=c,u=a(81656),h=(0,u.A)(d,i,s,!1,null,"04265b64",null),g=h.exports}}]);

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.