added preview buttons to various edit pages

This commit is contained in:
hyung-hwan 2014-06-15 17:16:06 +00:00
parent 61be4c7695
commit 1efb57fed8
9 changed files with 417 additions and 261 deletions

View File

@ -6,6 +6,36 @@
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/file.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/file.css')?>" />
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript">
function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"file_edit_mainarea_description_preview",
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment0/<?=$project->id?>/"
);
}
$(function () {
$("#file_edit_mainarea_description_preview_button").button().click(
function () {
render_wiki ($("#file_edit_mainarea_description").val());
}
);
});
</script>
<title><?=htmlspecialchars($file->name)?></title> <title><?=htmlspecialchars($file->name)?></title>
</head> </head>
@ -38,78 +68,65 @@ $this->load->view (
<!----------------------------------------------------------------------------> <!---------------------------------------------------------------------------->
<div class="mainarea" id="file_edit_mainarea"> <div class="mainarea" id="file_mainarea">
<?php if ($message != "") print '<div id="file_edit_message" class="form_message">'.htmlspecialchars($message).'</div>'; ?> <?php if ($message != "") print '<div id="file_message" class="form_message">'.htmlspecialchars($message).'</div>'; ?>
<?=form_open_multipart("file/$mode/{$project->id}/" . $this->converter->AsciiToHex($file->name))?> <?=form_open_multipart("file/$mode/{$project->id}/" . $this->converter->AsciiToHex($file->name))?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div class='form_input_field'>
<div> <?=form_label($this->lang->line('Name').': ', 'file_name')?>
<?=form_label($this->lang->line('Name').': ', 'file_name')?> <?php
<?=form_error('file_name');?> $extra = ($mode == 'update')? 'readonly="readonly"': '';
</div> $extra .= 'maxlength="255" size="40"';
<div> if ($mode == 'update')
<?php print form_input('file_name', set_value('file_name', $file->name), $extra);
$extra = ($mode == 'update')? 'readonly="readonly"': ''; else
$extra .= 'maxlength="255" size="40"'; print form_upload('file_name', set_value('file_name', $file->name), $extra);
if ($mode == 'update') ?>
print form_input('file_name', set_value('file_name', $file->name), $extra); <?=form_error('file_name');?>
else
print form_upload('file_name', set_value('file_name', $file->name), $extra);
?>
</div>
</div> </div>
<div> <div class='form_input_field'>
<div> <?=form_label($this->lang->line('Tag').': ', 'file_tag')?>
<?=form_label($this->lang->line('Tag').': ', 'file_tag')?> <?php
<?=form_error('file_tag');?> $extra = 'maxlength="50" size="25"';
</div> ?>
<div> <?=form_input('file_tag', set_value('file_tag', $file->tag), $extra)?>
<?php <?=form_error('file_tag');?>
$extra = 'maxlength="50" size="25"';
?>
<?=form_input('file_tag', set_value('file_tag', $file->tag), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Summary').': ', 'file_summary')?>
<?=form_label($this->lang->line('Summary').': ', 'file_summary')?> <?=form_error('file_summary');?>
<?=form_error('file_summary');?> </div>
</div> <div class='form_input_field'>
<div> <?php
<?php $extra = 'maxlength="255" size="80"';
$extra = 'maxlength="255" size="80"'; ?>
?> <?=form_input('file_summary', set_value('file_summary', $file->summary), $extra)?>
<?=form_input('file_summary', set_value('file_summary', $file->summary), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Description').': ', 'file_description')?>
<?=form_label($this->lang->line('Description').': ', 'file_description')?> <a href='#' id='file_edit_mainarea_description_preview_button'>Preview</a>
<?=form_error('file_description');?> <?=form_error('file_description');?>
</div>
<div>
<?=form_textarea('file_description', set_value('file_description', $file->description))?>
</div>
</div> </div>
<div class='form_input_field'>
<div> <?=form_textarea('file_description', set_value('file_description', $file->description), 'id=file_edit_mainarea_description')?>
<?=form_hidden('file_projectid', set_value('file_projectid', $file->projectid))?>
</div> </div>
<div id='file_edit_mainarea_description_preview' class='form_input_preview'></div>
<div>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?> <?=form_hidden('file_projectid', set_value('file_projectid', $file->projectid))?>
<?=form_submit('file', $caption)?>
</div> <?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?=form_submit('file', $caption)?>
<?=form_fieldset_close()?> <?=form_fieldset_close()?>
<?=form_close();?> <?=form_close();?>
</div> <!-- file_edit_mainarea --> </div> <!-- file_mainarea -->
<!----------------------------------------------------------------------------> <!---------------------------------------------------------------------------->

View File

@ -6,6 +6,35 @@
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/issue.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/issue.css')?>" />
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript">
function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"issue_edit_mainarea_description_preview",
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment0/<?=$project->id?>/"
);
}
$(function () {
$("#issue_edit_mainarea_description_preview_button").button().click(
function () {
render_wiki ($("#issue_edit_mainarea_description").val());
}
);
});
</script>
<title><?=htmlspecialchars($issue->id)?></title> <title><?=htmlspecialchars($issue->id)?></title>
</head> </head>
@ -59,7 +88,7 @@ $this->load->view (
<?=form_hidden('issue_owner', set_value('issue_owner', $issue->owner))?> <?=form_hidden('issue_owner', set_value('issue_owner', $issue->owner))?>
</div> </div>
<div id='issue_edit_mainarea_type'> <div id='issue_edit_mainarea_type' class='form_input_field'>
<?php <?php
if ($mode == 'update') if ($mode == 'update')
{ {
@ -72,48 +101,45 @@ $this->load->view (
'issue_type', 'issue_type',
$issue_type_array, $issue_type_array,
set_value('issue_type', $issue->type), set_value('issue_type', $issue->type),
'id="project_issue_type"'); 'id="issue_edit_mainarea_type"');
print form_error('issue_type'); print form_error('issue_type');
} }
?> ?>
</div> </div>
<div id='issue_edit_mainarea_summary'> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Summary').': ', 'issue_summary')?>
<?=form_label($this->lang->line('Summary').': ', 'issue_summary')?> <?=form_error('issue_summary');?>
<?=form_error('issue_summary');?> </div>
</div> <div class='form_input_field'>
<div> <?=form_input('issue_summary',
<?=form_input('issue_summary', set_value('issue_summary', $issue->summary),
set_value('issue_summary', $issue->summary), 'size="80" id="issue_edit_mainarea_summary"')
'size="80" id="project_issue_summary"') ?>
?>
</div>
</div> </div>
<div id='issue_edit_mainarea_description'> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Description').': ', 'issue_description')?>
<?=form_label($this->lang->line('Description').': ', 'issue_description')?> <a href='#' id='issue_edit_mainarea_description_preview_button'>Preview</a>
<?=form_error('issue_description');?> <?=form_error('issue_description');?>
</div>
<div>
<?php
$xdata = array (
'name' => 'issue_description',
'value' => set_value ('issue_description', $issue->description),
'id' => 'project_issue_description',
'rows' => 20,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div>
</div> </div>
<div class='form_input_field'>
<?php
$xdata = array (
'name' => 'issue_description',
'value' => set_value ('issue_description', $issue->description),
'id' => 'issue_edit_mainarea_description',
'rows' => 20,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div>
<div id='issue_edit_mainarea_description_preview' class='form_input_preview'></div>
<div id='issue_edit_mainarea_buttons'>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?> <?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?=form_submit('issue', $caption)?> <?=form_submit('issue', $caption)?>
</div>
<?=form_fieldset_close()?> <?=form_fieldset_close()?>
<?=form_close();?> <?=form_close();?>

View File

@ -6,6 +6,32 @@
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/project.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/project.css')?>" />
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript">
function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"project_edit_mainarea_description_preview",
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment0/<?=$project->id?>/"
);
}
$(function() {
$("#project_edit_mainarea_description_preview_button").button().click(
function () {
render_wiki ($("#project_edit_mainarea_description").val());
}
);
});
</script>
<title><?=$project->name?></title> <title><?=$project->name?></title>
</head> </head>
@ -48,97 +74,82 @@ $this->load->view (
<?=form_open($formurl)?> <?=form_open($formurl)?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div class='form_input_field'>
<div> <?=form_label($this->lang->line('ID').': ', 'project_id')?>
<?=form_label($this->lang->line('ID').': ', 'project_id')?> <?php
<?=form_error('project_id')?> $extra = ($mode == 'update')? 'readonly="readonly"': '';
</div> $extra .= 'maxlength="32" size="16"';
<div> ?>
<?php <?=form_input('project_id', set_value('project_id', $project->id), $extra)?>
$extra = ($mode == 'update')? 'readonly="readonly"': ''; <?=form_error('project_id')?>
$extra .= 'maxlength="32" size="16"';
?>
<?=form_input('project_id', set_value('project_id', $project->id), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Name').': ', 'project_name')?>
<?=form_label($this->lang->line('Name').': ', 'project_name')?> <?=form_error('project_name')?>
<?=form_error('project_name')?> </div>
</div> <div class='form_input_field'>
<div> <?php $extra = 'maxlength="80" size="40"'; ?>
<?php $extra = 'maxlength="80" size="40"'; ?> <?=form_input('project_name', set_value('project_name', $project->name), $extra)?>
<?=form_input('project_name', set_value('project_name', $project->name), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Summary').': ', 'project_summary')?>
<?=form_label($this->lang->line('Summary').': ', 'project_summary')?> <?=form_error('project_summary')?>
<?=form_error('project_summary')?> </div>
</div> <div class='form_input_field'>
<div> <?php $extra = 'maxlength="80" size="50"'; ?>
<?php $extra = 'maxlength="80" size="50"'; ?> <?=form_input('project_summary', set_value('project_summary', $project->summary), $extra)?>
<?=form_input('project_summary', set_value('project_summary', $project->summary), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Description').': ', 'project_description')?>
<?=form_label($this->lang->line('Description').': ', 'project_description')?> <a href='#' id='project_edit_mainarea_description_preview_button'>Preview</a>
<?=form_error('project_description')?> <?=form_error('project_description')?>
</div> </div>
<div> <div class='form_input_field'>
<?php <?php
$xdata = array ( $xdata = array (
'name' => 'project_description', 'name' => 'project_description',
'value' => set_value ('project_description', $project->description), 'value' => set_value ('project_description', $project->description),
'id' => 'project_edit_mainarea_description', 'id' => 'project_edit_mainarea_description',
'rows' => 20, 'rows' => 20,
'cols' => 80 'cols' => 80
); );
print form_textarea ($xdata); print form_textarea ($xdata);
?> ?>
</div> </div>
<div id='project_edit_mainarea_description_preview' class='form_input_preview'></div>
<div class='form_input_field'>
<?=form_label($this->lang->line('Commitable').': ', 'project_commitable')?>
<?=form_checkbox('project_commitable', 'Y', set_checkbox('project_commitable', $project->commitable, $project->commitable == 'Y'))?>
<?=form_error('project_commitable')?>
<?=form_label($this->lang->line('Public').': ', 'project_public')?>
<?=form_checkbox('project_public', 'Y', set_checkbox('project_public', $project->public, $project->public == 'Y'))?>
<?=form_error('project_public')?>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Members').': ', 'project_members')?>
<?=form_label($this->lang->line('Commitable').': ', 'project_commitable')?> <?=form_error('project_members')?>
<?=form_checkbox('project_commitable', 'Y', set_checkbox('project_commitable', $project->commitable, $project->commitable == 'Y'))?> </div>
<?=form_error('project_commitable')?> <div class='form_input_field'>
<?php
<?=form_label($this->lang->line('Public').': ', 'project_public')?> $xdata = array (
<?=form_checkbox('project_public', 'Y', set_checkbox('project_public', $project->public, $project->public == 'Y'))?> 'name' => 'project_members',
<?=form_error('project_public')?> 'value' => set_value ('project_members', $project->members),
</div> 'id' => 'project_edit_mainarea_members',
'rows' => 2,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div> </div>
<div> <?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<div> <?=form_submit('project', $caption)?>
<?=form_label($this->lang->line('Members').': ', 'project_members')?>
<?=form_error('project_members')?>
</div>
<div>
<?php
$xdata = array (
'name' => 'project_members',
'value' => set_value ('project_members', $project->members),
'id' => 'project_edit_mainarea_members',
'rows' => 2,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div>
</div>
<div>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?=form_submit('project', $caption)?>
</div>
<?=form_fieldset_close()?> <?=form_fieldset_close()?>
<?=form_close();?> <?=form_close();?>

View File

@ -6,6 +6,36 @@
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/site.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/site.css')?>" />
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript">
function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"site_edit_mainarea_text_preview",
"<?=site_url()?>/site/wiki/",
"<?=site_url()?>/site/image/"
);
}
$(function () {
$("#site_edit_mainarea_text_preview_button").button().click(
function () {
render_wiki ($("#site_edit_mainarea_text").val());
}
);
});
</script>
<title><?=htmlspecialchars($site->name)?></title> <title><?=htmlspecialchars($site->name)?></title>
</head> </head>
@ -48,55 +78,45 @@ $this->load->view (
<?=form_open($formurl, 'id="site_edit_form"')?> <?=form_open($formurl, 'id="site_edit_form"')?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div class='form_input_field'>
<div> <?=form_label($this->lang->line('Language').': ', 'site_id')?>
<?=form_label($this->lang->line('Language').': ', 'site_id')?> <?php
<?=form_error('site_id')?> $extra = ($mode == 'update')? 'readonly="readonly"': '';
</div> $extra .= 'maxlength="32" size="16" class="id"';
<div> ?>
<?php
$extra = ($mode == 'update')? 'readonly="readonly"': '';
$extra .= 'maxlength="32" size="16" class="id"';
?>
<?=form_input('site_id', <?=form_input('site_id',
set_value('site_id', $site->id), set_value('site_id', $site->id),
$extra) $extra)
?> ?>
</div> <?=form_error('site_id')?>
</div> </div>
<div> <div class='form_input_field'>
<div> <?=form_label($this->lang->line('Name').': ', 'site_name')?>
<?=form_label($this->lang->line('Name').': ', 'site_name')?> <?=form_input('site_name',
<?=form_error('site_name')?> set_value('site_name', $site->name),
</div> 'maxlength="80" size="40" class="name"');
<div> ?>
<?=form_input('site_name', <?=form_error('site_name')?>
set_value('site_name', $site->name),
'maxlength="80" size="40" class="name"');
?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Text').': ', 'site_text')?>
<?=form_label($this->lang->line('Text').': ', 'site_text')?> <a href='#' id='site_edit_mainarea_text_preview_button'>Preview</a>
<?=form_error('site_text')?> <?=form_error('site_text')?>
</div>
<div>
<?=form_textarea('site_text',
set_value('site_text', $site->text),
'class="text"')
?>
</div>
</div> </div>
<div class='form_input_field'>
<div> <?=form_textarea('site_text',
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?> set_value('site_text', $site->text),
<?=form_submit('site', $caption)?> 'class="text" id="site_edit_mainarea_text"')
?>
</div> </div>
<div id='site_edit_mainarea_text_preview' class='form_input_preview'></div>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?=form_submit('site', $caption)?>
<?=form_fieldset_close()?> <?=form_fieldset_close()?>
<?=form_close();?> <?=form_close();?>

View File

@ -6,12 +6,28 @@
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/wiki.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/wiki.css')?>" />
<script type="text/javascript" src="<?=base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script> <script type="text/javascript" src="<?=base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script> <script type="text/javascript" src="<?=base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" /> <link type="text/css" rel="stylesheet" href="<?=base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript"> <script type="text/javascript">
function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"wiki_edit_mainarea_text_preview",
"<?=site_url()?>/wiki/show/<?=$project->id?>/",
"<?=site_url()?>/wiki/attachment0/<?=$project->id?>/"
);
}
var new_attachment_no = 0; var new_attachment_no = 0;
$(function () { $(function () {
$('#wiki_edit_more_new_attachment').button().click ( $('#wiki_edit_more_new_attachment').button().click (
function () { function () {
@ -24,6 +40,12 @@ $(function () {
return false; return false;
} }
); );
$("#wiki_edit_mainarea_text_preview_button").button().click(
function () {
render_wiki ($("#wiki_edit_mainarea_text").val());
}
);
}); });
</script> </script>
@ -65,46 +87,44 @@ $this->load->view (
<?=form_open_multipart("wiki/{$mode}/{$project->id}/".$this->converter->AsciiToHex($wiki->name))?> <?=form_open_multipart("wiki/{$mode}/{$project->id}/".$this->converter->AsciiToHex($wiki->name))?>
<?=form_fieldset()?> <?=form_fieldset()?>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Name').': ', 'wiki_name')?>
<?=form_label($this->lang->line('Name').': ', 'wiki_name')?> <?=form_error('wiki_name');?>
<?=form_error('wiki_name');?> </div>
</div> <div class='form_input_field'>
<div> <?php
<?php $extra = ($mode == 'update')? 'readonly="readonly"': '';
$extra = ($mode == 'update')? 'readonly="readonly"': ''; $extra .= 'maxlength="80" size="40" id="wiki_edit_mainarea_name"';
$extra .= 'maxlength="80" size="40" id="wiki_edit_mainarea_name"'; ?>
?> <?=form_input('wiki_name', set_value('wiki_name', $wiki->name), $extra)?>
<?=form_input('wiki_name', set_value('wiki_name', $wiki->name), $extra)?>
</div>
</div> </div>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('Text').': ', 'wiki_text')?>
<?=form_label($this->lang->line('Text').': ', 'wiki_text')?> <a href='#' id='wiki_edit_mainarea_text_preview_button'>Preview</a>
<?=form_error('wiki_text');?> <?=form_error('wiki_text');?>
</div>
<div>
<?php
$xdata = array (
'name' => 'wiki_text',
'value' => set_value ('wiki_text', $wiki->text),
'id' => 'wiki_edit_mainarea_text',
'rows' => 20,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div>
</div> </div>
<div class='form_input_field'>
<?php
$xdata = array (
'name' => 'wiki_text',
'value' => set_value ('wiki_text', $wiki->text),
'id' => 'wiki_edit_mainarea_text',
'rows' => 20,
'cols' => 80
);
print form_textarea ($xdata);
?>
</div>
<div id='wiki_edit_mainarea_text_preview' class='form_input_preview'></div>
<?php if (!empty($wiki->attachments)): ?> <?php if (!empty($wiki->attachments)): ?>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('WIKI_ATTACHMENTS').': ', 'wiki_edit_attachment_list')?>
<?=form_label($this->lang->line('WIKI_ATTACHMENTS').': ', 'wiki_edit_attachment_list')?> <?=form_error('wiki_attachment_list');?>
<?=form_error('wiki_attachment_list');?> </div>
</div>
<div class='form_input_field'>
<ul id='wiki_edit_attachment_list'> <ul id='wiki_edit_attachment_list'>
<?php <?php
foreach ($wiki->attachments as $att) foreach ($wiki->attachments as $att)
@ -122,25 +142,24 @@ $this->load->view (
} }
?> ?>
</ul> </ul>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div> <div class='form_input_label'>
<div> <?=form_label($this->lang->line('WIKI_NEW_ATTACHMENTS').': ', 'wiki_edit_new_attachment_list')?>
<?=form_label($this->lang->line('WIKI_NEW_ATTACHMENTS').': ', 'wiki_edit_new_attachment_list')?> <a href='#' id='wiki_edit_more_new_attachment'>
<a href='#' id='wiki_edit_more_new_attachment'> <?=$this->lang->line('WIKI_MORE_NEW_ATTACHMENTS')?>
<?=$this->lang->line('WIKI_MORE_NEW_ATTACHMENTS')?> </a>
</a> <?=form_error('wiki_edit_new_attachment_list');?>
<?=form_error('wiki_edit_new_attachment_list');?> </div>
</div>
<ul id='wiki_edit_new_attachment_list'> <div class='form_input_field'>
<li> <ul id='wiki_edit_new_attachment_list'>
<input type='file' name='wiki_new_attachment_0' /> <li>
<!--<input type='checkbox' name='wiki_delete_attachment[]' value='delete'/>Delete--> <input type='file' name='wiki_new_attachment_0' />
</li> <!--<input type='checkbox' name='wiki_delete_attachment[]' value='delete'/>Delete-->
</ul> </li>
</ul>
</div> </div>

View File

@ -217,12 +217,39 @@ body {
font-size: inherit; font-size: inherit;
} }
.content .mainarea .form_input_label {
margin-bottom: 0.2em;
}
.content .mainarea .form_input_label .ui-button {
font-size: 80%;
font-style: italic;
}
.content .mainarea .form_input_field {
margin-bottom: 0.5em;
}
.content .mainarea .form_input_preview {
width: 100%;
/*border: 1px solid #DDDDDD;*/
background-color: #FFFFF0;
font-size: 90%;
}
.content .mainarea .form_input_preview pre {
background-color: inherit;
/*background-color: #FDF5D6;*/
/*border: none;*/
}
.content .mainarea .icon { .content .mainarea .icon {
border: 0; border: 0;
} }
.content .mainarea pre { .content .mainarea pre {
padding: .3em .3em .3em .3em; /*padding: .3em .3em .3em .3em;*/
border: 1px dashed #BBCCDD; border: 1px dashed #BBCCDD;
background-color: #F1F1FF; background-color: #F1F1FF;
overflow: auto; overflow: auto;

View File

@ -11,3 +11,8 @@
} }
#file_edit_mainarea_description {
width: 100%;
}

View File

@ -50,6 +50,7 @@
width: 100%; width: 100%;
} }
/*----------------------------------------------- /*-----------------------------------------------
* project catalog view * project catalog view
*-----------------------------------------------*/ *-----------------------------------------------*/

View File

@ -536,3 +536,33 @@ function creole_render_wiki (inputid, outputid, linkbase, imgbase)
output.innerHTML = ''; output.innerHTML = '';
creole.parse (output, xinput); creole.parse (output, xinput);
} }
function creole_render_wiki_with_input_text (input_text, outputid, linkbase, imgbase)
{
function $(id) { return document.getElementById(id); }
function decodeEntities(str)
{
return str.replace(/&amp;/g, '&').
replace(/&lt;/g, '<').
replace(/&gt;/g, '>').
replace(/&quot;/g, '"');
}
//var input = $(inputid);
var output = $(outputid);
var creole = new Parse.Simple.Creole(
{
forIE: document.all,
/*interwiki: {
WikiCreole: 'http://www.wikicreole.org/wiki/',
Wikipedia: 'http://en.wikipedia.org/wiki/'
},*/
linkFormat: linkbase,
imgFormat: imgbase
} );
var xinput = decodeEntities(input_text);
output.innerHTML = '';
creole.parse (output, xinput);
}