function exportDocument() {
    if (annotation.length == 0) {
        exportPreview();
    } else {
        createExportDialogCheckboxes();
        var printDialog = $('#printDialog');
        printDialog.dialog({
            buttons: {
                'Export': function () {
                    exportPreview();
                    $(this).dialog('close');
                }
            },
            title: 'Export'

        });
        printDialog.dialog('open');
    }
}
/**
 * Call createExportDialogCheckboxes, set button to #printDialog and open it. If array annotations is empty, function
 * only call exportPreview().
 */
Call createExportDialogCheckboxes, set button to #printDialog and open it. If array annotations is empty, function
only call exportPreview().
Call createExportDialogCheckboxes set button to #printDialog and open it . If array annotations is empty function only call exportPreview () .
function exportDocument() {
    if (annotation.length == 0) {
        exportPreview();
    } else {
        createExportDialogCheckboxes();
        var printDialog = $('#printDialog');
        printDialog.dialog({
            buttons: {
                'Export': function () {
                    exportPreview();
                    $(this).dialog('close');
                }
            },
            title: 'Export'
        });
        printDialog.dialog('open');
    }
}
function exportDocument ( ) { if ( annotation . length == 0 ) { exportPreview ( ) ; } else { createExportDialogCheckboxes ( ) ; var printDialog = $ ( '#printDialog' ) ; printDialog . dialog ( { buttons : { 'Export' : function ( ) { exportPreview ( ) ; $ ( this ) . dialog ( 'close' ) ; } } , title : 'Export' } ) ; printDialog . dialog ( 'open' ) ; } }
Call createExportDialogCheckboxes, set button to #printDialog and open it.
Call createExportDialogCheckboxes set button to #printDialog and open it .