Skip to content
Permalink
Browse files

10.1.2 release

  • Loading branch information...
alderg committed Jan 18, 2019
1 parent 336e02c commit a121c48149ca8ae2e161dc92395ecd35d24c43fe
@@ -1,3 +1,11 @@
18-JAN-2019: 10.1.2

- Adds debug output

18-JAN-2019: 10.1.1

- Fixes possible NPEs

17-JAN-2019: 10.1.0

- Adds auth token refresh for OneDrive
@@ -1 +1 @@
10.1.0
10.1.2
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 01/17/2019 04:16 PM
# 01/18/2019 11:34 AM

app.html
index.html?offline=1

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2902,7 +2902,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
}
else if (list.length == 0)
{
div.innerHTML = mxResources.get('noDiagrams', null, 'No Diagrams Found');
div.innerHTML = mxUtils.htmlEntities(mxResources.get('noDiagrams', null, 'No Diagrams Found'));
}
else
{
@@ -2936,7 +2936,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
{
var searchTab = document.createElement('span');
searchTab.style.marginLeft = '10px';
searchTab.innerHTML = mxResources.get('search') + ":";
searchTab.innerHTML = mxUtils.htmlEntities(mxResources.get('search') + ':');
tabs.appendChild(searchTab);

var searchInput = document.createElement('input');
@@ -5492,10 +5492,19 @@ var RevisionDialog = function(editorUi, revs, restoreFn)

pageSelectFunction = function()
{
currentPage = parseInt(pageSelect.value);
realPage = currentPage;
parseDiagram(diagrams[currentPage]);
}
try
{
var temp = parseInt(pageSelect.value);
parseDiagram(diagrams[temp]);
currentPage = temp;
realPage = currentPage;
}
catch (e)
{
pageSelect.value = currentPage;
editorUi.handleError(e);
}
};
}
else
{
@@ -5564,7 +5573,7 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
currentXml = null;

fileInfo.removeAttribute('title');
fileInfo.innerHTML = mxResources.get('loading') + '...';
fileInfo.innerHTML = mxUtils.htmlEntities(mxResources.get('loading') + '...');
container.style.backgroundColor = '#ffffff';
graph.getModel().clear();

@@ -5589,7 +5598,15 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
{
if (currentRev == item)
{
updateGraph(xml);
try
{
updateGraph(xml);
}
catch (e)
{
fileInfo.innerHTML = mxUtils.htmlEntities(
mxResources.get('error') + ': ' + e.message);
}
}
}, function(err)
{
@@ -6932,7 +6949,7 @@ var PluginsDialog = function(editorUi)
{
if (plugins.length == 0)
{
inner.innerHTML = mxResources.get('noPlugins');
inner.innerHTML = mxUtils.htmlEntities(mxResources.get('noPlugins'));
}
else
{
@@ -8910,11 +8927,11 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
{
if (isTemplate)
{
createBtn.innerHTML = mxResources.get('create');
createBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('create'));
}
else
{
createBtn.innerHTML = mxResources.get('copy');
createBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('copy'));
}

showLinkToDiagram (!isTemplate);
@@ -8933,15 +8950,15 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
var hrow = document.createElement('tr');
var th = document.createElement('th');
th.style.width = "50%";
th.innerHTML = mxResources.get('diagram', null, 'Diagram');
th.innerHTML = mxUtils.htmlEntities(mxResources.get('diagram', null, 'Diagram'));
hrow.appendChild(th);
th = document.createElement('th');
th.style.width = "25%";
th.innerHTML = mxResources.get('changedBy', null, 'Changed By');
th.innerHTML = mxUtils.htmlEntities(mxResources.get('changedBy', null, 'Changed By'));
hrow.appendChild(th);
th = document.createElement('th');
th.style.width = "25%";
th.innerHTML = mxResources.get('lastModifiedOn', null, 'Last modified on');
th.innerHTML = mxUtils.htmlEntities(mxResources.get('lastModifiedOn', null, 'Last modified on'));
hrow.appendChild(th);
grid.appendChild(hrow);
diagramsTiles.appendChild(grid);
@@ -9117,7 +9134,7 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,

if (currentItem == null)
{
createBtn.innerHTML = mxResources.get('create');
createBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('create'));
showLinkToDiagram();
swapActiveItem(entry, "geTempDlgNewDiagramCatItemActive", cat);
}
@@ -9142,7 +9159,7 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
{
if (currentItem != entry2)
{
createBtn.innerHTML = mxResources.get('create');
createBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('create'));
showLinkToDiagram();
swapActiveItem(entry2, "geTempDlgNewDiagramCatItemActive", cat2);
}
@@ -9161,14 +9178,14 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
{
newDiagramCat.style.height = "280px";
newDiagramCatList.style.height = "190px";
showAllBtn.innerHTML = mxResources.get('showAll', null, '+ Show all');
showAllBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('showAll', null, '+ Show all'));
fillNewDiagramCats(newDiagramCats);
}
else
{
newDiagramCat.style.height = "440px";
newDiagramCatList.style.height = "355px";
showAllBtn.innerHTML = mxResources.get('showLess', null, '- Show less');
showAllBtn.innerHTML = mxUtils.htmlEntities(mxResources.get('showLess', null, '- Show less'));
fillNewDiagramCats(newDiagramCats, true);
}

@@ -9335,7 +9352,7 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
}
else if (list.length == 0)
{
diagramsTiles.innerHTML = mxResources.get('noDiagrams', null, 'No Diagrams Found');
diagramsTiles.innerHTML = mxUtils.htmlEntities(mxResources.get('noDiagrams', null, 'No Diagrams Found'));
}
else
{
@@ -9352,7 +9369,7 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
spinner.spin(diagramsTiles);
cancelPendingCall = false;
callInitiated = true;
diagramsListTitle.innerHTML = mxResources.get('recentDiag', null, 'Recent Diagrams');
diagramsListTitle.innerHTML = mxUtils.htmlEntities(mxResources.get('recentDiag', null, 'Recent Diagrams'));
lastSearchStr = null;
recentDocsCallback(extDiagramsCallback, getAll? null : username);
}
@@ -9371,7 +9388,7 @@ TemplatesDialog.prototype.init = function(editorUi, callback, cancelCallback,
cancelPendingCall = false;
callInitiated = true;
delayTimer = null;
diagramsListTitle.innerHTML = mxResources.get('searchResults', null, 'Search Results') +
diagramsListTitle.innerHTML = mxUtils.htmlEntities(mxResources.get('searchResults', null, 'Search Results')) +
' "' + mxUtils.htmlEntities(searchStr) + '"';
searchDocsCallback(searchStr, extDiagramsCallback, isGetAll? null : username);
lastSearchStr = searchStr;
@@ -604,10 +604,22 @@ EditorUi.prototype.getPagesForNode = function(node, nodeName)
var diagrams = node.getElementsByTagName(nodeName || 'diagram');
var pages = [];

for (var i = 0; i < diagrams.length; i++)
if (diagrams.length > 0)
{
var page = new DiagramPage(diagrams[i]);
this.updatePageRoot(page);
for (var i = 0; i < diagrams.length; i++)
{
var page = new DiagramPage(diagrams[i]);
this.updatePageRoot(page);
pages.push(page);
}
}
else if (node.nodeName == 'mxGraphModel')
{
var graph = this.editor.graph;
var page = new DiagramPage(node.ownerDocument.createElement('diagram'));
page.setName(mxResources.get('pageWithNumber', [1]));
mxUtils.setTextContent(page.node, graph.compress(
graph.zapGremlins(mxUtils.getXml(node))));
pages.push(page);
}

@@ -28,7 +28,7 @@ DrawioFile = function(ui, data)
lastMerge: 0, /* details of the last successful merge */
lastMergeTime: 0, /* timestamp of the last call to merge */
lastOpenTime: 0, /* timestamp of the last call to open */
lastIgnored: 0, /* timestamp of the last ignored mergeFile */
emptyPrefix: false, /* timestamp of the last call to open */
shadowState: 0, /* current etag hash for shadow */
opened: 0, /* number of calls to open */
closed: 0, /* number of calls to close */
@@ -243,7 +243,6 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
var shadow = (this.shadowPages != null) ? this.shadowPages :
this.ui.getPagesForNode(mxUtils.parseXml(
this.shadowData).documentElement);
this.checkPages(shadow, 'mergeFile init');

// Loads new document as shadow document
var pages = this.ui.getPagesForNode(
@@ -268,7 +267,6 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
// Patching previous shadow to verify checksum
var patched = this.ui.patchPages(shadow, patches[0]);
this.stats.shadowState = this.ui.hashValue(file.getCurrentEtag());
this.checkPages(patched, 'mergeFile patched');

var patchedDetails = {};
var checksum = this.ui.getHashValueForPages(patched, patchedDetails);
@@ -304,7 +302,6 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
this.patch(patches,
(DrawioFile.LAST_WRITE_WINS) ?
this.backupPatch : null);
this.checkPages(this.ui.pages, 'mergeFile done');
}
}
else
@@ -314,23 +311,7 @@ DrawioFile.prototype.mergeFile = function(file, success, error, diffShadow)
}
else
{
try
{
// Report only once per session
if (this.stats.lastIgnored == 0)
{
this.sendErrorReport('Ignored empty pages in mergeFile',
'File Data: ' + this.compressReportData(
this.ui.anonymizeString(file.data),
null, 500));
}

this.stats.lastIgnored = new Date().toISOString();
}
catch (e2)
{
// ignore
}
throw new Error(mxResources.get('notADiagramFile'));
}

