Added scrollbar on slideshow caption
authorveltr
Thu, 04 Jul 2013 13:07:47 +0200
changeset 219 6667fb5455d0
parent 218 87fd3589b65a
child 221 c8531f9b4f6d
Added scrollbar on slideshow caption
integration/v2/css/slideshow.css
integration/v2/js/main.js
integration/v2/js/slideshow.js
src/egonomy/static/egonomy/css/slideshow.css
src/egonomy/static/egonomy/js/slideshow.js
--- a/integration/v2/css/slideshow.css	Thu Jul 04 12:13:42 2013 +0200
+++ b/integration/v2/css/slideshow.css	Thu Jul 04 13:07:47 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 12:13:42 2013 +0200
+++ b/integration/v2/js/main.js	Thu Jul 04 13:07:47 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 12:13:42 2013 +0200
+++ b/integration/v2/js/slideshow.js	Thu Jul 04 13:07:47 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 12:13:42 2013 +0200
+++ b/src/egonomy/static/egonomy/css/slideshow.css	Thu Jul 04 13:07:47 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 12:13:42 2013 +0200
+++ b/src/egonomy/static/egonomy/js/slideshow.js	Thu Jul 04 13:07:47 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) {