--- a/src/pyams_zodbbrowser/zmi/resources/js/zodbbrowser.min.js Tue May 16 11:41:47 2017 +0200
+++ b/src/pyams_zodbbrowser/zmi/resources/js/zodbbrowser.min.js Mon May 22 00:46:01 2017 +0200
@@ -1,1 +1,1 @@
-(function(a){window.PyAMS_zodbbrowser={filterAll:function(){a(".filter").attr("checked",true);PyAMS_zodbbrowser.filterHistory(true)},filterNone:function(){a(".filter").attr("checked",false);PyAMS_zodbbrowser.filterHistory()},filterHistory:function(k){var p=a("div.transaction");var g=a(".filter");var b=Array();var c="map";for(var n=0;n<g.length;n++){var e=g[n];if(e.checked){b[c+e.name]=e.checked}}for(n=0;n<p.length;n++){var h=p[n];var o=a(h).children("div.diff").children("div.diffitem");var f=0;for(var m=0;m<o.length;m++){var d=a(a(o[m]).children()[0]).text();if(c+d in b||k){a(o[m]).show()}else{a(o[m]).hide();f+=1}}var l=null;if(f==1){l="1 item hidden"}else{if(f){l=f+" items hidden"}}a(h).children(".filtered").remove();if(l){a(h).append('<div class="filtered">'+l+"</div>")}}},collapseOrExpand:function(){var c=a(this).next();var b=a(this).children("img");if(c.is(":hidden")){a(b).attr("src",a("#collapseImg").attr("src"));c.slideDown()}else{a(b).attr("src",a("#expandImg").attr("src"));c.slideUp()}},hideItemsIfTooMany:function(){a(".items").each(function(){var d=a(this).children(".expander")[0];var c=a(this).children(".collapsible")[0];if(c.childNodes.length>100&&!a(c).is(":hidden")){var b=a(d).children("img");a(b).attr("src",a("#expandImg").attr("src"));a(c).hide()}})},showGoTo:function(){a("#path").hide();a("#goto").show();a("#gotoInput").focus()},hideGoTo:function(){a("#goto").hide();a("#path").show();setTimeout(function(){a("#pathError").slideUp()},50)},ajaxErrorHandler:function(b,d,c){errorMessage="";if(d=="parsererror"){errorMessage="Server returned malformed data"}else{if(d=="error"){errorMessage="Unknown error (maybe server is offline?)"}else{if(d=="timeout"){errorMessage="Server timeout"}else{if(d=="notmodified"){errorMessage="Server error (says resource not modified)"}else{errorMessage="Unknown error"}}}}errorMessage='<span class="error"> '+errorMessage+"</strong>";a("#pathError").html(errorMessage)},ajaxSuccessHandler:function(c,b){if(c.url){window.location=c.url;a("#pathError").text("Found.").slideDown().slideUp()}else{if(c.error){a("#pathError").text(c.error).show();if(c.partial_url){a("#pathError").append(', would you like to <a href="'+c.partial_url+'">go to '+c.partial_path+"</a> instead?")}}else{a("#pathError").text(b).show()}}},activateGoTo:function(){var c=a("#gotoInput").val();var b="zodbbrowser_path_to_oid";a("#pathError").text("Loading...").slideDown();a.ajax({url:b,dataType:"json",data:"path="+c,timeout:7000,success:PyAMS_zodbbrowser.ajaxSuccessHandler,error:PyAMS_zodbbrowser.ajaxErrorHandler})},cancelRollback:function(b){a("#confirmation").remove();a("div.transaction").removeClass("focus");a("input.rollbackbtn").show()},pressRollback:function(c){c.preventDefault();PyAMS_zodbbrowser.cancelRollback();a(c.target).hide();var b=a(c.target).closest("div.transaction");b.addClass("focus");a('<div id="confirmation"><form action="" method="post"><div class="message">This is a dangerous operation that may break data integrity. Are you really sure you want to do this?</div><input type="BUTTON" value="Really revert to this state" onclick="PyAMS_zodbbrowser.doRollback()"><input type="BUTTON" value="Cancel" onclick="PyAMS_zodbbrowser.cancelRollback()"></form></div>').appendTo(b)},doRollback:function(){var b=a("#confirmation").closest("div.transaction");var c=b.find("form.rollback");c.find('input[name="confirmed"]').val("1");c.submit()},init:function(b){a(".expander",b).click(PyAMS_zodbbrowser.collapseOrExpand);PyAMS_zodbbrowser.hideItemsIfTooMany();a("#path a",b).click(function(c){c.stopPropagation()});a("#path",b).click(PyAMS_zodbbrowser.showGoTo);a("#gotoInput",b).blur(PyAMS_zodbbrowser.hideGoTo);a("#gotoInput",b).keypress(function(c){if(c.which==13){PyAMS_zodbbrowser.activateGoTo()}});a("#gotoInput",b).keydown(function(c){if(c.keyCode==27){PyAMS_zodbbrowser.hideGoTo()}});a(document).keypress(function(c){if(c.which==103){if(a("#goto",b).is(":hidden")){PyAMS_zodbbrowser.showGoTo();c.preventDefault()}}});a("input.rollbackbtn",b).click(PyAMS_zodbbrowser.pressRollback);a("span.truncated",b).click(function(c){c.preventDefault();var d=a(this);var e=d.attr("id");a.ajax({url:"zodbbrowser_truncated",data:"id="+e,success:function(g,f){d.replaceWith(g)}})})}}})(jQuery);
\ No newline at end of file
+(function(a){window.PyAMS_zodbbrowser={filterAll:function(){a(".filter").attr("checked",true);PyAMS_zodbbrowser.filterHistory(true)},filterNone:function(){a(".filter").attr("checked",false);PyAMS_zodbbrowser.filterHistory()},filterHistory:function(k){var p=a("div.transaction");var g=a(".filter");var b=Array();var c="map";for(var n=0;n<g.length;n++){var e=g[n];if(e.checked){b[c+e.name]=e.checked}}for(n=0;n<p.length;n++){var h=p[n];var o=a(h).children("div.diff").children("div.diffitem");var f=0;for(var m=0;m<o.length;m++){var d=a(a(o[m]).children()[0]).text();if(c+d in b||k){a(o[m]).show()}else{a(o[m]).hide();f+=1}}var l=null;if(f==1){l="1 item hidden"}else{if(f){l=f+" items hidden"}}a(h).children(".filtered").remove();if(l){a(h).append('<div class="filtered">'+l+"</div>")}}},collapseOrExpand:function(){var c=a(this).next();var b=a(this).children("img");if(c.is(":hidden")){a(b).attr("src",a("#collapseImg").attr("src"));c.slideDown()}else{a(b).attr("src",a("#expandImg").attr("src"));c.slideUp()}},hideItemsIfTooMany:function(){a(".items").each(function(){var d=a(this).children(".expander")[0];var c=a(this).children(".collapsible")[0];if(c.childNodes.length>100&&!a(c).is(":hidden")){var b=a(d).children("img");a(b).attr("src",a("#expandImg").attr("src"));a(c).hide()}})},showGoTo:function(){a("#path").hide();a("#goto").show();a("#gotoInput").focus()},hideGoTo:function(){a("#goto").hide();a("#path").show();setTimeout(function(){a("#pathError").slideUp()},50)},ajaxErrorHandler:function(b,d,c){errorMessage="";if(d=="parsererror"){errorMessage="Server returned malformed data"}else{if(d=="error"){errorMessage="Unknown error (maybe server is offline?)"}else{if(d=="timeout"){errorMessage="Server timeout"}else{if(d=="notmodified"){errorMessage="Server error (says resource not modified)"}else{errorMessage="Unknown error"}}}}errorMessage='<span class="error"> '+errorMessage+"</strong>";a("#pathError").html(errorMessage)},ajaxSuccessHandler:function(c,b){if(c.url){window.location=c.url;a("#pathError").text("Found.").slideDown().slideUp()}else{if(c.error){a("#pathError").text(c.error).show();if(c.partial_url){a("#pathError").append(', would you like to <a href="'+c.partial_url+'">go to '+c.partial_path+"</a> instead?")}}else{a("#pathError").text(b).show()}}},activateGoTo:function(){var c=a("#gotoInput").val();var b="zodbbrowser_path_to_oid";a("#pathError").text("Loading...").slideDown();a.ajax({url:b,dataType:"json",data:"path="+c,timeout:7000,success:PyAMS_zodbbrowser.ajaxSuccessHandler,error:PyAMS_zodbbrowser.ajaxErrorHandler})},cancelRollback:function(b){a("#confirmation").remove();a("div.transaction").removeClass("focus");a("input.rollbackbtn").show()},pressRollback:function(c){c.preventDefault();PyAMS_zodbbrowser.cancelRollback();a(c.target).hide();var b=a(c.target).closest("div.transaction");b.addClass("focus");a('<div id="confirmation"><form action="" method="post"><div class="message">This is a dangerous operation that may break data integrity. Are you really sure you want to do this?</div><input type="BUTTON" value="Really revert to this state" onclick="PyAMS_zodbbrowser.doRollback()"><input type="BUTTON" value="Cancel" onclick="PyAMS_zodbbrowser.cancelRollback()"></form></div>').appendTo(b)},doRollback:function(){var b=a("#confirmation").closest("div.transaction");var c=b.find("form.rollback");c.find('input[name="confirmed"]').val("1");c.submit()},init:function(b){PyAMS_zodbbrowser.hideItemsIfTooMany();a("#path a",b).click(function(c){c.stopPropagation()});a("#path",b).click(PyAMS_zodbbrowser.showGoTo);a("#gotoInput",b).blur(PyAMS_zodbbrowser.hideGoTo);a("#gotoInput",b).keypress(function(c){if(c.which==13){PyAMS_zodbbrowser.activateGoTo()}});a("#gotoInput",b).keydown(function(c){if(c.keyCode==27){PyAMS_zodbbrowser.hideGoTo()}});a(document).keypress(function(c){if(c.which==103){if(a("#goto",b).is(":hidden")){PyAMS_zodbbrowser.showGoTo();c.preventDefault()}}});a("input.rollbackbtn",b).click(PyAMS_zodbbrowser.pressRollback);a("span.truncated",b).click(function(c){c.preventDefault();var d=a(this);var e=d.attr("id");a.ajax({url:"zodbbrowser_truncated",data:"id="+e,success:function(g,f){d.replaceWith(g)}})})}}})(jQuery);
\ No newline at end of file