Merge with 6667fb5455d00baeb2b79e0b623a941edf2eddd2
authorcavaliet
Thu, 04 Jul 2013 15:57:08 +0200
changeset 221 c8531f9b4f6d
parent 220 c38fbfea55ac (current diff)
parent 219 6667fb5455d0 (diff)
child 222 07b1ff968e47
Merge with 6667fb5455d00baeb2b79e0b623a941edf2eddd2
--- 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 {
--- 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()
--- 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) {
--- 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 {
--- 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) {