AdminLangdefsGridJsParams = "width=800,height=340";

function AdminLangdefsGridModify( uid ) {
	window.open( 'edit.php?mode=modify&uid='+uid , '_blank' , AdminLangdefsGridJsParams );
}

function AdminLangdefsGridAction( n , action ) {
	if ($("#"+FNTHSuperGrid_ToolbarId( n , action )).hasClass( "dsb" )) return;
	switch (action) {
	case "new":
		window.open( 'edit.php?mode=new' , '_blank' , AdminLangdefsGridJsParams );break;
	case "modify":
		AdminLangdefsGridModify( $("#"+n).data( "selecteds" )[0] , AdminLangdefsGridJsParams );
		break;
	case "delete":
		if (!window.confirm( aJSLangDefs.langdefs_confirm_Delete_langdef )) return;
		BGAction( n , action );
		break;
	case "filter":
		$("#frm_AdminLangdefsGrid").append( "<input type=\"hidden\" name=\"task\" value=\"filter\" />" );
		document.frm_AdminLangdefsGrid.submit();
		break;
	case "import":
		AdminLangdefsImport();
		break;
	case "export":
		alert( 'export' );
		break;
	}
}

function AdminLangdefsSubmitImport() {
	document.frm_import.submit();
}

function AdminLangdefsImport() {
	$("#import_dialog").dialog(
		{
			autoOpen: true,
			width: 300,
			height: 120,
			modal: true,
			title : "Import",
			buttons: {
				"Cancel": function() {
					$(this).dialog("destroy");
				},
				"Import": function() {
					AdminLangdefsSubmitImport();
				}
			}
		}
	);
}


function AdminLangdefsGridSelectionChanged( tblid , chk , id ) {
	BGSelectionChanged( tblid , chk , id );
	BGSelectionChangedDefaultAMD( tblid , chk, id );
}

function AdminLangdefsGridSelectAll( tblid , val ) {
	BGSelectAll( tblid , val );
}

