Update of /cvsroot/phpwiki/phpwiki/lib/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11507
Modified Files:
AddComment.php CreateToc.php
Log Message:
jshide button
Index: AddComment.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/AddComment.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -2 -b -p -d -r1.3 -r1.4
--- AddComment.php 14 Mar 2004 16:26:21 -0000 1.3
+++ AddComment.php 14 Mar 2004 20:30:21 -0000 1.4
@@ -88,4 +88,24 @@ extends WikiPlugin_WikiBlog
// for new comments
$html = HTML();
+ if ($args['jshide']) {
+ $div = HTML::div(array('id'=>'comments','style'=>'display:none;'));
+ //$list->setAttr('style','display:none;');
+ $div->pushContent(Javascript("
+function togglecomments() {
+ comments=document.getElementById('comments');
+ if (comments.style.display=='none') {
+ comments.style.display='block';
+ } else {
+ comments.style.display='none';
+ }
+}"));
+ $html->pushContent(HTML::h4(HTML::a(array('name'=>'comment-header',
+ 'class'=>'wikiaction',
+ 'title'=>_("Click to
display"),
+
'onclick'=>"togglecomments()"),
+ _("Comments"))));
+ } else {
+ $div = HTML::div(array('id'=>'comments'));
+ }
foreach (explode(',', $args['mode']) as $show) {
if (!empty($seen[$show]))
@@ -94,8 +114,12 @@ extends WikiPlugin_WikiBlog
switch ($show) {
case 'show':
- $html->pushContent($this->showAll($request, $args, 'comment'));
+ $show = $this->showAll($request, $args, 'comment');
+ //if ($args['jshide']) $show->setAttr('style','display:none;');
+ $div->pushContent($show);
break;
case 'add':
- $html->pushContent($this->showForm($request, $args,
'addcomment'));
+ $add = $this->showForm($request, $args, 'addcomment');
+ //if ($args['jshide']) $add->setAttr('style','display:none;');
+ $div->pushContent($add);
break;
default:
@@ -103,4 +127,5 @@ extends WikiPlugin_WikiBlog
}
}
+ $html->pushContent($div);
return $html;
}
@@ -109,4 +134,7 @@ extends WikiPlugin_WikiBlog
// $Log$
+// Revision 1.4 2004/03/14 20:30:21 rurban
+// jshide button
+//
// Revision 1.3 2004/03/14 16:26:21 rurban
// copyright line
Index: CreateToc.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/CreateToc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -2 -b -p -d -r1.9 -r1.10
--- CreateToc.php 9 Mar 2004 19:24:20 -0000 1.9
+++ CreateToc.php 14 Mar 2004 20:30:21 -0000 1.10
@@ -197,5 +197,6 @@ function toggletoc() {
}
}"));
-
$html->pushContent(HTML::h2(HTML::a(array('name'=>'TOC','class'=>'gridbutton',
+ $html->pushContent(HTML::h4(HTML::a(array('name'=>'TOC',
+ 'class'=>'wikiaction',
'title'=>_("Click to
display"),
'onclick'=>"toggletoc()"),
@@ -213,4 +214,7 @@ function toggletoc() {
// $Log$
+// Revision 1.10 2004/03/14 20:30:21 rurban
+// jshide button
+//
// Revision 1.9 2004/03/09 19:24:20 rurban
// custom indentstr
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
|