mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-12-25 20:53:49 +01:00
- Almost IE 8 working :)
This commit is contained in:
parent
6ccc2f7650
commit
376fd10331
@ -1,21 +1,21 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
core.Utils =
|
||||
{
|
||||
@ -35,14 +35,15 @@ core.Utils =
|
||||
* A function used to extend one class with another
|
||||
*
|
||||
* @param {Object} subClass
|
||||
* The inheriting class, or subclass
|
||||
* The inheriting class, or subclass
|
||||
* @param {Object} baseClass
|
||||
* The class from which to inherit
|
||||
* The class from which to inherit
|
||||
*/
|
||||
objects = {};
|
||||
objects.extend = function(subClass, baseClass) {
|
||||
function inheritance() {
|
||||
}
|
||||
|
||||
inheritance.prototype = baseClass.prototype;
|
||||
|
||||
subClass.prototype = new inheritance();
|
||||
@ -212,28 +213,7 @@ core.Utils.createDocumentFromText = function(/*string*/str, /*string?*/mimetype)
|
||||
domDoc.loadXML(str);
|
||||
return domDoc;
|
||||
// DOMDocument
|
||||
} else {
|
||||
//dojo.debug("toXml didn't work?");
|
||||
}
|
||||
} else {
|
||||
// var _document = dojo.doc();
|
||||
// if(_document.createElement){
|
||||
// // FIXME: this may change all tags to uppercase!
|
||||
// var tmp = _document.createElement("xml");
|
||||
// tmp.innerHTML = str;
|
||||
// if(_document.implementation && _document.implementation.createDocument){
|
||||
// var xmlDoc = _document.implementation.createDocument("foo", "", null);
|
||||
// for(var i = 0; i < tmp.childNodes.length; i++) {
|
||||
// xmlDoc.importNode(tmp.childNodes.item(i), true);
|
||||
// }
|
||||
// return xmlDoc; // DOMDocument
|
||||
// }
|
||||
// // FIXME: probably not a good idea to have to return an HTML fragment
|
||||
// // FIXME: the tmp.doc.firstChild is as tested from IE, so it may not
|
||||
// // work that way across the board
|
||||
// return ((tmp.document)&&
|
||||
// (tmp.document.firstChild ? tmp.document.firstChild : tmp)); // DOMDocument
|
||||
// }
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
web2d.Elipse = function(attributes)
|
||||
{
|
||||
var peer = web2d.peer.Toolkit.createElipse();
|
||||
|
@ -1,21 +1,21 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
web2d.peer.ToolkitVML =
|
||||
{
|
||||
@ -24,10 +24,10 @@ web2d.peer.ToolkitVML =
|
||||
var domDocument = window.document;
|
||||
//ownerDocument;
|
||||
// Add VML includes and namespace
|
||||
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml", "#default#VML");
|
||||
domDocument.namespaces.add("v", "urn:schemas-microsoft-com:vml");
|
||||
|
||||
var style = domDocument.createStyleSheet();
|
||||
style.addRule('v\\:*', "behavior: url(#default#VML);");
|
||||
style.addRule("v\\:*", "behavior:url(#default#VML); display:inline-block");
|
||||
},
|
||||
createWorkspace: function(element)
|
||||
{
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
web2d.peer.svg.ElipsePeer = function()
|
||||
{
|
||||
var svgElement = window.document.createElementNS(this.svgNamespace, 'ellipse');
|
||||
@ -62,9 +62,6 @@ web2d.peer.svg.ElipsePeer.prototype.setPosition = function(cx, cy)
|
||||
|
||||
web2d.peer.svg.ElipsePeer.prototype.getPosition = function()
|
||||
{
|
||||
// var x = this._native.getAttribute('cx');
|
||||
// var y = this._native.getAttribute('cy');
|
||||
// return {x:parseInt(x),y:parseInt(y)};
|
||||
return this._position;
|
||||
};
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
web2d.peer.vml.ElementPeer = function(vmlElement)
|
||||
{
|
||||
this._native = vmlElement;
|
||||
@ -157,10 +157,24 @@ web2d.peer.vml.ElementPeer.prototype.appendChild = function(elementPeer)
|
||||
// Add native element ..
|
||||
this._native.appendChild(elementPeer._native);
|
||||
|
||||
elementPeer._appededToParent();
|
||||
|
||||
// Broadcast events ...
|
||||
web2d.peer.utils.EventUtils.broadcastChangeEvent(this, "onChangeCoordSize");
|
||||
};
|
||||
|
||||
|
||||
// IE 8 hack ...
|
||||
web2d.peer.vml.ElementPeer.prototype._appededToParent = function()
|
||||
{
|
||||
var fillElem = this.getVMLFill();
|
||||
this._native.appendChild(fillElem);
|
||||
|
||||
var strokeElem = this.getVMLStroke();
|
||||
this._native.appendChild(strokeElem);
|
||||
}
|
||||
|
||||
|
||||
web2d.peer.vml.ElementPeer.prototype.getSize = function()
|
||||
{
|
||||
return {
|
||||
@ -194,7 +208,6 @@ web2d.peer.vml.ElementPeer.prototype.getVMLFill = function()
|
||||
if (!this._vmlFill)
|
||||
{
|
||||
this._vmlFill = window.document.createElement('v:fill');
|
||||
this._native.appendChild(this._vmlFill);
|
||||
}
|
||||
return this._vmlFill;
|
||||
};
|
||||
@ -204,12 +217,12 @@ web2d.peer.vml.ElementPeer.prototype.setFill = function(color, opacity)
|
||||
var vmlFill = this.getVMLFill();
|
||||
if (core.Utils.isDefined(color))
|
||||
{
|
||||
vmlFill.setAttribute('color', color);
|
||||
vmlFill.color = color;
|
||||
}
|
||||
|
||||
if (core.Utils.isDefined(opacity))
|
||||
{
|
||||
vmlFill.setAttribute('opacity', opacity);
|
||||
vmlFill.opacitopacity;
|
||||
}
|
||||
|
||||
};
|
||||
@ -230,7 +243,6 @@ web2d.peer.vml.ElementPeer.prototype.getVMLStroke = function()
|
||||
if (!this._vmlStroke)
|
||||
{
|
||||
this._vmlStroke = window.document.createElement('v:stroke');
|
||||
this._native.appendChild(this._vmlStroke);
|
||||
}
|
||||
return this._vmlStroke;
|
||||
};
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
web2d.peer.vml.ElipsePeer = function()
|
||||
{
|
||||
var vmlElement = window.document.createElement('v:oval');
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||
*/
|
||||
|
||||
/**
|
||||
* http://www.w3.org/TR/NOTE-VML#_Toc416858381
|
||||
* VML arcsize number "0.2"
|
||||
|
@ -21,6 +21,7 @@
|
||||
function afterCoreLoading()
|
||||
{
|
||||
|
||||
// Uncomment for debug ...
|
||||
if (core.UserAgent.isVMLSupported())
|
||||
{
|
||||
$import("../js/mindplot.vml.js");
|
||||
@ -29,6 +30,17 @@ function afterCoreLoading()
|
||||
$import("../js/mindplot.svg.js");
|
||||
|
||||
}
|
||||
|
||||
// if (core.UserAgent.isVMLSupported())
|
||||
// {
|
||||
// $import("../js/mindplot.vml-min.js");
|
||||
// } else
|
||||
// {
|
||||
// $import("../js/mindplot.svg-min.js");
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
};
|
||||
afterCoreLoading();
|
||||
|
||||
|
@ -21,10 +21,10 @@ function afterCoreLoading()
|
||||
{
|
||||
if (core.UserAgent.isVMLSupported())
|
||||
{
|
||||
$import("../js/mindplot.vml.js");
|
||||
$import("../js/mindplot.vml-min.js");
|
||||
} else
|
||||
{
|
||||
$import("../js/mindplot.svg.js");
|
||||
$import("../js/mindplot.svg-min.js");
|
||||
|
||||
}
|
||||
};
|
||||
|
@ -12,10 +12,9 @@
|
||||
</c:url>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
<spring:message code="SITE.TITLE"/>
|
||||
- ${mindmap.title} </title>
|
||||
<meta http-equiv="Content-type" value="text/html; charset=utf-8">
|
||||
<!-- Internet Explorer 8 Hack -->
|
||||
<meta http-equiv="Content-type" value="text/html;charset=UTF-8">
|
||||
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
|
||||
<link rel="stylesheet" type="text/css" href="../css/editor.css">
|
||||
<link rel="stylesheet" type="text/css" href="../css/bubble.css">
|
||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css">
|
||||
|
Loading…
Reference in New Issue
Block a user