mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
하위 카테고리 앞에 깊이만큼 '-'를 추가해서 깊이 표시 (이전에는 <option>에 패딩을 주는 코드였으나 동작하지 않아 현재와 같이 변경) git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7348 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3cc9af3d7d
commit
c58b936e4f
1 changed files with 4 additions and 1 deletions
|
|
@ -46,6 +46,9 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
|
|||
var categories = ret_obj['categories'];
|
||||
if(!categories) return;
|
||||
|
||||
var depth_str = '-';
|
||||
for(var i=0; i < 5; i++) depth_str += depth_str;
|
||||
|
||||
var category_list = categories.split("\n");
|
||||
for(var i=0;i<category_list.length;i++) {
|
||||
var item = category_list[i];
|
||||
|
|
@ -60,8 +63,8 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
|
|||
var category_title = item.substr(pos+1,item.length);
|
||||
if(!category_srl || !category_title) continue;
|
||||
|
||||
if (depth > 0) category_title = depth_str.substr(0, depth) + ' ' + category_title;
|
||||
var opt = new Option(category_title, category_srl, false, false);
|
||||
if(depth>0) opt.style.paddingLeft = (depth*15)+'px';
|
||||
obj.options[obj.options.length] = opt;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue