$(document).ready(function(){var a={height:"auto",width:"auto",modal:true,resizable:false};$(".i_edit").click(function(){$('input[name="action"]').val("upd");move_name(this,"server",0);move_name(this,"url",1);move_name(this,"hash",2);move_name(this,"username",3);move_name(this,"id",7);move_name(this,"password",8);$("#dialog").attr("title",mydbr_loc.MYDBR_RS_UPDATE);$(".add").hide();$(".update").show();$("#dialog").dialog(a)});$(".addnew").click(function(){$('input[name="action"]').val("add");$('input[name="id"]').val("0");$('input[name="server"]').val("");$('input[name="url"]').val("");$('input[name="hash"]').val("");$('input[name="username"]').val("");$('input[name="password"]').val("");$("#dialog").attr("title",mydbr_loc.MYDBR_RS_ADD);$(".update").hide();$(".add").show();$("#dialog").dialog(a)});$(".i_delete").click(function(){if(confirm(sprintf(mydbr_loc.MYDBR_RS_DELETE,getTableCell(this,0)))){$('input[name="action"]').val("del");move_name(this,"id",7);$("#dialog_form").submit()}})});function move_name(c,b,a){$('input[name="'+b+'"]').val(getTableCell(c,a))};