Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.css,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.css 2 Nov 2005 09:20:03 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.css 17 Feb 2006 21:19:23 -0000 1.2.2.1 @@ -70,7 +70,6 @@ .htmlarea .toolbar select:active { margin-top: 2px; margin-bottom: 1px; - background: FieldFace; color: ButtonText; } @@ -231,4 +230,4 @@ .htmlarea .panels.left h1 { border-right:none; } .htmlarea .panels.right .panel { border-right:none; border-left:none; } .htmlarea .panels.left h1 { border-left:none; } -.htmlarea { border: 1px solid black; } +.htmlarea { border: 1px solid black; } \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js 11 Nov 2005 20:32:40 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/htmlarea.js 17 Feb 2006 21:19:23 -0000 1.3.2.1 @@ -27,18 +27,18 @@ -- included in the top 10 lines of the file (see the embedded edit mode) -- -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/htmlarea.js $ - -- $LastChangedDate: 2005-11-07 21:36:41 +1300 (Mon, 07 Nov 2005) $ - -- $LastChangedRevision: 421 $ - -- $LastChangedBy: gocher $ + -- $LastChangedDate: 2006-01-19 14:10:25 +1300 (Thu, 19 Jan 2006) $ + -- $LastChangedRevision: 461 $ + -- $LastChangedBy: mokhet $ --------------------------------------------------------------------------*/ HTMLArea.version = { 'Release' : 'Trunk', 'Head' : '$HeadURL: http://svn.xinha.python-hosting.com/trunk/htmlarea.js $'.replace(/^[^:]*: (.*) \$$/, '$1'), - 'Date' : '$LastChangedDate: 2005-11-07 21:36:41 +1300 (Mon, 07 Nov 2005) $'.replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/, '$4 $2 $3'), - 'Revision' : '$LastChangedRevision: 421 $'.replace(/^[^:]*: (.*) \$$/, '$1'), - 'RevisionBy': '$LastChangedBy: gocher $'.replace(/^[^:]*: (.*) \$$/, '$1') + 'Date' : '$LastChangedDate: 2006-01-19 14:10:25 +1300 (Thu, 19 Jan 2006) $'.replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/, '$4 $2 $3'), + 'Revision' : '$LastChangedRevision: 461 $'.replace(/^[^:]*: (.*) \$$/, '$1'), + 'RevisionBy': '$LastChangedBy: mokhet $'.replace(/^[^:]*: (.*) \$$/, '$1') }; if (typeof _editor_url == "string") { @@ -2310,15 +2310,23 @@ } node.style.cssText = declarations.join("; "); } - function stripTag(el) { - if (HTMLArea.is_ie) + if (HTMLArea.is_ie) + { + function stripTag(el) + { el.outerHTML = HTMLArea.htmlEncode(el.innerText); - else { + ++stats.mso_xmlel; + } + } + else + { + function stripTag(el) + { var txt = document.createTextNode(HTMLArea.getInnerText(el)); el.parentNode.insertBefore(txt, el); HTMLArea.removeFromParent(el); + ++stats.mso_xmlel; } - ++stats.mso_xmlel; } function checkEmpty(el) { if (/^(a|span|b|strong|i|em|font)$/i.test(el.tagName) && @@ -2762,102 +2770,142 @@ /** Returns a node after which we can insert other nodes, in the current * selection. The selection is removed. It splits a text node, if needed. */ -HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) { - if (!HTMLArea.is_ie) { +if (!HTMLArea.is_ie) +{ + HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) + { var sel = this._getSelection(); var range = this._createRange(sel); // remove the current selection sel.removeAllRanges(); range.deleteContents(); var node = range.startContainer; var pos = range.startOffset; - switch (node.nodeType) { - case 3: // Node.TEXT_NODE - // we have to split it at the caret position. - if (toBeInserted.nodeType == 3) { - // do optimized insertion - node.insertData(pos, toBeInserted.data); - range = this._createRange(); - range.setEnd(node, pos + toBeInserted.length); - range.setStart(node, pos + toBeInserted.length); - sel.addRange(range); - } else { - node = node.splitText(pos); + switch (node.nodeType) + { + case 3: // Node.TEXT_NODE + // we have to split it at the caret position. + if (toBeInserted.nodeType == 3) + { + // do optimized insertion + node.insertData(pos, toBeInserted.data); + range = this._createRange(); + range.setEnd(node, pos + toBeInserted.length); + range.setStart(node, pos + toBeInserted.length); + sel.addRange(range); + } + else + { + node = node.splitText(pos); + var selnode = toBeInserted; + if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) + { + selnode = selnode.firstChild; + } + node.parentNode.insertBefore(toBeInserted, node); + this.selectNodeContents(selnode); + this.updateToolbar(); + } + break; + case 1: // Node.ELEMENT_NODE var selnode = toBeInserted; - if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) { + if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) + { selnode = selnode.firstChild; } - node.parentNode.insertBefore(toBeInserted, node); + node.insertBefore(toBeInserted, node.childNodes[pos]); this.selectNodeContents(selnode); this.updateToolbar(); - } break; - case 1: // Node.ELEMENT_NODE - var selnode = toBeInserted; - if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) { - selnode = selnode.firstChild; - } - node.insertBefore(toBeInserted, node.childNodes[pos]); - this.selectNodeContents(selnode); - this.updateToolbar(); - break; } - } else { + }; +} +else +{ + HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) + { return null; // this function not yet used for IE - } -}; + }; +} // Returns the deepest node that contains both endpoints of the selection. -HTMLArea.prototype.getParentElement = function(sel) { - if(typeof sel == 'undefined') +if (HTMLArea.is_ie) +{ + HTMLArea.prototype.getParentElement = function(sel) { - sel = this._getSelection(); - } - var range = this._createRange(sel); - if (HTMLArea.is_ie) { - switch (sel.type) { - case "Text": - // try to circumvent a bug in IE: - // the parent returned is not always the real parent element - var parent = range.parentElement(); - while (true) + if(typeof sel == 'undefined') + { + sel = this._getSelection(); + } + var range = this._createRange(sel); + switch (sel.type) + { + case "Text": + // try to circumvent a bug in IE: + // the parent returned is not always the real parent element + var parent = range.parentElement(); + while (true) + { + var TestRange = range.duplicate(); + TestRange.moveToElementText(parent); + if (TestRange.inRange(range)) + { + break; + } + if ((parent.nodeType != 1) || (parent.tagName.toLowerCase() == 'body')) + { + break; + } + parent = parent.parentElement; + } + return parent; + case "None": + // It seems that even for selection of type "None", + // there _is_ a parent element and it's value is not + // only correct, but very important to us. MSIE is + // certainly the buggiest browser in the world and I + // wonder, God, how can Earth stand it? + return range.parentElement(); + case "Control": + return range.item(0); + default: + return this._doc.body; + } + }; +} +else +{ + HTMLArea.prototype.getParentElement = function(sel) + { + if(typeof sel == 'undefined') + { + sel = this._getSelection(); + } + var range = this._createRange(sel); + try + { + var p = range.commonAncestorContainer; + if (!range.collapsed && range.startContainer == range.endContainer && + range.startOffset - range.endOffset <= 1 && range.startContainer.hasChildNodes()) { - var TestRange = range.duplicate(); - TestRange.moveToElementText(parent); - if (TestRange.inRange(range)) break; - if ((parent.nodeType != 1) || (parent.tagName.toLowerCase() == 'body')) break; - parent = parent.parentElement; + p = range.startContainer.childNodes[range.startOffset]; } - return parent; - case "None": - // It seems that even for selection of type "None", - // there _is_ a parent element and it's value is not - // only correct, but very important to us. MSIE is - // certainly the buggiest browser in the world and I - // wonder, God, how can Earth stand it? - return range.parentElement(); - case "Control": - return range.item(0); - default: - return this._doc.body; + /* + alert(range.startContainer + ":" + range.startOffset + "\n" + + range.endContainer + ":" + range.endOffset); + */ + while (p.nodeType == 3) + { + p = p.parentNode; + } + return p; } - } else try { - var p = range.commonAncestorContainer; - if (!range.collapsed && range.startContainer == range.endContainer && - range.startOffset - range.endOffset <= 1 && range.startContainer.hasChildNodes()) - p = range.startContainer.childNodes[range.startOffset]; - /* - alert(range.startContainer + ":" + range.startOffset + "\n" + - range.endContainer + ":" + range.endOffset); - */ - while (p.nodeType == 3) { - p = p.parentNode; + catch (e) + { + return null; } - return p; - } catch (e) { - return null; - } -}; + }; +} // Returns an array with all the ancestor nodes of the selection. HTMLArea.prototype.getAllAncestors = function() { @@ -2918,20 +2966,21 @@ * * @returns null | element */ -HTMLArea.prototype._activeElement = function(sel) +if(HTMLArea.is_ie) { - if(sel == null) return null; - if(this._selectionEmpty(sel)) return null; - - if(HTMLArea.is_ie) + HTMLArea.prototype._activeElement = function(sel) { + if((sel == null) || this._selectionEmpty(sel)) + { + return null; + } + if(sel.type.toLowerCase() == "control") { return sel.createRange().item(0); } else { - // If it's not a control, then we need to see if // the selection is the _entire_ text of a parent node // (this happens when a node is clicked in the tree) @@ -2964,9 +3013,17 @@ */ return null; } - } - else + }; +} +else +{ + HTMLArea.prototype._activeElement = function(sel) { + if((sel == null) || this._selectionEmpty(sel)) + { + return null; + } + // For Mozilla we just see if the selection is not collapsed (something is selected) // and that the anchor (start of selection) is an element. This might not be totally // correct, we possibly should do a simlar check to IE? @@ -2986,26 +3043,39 @@ } } return null; - } -}; + }; +} - -HTMLArea.prototype._selectionEmpty = function(sel) +if(HTMLArea.is_ie) { - if(!sel) return true; - - if(HTMLArea.is_ie) + HTMLArea.prototype._selectionEmpty = function(sel) { + if(!sel) + { + return true; + } + return this._createRange(sel).htmlText == ''; - } - else if(typeof sel.isCollapsed != 'undefined') + }; +} +else +{ + HTMLArea.prototype._selectionEmpty = function(sel) { - return sel.isCollapsed; - } + if(!sel) + { + return true; + } - return true; -}; + if(typeof sel.isCollapsed != 'undefined') + { + return sel.isCollapsed; + } + return true; + }; +} + HTMLArea.prototype._getAncestorBlock = function(sel) { // Scan upwards to find a block level element that we can change or apply to @@ -3174,12 +3244,14 @@ }; // Selects the contents inside the given node -HTMLArea.prototype.selectNodeContents = function(node, pos) { - this.focusEditor(); - this.forceRedraw(); - var range; - var collapsed = typeof pos == "undefined" ? true : false; - if (HTMLArea.is_ie) { +if (HTMLArea.is_ie) +{ + HTMLArea.prototype.selectNodeContents = function(node, pos) + { + this.focusEditor(); + this.forceRedraw(); + var range; + var collapsed = typeof pos == "undefined" ? true : false; // Tables and Images get selected as "objects" rather than the text contents if(collapsed && node.tagName && node.tagName.toLowerCase().match(/table|img|input|select|textarea/)) { @@ -3193,7 +3265,16 @@ //(collapsed) && range.collapse(pos); } range.select(); - } else { + }; +} +else +{ + HTMLArea.prototype.selectNodeContents = function(node, pos) + { + this.focusEditor(); + this.forceRedraw(); + var range; + var collapsed = typeof pos == "undefined" ? true : false; var sel = this._getSelection(); range = this._doc.createRange(); // Tables and Images get selected as "objects" rather than the text contents @@ -3208,31 +3289,42 @@ } sel.removeAllRanges(); sel.addRange(range); - } -}; + }; +} /** Call this function to insert HTML code at the current position. It deletes * the selection, if any. */ -HTMLArea.prototype.insertHTML = function(html) { - var sel = this._getSelection(); - var range = this._createRange(sel); - this.focusEditor(); - if (HTMLArea.is_ie) { +if (HTMLArea.is_ie) +{ + HTMLArea.prototype.insertHTML = function(html) + { + var sel = this._getSelection(); + var range = this._createRange(sel); + this.focusEditor(); range.pasteHTML(html); - } else { + }; +} +else +{ + HTMLArea.prototype.insertHTML = function(html) + { + var sel = this._getSelection(); + var range = this._createRange(sel); + this.focusEditor(); // construct a new document fragment with the given HTML var fragment = this._doc.createDocumentFragment(); var div = this._doc.createElement("div"); div.innerHTML = html; - while (div.firstChild) { + while (div.firstChild) + { // the following call also removes the node from div fragment.appendChild(div.firstChild); } // this also removes the selection var node = this.insertNodeAtSelection(fragment); - } -}; + }; +} /** * Call this function to surround the existing HTML code in the selection with @@ -3245,17 +3337,24 @@ }; /// Retrieve the selected block -HTMLArea.prototype.getSelectedHTML = function() { - var sel = this._getSelection(); - var range = this._createRange(sel); - var existing = null; - if (HTMLArea.is_ie) { - existing = range.htmlText; - } else { - existing = HTMLArea.getHTML(range.cloneContents(), false, this); - } - return existing; -}; +if (HTMLArea.is_ie) +{ + HTMLArea.prototype.getSelectedHTML = function() + { + var sel = this._getSelection(); + var range = this._createRange(sel); + return range.htmlText; + }; +} +else +{ + HTMLArea.prototype.getSelectedHTML = function() + { + var sel = this._getSelection(); + var range = this._createRange(sel); + return HTMLArea.getHTML(range.cloneContents(), false, this); + }; +} /// Return true if we have some selection HTMLArea.prototype.hasSelectedText = function() { @@ -3802,12 +3901,12 @@ break; case 8: // KEY backspace case 46: // KEY delete - if (HTMLArea.is_gecko && !ev.shiftKey) { - if (this.dom_checkBackspace()) + if ((HTMLArea.is_gecko && !ev.shiftKey) || HTMLArea.is_ie) + { + if (this.checkBackspace()) + { HTMLArea._stopEvent(ev); - } else if (HTMLArea.is_ie) { - if (this.ie_checkBackspace()) - HTMLArea._stopEvent(ev); + } } break; } @@ -3830,61 +3929,77 @@ return newel; }; -HTMLArea.prototype.ie_checkBackspace = function() { - var sel = this._getSelection(); - if(HTMLArea.is_ie && sel.type == 'Control') +if(HTMLArea.is_ie) +{ + // this function is for IE + HTMLArea.prototype.checkBackspace = function() { - var elm = this._activeElement(sel); - HTMLArea.removeFromParent(elm); - return true; - } + var sel = this._getSelection(); + if(sel.type == 'Control') + { + var elm = this._activeElement(sel); + HTMLArea.removeFromParent(elm); + return true; + } - // This bit of code preseves links when you backspace over the - // endpoint of the link in IE. Without it, if you have something like - // link_here | - // where | is the cursor, and backspace over the last e, then the link - // will de-link, which is a bit tedious - var range = this._createRange(sel); - var r2 = range.duplicate(); - r2.moveStart("character", -1); - var a = r2.parentElement(); - if (a != range.parentElement() && - /^a$/i.test(a.tagName)) { - r2.collapse(true); - r2.moveEnd("character", 1); - r2.pasteHTML(''); - r2.select(); - return true; - } -}; - -HTMLArea.prototype.dom_checkBackspace = function() { - var self = this; - setTimeout(function() { - var sel = self._getSelection(); - var range = self._createRange(sel); - var SC = range.startContainer; - var SO = range.startOffset; - var EC = range.endContainer; - var EO = range.endOffset; - var newr = SC.nextSibling; - if (SC.nodeType == 3) - SC = SC.parentNode; - if (!/\S/.test(SC.tagName)) { - var p = document.createElement("p"); - while (SC.firstChild) - p.appendChild(SC.firstChild); - SC.parentNode.insertBefore(p, SC); - HTMLArea.removeFromParent(SC); - var r = range.cloneRange(); - r.setStartBefore(newr); - r.setEndAfter(newr); - r.extractContents(); - sel.removeAllRanges(); - sel.addRange(r); + // This bit of code preseves links when you backspace over the + // endpoint of the link in IE. Without it, if you have something like + // link_here | + // where | is the cursor, and backspace over the last e, then the link + // will de-link, which is a bit tedious + var range = this._createRange(sel); + var r2 = range.duplicate(); + r2.moveStart("character", -1); + var a = r2.parentElement(); + if (a != range.parentElement() && + /^a$/i.test(a.tagName)) + { + r2.collapse(true); + r2.moveEnd("character", 1); + r2.pasteHTML(''); + r2.select(); + return true; } - }, 10); -}; + }; +} +else +{ + // this function is for DOM + HTMLArea.prototype.checkBackspace = function() + { + var self = this; + setTimeout(function() + { + var sel = self._getSelection(); + var range = self._createRange(sel); + var SC = range.startContainer; + var SO = range.startOffset; + var EC = range.endContainer; + var EO = range.endOffset; + var newr = SC.nextSibling; + if (SC.nodeType == 3) + { + SC = SC.parentNode; + } + if (!/\S/.test(SC.tagName)) + { + var p = document.createElement("p"); + while (SC.firstChild) + { + p.appendChild(SC.firstChild); + } + SC.parentNode.insertBefore(p, SC); + HTMLArea.removeFromParent(SC); + var r = range.cloneRange(); + r.setStartBefore(newr); + r.setEndAfter(newr); + r.extractContents(); + sel.removeAllRanges(); + sel.addRange(r); + } + }, 10); + }; +} /** The idea here is * 1. See if we are in a block element @@ -4367,31 +4482,51 @@ // selection & ranges // returns the current selection object -HTMLArea.prototype._getSelection = function() { - if (HTMLArea.is_ie) { +if (HTMLArea.is_ie) +{ + HTMLArea.prototype._getSelection = function() + { return this._doc.selection; - } else { + }; +} +else +{ + HTMLArea.prototype._getSelection = function() + { return this._iframe.contentWindow.getSelection(); - } -}; + }; +} // returns a range for the current selection -HTMLArea.prototype._createRange = function(sel) { - if (HTMLArea.is_ie) { +if (HTMLArea.is_ie) +{ + HTMLArea.prototype._createRange = function(sel) + { return sel.createRange(); - } else { + }; +} +else +{ + HTMLArea.prototype._createRange = function(sel) + { this.activateEditor(); - if (typeof sel != "undefined") { - try { + if (typeof sel != "undefined") + { + try + { return sel.getRangeAt(0); - } catch(e) { + } + catch(e) + { return this._doc.createRange(); } - } else { + } + else + { return this._doc.createRange(); } - } -}; + }; +} // event handling @@ -4450,47 +4585,77 @@ // alert('Flushed ' + x + ' events.'); }; -HTMLArea._addEvent = function(el, evname, func) { - if (HTMLArea.is_ie) { - el.attachEvent("on" + evname, func); - } else { +if (document.addEventListener) +{ + HTMLArea._addEvent = function(el, evname, func) + { el.addEventListener(evname, func, true); - } - HTMLArea._eventFlushers.push([el, evname, func]); -}; + HTMLArea._eventFlushers.push([el, evname, func]); + }; + HTMLArea._removeEvent = function(el, evname, func) + { + el.removeEventListener(evname, func, true); + }; + HTMLArea._stopEvent = function(ev) + { + ev.preventDefault(); + ev.stopPropagation(); + }; +} +else if (document.attachEvent) +{ + HTMLArea._addEvent = function(el, evname, func) + { + el.attachEvent("on" + evname, func); + HTMLArea._eventFlushers.push([el, evname, func]); + }; + HTMLArea._removeEvent = function(el, evname, func) + { + el.detachEvent("on" + evname, func); + }; + HTMLArea._stopEvent = function(ev) + { + try + { + ev.cancelBubble = true; + ev.returnValue = false; + } + catch(e) + { + // Perhaps we could try here to stop the window.event + // window.event.cancelBubble = true; + // window.event.returnValue = false; + } + }; +} +else +{ + HTMLArea._addEvent = function(el, evname, func) + { + alert('_addEvent is not supported'); + }; + HTMLArea._removeEvent = function(el, evname, func) + { + alert('_removeEvent is not supported'); + }; + HTMLArea._stopEvent = function(ev) + { + alert('_stopEvent is not supported'); + }; +} HTMLArea._addEvents = function(el, evs, func) { for (var i = evs.length; --i >= 0;) { HTMLArea._addEvent(el, evs[i], func); } }; -HTMLArea._removeEvent = function(el, evname, func) { - if (HTMLArea.is_ie) { - el.detachEvent("on" + evname, func); - } else { - el.removeEventListener(evname, func, true); - } -}; - HTMLArea._removeEvents = function(el, evs, func) { for (var i = evs.length; --i >= 0;) { HTMLArea._removeEvent(el, evs[i], func); } }; -HTMLArea._stopEvent = function(ev) { - if (HTMLArea.is_ie) { - try{ - ev.cancelBubble = true; - ev.returnValue = false; - } catch(e){} - } else { - ev.preventDefault(); - ev.stopPropagation(); - } -}; - /** * Adds a standard "DOM-0" event listener to an element. * The DOM-0 events are those applied directly as attributes to @@ -5536,17 +5701,20 @@ return false; }; -HTMLArea.getOuterHTML = function(element) +if(HTMLArea.is_ie) { - if(HTMLArea.is_ie) + HTMLArea.getOuterHTML = function(element) { return element.outerHTML; - } - else + }; +} +else +{ + HTMLArea.getOuterHTML = function(element) { return (new XMLSerializer()).serializeToString(element); - } -}; + }; +} HTMLArea.toFree = [ ]; HTMLArea.freeLater = function(obj,prop) Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/bold.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/bold.gif,v diff -u -r1.1 -r1.1.2.1 Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/strikethrough.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/strikethrough.gif,v diff -u -r1.1 -r1.1.2.1 Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/underline.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/images/fr/underline.gif,v diff -u -r1.1 -r1.1.2.1 Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js 2 Nov 2005 09:20:05 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/lang/fr.js 17 Feb 2006 21:19:23 -0000 1.2.2.1 @@ -11,8 +11,8 @@ "Justify Center": "Centrer", "Justify Right": "Aligner à droite", "Justify Full": "Justifier", - "Ordered List": "Numérotation", - "Bulleted List": "Puces", + "Ordered List": "Liste numérotée", + "Bulleted List": "Liste à puces", "Decrease Indent": "Diminuer le retrait", "Increase Indent": "Augmenter le retrait", "Font Color": "Couleur de police", @@ -36,9 +36,12 @@ "Remove formatting": "Supprimer mise en forme", "Select all": "Tout sélectionner", "Print document": "Imprimer document", - "Clear MSOffice tags": "Effacer tags MSOffice", - "Clear Inline Font Specifications": "Supprimer paramètres inline de la fonte", - "Split Block": "Séparer les blocks", + "Clear MSOffice tags": "Supprimer tags MSOffice", + "Clear Inline Font Specifications": "Supprimer paramètres inline de la police", + "Would you like to clear font typefaces?": "Voulez-vous supprimer les types ?", + "Would you like to clear font sizes?": "Voulez-vous supprimer les tailles ?", + "Would you like to clear font colours?": "Voulez-vous supprimer les couleurs ?", + "Split Block": "Séparer les blocs", "Toggle Borders": "Afficher / Masquer les bordures", "Save as": "Enregistrer sous", "Insert/Overwrite": "Insertion / Remplacement", @@ -52,15 +55,15 @@ "Normal": "Normal", "Address": "Adresse", "Formatted": "Formaté", - + //dialogs "OK": "OK", "Cancel": "Annuler", "Path": "Chemin", "You are in TEXT MODE. Use the [<>] button to switch back to WYSIWYG.": "Vous êtes en MODE TEXTE. Appuyez sur le bouton [<>] pour retourner au mode WYSIWYG.", - "The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly.": "Le bouton Coller ne fonctionne pas sur les navigateurs basés sur Mozilla (pour des raisons de sécurité). Pressez simplement CTRL-V au clavier pour coller directement.", - "Your Document is not well formed. Check JavaScript console for details.": "Le document est mal formé. Vérifiez la console JavaScript pour plus de détail.", - + "The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly.": "Le bouton Coller ne fonctionne pas sur les navigateurs basés sur Mozilla (pour des raisons de sécurité). Pressez CTRL-V au clavier pour coller directement.", + "Your Document is not well formed. Check JavaScript console for details.": "Le document est mal formé. Vérifiez la console JavaScript pour plus de détails.", + "Alignment:": "Alignement", "Not set": "Indéfini", "Left": "Gauche", @@ -72,16 +75,16 @@ "Bottom": "Bas", "Middle": "Milieu", "Top": "Haut", - + "Layout": "Mise en page", "Spacing": "Espacement", "Horizontal:": "Horizontal", "Horizontal padding": "Marge horizontale interne", "Vertical:": "Vertical", "Vertical padding": "Marge verticale interne", - "Border thickness:": "Epaisseur bordure", + "Border thickness:": "Epaisseur de bordure", "Leave empty for no border": "Laisser vide pour pas de bordure", - + //Insert Link "Insert/Modify Link": "Insérer / Modifier un lien", "None (use implicit)": "Aucune (implicite)", @@ -94,7 +97,7 @@ "URL:": "URL:", "You must enter the URL where this link points to": "Vous devez entrer l'URL de ce lien", "You need to select some text before creating a link": "Vous devez sélectionner du texte avant de créer un lien", - + // Insert Table "Insert Table": "Insérer un tableau", "Rows:": "Lignes", @@ -113,18 +116,37 @@ "Space between adjacent cells": "Espace entre les cellules adjacentes", "Cell padding:": "Marge interne", "Space between content and border in cell": "Espace entre le contenu et la bordure d'une cellule", - "You must enter a number of rows": "Vous devez entrez le nombre de lignes", + "You must enter a number of rows": "Vous devez entrer le nombre de lignes", "You must enter a number of columns": "Vous devez entrer le nombre de colonnes", - + // Insert Image "Insert Image": "Insérer une image", "Image URL:": "URL image", - "Enter the image URL here": "Entrer l'url de l'image ici", + "Enter the image URL here": "Entrer l'URL de l'image ici", "Preview": "Prévisualiser", "Preview the image in a new window": "Prévisualiser l'image dans une nouvelle fenêtre", - "Alternate text:": "Text alternatif", + "Alternate text:": "Texte alternatif", "For browsers that don't support images": "Pour les navigateurs qui ne supportent pas les images", "Positioning of this image": "Position de l'image", "Image Preview:": "Prévisualisation", - "You must enter the URL": "Vous devez entrer l'URL" + "You must enter the URL": "Vous devez entrer l'URL", + + // toolbar + "button_bold": "fr/bold.gif", + "button_underline": "fr/underline.gif", + "button_strikethrough": "fr/strikethrough.gif", + + // Editor Help + "Xinha Help": "Aide Xinha", + "Editor Help": "Aide de l'éditeur", + "Keyboard shortcuts": "Raccourcis clavier", + "The editor provides the following key combinations:": "L'éditeur fournit les combinaisons de touches suivantes :", + "ENTER": "ENTREE", + "new paragraph": "Nouveau paragraphe", + "SHIFT-ENTER": "SHIFT+ENTREE", + "insert linebreak": "Insère un saut de ligne", + "Set format to paragraph": "Applique le format paragraphe", + "Clean content pasted from Word": "Nettoyage du contenu copié depuis Word", + "Headings": "Titres", + "Close": "Fermer" }; \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/FindReplace/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/FullScreen/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/get-html.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/get-html.js,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/get-html.js 1 Jan 2006 23:28:22 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/GetHtml/get-html.js 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -194,7 +194,6 @@ HTMLArea.prototype._origOutwardHtml = HTMLArea.prototype.outwardHtml; HTMLArea.prototype.outwardHtml = function(html) { html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open("); - html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open("); - this._origOutwardHtml(html); + html = this._origOutwardHtml(html); return html; }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/config.inc.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/config.inc.php,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/config.inc.php 1 Jan 2006 23:28:23 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/config.inc.php 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -270,6 +270,7 @@ $IMConfig['tmp_prefix'] = '.editor_'; +$IMConfig['ViewMode'] = 'thumbs'; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/images.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/images.php,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/images.php 1 Jan 2006 23:28:23 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/images.php 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -56,6 +56,51 @@ global $relative; global $IMConfig; + switch($IMConfig['ViewMode']) + { + case 'details': + { + ?> + + + + + + $file) + { + ?> + + + + + + + +
NameFilesizeDimensions
+ + Trash + + Edit +
+ $file) { ?> @@ -72,7 +117,9 @@ $dir) { ?>
@@ -96,6 +154,10 @@
- +
+ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/GD.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/GD.php,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/GD.php 1 Jan 2006 23:28:23 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/GD.php 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -332,8 +332,8 @@ * It uses a bicubic interpolation algorithm to get far * better result. * - * @param $new_x int new width - * @param $new_y int new height + * @param int $new_x new width + * @param int $new_y new height * * @return true on success or pear error * @see PEAR::isError() @@ -437,9 +437,9 @@ /** * Save the image file * - * @param $filename string the name of the file to write to - * @param $quality int output DPI, default is 85 - * @param $types string define the output format, default + * @param string $filename the name of the file to write to + * @param int $quality output DPI, default is 85 + * @param string $types define the output format, default * is the current used format * * @return none Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php 1 Jan 2006 23:28:23 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/IM.php 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -182,9 +182,9 @@ /** * Save the image file * - * @param $filename string the name of the file to write to - * @param $quality quality image dpi, default=75 - * @param $type string (JPG,PNG...) + * @param string $filename the name of the file to write to + * @param quality $quality image dpi, default=75 + * @param string $type (JPG,PNG...) * * @return none */ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/NetPBM.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/NetPBM.php,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/NetPBM.php 1 Jan 2006 23:28:23 -0000 1.2.2.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/Classes/NetPBM.php 17 Feb 2006 21:19:25 -0000 1.2.2.2 @@ -205,7 +205,7 @@ /** * Save the image file * - * @param $filename string the name of the file to write to + * @param string $filename the name of the file to write to * @param string $type (jpeg,png...); * @param int $quality 75 * @return none Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/imagelist.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/imagelist.css,v diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/imagelist.css 2 Nov 2005 08:56:02 -0000 1.1.1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/imagelist.css 17 Feb 2006 21:19:25 -0000 1.1.1.1.2.1 @@ -39,4 +39,8 @@ .dir_holder a.dir img { border:none; -} \ No newline at end of file +} +.listview { width:100% } +.listview td, .listview th { text-align:left; font-size:small; } +.listview td.actions { text-align:right; } +.listview td.actions img { border:0px; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js 1 Jan 2006 23:28:23 -0000 1.2.2.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/images.js 17 Feb 2006 21:19:25 -0000 1.2.2.3 @@ -55,6 +55,9 @@ var obj = topDoc.getElementById('f_alt'); obj.value = alt; var obj = topDoc.getElementById('orginal_width'); obj.value = width; var obj = topDoc.getElementById('orginal_height'); obj.value = height; + // Set preview for the selected + topDoc.getElementById('f_preview').src = window.parent._backend_url + '__function=thumbs&img=' + filename; + update_selected(); } @@ -141,4 +144,4 @@ return false; } - addEvent(window, 'load', init); \ No newline at end of file + addEvent(window, 'load', init); Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js,v diff -u -r1.2.2.2 -r1.2.2.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 1 Jan 2006 23:28:23 -0000 1.2.2.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 17 Feb 2006 21:19:25 -0000 1.2.2.3 @@ -55,10 +55,23 @@ var param = window.dialogArguments; if (param) { - var image_src = param.f_url; var image_regex = new RegExp( '(https?://[^/]*)?' + base_url.replace(/\/$/, '') ); param.f_url = param.f_url.replace( image_regex, "" ); + // The image URL may reference one of the automatically resized images + // (when the user alters the dimensions in the picker), clean that up + // so it looks right and we get back to a normal f_url + var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); + var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); + var dreg = new RegExp('^(.*/)' + rd + '/' + rp + '_([0-9]+)x([0-9]+)_([^/]+)$'); + + if(dreg.test(param.f_url)) + { + param.f_url = RegExp.$1 + RegExp.$4; + param.f_width = RegExp.$2; + param.f_height = RegExp.$3; + } + for (var id in param) { if(id == 'f_align') continue; @@ -75,10 +88,7 @@ setAlign(param["f_align"]); // Locate to the correct directory - var rd = _resized_dir.replace(HTMLArea.RE_Specials, '\\$1'); - var rp = _resized_prefix.replace(HTMLArea.RE_Specials, '\\$1'); - var dreg = new RegExp('^(.*/)(?:'+rd+')?(?:'+rp+'_[0-9]+x[0-9]+_)?([^/]+)$'); - + var dreg = new RegExp('^(.*/)([^/]+)$'); if(dreg.test(param['f_url'])) { changeDir(RegExp.$1); @@ -92,12 +102,13 @@ } } } + document.getElementById('f_preview').src = _backend_url + '__function=thumbs&img=' + param.f_url; } document.getElementById("f_alt").focus(); // For some reason dialog is not shrinkwrapping correctly in IE so we have to explicitly size it for now. - if(HTMLArea.is_ie) window.resizeTo(600, 460); + // if(HTMLArea.is_ie) window.resizeTo(600, 460); }; @@ -316,4 +327,4 @@ }, null); } - addEvent(window, 'load', init); \ No newline at end of file + addEvent(window, 'load', init); Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ListType/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/lang/empty'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl,v diff -u -r1.1.2.4 -r1.1.2.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl 1 Jan 2006 23:28:25 -0000 1.1.2.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/OacsFs/popups/file-selector.tcl 17 Feb 2006 21:19:26 -0000 1.1.2.5 @@ -101,7 +101,7 @@ set upload_tmpfile [template::util::file::get_property tmp_filename $upload_file] set mime_type [template::util::file::get_property mime_type $upload_file] - if {$selector_type eq "image" && ![string match "image/*" $mime_type]} { + if {$selector_type eq "image" && ![string match image/* $mime_type]} { template::form::set_error upload_form upload_file \ [_ acs-templating.HTMLArea_SelectImageUploadNoImage] break @@ -249,7 +249,7 @@ set file_upload_name [fs::remove_special_file_system_characters \ -string $file_upload_name] - if { $content_size ne "" } { + if { ![empty_string_p $content_size] } { incr content_size_total $content_size } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html,v diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html 2 Nov 2005 08:56:28 -0000 1.1.1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/PasteText/popups/paste_text.html 17 Feb 2006 21:19:26 -0000 1.1.1.1.2.1 @@ -18,6 +18,7 @@ __dlg_init(); window.resizeTo(600, 450); var param = window.dialogArguments; + document.getElementById("SCREEN").focus(); } function onCancel() { @@ -32,12 +33,12 @@ - +
Paste as Plain Text
- + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/lang/fr.js,v diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/lang/fr.js 2 Nov 2005 08:56:29 -0000 1.1.1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/lang/fr.js 17 Feb 2006 21:19:27 -0000 1.1.1.1.2.1 @@ -28,16 +28,16 @@ "Left": "Gauche", "Margin": "Marge", "Middle": "Milieu", - "No rules": "Aucun règlement", - "No sides": "Aucun côtés", + "No rules": "Aucune règle", + "No sides": "Aucun côté", "None": "Aucun", "Padding": "Remplissage", "Please click into some cell": "Cliquer sur une cellule", "Right": "Droit", "Row Properties": "Propriétés de rangée", - "Rules will appear between all rows and columns": "Les règles vont apparaître entre les rangées et les cellules", - "Rules will appear between columns only": "Les règles vont apparaître entre les colonnes seulement", - "Rules will appear between rows only": "Les règles vont apparaître entre les rangées seulement", + "Rules will appear between all rows and columns": "Règles entre les rangées et les cellules", + "Rules will appear between columns only": "Règles entre les colonnes seulement", + "Rules will appear between rows only": "Règles entre les rangées seulement", "Rules": "Les règles", "Spacing and padding": "Espacement et remplissage", "Spacing": "Espacement", @@ -59,7 +59,7 @@ "Split row": "Diviser la rangée", "Table properties": "Propriétés de table", "Table Properties": "Propriétés de table", - "Text align": "Aligner le texte", + "Text align": "Alignement", "The bottom side only": "Côté du bas seulement", "The left-hand side only": "Côté gauche seulement", "The right and left sides only": "Côté gauche et droit seulement", @@ -68,11 +68,11 @@ "The top side only": "Côté haut seulement", "Top": "Haut", "Unset color": "Enlever la couleur", - "Vertical align": "Alignement vertical", + "Vertical align": "Vertical", "Width": "Longeur", - "HTMLArea cowardly refuses to delete the last cell in row.": "HTMLArea refuse de supprimer la dernière cellule de la rangée.", - "HTMLArea cowardly refuses to delete the last column in table.": "HTMLArea refuse de supprimer la dernière colonne de la table.", - "HTMLArea cowardly refuses to delete the last row in table.": "HTMLArea refuse de supprimer la dernière rangée de la table", - "percent": "pourcentage", + "HTMLArea cowardly refuses to delete the last cell in row.": "Il est impossible de supprimer la dernière cellule de la rangée.", + "HTMLArea cowardly refuses to delete the last column in table.": "Il est impossible de supprimer la dernière colonne de la table.", + "HTMLArea cowardly refuses to delete the last row in table.": "Il est impossible de supprimer la dernière rangée de la table", + "percent": "%", "pixels": "pixels" }; \ No newline at end of file Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/lang/ru.js'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js,v diff -u -r1.3.2.2 -r1.3.2.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 1 Jan 2006 23:28:26 -0000 1.3.2.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 17 Feb 2006 21:19:27 -0000 1.3.2.3 @@ -44,36 +44,29 @@ link.rel = "stylesheet"; head.appendChild(link); } - var body = document.body; - var body_height = 0; - if (typeof bottom == "undefined") { - var div = document.createElement("div"); - body.appendChild(div); - var pos = getAbsolutePos(div); - body_height = pos.y; - } else { - var pos = getAbsolutePos(bottom); - body_height = pos.y + bottom.offsetHeight; - } window.dialogArguments = opener.Dialog._arguments; - if (!document.all) { + + var body = document.body; + if (window.sizeToContent) { window.sizeToContent(); window.sizeToContent(); // for reasons beyond understanding, // only if we call it twice we get the // correct size. window.addEventListener("unload", __dlg_onclose, true); window.innerWidth = body.offsetWidth + 5; - window.innerHeight = body_height + 2; + window.innerHeight = body.scrollHeight + 2; // center on parent var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2; var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2; window.moveTo(x, y); } else { - // window.dialogHeight = body.offsetHeight + 50 + "px"; - // window.dialogWidth = body.offsetWidth + "px"; + var docElm = document.documentElement ? document.documentElement : null; + var body_height = body.scrollHeight; + window.resizeTo(body.offsetWidth, body_height); - var ch = body.clientHeight; - var cw = body.clientWidth; + var ch = docElm && docElm.clientHeight ? docElm.clientHeight : body.clientHeight; + var cw = docElm && docElm.clientWidth ? docElm.clientWidth : body.clientWidth; + window.resizeBy(body.offsetWidth - cw, body_height - ch); var W = body.offsetWidth; var H = 2 * body_height - ch; @@ -118,4 +111,4 @@ return false; } return true; -} \ No newline at end of file +}
Description: - + + +