Sid Gifari File Manager
🏠 Root
/
home2
/
meumer25
/
public_html
/
wp-content
/
plugins
/
all-in-one-seo-pack
/
dist
/
Lite
/
assets
/
Editing: posts-table.1dcc3a75.js
import{a as g,c as R}from"./js/runtime-dom.esm-bundler.dc49ee3e.js";import{l as ot}from"./js/index.20093c86.js";import{l as nt}from"./js/index.3030e086.js";import{l as lt}from"./js/index.d80c2c2c.js";import{e as U,a as O,j as rt,v as at,E as H,h as A,b as x,C as Z,ai as ct,a3 as dt,l as j}from"./js/index.317ad629.js";import{u as q}from"./js/TruSeoScore.89e5cf67.js";import{l as M}from"./js/license.414793bf.js";import{t as F}from"./js/Editor.8a5e9531.js";import{_ as G,C as Q}from"./js/Button.9a301412.js";import{C as X}from"./js/HtmlTagsEditor.c93abc5f.js";import{_ as pt}from"./js/ScoreButton.a94ce559.js";import{C as J}from"./js/Tooltip.23c7170d.js";import{_ as ut}from"./js/IndexStatus.db5cd060.js";import{S as mt}from"./js/LogoGear.32164283.js";import{_ as P}from"./js/_plugin-vue_export-helper.eefbdd86.js";import{o as i,c as h,_ as r,a6 as _,a1 as m,a4 as l,a2 as c,a7 as d,$ as o,l as p,a3 as ht,ae as K,h as W}from"./js/runtime-core.esm-bundler.ce5add0b.js";import{b as Y}from"./js/Pencil.d82df6a1.js";import"./js/translations.e71e2202.js";import{_ as T}from"./js/default-i18n.65d58dd6.js";/* empty css */import"./js/Input.f04bee4d.js";import"./js/Index.2a391835.js";import"./js/Close.ccd53ef3.js";import"./js/Trash.87a7d946.js";import"./js/Select.69906a74.js";import"./js/Caret.cd869c5d.js";import"./js/Toggle.11571651.js";import"./js/helpers.633a054c.js";import"./js/upperFirst.5dc701f8.js";import"./js/isEqual.59768dc1.js";import"./js/_baseIsEqual.c0ca09f7.js";import"./js/_getTag.6fb74b2e.js";import"./js/_baseClone.cfa156ff.js";import"./js/_arrayEach.6af5abac.js";import"./js/UnfilteredHtml.f93ca71d.js";import"./js/constants.bc5863fe.js";import"./js/CheckSolid.5be77a11.js";const gt={},_t={viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aioseo-headline-analyzer"},ft=r("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.5448 1.76771H14.6665V1.79272L10.5448 4.61008V1.76771ZM5.46515 8.08232V1.76779H1.34351V4.8899L1.34378 4.71192L5.42731 8.10819L5.46515 8.08232ZM1.34351 11.4568L5.46515 14.2652V15.0999H1.34351V11.4568ZM10.5448 10.8851L14.6665 8.14027V15.0982H10.5448V10.8851Z",fill:"currentColor"},null,-1),wt=r("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.46515 8.05739L5.42731 8.08325L1.34378 4.68698L1.34351 4.86412V1.76779H5.46515V8.05739ZM5.46515 14.2083L1.34351 11.3998V15.0999H5.46515V14.2083ZM10.5448 10.8281L14.6665 8.08332V15.0982H10.5448V10.8281ZM14.6665 1.76778L10.5448 4.58515V1.76771H14.6665V1.76778Z",fill:"currentColor"},null,-1),Tt=r("path",{d:"M5.42725 9.45857L14.6665 3.14303V6.76487L5.46703 12.8912L1.33325 10.0745L1.34372 6.06231L5.42725 9.45857Z",fill:"currentColor"},null,-1),yt=[ft,wt,Tt];function vt(e,s){return i(),h("svg",_t,yt)}const Ct=P(gt,[["render",vt]]),S="all-in-one-seo-pack",kt={setup(){const{runAnalysis:e,strings:s}=q();return{composableStrings:s,optionsStore:U(),rootStore:O(),runAnalysis:e,searchStatisticsStore:rt(),getTagText:F.getTagText}},components:{BaseButton:G,CoreHtmlTagsEditor:X,CoreLoader:Q,CoreScoreButton:pt,CoreTooltip:J,IndexStatus:ut,SvgAioseoLogoGear:mt,SvgHeadlineAnalyzer:Ct,SvgPencil:Y},props:{post:Object,posts:Array},data(){return{allowed:at,postId:null,columnName:null,value:null,title:null,titleParsed:null,postDescription:null,descriptionParsed:null,imageTitle:null,imageAltTag:null,showEditTitle:!1,showEditDescription:!1,showEditImageTitle:!1,showEditImageAltTag:!1,showTruSeo:!1,isSpecialPage:!1,inspectionResult:{},inspectionResultLoading:!0,postLoading:!1,strings:H(this.composableStrings,{title:T("Title",S),description:T("Description",S),imageTitle:T("Image Title",S),imageAltTag:T("Image Alt Tag",S),saveChanges:T("Save Changes",S),discardChanges:T("Discard Changes",S),truSeoScore:T("TruSEO Score",S),headlineScore:T("Headline Score",S)}),license:M}},computed:{showIndexStatus(){if(!this.rootStore.isPro||!M.hasCoreFeature("search-statistics","index-status"))return!1;const e=!this.searchStatisticsStore.unverifiedSite,s=!!this.searchStatisticsStore.isConnected,a=this.allowed("aioseo_search_statistics_settings");return e&&s&&a},showHeadlineAnalyzer(){return this.rootStore.aioseo.data.isClassicEditorActive||this.post.postType==="product"||this.post.postType==="web-story"?!1:this.optionsStore.options.advanced.headlineAnalyzer}},methods:{save(){this.showEditTitle=!1,this.showEditDescription=!1,this.post.title=this.title,this.post.description=this.postDescription,this.postLoading=!0,A.post(x.restUrl("posts-list/update-details-column")).send({postId:this.post.id,title:this.post.title,description:this.post.description}).then(e=>{this.titleParsed=e.body.title,this.descriptionParsed=e.body.description,this.post.titleParsed=e.body.title,this.post.descriptionParsed=e.body.description,this.$root.$data.screen.base!=="upload"&&this.runAnalysis(this.post.id)}).catch(e=>{console.error(`Unable to update post with ID ${this.post.id}: ${e}`)}).finally(()=>{this.postLoading=!1})},saveColumn(){this.showEditImageTitle=!1,this.showEditImageAltTag=!1,this.post.title=this.title,this.post.description=this.postDescription,this.post.imageTitle=this.imageTitle,this.post.imageAltTag=this.imageAltTag,A.post(x.restUrl("posts-list/update-details-column")).send({postId:this.post.id,isMedia:!0,title:this.post.title,description:this.post.description,imageTitle:this.post.imageTitle,imageAltTag:this.post.imageAltTag}).then(()=>{this.updatePostTitle(this.post.id,this.post.imageTitle)}).catch(e=>{console.error(`Unable to update attachment with ID ${this.post.id}: ${e}`)})},cancel(){this.value=this.post.value,this.showEditTitle=!1,this.showEditDescription=!1,this.showEditImageTitle=!1,this.showEditImageAltTag=!1},editTitle(){this.showEditTitle=!0},editDescription(){this.showEditDescription=!0},editImageTitle(){this.showEditImageTitle=!0},editImageAlt(){this.showEditImageAltTag=!0},truncate:Z,updatePostTitle(e,s){const a=document.getElementById(`post-${e}`);if(!a)return;const u=a.getElementsByClassName("title")[0].getElementsByTagName("a")[0];if(!u)return;const t=u.getElementsByTagName("span")[0];u.innerText=s,u.prepend(t)},updateInspectionResult(e){const{inspectionResult:s,inspectionResultLoading:a}=e;this.inspectionResult=s,this.inspectionResultLoading=a}},mounted(){this.postId=this.post.id,this.columnName=this.post.columnName,this.value=this.post.value,this.imageTitle=this.post.imageTitle,this.imageAltTag=this.post.imageAltTag,this.isSpecialPage=this.post.isSpecialPage,this.title=this.post.title||this.post.defaultTitle,this.titleParsed=this.post.titleParsed,this.postDescription=this.post.description||this.post.defaultDescription,this.descriptionParsed=this.post.descriptionParsed,this.inspectionResult=this.post.inspectionResult,this.inspectionResultLoading=this.post.inspectionResultLoading,this.post.reload&&this.save(),window.aioseoBus.$on("updateInspectionResult"+this.postId,this.updateInspectionResult)},beforeUnmount(){window.aioseoBus.$off("updateInspectionResult"+this.postId,this.updateInspectionResult)},async created(){this.showTruSeo=ct()}},bt={key:0,class:"edit-row scores"},St={class:"edit-row edit-title"},Et={key:0},It=r("strong",null,":",-1),Dt={key:1,class:"edit-row"},At={class:"edit-row edit-description"},xt=["id"],Pt=r("strong",null,":",-1),Lt={key:2,class:"edit-row"},Vt={class:"edit-row edit-image-title"},Nt=["id"],zt=r("strong",null,":",-1),Mt={key:3,class:"edit-row"},Bt={class:"edit-row edit-image-alt"},Rt=["id"],Ut=r("strong",null,":",-1),Ot={key:4,class:"edit-row"};function Ht(e,s,a,u,t,n){var N,z;const y=_("index-status"),C=_("svg-headline-analyzer"),v=_("core-score-button"),f=_("core-tooltip"),w=_("svg-aioseo-logo-gear"),D=_("core-loader"),E=_("svg-pencil"),k=_("core-html-tags-editor"),b=_("base-button");return i(),h("div",{class:K(["aioseo-details-column",{editing:t.showEditTitle||t.showEditDescription||t.showEditImageTitle||t.showEditImageAltTag}])},[r("div",null,[e.$root.$data.screen.base==="edit"&&!t.isSpecialPage?(i(),h("div",bt,[n.showIndexStatus?(i(),m(y,{key:0,result:t.inspectionResult,loading:t.inspectionResultLoading,viewable:a.post.isPostVisible,"tooltip-offset":"-150px,0"},null,8,["result","loading","viewable"])):l("",!0),n.showHeadlineAnalyzer?(i(),m(f,{key:1,type:"action"},{tooltip:c(()=>[d(o(t.strings.headlineScore),1)]),default:c(()=>[p(v,{score:a.post.headlineScore,postId:t.postId},{icon:c(()=>[p(C)]),_:1},8,["score","postId"])]),_:1})):l("",!0),t.showTruSeo&&t.allowed("aioseo_page_analysis")?(i(),m(f,{key:2,type:"action"},{tooltip:c(()=>[d(o(t.strings.truSeoScore),1)]),default:c(()=>[p(v,{score:a.post.value,postId:t.postId},{icon:c(()=>[p(w)]),_:1},8,["score","postId"])]),_:1})):l("",!0)])):l("",!0),r("div",null,[t.allowed("aioseo_page_general_settings")&&a.post.showTitle?(i(),m(f,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditTitle},{tooltip:c(()=>[r("strong",null,o(t.strings.title)+":",1),d(" "+o(t.titleParsed),1)]),default:c(()=>[r("div",St,[r("strong",null,o(t.strings.title),1),t.showEditTitle?l("",!0):(i(),h("span",Et,[It,d(" "+o(n.truncate(t.titleParsed,100)),1)])),t.postLoading?(i(),m(D,{key:1,dark:""})):l("",!0),t.showEditTitle?l("",!0):(i(),m(E,{key:2,class:"pencil-icon",onClick:g(n.editTitle,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):l("",!0)]),t.showEditTitle?(i(),h("div",Dt,[p(k,{modelValue:t.title,"onUpdate:modelValue":s[0]||(s[0]=I=>t.title=I),"line-numbers":!1,single:"","tags-context":u.getTagText("post",(N=a.post)==null?void 0:N.postType,"Title"),defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["post_title"]},null,8,["modelValue","tags-context"]),p(b,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(b,{type:"blue",size:"small",onClick:g(n.save,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0),r("div",null,[t.allowed("aioseo_page_general_settings")&&a.post.showDescription?(i(),m(f,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditDescription},{tooltip:c(()=>[r("strong",null,o(t.strings.description)+":",1),d(" "+o(n.truncate(t.descriptionParsed)),1)]),default:c(()=>[r("div",At,[r("strong",null,o(t.strings.description),1),t.showEditDescription?l("",!0):(i(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[Pt,d(" "+o(n.truncate(t.descriptionParsed)),1)],8,xt)),t.postLoading?(i(),m(D,{key:1,dark:""})):l("",!0),t.showEditDescription?l("",!0):(i(),m(E,{key:2,class:"pencil-icon",onClick:g(n.editDescription,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):l("",!0)]),t.showEditDescription?(i(),h("div",Lt,[p(k,{modelValue:t.postDescription,"onUpdate:modelValue":s[1]||(s[1]=I=>t.postDescription=I),"line-numbers":!1,"tags-context":u.getTagText("post",(z=a.post)==null?void 0:z.postType,"Description"),defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["post_excerpt"]},null,8,["modelValue","tags-context"]),p(b,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(b,{type:"blue",size:"small",onClick:g(n.save,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0),ht(e.$slots,"default"),r("div",null,[e.$root.$data.screen.base==="upload"&&a.post.showMedia?(i(),m(f,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditImageTitle},{tooltip:c(()=>[r("strong",null,o(t.strings.imageTitle)+":",1),d(" "+o(t.imageTitle),1)]),default:c(()=>[r("div",Vt,[r("strong",null,o(t.strings.imageTitle),1),t.showEditImageTitle?l("",!0):(i(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[zt,d(" "+o(t.imageTitle),1)],8,Nt)),t.showEditImageTitle?l("",!0):(i(),m(E,{key:1,class:"pencil-icon",onClick:g(n.editImageTitle,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):l("",!0)]),t.showEditImageTitle?(i(),h("div",Mt,[p(k,{modelValue:t.imageTitle,"onUpdate:modelValue":s[2]||(s[2]=I=>t.imageTitle=I),"line-numbers":!1,single:"","tags-context":"imageSeoTitleColumn",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":[]},null,8,["modelValue"]),p(b,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(b,{type:"blue",size:"small",onClick:g(n.saveColumn,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0),r("div",null,[e.$root.$data.screen.base==="upload"&&a.post.showMedia?(i(),m(f,{key:0,class:"aioseo-details-column__tooltip",disabled:t.showEditImageAltTag},{tooltip:c(()=>[r("strong",null,o(t.strings.imageAltTag)+":",1),d(" "+o(t.imageAltTag),1)]),default:c(()=>[r("div",Bt,[r("strong",null,o(t.strings.imageAltTag),1),t.showEditImageAltTag?l("",!0):(i(),h("span",{key:0,id:`aioseo-${t.columnName}-${t.postId}-value`},[Ut,d(" "+o(t.imageAltTag),1)],8,Rt)),t.showEditImageAltTag?l("",!0):(i(),m(E,{key:1,class:"pencil-icon",onClick:g(n.editImageAlt,["prevent"])},null,8,["onClick"]))])]),_:1},8,["disabled"])):l("",!0)]),t.showEditImageAltTag?(i(),h("div",Ot,[p(k,{modelValue:t.imageAltTag,"onUpdate:modelValue":s[3]||(s[3]=I=>t.imageAltTag=I),"line-numbers":!1,single:"","tags-context":"imageSeoAltColumn",defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":[]},null,8,["modelValue"]),p(b,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(b,{type:"blue",size:"small",onClick:g(n.saveColumn,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0)])],2)}const Zt=P(kt,[["render",Ht]]),jt={components:{CorePostColumn:Zt},props:{post:Object}};function qt(e,s,a,u,t,n){const y=_("core-post-column");return i(),m(y,{post:a.post},null,8,["post"])}const B=P(jt,[["render",qt]]),Ft={setup(){return{rootStore:O()}},components:{PostColumn:B,PostColumnLite:B},props:{post:Object}},Gt={class:"aioseo-app"};function Qt(e,s,a,u,t,n){const y=_("PostColumn"),C=_("PostColumnLite");return i(),h("div",Gt,[u.rootStore.isPro?(i(),m(y,{key:0,post:a.post},null,8,["post"])):l("",!0),u.rootStore.isPro?l("",!0):(i(),m(C,{key:1,post:a.post},null,8,["post"]))])}const Xt=P(Ft,[["render",Qt]]),L="all-in-one-seo-pack",Jt={setup(){const{strings:e}=q();return{composableStrings:e,getTagText:F.getTagText}},components:{BaseButton:G,CoreHtmlTagsEditor:X,CoreLoader:Q,CoreTooltip:J,SvgPencil:Y},props:{term:Object,terms:Array,index:Number},data(){return{termId:null,columnName:null,title:null,titleParsed:null,termDescription:null,descriptionParsed:null,showEditTitle:!1,showEditDescription:!1,showTruSeo:!1,termLoading:!1,showTitle:!0,showDescription:!0,strings:H(this.composableStrings,{title:T("Title",L),description:T("Description",L),saveChanges:T("Save Changes",L),discardChanges:T("Discard Changes",L)})}},methods:{save(){this.showEditTitle=!1,this.showEditDescription=!1,this.term.title=this.title,this.term.description=this.termDescription,this.termLoading=!0,A.post(x.restUrl("terms-list/update-details-column")).send({termId:this.term.id,title:this.term.title,description:this.term.description}).then(e=>{this.titleParsed=e.body.title,this.descriptionParsed=e.body.description,this.term.titleParsed=e.body.title,this.term.descriptionParsed=e.body.description,this.showTitle=e.body.showTitle,this.showDescription=e.body.showDescription}).catch(e=>{console.error(`Unable to update term with ID ${this.term.id}: ${e}`)}).finally(()=>{this.termLoading=!1})},cancel(){this.showEditTitle=!1,this.showEditDescription=!1},editTitle(){this.showEditTitle=!0},editDescription(){this.showEditDescription=!0},truncate:Z},mounted(){this.termId=this.term.id,this.columnName=this.term.columnName,this.title=this.term.title,this.titleParsed=this.term.titleParsed,this.termDescription=this.term.description,this.descriptionParsed=this.term.descriptionParsed,this.showTitle=this.term.showTitle,this.showDescription=this.term.showDescription,this.term.reload&&this.save()},async created(){this.showTruSeo=dt()}},Kt={class:"aioseo-app"},Wt={key:0},Yt={class:"edit-row edit-title"},$t={key:0},te=r("strong",null,":",-1),ee={key:1,class:"edit-row"},se={key:2},ie={class:"edit-row edit-description"},oe={key:0},ne=r("strong",null,":",-1),le={key:3,class:"edit-row"};function re(e,s,a,u,t,n){var D,E;const y=_("core-loader"),C=_("svg-pencil"),v=_("core-tooltip"),f=_("core-html-tags-editor"),w=_("base-button");return i(),h("div",Kt,[r("div",{class:K(["aioseo-details-column",{editing:t.showEditTitle||t.showEditDescription}])},[r("div",null,[t.showTitle?(i(),h("div",Wt,[p(v,{class:"aioseo-details-column__tooltip"},{tooltip:c(()=>[r("strong",null,o(t.strings.title)+":",1),d(" "+o(t.titleParsed),1)]),default:c(()=>[r("div",Yt,[r("strong",null,o(t.strings.title),1),t.showEditTitle?l("",!0):(i(),h("span",$t,[te,d(" "+o(n.truncate(t.titleParsed,100)),1)])),t.termLoading?(i(),m(y,{key:1,dark:""})):l("",!0),t.showEditTitle?l("",!0):(i(),m(C,{key:2,class:"pencil-icon",onClick:g(n.editTitle,["prevent"])},null,8,["onClick"]))])]),_:1})])):l("",!0),t.showEditTitle?(i(),h("div",ee,[p(f,{modelValue:t.title,"onUpdate:modelValue":s[0]||(s[0]=k=>t.title=k),"line-numbers":!1,single:"","tags-context":u.getTagText("taxonomy",(D=a.term)==null?void 0:D.taxonomy,"Title"),defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["taxonomy_title"]},null,8,["modelValue","tags-context"]),p(w,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(w,{type:"blue",size:"small",onClick:g(n.save,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0),t.showDescription?(i(),h("div",se,[p(v,{class:"aioseo-details-column__tooltip"},{tooltip:c(()=>[r("strong",null,o(t.strings.description)+":",1),d(" "+o(t.descriptionParsed),1)]),default:c(()=>[r("div",ie,[r("strong",null,o(t.strings.description),1),t.showEditDescription?l("",!0):(i(),h("span",oe,[ne,d(" "+o(n.truncate(t.descriptionParsed)),1)])),t.termLoading?(i(),m(y,{key:1,dark:""})):l("",!0),t.showEditDescription?l("",!0):(i(),m(C,{key:2,class:"pencil-icon",onClick:g(n.editDescription,["prevent"])},null,8,["onClick"]))])]),_:1})])):l("",!0),t.showEditDescription?(i(),h("div",le,[p(f,{modelValue:t.termDescription,"onUpdate:modelValue":s[1]||(s[1]=k=>t.termDescription=k),"line-numbers":!1,"tags-context":u.getTagText("taxonomy",(E=a.term)==null?void 0:E.taxonomy,"Description"),defaultMenuOrientation:"bottom",tagsDescription:"","default-tags":["taxonomy_description"]},null,8,["modelValue","tags-context"]),p(w,{type:"gray",size:"small",onClick:g(n.cancel,["prevent"])},{default:c(()=>[d(o(t.strings.discardChanges),1)]),_:1},8,["onClick"]),p(w,{type:"blue",size:"small",onClick:g(n.save,["prevent"])},{default:c(()=>[d(o(t.strings.saveChanges),1)]),_:1},8,["onClick"])])):l("",!0)])],2)])}const ae=P(Jt,[["render",re]]);j();const $=e=>(e=ot(e),e=nt(e),e=lt(e),j(e),e),tt=e=>{const s=document.getElementById(e);s!=null&&s.__vue_app__&&s.__vue_app__.unmount()},et=(e,s)=>{if(!document.getElementById(`${e.columnName}-${e.id}`)){const u=document.querySelector(`tr#${s}-${e.id}`),t=u==null?void 0:u.querySelector(".column-aioseo-details");if(t){const n=document.createElement("div");n.id=`aioseo-details-${e.id}`,t.appendChild(n)}}},st=e=>{tt(`${e.columnName}-${e.id}`),et(e,"post"),$(R({name:"Standalone/PostsTable/"+e.id,data(){return{screen:window.aioseo.screen}},render:()=>W(Xt)},{post:e})).mount(`#${e.columnName}-${e.id}`)},it=e=>{if(!e)return;const s=document.createElement("input");s.setAttribute("type","hidden"),s.setAttribute("name","aioseo-has-details-column"),s.setAttribute("value",!0),e.append(s)};window.aioseo.posts&&0<window.aioseo.posts.length&&A.post(x.restUrl("posts-list/load-details-column")).send({ids:window.aioseo.posts.map(e=>e.id)}).then(e=>{window.aioseo.posts=window.aioseo.posts.map(s=>({...s,...e.body.posts.find(a=>a.id===s.id)})),window.aioseo.posts.forEach(s=>{st(s)})});const V=e=>{tt(`${e.columnName}-${e.id}`),et(e,"tag"),$(R({name:"Standalone/TermsTable/"+e.id,data(){return{screen:window.aioseo.screen}},render:()=>W(ae)},{term:e})).mount(`#${e.columnName}-${e.id}`)};window.aioseo.terms&&0<window.aioseo.terms.length&&window.aioseo.posts.length===0&&A.post(x.restUrl("terms-list/load-details-column")).send({ids:window.aioseo.terms.map(e=>e.id)}).then(e=>{window.aioseo.terms=window.aioseo.terms.map(s=>({...s,...e.body.terms.find(a=>a.id===s.id)})),window.aioseo.terms.forEach(s=>{V(s)})});it(document.querySelector("#inline-edit div"));it(document.getElementById("addtag"));(function(e){e(document).on("ajaxComplete",(s,a,u)=>{var y,C;const t=new URLSearchParams(u.data),n=t==null?void 0:t.get("action");if(!(!t||!n)){if(n==="inline-save"){const{post_ID:v}=Object.fromEntries(t.entries()),f=window.aioseo.posts.find(w=>w.id===parseInt(v));st({...f,reload:!0})}if(n==="inline-save-tax"){const{tax_ID:v}=Object.fromEntries(t.entries()),f=window.aioseo.terms.find(w=>w.id===parseInt(v));V({...f,reload:!0})}if(n==="add-tag"){const v=e(a.responseXML).find("term_id").text(),f=e(a.responseXML).find("term taxonomy").text(),w=U();V({id:parseInt(v),columnName:"aioseo-details",title:(y=w.dynamicOptions.searchAppearance.taxonomies[f])==null?void 0:y.title,description:(C=w.dynamicOptions.searchAppearance.taxonomies[f])==null?void 0:C.metaDescription,reload:!0})}}})})(window.jQuery);
Save
Cancel