2010-05-25 00:32:12 +00:00
|
|
|
$(document).ready(function() {
|
2010-07-23 20:20:09 +00:00
|
|
|
var updateContentsOrder = function() {
|
|
|
|
var lists = $('ul#contents-list.sortable');
|
|
|
|
var ids = jQuery.map(lists, function(list) {
|
|
|
|
return(jQuery.map($(list).sortable('toArray'), function(el) {
|
|
|
|
return el.match(/content-(\w+)/)[1];
|
|
|
|
}).join(','));
|
|
|
|
}).join(',');
|
|
|
|
$('#order').val(ids || '');
|
|
|
|
}
|
2010-05-25 00:32:12 +00:00
|
|
|
|
2010-07-23 20:20:09 +00:00
|
|
|
$('ul#contents-list.sortable').sortable({
|
|
|
|
handle: 'em',
|
|
|
|
items: 'li.content',
|
|
|
|
stop: function(event, ui) { updateContentsOrder(); }
|
|
|
|
});
|
|
|
|
|
|
|
|
$('textarea.html').tinymce(TinyMceDefaultSettings);
|
|
|
|
|
|
|
|
$.datepicker.setDefaults($.datepicker.regional[I18nLocale]);
|
|
|
|
$('input[type=text].date').datepicker($.datepicker.regional[I18nLocale]);
|
|
|
|
});
|