diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 0110151c1..b6e1c2473 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,6 +1,31 @@
# Developer Guidelines
(Please talk to people on the mailing list before you change this page, see our section on [how to get in touch](https://github.com/ether/etherpad-lite#get-in-touch))
+## How to write a bug report
+
+* Please be polite, we all are humans and problems can occur.
+* Please add as much information as possible, for example
+ * client os(s) and version(s)
+ * browser(s) and version(s), is the problem reproduceable on different clients
+ * special environments like firewalls or antivirus
+ * host os and version
+ * npm and nodejs version
+ * Logfiles if available
+ * steps to reproduce
+ * what you expected to happen
+ * what actually happened
+* Please format logfiles and code examples with markdown see github Markdown help below the issue textarea for more information.
+
+If you send logfiles, please set the loglevel switch DEBUG in your settings.json file:
+
+```
+/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
+ "loglevel": "DEBUG",
+```
+
+The logfile location is defined in startup script or the log is directly shown in the commandline after you have started etherpad.
+
+
## Important note for pull requests
**Pull requests should be issued against the develop branch**. We never pull directly into master.
diff --git a/src/locales/en.json b/src/locales/en.json
index 7f5846fd2..23bb3a040 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -32,6 +32,7 @@
"pad.settings.padSettings": "Pad Settings",
"pad.settings.myView": "My View",
"pad.settings.stickychat": "Chat always on screen",
+ "pad.settings.chatandusers": "Show Chat and Users",
"pad.settings.colorcheck": "Authorship colors",
"pad.settings.linenocheck": "Line numbers",
"pad.settings.rtlcheck": "Read content from right to left?",
@@ -120,6 +121,7 @@
"timeslider.unnamedauthors": "{{num}} unnamed {[plural(num) one: author, other: authors ]}",
"pad.savedrevs.marked": "This revision is now marked as a saved revision",
+ "pad.savedrevs.timeslider": "You can see saved revisions by visiting the timeslider",
"pad.userlist.entername": "Enter your name",
"pad.userlist.unnamed": "unnamed",
"pad.userlist.guest": "Guest",
diff --git a/src/node/utils/ExportHtml.js b/src/node/utils/ExportHtml.js
index 5e5aca843..0bb93326b 100644
--- a/src/node/utils/ExportHtml.js
+++ b/src/node/utils/ExportHtml.js
@@ -30,8 +30,6 @@ function getPadHTML(pad, revNum, callback)
var html;
async.waterfall([
// fetch revision atext
-
-
function (callback)
{
if (revNum != undefined)
@@ -416,6 +414,7 @@ function getHTMLFromAtext(pad, atext, authorColors)
var lineContentFromHook = hooks.callAllStr("getLineHTMLForExport",
{
line: line,
+ lineContent: lineContent,
apool: apool,
attribLine: attribLines[i],
text: textLines[i]
diff --git a/src/package.json b/src/package.json
index 9259b50f6..0598a4b60 100644
--- a/src/package.json
+++ b/src/package.json
@@ -17,7 +17,7 @@
"etherpad-require-kernel" : "1.0.7",
"resolve" : "1.0.0",
"socket.io" : "1.3.2",
- "ueberDB" : "0.2.10",
+ "ueberDB" : "0.2.11",
"express" : "3.8.1",
"async" : "0.9.0",
"connect" : "2.7.11",
@@ -55,5 +55,5 @@
"repository" : { "type" : "git",
"url" : "http://github.com/ether/etherpad-lite.git"
},
- "version" : "1.5.0"
+ "version" : "1.5.1"
}
diff --git a/src/static/css/pad.css b/src/static/css/pad.css
index 4ba9f5750..70c15b515 100644
--- a/src/static/css/pad.css
+++ b/src/static/css/pad.css
@@ -914,6 +914,36 @@ input[type=checkbox] {
border-left: 1px solid #ccc !important;
width: 185px !important;
}
+.chatAndUsers{
+ display:block !important;
+ right:0px !important;
+ border-radius:0px !important;
+ width:182px !important;
+ margin:2px 0 0 0 !important;
+ border: none !important;
+ border-bottom: 1px solid #ccc !important;
+ height:155px !important;
+ border-left: 1px solid #ccc !important;
+}
+.chatAndUsers > #otherusers{
+ max-height: 100px;
+ overflow-y: auto;
+}
+.chatAndUsersChat > div > #titlecross{
+ display:none;
+}
+.chatAndUsersChat{
+ bottom:0px !important;
+ padding:0 !important;
+ margin:0 !important;
+ right:0 !important;
+ top: 200px !important;
+ width:182px !important;
+ border: none !important;
+ padding:5px !important;
+ border-left: 1px solid #ccc !important;
+}
+
@media screen and (max-width: 600px) {
.toolbar ul li.separator {
display: none;
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js
index 5204e2a19..4b84e784d 100644
--- a/src/static/js/ace2_inner.js
+++ b/src/static/js/ace2_inner.js
@@ -21,6 +21,17 @@
*/
var _, $, jQuery, plugins, Ace2Common;
+var browser = require('./browser').browser;
+if(browser.msie){
+ // Honestly fuck IE royally.
+ // Basically every hack we have since V11 causes a problem
+ if(parseInt(browser.version) >= 11){
+ delete browser.msie;
+ browser.chrome = true;
+ browser.modernIE = true;
+ }
+}
+
Ace2Common = require('./ace2_common');
plugins = require('ep_etherpad-lite/static/js/pluginfw/client_plugins');
@@ -34,8 +45,7 @@ var isNodeText = Ace2Common.isNodeText,
binarySearchInfinite = Ace2Common.binarySearchInfinite,
htmlPrettyEscape = Ace2Common.htmlPrettyEscape,
noop = Ace2Common.noop;
- var hooks = require('./pluginfw/hooks');
- var browser = require('./browser').browser;
+var hooks = require('./pluginfw/hooks');
function Ace2Inner(){
@@ -1353,7 +1363,7 @@ function Ace2Inner(){
// (from how it looks in our representation) and record them in a way
// that can be used to "normalize" the document (apply the changes to our
// representation, and put the DOM in a canonical form).
- //top.console.log("observeChangesAroundNode(%o)", node);
+ // top.console.log("observeChangesAroundNode(%o)", node);
var cleanNode;
var hasAdjacentDirtyness;
if (!isNodeDirty(node))
@@ -2960,7 +2970,6 @@ function Ace2Inner(){
{
return "";
};
-
return result;
}
else
@@ -3584,8 +3593,7 @@ function Ace2Inner(){
// On Mac and Linux, move right moves to end of word and move left moves to start;
// on Windows, always move to start of word.
// On Windows, Firefox and IE disagree on whether to stop for punctuation (FF says no).
- /*
- if (browser.windows && forwardNotBack)
+ if (browser.msie && forwardNotBack)
{
while ((!isDone()) && isWordChar(nextChar()))
{
@@ -3607,7 +3615,6 @@ function Ace2Inner(){
advance();
}
}
- */
return i;
}
@@ -3627,7 +3634,6 @@ function Ace2Inner(){
evt.preventDefault();
return;
}
-
// Is caret potentially hidden by the chat button?
var myselection = document.getSelection(); // get the current caret selection
var caretOffsetTop = myselection.focusNode.parentNode.offsetTop | myselection.focusNode.offsetTop; // get the carets selection offset in px IE 214
@@ -3665,7 +3671,6 @@ function Ace2Inner(){
var specialHandled = false;
var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress"));
var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress"));
-
var stopped = false;
inCallStackIfNecessary("handleKeyEvent", function()
@@ -3915,10 +3920,10 @@ function Ace2Inner(){
// only move the viewport if we're at the bottom of the viewport, if we hit down any other time the viewport shouldn't change
// NOTE: This behavior only fires if Chrome decides to break the page layout after a paste, it's annoying but nothing I can do
var selection = getSelection();
- top.console.log("line #", rep.selStart[0]); // the line our caret is on
- top.console.log("firstvisible", visibleLineRange[0]); // the first visiblel ine
- top.console.log("lastVisible", visibleLineRange[1]); // the last visible line
- top.console.log(rep.selStart[0], visibleLineRange[1], rep.selStart[0], visibleLineRange[0]);
+ // top.console.log("line #", rep.selStart[0]); // the line our caret is on
+ // top.console.log("firstvisible", visibleLineRange[0]); // the first visiblel ine
+ // top.console.log("lastVisible", visibleLineRange[1]); // the last visible line
+ // top.console.log(rep.selStart[0], visibleLineRange[1], rep.selStart[0], visibleLineRange[0]);
var newY = viewport.top + lineHeight;
}
if(newY){
@@ -3952,7 +3957,7 @@ function Ace2Inner(){
}
// Is part of multi-keystroke international character on Firefox Mac
- var isFirefoxHalfCharacter = (browser.mozilla && evt.altKey && charCode === 0 && keyCode === 0);
+ var isFirefoxHalfCharacter = (browser.firefox && evt.altKey && charCode === 0 && keyCode === 0);
// Is part of multi-keystroke international character on Safari Mac
var isSafariHalfCharacter = (browser.safari && evt.altKey && keyCode == 229);
@@ -4267,12 +4272,6 @@ function Ace2Inner(){
end.collapse(false);
selection.startPoint = pointFromCollapsedRange(start);
selection.endPoint = pointFromCollapsedRange(end);
-/*if ((!selection.startPoint.node.isText) && (!selection.endPoint.node.isText)) {
- console.log(selection.startPoint.node.uniqueId()+","+
- selection.startPoint.index+" / "+
- selection.endPoint.node.uniqueId()+","+
- selection.endPoint.index);
-}*/
}
return selection;
}
@@ -4684,7 +4683,7 @@ function Ace2Inner(){
setIfNecessary(iframe.style, "width", newWidth + "px");
setIfNecessary(sideDiv.style, "height", newHeight + "px");
}
- if (browser.mozilla)
+ if (browser.firefox)
{
if (!doesWrap)
{
@@ -4870,7 +4869,7 @@ function Ace2Inner(){
})
// CompositionEvent is not implemented below IE version 8
- if ( !(browser.msie && parseInt(browser.version) < 9) && document.documentElement)
+ if ( !(browser.msie && parseInt(browser.version <= 9)) && document.documentElement)
{
$(document.documentElement).on("compositionstart", handleCompositionEvent);
$(document.documentElement).on("compositionend", handleCompositionEvent);
@@ -5333,20 +5332,9 @@ function Ace2Inner(){
{
var body = doc.getElementById("innerdocbody");
root = body; // defined as a var in scope outside
- if (browser.mozilla) $(root).addClass("mozilla");
+ if (browser.firefox) $(root).addClass("mozilla");
if (browser.safari) $(root).addClass("safari");
if (browser.msie) $(root).addClass("msie");
- if (browser.msie)
- {
- // cache CSS background images
- try
- {
- doc.execCommand("BackgroundImageCache", false, true);
- }
- catch (e)
- { /* throws an error in some IE 6 but not others! */
- }
- }
setClassPresence(root, "authorColors", true);
setClassPresence(root, "doesWrap", doesWrap);
diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js
index a25d889b9..817155b55 100644
--- a/src/static/js/broadcast.js
+++ b/src/static/js/broadcast.js
@@ -66,18 +66,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
}
}
- // for IE
- if (browser.msie)
- {
- try
- {
- document.execCommand("BackgroundImageCache", false, true);
- }
- catch (e)
- {}
- }
-
-
//var socket;
var channelState = "DISCONNECTED";
diff --git a/src/static/js/chat.js b/src/static/js/chat.js
index 4cbbbaa78..fb01befec 100644
--- a/src/static/js/chat.js
+++ b/src/static/js/chat.js
@@ -54,6 +54,22 @@ var chat = (function()
isStuck = false;
}
},
+ chatAndUsers: function(fromInitialCall)
+ {
+ if(fromInitialCall || $('#options-chatandusers').prop('checked')){
+ padcookie.setPref("chatAndUsers", true);
+ chat.stickToScreen(true);
+ $('#options-stickychat').prop('checked', true)
+ $('#options-stickychat').prop("disabled", "disabled");
+ $('#users').addClass("chatAndUsers");
+ $("#chatbox").addClass("chatAndUsersChat");
+ }else{
+ padcookie.setPref("chatAndUsers", false);
+ $('#options-stickychat').prop("disabled", false);
+ $('#users').removeClass("chatAndUsers");
+ $("#chatbox").removeClass("chatAndUsersChat");
+ }
+ },
hide: function ()
{
// decide on hide logic based on chat window being maximized or not
diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js
index 6089f1972..e5c0ec8b2 100644
--- a/src/static/js/collab_client.js
+++ b/src/static/js/collab_client.js
@@ -81,8 +81,7 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
onServerMessage: function()
{}
};
-
- if (browser.mozilla)
+ if (browser.firefox)
{
// Prevent "escape" from taking effect and canceling a comet connection;
// doesn't work if focus is on an iframe.
diff --git a/src/static/js/contentcollector.js b/src/static/js/contentcollector.js
index 1759d8656..1f0620fef 100644
--- a/src/static/js/contentcollector.js
+++ b/src/static/js/contentcollector.js
@@ -35,9 +35,10 @@ function sanitizeUnicode(s)
return UNorm.nfc(s);
}
-function makeContentCollector(collectStyles, browser, apool, domInterface, className2Author)
+function makeContentCollector(collectStyles, abrowser, apool, domInterface, className2Author)
{
- browser = browser || {};
+ abrowser = abrowser || {};
+ // I don't like the above.
var dom = domInterface || {
isNodeText: function(n)
@@ -484,7 +485,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
var cls = dom.nodeProp(node, "className");
var isPre = (tname == "pre");
- if ((!isPre) && browser.safari)
+ if ((!isPre) && abrowser.safari)
{
isPre = (styl && /\bwhite-space:\s*pre\b/i.exec(styl));
}
@@ -610,7 +611,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
}
}
}
- if (!browser.msie)
+ if (!abrowser.msie)
{
_reachBlockPoint(node, 1, state);
}
@@ -625,7 +626,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
_ensureColumnZero(state);
}
}
- if (browser.msie)
+ if (abrowser.msie)
{
// in IE, a point immediately after a DIV appears on the next line
_reachBlockPoint(node, 1, state);
diff --git a/src/static/js/domline.js b/src/static/js/domline.js
index b8e6eb146..03f1b9c89 100644
--- a/src/static/js/domline.js
+++ b/src/static/js/domline.js
@@ -65,7 +65,6 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
lineMarker: 0
};
- var browser = (optBrowser || {});
var document = optDocument;
if (document)
@@ -93,8 +92,10 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
var perTextNodeProcess = (doesWrap ? _.identity : processSpaces);
var perHtmlLineProcess = (doesWrap ? processSpaces : _.identity);
var lineClass = 'ace-line';
+
result.appendSpan = function(txt, cls)
{
+
var processedMarker = false;
// Handle lineAttributeMarker, if present
if (cls.indexOf(lineAttributeMarker) >= 0)
@@ -225,7 +226,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument)
{
newHTML += ' ';
}
- else
+ else if (!optBrowser.msie)
{
newHTML += '
';
}
diff --git a/src/static/js/linestylefilter.js b/src/static/js/linestylefilter.js
index 675f19d02..17ab993b1 100644
--- a/src/static/js/linestylefilter.js
+++ b/src/static/js/linestylefilter.js
@@ -318,20 +318,20 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt)
return spanHandler;
};
-linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser)
+linestylefilter.getFilterStack = function(lineText, textAndClassFunc, abrowser)
{
var func = linestylefilter.getURLFilter(lineText, textAndClassFunc);
var hookFilters = hooks.callAll("aceGetFilterStack", {
linestylefilter: linestylefilter,
- browser: browser
+ browser: abrowser
});
_.map(hookFilters ,function(hookFilter)
{
func = hookFilter(lineText, func);
});
- if (browser !== undefined && browser.msie)
+ if (abrowser !== undefined && abrowser.msie)
{
// IE7+ will take an e-mail address like
+ + +
diff --git a/tests/frontend/specs/bold.js b/tests/frontend/specs/bold.js index bffb281b5..b54466e4e 100644 --- a/tests/frontend/specs/bold.js +++ b/tests/frontend/specs/bold.js @@ -44,7 +44,7 @@ describe("bold button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE + if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/caret.js b/tests/frontend/specs/caret.js index 6e68b6f52..14ff8d6a6 100644 --- a/tests/frontend/specs/caret.js +++ b/tests/frontend/specs/caret.js @@ -297,7 +297,7 @@ function prepareDocument(n, target){ // generates a random document with random } function keyEvent(target, charCode, ctrl, shift){ // sends a charCode to the window - if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE + if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/indentation.js b/tests/frontend/specs/indentation.js index c8f2cee81..8e851d873 100644 --- a/tests/frontend/specs/indentation.js +++ b/tests/frontend/specs/indentation.js @@ -15,7 +15,7 @@ describe("indentation button", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE + if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/italic.js b/tests/frontend/specs/italic.js index 4ef4b4085..bf7f2bc60 100644 --- a/tests/frontend/specs/italic.js +++ b/tests/frontend/specs/italic.js @@ -44,7 +44,7 @@ describe("italic some text", function(){ //select this text element $firstTextElement.sendkeys('{selectall}'); - if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE + if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE var evtType = "keypress"; }else{ var evtType = "keydown"; diff --git a/tests/frontend/specs/redo.js b/tests/frontend/specs/redo.js index 00873d14a..caa32feec 100644 --- a/tests/frontend/specs/redo.js +++ b/tests/frontend/specs/redo.js @@ -47,7 +47,7 @@ describe("undo button then redo button", function(){ var modifiedValue = $firstTextElement.text(); // get the modified value expect(modifiedValue).not.to.be(originalValue); // expect the value to change - if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.msie){ // if it's a mozilla or IE + if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE var evtType = "keypress"; }else{ var evtType = "keydown";