Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
60eafe02
Commit
60eafe02
authored
18 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add expand/collapse all links and self-referencing link goodness.
parent
0074a469
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/root/blogs/blog_item.xjs
+44
-11
44 additions, 11 deletions
web/root/blogs/blog_item.xjs
with
44 additions
and
11 deletions
web/root/blogs/blog_item.xjs
+
44
−
11
View file @
60eafe02
...
...
@@ -7,24 +7,39 @@ load(cwd+"/blog_config.js");
<title>
The Blogifier!
</title>
<script>
<!--
function
toggle_display
(
itemID
,
buttonID
)
function
expand_item
(
itemID
,
buttonID
)
{
var
item
=
document
.
getElementById
(
itemID
);
var
button
=
document
.
getElementById
(
buttonID
);
if
(
item
.
style
.
display
!=
"
none
"
)
{
item
.
style
.
display
=
"
none
"
;
button
.
src
=
"
<?xjs write(http_request.virtual_path)?>plus.gif
"
;
}
else
{
item
.
style
.
display
=
"
block
"
;
button
.
src
=
"
<?xjs write(http_request.virtual_path)?>minus.gif
"
;
}
item
.
style
.
display
=
"
block
"
;
button
.
src
=
"
<?xjs write(http_request.virtual_path)?>minus.gif
"
;
}
function
collapse_item
(
itemID
,
buttonID
)
{
var
item
=
document
.
getElementById
(
itemID
);
var
button
=
document
.
getElementById
(
buttonID
);
item
.
style
.
display
=
"
none
"
;
button
.
src
=
"
<?xjs write(http_request.virtual_path)?>plus.gif
"
;
}
function
toggle_display
(
itemID
,
buttonID
)
{
var
item
=
document
.
getElementById
(
itemID
);
if
(
item
.
style
.
display
!=
"
none
"
)
collapse_item
(
itemID
,
buttonID
);
else
expand_item
(
itemID
,
buttonID
);
}
//-->
</script>
</head>
<body>
<body
onLoad=
"document.getElementById('ToggleAll').style.visibility = 'visible';"
>
<p>
Welcome to the
<?xjs write(msgbase.cfg.name); ?>
Blogifier for
<?xjs write(poster); ?>
...
...
@@ -32,6 +47,9 @@ function toggle_display(itemID, buttonID)
<?xjs
var expand_all_source='';
var collapse_all_source='';
function not_found_error(reason)
{
http_reply.status="404 Not Found";
...
...
@@ -76,6 +94,7 @@ body=body.split(" ").join("<br>");
<p>
<?xjs write(body); ?>
</p>
<hr>
<p><div
id=
"ToggleAll"
style=
"visibility: hidden"
><a
name=
"collapse"
href=
"#collapse"
onClick=
"collapse_all()"
>
Collapse All
</a>
/
<a
name=
"expand"
href=
"#expand"
onClick=
"expand_all()"
>
Expand All
</a></div></p>
<?xjs
// "Comments"
...
...
@@ -112,10 +131,13 @@ while(1) {
//body=body.split(" ").join("</p><p>");
//body=body.split(" ").join(" ");
body=body.split(" ").join("<br>");
expand_all_source += "expand_item('msg-"+msgid+"','button-"+msgid+"');";
collapse_all_source += "collapse_item('msg-"+msgid+"','button-"+msgid+"');";
?>
<div
style=
"padding-left: <?xjs write(thread_depth*indent_pixels) ?>px"
>
<a
onClick=
"toggle_display('msg-<?xjs write(msgid)?>','button-<?xjs write(msgid) ?>');"
><img
src=
"<?xjs write(http_request.virtual_path) ?>plus.gif"
id=
"button-<?xjs write(msgid); ?>"
></a>
<b>
<?xjs write(hdr.subject); ?>
</b>
(
<?xjs write(date); ?>
)
<br>
<a
name=
"lnk-<?xjs write(msgid) ?>"
href=
"#lnk-<?xjs write(msgid)?>"
onClick=
"toggle_display('msg-<?xjs write(msgid)?>','button-<?xjs write(msgid) ?>');"
><img
border=
"0"
src=
"<?xjs write(http_request.virtual_path) ?>plus.gif"
id=
"button-<?xjs write(msgid); ?>"
></a>
<b>
<?xjs write(hdr.subject); ?>
</b>
(
<?xjs write(date); ?>
)
<br>
By:
<i>
<?xjs write(hdr.from); ?>
</i><br>
<div
id=
"msg-<?xjs write(msgid) ?>"
style=
"display: none"
>
<?xjs write(body); ?>
<hr>
...
...
@@ -126,5 +148,16 @@ By: <i><?xjs write(hdr.from); ?></i><br>
}
?>
<script>
function
collapse_all
()
{
<
?
xjs
write
(
collapse_all_source
)?
>
}
function
expand_all
()
{
<
?
xjs
write
(
expand_all_source
)?
>
}
</script>
</body>
</html>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment