yanaframework.net Forum Index yanaframework.net
Yana Framework Developer's Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log inLog in 

Formatierungsfragen Gästebuch

 
Post new topic   Reply to topic    yanaframework.net Forum Index -> Deutsches Forum
View previous topic :: View next topic  
Author Message
lehmi



Joined: 05 Jun 2010
Posts: 1

PostPosted: Sat 05 Jun, 2010 09:10    Post subject: Formatierungsfragen Gästebuch Reply with quote

Hallo

Ich habe zwei Fragen zur Formatierung des Gästebuches:

1. Wenn man im Gästebuch auf zurückliegende Seiten blättert, öffnet sich dort automatisch das Feld "Neuer Eintrag". Kann man dieses Öffnen abschalten?

2. Datum/Uhrzeit eines Gästebucheintrages werden nur auf der ersten Seite angezeigt. Kann man dies für Alle einschalten?

Danke.
Back to top
View user's profile Send private message
admin
Administrator


Joined: 16 Jan 2007
Posts: 87

PostPosted: Wed 09 Jun, 2010 06:46    Post subject: Reply with quote

Das ist ein Bug.

Ich habe das Problem behoben. Die korrigierte Version steht bereits zum Download bereit. Einfach noch mal downloaden, dann geht's.
Back to top
View user's profile Send private message
admin
Administrator


Joined: 16 Jan 2007
Posts: 87

PostPosted: Sun 18 Jul, 2010 15:04    Post subject: Reply with quote

FYI: die JQuery-Core Komponente, welche Ajax-Requests behandelt, hat den gleichen Bug.
Wer das beheben muss/möchte, der muss vor Absenden eines AJAX-Requests die Funktion document.write durch eine eigene überschreiben.

Diese Funktion sollte den Rückgabewert in eine temporäre Variable schreiben. Anschließend ersetzt man die Java-Script Tags in der Serverantwort durch den Rückgabewert der Funktion document.write.

In Yana habe ich das bereits erledigt.

JQuery hingegen führt zwar das JavaScript aus, lässt document.write aber unangetastet und zerstört dabei eventuell das gesamte Seitenlayout. Also: Vorsicht mit document.write() falls ihr die aktuelle Version von JQuery ohne Yana verwendet.
Back to top
View user's profile Send private message
admin
Administrator


Joined: 16 Jan 2007
Posts: 87

PostPosted: Mon 19 Jul, 2010 00:06    Post subject: Reply with quote

Für diejenigen, welche ihre Programme selbst patchen wollen/müssen, so haben wir das Problem gelöst:

function loadHTML($node, $html) {
$node.innerHTML = $html;
if ($html.match(/<script[^>]*?>/)) { // handle javascript
var documentText = "";
document.write = function(text) {
documentText += text;
}
var matches = false;
do {
if (matches) {
func = new Function(matches[3]);
func.call();
$node.innerHTML = matches[1] + documentText + matches[4];
documentText = "";
} // end if
matches = $node.innerHTML.match(/^([\s\S]*?)<script( [^>]*)?>(.*)<\/script>([\s\S]*)/i);
} while (matches)
} // end if
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    yanaframework.net Forum Index -> Deutsches Forum All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Contact the Forum's Administrator


Powered by phpBB © 2001, 2005 phpBB Group