// CKEditor $(function () { if($('#js-news-content').length != 0){ CKEDITOR.replace('js-news-content', { 'filebrowserBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files', 'filebrowserImageBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=images', 'filebrowserFlashBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=flash', 'filebrowserUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=files', 'filebrowserImageUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=images', 'filebrowserFlashUploadUrl': '/components/admin/ckeditor/kcfinder/upload.php?type=flash', 'filebrowserAudioBrowseUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files', 'filebrowserlightboxUploadUrl': '/components/admin/ckeditor/kcfinder/browse.php?type=files', 'height': 400 }); } }); $(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"); } } }); } });