From 5150376e126c0892c8b6a84d8850a81cf54db3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 2 Dec 2013 10:06:48 +0100 Subject: [PATCH] add wrapper class for lightboxes --- lib/cooked_post_processor.rb | 1 + spec/components/cooked_post_processor_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index ae940e6fb5d..7a691943936 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -147,6 +147,7 @@ class CookedPostProcessor def add_lightbox!(img, original_width, original_height, upload=nil) # first, create a div to hold our lightbox lightbox = Nokogiri::XML::Node.new("div", @doc) + lightbox["class"] = "lightbox-wrapper" img.add_next_sibling(lightbox) lightbox.add_child(img) diff --git a/spec/components/cooked_post_processor_spec.rb b/spec/components/cooked_post_processor_spec.rb index 683c6adfb20..a84a9d2965f 100644 --- a/spec/components/cooked_post_processor_spec.rb +++ b/spec/components/cooked_post_processor_spec.rb @@ -94,7 +94,7 @@ describe CookedPostProcessor do it "generates overlay information" do cpp.post_process_images - cpp.html.should match_html '