Sha256: a1de2d5a0a5824cbccea29ebaac72fdef6f299e23f12ed93cc8c58d283e6c41d
Contents?: true
Size: 939 Bytes
Versions: 14
Compression:
Stored size: 939 Bytes
Contents
$(document).ready(function() { $('#import-steps').smartupdater({ url : $('#import-steps').attr('data-url'), dataType: 'json', minTimeout: 100 }, function(data) { var steps = ['site', 'content_types', 'assets', 'asset_collections', 'snippets', 'pages']; var currentIndex = data.step == 'done' ? steps.length - 1 : steps.indexOf(data.step); for (var i = 0; i < steps.length; i++) { var state = null; if (i <= currentIndex) state = 'done'; if (i == currentIndex + 1 && data.failed) state = 'failed'; if (state != null) $('#import-steps li:eq(' + i + ')').addClass(state); } if (data.step == 'done') $.growl('notice', $('#import-steps').attr('data-success-message')); if (data.failed) $.growl('alert', $('#import-steps').attr('data-failure-message')); if (data.step == 'done' || data.failed) $('#import-steps').smartupdaterStop(); }); });
Version data entries
14 entries across 14 versions & 1 rubygems