Skip to content

Commit

Permalink
7.7.4 release
Browse files Browse the repository at this point in the history
Former-commit-id: 0128d5e
  • Loading branch information
alderg committed Nov 24, 2017
1 parent c1e9d2d commit 868683d
Show file tree
Hide file tree
Showing 81 changed files with 3,563 additions and 349,433 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
24-NOV-2017: 7.7.4

- Uses mxGraph 3.7.6
- Checks existing filename in Trello Power-Up
- Adds root dialog for cancel in Google picker
- Faster startup time for offline app
- Validates page format input

22-NOV-2017: 7.7.3

- Improves Gliffy importer
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.7.3
7.7.4
13 changes: 5 additions & 8 deletions etc/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@
<fileset dir="${war.dir}/stencils" includes="**/*.js"/>
</concat>

<echo file="${war.dir}/stencils.xml" append="false"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>${line.separator}</echo>
<echo file="${war.dir}/stencils.xml" append="true"><![CDATA[<stencils>]]>${line.separator}</echo>
<concat destfile="${war.dir}/stencils.xml" fixlastline="yes" append="yes">
<fileset dir="${war.dir}/shapes" includes="**/*.xml"/>
<fileset dir="${war.dir}/stencils" includes="**/*.xml"/>
</concat>
<echo file="${war.dir}/stencils.xml" append="true"><![CDATA[</stencils>]]></echo>

<java fork="false" classname="Xml2Js" classpath=".">
<arg value="../../war/stencils"/>
<arg value="../../war/js/stencils.min.js"/>
</java>

<jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${war.dir}/js/shapes.min.js">
<sources dir="${basedir}/../../build">
<file name="shapes.js" />
Expand Down
Binary file modified war/WEB-INF/lib/mxgraph-core.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions war/cache.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 11/22/2017 04:12 PM
# 11/24/2017 05:56 PM

app.html
index.html?offline=1
Expand All @@ -10,9 +10,9 @@ offline.html
open.html
js/app.min.js
js/shapes.min.js
js/stencils.min.js
styles/grapheditor.css
styles/atlas.css
stencils.xml
search.xml
favicon.ico
mxgraph/css/common.css
Expand Down
5 changes: 5 additions & 0 deletions war/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@
else
{
mxscript('js/app.min.js');

if (urlParams['offline'] == '1')
{
mxscript('js/stencils.min.js');
}
}

if (window && window.process && window.process.type)
Expand Down
1,382 changes: 691 additions & 691 deletions war/js/app.min.js

Large diffs are not rendered by default.

1,372 changes: 686 additions & 686 deletions war/js/atlas-viewer.min.js

Large diffs are not rendered by default.

916 changes: 458 additions & 458 deletions war/js/atlas.min.js

Large diffs are not rendered by default.

63 changes: 10 additions & 53 deletions war/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,11 @@ App.main = function(callback, createUi)
message.indexOf('NS_ERROR_FAILURE') >= 0 || message.indexOf('out of memory') >= 0) ?
'CONFIG' : 'SEVERE';
var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent(EditorUi.VERSION) +
'&msg=clientError:' + encodeURIComponent(message) + ':url:' + encodeURIComponent(window.location.href) +
':lnum:' + encodeURIComponent(linenumber) +
((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '');
img.src = logDomain + '/log?severity=' + severity + '&v=' + encodeURIComponent(EditorUi.VERSION) +
'&msg=clientError:' + encodeURIComponent(message) + ':url:' + encodeURIComponent(window.location.href) +
':lnum:' + encodeURIComponent(linenumber) +
((colno != null) ? ':colno:' + encodeURIComponent(colno) : '') +
((err != null && err.stack != null) ? '&stack=' + encodeURIComponent(err.stack) : '');
}
}
catch (err)
Expand Down Expand Up @@ -466,48 +466,6 @@ App.main = function(callback, createUi)
frame.setAttribute('height', '0');
frame.setAttribute('src', 'offline.html');
document.body.appendChild(frame);

