Consulter le code

Create scripts.min.js

Ivan FELICITE a écrit le 16/02/2020 14:12:16
Affichage de 1 fichier(s) changé(s)
1 1
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+"use strict";function insert_at_caret(e,t){var a,l=document.getElementById(e),i=l.scrollTop,r=0,o=l.selectionStart||"0"===l.selectionStart?"ff":!!document.selection&&"ie";"ie"===o?(l.focus(),(a=document.selection.createRange()).moveStart("character",-l.value.length),r=a.text.length):"ff"===o&&(r=l.selectionStart);var n=l.value.substring(0,r),c=l.value.substring(r,l.value.length);l.value=n+t+c,r+=t.length,"ie"===o?(l.focus(),(a=document.selection.createRange()).moveStart("character",-l.value.length),a.moveStart("character",r),a.moveEnd("character",0),a.select()):"ff"===o&&(l.selectionStart=r,l.selectionEnd=r,l.focus()),l.scrollTop=i}function inject_email_template(a,e){$.each(e,function(e,t){e=e.replace("email_template_",""),t&&-1<a.indexOf(e)&&("body"===e?$("#"+e).text(t):"pdf_template"===e?$("#"+e).val(t).trigger("change"):$("#"+e).val(t))})}function update_email_template_preview(){$("#email-template-preview").contents().find("body").html($(".email-template-body").val())}function insert_html_tag(e,t){var a,l,i,r,o,n,c,s;switch(e){case"text-bold":a=["<b>","</b>"];break;case"text-italic":a=["<em>","</em>"];break;case"text-paragraph":a=["<p>","</p>"];break;case"text-linebreak":a=["<br>",""];break;case"text-h1":a=["<h1>","</h1>"];break;case"text-h2":a=["<h2>","</h2>"];break;case"text-h3":a=["<h3>","</h3>"];break;case"text-h4":a=["<h4>","</h4>"];break;case"text-code":a=["<code>","</code>"];break;case"text-hr":a=["<hr/>",""];break;case"text-css":a=["<style></style>",""]}return l=document.getElementById(t),void 0!==document.selection?(l.focus(),i=document.selection.createRange().text):""!==l.selectionStart&&(r=l.selectionStart,o=l.selectionEnd,i=l.value.substring(r,o)),"text-css"===e?(n=a[0]+"\n\r"+l.value,$(l).val(n),update_email_template_preview(),!0):0===a[1].length?(insert_at_caret(t,a[0]),update_email_template_preview(),!0):(i&&i.length?(c=a[0]+i+a[1],s=l.value.length,n=l.value.substring(0,r)+c+l.value.substring(o,s),$(l).val(n)):insert_at_caret(t,a=a[0]+a[1]),void update_email_template_preview())}$(document).ready(function(){$.ajaxPrefilter(function(e){"post"!==e.type&&"POST"!==e.type&&"Post"!==e.type||(""===e.data?e.data+="?_ip_csrf="+Cookies.get("ip_csrf_cookie"):e.data+="&_ip_csrf="+Cookies.get("ip_csrf_cookie"))}),$(document).ajaxComplete(function(){$('[name="_ip_csrf"]').val(Cookies.get("ip_csrf_cookie"))});var e=$("#content"),t=$("html"),a=t.outerHeight()-$(".navbar").outerHeight()-$("#headerbar").outerHeight()-$("#submenu").outerHeight();e.outerHeight()<a&&e.outerHeight(a),t.click(function(){$(".dropdown-menu:visible").not(".datepicker").removeAttr("style")}),$('[data-toggle="tooltip"]').tooltip(),$(".simple-select").select2();new ClipboardJS(".to-clipboard");$(".taggable").on("focus",function(){window.lastTaggableClicked=this}),$(".tag-select").select2().on("change",function(e){var t=$(e.currentTarget);return void 0!==window.lastTaggableClicked&&insert_at_caret(window.lastTaggableClicked.id,t.val()),t.val([]),!1}),$(".html-tag").click(function(){insert_html_tag($(this).data("tagType"),$(".email-template-body").attr("id"))});var l=$(".email-template-body").attr("id");$("#email_template_preview").empty()&&update_email_template_preview(),$(l).bind("input propertychange",function(){update_email_template_preview()}),$("#email-template-preview-reload").click(function(){update_email_template_preview()}),$(document).on("click",".ajax-loader",function(){$("#fullpage-loader").fadeIn(200),window.fullpageloaderTimeout=window.setTimeout(function(){$("#loader-error").fadeIn(200),$("#loader-icon").removeClass("fa-spin").addClass("text-danger")},1e4)}),$(document).on("click",".fullpage-loader-close",function(){$("#fullpage-loader").fadeOut(200),$("#loader-error").hide(),$("#loader-icon").addClass("fa-spin").removeClass("text-danger"),clearTimeout(window.fullpageloaderTimeout)});var i=$(".passwordmeter-input");i&&i.on("input",function(){var e=zxcvbn(i.val());$(".passmeter-2, .passmeter-3").hide(),4===e.score?$(".passmeter-2, .passmeter-3").show():3===e.score&&$(".passmeter-2").show()})});