Merge remote branch 'adnan/export_branch'

This commit is contained in:
Michal Čihař
2010-08-23 10:21:22 +02:00
15 changed files with 5727 additions and 2041 deletions

View File

@@ -1436,8 +1436,11 @@ function refreshDragOption(e) {
function refreshLayout() {
var elm = $('#pdflayout')
var orientation = $('#orientation_opt').val();
var paper = $('#paper_opt').val();
if($('#paper_opt').length==1){
var paper = $('#paper_opt').val();
}else{
var paper = 'A4';
}
if (orientation == 'P') {
posa = 'x';
posb = 'y';
@@ -1687,6 +1690,47 @@ $(document).ready(function(){
insertQuery(evt.target.id);
return false;
});
$("#export_type").change(function(){
if($("#export_type").val()=='svg'){
$("#show_grid_opt").attr("disabled","disabled");
$("#orientation_opt").attr("disabled","disabled");
$("#with_doc").attr("disabled","disabled");
$("#show_table_dim_opt").removeAttr("disabled");
$("#all_table_same_wide").removeAttr("disabled");
$("#paper_opt").removeAttr("disabled","disabled");
$("#show_color_opt").removeAttr("disabled","disabled");
//$(this).css("background-color","yellow");
}else if($("#export_type").val()=='dia'){
$("#show_grid_opt").attr("disabled","disabled");
$("#with_doc").attr("disabled","disabled");
$("#show_table_dim_opt").attr("disabled","disabled");
$("#all_table_same_wide").attr("disabled","disabled");
$("#paper_opt").removeAttr("disabled","disabled");
$("#show_color_opt").removeAttr("disabled","disabled");
$("#orientation_opt").removeAttr("disabled","disabled");
}else if($("#export_type").val()=='eps'){
$("#show_grid_opt").attr("disabled","disabled");
$("#orientation_opt").removeAttr("disabled");
$("#with_doc").attr("disabled","disabled");
$("#show_table_dim_opt").attr("disabled","disabled");
$("#all_table_same_wide").attr("disabled","disabled");
$("#paper_opt").attr("disabled","disabled");
$("#show_color_opt").attr("disabled","disabled");
}else if($("#export_type").val()=='pdf'){
$("#show_grid_opt").removeAttr("disabled");
$("#orientation_opt").removeAttr("disabled");
$("#with_doc").removeAttr("disabled","disabled");
$("#show_table_dim_opt").removeAttr("disabled","disabled");
$("#all_table_same_wide").removeAttr("disabled","disabled");
$("#paper_opt").removeAttr("disabled","disabled");
$("#show_color_opt").removeAttr("disabled","disabled");
}else{
// nothing
}
});
$('#sqlquery').focus();
if ($('#input_username')) {
if ($('#input_username').val() == '') {