Permalink
Browse files

Add padding; fix description "Object" bug

Add an extra div to the description div for styling purposes, and fix an error where the actual text of the description div wasn't shown.
  • Loading branch information...
1 parent ab9769a commit ed76393d25d407170b329d6ebcdd3076b7ac832d @tofumatt committed May 6, 2010
Showing with 11 additions and 7 deletions.
  1. +1 −1 README.markdown
  2. +5 −1 flowerpot.css
  3. +5 −5 jquery.flowerpot.js
View
@@ -52,4 +52,4 @@ Display the [YouTube](http://youtube.com) video at the link specified.
Multiple items can be viewed one after another without closing the overlay by adding `rel="gallery[NAME]"` to each element that should be part of that gallery. You can have as many galleries as you like, with as many items as you'd like, and you can mix all kinds of content in a gallery (i.e. images and iFrames in the same gallery).
# License
-In keeping with jQuery and most of its plugins, The Flowerpot is _dual-licensed_ under the *[MIT](http://www.opensource.org/licenses/mit-license.php)* and *[GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)* (v2 or later) licenses. This means you can pick whichever license you want to use for your project.
+In keeping with jQuery and most of its plugins, The Flowerpot is _dual-licensed_ under the *[MIT](http://www.opensource.org/licenses/mit-license.php)* and *[GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)* (v2 or later) licenses. This means you can pick whichever license you want to use for your project.
View
@@ -97,6 +97,10 @@
background: black;
}
+.flowerpot-description-inner {
+ padding: 2px;
+}
+
.flowerpotjs-gallery-link, .flowerpotjs-gallery-link-bg {
color: white;
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Helvetica, Arial, sans-serif;
@@ -221,4 +225,4 @@
}
* html #flowerpotjs-controls-images li.flowerpotjs-thumbnail-active a {
margin: 1px 1px;
-}
+}
View
@@ -629,12 +629,12 @@
// The Flowerpot, with the suffix "-flowerpot-description"
if (!fp.p['desc']) {
fp.p['desc'] = $('#' + $(this).attr('id') + '-flowerpot-description');
- fp.p['desc'] = (fp.p['desc'].length > 0) ? fp.p['desc'].html() : $(this).attr('title');
+ fp.p['desc'] = (fp.p['desc'].length > 0) ? fp.p['desc'].text() : $(this).attr('title');
// Last resort: div with the same id as the element invoked
// by The Flowerpot (plus the description suffix)
- if (fp.p['desc'].length > 0 && fp.p['type'] == 'div')
- fp.p['desc'] = $(fp.p['src'] + '-flowerpot-description');
+ if (fp.p['desc'].length == 0 && fp.p['type'] == 'div')
+ fp.p['desc'] = $(fp.p['src'] + '-flowerpot-description').text();
}
// Load the overlay, which gives a visual queue that clicking a Flowerpot
@@ -714,7 +714,7 @@
// If there's a description available, add it to the HTML
if (fp.p['desc'])
- content += '<div id="flowerpotjs-description-bg"></div><div id="flowerpotjs-description">' + fp.p['desc'] + '</div>';
+ content += '<div id="flowerpotjs-description-bg"><div class="flowerpot-description-inner"></div></div><div id="flowerpotjs-description"><div class="flowerpot-description-inner">' + fp.p['desc'] + '</div></div>';
// Add the "close" link to the HTML
content += '<a href="#close" id="flowerpotjs-close">' + fp.l['close'] + '</a>';
// If gallery controls are available, add them to the HTML
@@ -847,4 +847,4 @@
fp.init();
});
})(jQuery); // Load in the jQuery global variable to maintain compability,
- // i.e. in case another framework or variable is using "$"
+ // i.e. in case another framework or variable is using "$"

0 comments on commit ed76393

Please sign in to comment.