Skip to content

Commit

Permalink
[misc] Simplify debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mflorea committed Sep 12, 2019
1 parent d216a1a commit f2b3c8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
28 changes: 13 additions & 15 deletions src/main/resources/Diagram/DiagramEditSheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@
<cache>long</cache>
</property>
<property>
<code>// mxGraph Client Configuration
<code>/*!
#set ($minify = $services.debug.minify != false)
#set ($suffix = "#if ($minify).min#end")
*/
// mxGraph Client Configuration
var mxBasePath = "$services.webjars.url('org.xwiki.contrib:mxgraph-client', '')";
var mxLanguage = '$xcontext.locale';

Expand Down Expand Up @@ -194,28 +198,22 @@ var DriveFile = DropboxFile = GitHubFile = OneDriveFile = TrelloFile = false;

require.config({
paths: {
'mxgraph-init': diagramEditorBasePath + 'js/draw.io.init.min',
'mxgraph-client': mxBasePath + 'mxClient.min',
'mxgraph-init': diagramEditorBasePath + 'js/draw.io.init$suffix',
'mxgraph-client': mxBasePath + 'mxClient$suffix',
'jscolor': mxGraphEditorBasePath + 'jscolor/jscolor.min',
'sanitizer': mxGraphEditorBasePath + 'sanitizer/sanitizer.min',
'mxgraph-editor': mxGraphEditorBasePath + 'mxGraphEditor.min',
'mxgraph-editor': mxGraphEditorBasePath + 'mxGraphEditor$suffix',
'base64': diagramEditorBasePath + 'js/deflate/base64.min',
'pako': diagramEditorBasePath + 'js/deflate/pako.min',
'spin': diagramEditorBasePath + 'js/spin/spin.min',
'jszip': diagramEditorBasePath + 'js/jszip/jszip.min',
'draw.io': diagramEditorBasePath + 'js/draw.io.min',
'diagram-utils': new XWiki.Document('DiagramSheet', 'Diagram').getURL('jsx', 'param=1')
'draw.io': diagramEditorBasePath + 'js/draw.io$suffix',
'diagram-utils': new XWiki.Document('DiagramSheet', 'Diagram').getURL('jsx', 'minify=$minify')
},
shim: {
'mxgraph-client': {
deps: ['mxgraph-init']
},
'mxgraph-editor': {
deps: ['mxgraph-client', 'jscolor', 'sanitizer']
},
'draw.io': {
deps: ['mxgraph-editor', 'base64', 'pako-global', 'spin-global', 'jszip']
}
'mxgraph-client': ['mxgraph-init'],
'mxgraph-editor': ['mxgraph-client', 'jscolor', 'sanitizer'],
'draw.io': ['mxgraph-editor', 'base64', 'pako-global', 'spin-global', 'jszip']
},
map: {
'diagram-utils': {
Expand Down
16 changes: 10 additions & 6 deletions src/main/resources/Diagram/DiagramViewSheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@
<cache>long</cache>
</property>
<property>
<code>// mxGraph Client Configuration
<code>/*!
#set ($minify = $services.debug.minify != false)
#set ($suffix = "#if ($minify).min#end")
*/
// mxGraph Client Configuration
var mxBasePath = "$services.webjars.url('org.xwiki.contrib:mxgraph-client', '')";
var mxLanguage = '$xcontext.locale';

Expand All @@ -175,15 +179,15 @@ var urlParams = {};

require.config({
paths: {
'mxgraph-init': diagramViewerBasePath + 'js/draw.io.init.min',
'mxgraph-client': mxBasePath + 'mxClient.min',
'mxgraph-init': diagramViewerBasePath + 'js/draw.io.init$suffix',
'mxgraph-client': mxBasePath + 'mxClient$suffix',
'sanitizer': mxGraphEditorBasePath + 'sanitizer/sanitizer.min',
'mxgraph-viewer': mxGraphEditorBasePath + 'mxGraphViewer.min',
'mxgraph-viewer': mxGraphEditorBasePath + 'mxGraphViewer$suffix',
'pako': diagramViewerBasePath + 'js/deflate/pako.min',
// Used by the lightbox.
'spin': diagramViewerBasePath + 'js/spin/spin.min',
'draw.io.viewer': diagramViewerBasePath + 'js/draw.io.viewer.min',
'diagram-utils': new XWiki.Document('DiagramSheet', 'Diagram').getURL('jsx', 'param=1')
'draw.io.viewer': diagramViewerBasePath + 'js/draw.io.viewer$suffix',
'diagram-utils': new XWiki.Document('DiagramSheet', 'Diagram').getURL('jsx', 'minify=$minify')
},
shim: {
'mxgraph-client': ['mxgraph-init'],
Expand Down

0 comments on commit f2b3c8c

Please sign in to comment.