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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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