diff options
author | John McLear <john@mclear.co.uk> | 2015-04-07 21:25:27 +0100 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-04-07 21:25:27 +0100 |
commit | a5345524e1b37ddc529ef3c14abab511a38fb645 (patch) | |
tree | c8487341647aaa91b14b27644abaa55adb48071c /src/node | |
parent | a2e6a1bb4f2035716df4195c40382c3fc991535a (diff) | |
parent | 7e99724feca660bbf97d1dec98457e79a6b861f1 (diff) | |
download | etherpad-lite-a5345524e1b37ddc529ef3c14abab511a38fb645.zip |
Merge pull request #2566 from ether/editbar-accessibility
Accessibility
Diffstat (limited to 'src/node')
-rw-r--r-- | src/node/handler/ImportHandler.js | 6 | ||||
-rw-r--r-- | src/node/utils/Settings.js | 2 | ||||
-rw-r--r-- | src/node/utils/toolbar.js | 10 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 67698651..2dad8b3d 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -148,6 +148,9 @@ exports.doImport = function(req, res, padId) if(!importHandledByPlugin || !directDatabaseAccess){ var fileEnding = path.extname(srcFile).toLowerCase(); var fileIsHTML = (fileEnding === ".html" || fileEnding === ".htm"); + var fileIsTXT = (fileEnding === ".txt"); + if (fileIsTXT) abiword = false; // Don't use abiword for text files + // See https://github.com/ether/etherpad-lite/issues/2572 if (abiword && !fileIsHTML) { abiword.convertFile(srcFile, destFile, "htm", function(err) { //catch convert errors @@ -213,7 +216,7 @@ exports.doImport = function(req, res, padId) // Title needs to be stripped out else it appends it to the pad.. text = text.replace("<title>", "<!-- <title>"); text = text.replace("</title>","</title>-->"); - + //node on windows has a delay on releasing of the file lock. //We add a 100ms delay to work around this if(os.type().indexOf("Windows") > -1){ @@ -245,7 +248,6 @@ exports.doImport = function(req, res, padId) padManager.getPad(padId, function(err, _pad){ var pad = _pad; padManager.unloadPad(padId); - // direct Database Access means a pad user should perform a switchToPad // and not attempt to recieve updated pad data.. if(!directDatabaseAccess){ diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 888e86d3..536c088b 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -100,7 +100,7 @@ exports.toolbar = { ["showusers"] ], timeslider: [ - ["timeslider_export", "timeslider_returnToPad"] + ["timeslider_export", "timeslider_settings", "timeslider_returnToPad"] ] } diff --git a/src/node/utils/toolbar.js b/src/node/utils/toolbar.js index a5d30f96..07b86496 100644 --- a/src/node/utils/toolbar.js +++ b/src/node/utils/toolbar.js @@ -99,12 +99,14 @@ _.extend(Button.prototype, { }; return tag("li", liAttributes, tag("a", { "class": this.grouping, "data-l10n-id": this.attributes.localizationId }, - tag("span", { "class": " "+ this.attributes.class }) + tag("button", { "class": " "+ this.attributes.class, "data-l10n-id": this.attributes.localizationId }) ) ); } }); + + SelectButton = function (attributes) { this.attributes = attributes; this.options = []; @@ -208,6 +210,12 @@ module.exports = { class: "buttonicon buttonicon-import_export" }, + timeslider_settings: { + command: "settings", + localizationId: "pad.toolbar.settings.title", + class: "buttonicon buttonicon-settings" + }, + timeslider_returnToPad: { command: "timeslider_returnToPad", localizationId: "timeslider.toolbar.returnbutton", |