PageSourceSearch

https://vindeln.se/sitevision/system-resource/1f2fa3ab6e976d9d657f…f2887d96d58302c3e5c0c/js/archive-plugins.js

js vindeln.se collected 2026-10-02 09:58:29 UTC 5,308 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_sv_portlet=self.webpackChunk_sv_portlet||[]).push([[1727],{992:function(t,e,n){var a=n(7809),i=n.n(a),r=n(6751),o=n.n(r),c=n(6237);i()(".sv-archive-portlet").on("click",".sv-create-article-entry",(function(){const t=i()(this),e=t.data("archive-id"),n=t.data("template-id"),a=t.parent(),o=i()("<div>").addClass("sv-loading-icon").text(r.i18n.getText("portlet.archive.archive","creatingArticle"));return a.empty().append(o),r.Ajax.doPost({url:(0,c.L9)({objectId:e,contextNodeId:e,modelHandler:"article"}),data:{template:n,portletType:"archive"},success:function(t){window.location.href=`/edit/${t.nodeId}`}}),!1})),i()(".sv-archive-portlet").length&&o().Events.trigger(o().Events.types.updateLikables),i()(".sv-archive-portlet").on("click","[data-fn-comment]",(t=>{const e=i()(t.currentTarget);return Promise.all([n.e(356),n.e(6301),n.e(2527),n.e(1727)]).then(n.bind(n,1337)).then((t=>{let{initComment:n}=t;n(e)})),!1}))},7787:function(t,e,n){n.r(e);n(992)},1337:function(t,e,n){n.r(e),n.d(e,{initComment:function(){return u}});var a=n(7809),i=n.n(a),r=n(6751),o=n.n(r),c=n(6237),d=n(5143);const s={triggers:{"@":{source:(0,c.xb)(o().PageContext.pageId,"userIdentitySearch",o().PageContext.pageId),searchKey:"term",allowWhiteSpace:!0,maxWhiteSpace:2,parse:t=>t.hits}},minLength:2,replacer:t=>`${t.trigger}{"value":"${t.name}","id":"${t.id}"}`},l=r.KeyUtil.KEY,u=t=>{const e=t.closest("[data-fn-commentlike-container]"),n=`#${t.attr("data-comment-container")}`,a=e.find("[data-fn-comments-input]");if(e.data("sv-fn-initialized")){const t=i()(n);return void(t.is(":hidden")?t.fadeIn("fast",(()=>{a.trigger("focus")})):t.fadeOut("fast"))}e.data("sv-fn-initialized","true");const o=e.find("[data-fn-comments-input-size]").attr("data-initial-size"),c=e.find("[data-fn-comments-submit]"),u=e.find("[data-fn-comments-form]"),f=i()("<img />").attr("src",d).css({"vertical-align":"middle",display:"none"});a.triggeredInput(s).elastic(),a.on("keydown",(function(t){if(r.KeyUtil.getKeyCodeFromEvent(t)===l.RETURN&&t.ctrlKey)return c.trigger("focus"),u.trigger("submit"),!1})),a.on("keyup",(function(t){const e=i()(t.currentTarget),n=e.val(),a=o-n.length,r=e.parent().find("[data-fn-comments-input-size]");a<0?r.addClass("sv-character-limit-exceeded"):r.removeClass("sv-character-limit-exceeded"),r.text(a),""!==e.val().trim()&&a>=0&&!this.activeConnection?c.removeClass("disabled").prop("disabled",!1):c.addClass("disabled").attr("disabled","disabled")})),u.on("submit",(function(n){let d;if(!n.isPropagationStopped()&&!n.isDefaultPrevented()){if(n.preventDefault(),this.activeConnection)return!1;const s=a.val().trim().length,l=a.triggeredInput("getRichContent");if(s>0&&s<=o){c.addClass("disabled").attr("disabled","disabled"),this.activeConnection=!0;const n=u.attr("action");let o="thank";return r.Ajax.doPost({url:n,data:{comment:l}}).then((()=>{const t=e.find("[data-fn-comment-count]"),n=parseInt(t.text(),10)+1;t.text(n)})).catch((()=>{o="error"})).always((()=>{f.hide(),clearTimeout(d);const e=`#${t.attr("data-comment-container")}`;i()(e).hide(),i()(`${e}_${o}`).show(),setTimeout((()=>{i()(`${e}_${o}`).fadeOut("fast")}),5e3),a.val(""),this.activeConnection=!1})),f.appendTo(a.parent()),d=setTimeout((()=>{f.show()}),400),!1}}return!1})),i()(n).fadeIn("fast",(()=>{a.trigger("focus")}))};n(444),n(6301),n(693)},6237:function(t,e,n){n.d(e,{CD:function(){return g},L9:function(){return u},NE:function(){return f},U4:function(){return p},oE:function(){return m},px:function(){return s},t4:function(){return h},xb:function(){return l}});var a=n(6751),i=n.n(a),r=n(7809),o=n.n(r),c=n(1097),d=n.n(c);const s=function(t){var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(window.location.href);return e?e[1]:null},l=function(t,e,n){var a="/modelobjectapi/1/"+i().PageContext.pageId+"/"+t+"/"+e;return n&&(a+="/"+n),a},u=function(t){var e=t.modelHandler,n=t.objectId,a=t.operationObjectId,r=t.contextNodeId||i().PageContext.pageId;"string"==typeof t&&(e=t),n||(n=i().PageContext.pageId);var o="/edit-api/1/"+r+"/"+n+"/"+e;return a&&(o+="/"+a),o},f=function(t,e,n){return`/${i().PageContext.pageId}/${t}.${n?"json":"htm"}?state=${e}`},p=function(t,e){var n=s("identity"),a=s("group"),r=s("tag");return"/portletresource/"+i().PageContext.pageId+"/"+t+"?state="+e+(n?"&identity="+n:"")+(a?"&group="+a:"")+(r?"&tag="+r:"")},g=function(t,e){var n=o()(t);o().each(n,(function(){var t=o()(this),n=t.attr("id"),r=a.ObjectUtil.getObjectId(n);m(t,"/"+i().PageContext.pageId+"/"+r+".htm"+(e||""))}))},m=function(t,e,n){var a;a="string"==typeof t?o()(t):t,o().get(e,(function(e){a.fadeOut("fast",(function(){a.html(e),a.fadeIn(),"function"==typeof n&&n.call(this,t)}))}))};var v={};const h=function(t,e){var n,i=t.attr("id");if(i){if(i=i.replace(".","_"),!v[i+e]){if(0===(n=t.find("script.sv-tmpl-"+e)).length)return void a.Log.warn("portletUtil","Could not find template with name "+e+" for portlet "+i);v[i+e]=d().template(n.html())}return v[i+e]}a.Log.warn("portletUtil","Tried to get template from invalid element")};i().PortletUtil={getModelObjectUri:l,getEditApiUri:u,getPortletUri:f,getPortletResourceUri:p,reloadPortletsByType:g,doGetWithFade:m,doGet:function(t,e){o().get(e,(function(e){o()(t).html(e)}
1))},getTemplate:h,parseRequestParameters:s}}}]);
2//# sourceMappingURL=archive-plugins.js.map

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.