mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
Hide import/export options that are not avaiable if abiword isn't configured
This commit is contained in:
parent
0d46d6f050
commit
6867d881b1
2 changed files with 21 additions and 5 deletions
|
@ -24,6 +24,7 @@ var Changeset = require("./Changeset");
|
||||||
var AttributePoolFactory = require("./AttributePoolFactory");
|
var AttributePoolFactory = require("./AttributePoolFactory");
|
||||||
var authorManager = require("./AuthorManager");
|
var authorManager = require("./AuthorManager");
|
||||||
var readOnlyManager = require("./ReadOnlyManager");
|
var readOnlyManager = require("./ReadOnlyManager");
|
||||||
|
var settings = require('./settings');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A associative array that translates a session to a pad
|
* A associative array that translates a session to a pad
|
||||||
|
@ -731,6 +732,7 @@ function handleClientReady(client, message)
|
||||||
"fullWidth": false,
|
"fullWidth": false,
|
||||||
"hideSidebar": false
|
"hideSidebar": false
|
||||||
},
|
},
|
||||||
|
"abiwordAvailable": settings.abiword != null,
|
||||||
"hooks": {}
|
"hooks": {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,12 +233,26 @@ var padimpexp = (function()
|
||||||
// build the export links
|
// build the export links
|
||||||
$("#exporthtmla").attr("href", document.location.href + "/export/html");
|
$("#exporthtmla").attr("href", document.location.href + "/export/html");
|
||||||
$("#exportplaina").attr("href", document.location.href + "/export/txt");
|
$("#exportplaina").attr("href", document.location.href + "/export/txt");
|
||||||
|
$("#exportwordlea").attr("href", document.location.href + "/export/wordle");
|
||||||
|
|
||||||
|
//hide stuff thats not avaible if abiword is disabled
|
||||||
|
if(!clientVars.abiwordAvailable)
|
||||||
|
{
|
||||||
|
$("#exportworda").remove();
|
||||||
|
$("#exportpdfa").remove();
|
||||||
|
$("#exportopena").remove();
|
||||||
|
$("#importexport").css({"height":"95px"});
|
||||||
|
$("#importexportline").css({"height":"95px"});
|
||||||
|
$("#import").html("Import is not available");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
$("#exportworda").attr("href", document.location.href + "/export/doc");
|
||||||
$("#exportpdfa").attr("href", document.location.href + "/export/pdf");
|
$("#exportpdfa").attr("href", document.location.href + "/export/pdf");
|
||||||
$("#exportopena").attr("href", document.location.href + "/export/odt");
|
$("#exportopena").attr("href", document.location.href + "/export/odt");
|
||||||
$("#exportwordlea").attr("href", document.location.href + "/export/wordle");
|
|
||||||
|
|
||||||
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
$("#importform").get(0).setAttribute('action', document.location.href + "/import");
|
||||||
|
}
|
||||||
|
|
||||||
$("#impexp-close").click(function()
|
$("#impexp-close").click(function()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue