forked from potsky/PimpMyLog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.min.js
8 lines (8 loc) · 3.08 KB
/
test.min.js
1
2
3
4
5
6
7
8
/*! pimpmylog - 1.7.14 - 025d83c29c6cf8dbb697aa966c9e9f8713ec92f1*/
/*
* pimpmylog
* http://pimpmylog.com
*
* Copyright (c) 2017 Potsky, contributors
* Licensed under the GPLv3 license.
*/$(function(){"use strict";$(document).keypress(function(a){(114==a.which||18==a.which)&&a.ctrlKey&&"#retestertab"===document.location.hash&&$("#regextest").submit()}),$(".logo").click(function(){document.location.href=".."}),$("table").addClass("table table-striped table-bordered table-hover table-condensed"),$("#regextest").submit(function(a){$("#regexTestertestBtn").button("loading"),$.ajax({url:"test.php",type:"POST",data:{r:$("#inputRegEx").val(),l:$("#inputLog").val(),m:$("#inputMatch").val(),t:$("#inputTypes").val(),u:$("#inputMultiline").val(),action:"regextest"},dataType:"json"}).fail(function(a,b,c){$("#regexTestertestBtn").button("reset"),$("#regexresult").html(c.message)}).done(function(a){$("#regexTestertestBtn").button("reset"),$("#regexresult").html(a.msg),$(".form-group").removeClass("has-error"),a.err&&($("#GP"+a.err).addClass("has-error"),$("#"+a.err).focus())}),a.preventDefault()}),$(document).ready(function(){$(".clipboard").on("mouseover",function(){var a=$(this);$(this).off("mouseover"),$(this).zclip($(this).data("source")?{path:"../js/ZeroClipboard.swf",copy:function(){return $($(this).data("source")).text()},afterCopy:function(){$(a).popover({html:!0,animation:!0,placement:$(this).data("placement"),delay:{show:100,hide:5e3},content:$(this).data("text")}).popover("show"),$(a).on("hidden.bs.popover",function(){$(a).show()})}}:{path:"../js/ZeroClipboard.swf",copy:function(){var a="{\n";return a+=' "SOFTWARE_ID": {\n',a+=' "display" : "SOFTWARE NAME",\n',a+=' "path" : "SOFTWARE PATH",\n',a+=' "format" : {\n',a+=' "multiline": '+JSON.stringify($("#inputMultiline").val())+",\n",a+=' "regex" : '+JSON.stringify($("#inputRegEx").val())+",\n",a+=' "match" : '+$("#inputMatch").val()+",\n",a+=' "types" : '+$("#inputTypes").val()+"\n",a+=" }\n",a+=" }\n",a+="}\n"},afterCopy:function(){$(a).popover({html:!0,animation:!0,placement:"right",delay:{show:100,hide:5e3},content:lemma.configuration_copied}).popover("show"),$(a).on("hidden.bs.popover",function(){$(a).show()})}})}),$("#authsave").submit(function(a){var b=$("#username").val(),c=$("#password").val(),d=$("#password2").val(),e=!0;return $("#usernamegroup").removeClass("has-error").removeClass("has-success").tooltip("hide"),$("#passwordgroup").removeClass("has-error").removeClass("has-success").tooltip("hide"),$("#password2group").removeClass("has-error").removeClass("has-success").tooltip("hide"),0===b.length&&($("#usernamegroup").addClass("has-error").tooltip("show"),e=!1),c.length<6&&($("#passwordgroup").addClass("has-error").tooltip("show"),e=!1),d!==c&&($("#password2group").addClass("has-error").tooltip("show"),e=!1),e!==!0?(a.preventDefault(),!1):void 0}),$(function(){if(location.hash){var a=$("[href="+location.hash+"]");a&&a.tab("show")}}),$(".nav-tabs a").click(function(){$(this).tab("show");var a=$("body").scrollTop();window.location.hash=this.hash,$("html,body").scrollTop(a)})})});