Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
69bf32c
fix to https://github.com/ether/etherpad-lite/issues/2486
ilmartyrk Oct 19, 2017
c36a326
fix to ether/etherpad-lite#2486
ilmartyrk Oct 20, 2017
724b1d7
updated html export, run hooks also with lists
ilmartyrk Oct 31, 2017
5469ce8
exportHTML update
ilmartyrk Oct 31, 2017
76f211b
ExportHtml.js update
ilmartyrk Nov 1, 2017
3040050
added tiblus ep_prefs_different_cookie_for_different_protocol
ilmartyrk Nov 3, 2017
cf82177
ueberDB2 update
ilmartyrk Mar 26, 2018
6f2466b
Merge with upstream develop.
tiblu Apr 2, 2018
a4819b2
Upgrade Ueberdb2 to 0.3.7 to fix https://github.com/ether/etherpad-li…
tiblu Apr 4, 2018
a67aaa8
Merge remote-tracking branch 'upstream/master' into develop
tiblu Apr 4, 2018
20428bb
Merge remote-tracking branch 'upstream/develop' into develop
tiblu Apr 4, 2018
64a2e5b
Upgrade Ueberdb2 to 0.3.7 to fix https://github.com/ether/etherpad-li…
tiblu Apr 4, 2018
b4ad7cf
Export lists fix + code linting and readability update
ilmartyrk Apr 5, 2018
8502c04
html lists export fix
ilmartyrk Apr 9, 2018
517b249
D
ilmartyrk Apr 9, 2018
d6fa065
export html to original structure
ilmartyrk Apr 24, 2018
7cc7bb1
upgrade to 1.6.5
ilmartyrk Apr 24, 2018
8d27f3c
upgrade to 1.6.5
ilmartyrk Apr 24, 2018
c9863f8
sync with ether/etherpad-lite
ilmartyrk May 2, 2018
55ecf31
html export fix
ilmartyrk May 2, 2018
6684f9b
hook callAll to aCallAll
ilmartyrk May 2, 2018
47e20a2
line parsing fix
ilmartyrk May 2, 2018
016497d
prevLine/nextLine check fix
ilmartyrk May 14, 2018
3c66425
List indent fix
ilmartyrk May 21, 2018
4feccff
merge with develop branch
ilmartyrk May 21, 2018
a96aa88
merge with ether/etherpad-lite develop branch
ilmartyrk May 21, 2018
fe08d2a
Merge pull request #3268 from citizenos/develop
JohnMcLear May 21, 2018
d42393d
Localisation updates from https://translatewiki.net.
translatewiki May 31, 2018
5fc0c3e
added goToRevisionEvent hook
ilmartyrk Jun 5, 2018
3362c68
Localisation updates from https://translatewiki.net.
translatewiki Jun 14, 2018
dfd45f0
Localisation updates from https://translatewiki.net.
translatewiki Jun 21, 2018
0414f74
use regexp in ep.json pre and post values
ilmartyrk Jun 21, 2018
30ad6f0
Merge branch 'develop' of git://github.com/ether/etherpad-lite into d…
ilmartyrk Jun 21, 2018
80f02c1
Merge branch 'html_export_fix' into develop
ilmartyrk Jun 21, 2018
f94d969
resolve conflicts between plugins
ilmartyrk Jun 22, 2018
599b1f4
Localisation updates from https://translatewiki.net.
translatewiki Jun 28, 2018
f35d345
Fix FR dateformat
ldidry Jun 14, 2018
2be873e
Use keydown instead of keypress on Firefox.
mantaroh Jun 28, 2018
380889b
Localisation updates from https://translatewiki.net.
translatewiki Jul 2, 2018
0fc2843
add new icons to font
ilmartyrk Jul 5, 2018
c5a9afb
Merge branch 'develop' of git://github.com/ether/etherpad-lite into d…
ilmartyrk Jul 5, 2018
d04d0f9
htmlExport test update
ilmartyrk Jul 17, 2018
944ccea
updated htmlExport test
ilmartyrk Jul 17, 2018
eb69a00
Merge branch 'develop' of git://github.com/ether/etherpad-lite into d…
ilmartyrk Jul 20, 2018
9cc2eb9
Merge branch 'develop' of git://github.com/ether/etherpad-lite into d…
ilmartyrk Jul 25, 2018
06cf3ff
getHtml test update
ilmartyrk Aug 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/static/font/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,18 @@
"css": "slideshare",
"code": 59441,
"src": "fontawesome"
},
{
"uid": "e4dde1992f787163e2e2b534b8c8067d",
"css": "angle-down",
"code": 61703,
"src": "fontawesome"
},
{
"uid": "ccddff8e8670dcd130e3cb55fdfc2fd0",
"css": "down-open",
"code": 59449,
"src": "fontawesome"
}
]
}
Binary file modified src/static/font/fontawesome-etherpad.eot
Binary file not shown.
176 changes: 118 additions & 58 deletions src/static/font/fontawesome-etherpad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/static/font/fontawesome-etherpad.ttf
Binary file not shown.
Binary file modified src/static/font/fontawesome-etherpad.woff
Binary file not shown.
5 changes: 5 additions & 0 deletions src/static/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
var self = this;
var path = revisionInfo.getPath(padContents.currentRevision, newRevision);
debugLog('newRev: ', padContents.currentRevision, path);

hooks.aCallAll('goToRevisionEvent', {
rev: newRevision
});

if (path.status == 'complete')
{
var cs = path.changesets;
Expand Down
135 changes: 129 additions & 6 deletions src/static/js/pluginfw/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,138 @@ function loadPlugin(packages, plugin_name, plugins, parts, cb) {
);
}

