Modifications pour le document DiagramEditSheet
Modifié par Admin le 19/03/2025 - 19:24
Résumé
-
Objets (2 modifications, 0 ajouts, 0 suppressions)
Détails
- XWiki.JavaScriptExtension[1]
-
- Code
-
... ... @@ -32,17 +32,16 @@ 32 32 }, 33 33 setData: function(data) { 34 34 this.input.val(data); 35 - let pages = this.ui.getPagesForXml(data); 36 - if (pages.length > 0) { 37 - this.ui.pages = this.ui.getPagesForXml(data); 38 - } 39 39 }, 36 + // We overwrite the base implementation because we don't want to support files that contain multiple diagrams. 37 + updateFileData: function() { 38 + this.setData(mxUtils.getPrettyXml(this.ui.editor.getGraphXml(true, true))); 39 + }, 40 40 open: function() { 41 41 var graphXML = this.getData() || '<mxGraphModel/>'; 42 42 var graphNode = mxUtils.parseXml(graphXML).documentElement; 43 43 graphNode.fromStorage = true; 44 44 this.ui.editor.setGraphXml(graphNode); 45 - this.ui.currentPage = this.ui.pages[0]; 46 46 this.changeListener = mxUtils.bind(this, function(sender, eventObject) { 47 47 this.setModified(true); 48 48 });
- XWiki.JavaScriptExtension[2]
-
- Code
-
... ... @@ -904,6 +904,13 @@ 904 904 }; 905 905 906 906 // 907 + // Disable the tabbed UI (setting urlParams['pages'] to '0' is not enough..) 908 + // 909 + EditorUi.prototype.initPages = function() { 910 + // Do nothing. 911 + }; 912 + 913 + // 907 907 // Change the service name in order to disable notifications. 908 908 // 909 909 EditorUi.prototype.getServiceName = function()