2 |
2 |
3 // TODO ? : get from the server |
3 // TODO ? : get from the server |
4 // extension : label |
4 // extension : label |
5 gFormats = [{'actions':['print'], 'extension':'html', 'label': gettext('print from the browser')}, |
5 gFormats = [{'actions':['print'], 'extension':'html', 'label': gettext('print from the browser')}, |
6 {'actions':['export'], 'extension':'html', 'label': gettext('download html file (.html)')}, |
6 {'actions':['export'], 'extension':'html', 'label': gettext('download html file (.html)')}, |
7 {'actions':['print', 'export'], 'extension':'markdown', 'label': gettext('download markdown file (.mkd)')}, |
7 {'actions':['export'], 'extension':'markdown', 'label': gettext('download markdown file (.mkd)')}, |
8 {'actions':['print', 'export'], 'extension':'pdf', 'label': gettext('download portable object format file (.pdf)')}, |
8 {'actions':['print'], 'extension':'pdf', 'label': gettext('print in PDF format')}, |
9 {'actions':['print', 'export'], 'extension':'latex', 'label': gettext('download latex file (.tex)')}, |
9 {'actions':['export'], 'extension':'pdf', 'label': gettext('download portable object format file (.pdf)')}, |
10 {'actions':['print', 'export'], 'extension':'odt', 'label': gettext('download open document file (.odt)')}, |
10 {'actions':['export'], 'extension':'latex', 'label': gettext('download latex file (.tex)')}, |
11 {'actions':['print', 'export'], 'extension':'doc', 'label': gettext('download microsoft word file (.doc)')}, |
11 {'actions':['export'], 'extension':'odt', 'label': gettext('download open document file (.odt)')}, |
12 {'actions':['print', 'export'], 'extension':'docx', 'label': gettext('download microsoft word 2007 file (.docx)')}]; |
12 {'actions':['export'], 'extension':'doc', 'label': gettext('download microsoft word file (.doc)')}, |
|
13 {'actions':['export'], 'extension':'docx', 'label': gettext('download microsoft word 2007 file (.docx)')}, |
|
14 {'actions':['export'], 'extension':'xml', 'label': gettext('download XML file for re-import')}]; |
13 |
15 |
14 var pandoc_version_ary = sv_pandoc_version.split('.'); |
16 var pandoc_version_ary = sv_pandoc_version.split('.'); |
15 if (parseInt(pandoc_version_ary[0]) > 1 || (parseInt(pandoc_version_ary[0]) == 1 && parseInt(pandoc_version_ary[1]) > 8)) { |
17 if (parseInt(pandoc_version_ary[0]) > 1 || (parseInt(pandoc_version_ary[0]) == 1 && parseInt(pandoc_version_ary[1]) > 8)) { |
16 gFormats.push({'actions':['print', 'export'], 'extension':'epub', 'label': gettext('download ebook (.epub)')}); |
18 gFormats.push({'actions':['export'], 'extension':'epub', 'label': gettext('download ebook (.epub)')}); |
17 } |
19 } |
18 |
20 |
19 gActions = {'print':{'dialogTitle':gettext('Print text'), 'chooseFormatLabel':gettext('How do you want to print?'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}, |
21 gActions = {'print':{'dialogTitle':gettext('Print text'), 'chooseFormatLabel':gettext('How do you want to print?'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}, |
20 'export':{'dialogTitle':gettext('Export text'), 'chooseFormatLabel':gettext('Choose file format'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}} ; |
22 'export':{'dialogTitle':gettext('Export text'), 'chooseFormatLabel':gettext('Choose file format'), 'defaultMethod':'pdf', 'defaultWithColors':"no", 'defaultWhichComments':'all'}} ; |
21 gCurrentAction = null ; |
23 gCurrentAction = null ; |