/* * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved. * * http://www.lockon.co.jp/ */ var IMG_FOLDER_CLOSE = "../../img/admin/contents/folder_close.gif"; // フォルダクローズ時画像 var IMG_FOLDER_OPEN = "../../img/admin/contents/folder_open.gif"; // フォルダオープン時画像 var IMG_PLUS = "../../img/admin/contents/plus.gif"; // プラスライン var IMG_MINUS = "../../img/admin/contents/minus.gif"; // マイナスライン var IMG_NORMAL = "../../img/admin/contents/space.gif"; // スペース var tree = ""; // 生成HTML格納 var count = 0; // ループカウンタ var arrTreeStatus = new Array(); // ツリー状態保持 var old_select_id = ''; // 前回選択していたファイル // ツリー表示 function fnTreeView(view_id, arrTree, openFolder) { for(i = 0; i < arrTree.length; i++) { id = arrTree[i][0]; level = arrTree[i][3]; if(i == 0) { old_id = "0"; old_level = 0; } else { old_id = arrTree[i-1][0]; old_level = arrTree[i-1][3]; } // 階層上へ戻る if(level <= (old_level - 1)) { tmp_level = old_level - level; for(up_roop = 0; up_roop <= tmp_level; up_roop++) { tree += ''; } } // 同一階層で次のフォルダへ if(id != old_id && level == old_level) tree += ''; // 階層の分だけスペースを入れる for(space_cnt = 0; space_cnt < arrTree[i][3]; space_cnt++) { tree += " "; } // 階層画像の表示・非表示処理 if(arrTree[i][4]) { if(arrTree[i][1] == '_parent') { rank_img = IMG_MINUS; } else { rank_img = IMG_NORMAL; } // 開き状態を保持 arrTreeStatus.push(arrTree[i][2]); display = 'block'; } else { if(arrTree[i][1] == '_parent') { rank_img = IMG_PLUS; } else { rank_img = IMG_NORMAL; } display = 'none'; } arrFileSplit = arrTree[i][2].split("/"); file_name = arrFileSplit[arrFileSplit.length-1]; // フォルダの画像を選択 if(arrTree[i][2] == openFolder) { folder_img = IMG_FOLDER_OPEN; file_name = "