Sha256: 672481e56c1a1d93ac4db3f061af667bb9b7914b31c3cd156098cfba7a796b68
Contents?: true
Size: 1.09 KB
Versions: 16
Compression:
Stored size: 1.09 KB
Contents
$(function() { // Support for AJAX loaded modal window. // Focuses on first input textbox after it loads the window. $("[data-previewtoggle='modal']").on('click', function(e) { e.preventDefault(); var url = $(this).attr('href'); if (url.indexOf('#') == 0) { $(url).modal('open'); } else { $.get(url, function(data) { $('<div class="modal hide fade">' + data + '</div>').modal(); }).success(function() { $('input:text:visible:first').focus(); }); } }); $(".page-contents").sortable({ distance: 20, handle: ".handle", items: "tr.page_content", update: function() { $.ajax($(this).attr('data-reorder-href'), { data: $(this).sortable("serialize", { key: "order[]" }) }); } }); $(".page-list").sortable({ distance: 20, handle: ".handle", items: "> li.child", update: function() { $.ajax("/smithy/pages/order", { data: $(".page-list").sortable("serialize", { key: "order[]" }) // highlight on failure? // failure: function(xhr, status, error) {} }); } }); });
Version data entries
16 entries across 16 versions & 1 rubygems