X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/362ea2e7f8ac4254398791139cc060090199f400..0e8fc93b7943f9a8ebe4cf3f9b609ea14685ed65:/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 = $('