// Precaching for stencils. Alternatively we could generate
// a cache manifest with all stencil and shape files but this
// simplifies the cache file, streamlines the shape loading
// to a single loading point (here) vs dynamic loading in the
// online version. It does slow down the startup time though.
mxStencilRegistry.stencilSet = {};

// Overrides dynamic loading (everything loaded at startup)
mxStencilRegistry.getStencil = function(name)
{
return mxStencilRegistry.stencils[name];
};

// Takes stencil data from cache for populating sidebar
mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
{
var name = stencilFile.substring(stencilFile.indexOf('/') + 1);
name = 'mxgraph.' + name.substring(0, name.length - 4).replace(/\//g, '.');
var node = mxStencilRegistry.stencilSet[name];

if (node != null)
{
mxStencilRegistry.parseStencilSet(node, postStencilLoad, false);
}
};

// Preload all stencils from merged XML file
var req2 = mxUtils.load('stencils.xml');
var root = req2.getXml().documentElement;
var node = root.firstChild;

while (node != null)
{
if (node.nodeName == 'shapes' && node.getAttribute('name') != null)
{
mxStencilRegistry.stencilSet[node.getAttribute('name').toLowerCase()] = node;
mxStencilRegistry.parseStencilSet(node);
}

node = node.nextSibling;
}
}

/**
Expand All @@ -518,12 +476,7 @@ App.main = function(callback, createUi)
var plugins = mxSettings.getPlugins();
var temp = urlParams['p'];
App.initPluginCallback();

if (urlParams['chrome'] != '0')
{
mxscript(App.FOOTER_PLUGIN_URL);
}


if (temp != null)
{
// Used to request draw.io sources in dev mode
Expand Down Expand Up @@ -551,6 +504,10 @@ App.main = function(callback, createUi)
}
}
}
else if (urlParams['chrome'] != '0')
{
mxscript(App.FOOTER_PLUGIN_URL);
}

if (plugins != null && plugins.length > 0 && urlParams['plugins'] != '0')
{
Expand Down
8 changes: 4 additions & 4 deletions war/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
nameInput.setAttribute('value', editorUi.defaultFilename + ext);
nameInput.style.marginRight = '20px';
nameInput.style.marginLeft = '10px';
nameInput.style.width = (compact) ? '220px' : '450px';
nameInput.style.width = (compact) ? '220px' : '430px';

this.init = function()
{
Expand Down Expand Up @@ -2708,13 +2708,13 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
div.style.left = '160px';
div.style.right = '34px';
div.style.top = (showName) ? '72px' : '40px';
div.style.bottom = '76px';
div.style.bottom = '68px';
div.style.margin = '6px 0 0 -1px';
div.style.padding = '6px';
div.style.overflow = 'auto';

var list = document.createElement('div');
list.style.cssText = 'position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;';
list.style.cssText = 'position:absolute;left:30px;width:128px;top:72px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;';

if (!showName)
{
Expand Down Expand Up @@ -2964,7 +2964,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
btns.style.textAlign = 'right';
btns.style.position = 'absolute';
btns.style.left = '40px';
btns.style.bottom = '30px';
btns.style.bottom = '24px';
btns.style.right = '40px';

var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
Expand Down
16 changes: 15 additions & 1 deletion war/js/diagramly/DriveClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,21 @@ DriveClient.prototype.pickFolder = function(fn)
mxEvent.removeListener(document, 'click', exit);
}

this.folderPickerCallback(data);
if (data.action == google.picker.Action.CANCEL)
{
this.ui.confirm(mxResources.get('useRootFolder'), mxUtils.bind(this, function()
{
this.folderPickerCallback(data);
}), mxUtils.bind(this, function()
{
this.folderPickerCallback({action: google.picker.Action.PICKED,
docs: [{type: 'folder', id: 'root'}]});
}), mxResources.get('cancel'), mxResources.get('ok'));
}
else
{
this.folderPickerCallback(data);
}
})).build();
}

Expand Down
92 changes: 26 additions & 66 deletions war/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -1303,19 +1303,9 @@
this.editor.fireEvent(new mxEventObject('fileLoaded'));
result = true;

if (EditorUi.enableLogging && !this.isOffline() && file.getMode() != null)
if (!this.isOffline() && file.getMode() != null)
{
try
{
if (typeof window.ga === 'function')
{
ga('send', 'event', 'File', 'open', file.getMode());
}
}
catch (e)
{
// ignore
}
this.logEvent({category: 'File', action: 'open', label: file.getMode()})
}

if (this.mode == file.getMode() && file.getMode() != App.MODE_DEVICE && file.getMode() != null)
Expand Down Expand Up @@ -1400,6 +1390,28 @@
return result;
};

/**
* Updates action states depending on the selection.
*/
EditorUi.prototype.logEvent = function(data)
{
if (EditorUi.enableLogging)
{
try
{
var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
var img = new Image();
img.src = logDomain + '/images/1x1.png?' +
'v=' + encodeURIComponent(EditorUi.VERSION) +
((data != null) ? '&data=' + encodeURIComponent(JSON.stringify(data)) : '');
}
catch (e)
{
// ignore
}
}
};

