1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 14:19:43 +02:00

Improved Draw.io integration pending changes detection

This commit is contained in:
McMatts 2018-08-23 12:29:55 +01:00
parent 8a30f3681c
commit b1a35b7f75
5 changed files with 693 additions and 680 deletions

View file

@ -58,9 +58,9 @@ Space view.
## Latest version ## Latest version
[Community edition: v1.69.1](https://github.com/documize/community/releases) [Community edition: v1.69.2](https://github.com/documize/community/releases)
[Enterprise edition: v1.71.1](https://documize.com/downloads) [Enterprise edition: v1.71.2](https://documize.com/downloads)
## OS support ## OS support

View file

@ -42,7 +42,7 @@ func main() {
rt.Product = env.ProdInfo{} rt.Product = env.ProdInfo{}
rt.Product.Major = "1" rt.Product.Major = "1"
rt.Product.Minor = "69" rt.Product.Minor = "69"
rt.Product.Patch = "1" rt.Product.Patch = "2"
rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch) rt.Product.Version = fmt.Sprintf("%s.%s.%s", rt.Product.Major, rt.Product.Minor, rt.Product.Patch)
rt.Product.Edition = "Community" rt.Product.Edition = "Community"
rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition) rt.Product.Title = fmt.Sprintf("%s Edition", rt.Product.Edition)

File diff suppressed because one or more lines are too long

View file

@ -110,7 +110,15 @@ export default Component.extend({
}, },
invokeExport() { invokeExport() {
// Cannot export if nothing has been changed
// so we skip straight to the save process.
if (is.empty(this.get('diagramXML'))) {
this.set('readyToSave', true);
return;
}
let editorFrame = document.getElementById(this.get('editorId')); let editorFrame = document.getElementById(this.get('editorId'));
editorFrame.contentWindow.postMessage( editorFrame.contentWindow.postMessage(
JSON.stringify( JSON.stringify(
{ {
@ -126,7 +134,12 @@ export default Component.extend({
if (this.get('readyToSave')) { if (this.get('readyToSave')) {
let page = this.get('page'); let page = this.get('page');
let meta = this.get('meta'); let meta = this.get('meta');
meta.set('rawBody', this.get('diagram'));
// handle case where no diagram changes were made
let dg = this.get('diagram');
if (is.empty(dg)) dg = this.get('meta.rawBody');
meta.set('rawBody', dg);
page.set('title', this.get('title')); page.set('title', this.get('title'));
this.set('waiting', false); this.set('waiting', false);

View file

@ -1,6 +1,6 @@
{ {
"name": "documize", "name": "documize",
"version": "1.69.1", "version": "1.69.2",
"description": "The Document IDE", "description": "The Document IDE",
"private": true, "private": true,
"repository": "", "repository": "",