mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-27 19:06:15 -04:00
UI
This commit is contained in:
parent
ec093c9c85
commit
d408575d60
6 changed files with 16 additions and 5 deletions
|
@ -69,6 +69,7 @@
|
|||
"pad.importExport.exportword": "Microsoft Word",
|
||||
"pad.importExport.exportpdf": "PDF",
|
||||
"pad.importExport.exportopen": "ODF (Open Document Format)",
|
||||
"pad.importExport.authorColors": "Include Author Colors in HTML Export",
|
||||
"pad.importExport.abiword.innerHTML": "You only can import from plain text or HTML formats. For more advanced import features please <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">install abiword</a>.",
|
||||
|
||||
"pad.modals.connected": "Connected.",
|
||||
|
|
|
@ -92,7 +92,8 @@ exports.doExport = function(req, res, padId, type)
|
|||
//render the html document
|
||||
function(callback)
|
||||
{
|
||||
exporthtml.getPadHTMLDocument(padId, req.params.rev, false, function(err, _html)
|
||||
var authorColors = req.query.authorColors;
|
||||
exporthtml.getPadHTMLDocument(padId, req.params.rev, false, authorColors, function(err, _html)
|
||||
{
|
||||
if(ERR(err, callback)) return;
|
||||
html = _html;
|
||||
|
|
|
@ -40,7 +40,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
hasPadAccess(req, res, function()
|
||||
{
|
||||
//render the html document
|
||||
exporthtml.getPadHTMLDocument(padId, null, false, function(err, _html)
|
||||
exporthtml.getPadHTMLDocument(padId, null, false, false, function(err, _html)
|
||||
{
|
||||
if(ERR(err, callback)) return;
|
||||
html = _html;
|
||||
|
|
|
@ -478,7 +478,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
|
|||
return pieces.join('');
|
||||
}
|
||||
|
||||
exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
||||
exports.getPadHTMLDocument = function (padId, revNum, noDocType, authorColor, callback)
|
||||
{
|
||||
padManager.getPad(padId, function (err, pad)
|
||||
{
|
||||
|
@ -591,8 +591,7 @@ exports.getPadHTMLDocument = function (padId, revNum, noDocType, callback)
|
|||
'</style>\n' + '</head>\n') +
|
||||
'<body>';
|
||||
var foot = '</body>\n</html>\n';
|
||||
|
||||
getPadHTML(pad, revNum, function (err, html)
|
||||
getPadHTML(pad, revNum, authorColor, function (err, html)
|
||||
{
|
||||
if(ERR(err, callback)) return;
|
||||
callback(null, head + html + foot);
|
||||
|
|
|
@ -193,6 +193,14 @@ var padimpexp = (function()
|
|||
//get http://example.com/p/padname without Params
|
||||
var pad_root_url = document.location.protocol + '//' + document.location.host + document.location.pathname;
|
||||
|
||||
$('#exportauthorcolors').click(function(){
|
||||
if($('#exportauthorcolors').is(":checked")){
|
||||
$("#exporthtmla").attr("href", pad_root_path + "/export/html?authorColors=true");
|
||||
}else{
|
||||
$("#exporthtmla").attr("href", pad_root_path + "/export/html");
|
||||
}
|
||||
});
|
||||
|
||||
//i10l buttom import
|
||||
$('#importsubmitinput').val(html10n.get("pad.impexp.importbutton"));
|
||||
html10n.bind('localized', function() {
|
||||
|
|
|
@ -232,6 +232,8 @@
|
|||
<a id="exportworda" target="_blank" class="exportlink"><div class="exporttype" id="exportword" data-l10n-id="pad.importExport.exportword"></div></a>
|
||||
<a id="exportpdfa" target="_blank" class="exportlink"><div class="exporttype" id="exportpdf" data-l10n-id="pad.importExport.exportpdf"></div></a>
|
||||
<a id="exportopena" target="_blank" class="exportlink"><div class="exporttype" id="exportopen" data-l10n-id="pad.importExport.exportopen"></div></a>
|
||||
<input type="checkbox" name="checkbox" value="cake" id="exportauthorcolors">
|
||||
<label for="exportauthorcolors" data-l10n-id="pad.importExport.authorColors"></label>
|
||||
<% e.end_block(); %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue