Created
November 2, 2012 12:30
-
-
Save almaron/4001049 to your computer and use it in GitHub Desktop.
script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
$(document).ready(function() { | |
$('#sortable').nestedSortable({ | |
forcePlaceholderSize: true, | |
placeholder: 'placeholder', | |
items: 'li', | |
tolerance: 'pointer', | |
revert: 250, | |
tabSize: 25, | |
toleranceElement: '> div', | |
helper: 'clone', | |
isTree: true, | |
expandOnHover: 700, | |
startCollapsed: true, | |
rootID: null | |
}); | |
$('.form_header').click(function() { | |
$(this).toggleClass('form_head_active'); | |
return $(this).next('.form_div').slideToggle(300).toggleClass('form_div_active'); | |
}); | |
return $('#page_save').click(function() { | |
var serial; | |
serial = $('#sortable').nestedSortable('serialize'); | |
$('.page_save_span').fadeToggle(100); | |
return $.get('/pages.js', { | |
'hash': serial | |
}, function(data) { | |
$.globalEval(data); | |
return $('.page_save_span').fadeToggle(100); | |
}); | |
}); | |
}); | |
}).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment