diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index d783ee9c1..9fe9f87dc 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -278,7 +278,7 @@ button.text{border:0;overflow:visible;padding:0;margin:0;color:#33a;background:n /* Dashboard */ .dashboard{position:relative;float:none;width:auto;margin-left:-230px} .dashboard .portlet{float:left;width:48%;margin-right:1em} -.dashboard .portlet:nth-of-type(even){ float:left;width:49%;margin-right:0 } +.dashboard .portlet:nth-of-type(even){ float:left;width:49%;margin-right:0} .dashboard .portlet:nth-of-type(even){ float:right;width:49%;margin-right:0} /* Local Navigation */ .lnb{position:relative;float:left;width:200px;margin:1em 0 1em -230px;line-height:normal;zoom:1;display:inline} @@ -363,6 +363,9 @@ button.text{border:0;overflow:visible;padding:0;margin:0;color:#33a;background:n .siteMap .tgMap{position:absolute; top:12px; right:1em; padding:0 16px 0 0; line-height:16px; background:url(../img/iconArrow.gif) no-repeat right -126px} .siteMap.fold .tgMap{background-position:right -158px} .siteMap.fold .h2{border-bottom-color:#fff; border-radius:5px} +.siteMap .placeholder{background:#bbb} +.siteMap .draggable, +.siteMap .draggable .moveTo{background-color:#ddd} /* Button Area */ .btnArea{margin:1em 0;text-align:right;zoom:1} .btnArea:after{content:"";display:block;clear:both} diff --git a/modules/admin/tpl/js/sitemap.js b/modules/admin/tpl/js/sitemap.js index ea5c6177a..fc28e411e 100644 --- a/modules/admin/tpl/js/sitemap.js +++ b/modules/admin/tpl/js/sitemap.js @@ -1,43 +1,153 @@ /* NHN (developers@xpressengine.com) */ jQuery(function($){ +var + dragging = false, + $holder = $('
  • '); + $('form.siteMap') + .delegate('li:not(.placeholder)', { + 'mousedown.st' : function(event) { + var $this, $uls, $ul, width, height, offset, position, offsets, i, dropzone, wrapper=''; + + if($(event.target).is('a,input,label,textarea') || event.which != 1) return; + + dragging = true; + + $this = $(this); + height = $this.height(); + width = $this.width(); + $uls = $this.parentsUntil('.siteMap').filter('ul'); + $ul = $uls.eq(-1); + + $ul.css('position', 'relative'); + + position = {x:event.pageX, y:event.pageY}; + offset = getOffset(this, $ul.get(0)); + + $clone = $this.clone(true).attr('target', true); + + for(i=$uls.length-1; i; i--) { + $clone = $clone.wrap('