Don't show PDF Export on Windows
parent
8c301d4fe8
commit
177abdd29e
|
@ -27,6 +27,7 @@ var readOnlyManager = require("../db/ReadOnlyManager");
|
|||
var settings = require('../utils/Settings');
|
||||
var securityManager = require("../db/SecurityManager");
|
||||
var log4js = require('log4js');
|
||||
var os = require("os");
|
||||
var messageLogger = log4js.getLogger("message");
|
||||
|
||||
/**
|
||||
|
@ -752,6 +753,13 @@ function handleClientReady(client, message)
|
|||
var apool = attribsForWire.pool.toJsonable();
|
||||
atext.attribs = attribsForWire.translated;
|
||||
|
||||
//check if abiword is avaiable
|
||||
var abiwordAvailable = settings.abiword != null ? "yes" : "no";
|
||||
if(settings.abiword != null && os.type().indexOf("Windows") != -1)
|
||||
{
|
||||
abiwordAvailable = "withoutPDF";
|
||||
}
|
||||
|
||||
var clientVars = {
|
||||
"accountPrivs": {
|
||||
"maxRevisions": 100
|
||||
|
@ -788,7 +796,7 @@ function handleClientReady(client, message)
|
|||
"fullWidth": false,
|
||||
"hideSidebar": false
|
||||
},
|
||||
"abiwordAvailable": settings.abiword != null,
|
||||
"abiwordAvailable": abiwordAvailable,
|
||||
"hooks": {}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ var padimpexp = (function()
|
|||
$("#exportwordlea").attr("href", document.location.href + "/export/wordle");
|
||||
|
||||
//hide stuff thats not avaible if abiword is disabled
|
||||
if(!clientVars.abiwordAvailable)
|
||||
if(clientVars.abiwordAvailable == "no")
|
||||
{
|
||||
$("#exportworda").remove();
|
||||
$("#exportpdfa").remove();
|
||||
|
@ -245,6 +245,18 @@ var padimpexp = (function()
|
|||
$("#importexportline").css({"height":"95px"});
|
||||
$("#import").html("Import is not available");
|
||||
}
|
||||
else if(clientVars.abiwordAvailable == "withoutPDF")
|
||||
{
|
||||
$("#exportpdfa").remove();
|
||||
|
||||
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
||||
$("#exportopena").attr("href", document.location.href + "/export/odt");
|
||||
|
||||
$("#importexport").css({"height":"142px"});
|
||||
$("#importexportline").css({"height":"142px"});
|
||||
|
||||
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
||||
|
|
Loading…
Reference in New Issue