mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 07:27:56 +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
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* this work for additional information regarding copyright ownership.
|
* this work for additional information regarding copyright ownership.
|
||||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
* 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 not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
core.Utils =
|
core.Utils =
|
||||||
{
|
{
|
||||||
@ -35,14 +35,15 @@ core.Utils =
|
|||||||
* A function used to extend one class with another
|
* A function used to extend one class with another
|
||||||
*
|
*
|
||||||
* @param {Object} subClass
|
* @param {Object} subClass
|
||||||
* The inheriting class, or subclass
|
* The inheriting class, or subclass
|
||||||
* @param {Object} baseClass
|
* @param {Object} baseClass
|
||||||
* The class from which to inherit
|
* The class from which to inherit
|
||||||
*/
|
*/
|
||||||
objects = {};
|
objects = {};
|
||||||
objects.extend = function(subClass, baseClass) {
|
objects.extend = function(subClass, baseClass) {
|
||||||
function inheritance() {
|
function inheritance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
inheritance.prototype = baseClass.prototype;
|
inheritance.prototype = baseClass.prototype;
|
||||||
|
|
||||||
subClass.prototype = new inheritance();
|
subClass.prototype = new inheritance();
|
||||||
@ -212,28 +213,7 @@ core.Utils.createDocumentFromText = function(/*string*/str, /*string?*/mimetype)
|
|||||||
domDoc.loadXML(str);
|
domDoc.loadXML(str);
|
||||||
return domDoc;
|
return domDoc;
|
||||||
// DOMDocument
|
// 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;
|
return null;
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,21 @@
|
|||||||
/*
|
/*
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* this work for additional information regarding copyright ownership.
|
* this work for additional information regarding copyright ownership.
|
||||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
* 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 not use this file except in compliance with
|
||||||
* the License. You may obtain a copy of the License at
|
* the License. You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
* $Id: file 64488 2006-03-10 17:32:09Z paulo $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
web2d.peer.ToolkitVML =
|
web2d.peer.ToolkitVML =
|
||||||
{
|
{
|
||||||
@ -24,10 +24,10 @@ web2d.peer.ToolkitVML =
|
|||||||
var domDocument = window.document;
|
var domDocument = window.document;
|
||||||
//ownerDocument;
|
//ownerDocument;
|
||||||
// Add VML includes and namespace
|
// 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();
|
var style = domDocument.createStyleSheet();
|
||||||
style.addRule('v\\:*', "behavior: url(#default#VML);");
|
style.addRule("v\\:*", "behavior:url(#default#VML); display:inline-block");
|
||||||
},
|
},
|
||||||
createWorkspace: function(element)
|
createWorkspace: function(element)
|
||||||
{
|
{
|
||||||
|
@ -62,9 +62,6 @@ web2d.peer.svg.ElipsePeer.prototype.setPosition = function(cx, cy)
|
|||||||
|
|
||||||
web2d.peer.svg.ElipsePeer.prototype.getPosition = function()
|
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;
|
return this._position;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -157,10 +157,24 @@ web2d.peer.vml.ElementPeer.prototype.appendChild = function(elementPeer)
|
|||||||
// Add native element ..
|
// Add native element ..
|
||||||
this._native.appendChild(elementPeer._native);
|
this._native.appendChild(elementPeer._native);
|
||||||
|
|
||||||
|
elementPeer._appededToParent();
|
||||||
|
|
||||||
// Broadcast events ...
|
// Broadcast events ...
|
||||||
web2d.peer.utils.EventUtils.broadcastChangeEvent(this, "onChangeCoordSize");
|
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()
|
web2d.peer.vml.ElementPeer.prototype.getSize = function()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
@ -194,7 +208,6 @@ web2d.peer.vml.ElementPeer.prototype.getVMLFill = function()
|
|||||||
if (!this._vmlFill)
|
if (!this._vmlFill)
|
||||||
{
|
{
|
||||||
this._vmlFill = window.document.createElement('v:fill');
|
this._vmlFill = window.document.createElement('v:fill');
|
||||||
this._native.appendChild(this._vmlFill);
|
|
||||||
}
|
}
|
||||||
return this._vmlFill;
|
return this._vmlFill;
|
||||||
};
|
};
|
||||||
@ -204,12 +217,12 @@ web2d.peer.vml.ElementPeer.prototype.setFill = function(color, opacity)
|
|||||||
var vmlFill = this.getVMLFill();
|
var vmlFill = this.getVMLFill();
|
||||||
if (core.Utils.isDefined(color))
|
if (core.Utils.isDefined(color))
|
||||||
{
|
{
|
||||||
vmlFill.setAttribute('color', color);
|
vmlFill.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (core.Utils.isDefined(opacity))
|
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)
|
if (!this._vmlStroke)
|
||||||
{
|
{
|
||||||
this._vmlStroke = window.document.createElement('v:stroke');
|
this._vmlStroke = window.document.createElement('v:stroke');
|
||||||
this._native.appendChild(this._vmlStroke);
|
|
||||||
}
|
}
|
||||||
return this._vmlStroke;
|
return this._vmlStroke;
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
function afterCoreLoading()
|
function afterCoreLoading()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Uncomment for debug ...
|
||||||
if (core.UserAgent.isVMLSupported())
|
if (core.UserAgent.isVMLSupported())
|
||||||
{
|
{
|
||||||
$import("../js/mindplot.vml.js");
|
$import("../js/mindplot.vml.js");
|
||||||
@ -29,6 +30,17 @@ function afterCoreLoading()
|
|||||||
$import("../js/mindplot.svg.js");
|
$import("../js/mindplot.svg.js");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (core.UserAgent.isVMLSupported())
|
||||||
|
// {
|
||||||
|
// $import("../js/mindplot.vml-min.js");
|
||||||
|
// } else
|
||||||
|
// {
|
||||||
|
// $import("../js/mindplot.svg-min.js");
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
afterCoreLoading();
|
afterCoreLoading();
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@ function afterCoreLoading()
|
|||||||
{
|
{
|
||||||
if (core.UserAgent.isVMLSupported())
|
if (core.UserAgent.isVMLSupported())
|
||||||
{
|
{
|
||||||
$import("../js/mindplot.vml.js");
|
$import("../js/mindplot.vml-min.js");
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
$import("../js/mindplot.svg.js");
|
$import("../js/mindplot.svg-min.js");
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,10 +12,9 @@
|
|||||||
</c:url>
|
</c:url>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>
|
<!-- Internet Explorer 8 Hack -->
|
||||||
<spring:message code="SITE.TITLE"/>
|
<meta http-equiv="Content-type" value="text/html;charset=UTF-8">
|
||||||
- ${mindmap.title} </title>
|
<title><spring:message code="SITE.TITLE"/> - ${mindmap.title} </title>
|
||||||
<meta http-equiv="Content-type" value="text/html; charset=utf-8">
|
|
||||||
<link rel="stylesheet" type="text/css" href="../css/editor.css">
|
<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="../css/bubble.css">
|
||||||
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css">
|
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/thirdparty.css">
|
||||||
|
Loading…
Reference in New Issue
Block a user