/**
* Updates action states depending on the selection.
*/
Expand Down Expand Up @@ -5184,60 +5196,7 @@

if (node != null && node.nodeName === 'mxGraphModel')
{
var model = new mxGraphModel();
var codec = new mxCodec(node.ownerDocument);
codec.decode(node, model);

var childCount = model.getChildCount(model.getRoot());
var targetChildCount = graph.model.getChildCount(graph.model.getRoot());

// Merges into active layer if one layer is pasted
graph.model.beginUpdate();
try
{
// Mapping for multiple calls to cloneCells with the same set of cells
var mapping = new Object();

for (var i = 0; i < childCount; i++)
{
var parent = model.getChildAt(model.getRoot(), i);

// Adds cells to existing layer if not locked
if (childCount == 1 && !graph.isCellLocked(graph.getDefaultParent()))
{
var children = model.getChildren(parent);
cells = cells.concat(graph.importCells(children, dx, dy, graph.getDefaultParent(), null, mapping));
}
else
{
// Delta is non cascading, needs separate move for layers
parent = graph.importCells([parent], 0, 0, graph.model.getRoot(), null, mapping)[0];
var children = graph.model.getChildren(parent);
graph.moveCells(children, dx, dy);
cells = cells.concat(children);
}
}

if (crop)
{
if (graph.isGridEnabled())
{
dx = graph.snap(dx);
dy = graph.snap(dy);
}

var bounds = graph.getBoundingBoxFromGeometry(cells, true);

if (bounds != null)
{
graph.moveCells(cells, dx - bounds.x, dy - bounds.y);
}
}
}
finally
{
graph.model.endUpdate();
}
graph.importGraphModel(node, dx, dy, crop);
}
}
}
Expand Down Expand Up @@ -9722,6 +9681,7 @@
this.actions.get('editDiagram').setEnabled(active && (file == null || !file.isRestricted()));
this.actions.get('publishLink').setEnabled(file != null && !file.isRestricted());
this.actions.get('tags').setEnabled(active && (file == null || !file.isRestricted()));
this.actions.get('rename').setEnabled(file != null && file.isRenamable());
this.actions.get('close').setEnabled(file != null);
this.menus.get('publish').setEnabled(file != null && !file.isRestricted());

Expand Down
1 change: 1 addition & 0 deletions war/js/diagramly/Init.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ if (urlParams['offline'] == '1' || urlParams['demo'] == '1' || urlParams['stealt
urlParams['db'] = '0';
urlParams['od'] = '0';
urlParams['gh'] = '0';
urlParams['tr'] = '0';
}

// Disables math in offline mode
Expand Down
Loading

0 comments on commit 868683d

Please sign in to comment.