X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/74488bcce98f59ac255fa342ff61def2251ebdb5..073bc5dd763d0c181198af92fd5a2d8201d74679:/wolnelektury/static/sponsors/js/footer_admin.js?ds=sidebyside diff --git a/wolnelektury/static/sponsors/js/footer_admin.js b/wolnelektury/static/sponsors/js/footer_admin.js index 4cb5eb68c..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,19 +66,19 @@ groupDiv.remove(); }); }).appendTo(groupDiv); - + $('' + name + '
') .bind('click.sponsorsFooter', function() { editNameInline($(this)); }).appendTo(groupDiv); - + var groupList = $('