From 76a60a2365547911a2649b5cd53343ff3bf1ee90 Mon Sep 17 00:00:00 2001 From: Michele Tessaro Date: Sat, 14 May 2022 17:17:55 +0200 Subject: [PATCH] fix: usr: fixed mxgraph viewer patch (refs #105) Fixed the patch of the viewer of diagrams in XML format, caused by a recent change in the Drawio scripts. --- assets/javascripts/drawioEditor.js | 2 +- init.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/drawioEditor.js b/assets/javascripts/drawioEditor.js index 7b228c95..b9b80346 100644 --- a/assets/javascripts/drawioEditor.js +++ b/assets/javascripts/drawioEditor.js @@ -563,7 +563,7 @@ window.onDrawioViewerLoad = function() { // Patch the code `mxEvent.addListener(g,"click",b)` var code = GraphViewer.prototype.addToolbar.toString(); - var searchRegex = /mxEvent\.addListener\(([a-zA-Z]),"click",([a-zA-Z])\)/; + var searchRegex = /mxEvent\.addListener\(([a-zA-Z]+),"click",([a-zA-Z]+)\)/; var replaceRules = "mxEvent.addListener($1,\"click\",(typeof($2)==='string'?eval($2):$2))"; code = code.replace(searchRegex, replaceRules); diff --git a/init.rb b/init.rb index aa45fc1e..7c1f37b2 100644 --- a/init.rb +++ b/init.rb @@ -4,7 +4,7 @@ name 'Redmine Drawio plugin' author 'Michele Tessaro' description 'Wiki macro plugin for inserting drawio diagrams into Wiki pages and Issues' - version '1.3.0' + version '1.3.1' url 'https://github.com/mikitex70/redmine_drawio' author_url 'https://github.com/mikitex70'