mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 11:10:08 +00:00
minor fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
479d728f64
commit
ccfa6bba14
@ -252,6 +252,7 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
// hide the splash...
|
// hide the splash...
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
|
//setCurrentPage(0)
|
||||||
$('.splash').fadeOut()
|
$('.splash').fadeOut()
|
||||||
}, 350)
|
}, 350)
|
||||||
// remove the spinner...
|
// remove the spinner...
|
||||||
@ -591,7 +592,7 @@ $(document).ready(function(){
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a name="page-3-anchor"></a>
|
<a name="page-3-anchor"></a>
|
||||||
<img src="img.jpg" height="100%" align="left" style="margin-right: 15px"/>
|
<img src="img.jpg" title="Image caption..." height="100%" align="left" style="margin-right: 15px"/>
|
||||||
<h1>Using the content block...</h1>
|
<h1>Using the content block...</h1>
|
||||||
<p>
|
<p>
|
||||||
The content block can contain any HTML.
|
The content block can contain any HTML.
|
||||||
@ -787,7 +788,7 @@ $(document).ready(function(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="page image-fit-height no-resize dark">
|
<div class="page image-fit-height no-resize dark page-align-right">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<img src="img.jpg">
|
<img src="img.jpg">
|
||||||
<div class="caption hidden" contenteditable="false">
|
<div class="caption hidden" contenteditable="false">
|
||||||
|
|||||||
14
layout.js
14
layout.js
@ -79,6 +79,14 @@ var togglePageView = createCSSClassToggler(
|
|||||||
var toggleInlineEditorMode = createCSSClassToggler('.chrome', 'inline-editor-mode')
|
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 ***/
|
/************************************************** event handlers ***/
|
||||||
@ -104,11 +112,11 @@ function handleClick(evt, data){
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Click on caption...
|
// Click on caption...
|
||||||
// XXX add inline captions...
|
// XXX add inline caption support...
|
||||||
function handleCaption(evt, data){
|
function handleCaption(evt, data){
|
||||||
elem = $(data.orig_event.target)
|
elem = $(data.orig_event.target)
|
||||||
if(elem.is('.image-fit-height, .image-fit')
|
if(elem.is('.image-fit-height, .image-fit, .image-with-caption')
|
||||||
|| elem.parents('.image-fit-height, .image-fit').length > 0){
|
|| elem.parents('.image-fit-height, .image-fit, .image-with-caption').length > 0){
|
||||||
|
|
||||||
// prevent doing anything in ribbon mode..
|
// prevent doing anything in ribbon mode..
|
||||||
if(togglePageView('?') == 'off'){
|
if(togglePageView('?') == 'off'){
|
||||||
|
|||||||
@ -203,5 +203,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* the captions are always dark so we need to keep them correctly
|
||||||
|
* colored here... */
|
||||||
|
.caption ::selection {
|
||||||
|
background: yellow;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
|
|||||||
@ -788,9 +788,14 @@ div.page-number-text {
|
|||||||
box-shadow: none;
|
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... */
|
/* prevent link errors from messing up the mag layout... */
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user