var matcher = function (name, list) {
var matches = [];
try {
var nameRegExp = RegExp(name);

list.forEach(function (item) {
if (nameRegExp.test(item)) {
matches.push(item);
}
});
} catch(e) {
console.log('ERROR', e);
}


return matches;
}

function conflictMatcher (parts, name, type) {
var type;
var opposite = 'pre';
var results = [];
if (type === 'pre') {
opposite = 'post';
}
_.each(parts[name][type] || [], function (item_name) {
var conflictMatches = matcher(item_name, parts[name][opposite] || []);
if(conflictMatches.length) {
var matchObj = {};
matchObj[item_name] = conflictMatches;
results.push(matchObj);
}
});

return results;
}

function checkPluginConflicts(parts) {
var conflicts = [];

_.chain(parts).keys().forEach(function (name) {
var conflictObj = {};
var conflictsPre = conflictMatcher(parts, name, 'pre');
var conflictsPost = conflictMatcher(parts, name, 'post');

conflictObj[name] = {pre: conflictsPre, post: conflictsPost};
conflicts.push(conflictObj);
});

return conflicts;
}
function closedChainChecker (parts, name, match, matchCount, res) {
var noChain = true;
for (var i = 0; i < res.length; i++ ) {
var item = res[i];

if (item[0] === name || item[1] === name) {
if (item[0] === match || item[1] === match) {
//value allready exists
noChain = false;
// check which plugins has stricter pre/post definition
_.each(parts[match].pre || [], function (item_name) {
var matches = matcher(item_name, _.chain(parts).keys().value());
if (matches.length > matchCount) {
res.splice(i, 1);
noChain = true;
}
});
_.each(parts[match].post || [], function (item_name) {
var matches = matcher(item_name, _.chain(parts).keys().value());
if (matches.length > matchCount) {
res.splice(i, 1);
noChain = true;
}
});

i = res.length;
break;
}
}
}

return noChain;
}

function matchHooks (parts, name, res, conflicts, type) {
var names = _.chain(parts).keys().value();
_.each(parts[name][type], function (item_name) {
var matchedNames = matcher(item_name, names);
_.each(matchedNames, function (matchName) {
if (name !== matchName) {
var noConflict = true;

if (conflicts) {
_.each(conflicts, function (conflictObject) {
if (conflictObject[item_name] && (conflictObject[item_name].matches && conflictObject[item_name].matches.indexOf(matchName) > -1)) {
noConflict = false;
}
})
}
if (noConflict) {
noConflict = closedChainChecker(parts, name, matchName, matchedNames.length, res);
}

if (noConflict && type === 'post') {
res.push([name, matchName]);
} else if (noConflict){
res.push([matchName, name]);
}
}
});
});
}

function partsToParentChildList(parts) {
var res = [];

var conflicts = checkPluginConflicts(parts);
_.chain(parts).keys().forEach(function (name) {
_.each(parts[name].post || [], function (child_name) {
res.push([name, child_name]);
});
_.each(parts[name].pre || [], function (parent_name) {
res.push([parent_name, name]);
});
var conflictsPre = [];
var conflictsPost = [];
for (var i=0; i < conflicts.length; i++) {
if (conflicts[i][name]) {
conflictsPre = conflicts[i][name].pre;
conflictsPost = conflicts[i][name].post;
i = conflicts.length;
break;
}
}
matchHooks(parts, name, res, conflictsPost, 'post');
matchHooks(parts, name, res, conflictsPre, 'pre');

if (!parts[name].pre && !parts[name].post) {
res.push([name, ":" + name]); // Include apps with no dependency info
}
Expand Down
9 changes: 5 additions & 4 deletions tests/backend/specs/api/pad.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ var apiVersion = 1;
var testPadId = makeid();
var lastEdited = "";
var text = generateLongText();
var ULhtml = '<!DOCTYPE html><html><body><ul class="bullet"><li>one</li><li>2</li></ul><br><ul><ul class="bullet"><li>UL2</li></ul></ul></body></html>';

var ULhtml = '<!doctype html><html><body><ul class="bullet"><li>one</li><li>two</li><li>0</li><li>1</li><li>2<ul class="bullet"><li>3</li><li>4</li></ul></li></ul><ol class="number"><li>item<ol class="number"><li>item1</li><li>item2</li></ol></li></ol></body></html>';
var resLHtml = '<!doctype html><html><body><ul class="bullet"><li>one</li><li>two</li><li>0</li><li>1</li><li>2<ul class="bullet"><li>3</li><li>4</ul></li></ul><ol class="number"><li>item<ol class="number"><li>item1</li><li>item2</ol></li></ol></body></html>';
//Different result because export is done by standard while input might not
describe('Connectivity', function(){
it('errors if can not connect', function(done) {
api.get('/api/')
Expand Down Expand Up @@ -537,8 +538,8 @@ describe('getHTML', function(){
api.get(endPoint('getHTML')+"&padID="+testPadId)
.expect(function(res){
var ehtml = res.body.data.html.replace("<br></body>", "</body>").toLowerCase();
var uhtml = ULhtml.toLowerCase();
if(ehtml !== uhtml) throw new Error("Imported HTML does not match served HTML.\nExpected:\n" + uhtml + "\n\nReceived:\n" + ehtml)
var uhtml = resLHtml.toLowerCase();
if(ehtml !== uhtml) throw new Error("Expected HTML does not match served HTML.\nExpected:\n" + uhtml + "\n\nReceived:\n" + ehtml)
})
.expect('Content-Type', /json/)
.expect(200, done)
Expand Down