src/cm/media/js/client/f_printDialog.js
changeset 190 faf3a87a7d73
parent 0 40c8f766c9b8
child 191 c6e4c5a996d0
equal deleted inserted replaced
186:04644502cb79 190:faf3a87a7d73
     8             {'actions':['print', 'export'], 'extension':'pdf', 'label': gettext('download portable object format file (.pdf)')},
     8             {'actions':['print', 'export'], 'extension':'pdf', 'label': gettext('download portable object format file (.pdf)')},
     9             {'actions':['print', 'export'], 'extension':'tex', 'label': gettext('download latex file (.tex)')},
     9             {'actions':['print', 'export'], 'extension':'tex', 'label': gettext('download latex file (.tex)')},
    10             {'actions':['print', 'export'], 'extension':'odt', 'label': gettext('download open document file (.odt)')}] ;
    10             {'actions':['print', 'export'], 'extension':'odt', 'label': gettext('download open document file (.odt)')}] ;
    11 
    11 
    12 
    12 
    13 gActions = {'print':{'dialogTitle':gettext('Print text'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}, 
    13 gActions = {'print':{'dialogTitle':gettext('Print text'), 'chooseFormatLabel':gettext('How do you want to print?'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}, 
    14 			'export':{'dialogTitle':gettext('Export text'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}} ; 
    14 			'export':{'dialogTitle':gettext('Export text'), 'chooseFormatLabel':gettext('Choose file format'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}} ; 
    15 gCurrentAction = null ; 
    15 gCurrentAction = null ; 
    16 	
    16 	
    17 _populateMethod = function(withColors) {
    17 _populateMethod = function(withColors) {
    18 	var val = $("#p_method").val();
    18 	var val = $("#p_method").val();
    19 	
    19 	
   134 }
   134 }
   135 
   135 
   136 _openPrintExportDialog = function(action) {
   136 _openPrintExportDialog = function(action) {
   137 	gCurrentAction = action ;
   137 	gCurrentAction = action ;
   138 	$("#ui-dialog-title-dialog_print_export").html(gActions[gCurrentAction]['dialogTitle']) ;
   138 	$("#ui-dialog-title-dialog_print_export").html(gActions[gCurrentAction]['dialogTitle']) ;
       
   139 	$("#how").html(gActions[gCurrentAction]['chooseFormatLabel']) ;
   139 	$("#print_export_action").val(action) ; // TODO check this still usefull
   140 	$("#print_export_action").val(action) ; // TODO check this still usefull
   140 	
   141 	
   141 	
   142 	
   142 	_populateWhichComments() ;
   143 	_populateWhichComments() ;
   143 	_populateMarkersColorsChoice() ;	
   144 	_populateMarkersColorsChoice() ;