/home/techb158/immovalet.com/platform/packages/slug/public/js
Edit: /home/techb158/immovalet.com/platform/packages/slug/public/js/slug.js (2119B)
(()=>{function e(e,a){for(var l=0;l
'),$("#edit-slug-box .cancel").show(),$("#edit-slug-box .save").show(),$(e.currentTarget).hide()})),$(document).on("click","#edit-slug-box .cancel",(function(){var e=$("#current-slug").val(),a=$("#sample-permalink");a.html(''+a.html()+""),$("#editable-post-name").text(e),$("#edit-slug-box .cancel").hide(),$("#edit-slug-box .save").hide(),$("#change_slug").show()}));var e=function(e,a,l){$.ajax({url:$("#slug_id").data("url"),type:"POST",data:{name:e,slug_id:a,model:$("input[name=model]").val()},success:function(e){var a=$("#sample-permalink"),t=$("#slug_id");l?a.find(".permalink").prop("href",t.data("view")+e.replace("/","")):a.html(''+a.html()+""),$(".page-url-seo p").text(t.data("view")+e.replace("/","")),$("#editable-post-name").text(e),$("#current-slug").val(e),$("#edit-slug-box .cancel").hide(),$("#edit-slug-box .save").hide(),$("#change_slug").show(),$("#edit-slug-box").removeClass("hidden")},error:function(e){Botble.handleError(e)}})};$(document).on("click","#edit-slug-box .save",(function(){var a=$("#new-post-slug"),l=a.val(),t=$("#slug_id").data("id");null==t&&(t=0),null!=l&&""!==l?e(l,t,!1):a.closest(".form-group").addClass("has-error")})),$(document).on("blur","#name",(function(a){if($("#edit-slug-box").hasClass("hidden")){var l=$(a.currentTarget).val();null!==l&&""!==l&&e(l,0,!0)}}))}}])&&e(l.prototype,t),a}();$((function(){(new a).init()}))})();