- Update IE parser to Msxml2.DOMDocument.6.0

This commit is contained in:
Paulo Gustavo Veiga 2012-09-22 21:08:06 -03:00
parent 8a8922f2a6
commit ff63b4f89c
7 changed files with 140 additions and 136 deletions

View File

@ -21,7 +21,7 @@ core.Utils = {
};
core.Utils.innerXML = function(/*Node*/node) {
core.Utils.innerXML = function (node) {
// summary:
// Implementation of MS's innerXML function.
if ($defined(node.innerXML)) {
@ -36,29 +36,26 @@ core.Utils.innerXML = function(/*Node*/node) {
}
};
/**
* Cross-browser implementation of creating an XML document object.
*/
core.Utils.createDocument = function () {
// summary:
// cross-browser implementation of creating an XML document object.
var doc = null;
var _document = window.document;
if ($defined(window.ActiveXObject)) {
var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ];
for (var i = 0; i < prefixes.length; i++) {
//http://blogs.msdn.com/b/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx
var progIDs = [ 'Msxml2.DOMDocument.6.0', 'Msxml2.DOMDocument.3.0'];
for (var i = 0; i < progIDs.length; i++) {
try {
doc = new ActiveXObject(prefixes[i] + ".XMLDOM");
} catch(e) { /* squelch */
}
if ($defined(doc)) {
doc = new ActiveXObject(progIDs[i]);
break;
}
catch (ex) {
}
} else if ((_document.implementation) &&
(_document.implementation.createDocument)) {
doc = _document.implementation.createDocument("", "", null);
}
} else if (window.document.implementation && window.document.implementation.createDocument) {
doc = window.document.implementation.createDocument("", "", null);
}
$asser(doc, "Parser could not be instantiated");
return doc;
// DOMDocument
};

View File

@ -47,7 +47,7 @@ mindplot.NoteIcon = new Class({
var result = new Element('div');
result.setStyles({padding:'5px'});
var title = new Element('div', {text:'Note'});
var title = new Element('div', {text:$msg('NOTE')});
title.setStyles({
'font-weight':'bold',
color:'black',

View File

@ -67,10 +67,12 @@ mindplot.widget.FloatingTip = new Class({
show:function (element) {
var old = element.retrieve('floatingtip');
if (old) if (old.getStyle('opacity') == 1) {
if (old){
if (old.getStyle('opacity') == 1) {
clearTimeout(old.retrieve('timeout'));
return this;
}
}
var tip = this._create(element);
if (tip == null)
return this;
@ -96,7 +98,8 @@ mindplot.widget.FloatingTip = new Class({
tip = element.retrieve('floatingtip');
} catch (x) {
}
if (!tip) return this;
if (!tip)
return this;
} else {
return this;
}
@ -114,7 +117,8 @@ mindplot.widget.FloatingTip = new Class({
if (oc == 'title') {
oc = 'floatingtitle';
if (!elem.get('floatingtitle')) elem.setProperty('floatingtitle', elem.get('title'));
if (!elem.get('floatingtitle'))
elem.setProperty('floatingtitle', elem.get('title'));
elem.set('title', '');
}

View File

@ -41,7 +41,7 @@ mindplot.widget.LinkIconTooltip = new Class({
width:'100%'
});
var title = new Element('div', {text:'Link'});
var title = new Element('div', {text:$msg('LINK')});
title.setStyles({
'font-weight':'bold',
color:'black',

View File

@ -54,4 +54,5 @@ WRITE_YOUR_TEXT_HERE=Write your note here ...
REMOVE=Remove
ACCEPT=Accept
CANCEL=Cancel
LINK=Link

View File

@ -55,3 +55,4 @@ WRITE_YOUR_TEXT_HERE=Escribe tu nota aquí ...
REMOVE=Borrar
ACCEPT=Aceptar
CANCEL=Cancelar
LINK=Enlace

View File

@ -58,3 +58,4 @@ ACCEPT=Accepter
CANCEL=Annuler
REMOVE=Supprimer
WRITE_YOUR_TEXT_HERE=Écrivez votre texte ici ...
LINK=Lien