From 92f006849d3118a0e4613820d6aca85060510d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Thu, 24 Mar 2016 10:26:25 +0100 Subject: [PATCH] Issue #223 - Replaced javascript code with "jquery". --- e107_admin/fileinspector.php | 88 +++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/e107_admin/fileinspector.php b/e107_admin/fileinspector.php index 6b970bf13..c506fbdcb 100644 --- a/e107_admin/fileinspector.php +++ b/e107_admin/fileinspector.php @@ -61,7 +61,8 @@ if(isset($_GET['scan'])) echo " - Results + Results + ".$fi->headerCss()." ".headerjs()." \n"; @@ -903,12 +904,39 @@ class file_inspector { $icon = $this->iconTag[$dir_icon]; + $tp = e107::getParser(); + + $imgBlank = $tp->toImage('{e_IMAGE}fileinspector/blank.png', array( + 'alt' => '', + 'legacy' => '{e_IMAGE}fileinspector/', + 'w' => 9, + 'h' => 9, + 'class' => 'c', + )); + + $imgExpand = $tp->toImage('{e_IMAGE}fileinspector/expand.png', array( + 'alt' => '', + 'legacy' => '{e_IMAGE}fileinspector/', + 'w' => 15, + 'class' => 'e', + 'id' => 'e_' . $dir_id, + )); + + $imgContract = $tp->toImage('{e_IMAGE}fileinspector/contract.png', array( + 'alt' => '', + 'legacy' => '{e_IMAGE}fileinspector/', + 'w' => 15, + 'class' => 'e', + 'id' => 'e_' . $dir_id, + )); + $hide = ($last_expand && $dir_icon != 'folder_core') ? "" : "style='display: none'"; - $text = "
getDiz($dir_icon)."\" style='margin-left: ".($level * 8)."px'>"; - $text .= $tree_end ? "" : ""; - $text .= " ".$icon." ".$directory.""; - $text .= $tree_end ? "" : "
".$sub_text."
"; - $text .= "
"; + + $text = '
'; + $text .= $tree_end ? $imgBlank : '' . ($hide ? $imgExpand : $imgContract) . ''; + $text .= ' ' . $icon . ' ' . $directory . ''; + $text .= $tree_end ? '' : '
' . $sub_text . '
'; + $text .= '
'; $this -> files[$dir_id]['.']['icon'] = $dir_icon; @@ -1555,40 +1583,28 @@ function e_help() require_once(e_ADMIN.'footer.php'); -function headerjs() { -global $e107; -$text = " +'; + + $text .= "