$(document).ready(function(){ $("#sortable_list").sortable({ handle: '.handle', update: function() { var order = $('#sortable_list').sortable('serialize'); // Changing categories positions in the database $.ajax({ EOT; $body .= "url: \"" . $CONFIG->wwwroot . "mod/koolielu/actions/process_sortable.php\","; $body .= <<wwwroot . "mod/koolielu/actions/process_sortable.php\","; $body .= << EOT; // main categories $main_categories = get_koolielu_main_categories(); /*translation:Categories*/ $listing = "". elgg_echo("koolielu:categories") ."
"; if (is_array($main_categories)) { #$listing = "
Waiting for update
"; $listing .= ""; } /*translation:New category*/ $listing .= "". elgg_echo("koolielu:new_category") .""; // subcategories $subcategories = get_koolielu_subcategories(); /*translation:Subcategories*/ $listing2 = "".elgg_echo("koolielu:subcategories") ."
"; if (is_array($subcategories)) { $listing2 .= ""; } /*translation:New category*/ $listing2 .= "". elgg_echo("koolielu:new_category") .""; $table = ""; $table .= ""; $table .= ""; $table .= ""; $table .= "
"; $table .= $listing; $table .= ""; $table .= elgg_view('koolielu/forms/add_category'); $table .= "
"; $body .= $table; // Display main admin menu /*translation:Koolielu management*/ page_draw(elgg_echo('koolielu:koolielu_management'),elgg_view_layout("two_column_left_sidebar", '', $title . $body)); ?>