mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 12:19:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8723 201d5d3c-b55e-5fd7-737f-ddc643e51545
72 lines
1.7 KiB
JavaScript
72 lines
1.7 KiB
JavaScript
/* NHN (developers@xpressengine.com) */
|
|
jQuery(function($){
|
|
|
|
$('form.siteMap')
|
|
.find('li')
|
|
.prepend('<button type="button" class="moveTo">Move to</button>')
|
|
.append('<span class="vr"></span><span class="hr"></span>')
|
|
.mouseover(function(){
|
|
$(this).addClass('active');
|
|
return false;
|
|
})
|
|
.mouseout(function(){
|
|
$(this).removeClass('active');
|
|
return false;
|
|
})
|
|
.mousedown(function(event){
|
|
var $this, $clone, $target = $(event.target), $uls, $ghost, $last;
|
|
|
|
if($target.is('a,input:text,textarea')) return;
|
|
|
|
$this = $(this);
|
|
$clone = $this.clone(true).find('.side,input').remove().end();
|
|
$uls = $this.parentsUntil('form.siteMap').filter('ul');
|
|
|
|
$ghost = $last = $('<ul class="lined" />');
|
|
for(var i=1,c=$uls.length; i < c; i++) {
|
|
$last = $last.append('<li><ul /></li>').find('>ul');
|
|
}
|
|
|
|
$last.append($clone);
|
|
$ghost
|
|
.css({
|
|
backgroundColor : '#fff',
|
|
position : 'absolute',
|
|
opacity : .5
|
|
});
|
|
|
|
return false;
|
|
})
|
|
.find('input:text')
|
|
.each(function(i,input){
|
|
var $this = $(this), id='sitemap-id-'+i;
|
|
|
|
$this
|
|
.attr('id', id)
|
|
.css({width:0,opacity:0,overflow:'hidden'})
|
|
.before('<label />')
|
|
.prev('label')
|
|
.attr('for', id)
|
|
.text($this.val());
|
|
})
|
|
.end()
|
|
.end()
|
|
|
|
$('<div id="dropzone-marker" />')
|
|
.css({display:'none',position:'absolute',backgroundColor:'#000',opacity:0.7})
|
|
.appendTo('body');
|
|
|
|
/*
|
|
$('.tgMap').click(function(){
|
|
var t = $(this);
|
|
t.parent('.siteMap').toggleClass('fold');
|
|
if(t.parent('.siteMap').hasClass('fold')){
|
|
t.text('펼치기').next('.lined').slideUp(200).next('.btnArea').hide();
|
|
} else {
|
|
t.text('접기').next('.lined').slideDown(200).next('.btnArea').show();
|
|
}
|
|
return false;
|
|
});
|
|
*/
|
|
|
|
});
|