summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2011-07-11 22:17:27 +0200
committerAdrian Lang <mail@adrianlang.de>2011-07-11 23:03:28 +0200
commita1dee2b998bc3dc8436bb076435d405ec412e054 (patch)
treed1c7609b4085ac6f2be349b1a478f939eea8771a /lib/exe
parent2d57e114e1b33b0965a48b2838ec5dd38888c3b6 (diff)
downloadrpg-a1dee2b998bc3dc8436bb076435d405ec412e054.tar.gz
rpg-a1dee2b998bc3dc8436bb076435d405ec412e054.tar.bz2
Fix some bugs and glitches in (mediamanager) tree
* Fix selector in subtree loading callback * Remove HTML inconsistencies between AJAX and plain PHP lists * Unify icon and CSS class switching in dw_tree and dw_mediamanager
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/ajax.php18
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 1056a05f8..2bfa3680c 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -192,12 +192,10 @@ function ajax_medians(){
$data = array();
search($data,$conf['mediadir'],'search_index',array('nofiles' => true),$dir);
- foreach($data as $item){
- $item['level'] = $lvl+1;
- echo media_nstree_li($item);
- echo media_nstree_item($item);
- echo '</li>';
+ foreach(array_keys($data) as $item){
+ $data[$item]['level'] = $lvl+1;
}
+ echo html_buildlist($data, 'idx', 'media_nstree_item', 'media_nstree_li');
}
/**
@@ -229,14 +227,10 @@ function ajax_index(){
$data = array();
search($data,$conf['datadir'],'search_index',array('ns' => $ns),$dir);
- foreach($data as $item){
- $item['level'] = $lvl+1;
- echo html_li_index($item);
- echo '<div class="li">';
- echo html_list_index($item);
- echo '</div>';
- echo '</li>';
+ foreach(array_keys($data) as $item){
+ $data[$item]['level'] = $lvl+1;
}
+ echo html_buildlist($data, 'idx', 'html_list_index', 'html_li_index');
}
/**