commit 502cf34d9f4dc908e7840b2add5d8049d3118894
parent 83653bdb82c2bec2da5ab30a9ce75d7f4278f94e
Author: dankert <devnull@localhost>
Date: Thu, 4 Mar 2010 21:44:03 +0100
Textauszeichnungen für Vorschau-Text.
Diffstat:
3 files changed, 87 insertions(+), 24 deletions(-)
diff --git a/themes/default/css/base.css b/themes/default/css/base.css
@@ -22,7 +22,7 @@ Basis-Style for Openrat.
*/
-/* Alle Elemente zuruecksetzen */
+/* R e s e t - Alle Elemente zuruecksetzen */
/* Source: http://meyerweb.com/eric/tools/css/reset/ */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
body {line-height:1.5;}
@@ -33,6 +33,55 @@ blockquote:before, blockquote:after, q:before, q:after {content:"";}
blockquote, q {quotes:"" "";}
a img {border:none;}
+
+/* Vorschau von Text-Inhalten */
+
+td.preview { background-color:papayawhip; border-top:1px solid silver; border-bottom:1px solid silver; }
+.preview h1 { font-size:138.5%; }
+.preview h2 { font-size:123.1%; }
+.preview h3 { font-size:108%; }
+.preview h1,.preview h2,.preview h3 {
+ margin:1em 0;
+}
+.preview h1,
+.preview h2,
+.preview h3,
+.preview h4,
+.preview h5,
+.preview h6,
+.preview strong
+{
+ font-weight:bold;
+}
+.preview abbr,.preview acronym {
+ border-bottom:1px dotted #000;
+ cursor:help;
+}
+.preview em {
+ font-style:italic;
+}
+.preview ol,.preview ul,.preview dl {
+ margin-left:2em;
+}
+.preview ol li
+{
+ list-style: decimal outside;
+}
+.preview ul li
+{
+ list-style: disc outside;
+}
+.preview a:link,
+.preview a:visited,
+.preview a:active,
+.preview a:hover
+{
+ text-decoration:underline;
+ color:blue;
+}
+
+
+
/* Verweise */
a:link,
a:visited
diff --git a/themes/default/pages/html/pageelement/edit.tpl.php b/themes/default/pages/html/pageelement/edit.tpl.php
@@ -1086,7 +1086,34 @@ document.forms[0].<?php echo $a7_field ?>.select();
if ( $a4_tmp_exec )
{
?>
-<?php unset($a4_equals,$a4_value) ?><?php
+<?php unset($a4_equals,$a4_value) ?><?php $a5_present='preview'; ?><?php
+ $a5_tmp_exec = isset($$a5_present);
+ $a5_tmp_last_exec = $a5_tmp_exec;
+ if ( $a5_tmp_exec )
+ {
+?>
+<?php unset($a5_present) ?><?php
+ $row_idx++;
+ $column_idx = 0;
+?>
+<tr
+>
+<?php $a7_class='preview';$a7_colspan='2'; ?><?php $column_idx++; ?><td
+<?php if (!empty($column_widths)) { ?>
+ width="<?php echo $column_widths[($column_idx-1)%count($column_widths)] ?>"
+<?php } ?>
+ class="preview"
+ colspan="2"
+><?php unset($a7_class,$a7_colspan) ?><?php $a8_title=lang('page_preview'); ?><fieldset><?php if(isset($a8_title)) { ?><legend><?php echo encodeHtml($a8_title) ?></legend><?php } ?><?php unset($a8_title) ?><?php $a9_class='text';$a9_var='preview';$a9_escape=false;$a9_cut='both'; ?><?php
+ $a9_title = '';
+ $tmp_tag = 'span';
+?><<?php echo $tmp_tag ?> class="<?php echo $a9_class ?>" title="<?php echo $a9_title ?>"><?php
+ $langF = $a9_escape?'langHtml':'lang';
+ $tmp_text = isset($$a9_var)?$$a9_var:$langF('UNKNOWN');
+ $tmp_text = nl2br($tmp_text);
+ echo $tmp_text;
+ unset($tmp_text);
+?></<?php echo $tmp_tag ?>><?php unset($a9_class,$a9_var,$a9_escape,$a9_cut) ?></fieldset><br/><br/></td></tr><?php } ?><?php
$row_idx++;
$column_idx = 0;
?>
@@ -1296,22 +1323,7 @@ function table()
if ( $a7_tmp_exec )
{
?>
-<?php unset($a7_equals,$a7_value) ?><?php $a8_present='preview'; ?><?php
- $a8_tmp_exec = isset($$a8_present);
- $a8_tmp_last_exec = $a8_tmp_exec;
- if ( $a8_tmp_exec )
- {
-?>
-<?php unset($a8_present) ?><?php $a9_title=lang('page_preview'); ?><fieldset><?php if(isset($a9_title)) { ?><legend><?php echo encodeHtml($a9_title) ?></legend><?php } ?><?php unset($a9_title) ?><?php $a10_class='text';$a10_var='preview';$a10_escape=false;$a10_cut='both'; ?><?php
- $a10_title = '';
- $tmp_tag = 'span';
-?><<?php echo $tmp_tag ?> class="<?php echo $a10_class ?>" title="<?php echo $a10_title ?>"><?php
- $langF = $a10_escape?'langHtml':'lang';
- $tmp_text = isset($$a10_var)?$$a10_var:$langF('UNKNOWN');
- $tmp_text = nl2br($tmp_text);
- echo $tmp_text;
- unset($tmp_text);
-?></<?php echo $tmp_tag ?>><?php unset($a10_class,$a10_var,$a10_escape,$a10_cut) ?></fieldset><br/><br/><?php } ?><?php $a8_present='languagetext'; ?><?php
+<?php unset($a7_equals,$a7_value) ?><?php $a8_present='languagetext'; ?><?php
$a8_tmp_exec = isset($$a8_present);
$a8_tmp_last_exec = $a8_tmp_exec;
if ( $a8_tmp_exec )
diff --git a/themes/default/templates/pageelement/edit.tpl.src.php b/themes/default/templates/pageelement/edit.tpl.src.php
@@ -98,6 +98,14 @@ page
focus field:text
if value:var:type equals:longtext
+ if present:preview
+ row
+ cell colspan:2 class:preview
+ fieldset title:message:page_preview
+ text var:preview escape:false
+ newline
+ newline
+
row
cell colspan:2
//focus field:text
@@ -107,12 +115,6 @@ page
if value:var:editor equals:wiki
- if present:preview
- fieldset title:message:page_preview
- text var:preview escape:false
- newline
- newline
-
if present:languagetext
fieldset title:var:languagename
text var:languagetext