Skip to content

Commit 8bfe26e

Browse files
NicoPeters.NPNicoPeters.NP
NicoPeters.NP
authored and
NicoPeters.NP
committed
updating branch prod to 2319
git-svn-id: http://oryx-editor.googlecode.com/svn/branches/prod@2320 d672c736-503d-0410-a38a-9366997c882b
1 parent 21cb2cc commit 8bfe26e

File tree

102 files changed

+9220
-870
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+9220
-870
lines changed
7.77 KB
Loading
3.66 KB
Loading
Loading
Loading
802 Bytes
Loading
Loading
Loading
Loading

editor/client/scripts/Core/abstractPlugin.js

+45-15
Original file line numberDiff line numberDiff line change
@@ -272,21 +272,51 @@ ORYX.Plugins.AbstractPlugin = Clazz.extend({
272272
*/
273273
getRDFFromDOM: function(){
274274
//convert to RDF
275-
var parser = new DOMParser();
276-
var parsedDOM = parser.parseFromString(this.getSerializedDOM(), "text/xml");
277-
var xsltPath = ORYX.PATH + "lib/extract-rdf.xsl";
278-
var xsltProcessor = new XSLTProcessor();
279-
var xslRef = document.implementation.createDocument("", "", null);
280-
xslRef.async = false;
281-
xslRef.load(xsltPath);
282-
xsltProcessor.importStylesheet(xslRef);
283-
try {
284-
var rdf = xsltProcessor.transformToDocument(parsedDOM);
285-
return (new XMLSerializer()).serializeToString(rdf);
286-
} catch (error) {
287-
Ext.Msg.alert("Oryx", error);
288-
return null;
289-
}
275+
try {
276+
var xsl = "";
277+
source=ORYX.PATH + "lib/extract-rdf.xsl";
278+
new Ajax.Request(source, {
279+
asynchronous: false,
280+
method: 'get',
281+
onSuccess: function(transport){
282+
xsl = transport.responseText
283+
}.bind(this),
284+
onFailure: (function(transport){
285+
ORYX.Log.error("XSL load failed" + transport);
286+
}).bind(this)
287+
});
288+
/*
289+
var parser = new DOMParser();
290+
var parsedDOM = parser.parseFromString(this.getSerializedDOM(), "text/xml");
291+
var xsltPath = ORYX.PATH + "lib/extract-rdf.xsl";
292+
var xsltProcessor = new XSLTProcessor();
293+
var xslRef = document.implementation.createDocument("", "", null);
294+
xslRef.async = false;
295+
xslRef.load(xsltPath);
296+
xsltProcessor.importStylesheet(xslRef);
297+
try {
298+
var rdf = xsltProcessor.transformToDocument(parsedDOM);
299+
return (new XMLSerializer()).serializeToString(rdf);
300+
} catch (error) {
301+
Ext.Msg.alert("Oryx", error);
302+
return null;
303+
}*/
304+
var domParser = new DOMParser();
305+
var xmlObject = domParser.parseFromString(this.getSerializedDOM(), "text/xml");
306+
var xslObject = domParser.parseFromString(xsl, "text/xml");
307+
var xsltProcessor = new XSLTProcessor();
308+
xsltProcessor.importStylesheet(xslObject);
309+
var result = xsltProcessor.transformToFragment(xmlObject, document);
310+
311+
var serializer = new XMLSerializer();
312+
313+
return serializer.serializeToString(result);
314+
}catch(e){
315+
alert("Oryx", error);
316+
return "";
317+
}
318+
319+
290320
},
291321

292322

editor/client/scripts/Plugins/bpmn11.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/client/scripts/Plugins/bpmn2xhtml.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/client/scripts/Plugins/overlay.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ ORYX.Plugins.Overlay = Clazz.extend({
108108

109109
}
110110

111+
var isSVG = true
112+
try {
113+
isSVG = options.node && options.node instanceof SVGElement;
114+
} catch(e){}
115+
111116
// Checks if node is setted and if this is an SVGElement
112-
if ( options.node && options.node instanceof SVGElement) {
117+
if ( options.node && isSVG) {
113118

114119
options["_temps"] = []
115120

editor/client/scripts/Plugins/plugins.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
<plugin source="file.js" name="ORYX.Plugins.File" />
5656
<plugin source="file.js" name="ORYX.Plugins.Save"/>
5757

58-
<plugin source="view.js" name="ORYX.Plugins.View" />
58+
<plugin source="view.js" name="ORYX.Plugins.View">
59+
<property zoomLevel="2" maxFitToScreenLevel="1.24" />
60+
</plugin>
5961
<plugin source="dragdropresize.js" name="ORYX.Plugins.DragDropResize" />
6062
<plugin source="grouping.js" name="ORYX.Plugins.Grouping">
6163
<notUsesIn namespace="http://b3mn.org/stencilset/xforms#" />

0 commit comments

Comments
 (0)