Vastly simplify Next's preview
Also fix wrong height of iframed preview.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<!doctype html>
|
||||
<!--[if IE 8 ]> <html class="no-js lt-ie9" lang="{$lang}"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="{$lang}"> <!--<![endif]-->
|
||||
<!--[if IE 8 ]> <html id="preview" class="no-js lt-ie9" lang="{$lang}"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html id="preview_iframe" class="no-js" lang="{$lang}"> <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="{$head_charset}">
|
||||
<title>{$CONST.SERENDIPITY_ADMIN_SUITE}</title>
|
||||
@ -20,7 +20,7 @@
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700,700italic">
|
||||
{/if}
|
||||
{if $head_link_stylesheet_frontend}
|
||||
<link rel="stylesheet" href="{$head_link_stylesheet_frontend}">
|
||||
<link rel="stylesheet" href="{$head_link_stylesheet_frontend}">
|
||||
{else}
|
||||
<link rel="stylesheet" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}serendipity.css">
|
||||
{/if}
|
||||
@ -33,37 +33,32 @@
|
||||
<script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script>
|
||||
<script type="text/javascript">
|
||||
window.onload = function() {ldelim}
|
||||
parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('main').offsetHeight
|
||||
+ parseInt(document.getElementById('main').style.marginTop)
|
||||
+ parseInt(document.getElementById('main').style.marginBottom)
|
||||
+ 'px';
|
||||
parent.document.getElementById('serendipity_iframe').style.height = document.getElementById('preview_iframe').offsetHeight + 'px';
|
||||
parent.document.getElementById('serendipity_iframe').scrolling = 'no';
|
||||
parent.document.getElementById('serendipity_iframe').style.border = 0;
|
||||
{rdelim}
|
||||
</script>
|
||||
</head>
|
||||
<body style="padding: 0; margin: 0;"{if $template_option.webfonts != 'none'} class="{$template_option.webfonts}"{/if}>
|
||||
<div id="main" class="clearfix" style="padding: 0; margin: 5px auto; width: 98%;">
|
||||
<main id="primary">
|
||||
{if $mode == 'save'}
|
||||
<div style="float: left; height: 75px"></div>
|
||||
{$updertHooks}
|
||||
{if $res}
|
||||
<div class="serendipity_msg_important">{$CONST.ERROR}: <b>{$res}</b></div>
|
||||
{else}
|
||||
{if $lastSavedEntry}
|
||||
<script type="text/javascript">$(document).ready(function() {
|
||||
parent.document.forms['serendipityEntry']['serendipity[id]'].value = "{$lastSavedEntry}";
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.ENTRY_SAVED}</span>
|
||||
<a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a>
|
||||
<body {if $template_option.webfonts != 'none'} class="{$template_option.webfonts}"{/if}>
|
||||
<main id="primary">
|
||||
{if $mode == 'save'}
|
||||
<div style="float: left; height: 75px"></div>
|
||||
{$updertHooks}
|
||||
{if $res}
|
||||
<div class="serendipity_msg_important">{$CONST.ERROR}: <b>{$res}</b></div>
|
||||
{else}
|
||||
{if $lastSavedEntry}
|
||||
<script>$(document).ready(function() {
|
||||
parent.document.forms['serendipityEntry']['serendipity[id]'].value = "{$lastSavedEntry}";
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
<span class="msg_success"><span class="icon-ok-circled"></span> {$CONST.ENTRY_SAVED}</span>
|
||||
<a href="{$entrylink}" target="_blank">{$CONST.VIEW}</a>
|
||||
{/if}
|
||||
{$preview}
|
||||
</main>
|
||||
</div>
|
||||
{/if}
|
||||
{$preview}
|
||||
</main>
|
||||
|
||||
<script src="{serendipity_getFile file="scripts/master.js" frontend=true}"></script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user