From e923a0cec71e7185f61da64fb7e9ec526d7b5f29 Mon Sep 17 00:00:00 2001 From: x2001corpet Date: Fri, 23 Mar 2007 22:54:55 +0000 Subject: [PATCH] fold/unfold wiki folders in admin/wiki git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1602 839d8a87-29fc-0310-9880-83ba4fa771e5 --- htdocs/images/k1.gif | Bin 0 -> 67 bytes modules/admin.php | 1 + templates/admin/wiki.tpl | 17 +++++++++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 htdocs/images/k1.gif diff --git a/htdocs/images/k1.gif b/htdocs/images/k1.gif new file mode 100644 index 0000000000000000000000000000000000000000..53978612f403df786435fa267bc94072f68ee112 GIT binary patch literal 67 zcmZ?wbhEHbjEB<5wG8q|kKzxvl1Cvxw{echangeTpl('admin/wiki.tpl'); + $page->addJsLink('jquery.js'); $page->assign('wiki_pages', $wiki_tree); $page->assign('perms_opts', $perms); } diff --git a/templates/admin/wiki.tpl b/templates/admin/wiki.tpl index 40bed60..9f10bed 100644 --- a/templates/admin/wiki.tpl +++ b/templates/admin/wiki.tpl @@ -35,6 +35,19 @@ } return false; } + function replie() { + var cat=$.trim($(this).parent().text().replace(/(.*)\([0-9]+\)/, "$1")); + $("tr[@id^=row/"+cat+"/]").hide(); + $(this).attr('src', 'images/k1.gif').unbind("click", replie).click(deplie); + } + function deplie(image) { + var cat=$.trim($(this).parent().text().replace(/(.*)\([0-9]+\)/, "$1")); + $("tr[@id^=row/"+cat+"/]").show(); + $(this).attr('src', 'images/k2.gif').unbind("click", deplie).click(replie); + } + $(document).ready(function() { + $("tr.pair img[@alt=-]").css("cursor","pointer").each(replie); + }); // --> {/literal} @@ -63,11 +76,11 @@ - - {$cat} {icon name=magnifier title="Changements récents"} + {$cat} ({$pages|@count}) {icon name=magnifier title="Changements récents"} {foreach from=$pages item=perm key=page name=pages} - + {if $smarty.foreach.pages.last} L -- 2.1.4