src/cm/media/js/client/f_printDialog.js
changeset 455 33c7e20efcb7
parent 454 b7a092a52eae
child 467 47f54d0c46dd
equal deleted inserted replaced
454:b7a092a52eae 455:33c7e20efcb7
    82   
    82   
    83   var disableMarkersColorsChoice ;
    83   var disableMarkersColorsChoice ;
    84   if (gCurrentAction == 'print') 
    84   if (gCurrentAction == 'print') 
    85     disableMarkersColorsChoice = ((nb_comments == 0) || (which == 'none'));
    85     disableMarkersColorsChoice = ((nb_comments == 0) || (which == 'none'));
    86   if (gCurrentAction == 'export') 
    86   if (gCurrentAction == 'export') 
    87     disableMarkersColorsChoice = ((nb_comments == 0) || (which == 'none') || (method == 'markdown') || (method == 'latex') || (method == 'epub') || (method == 'odt') || (method == 'doc')) ;
    87     // No colors for:
       
    88     // 1. no comments
       
    89     // 2. pandoc generated formats (markdown, latex, epub)
       
    90     // 3. odt and doc, for some reasons abiword cannot export background-color for these formats
       
    91     // 4. XML export (used for re-import)
       
    92     disableMarkersColorsChoice = ((nb_comments == 0) || (which == 'none') || (method == 'markdown') || (method == 'latex') || (method == 'epub') || (method == 'odt') || (method == 'doc') || (method == 'xml')) ;
    88   
    93   
    89   if (disableMarkersColorsChoice)
    94   if (disableMarkersColorsChoice)
    90     $("#p_color").val('no');
    95     $("#p_color").val('no');
    91 
    96 
    92   $("#p_color").attr("disabled", disableMarkersColorsChoice);
    97   $("#p_color").attr("disabled", disableMarkersColorsChoice);