Reload the initPlaceholders code when expanding a cut tag.
Patch by allen.
diffs (47 lines):
diff -r ec87b4c21587 -r 9175155e222a htdocs/js/cuttag-ajax.js
--- a/htdocs/js/cuttag-ajax.js Tue Jun 29 09:58:02 2010 -0500
+++ b/htdocs/js/cuttag-ajax.js Tue Jun 29 11:03:29 2010 -0500
@@ -66,6 +66,7 @@ CutTagHandler = new Class(Object, {
$('img-' + this.identifier).title=expanded;
$("img-" + this.identifier).src= Site.imgprefix + "/expand.gif";
CutTagHandler.initLinks(replaceDiv);
+ LiveJournal.initPlaceholders(replaceDiv);
}
}
});
diff -r ec87b4c21587 -r 9175155e222a htdocs/js/livejournal.js
--- a/htdocs/js/livejournal.js Tue Jun 29 09:58:02 2010 -0500
+++ b/htdocs/js/livejournal.js Tue Jun 29 11:03:29 2010 -0500
@@ -43,7 +43,7 @@ LiveJournal.initPage = function () {
LiveJournal.pageLoaded = 1;
// set up various handlers for every page
- LiveJournal.initPlaceholders();
+ LiveJournal.initPagePlaceholders();
LiveJournal.initLabels();
LiveJournal.initInboxUpdate();
LiveJournal.initPolls();
@@ -109,8 +109,12 @@ LiveJournal.gotInboxUpdate = function (r
};
// Search for placeholders and initialize them
-LiveJournal.initPlaceholders = function () {
- var placeholders = DOM.getElementsByTagAndClassName(document, "img",
"LJ_Placeholder") || [];
+LiveJournal.initPagePlaceholders = function () {
+ LiveJournal.initPlaceholders(document);
+}
+
+LiveJournal.initPlaceholders = function (srcElement) {
+ var placeholders = DOM.getElementsByTagAndClassName(srcElement, "img",
"LJ_Placeholder") || [];
Array.prototype.forEach.call(placeholders, function (placeholder) {
var parent = DOM.getFirstAncestorByClassName(placeholder,
"LJ_Placeholder_Container", false);
@@ -190,7 +194,7 @@ var PollPages = {
};
LiveJournal.initPolls = function () {
- var pollLinks = DOM.getElementsByTagAndClassName(document, 'a',
"LJ_PollAnswerLink") || [];
+ var pollLinks = DOM.getElementsByTagAndClassName(document, 'a',
"LJ_PollAnswerLink") || [];
// attach click handlers to each answer link
Array.prototype.forEach.call(pollLinks, function (pollLink) {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog