Issue 2398: add buttons

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11256 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-09-16 09:30:15 +00:00
parent 065ffd3967
commit 99b998b1f9

View file

@ -1,3 +1,5 @@
<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" />
@ -10,40 +12,73 @@
</div>
<div id="site">
<div class="col map">
<div id="mydemo" class="demo" style="height:500px;">
<div id="mydemo" class="demo" style="height:500px;">
<ul>
<li id="nhtml_1">
<a href="#">기본 사이트맵1</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
<ul>
<li id="nhtml_1">
<a href="#">기본 사이트맵1</a>
<ul>
<li id="nhtml_1_1">
<a href="#">메뉴 1-1</a>
</li>
<li id="nhtml_1_2">
<a href="#">메뉴 1-2</a>
<ul>
<li id="nhtml_1_2_1">
<a href="#">메뉴 1-2-1</a>
</li>
<li id="nhtml_1_2_2">
<a href="#">메뉴 1-2-2</a>
</li>
</ul>
</li>
</ul>
<li id="nhtml_1_1">
<a href="#">메뉴 1-1</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
</li>
<li id="nhtml_2">
<a href="#">이벤트2</a>
<li id="nhtml_1_2">
<a href="#">메뉴 1-2</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
<ul>
<li id="nhtml_2_1">
<a href="#">메뉴 2-1</a>
<li id="nhtml_1_2_1">
<a href="#">메뉴 1-2-1</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
</li>
<li id="nhtml_2_2">
<a href="#">메뉴 2-2</a>
<li id="nhtml_1_2_2">
<a href="#">메뉴 1-2-2</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
</li>
</ul>
</li>
</ul>
</div>
</li>
<li id="nhtml_2">
<a href="#">이벤트2</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
<ul>
<li id="nhtml_2_1">
<a href="#">메뉴 2-1</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
</li>
<li id="nhtml_2_2">
<a href="#">메뉴 2-2</a>
<span class="side">
<button data-toggle="#add">메뉴추가</button>
<button data-toggle="#info">속성편집</button>
</span>
</li>
</ul>
</li>
</ul>
</div>
<section class="mapi">
<ul>
@ -387,16 +422,15 @@
<section>
<h1>메뉴 추가</h1>
<ul>
<li><a href="#pageDoc">문서 페이지 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#pageWidget">위젯 페이지 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#board">게시판 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#url">URL 링크 <i class="x_icon-circle-arrow-right"></i></a></li>
<li><a href="#pageDoc">문서 페이지</a></li>
<li><a href="#pageWidget">위젯 페이지</a></li>
<li><a href="#board">게시판</a></li>
<li><a href="#url">URL 링크</a></li>
</ul>
<div class="x_btn-group" style="margin:0;padding:10px 0;border-top:1px solid #ccc;text-align:right">
<a href="#downPageModule" class="x_btn x_btn-small x_btn-inverse"><i class="x_icon-plus x_icon-white"></i> 다른 메뉴 유형 설치</a>
<a type="button" class="x_btn x_btn-small x_btn-inverse"><i class="x_icon-plus x_icon-white"></i> 다른 메뉴유형 설치</a>
</div>
</section>
<button type="button" class="x_close" data-close="#add">&times;</button>
</div>
</div>
<style>
@ -406,7 +440,6 @@
.col:first-child{border:0;padding-left:0}
.col>section>h1{ line-height:30px;font-size:16px;border-bottom:2px solid #666;margin:0;color:#333}
.col>section>ul{ margin:0;padding:0;list-style:none}
.col>.x_close{ position:absolute;top:0;right:10px; width:24px;height:24px}
/* .mapi * */
.mapi{margin:0 0 15px 0;min-width:200px}
.mapi ul{margin:0;padding:0;list-style:none}
@ -465,14 +498,8 @@
.mapi .root>ul ul{display:none}
.mapi .root>ul li.open>ul{display:block}
/* Add */
#add li{ border-top:1px solid #ddd;position:relative;white-space:nowrap}
#add li:first-child{ border-top:0}
#add li>a{ display:block;padding:6px 15px 6px 8px;color:#333;text-decoration:none;background:#fff; -webkit-transition:.3s}
#add li>a:hover,
#add li>a:focus{ background:#666; color:#fff}
#add li>a>i{ position:absolute;top:7px; right:5px;opacity:.5;filter:alpha(opacity=50)}
#add li>a:hover>i,
#add li>a:focus>i{ background-image:url({getUrl('')}common/img/glyphicons-halflings-white.png); background-repeat:no-repeat;opacity:1;filter:alpha(opacity=100)}
#add.col>section>ul>li{ border-top:1px dotted #ccc;padding:7px 0}
#add.col>section>ul>li:first-child{ border-top:0}
</style>
<!--[if IE 7]>
@ -493,9 +520,7 @@ jQuery(function($){
//<![CDATA[
jQuery(function($){
//$.jstree._themes = "PATH/TO/FOLDER/";
//$.jstree._themes = "/maserati/modules/menu/tpl/css/themes/";
$.jstree._themes = '{getUrl("")}/modules/menu/tpl/css/themes/';
$.jstree._themes = "/maserati/modules/menu/tpl/css/themes/";
// TO CREATE AN INSTANCE
// select the tree container using jQuery
@ -515,6 +540,10 @@ jQuery(function($){
// so listen for `function_name`.`jstree` - you can function names from the docs
.bind("loaded.jstree", function (event, data) {
// you get two params - event & data - check the core docs for a detailed description
})
.bind("create_node.jstree", function (event, data) {
var btns = $("<span>").addClass("side").html('<button data-toggle="#add">메뉴추가</button> <button data-toggle="#info">속성편집</button>');
data.rslt.obj.append(btns);
});
// Set #site height fix