From 4b0a82cc2f4597a11b9275cf156ae9cceffaf44f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 4 May 2020 00:12:46 +0200 Subject: Fix some etherpad-lite modules and packaging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upgrade to 1.8.3 broke many modules, which were patched to continue working correctly. This commit also reworks the module system, making it similar to python’s withPackages. --- .../etherpad-lite/modules/ep_embedmedia/fix.patch | 85 ++++++++++++++++++++++ .../modules/ep_embedmedia/node-packages.nix | 5 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 pkgs/webapps/etherpad-lite/modules/ep_embedmedia/fix.patch (limited to 'pkgs/webapps/etherpad-lite/modules/ep_embedmedia') diff --git a/pkgs/webapps/etherpad-lite/modules/ep_embedmedia/fix.patch b/pkgs/webapps/etherpad-lite/modules/ep_embedmedia/fix.patch new file mode 100644 index 0000000..162f1b0 --- /dev/null +++ b/pkgs/webapps/etherpad-lite/modules/ep_embedmedia/fix.patch @@ -0,0 +1,85 @@ +diff --git a/ep.json b/ep.json +index 083d484..6803475 100644 +--- a/ep.json ++++ b/ep.json +@@ -5,6 +5,7 @@ + "hooks": { + "eejsBlock_editbarMenuLeft": "ep_embedmedia/hooks:eejsBlock_editbarMenuLeft", + "eejsBlock_scripts": "ep_embedmedia/hooks:eejsBlock_scripts", ++ "eejsBlock_timesliderBody": "ep_embedmedia/hooks:eejsBlock_scripts", + "eejsBlock_styles": "ep_embedmedia/hooks:eejsBlock_styles", + "eejsBlock_body": "ep_embedmedia/hooks:eejsBlock_body" + }, +diff --git a/static/css/main.css b/static/css/main.css +index 72a460f..3b66d8e 100644 +--- a/static/css/main.css ++++ b/static/css/main.css +@@ -6,10 +6,18 @@ + z-index:999999; + } + ++#embedMediaSrc { ++ max-width: 100%; ++} ++ + .embedMediaButton { + padding:10px; + } + ++#doEmbedMedia{ ++ color:blue; ++} ++ + #cancelEmbedMedia{ + color:red; + } +@@ -19,6 +27,6 @@ + } + + .buttonicon-embed-media:before{ +- content:"\e80b"; ++ content:"\e83b"; + top: 2px !important; + } +diff --git a/static/js/main.js b/static/js/main.js +index 8c94767..19415d5 100644 +--- a/static/js/main.js ++++ b/static/js/main.js +@@ -10,22 +10,25 @@ $(document).ready(function () { + } else { + module.slideDown("fast"); + } ++ module.toggleClass("popup-show"); + }); + + $("#doEmbedMedia").click(function () { + var padeditor = require('ep_etherpad-lite/static/js/pad_editor').padeditor; + + $("#embedMediaModal").slideUp("fast"); ++ $("#embedMediaModal").removeClass("popup-show"); + + return padeditor.ace.callWithAce(function (ace) { +- rep = ace.ace_getRep(); ++ var rep = ace.ace_getRep(); + ace.ace_replaceRange(rep.selStart, rep.selEnd, "E"); + ace.ace_performSelectionChange([rep.selStart[0],rep.selStart[1]-1], rep.selStart, false); +- ace.ace_performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd, [["embedMedia", escape($("#embedMediaSrc")[0].value)]]); ++ ace.ace_performDocumentApplyAttributesToRange(rep.selStart, rep.selEnd, [["embedMedia", escape($("#embedMediaSrc")[0].value)]]); + }, "embedMedia"); + }); + + $("#cancelEmbedMedia").click(function () { + $("#embedMediaModal").slideUp("fast"); ++ $("#embedMediaModal").removeClass("popup-show"); + }); + }); +diff --git a/templates/modals.ejs b/templates/modals.ejs +index 9340698..8915a3b 100644 +--- a/templates/modals.ejs ++++ b/templates/modals.ejs +@@ -1,4 +1,4 @@ +-