X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/362ea2e7f8ac4254398791139cc060090199f400..5d3f4483d48655682297aa3c945c997633ea45d2:/wolnelektury/static/sponsors/js/footer_admin.js diff --git a/wolnelektury/static/sponsors/js/footer_admin.js b/wolnelektury/static/sponsors/js/footer_admin.js index 2f2cd93da..33c794a3d 100644 --- a/wolnelektury/static/sponsors/js/footer_admin.js +++ b/wolnelektury/static/sponsors/js/footer_admin.js @@ -4,12 +4,12 @@ sponsors: [] }; $.extend(settings, options); - + var input = $(this).hide(); - + var container = $('
').appendTo(input.parent()); var groups = $.evalJSON(input.val()); - + var unusedDiv = $('') .appendTo(container) .append('dostÄpni sponsorzy
'); @@ -18,13 +18,13 @@ .sortable({ connectWith: '.sponsors-sponsor-group-list' }); - + // Edit group name inline function editNameInline(name) { name.unbind('click.sponsorsFooter'); var inlineInput = $('').val(name.html()); name.html(''); - + function endEditing() { name.html(inlineInput.val()); inlineInput.remove(); @@ -34,11 +34,11 @@ input.parents('form').unbind('submit.sponsorsFooter', endEditing); return false; } - + inlineInput.appendTo(name).focus().blur(endEditing); input.parents('form').bind('submit.sponsorsFooter', endEditing); } - + // Remove sponsor with passed id from sponsors array and return it function popSponsor(id) { for (var i=0; i < settings.sponsors.length; i++) { @@ -50,15 +50,15 @@ } return null; } - + // Create sponsor group and bind events function createGroup(name, sponsors) { if (!sponsors) { sponsors = []; } - + var groupDiv = $(''); - + $('X') .click(function() { groupDiv.fadeOut('slow', function() { @@ -66,32 +66,32 @@ groupDiv.remove(); }); }).appendTo(groupDiv); - + $('' + name + '
') .bind('click.sponsorsFooter', function() { editNameInline($(this)); }).appendTo(groupDiv); - + var groupList = $('