/* (c) 2008-2014 Samnan ur Rehman @web http://mywebsql.net @license http://mywebsql.net/license */ function selectUser(){user=$("#userlist").val();""!=user&&(setMessage(__("Please wait...")),$("#popup_overlay").removeClass("ui-helper-hidden"),wrkfrmSubmit("usermanager","","",user))}function setError(a,b){$("#grid-messages").html(b).addClass("error");$(selectedRow).length&&($(selectedRow).removeClass("sel"),selectedRow=null);$(a).each(function(){$(this).addClass("error")});setTimeout(function(){$(a).each(function(){$(this).removeClass("error")})},2E3)} function selectAll(){check=$(this).prop("checked");n=$("#grid-tabs").tabs("option","selected");cls="";1==n?cls=".prv":2==n&&(cls=".dbprv");""!=cls&&$(cls).prop("checked",check);$(cls).each(1==n?updatePrivilege:updateDbPrivilege)}function setMessage(a){$("#grid-messages").html(a).removeClass("error")} function cancelOperation(){$("#grid-tabs").tabs("enable",1).tabs("enable",2);$("#userlist").removeAttr("disabled");$("#button-list").animate({"margin-top":"0px"});$("#btn_cancel,#btn_add2").hide();$("#btn_submit").show();loadUserData()} function loadUserData(){$("#username").val(USER_INFO.username);$("#hostname").val(USER_INFO.host);currentDb=null;$("#tab-global").html("");html="";for(var a in PRIVILEGE_NAMES)html+='
";$("#tab-global").html(html);$("#tab-global .prv").click(updatePrivilege);showDbList(); $("#checkboxes").hide();$("#popup_overlay").hide();$("#popup_wrapper").css("display","block");setTimeout(function(){$("#username").focus()},50)} function showDbList(){html='