if(typeof PhpDebugBar>"u"){var PhpDebugBar={};PhpDebugBar.$=jQuery}(function(n){var o=function(t){return PhpDebugBar.utils.csscls(t,"phpdebugbar-openhandler-")};PhpDebugBar.OpenHandler=PhpDebugBar.Widget.extend({className:"phpdebugbar-openhandler",defaults:{items_per_page:20},render:function(){var t=this;this.$el.appendTo("body").hide(),this.$closebtn=n(''),this.$table=n("
"),n("PHP DebugBar | Open
").addClass(o("header")).append(this.$closebtn).appendTo(this.$el),n('| Date | Method | URL | IP | Filter data |
|---|
').append(this.$table).appendTo(this.$el),this.$actions=n("").addClass(o("actions")).appendTo(this.$el),this.$closebtn.on("click",function(){t.hide()}),this.$loadmorebtn=n("Load more").appendTo(this.$actions).on("click",function(){t.find(t.last_find_request,t.last_find_request.offset+t.get("items_per_page"),t.handleFind.bind(t))}),this.$showonlycurrentbtn=n("Show only current URL").appendTo(this.$actions).on("click",function(){t.$table.empty(),t.find({uri:window.location.pathname},0,t.handleFind.bind(t))}),this.$showallbtn=n("Show all").appendTo(this.$actions).on("click",function(){t.refresh()}),this.$clearbtn=n("Delete all").appendTo(this.$actions).on("click",function(){t.clear(function(){t.hide()})}),this.addSearch(),this.$overlay=n("").addClass(o("overlay")).hide().appendTo("body"),this.$overlay.on("click",function(){t.hide()})},refresh:function(){this.$table.empty(),this.$loadmorebtn.show(),this.find({},0,this.handleFind.bind(this))},addSearch:function(){var t=this,e=n("").text("Search").attr("type","submit").on("click",function(d){t.$table.empty();var i={},s=n(this).parent().serializeArray();n.each(s,function(){this.value&&(i[this.name]=this.value)}),t.find(i,0,t.handleFind.bind(t)),d.preventDefault()});n("").append("
Filter results
").append('Method:
').append('Uri:
').append('IP:
').append(e).appendTo(this.$actions)},handleFind:function(t){var e=this;n.each(t,function(d,i){var s=n("").text("Load dataset").on("click",function(a){e.hide(),e.load(i.id,function(h){e.callback(i.id,h)}),a.preventDefault()}),r=n("").text(i.method).on("click",function(a){e.$table.empty(),e.find({method:i.method},0,e.handleFind.bind(e)),a.preventDefault()}),l=n("").text(i.uri).on("click",function(a){e.hide(),e.load(i.id,function(h){e.callback(i.id,h)}),a.preventDefault()}),p=n("").text(i.ip).on("click",function(a){e.$table.empty(),e.find({ip:i.ip},0,e.handleFind.bind(e)),a.preventDefault()}),c=n("").text("Show URL").on("click",function(a){e.$table.empty(),e.find({uri:i.uri},0,e.handleFind.bind(e)),a.preventDefault()});n("
").append(""+i.datetime+" | ").append(""+i.method+" | ").append(n(" | ").append(l)).append(n(" | ").append(p)).append(n(" | ").append(c)).appendTo(e.$table)}),t.lengthi.json()).then(e)}})})(PhpDebugBar.$);