this.invalidChecksum = false;
@@ -399,29 +380,6 @@ DrawioFile.prototype.getAnonymizedXmlForPages = function(pages)
return mxUtils.getPrettyXml(file);
};

/**
* Checks if the given shadow is valid.
*/
DrawioFile.prototype.checkPages = function(pages, info)
{
if (this.ui.getCurrentFile() == this && (pages == null || pages.length == 0))
{
var data = (this.shadowData == null) ? 'null' :
this.compressReportData(
this.ui.anonymizeString(
this.shadowData),
null, 5000);

this.sendErrorReport(
'Pages is null or empty',
'Shadow: ' + ((pages != null) ? pages.length : 'null') +
'\nShadowPages: ' + ((this.shadowPages != null) ?
this.shadowPages.length : 'null') +
((info != null) ? ('\nInfo: ' + info) : '') +
'\nShadowData: ' + data);
}
};

/**
* Adds the listener for automatically saving the diagram for local changes.
*/
@@ -1683,8 +1641,7 @@ DrawioFile.prototype.fileSaved = function(savedData, lastDesc, success, error)
this.stats.fileSaved++;
this.inConflictState = false;
this.invalidChecksum = false;
this.checkPages(this.ui.pages, 'fileSaved');


if (this.sync == null)
{
this.shadowData = savedData;
@@ -1717,7 +1674,7 @@ DrawioFile.prototype.fileSaved = function(savedData, lastDesc, success, error)
{
this.sendErrorReport('Error in fileSaved',
'Saved Data:\n' + this.compressReportData(
this.ui.anonymizeString(savedData), null, 500), e);
this.ui.anonymizeString(savedData), null, 1000), e);
}
catch (e2)
{
@@ -914,8 +914,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
this.file.shadowPages = (this.file.shadowPages != null) ?
this.file.shadowPages : this.ui.getPagesForNode(
mxUtils.parseXml(this.file.shadowData).documentElement)
this.file.checkPages(this.file.shadowPages, 'merge init');


// Creates a patch for backup if the checksum fails
this.file.backupPatch = (this.file.isModified()) ?
this.ui.diffPages(this.file.shadowPages,
@@ -930,7 +929,6 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
}

this.file.stats.shadowState = this.ui.hashValue(etag);
this.file.checkPages(this.file.shadowPages, 'merge patched');
var currentDetails = {};
var current = (checksum != null) ? this.ui.getHashValueForPages(
this.file.shadowPages, currentDetails) : null;
@@ -992,7 +990,6 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
this.file.inConflictState = false;
this.file.setCurrentEtag(etag);
this.file.backupPatch = null;
this.file.checkPages(this.ui.pages, 'merge done');

if (success != null)
{
@@ -1143,6 +1140,8 @@ DrawioFileSync.prototype.fileSaved = function(pages, lastDesc, success, error)
}

this.file.shadowPages = pages;
this.file.stats.emptyPrefix = this.file.stats.emptyPrefix ||
this.ui.editor.graph.model.prefix.length == 0;

if (success != null)
{
Oops, something went wrong.

0 comments on commit a121c48

Please sign in to comment.
You can’t perform that action at this time.