Sha256: 7c81eeb9f06a84c8878eaa531e81cbb66177eddbd991805de7bed26f7e1479ec
Contents?: true
Size: 1.48 KB
Versions: 4
Compression:
Stored size: 1.48 KB
Contents
// Generated by CoffeeScript 1.3.3 (function(){$(function(){var e,t,n,r,i,s,o,u,a,f,l,c,h,p;return e=$("#iam-menu"),p="/iam/log_in_as/:id",c="/iam/menu",o=!1,s="",t=["alt","ctrl","shift"],i=function(){return $(".iam-settings-header").on("click",function(){return $(".iam-settings").toggle()}),$("#iam-menu").on("click","td",function(){var e,t;e=$(this).parents("tr"),t=e.attr("href");if(t)return l(t)}),$.each(t,function(){var e,t;return e=$(".iam-"+this+"-settings input"),t="iam-"+this+"-checked",e[0].checked=$.cookie(t)==="true",e.on("click",function(){return $.cookie(t,this.checked)})})},r=function(e){var t;return t=$("<div class='iam-notice'>"+e+"</div>"),$("body").append(t),t.fadeIn(200).delay(1e3).fadeOut(600)},l=function(t){return $.post(t,function(t){return e.hide(),window.location.reload(),r(t.notice)})},a=function(e){return String.fromCharCode(e)==="À"},n=function(e){var n,r,i,s;for(i=0,s=t.length;i<s;i++){n=t[i],r=$.cookie("iam-"+n+"-checked")==="true";if(r!==e[""+n+"Key"])return!1}return!0},u=function(){return $(document.getSelection().focusNode).find("input, textarea").length>0},h=function(e){var t;if(e.match(/^\d+$/))return t=p.replace(/:id/,e),l(t);if(e)return r(""+e+" is invalid id.")},f=function(){return o?(h(s),$("#iam-menu").remove()):$.get(c,function(e){return $("body").append(e),i()}),s=""},$(document).on("keydown",function(t){var r;if(!u()&&a(t.keyCode)&&n(t))return f(),o=!o,e.toggle();if(48<=(r=t.keyCode)&&r<=57)return s+=String.fromCharCode(t.keyCode)})})}).call(this);
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
iam-0.1.11 | vendor/assets/javascripts/iam.js |
iam-0.1.10 | vendor/assets/javascripts/iam.ujs |
iam-0.1.9 | vendor/assets/javascripts/iam.ujs |
iam-0.1.8 | vendor/assets/javascripts/iam.js |