rhymix/modules/menu/tpl/sitemap.html
2012-10-04 05:04:23 +00:00

1806 lines
64 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<load target="./css/themes/classic/style.css" />
<load target="./js/_lib/jquery.cookie.js" />
<load target="./js/_lib/jquery.hotkeys.js" />
<load target="./js/jquery.jstree.js" />
<load target="./js/jquery.scrollTo-1.4.2.js" />
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<div id="site">
<div class="col map" id="site_map">
<section class="mapi" id="siteMapTree">
<script id="tmpl_menuTree" type="text/x-jquery-tmpl">
<ul>
{{html Nodes}}
</ul>
</script>
<script id="tmpl_menuTreeNode" type="text/x-jquery-tmpl">
<li id="menu${MenuId}">
<a href="#" data-param='{ "sMenuId":"${MenuId}" }'>${MenuTitleWithHome}</a>
<!--span class="side">
<button type="button" class="addItem" data-admin-show="#add" data-param='{ "sMenuId":"${MenuId}" }'>메뉴추가</button>
<button type="button" class="showProp" data-param='{ "sMenuId":"${MenuId}" }'>속성편집</button>
</span-->
{{html SubTree}}
</li>
</script>
<script id="tmpl_menuSelector_menuTree" type="text/x-jquery-tmpl">
<ul>
{{html Nodes}}
</ul>
</script>
<script id="tmpl_menuSelector_menuTreeNode" type="text/x-jquery-tmpl">
<li>
<a href="#" class="_menuType_${MenuType}" data-param='{ "sMenuId":"${MenuId}", "sMenuUrl":"${MenuUrl}", "sMenuTitle":"${MenuTitle}" }'>${MenuTitle}</a>
{{html SubTree}}
</li>
</script>
</section>
<div class="x_btn-group">
<button type="button" class="x_btn x_btn-small x_btn-inverse _addSiteMap"><i class="x_icon-plus x_icon-white"></i> 사이트맵 추가</button>
</div>
</div>
<div class="col" id="propertiesRoot">
<section>
<h1><a href="#" target="_blank" class="title">{사이트맵 이름}</a></h1>
<ul class="nav">
<li><a href="#add" data-admin-show="#add">메뉴 추가 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" class="_edit_paste" disabled>붙여넣기</button></li>
<li><button class="_delSiteMap" type="button">삭제</button></li>
</ul>
</section>
<button type="button" class="x_close" data-admin-hide="#propertiesRoot">&times;</button>
</div>
<div class="col prop-general" id="properties">
<section>
<h1><a href="#" target="_blank" class="title">{메뉴 이름}</a></h1>
<ul>
<li><strong>메뉴 ID</strong>: <span class="url"></span></li>
<li><strong>메뉴 타입</strong>: <span class="module_type"></span></li>
<li class="add"><a href="#add" data-admin-show="#add">메뉴 추가 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" class="_edit_cut">잘라내기</button></li>
<li><button type="button" class="_edit_copy">복사</button></li>
<li><button type="button" class="_edit_paste" disabled>붙여넣기</button></li>
<li><a href="#menuRemoveConfirm" class="modalAnchor _deleteMenu">삭제</a></li>
<li class="homepage"><label style="padding:0 0 0 8px"><input type="checkbox" class="_chkUseAsHome"> 사이트 접속 시 기본 페이지로 사용</label></li>
<li class="default"><a href="#default" data-admin-show="#default">기본 설정 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#imgbtn" data-admin-show="#imgbtn">이미지 버튼 <i class="x_icon-circle-arrow-right"></i></a></li>
<li class="design"><a href="#design" data-admin-show="#design">디자인 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#auth" data-admin-show="#auth">권한 <i class="x_icon-circle-arrow-right"></i></a></li>
<li class="details"><a href="#details" data-admin-show="#details">상세 설정 <i class="x_icon-circle-arrow-right"></i></a></li>
</ul>
</section>
<button type="button" class="x_close" data-admin-hide="#properties">&times;</button>
</div>
<div class="col" id="add">
<section>
<h1>메뉴 추가</h1>
<ul class="nav _itemList">
<script id="tmpl_menuTypeItem" type="text/x-jquery-tmpl">
<li><a href="#add_menu" data-admin-show="#add_menu" data-param='{ "moduleName" : "${ModuleName}", "moduleTitle": "${ModuleTitle}" }'>${ModuleTitle} <i class="x_icon-circle-arrow-right"></i></a></li>
</script>
<li><a href="#add_menu" data-admin-show="#add_menu">위젯 페이지 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#add_menu" data-admin-show="#add_menu">게시판 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#add_menu" data-admin-show="#add_menu">URL 링크 <i class="x_icon-circle-arrow-right"></i></a></li>
</ul>
<div class="x_btn-group">
<a href="#download" class="x_btn x_btn-small x_btn-inverse" data-admin-show="#download"><i class="x_icon-plus x_icon-white"></i> 다른 메뉴타입 설치</a>
</div>
</section>
<button type="button" class="x_close" data-admin-hide="#add">&times;</button>
</div>
<div class="col url" id="add_menu">
<fieldset>
<h1 class="_title">URL 링크</h1>
<ul>
<li>
<div class="multilingual x_input-append">
<label for="menuName2">메뉴이름</label>
<input id="menuName2" class="_menuName" type="text" required style="width:179px">
<select title="사용 가능한 다국어 목록" style="width:192px">
<option>[다국어 새로 입력]</option>
<option>...1</option>
<option>...2</option>
</select>
<label class="x_muted x_add-on"><input type="checkbox"> 다국어 사용 <i class="x_icon-globe"></i></label>
</div>
<fieldset class="multilingual_item">
<input type="text" class="en" title="English"><br>
<input type="text" class="ko" title="한국어"><br>
<input type="text" class="jp" title="日本語"><br>
<input type="text" class="zh-CN" title="中文(中?)"><br>
<input type="text" class="zh-TW" title="中文(臺灣)"><br>
<input type="text" class="fr" title="Francais"><br>
<input type="text" class="de" title="Deutsch"><br>
<input type="text" class="ru" title="Русский"><br>
<input type="text" class="es" title="Espanol"><br>
<input type="text" class="tr" title="Turkce"><br>
<input type="text" class="vi" title="Ti?ng Vi?t"><br>
<input type="text" class="mn" title="Mongolian">
<p class="x_alert x_alert-info" style="width:169px">
지원하는 다국어 목록은 [<a href="{getUrl('','module','admin','act','dispAdminConfigGeneral')}">설정>일반</a>]에서 편집 가능
</p>
</fieldset>
</li>
<li class="typePage">
<label for="mid1">메뉴 아이디 <a href="#help_menuId" class="x_icon-question-sign" data-admin-toggle="#mid1_help">?</a></label>
<div id="mid1_help" class="x_alert x_alert-info" style="display:none;width:169px">
<button type="button" class="x_close" data-admin-hide="#mid1_help">×</button>
<p>페이지 URL로 사용. URL을 사용할 필요가 없다면 생략 가능. 메뉴 생성 후 [속성&gt;일반]에서 수정 가능.</p>
</div>
<input id="mid1" class="_mid" type="text" required placeholder="생략시 임의값 사용" />
</li>
<li class="typeUrl">
<div class="x_tabbable">
<ul class="x_nav x_nav-tabs">
<li class="x_active"><a href="#add_linkUrl">URL 링크</a></li>
<li><a href="#add_linkMenu">메뉴 링크</a></li>
</ul>
<div class="x_tab-content">
<div class="x_tab-pane x_active" id="add_linkUrl">
<input type="text" class="_linkUrl" required title="URL 링크" />
</div>
<div class="x_tab-pane" id="add_linkMenu">
<input type="text" class="_linkMenuTitle" required title="메뉴 링크" disabled placeholder="메뉴를 선택하면 자동 입력됨" />
<input type="hidden" class="_linkMenuSrl" required />
<div class="_menuSelector_menuTreeContainer clone">
</div>
</div>
</div>
</div>
</li>
</ul>
<div class="x_btn-group">
<button type="button" class="x_btn x_btn-small x_btn-primary _save">확인</button>
</div>
</fieldset>
<button type="button" class="x_close" data-admin-hide="#add_menu">&times;</button>
</div>
<div class="col download" id="download">
<section>
<h1>다른 메뉴타입설치</h1>
<div class="list">
<script id="tmpl_downloadableMenuTypeItem" type="text/x-jquery-tmpl">
<div class="item">
<img src="http://${ScreenShotURL}" alt="">
<h2>${MenuType}</h2>
<p>${MenuTypeDesc}</p>
<p>별점 ${Score}/${TotalVotes} <i>|</i> 최근 업데이트 ${LastUpdated} <i>|</i> 전체 다운로드 : ${TotalDownloads}</p>
<a href="#" class="x_icon-download-alt x_icon-white">설치</a>
</div>
</script>
</div>
<div class="x_pagination x_pagination-centered">
<ul>
<li class="x_disabled"><a href="#">&laquo;</a></li>
<li class="x_active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
</section>
<button type="button" class="x_close" data-admin-hide="#download">&times;</button>
</div>
<div class="col url" id="default">
<fieldset>
<h1>기본 설정</h1>
<ul>
<li>
<div class="multilingual x_input-append">
<label for="menuName">메뉴이름</label>
<input id="menuName" class="_menuName" type="text" required style="width:179px">
<select title="사용 가능한 다국어 목록" style="width:192px">
<option>[다국어 새로 입력]</option>
<option>...1</option>
<option>...2</option>
</select>
<label class="x_muted x_add-on"><input type="checkbox"> 다국어 사용 <i class="x_icon-globe"></i></label>
</div>
<fieldset class="multilingual_item">
<input type="text" class="en" title="English"><br>
<input type="text" class="ko" title="한국어"><br>
<input type="text" class="jp" title="日本語"><br>
<input type="text" class="zh-CN" title="中文(中?)"><br>
<input type="text" class="zh-TW" title="中文(臺灣)"><br>
<input type="text" class="fr" title="Francais"><br>
<input type="text" class="de" title="Deutsch"><br>
<input type="text" class="ru" title="Русский"><br>
<input type="text" class="es" title="Espanol"><br>
<input type="text" class="tr" title="Turkce"><br>
<input type="text" class="vi" title="Ti?ng Vi?t"><br>
<input type="text" class="mn" title="Mongolian">
<p class="x_alert x_alert-info" style="width:169px">
지원하는 다국어 목록은 [<a href="{getUrl('','module','admin','act','dispAdminConfigGeneral')}">설정>일반</a>]에서 편집 가능
</p>
</fieldset>
</li>
<li class="typePage">
<label for="mid2">메뉴 아이디 <a href="#help_menuId" class="x_icon-question-sign" data-admin-toggle="#mid2_help">?</a></label>
<div id="mid2_help" class="x_alert x_alert-info" style="display:none;width:169px">
<button type="button" class="x_close" data-admin-hide="#mid2_help">×</button>
<p>페이지 URL로 사용. URL을 사용할 필요가 없다면 생략 가능. 메뉴 생성 후 [속성&gt;일반]에서 수정 가능.</p>
</div>
<input type="text" id="mid2" class="_mid">
</li>
<li class="typeUrl">
<div class="x_tabbable">
<ul class="x_nav x_nav-tabs">
<li class="x_active"><a href="#fix_linkUrl">URL 링크</a></li>
<li><a href="#fix_linkMenu">메뉴 링크</a></li>
</ul>
<div class="x_tab-content">
<div class="x_tab-pane x_active" id="fix_linkUrl">
<input type="text" required title="URL 링크" />
</div>
<div class="x_tab-pane" id="fix_linkMenu">
<input type="text" required title="메뉴 링크" disabled placeholder="메뉴를 선택하면 자동 입력됨" />
</div>
</div>
</div>
</li>
<li style="padding-top:12px;margin-top:5px;border-top:1px solid #ddd">
<label><input type="checkbox" class="_newWindow" title="메뉴 클릭시 새 창으로 열기"> 메뉴 클릭시 새 창으로 열기</label>
</li>
<li>
<label><input type="checkbox" class="_leaveUnfolded" title="늘 펼쳐진 상태로 있게 합니다"> 늘 펼쳐진 상태로 있게 합니다</label>
</li>
</ul>
<div class="btnBoth">
<button type="reset" class="x_btn x_btn-small x_pull-left" data-admin-hide="#default">취소</button>
<button type="button" class="x_btn x_btn-small x_btn-primary x_pull-right _save">확인</button>
</div>
</fieldset>
<button type="button" class="x_close" data-admin-hide="#default">&times;</button>
</div>
<div class="col" id="imgbtn">
<fieldset>
<h1>이미지 버튼</h1>
<form action="">
<figure>
<figcaption>일반</figcaption>
<img src="http://static.naver.net/www/u/2010/0611/nmms_215646753.gif" alt="일반 버튼 이미지">
</figure>
<div class="btnBoth">
<button type="button" class="fileRemover x_btn x_btn-small x_pull-left">삭제</button>
<button type="button" class="fileTrigger x_btn x_btn-small x_btn-primary x_pull-right">변경</button>
<input type="file">
</div>
</form>
<form action="">
<figure>
<figcaption>마우스 오버</figcaption>
<p>이미지 없음</p>
<!--<img src="" alt="마우스 오버 버튼 이미지">-->
</figure>
<div class="btnBoth">
<button type="button" class="fileRemover x_btn x_btn-small x_pull-left">삭제</button>
<button type="button" class="fileTrigger x_btn x_btn-small x_btn-primary x_pull-right">이미지 올리기</button>
<input type="file">
</div>
</form>
<form action="">
<figure>
<figcaption>선택 됨</figcaption>
<p>이미지 없음</p>
<!--<img src="" alt="선택 됨 버튼 이미지">-->
</figure>
<div class="btnBoth">
<button type="button" class="fileRemover x_btn x_btn-small x_pull-left">삭제</button>
<button type="button" class="fileTrigger x_btn x_btn-small x_btn-primary x_pull-right">이미지 올리기</button>
<input type="file">
</div>
</form>
</fieldset>
<button type="button" class="x_close" data-admin-hide="#imgbtn">&times;</button>
</div>
<div class="col" id="design">
<fieldset>
<h1>디자인</h1>
<div class="x_tabbable">
<ul class="x_nav x_nav-tabs">
<li class="x_active"><a href="#pc">PC</a></li>
<li><a href="#mobile">모바일</a></li>
</ul>
<div class="x_tab-content">
<div class="x_tab-pane x_active" id="pc">
<img src="http://naradesign.net/photo/DSCN0687.JPG" alt="현재 설정된 PC 레이아웃">
<a href="#" target="_blank" class="x_icon-zoom-in" title="새창">크게 보기</a>
</div>
<div class="x_tab-pane" id="mobile">
<img src="http://naradesign.net/photo/DSCN0810.JPG" alt="현재 설정된 모바일 레이아웃">
<a href="#" target="_blank" class="x_icon-zoom-in" title="새창">크게 보기</a>
</div>
</div>
</div>
<ul class="nav">
<li><a href="#layout" data-admin-show="#layout">레이아웃 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#skin" data-admin-show="#skin">{게시판} <i class="x_icon-circle-arrow-right"></i></a></li>
</ul>
<div class="btnBoth">
<button type="reset" class="x_btn x_btn-small x_pull-left">취소</button>
<button type="button" class="x_btn x_btn-small x_btn-primary x_pull-right">저장</button>
</div>
</fieldset>
<button type="button" class="x_close" data-admin-hide="#design">&times;</button>
</div>
<div class="col theme" id="layout">
<form action="">
<h1>레이아웃</h1>
<label>
<input type="checkbox" checked title="사이트 기본 레이아웃 사용"> 사이트 기본 레이아웃 사용
<a href="#siteDefaultDesign" class="x_icon-share-alt">사이트 기본 레이아웃 설정</a>
</label>
<div class="list">
<h2>사용할 수 있는 레이아웃 목록</h2>
<ul>
<li>
<button type="button" class="item" title="클릭하면 레이아웃이 적용됩니다." onClick="alert('\'XE 소개\' 메뉴에 \'엔터프라이즈\' 레이아웃이 적용 됐습니다.')">
<img src="http://naradesign.net/photo/DSCN0687.JPG" alt="엔터프라이즈 레이아웃">
<i class="x_icon-ok"></i>
</button>
<ul>
<li><a href="#layoutSetup">설정 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#layoutHTML">HTML/CSS <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" onClick="alert('\'엔터프라이즈[2]\' 레이아웃이 생성 됐습니다.')">복사본 생성</button></li>
<li><button type="button" onClick="confirm('\'엔터프라이즈\' 레이아웃을 정말 삭제하시겠습니까? \'고급기능\'에서 다시 생성할 수 있습니다.')">삭제</button></li>
</ul>
</li>
<li>
<button type="button" class="item" title="클릭하면 레이아웃이 적용됩니다." onClick="alert('\'XE 소개\' 메뉴에 \'엔터프라이즈\' 레이아웃이 적용 됐습니다.')">
<img src="http://naradesign.net/photo/DSCN0687.JPG" alt="엔터프라이즈 레이아웃">
<i class="x_icon-ok"></i>
</button>
<ul>
<li><a href="#layoutSetup">설정 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#layoutHTML">HTML/CSS <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" onClick="alert('\'엔터프라이즈[2]\' 레이아웃이 생성 됐습니다.')">복사본 생성</button></li>
<li><button type="button" onClick="confirm('\'엔터프라이즈\' 레이아웃을 정말 삭제하시겠습니까? \'고급기능\'에서 다시 생성할 수 있습니다.')">삭제</button></li>
</ul>
</li>
</ul>
<div class="x_btn-group">
<a href="#downloadLayout" data-admin-show="#downloadLayout" class="x_btn x_btn-small x_btn-inverse x_pull-right"><i class="x_icon-plus x_icon-white"></i> 다른 레이아웃 설치</a>
</div>
</div>
</form>
<button type="button" class="x_close" data-admin-hide="#layout">&times;</button>
</div>
<div class="col download" id="downloadLayout">
<section>
<h1>다른 레이아웃 설치</h1>
<div class="list">
<script id="tmpl_downloadableMenuTypeItem" type="text/x-jquery-tmpl">
<div class="item">
<img src="http://www.xpressengine.com/files/attach/images/18322904/188/195/021/de5626ccf0bb28ca223fbbeabd891462.jpg" alt="">
<h2>${MenuType}</h2>
<p>${MenuTypeDesc}</p>
<p>별점 ${Score}/${TotalVotes} <i>|</i> 최근 업데이트 ${LastUpdated} <i>|</i> 전체 다운로드 : ${TotalDownloads}</p>
<a href="#" class="x_icon-download-alt x_icon-white">설치</a>
</div>
</script>
</div>
<div class="x_pagination x_pagination-centered">
<ul>
<li class="x_disabled"><a href="#">&laquo;</a></li>
<li class="x_active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
</section>
<button type="button" class="x_close" data-admin-hide="#downloadLayout">&times;</button>
</div>
<div class="col theme" id="skin">
<form action="">
<h1>스킨</h1>
<label>
<input type="checkbox" checked title="사이트 기본 스킨 사용"> 사이트 기본 스킨 사용
<a href="#siteDefaultDesign" class="x_icon-share-alt">사이트 기본 스킨 설정</a>
</label>
<div class="list">
<h2>사용할 수 있는 스킨 목록</h2>
<ul>
<li>
<button type="button" class="item" title="클릭하면 스킨이 적용됩니다." onClick="alert('\'XE 소개\' 메뉴에 \'엔터프라이즈\' 스킨이 적용 됐습니다.')">
<img src="http://naradesign.net/photo/DSCN0687.JPG" alt="엔터프라이즈 스킨">
<i class="x_icon-ok"></i>
</button>
<ul>
<li><a href="#skinSetup">설정 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" onClick="confirm('\'엔터프라이즈\' 스킨을 정말 삭제하시겠습니까? \'고급기능\'에서 다시 생성할 수 있습니다.')">삭제</button></li>
</ul>
</li>
<li>
<button type="button" class="item" title="클릭하면 스킨이 적용됩니다." onClick="alert('\'XE 소개\' 메뉴에 \'엔터프라이즈\' 스킨이 적용 됐습니다.')">
<img src="http://naradesign.net/photo/DSCN0687.JPG" alt="엔터프라이즈 스킨">
<i class="x_icon-ok"></i>
</button>
<ul>
<li><a href="#skinSetup">설정 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><button type="button" onClick="confirm('\'엔터프라이즈\' 스킨을 정말 삭제하시겠습니까? \'고급기능\'에서 다시 생성할 수 있습니다.')">삭제</button></li>
</ul>
</li>
</ul>
<div class="x_btn-group">
<a href="#downloadSkin" data-admin-show="#downloadSkin" class="x_btn x_btn-small x_btn-inverse x_pull-right"><i class="x_icon-plus x_icon-white"></i> 다른 스킨 설치</a>
</div>
</div>
</form>
<button type="button" class="x_close" data-admin-hide="#skin">&times;</button>
</div>
<div class="col download" id="downloadSkin">
<section>
<h1>다른 스킨 설치</h1>
<div class="list">
<script id="tmpl_downloadableMenuTypeItem" type="text/x-jquery-tmpl">
<div class="item">
<img src="http://www.xpressengine.com/files/attach/images/18322904/188/195/021/de5626ccf0bb28ca223fbbeabd891462.jpg" alt="">
<h2>${MenuType}</h2>
<p>${MenuTypeDesc}</p>
<p>별점 ${Score}/${TotalVotes} <i>|</i> 최근 업데이트 ${LastUpdated} <i>|</i> 전체 다운로드 : ${TotalDownloads}</p>
<a href="#" class="x_icon-download-alt x_icon-white">설치</a>
</div>
</script>
</div>
<div class="x_pagination x_pagination-centered">
<ul>
<li class="x_disabled"><a href="#">&laquo;</a></li>
<li class="x_active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li><a href="#">&raquo;</a></li>
</ul>
</div>
</section>
<button type="button" class="x_close" data-admin-hide="#downloadSkin">&times;</button>
</div>
<div class="col" id="auth">
<fieldset>
<h1>권한</h1>
<ul>
<li>
<label for="authMenu">메뉴 노출 대상</label>
<select id="authMenu">
<option value="all">모든 사용자</option>
<option value="loged">로그인 사용자</option>
<option value="selected">선택그룹 사용자</option>
</select>
<div class="selected x_hide">
<label><input type="checkbox" title="관리그룹"> 관리그룹</label>
<label><input type="checkbox" title="정회원"> 정회원</label>
<label><input type="checkbox" title="준회원"> 준회원</label>
</div>
</li>
<li>
<label for="displayMenu">글읽기</label>
<select id="displayMenu">
<option value="all">모든 사용자</option>
<option value="loged">로그인 사용자</option>
<option value="selected">선택그룹 사용자</option>
</select>
<div class="selected x_hide">
<label><input type="checkbox" title="관리그룹"> 관리그룹</label>
<label><input type="checkbox" title="정회원"> 정회원</label>
<label><input type="checkbox" title="준회원"> 준회원</label>
</div>
</li>
<li>
<label for="authWrite">글쓰기</label>
<select id="authWrite">
<option value="all">모든 사용자</option>
<option value="loged">로그인 사용자</option>
<option value="selected">선택그룹 사용자</option>
</select>
<div class="selected x_hide">
<label><input type="checkbox" title="관리그룹"> 관리그룹</label>
<label><input type="checkbox" title="정회원"> 정회원</label>
<label><input type="checkbox" title="준회원"> 준회원</label>
</div>
</li>
<li>
<label for="authReply">댓글쓰기</label>
<select id="authReply">
<option value="all">모든 사용자</option>
<option value="loged">로그인 사용자</option>
<option value="selected">선택그룹 사용자</option>
</select>
<div class="selected x_hide">
<label><input type="checkbox" title="관리그룹"> 관리그룹</label>
<label><input type="checkbox" title="정회원"> 정회원</label>
<label><input type="checkbox" title="준회원"> 준회원</label>
</div>
</li>
</ul>
<div class="x_btn-group">
<button type="button" class="x_btn x_btn-small x_btn-primary">확인</button>
</div>
</fieldset>
<button type="button" class="x_close" data-admin-hide="#auth">&times;</button>
</div>
<div class="col" id="details">
{상세설정}
<button type="button" class="x_close" data-admin-hide="#details">&times;</button>
</div>
<div class="col" id="html">
{HTML/CSS}
<button type="button" class="x_close" data-admin-hide="#html">&times;</button>
</div>
</div>
<form action="" class="x_modal" id="menuRemoveConfirm" style="width:600px;margin-left:-300px">
<div class="x_modal-header">
<h3>Do you want to remove this menu item?</h3>
</div>
<div class="x_modal-body">
<p><label><input type="checkbox"> 메뉴와 연결된 콘텐츠도 모두 삭제된다는 것을 이해하고 있습니다.</label></p>
</div>
<div class="x_modal-footer">
<button type="button" class="x_btn x_pull-left" data-hide="#menuRemoveConfirm">Cancel</button>
<span class="x_btn-group x_pull-right">
<button type="submit" class="x_btn x_btn-danger x_disabled">Delete</button>
</span>
</div>
</form>
<style>
/* Site */
.x>.body>.content{margin-bottom:0}
#site{position:relative;overflow-x:auto;overflow-y:hidden;white-space:nowrap;margin-top:10px}
#site .btnBoth,
#site .x_btn-group{text-align:right;padding:10px 0;margin:15px 0;border-top:1px solid #ccc}
#site .btnBoth:after{content:"";display:block;clear:both}
.col{display:inline-block;vertical-align:top;position:relative;white-space:normal;height:100%;min-width:220px;padding:10px 25px 10px 10px;margin:0 4px 0 0;overflow-y:auto;overflow-x:hidden;border:1px solid #ddd}
.col>*>h1{line-height:30px;font-size:16px;border-bottom:2px solid #666;margin:0;color:#333}
.col>*>ul{margin:0;padding:0;list-style:none}
.col>.x_close{position:absolute;top:0;right:0;width:32px;height:32px}
.col input[type="checkbox"],
.col input[type="radio"]{margin:0}
.col label{cursor:pointer}
/* .mapi * */
.mapi{margin:0 0 15px 0;min-width:200px;background-color:transparent !important}
.mapi ul{margin:0;padding:0;list-style:none}
.mapi li{padding:0 80px 0 0;white-space:nowrap;position:relative;line-height:30px;border-radius:3px;vertical-align:top}
.mapi li>ul{margin:0}
.mapi a{text-decoration:none}
.mapi>ul{padding:1px}
/* Root */
.mapi>ul>li{margin-top:30px;position:relative}
.mapi>ul>li:before{content:"";display:block;border-top:1px dashed #ccc;position:relative;top:-15px}
.mapi>ul>li:first-child{margin-top:0}
.mapi>ul>li:first-child:before{content:normal}
.mapi>ul>li>a{font-weight:bold}
.mapi>ul>li>ul{border-top:2px solid #666;margin-top:7px;padding-top:7px}
/* li>a */
.mapi li>a{border:0 !important;padding:0 8px !important;margin:0 60px 1px 0;border-radius:3px;position:relative;z-index:2;height:23px;line-height:23px;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
.mapi .x_icon-home{opacity:.5;filter:alpha(opacity=50)}
.mapi .jstree-hovered>.x_icon-home,
.mapi .jstree-clicked>.x_icon-home{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png);opacity:1;filter:alpha(opacity=100)}
/* li>.side */
.mapi .side{position:absolute;z-index:2;top:0;right:0;line-height:0}
.mapi .side>button{border:0;border-radius:3px;width:23px;height:23px;overflow:hidden;font-size:0;line-height:0;text-indent:24px;background:url({getUrl('')}common/img/glyphicons-halflings.png) no-repeat;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
.mapi .side>button.addItem{background-position:4px -91px}
.mapi .side>button.showProp{background-position:-428px 5px}
.mapi .side>button:hover,
.mapi .side>button:focus{background-color:#333;background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png)}
/* Plugin style override */
.mapi a>.jstree-icon{display:none}
/* Nav */
.col .nav li{border-bottom:1px solid #ddd;position:relative;white-space:nowrap}
.col .nav li:first-child{border-top:0}
.col .nav li>a,
.col .nav li>button{text-align:left;color:#000;background-color:transparent;border:0;display:block;padding:5px 15px 5px 8px;color:#333;text-decoration:none;background:#fff;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
.col .nav li>button{width:100%}
.col .nav li>a:hover,
.col .nav li>a:focus,
.col .nav li.active>a,
.col .nav li>button:hover,
.col .nav li>button:focus{background:#666;color:#fff}
.col .nav li>a>i{position:absolute;top:50%;right:5px;margin:-7px 0 0 0;opacity:.5;filter:alpha(opacity=50)}
.col .nav li>a:hover>i,
.col .nav li>a:focus>i,
.col .nav li.active>a>i{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png);background-repeat:no-repeat;opacity:1;filter:alpha(opacity=100)}
.col input[type="file"]{width:1px;height:1px;overflow:hidden;font-size:0;line-height:0;opacity:0;filter:alpha(opacity=0)}
/* Menu Type */
.col .typePage{display:none;border-top:1px solid #ddd;padding-top:8px;margin-top:8px}
.col .typeUrl{display:none;border-top:1px solid #ddd;margin-top:8px}
.col.page .typePage,
.col.url .typeUrl{display:block}
/* Menu Clone */
.col .clone{margin:0 0 15px 0}
.col .clone ul{margin:0 !important}
.col .clone li{list-style:none}
.col .clone li.x_disabled>a{color:#999;text-decoration:none;cursor:not-allowed}
.col .clone li.x_selected>a{color:#000;font-weight:bold;text-decoration:underline}
.col .clone ul ul{padding-left:15px}
.col .clone .root{margin-top:15px}
/* Download */
.download.col{max-width:600px}
.download .list{padding:1px 0;border-bottom:1px solid #ccc}
.download .item{border-top:1px solid #ddd;padding:1px 0 1px 95px;position:relative}
.download .item:first-child{border:0}
.download .item>img{position:absolute;top:15px;left:0;width:80px;height:80px}
.download h2{font-size:14px}
.download a.x_icon-download-alt{width:24px;height:24px;background-color:#94A55C;position:absolute;top:7px;right:0;border-radius:3px;background-position:-90px -19px}
.download a.x_icon-download-alt:hover,
.download a.x_icon-download-alt:focus{background-color:#333}
.download p>i{font-style:normal;color:#ccc}
/* Theme(layout|skin) */
.theme img{width:220px}
.theme label{margin:0;padding:8px 0;position:relative;border-bottom:1px solid #ddd}
.theme label>a{position:absolute;top:4px;right:0;width:24px;height:24px;border-radius:3px;background-position:-330px -91px;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
.theme label>a:hover,
.theme label>a:focus{background-color:#000;background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png)}
.theme h2{font-size:14px;border-bottom:1px solid #ddd;margin:0;padding:15px 0 8px 0}
.theme ul button{background-color:transparent;border:0;padding:0;margin:0;overflow:visible}
.theme ul{margin:0;padding:0;list-style:none}
.theme li{zoom:1}
.theme li:after{content:"";display:block;clear:both}
.theme .list>ul>li{height:146px;padding:8px 0 8px 230px;border-top:1px dashed #ddd;position:relative}
.theme .list>ul>li:first-child{border:0}
.theme .item{position:absolute;margin:0 -220px 0 0;left:0;top:8px}
.theme .item>i{display:none}
.theme .item:hover>i,
.theme .item:focus>i{display:block;position:absolute;bottom:0;right:0;background-color:#fff;width:24px;height:24px;opacity:.75;filter:alpha(opacity=75);background-position:-283px 5px}
.theme ul ul{white-space:nowrap}
.theme ul ul a>i{position:absolute;top:2px;right:2px}
.theme ul ul>li>*{display:block;text-align:left;position:relative;text-decoration:none;padding:0 24px 0 5px;border-radius:3px;color:#000;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
.theme ul ul>li>*:hover,
.theme ul ul>li>*:focus{background:#666;color:#fff}
.theme ul ul>li>a:hover>i,
.theme ul ul>li>a:focus>i{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png)}
.theme ul ul>li>button{width:100%}
/* Properties */
#properties ul{margin:8px 0 0 0;padding:0 0 8px 0;border-bottom:1px solid #ddd}
#properties li{position:relative;white-space:nowrap}
#properties li>strong{margin:0 0 0 8px}
#properties li>a,
#properties li>button{color:#000;position:relative;display:block;padding:0 8px;height:28px;line-height:28px;background-color:transparent;border:0;text-align:left;text-decoration:none;-webkit-transition:.3s;-moz-transition:.3s;-o-transition:.3s}
#properties li>a{padding:0 24px 0 8px}
#properties li.add{border:1px solid #ddd;border-left:0;border-right:0;margin-top:8px;margin-bottom:8px}
#properties li.default{margin:8px 0 0 0;padding-top:8px;border-top:1px solid #ddd}
#properties li.add>a{height:30px;line-height:30px}
#properties li.homepage{border-top:1px solid #ddd;padding-top:8px}
#properties li>button{width:100%}
#properties li>a:hover,
#properties li>button:hover,
#properties li>a:active,
#properties li>button:active,
#properties li>a:focus,
#properties li>button:focus,
#properties li.active>a{background-color:#666;color:#fff}
#properties li>*>i{position:absolute;top:50%;right:5px;margin:-7px 0 0 0;opacity:.5;filter:alpha(opacity=50)}
#properties li>*:hover>i,
#properties li>*:active>i,
#properties li>*:focus>i,
#properties li.active>*>i{background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png);opacity:1;filter:alpha(opacity=100)}
#properties.prop-shortcut li.homepage,
#properties.prop-shortcut li.design,
#properties.prop-shortcut li.details{display:none}
/* Add */
#add>*>.x_btn-group{border:0;padding:0}
/* Add Menu */
#add_menu ul{margin:15px 0}
/* Auth */
#auth ul{margin:15px 0}
#auth li{border-top:1px solid #ddd;margin:0 0 15px 0;padding:15px 0 0 0}
#auth li:first-child{border:0}
#auth label:first-child{font-weight:bold}
#auth select{padding:0;width:100%}
/* Default */
#default ul{margin:15px 0}
/* Image Button */
#imgbtn h1+form{padding:8px 0 0 0}
#imgbtn figure{margin:0}
#imgbtn figcaption{font-weight:bold}
#imgbtn p{margin:0}
#imgbtn .btnBoth{border-top:0;border-bottom:1px solid #ddd;margin-top:0;padding-bottom:28px}
/* Design */
#design ul{margin-top:8px}
#design .btnBoth{border:0;margin-top:0}
#design img{width:220px}
#design .x_tab-pane{position:relative}
#design .x_icon-zoom-in{position:absolute;right:0;bottom:0;width:24px;height:24px;background-color:#fff;opacity:.75;filter:alpha(opacity:75);background-position:-331px 5px}
#design .x_icon-zoom-in:after{content:normal}
#site_map li._isCut a{color:#aaa}
</style>
<!--[if IE 7]>
<script>
jQuery(function($){
// IE .col width bug fix
$('.col').each(function(){
var $this = $(this);
setTimeout(function(){
var childW = $this.children().width();
$this.width(childW);
},0);
});
});
</script>
<![endif]-->
<script>
//<![CDATA[
/*
시작 모듈 지정 module_srl이 아닌 page_srl로
메뉴 복사 API에서 menu_srl 제거
메뉴 타입 노출
복사한 메뉴 삭제되면 붙여넣기 비활성화
*/
jQuery._xeAdminVar = {};
function showMenuSelector($container){
var $ = jQuery;
var aMenuList = $._xeAdminVar.aMenuList;
$container.html(createTreeMarkup(aMenuList, 0, "menuSelector_menuTree", "menuSelector_menuTreeNode"));
// disable sitemap labels and shortcuts.
$container.find('._menuType_1, ._menuType_3').parent('li').addClass('x_disabled');
}
function onSiteMapReceived(htData){
var $ = jQuery;
var aMenuList = htData.menuList;
$._xeAdminVar.aMenuList = aMenuList;
$("#siteMapTree").html(createTreeMarkup(aMenuList, 0));
var sInitiallyOpen = [];
if($._xeAdminVar.bCut){
$._xeAdminVar.sCopySourceMenuSrl = null;
}
$("#siteMapTree")
.jstree({
// the `plugins` array allows you to configure the active plugins on this instance
"plugins" : ["themes","html_data","ui","crrm","hotkeys","contextmenu", "dnd"],
//"themes","json_data","ui","crrm","cookies","dnd","search","types","hotkeys","contextmenu"
// each plugin you have included can have its own config object
"crrm" : {
"move" : {
"check_move" : function (m) {
var p = this._get_parent(m.o);
// root is not draggable
if(p === -1) return false;
// a menu cann't be dragged to a root position
p = this._get_parent(m.np);
if(!p) return false;
return true;
}
}
},
"core" : { }
//"core" : { "initially_open" : [ "nhtml_1" ] }
// it makes sense to configure a plugin only if overriding the defaults
})
.bind("loaded.jstree", function (event, data) {
data.inst.open_all();
var sRenameId = $._xeAdminVar.sRenameOnload;
$._xeAdminVar.sRenameOnload = null;
var sSelectOnload = $._xeAdminVar.sSelectOnload;
$._xeAdminVar.sSelectOnload = null;
if(sRenameId){
console.log('renaming', sRenameId);
$("#siteMapTree").jstree("rename", $("#menu"+sRenameId));
}
if(sSelectOnload){
console.log('selecting', sSelectOnload);
$("#siteMapTree").jstree("select_node", $("#menu"+sSelectOnload));
}
})
.bind("rename_node.jstree", function(event, data){
console.log(1, event, data);
/*
var params = new Array();
params['menu_srl'] = '889';
params['title'] = "제목2";
exec_xml("menu","procMenuAdminUpdate", params, completeTmp)
*/
var sTitle = data.args[1];
var params = {};
//console.log(htNodeInfo[$._xeAdminVar.sSelectedMenuSrl]);
var htOldInfo = htNodeInfo[$._xeAdminVar.sSelectedMenuSrl];
if(htOldInfo.sText === sTitle) return;
params['title'] = sTitle;
params['menu_srl'] = $._xeAdminVar.sSelectedMenuSrl;
$.exec_json("menu.procMenuAdminUpdate", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
loadSiteMap();
return;
});
})
.bind("create_node.jstree", function (event, data) {
//console.log(data.args[2].data[0]);
var sTitle = data.args[2].data[0];
var params = {};
params['title'] = sTitle;
$.exec_json("menu.procMenuAdminInsert", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
$._xeAdminVar.sRenameOnload = htData.menu_srl;
$._xeAdminVar.sSelectedMenuSrl = htData.menu_srl;
loadSiteMap();
return;
/*
$(data.rslt.obj).attr("id", "menu"+htData.menu_srl);
$(data.rslt.obj).find('a').attr("data-param", '{ "sMenuId":"'+htData.menu_srl+'"}');
*/
});
})
.bind("select_node.jstree", function(event, data){
$("#siteMapTree input").blur();
//console.log($("#siteMapTree input"));
var sSelectedMenuSrl = data.rslt.obj.attr("id").replace("menu", "");
$._xeAdminVar.sSelectedMenuSrl = sSelectedMenuSrl;
showProp(sSelectedMenuSrl);
})
.bind("move_node.jstree", function(event, data){
console.log(event, data);
/*
._get_move ()
Returns the lastly prepared move. The returned object contains:
.o - the node being moved
.r - the reference node in the move
.ot - the origin tree instance
.rt - the reference tree instance
.p - the position to move to (may be a string - "last", "first", etc)
.cp - the calculated position to move to (always a number)
.np - the new parent
.oc - the original node (if there was a copy)
.cy - boolen indicating if the move was a copy
.cr - same as np, but if a root node is created this is -1
.op - the former parent
.or - the node that was previously in the position of the moved node
*/
var aMoveInfo = data.args[0];
var aSource = aMoveInfo.o;
var aTargetPosRef = aMoveInfo.r;
var sTargetPos = aMoveInfo.p;
var aNewParent = aMoveInfo.np;
console.log(aSource, aTargetPosRef, sTargetPos, aNewParent);
console.log(aSource[0], aTargetPosRef[0], sTargetPos, aNewParent[0]);
var aNode, htParentInfo, htTargetInfo, htData, sMenuSrl, sTargetSrl, sParentSrl, nIdx;
//htData = $.parseJSON($(htSource).attr('data-param');
console.log(sTargetPos);
sMenuSrl = aSource[0].id.replace("menu", "");
sParentSrl = aNewParent[0].id.replace("menu", "");
sTargetSrl = aTargetPosRef[0].id.replace("menu", "");
switch(sTargetPos){
case "after":
// use the values as-is
break;
case "before":
htTargetInfo = htNodeInfo[sTargetSrl];
htParentInfo = htNodeInfo[htTargetInfo.sParentSrl];
console.log(htParentInfo);
aNode = htParentInfo.aNode;
for(var i=0, nLen=aNode.length; i<nLen; i++){
console.log(aNode[i].sText, aNode[i].sNodeSrl, "->", sTargetSrl);
if(aNode[i].sNodeSrl == sTargetSrl){
console.log('found');
break;
}
}
console.log(999, i);
if(i === 0){
sTargetSrl = 0;
}else{
sTargetSrl = aNode[i - 1].sNodeSrl;
}
break;
case "first":
sTargetSrl = 0;
break;
case "last":
htParentInfo = htNodeInfo[sParentSrl];
console.log(222, htParentInfo, sParentSrl);
aNode = htParentInfo.aNode;
if(aNode.length == 0){
sTargetSrl = 0;
}else{
sTargetSrl = aNode[aNode.length - 1].sNodeSrl;
}
break;
default:
break;
}
//if(sParentSrl === sTargetSrl || sTargetPos === "first"){
//htNodeInfo
//
//aNode[i].sParentSrl
//sTargetSrl = ;
//sParentSrl = ;
console.log(sMenuSrl, sTargetSrl, sParentSrl);
var params = {};
params['mode'] = 'move';
// 위치를 이동 할 메뉴의 srl
params['target_srl'] = sMenuSrl;
// 어느 부모 밑으로 이동 할지
params['parent_srl'] = sParentSrl;
// parent_srl 하위의 어느 노드 뒤에 삽입 할지.
// 0: parent_srl 바로 밑에.
// 다른 값: 해당 srl을 가진 노드 밑에
params['source_srl'] = sTargetSrl;
//exec_xml("menu","procMenuAdminMoveItem", params, completeTmp);
$.exec_json("menu.procMenuAdminMoveItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select the newly created menu
//$._xeAdminVar.sSelectOnload = htData.menu_item_srl;
// select currently selected menu
$._xeAdminVar.sSelectOnload = sMenuSrl;
loadSiteMap();
});
});
$('#site_map').nextAll().hide();
}
var htNodeInfo = {};
// return html
function createTreeMarkup(aNode, sParentSrl, sMenuTree, sMenuTreeNode){
sMenuTree = sMenuTree || "menuTree";
sMenuTreeNode = sMenuTreeNode || "menuTreeNode";
var $ = jQuery;
if(aNode.length == 0){
return "";
}
var sActiveBtn, sNormalBtn, sHoverBtn, sExpand, sLink, aSubNodes, sNodeSrl, sOpenWindow, sParentSrl, nSelected, sText, sURL, sIsStartModule, aSubNode;
// 1: Sitemap node, 2: Menu node
var nNodeType;
var sResult = "";
for(var i=0, nLen=aNode.length; i<nLen; i++){
aNode[i].sParentSrl = sParentSrl;
// Only sitemap node has menuSrl
if(aNode[i].menuSrl){
nNodeType = 1;
}else{
nNodeType = 2;
}
var sTargetPanel;
switch(nNodeType){
/*
list: Array[1]
menuSrl: "59"
title: "welcome_menu"
*/
case 1:
sText = aNode[i].title;
sNodeSrl = aNode[i].menuSrl;
aSubNode = aNode[i].menuItems.list;
sTargetPanel = "#propertiesRoot";
break;
/*
active_btn: ""
expand: "N"
hover_btn: ""
href: ""
link: "menu1"
list: Array[1]
node_srl: "60"
normal_btn: ""
open_window: "N"
parent_srl: "0"
selected: 0
text: "menu1"
url: ""
is_start_module: 1 or true
*/
case 2:
sText = aNode[i].text;
sLink = aNode[i].link;
sURL = aNode[i].url;
sNodeSrl = aNode[i].node_srl;
sParentSrl = aNode[i].parent_srl;
sExpand = aNode[i].expand;
sOpenWindow = aNode[i].open_window;
nSelected = aNode[i].selected;
sActiveBtn = aNode[i].active_btn;
sNormalBtn = aNode[i].normal_btn;
sHoverBtn = aNode[i].hover_btn;
sIsStartModule = aNode[i].is_start_module;
aSubNode = aNode[i].list;
sTargetPanel = "#properties";
break;
default:
}
htNodeInfo[sNodeSrl] = aNode[i];
htNodeInfo[sNodeSrl].aNode = aSubNode || [];
htNodeInfo[sNodeSrl].nNodeType = nNodeType;
htNodeInfo[sNodeSrl].sNodeSrl = sNodeSrl;
htNodeInfo[sNodeSrl].sText = sText;
sSubTree = "";
if(aSubNode && aSubNode.length>0){
//sSubTree = createTreeMarkup(aSubNode, aNode[i], sMenuTree, sMenuTreeNode);
sSubTree = createTreeMarkup(aSubNode, sNodeSrl, sMenuTree, sMenuTreeNode);
}
/*
if(sMenuType === "shortcut"){
sText = sText + " ${s}";
}
*/
var sTextWithHome = sText;
if(sIsStartModule){
sTextWithHome = sTextWithHome + " ${h}";
}
sResult += $.tmpl( sMenuTreeNode, {MenuTitleWithHome:sTextWithHome,MenuTitle:sText,MenuId:sNodeSrl,MenuUrl:sURL,MenuType:nNodeType,SubTree:sSubTree,Target:sTargetPanel} ).get()[0].outerHTML.replace("${s}", "<i class='icon-share-alt'></i>").replace("${h}", "<i class='x_icon-home' title='Home Page'>[HOME]</i>");
}
return $.tmpl( sMenuTree, {Nodes:sResult} ).get()[0].outerHTML;
}
function showProp(sMenuId){
var $ = jQuery;
$._htMarkupActionParam = {sMenuId: sMenuId};
if(htNodeInfo[sMenuId].nNodeType === 1){
$("#propertiesRoot").show(null, null, null, {bOpeningProp: true});
}else{
$("#properties").show(null, null, null, {bOpeningProp: true});
}
}
function loadSiteMap(){
var $ = jQuery;
var params = {};
var response_tags = new Array('menuList');
params['menu_srl'] = 0;
$.exec_json("menu.getMenuAdminSiteMap", params, onSiteMapReceived);
}
function clearInputs($elm){
var $ = jQuery;
$elm.find('input').val("");
}
jQuery(function($){
var _hide = $.fn.hide;
$.fn.hide = function(speed, easing, callback, htOpt) {
$(this).trigger('hide', [htOpt]);
var sId = $(this).attr("id");
if($(this).hasClass("col")){
$(this).next().hide(speed, easing, callback, htOpt);
if(sId){
$(this).parent().find('a[href="#'+sId+'"]').parent('li.active').removeClass('active');
}
}
return _hide.apply(this, arguments);
}
var _show = $.fn.show;
$.fn.show = function(speed, easing, callback, htOpt) {
$(this).trigger('show', [htOpt]);
if($(this).hasClass("col")){
$(this).next().hide(speed, easing, callback, htOpt);
setTimeout(scrollToRight, 0);
//scrollToRight();
}
return _show.apply(this, arguments);
}
$.fn.prevUntilAnd = function(){
var $result = $.fn.prevUntil.apply(this, arguments);
var $match = ($result.length>0?$result.last():$(this)).prev();
if($match.length>0) $.merge($result, $match);
return $result;
}
// $('#site_map').nextAll().hide();
//$( "#tmpl_siteMap" ).template( "siteMap" );
$( "#tmpl_menuTree" ).template( "menuTree" );
$( "#tmpl_menuTreeNode" ).template( "menuTreeNode" );
$( "#tmpl_menuSelector_menuTree" ).template( "menuSelector_menuTree" );
$( "#tmpl_menuSelector_menuTreeNode" ).template( "menuSelector_menuTreeNode" );
loadSiteMap();
$.exec_json("menu.getMenuAdminInstalledMenuType", {}, function(htData){
$._xeAdminVar.htItemTypes = htData.menu_types;
console.log($._xeAdminVar.htItemTypes);
});
//$.jstree._themes = "PATH/TO/FOLDER/";
//$.jstree._themes = "/maserati/modules/menu/tpl/css/themes/";
$.jstree._themes = '{getUrl("")}/modules/menu/tpl/css/themes/';
// Prepare parms
$(document.body).on("click", ".x [data-param]", function(ev){
$._htMarkupActionParam = $.parseJSON($(this).attr('data-param'));
return false;
});
// TARGET toggle
$(document.body).on("click", ".x [data-admin-toggle]", function(ev){
$($(ev.srcElement).attr('data-admin-toggle')).toggle();
return false;
});
// TARGET show
$(document.body).on("click", ".x [data-admin-show]", function(ev){
var $anchor = $(this);
var $target = $($(this).attr('data-admin-show'));
showTargetClicked($anchor, $target);
});
function showTargetClicked($anchor, $target){
$anchor.parents('.col').next().hide();
// change selected status of the navigation li
if($anchor.find('i.x_icon-circle-arrow-right').length > 0){
$anchor.parent('li').addClass('active').siblings('li').removeClass('active');
}
$target.show();
}
// TARGET hide
$(document.body).on("click", ".x [data-admin-hide]", function(ev){
var $target = $($(ev.srcElement).attr('data-admin-hide'));
$target.hide();
});
$(document.body).on("click", ".x .showProp", function(ev){
var sMenuId = $._htMarkupActionParam.sMenuId;
$("#siteMapTree").jstree("deselect_all");
$("#siteMapTree").jstree("select_node", "#menu"+sMenuId);
});
$(document.body).on("click", '.clone a', function(){
if($(this).hasClass('_menuType_1')){
alert('no root plz');
return;
}
if($(this).hasClass('_menuType_3')){
alert('no shortcut plz');
return;
}
$(this).closest('.clone').prevAll('input._linkMenuTitle').val($._htMarkupActionParam.sMenuTitle);
//$(this).closest('.clone').prev('input[type="text"]').val($._htMarkupActionParam.sMenuTitle + " ["+$._htMarkupActionParam.sMenuUrl+"]");
$(this).closest('.clone').prev('input._linkMenuSrl').val($._htMarkupActionParam.sMenuId);
$(this).closest('.clone').find('li.x_selected').removeClass('x_selected');
$(this).closest('li').addClass('x_selected');
});
function scrollToRight(){
$('#site').scrollTo($('#site').width(), 0, {duration: 0 } );
}
// -----------------------------------------------------------------------------------------
$("#site_map ._addSiteMap").click(function(){
$("#siteMapTree").jstree("deselect_all");
$("#siteMapTree").jstree("create", null, "first", { data: "New Sitemap" }, null, true);
});
$('#propertiesRoot').bind("show", function(ev, htOpt){
$('#site_map').next().hide(null, null, null, htOpt);
var sMenuId = $._htMarkupActionParam.sMenuId;
var htInfo = htNodeInfo[sMenuId];
$(ev.target).find('.title').html(htInfo.sText);
});
$('#propertiesRoot').bind("hide", function(ev, htOpt){
if(htOpt && htOpt.bOpeningProp) return;
$("#siteMapTree").jstree("deselect_all");
});
$('#properties ._edit_cut').click(function(){
console.log(1, $._xeAdminVar.sSelectedMenuSrl);
$('._edit_paste').removeAttr('disabled');
$('#site_map li._isCut').removeClass('_isCut');
$._xeAdminVar.sCopySourceMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
$._xeAdminVar.bCut = true;
$('#menu'+$._xeAdminVar.sCopySourceMenuSrl).addClass('_isCut');
});
$('#properties ._edit_copy').click(function(){
console.log(2, $._xeAdminVar.sSelectedMenuSrl);
$('._edit_paste').removeAttr('disabled');
$('#site_map li._isCut').removeClass('_isCut');
$._xeAdminVar.sCopySourceMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
$._xeAdminVar.bCut = false;
});
$('._edit_paste').click(function(){
console.log($._xeAdminVar.sCopySourceMenuSrl);
if(!$._xeAdminVar.sCopySourceMenuSrl) return;
var params = {};
if($._xeAdminVar.bCut){
// can't paste into a child menu of the source menu
var sParentSrl = $._xeAdminVar.sSelectedMenuSrl;
do{
if(sParentSrl === $._xeAdminVar.sCopySourceMenuSrl){
alert('대상 메뉴가 원본 메뉴의 하위 메뉴 입니다.');
return;
}
sParentSrl = htNodeInfo[sParentSrl].sParentSrl;
}while(sParentSrl)
$('._edit_paste').attr('disabled', 'disabled');
params['mode'] = 'move';
// 위치를 이동 할 메뉴의 srl
params['target_srl'] = $._xeAdminVar.sCopySourceMenuSrl;
// 어느 부모 밑으로 이동 할지
params['parent_srl'] = $._xeAdminVar.sSelectedMenuSrl;
// parent_srl 하위의 어느 노드 뒤에 삽입 할지.
// 0: parent_srl 바로 밑에.
// 다른 값: 해당 srl을 가진 노드 밑에
params['source_srl'] = 0;
$.exec_json("menu.procMenuAdminMoveItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select currently selected menu
$._xeAdminVar.sSelectOnload = params['target_srl'];
loadSiteMap();
});
$._xeAdminVar.sCopySourceMenuSrl = null;
}else{
//params['menu_srl'] = '61';
params['parent_srl'] = $._xeAdminVar.sSelectedMenuSrl;
params['menu_item_srl'] = $._xeAdminVar.sCopySourceMenuSrl;
$.exec_json("menu.procMenuAdminCopyItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select currently selected menu
$._xeAdminVar.sSelectOnload = params['menu_item_srl'];
loadSiteMap();
});
}
});
$("._delSiteMap").click(function(){
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
var params = {};
params['menu_srl'] = sSelectedMenuSrl;
$.exec_json("menu.procMenuAdminDelete", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
loadSiteMap();
});
});
$('#properties').bind("show", function(ev, htOpt){
$('#site_map').next().hide(null, null, null, htOpt);
var sMenuId = $._htMarkupActionParam.sMenuId;
var htInfo = htNodeInfo[sMenuId];
$(ev.target).find('.title').html(htInfo.sText);
$(ev.target).find('.url').html(htInfo.url);
$(ev.target).find('.module_type').html('그런게 있음');
//$(ev.target).find('.module_type').html($._xeAdminVar.htItemTypes[htInfo.module_type].title);
// console.log(555,htInfo);
//
if(htInfo.is_start_module){
$(ev.target).find('._chkUseAsHome').attr('checked', 'checked').attr('disabled', 'disabled');
}else{
$(ev.target).find('._chkUseAsHome').removeAttr('disabled').removeAttr('checked');
}
});
$('#properties').bind("hide", function(ev, htOpt){
if(htOpt && htOpt.bOpeningProp) return;
$("#siteMapTree").jstree("deselect_all");
});
$('#properties ._chkUseAsHome').click(function(){
if($(this).attr('checked')){
var params = {};
// ;;; menuSrl이어야 함
//params['index_module_srl'] = $._xeAdminVar.sSelectedMenuSrl;
params['index_module_srl'] = htNodeInfo[$._xeAdminVar.sSelectedMenuSrl].module_srl;
$.exec_json("admin.procInstallAdminUpdateIndexModule", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select currently selected menu
$._xeAdminVar.sSelectOnload = $._xeAdminVar.sSelectedMenuSrl;
loadSiteMap();
});
}
});
$("#tmpl_menuTypeItem").template( "menuTypeItem" );
$('#add').bind("show", function(){
$.exec_json("menu.getMenuAdminInstalledMenuType", {}, function(htData){
console.log(htData);
var sResult = "";
$._xeAdminVar.htItemTypes = htData.menu_types;
var item;
var sModuleTitle;
for(var sModuleName in $._xeAdminVar.htItemTypes){
//item = htData.menu_types[i];
if(htData.hasOwnProperty(item)) continue;
item = $._xeAdminVar.htItemTypes[sModuleName];
sModuleTitle = item.title;
console.log(item);
sResult += $.tmpl( "menuTypeItem", {
ModuleName : sModuleName,
ModuleTitle : sModuleTitle
} ).get()[0].outerHTML;
}
sResult += '<li><a href="#add_menu" data-admin-show="#add_menu" data-param=\'{ "moduleName":"", "moduleTitle":"URL 링크" }\'>URL 링크 <i class="x_icon-circle-arrow-right"></i></a></li>';
$('#add ._itemList').html(sResult);
scrollToRight();
});
});
$('#add').bind("hide", function(){
});
$("#tmpl_downloadableMenuTypeItem").template( "downloadableMenuTypeItem" );
$('#download').bind("show", function(){
//index.php?act=getAutoinstallAdminMenuPackageList
$('#add').nextAll().hide();
var params = {};
params['menu_srl'] = 0;
$.exec_json("menu.getAutoinstallAdminMenuPackageList", params, function(htData){
var sResult = "";
var item;
for(var i=0, nLen=htData.item_list.length; i<nLen; i++){
item = htData.item_list[i];
sResult += $.tmpl( "downloadableMenuTypeItem", {
MenuType: item.title,
MenuTypeDesc: item.package_description,
ScreenShotURL: item.item_screenshot_url.replace(/^http:\/\//, ""),
Score: item.package_star,
TotalVotes: item.package_voted,
LastUpdated: item.item_regdate,
TotalDownloads: item.package_downloaded
} ).get()[0].outerHTML;
}
$('#download .list').html(sResult);
scrollToRight();
});
});
$('#download').bind("hide", function(){
});
$('#add_menu').bind("show", function(ev){
// ignore bubbled show events
if(this !== ev.target){
return;
}
$._xeAdminVar.sSelectedModuleName = $._htMarkupActionParam.moduleName;
$._xeAdminVar.sSelectedModuleTitle = $._htMarkupActionParam.moduleTitle;
$(this).find("._title").html($._xeAdminVar.sSelectedModuleTitle);
if($._xeAdminVar.sSelectedModuleName == ""){
$(this).removeClass("page");
$(this).addClass("url");
}else{
$(this).addClass("page");
$(this).removeClass("url");
}
//$('.mapi').clone().removeClass().removeAttr('id').addClass('clone').appendTo('#add_linkMenu, #fix_linkMenu').find('li').removeAttr('id').removeAttr('class').find('ins, .side').remove();
showMenuSelector($('._menuSelector_menuTreeContainer'));
});
$('#add_menu').bind("hide", function(ev){
if(this !== ev.target){
return;
}
clearInputs($('#add_menu'));
$('#add_menu .x_active ._linkUrl').val('http://');
});
$('#add_menu ._save').bind("click", function(){
var sMenuName = $('#add_menu ._menuName').val();
var sUrl = $('#add_menu ._mid').val();
var sTargetKey = "module_id";
var sSelectedModuleName = $._xeAdminVar.sSelectedModuleName;
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
console.log($._xeAdminVar, sSelectedModuleName, sSelectedMenuSrl, sMenuName, sUrl);
var isShortCut = "N";
var $labels;
// URL?
if($._xeAdminVar.sSelectedModuleName == ""){
isShortCut = "Y";
$labels = $('#add_menu .x_nav-tabs li');
for(var nSelectedTabIdx=0, nLen=$labels.length; nSelectedTabIdx<nLen; nSelectedTabIdx++){
if($($labels[nSelectedTabIdx]).hasClass("x_active")) break;
}
if(nSelectedTabIdx === 0){
sUrl = $('#add_menu .x_active ._linkUrl').val();
if(!sUrl || sUrl === "http://"){
alert('URL is required');
return;
}
if(!sUrl.match(/^http:\/\//)){
sUrl = "http://"+sUrl;
}
}else{
sUrl = $('#add_menu .x_active ._linkMenuSrl').val();
if(!sUrl){
alert("Target mid is required");
return;
}
}
sTargetKey = 'shortcut_target';
}
var params = {};
var response_tags = new Array('menu_item_srl');
params['ruleset'] = "insertMenuItem";
params['act'] = "procMenuAdminInsertItem";
params['menu_name_key'] = "";
params['menu_name'] = sMenuName;
params['module_type'] = sSelectedModuleName;
params['menu_open_window'] = "N";
params['menu_expand'] = "N";
params['is_shortcut'] = isShortCut;
params['parent_srl'] = sSelectedMenuSrl;
params[sTargetKey] = sUrl;
/*
Array
(
[error] => "0"
[message] => "등록했습니다."
[menu_item_srl] => "2"
)
*/
$.exec_json("menu.procMenuAdminInsertItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select the newly created menu
//$._xeAdminVar.sSelectOnload = htData.menu_item_srl;
// select currently selected menu
$._xeAdminVar.sSelectOnload = $._xeAdminVar.sSelectedMenuSrl;
loadSiteMap();
});
});
$('#default').bind("show", function(){
var htInfo = htNodeInfo[$._xeAdminVar.sSelectedMenuSrl];
console.log(htInfo);
$(this).find('#menuName').val(htInfo.sText);
$(this).find('#mid2').val(htInfo.url);
if(htInfo.open_window === "N"){
$(this).find('._newWindow').removeAttr("checked");
}else{
$(this).find('._newWindow').attr("checked", "checked");
}
if(htInfo.expand === "N"){
$(this).find('._leaveUnfolded').removeAttr("checked");
}else{
$(this).find('._leaveUnfolded').attr("checked", "checked");
}
});
$('#default').bind("hide", function(){
});
$('#default ._save').click(function(){
var sMenuName = $('#default ._menuName').val();
var sMID = $('#default ._mid').val();
var sNewWindow = $('#default ._newWindow').attr("checked")?"Y":"N";
var sLeaveUnfolded = $('#default ._leaveUnfolded').attr("checked")?"Y":"N";
var sSelectedModuleName = $._xeAdminVar.sSelectedModuleName;
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
//console.log(sMenuName, sMID, sNewWindow, sLeaveUnfolded);
//return;
console.log($._xeAdminVar, sSelectedModuleName, sSelectedMenuSrl, sMenuName, sMID, sNewWindow, sLeaveUnfolded);
/*
var isShortCut = "N";
// URL?
if($._xeAdminVar.sSelectedModuleName == ""){
isShortCut = "Y";
if(!sMID){
alert("target is required");
return;
}
}
*/
/*
var params = new Array();
var response_tags = new Array('menu_item_srl');
params['menu_item_srl'] = '918';
params['module_srl'] = '917';
params['menu_name'] = '테스트 제목';
params['url'] = 'boardboard';
params['menu_open_window'] = 'N';
params['menu_expand'] = 'N';
exec_xml("menu","procMenuAdminUpdateItem", params, completeTmp);
*/
var params = {};
params['menu_item_srl'] = sSelectedMenuSrl;
params['menu_name'] = sMenuName;
params['url'] = sMID;
params['menu_open_window'] = sNewWindow;
params['menu_expand'] = sLeaveUnfolded;
/*
Array
(
[error] => "0"
[message] => "등록했습니다."
[menu_item_srl] => "2"
)
*/
$.exec_json("menu.procMenuAdminUpdateItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select the newly created menu
//$._xeAdminVar.sSelectOnload = htData.menu_item_srl;
// select currently selected menu
$._xeAdminVar.sSelectOnload = $._xeAdminVar.sSelectedMenuSrl;
loadSiteMap();
});
});
$('._deleteMenu').click(function(){
var bDelete = confirm('메뉴를 삭제하면 콘텐츠도 삭제됩니다.\n정말 삭제하시겠습니까?');
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
var sParentSrl = htNodeInfo[sSelectedMenuSrl].parent_srl;
if(bDelete){
var params = {};
params['menu_item_srl'] = sSelectedMenuSrl;
$.exec_json("menu.procMenuAdminDeleteItem", params, function(htData){
console.log(htData);
if(htData.error !== 0){
alert(htData.message);
return;
}
// select the parent of the menu being deleted
$._xeAdminVar.sSelectOnload = sParentSrl;
loadSiteMap();
});
}
});
// $('#add_url').bind("show", function(){console.log('show');});
// $('#add_url').bind("hide", function(){console.log('hide');});
// Set #site height fix
$(window).resize(function(){
var wHeigh = $(window).height();
$('#site').height(wHeigh - 150).children('.col').height(wHeigh - 195);
}).resize();
// #linkMenu copy and set text to input
/*
setTimeout(function(){
$('.mapi').clone().removeClass().removeAttr('id').addClass('clone').appendTo('#add_linkMenu, #fix_linkMenu').find('li').removeAttr('id').removeAttr('class').find('ins, .side').remove();
$('.clone a').click(function(){
$(this).closest('.clone').prev('input[type="text"]').val($(this).text());
});
}, 1000);
*/
/*
$('.x_close[data-admin-hide]').click(function(){
var inactiveTarget = $(this).attr('data-admin-hide');
$navAnchor.each(function(){
var href = $(this).attr('href');
if(href == inactiveTarget){
$(this).parent('li').removeClass('active');
}
});
});
*/
// Auth
$('#auth select').change(function(){
var $this = $(this);
var $selected = $this.next('.selected');
if($this.find('>option:selected').val() == 'selected'){
$selected.show();
} else {
$selected.hide();
}
});
// File upload
$('.fileTrigger').click(function(){
$(this).next('input[type="file"]').click();
});
$('input[type="file"]').change(function(){
$(this).closest('form').submit();
});
$('.fileRemover').click(function(){
$(this).remove();
});
setTimeout(function(){
$('.fileRemover').each(function(){
var $this = $(this);
if($this.closest('form').find('>figure>img').length){
$this.show(); // Show remover
} else {
$this.hide(); // Hide remover
}
});
}, 1000);
// Theme(layout | skin) list toggle
$('.theme .list').each(function(){
var $this = $(this);
var $check = $this.prev('label').children('input:checkbox');
function toggleList(){
if($check.is(':checked')){
$this.hide();
} else {
$this.show();
}
}
$(window).load(toggleList);
$check.change(toggleList);
});
// Remove Menu Item Checkbox Toggle
var $mrc = $('#menuRemoveConfirm');
$mrc.find('input:checkbox').removeAttr('checked').change(function(){
var $this = $(this);
var $submit = $this.closest($mrc).find('[type="submit"]');
if($this.is(':checked')){
$submit.removeClass('x_disabled');
} else {
$submit.addClass('x_disabled');
}
});
});
//]]>
</script>