diff --git a/layout.js b/layout.js
index f4165e3..a9e6ead 100755
--- a/layout.js
+++ b/layout.js
@@ -79,6 +79,14 @@ var togglePageView = createCSSClassToggler(
var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode')
+// XXX this is neither final nor usable...
+function prepareInlineCaptions(){
+ $('.page img[title]').each(function(){
+ // XXX make this add same style captions to images without changing
+ // layout...
+ })
+}
+
/************************************************** event handlers ***/
@@ -104,11 +112,11 @@ function handleClick(evt, data){
}
// Click on caption...
-// XXX add inline captions...
+// XXX add inline caption support...
function handleCaption(evt, data){
elem = $(data.orig_event.target)
- if(elem.is('.image-fit-height, .image-fit')
- || elem.parents('.image-fit-height, .image-fit').length > 0){
+ if(elem.is('.image-fit-height, .image-fit, .image-with-caption')
+ || elem.parents('.image-fit-height, .image-fit, .image-with-caption').length > 0){
// prevent doing anything in ribbon mode..
if(togglePageView('?') == 'off'){
diff --git a/magazine-editor.css b/magazine-editor.css
index ddbac67..62e4021 100755
--- a/magazine-editor.css
+++ b/magazine-editor.css
@@ -203,5 +203,13 @@
}
+/* the captions are always dark so we need to keep them correctly
+ * colored here... */
+.caption ::selection {
+ background: yellow;
+ color: white;
+}
+
+
/*********************************************************************/
diff --git a/magazine.css b/magazine.css
index 89011b7..53f41c0 100755
--- a/magazine.css
+++ b/magazine.css
@@ -788,9 +788,14 @@ div.page-number-text {
box-shadow: none;
}
+.image-with-caption {
+ position: relative;
+ display: inline-block;
+}
-.page.vertical-image-fit,
-.page.horizontal-image-fit {
+
+.page.image-fit,
+.page.image-fit-height {
/* prevent link errors from messing up the mag layout... */
overflow: hidden;
}