
$(function() {
	if($('#sortable').length != 0){
		$( "#sortable" ).sortable({
			items: "tr:not(.tr-state-disabled)",
								update: function( event, ui ) {
									if( ajaxs = $(this).attr("data-ajax")){
										var order = $(this).sortable('serialize');
										console.log(order);
										$.post( ajaxs, order, function( data ) {
											if( data.status != 'ok' ){
												alert("Не записано!!");
											}
										},"json");
									}
								}
		});
	}
});
