# HG changeset patch # User cavaliet # Date 1372946228 -7200 # Node ID c8531f9b4f6dd8e150d2da4231dac21ef3343525 # Parent c38fbfea55acc19ae126597fc1fca725cb96a24f# Parent 6667fb5455d00baeb2b79e0b623a941edf2eddd2 Merge with 6667fb5455d00baeb2b79e0b623a941edf2eddd2 diff -r c38fbfea55ac -r c8531f9b4f6d integration/v2/css/slideshow.css --- a/integration/v2/css/slideshow.css Thu Jul 04 15:55:34 2013 +0200 +++ b/integration/v2/css/slideshow.css Thu Jul 04 15:57:08 2013 +0200 @@ -21,7 +21,7 @@ .caption { font-family: "Lato"; width: 480px; max-width: 100%; background: #ffffff; - padding: 16px 0; margin: 0; + padding: 16px 0; margin: 0; overflow: auto; } .caption { diff -r c38fbfea55ac -r c8531f9b4f6d integration/v2/js/main.js --- a/integration/v2/js/main.js Thu Jul 04 15:55:34 2013 +0200 +++ b/integration/v2/js/main.js Thu Jul 04 15:57:08 2013 +0200 @@ -53,12 +53,33 @@ $('.additemtocollection').bind('click', function(e){ // When an item meant to be added to a collection is clicked, // we fill the form in the add-to-collection div - console.log(this + ", " + $(this) + ", " + $(this).attr('data-type') + ", " + $(this).attr('data-id')); $('#add-to-collection .item-type').val($(this).attr('data-type')); $('#add-to-collection .item-id').val($(this).attr('data-id')); }); + $(".ajax-form").submit(function(e) { // On submit Ajax Form + var formel = $(this); + $.ajax({ + url: formel.attr("action"), + type: formel.attr("method"), + data: formel.serialize(), + success: function(text) { + $('.popin-wrap').fadeIn(function(){ + $(".additem-success").show(); + }); + //console.log("received : " + text); + $(".additem-success .collection-url").attr("href", text); + }, + error: function() { + $('.popin-wrap').fadeIn(function(){ + $(".additem-error").show(); + }); + } + }); + formel.parents(".popin").hide(); + return false; + }); if($('#map').length){ initmap() diff -r c38fbfea55ac -r c8531f9b4f6d integration/v2/js/slideshow.js --- a/integration/v2/js/slideshow.js Thu Jul 04 15:55:34 2013 +0200 +++ b/integration/v2/js/slideshow.js Thu Jul 04 15:57:08 2013 +0200 @@ -24,6 +24,8 @@ jqpath.attr("d", slide.path); } + jqcaption.css("max-height", jqwin.height() - 132); + lastSlide = slide; if (slide.image && slide.image.width) { diff -r c38fbfea55ac -r c8531f9b4f6d src/egonomy/static/egonomy/css/slideshow.css --- a/src/egonomy/static/egonomy/css/slideshow.css Thu Jul 04 15:55:34 2013 +0200 +++ b/src/egonomy/static/egonomy/css/slideshow.css Thu Jul 04 15:57:08 2013 +0200 @@ -21,7 +21,7 @@ .caption { font-family: "Lato"; width: 480px; max-width: 100%; background: #ffffff; - padding: 16px 0; margin: 0; + padding: 16px 0; margin: 0; overflow: auto; } .caption { diff -r c38fbfea55ac -r c8531f9b4f6d src/egonomy/static/egonomy/js/slideshow.js --- a/src/egonomy/static/egonomy/js/slideshow.js Thu Jul 04 15:55:34 2013 +0200 +++ b/src/egonomy/static/egonomy/js/slideshow.js Thu Jul 04 15:57:08 2013 +0200 @@ -24,6 +24,8 @@ jqpath.attr("d", slide.path); } + jqcaption.css("max-height", jqwin.height() - 132); + lastSlide = slide; if (slide.image && slide.image.width) {