Avatar

At bottom of reply form, show post being replied to (Technics)

by Micha ⌂, Saturday, November 03, 2012, 08:34 (4186 days ago) @ Auge

Hi,

Milo should be able to name the JavaScript function wich hides the message and how to disable this function (in this context).

The function is in posting.js (or rather in posting.min.js).

The old posting in the area is saved in an attribute quote of the textarea.

 /**
  * Initialisiert die Textarea
  * und setzt Funktionen zum Ermitteln 
  * des selektierten Textes
  */
 var initTextArea = function() {
  // Sichert den (alten) Text in der Area
  textarea.quote = "";
  if (document.getElementById("quote") && document.getElementById("quote").value == "true") {
   textarea.quote = textarea.value;
   textarea.value = "";
  }
 
  textarea.getQuote = function() {
   return textarea.quote.trim();
  }
 
  // Zitieren-Link einfuegen
  if (textarea.getQuote() != "" && document.getElementById("message")) {
   var labels = document.getElementById("message").getElementsByTagName("label");
   var label = null;
   for (var i=0; i<labels.length; i++) { 
    if (labels[i].className.search(/textarea/) != -1) {
     label = labels[i];
     break;
    }
   }
   if (label) {
    label.appendChild( document.createTextNode( String.fromCharCode(160) ) );
    var quoteLink = document.createElementWithAttributes("a", {"onclick": function(e) {textarea.value = textarea.getQuote() + "\r\n\r\n" + textarea.value; this.style.display = "none"; textarea.focus(); return false;}, "id": "insert-quote", "href": window.location.href, "title": lang["quote_title"] }, label);
    quoteLink.appendChild( document.createTextNode(lang["quote_label"]) );
   }
  }
//....

cu Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences


Complete thread:

 RSS Feed of thread