work in progress to support rich text editing in wiki

This commit is contained in:
hyung-hwan 2016-01-11 17:05:59 +00:00
parent 42fa04b188
commit 95d536e903
25 changed files with 610 additions and 842 deletions

View File

@ -5,8 +5,6 @@ class Issue extends Controller
var $VIEW_ERROR = 'error';
var $VIEW_HOME = 'issue_home';
var $VIEW_SHOW = 'issue_show';
var $VIEW_EDIT = 'issue_edit';
var $VIEW_DELETE = 'issue_delete';
function Issue ()
{
@ -257,270 +255,6 @@ class Issue extends Controller
}
}
/*
DEPRECATED
function _edit_issue ($projectid, $hexid, $mode)
{
$this->load->helper ('form');
$this->load->library ('form_validation');
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$id = $this->converter->HexToAscii ($hexid);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'] && $mode != 'create' &&
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$this->form_validation->set_rules (
'issue_projectid', 'project ID', 'required|alpha_dash|max_length[32]');
$this->form_validation->set_rules (
'issue_summary', 'summary', 'required|max_length[255]');
$this->form_validation->set_rules (
'issue_description', 'description', 'required');
$this->form_validation->set_rules (
'issue_type', 'type', 'required');
$this->form_validation->set_rules (
'issue_type', 'status', 'required');
$this->form_validation->set_rules (
'issue_type', 'priority', 'required');
$this->form_validation->set_error_delimiters (
'<span class="form_field_error">','</span>');
$data['mode'] = $mode;
$data['message'] = '';
$data['project'] = $project;
$data['issue_type_array'] = $this->issuehelper->_get_type_array($this->lang);
$data['issue_status_array'] = $this->issuehelper->_get_status_array($this->lang);
$data['issue_priority_array'] = $this->issuehelper->_get_priority_array($this->lang);
if ($this->input->post('issue'))
{
$issue = new stdClass();
$issue->projectid = $this->input->post('issue_projectid');
$issue->id = $this->input->post('issue_id');
$issue->summary = $this->input->post('issue_summary');
$issue->description = $this->input->post('issue_description');
$issue->type = $this->input->post('issue_type');
$issue->status = $this->input->post('issue_status');
$issue->priority = $this->input->post('issue_priority');
$issue->owner = $this->input->post('issue_owner');
if ($this->form_validation->run())
{
$id = ($mode == 'update')?
$this->issues->update_partial ($login['id'], $issue):
$this->issues->create ($login['id'], $issue);
if ($id === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
else
{
redirect ("issue/show/{$project->id}/" .
$this->converter->AsciiToHex((string)$id));
}
}
else
{
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
else
{
if ($mode == 'update')
{
$issue = $this->issues->get ($login['id'], $project, $id);
if ($issue === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($issue == NULL)
{
$data['message'] = sprintf (
$this->lang->line('ISSUE_MSG_NO_SUCH_ISSUE'), $id);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
else
{
$issue = new stdClass();
$issue->projectid = $projectid;
$issue->id = $id;
$issue->summary = '';
$issue->description = '';
$issue->type = $this->issuehelper->TYPE_DEFECT;
$issue->status = $this->issuehelper->STATUS_NEW;
$issue->priority = $this->issuehelper->PRIORITY_OTHER;
if ($this->projects->projectHasMember($project->id, $login['id']))
{
// let the current user be the issue owner if he/she is a
// project memeber.
$issue->owner = $login['id'];
}
else
{
// if not, assign the issue to the first member.
$issue->owner = (count($project->members) > 0)? $project->members[0]: '';
}
$data['issue'] = $issue;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
}
}
function create ($projectid = '')
{
return $this->_edit_issue ($projectid, '', 'create');
}
function update ($projectid = '', $hexid = '')
{
return $this->_edit_issue ($projectid, $hexid, 'update');
}
function delete ($projectid = '', $hexid = '')
{
$this->load->helper ('form');
$this->load->library ('form_validation');
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('IssueModel', 'issues');
$login = $this->login->getUser ();
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$id = $this->converter->HexToAscii ($hexid);
$project = $this->projects->get ($projectid);
if ($project === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($project === NULL)
{
$data['message'] =
$this->lang->line('MSG_NO_SUCH_PROJECT') .
" - {$projectid}";
$this->load->view ($this->VIEW_ERROR, $data);
}
else if (!$login['sysadmin?'] &&
$this->projects->projectHasMember($project->id, $login['id']) === FALSE)
{
$data['project'] = $project;
$data['message'] = sprintf (
$this->lang->line('MSG_PROJECT_MEMBERSHIP_REQUIRED'), $projectid);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['message'] = '';
$data['project'] = $project;
$this->form_validation->set_rules ('issue_confirm', 'confirm', 'alpha');
$this->form_validation->set_error_delimiters('<span class="form_field_error">','</span>');
if($this->input->post('issue'))
{
$issue = new stdClass();
$issue->projectid = $this->input->post('issue_projectid');
$issue->id = $this->input->post('issue_id');
$data['issue_confirm'] = $this->input->post('issue_confirm');
if ($this->form_validation->run())
{
if ($data['issue_confirm'] == 'yes')
{
$result = $this->issues->delete ($login['id'], $issue);
if ($result === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
else
{
redirect ("issue/home/{$project->id}");
}
}
else
{
redirect ("issue/show/{$project->id}/{$hexid}");
}
}
else
{
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
}
else
{
$issue = $this->issues->get ($login['id'], $project, $id);
if ($issue === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($issue === NULL)
{
$data['message'] = sprintf (
$this->lang->line('ISSUE_MSG_NO_SUCH_ISSUE'), $id);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['issue_confirm'] = 'no';
$data['issue'] = $issue;
$this->load->view ($this->VIEW_DELETE, $data);
}
}
}
}
*/
function xhr_create ($projectid = '')
{
$this->load->model ('ProjectModel', 'projects');

View File

@ -6,6 +6,7 @@ class Wiki extends Controller
var $VIEW_HOME = 'wiki_home';
var $VIEW_SHOW = 'wiki_show';
var $VIEW_EDIT = 'wiki_edit';
var $VIEW_EDITX = 'wiki_editx';
var $VIEW_DELETE = 'wiki_delete';
function Wiki ()
@ -70,7 +71,7 @@ class Wiki extends Controller
}
}
function _show_wiki ($projectid, $name, $create)
private function _show_wiki ($projectid, $name, $create)
{
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('WikiModel', 'wikis');
@ -175,7 +176,7 @@ class Wiki extends Controller
$this->_show_wiki ($projectid, $name, FALSE);
}
function _edit_wiki ($projectid, $name, $mode)
private function _edit_wiki ($projectid, $name, $mode, $view_edit)
{
$this->load->helper ('form');
$this->load->library ('form_validation');
@ -284,7 +285,7 @@ class Wiki extends Controller
{
$data['wiki'] = $wiki;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
return;
}
$wiki->attachments = $atts;
@ -295,7 +296,7 @@ class Wiki extends Controller
{
$data['message'] = $this->lang->line('WIKI_MSG_NAME_DISALLOWED_CHARS');
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
return;
}
@ -307,7 +308,7 @@ class Wiki extends Controller
$wiki->name
);
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
}
else
{
@ -317,7 +318,7 @@ class Wiki extends Controller
{
$data['wiki'] = $wiki;
$data['message'] = $extra;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
return;
}
@ -333,7 +334,7 @@ class Wiki extends Controller
$data['message'] = 'DATABASE ERROR';
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
}
else
{
@ -366,7 +367,7 @@ class Wiki extends Controller
{
$data['wiki'] = $wiki;
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
return;
}
$wiki->attachments = $atts;
@ -374,7 +375,7 @@ class Wiki extends Controller
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
}
}
else
@ -397,7 +398,7 @@ class Wiki extends Controller
else
{
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
}
}
else
@ -409,7 +410,7 @@ class Wiki extends Controller
$wiki->columns = '1';
$data['wiki'] = $wiki;
$this->load->view ($this->VIEW_EDIT, $data);
$this->load->view ($view_edit, $data);
}
}
@ -418,12 +419,22 @@ class Wiki extends Controller
function create ($projectid = '', $name = '')
{
return $this->_edit_wiki ($projectid, $name, 'create');
return $this->_edit_wiki ($projectid, $name, 'create', $this->VIEW_EDIT);
}
function update ($projectid = '', $name = '')
{
return $this->_edit_wiki ($projectid, $name, 'update');
return $this->_edit_wiki ($projectid, $name, 'update', $this->VIEW_EDIT);
}
function createx ($projectid = '', $name = '')
{
return $this->_edit_wiki ($projectid, $name, 'create', $this->VIEW_EDITX);
}
function updatex ($projectid = '', $name = '')
{
return $this->_edit_wiki ($projectid, $name, 'update', $this->VIEW_EDITX);
}
function delete ($projectid = '', $name = '')

View File

@ -15,8 +15,6 @@ www_DATA = \
footer.php \
graph_main.php \
index.html \
issue_delete.php \
issue_edit.php \
issue_home.php \
issue_show.php \
log.php \
@ -36,6 +34,7 @@ www_DATA = \
user_settings.php \
wiki_delete.php \
wiki_edit.php \
wiki_editx.php \
wiki_home.php \
wiki_show.php

View File

@ -160,8 +160,6 @@ www_DATA = \
footer.php \
graph_main.php \
index.html \
issue_delete.php \
issue_edit.php \
issue_home.php \
issue_show.php \
log.php \
@ -181,6 +179,7 @@ www_DATA = \
user_settings.php \
wiki_delete.php \
wiki_edit.php \
wiki_editx.php \
wiki_home.php \
wiki_show.php

View File

@ -40,7 +40,7 @@ var base_return_anchor = codepot_merge_path('<?php print site_url() ?>', '<?php
function resize_editor()
{
var titleband = $("#code_edit_title_band");
var code = $("#code_edit_mainarea_result_code");
var code = $("#code_edit_result_code");
var footer = $("#codepot_footer");
var ioff = titleband.offset();
@ -54,7 +54,7 @@ function resize_editor()
function show_alert (outputMsg, titleMsg)
{
$("#code_edit_mainarea_alert").html(outputMsg).dialog({
$("#code_edit_alert").html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
@ -93,10 +93,10 @@ function set_editor_changed (changed)
}
$(function () {
save_button = $("#code_edit_mainarea_save_button").button();
return_button = $("#code_edit_mainarea_return_button").button();
save_button = $("#code_edit_save_button").button();
return_button = $("#code_edit_return_button").button();
var mode_menu = $("#code_edit_mainarea_mode");
var mode_menu = $("#code_edit_mode");
ace_modes = codepot_get_ace_modes();
var detected_mode = null;
@ -132,7 +132,7 @@ $(function () {
detected_mode = text_mode;
}
var editor = ace.edit("code_edit_mainarea_result_code");
var editor = ace.edit("code_edit_result_code");
//editor.setTheme("ace/theme/chrome");
if (detected_mode) editor.getSession().setMode (detected_mode.mode);
editor.getSession().setUseSoftTabs(false);
@ -150,7 +150,7 @@ $(function () {
editor.getSession().setMode ($(this).val());
});
$('#code_edit_mainarea_save_form').dialog ({
$('#code_edit_save_form').dialog ({
title: '<?php print $this->lang->line('Save')?>',
autoOpen: false,
modal: true,
@ -159,7 +159,7 @@ $(function () {
'<?php print $this->lang->line('OK')?>': function () {
if (saving_in_progress) return;
var save_message = $("#code_edit_mainarea_save_message").val();
var save_message = $("#code_edit_save_message").val();
if (save_message == '') return false;
editor.setReadOnly (true);
@ -173,8 +173,8 @@ $(function () {
success: function(json, textStatus, jqXHR) {
saving_in_progress = false;
$('#code_edit_mainarea_save_form').dialog('enable');
$('#code_edit_mainarea_save_form').dialog('close');
$('#code_edit_save_form').dialog('enable');
$('#code_edit_save_form').dialog('close');
if (json.status == "ok")
{
set_editor_changed (false);
@ -194,15 +194,15 @@ $(function () {
error: function(jqXHR, textStatus, errorThrown) {
saving_in_progress = false;
$('#code_edit_mainarea_save_form').dialog('enable');
$('#code_edit_mainarea_save_form').dialog('close');
$('#code_edit_save_form').dialog('enable');
$('#code_edit_save_form').dialog('close');
show_alert ('Not saved - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
editor.setReadOnly (false);
save_button.button ("enable");
}
});
$('#code_edit_mainarea_save_form').dialog('disable');
$('#code_edit_save_form').dialog('disable');
},
'<?php print $this->lang->line('Cancel')?>': function () {
@ -219,7 +219,7 @@ $(function () {
save_button.click (function() {
if (editor_changed) $("#code_edit_mainarea_save_form").dialog('open');
if (editor_changed) $("#code_edit_save_form").dialog('open');
return false;
});
@ -300,17 +300,17 @@ $this->load->view (
<div class="actions">
<?php
/* Saving file work on the head only. so the links here don't include the given revision anymore */
print '<select id="code_edit_mainarea_mode"></select>';
print '<select id="code_edit_mode"></select>';
print ' ';
print anchor ("code/${caller}/{$project->id}/{$hex_headpath}", $this->lang->line('Save'), 'id="code_edit_mainarea_save_button"');
print anchor ("code/${caller}/{$project->id}/{$hex_headpath}", $this->lang->line('Save'), 'id="code_edit_save_button"');
print ' ';
print anchor ("code/${caller}/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Return'), 'id="code_edit_mainarea_return_button"');
print anchor ("code/${caller}/{$project->id}/{$hex_headpath}{$revreq}", $this->lang->line('Return'), 'id="code_edit_return_button"');
?>
</div>
<div style="clear: both;"></div>
</div>
<div class="result" id="code_edit_mainarea_result">
<div class="result" id="code_edit_result">
<?php
/*
@ -321,7 +321,7 @@ else if ($fileext == 'bas') $fileext = 'basic';
*/
?>
<div id="code_edit_mainarea_result_code"><?php
<div id="code_edit_result_code"><?php
/*
$is_octet_stream = FALSE;
if (array_key_exists('properties', $file) && count($file['properties']) > 0)
@ -352,18 +352,18 @@ else if ($fileext == 'bas') $fileext = 'basic';
if (!$is_image_stream)*/ print htmlspecialchars($file['content']);
?></div>
</div> <!-- code_edit_mainarea_result -->
</div> <!-- code_edit_result -->
<div id="code_edit_mainarea_save_form">
<div id="code_edit_save_form">
<div>
<?php print $this->lang->line('Message'); ?>
</div>
<div>
<textarea id='code_edit_mainarea_save_message' rows=10 cols=60 style="width: 100%;"></textarea>
<textarea id='code_edit_save_message' rows=10 cols=60 style="width: 100%;"></textarea>
</div>
</div>
<div id="code_edit_mainarea_alert">
<div id="code_edit_alert">
</div>
</div> <!-- code_edit_mainarea -->

View File

@ -1,90 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="<?php print base_url_make('/js/codepot.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/issue.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/font-awesome.min.css')?>" />
<script type="text/javascript" src="<?php print base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
<title><?php print htmlspecialchars($issue->id)?></title>
</head>
<body>
<div class="content" id="project_issue_delete_content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$this->load->view (
'projectbar',
array (
'banner' => NULL,
'page' => array (
'type' => 'project',
'id' => 'issue',
'project' => $project,
),
'ctxmenuitems' => array ()
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea">
<?php if ($message != "") print '<div id="issue_delete_message" class="form_message">'.htmlspecialchars($message).'</div>'; ?>
<div class="form_container">
<?php print form_open("issue/delete/{$project->id}/".$this->converter->AsciiToHex($issue->id))?>
<div>
<div>
<?php print form_checkbox('issue_confirm', 'yes', set_checkbox('issue_confirm', $issue_confirm))?>
<?php print $this->lang->line('MSG_SURE_TO_DELETE_THIS')?> - <?php print htmlspecialchars($issue->id)?>
<?php print form_error('issue_confirm')?>
</div>
</div>
<div>
<?php print form_hidden('issue_projectid', set_value('issue_projectid', $issue->projectid))?>
<?php print form_hidden('issue_id', set_value('issue_id', $issue->id))?>
</div>
<div>
<?php print form_submit('issue', $this->lang->line('Delete'))?>
</div>
<?php print form_close();?>
</div>
</div> <!-- mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->
</div> <!-- project_issue_delete_content -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</body>
</html>

View File

@ -1,173 +0,0 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="<?php print base_url_make('/js/codepot.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/issue.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/font-awesome.min.css')?>" />
<script type="text/javascript" src="<?php print base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/prettify.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-css.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-lisp.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-lua.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-sql.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-vb.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print 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",
"<?php print site_url()?>/wiki/show/<?php print $project->id?>/",
"<?php print site_url()?>/wiki/attachment0/<?php print $project->id?>/"
);
prettyPrint ();
}
$(function () {
$("#issue_edit_mainarea_description_preview_button").button().click(
function () {
render_wiki ($("#issue_edit_mainarea_description").val());
}
);
});
</script>
<title><?php print htmlspecialchars($issue->id)?></title>
</head>
<body>
<div class="content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$this->load->view (
'projectbar',
array (
'banner' => NULL,
'page' => array (
'type' => 'project',
'id' => 'issue',
'project' => $project,
),
'ctxmenuitems' => array ()
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="issue_edit_mainarea">
<?php
if ($message != "")
{
print '<div id="issue_edit_message" class="form_message">';
print htmlspecialchars($message);
print '</div>';
}
?>
<div class='form_container'>
<?php print form_open("issue/{$mode}/{$project->id}/".$this->converter->AsciiToHex($issue->id))?>
<div>
<?php print form_hidden('issue_id', set_value('issue_id', $issue->id))?>
<?php print form_hidden('issue_projectid', set_value('issue_projectid', $issue->projectid))?>
<?php print form_hidden('issue_status', set_value('issue_status', $issue->status))?>
<?php print form_hidden('issue_priority', set_value('issue_priority', $issue->priority))?>
<?php print form_hidden('issue_owner', set_value('issue_owner', $issue->owner))?>
</div>
<div id='issue_edit_mainarea_type' class='form_input_field'>
<?php
if ($mode == 'update')
{
print form_hidden('issue_type', set_value('issue_type', $issue->type));
}
else
{
print form_label($this->lang->line('Type').': ', 'issue_type');
print form_dropdown (
'issue_type',
$issue_type_array,
set_value('issue_type', $issue->type),
'id="issue_edit_mainarea_type"');
print form_error('issue_type');
}
?>
</div>
<div class='form_input_label'>
<?php print form_label($this->lang->line('Summary').': ', 'issue_summary')?>
<?php print form_error('issue_summary');?>
</div>
<div class='form_input_field'>
<?php print form_input('issue_summary',
set_value('issue_summary', $issue->summary),
'size="80" id="issue_edit_mainarea_summary"')
?>
</div>
<div class='form_input_label'>
<?php print form_label($this->lang->line('Description').': ', 'issue_description')?>
<a href='#' id='issue_edit_mainarea_description_preview_button'><?php print $this->lang->line('Preview')?></a>
<?php print form_error('issue_description');?>
</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>
<?php $caption = ($mode == 'update')? $this->lang->line('Update'): $this->lang->line('Create'); ?>
<?php print form_submit('issue', $caption)?>
<?php print form_close();?>
</div> <!-- form_container -->
</div> <!-- issue_edit_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->
</div> <!-- content -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</body>
</html>

View File

@ -35,7 +35,7 @@ $creole_file_base = site_url() . "/wiki/attachment0/{$project->id}/";
/* <![CDATA[ */
function show_alert (outputMsg, titleMsg)
{
$('#issue_home_mainarea_alert').html(outputMsg).dialog({
$('#issue_home_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
@ -65,7 +65,7 @@ function preview_new_description(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"issue_home_mainarea_new_description_preview",
"issue_home_new_description_preview",
"<?php print $creole_base; ?>",
"<?php print $creole_file_base; ?>"
);
@ -85,15 +85,15 @@ function populate_selected_files ()
var f = populated_file_obj[n];
if (f != null)
{
var d = $('#issue_home_mainarea_new_file_desc_' + n);
var d = $('#issue_home_new_file_desc_' + n);
if (d != null) issue_file_desc[f.name] = d.val();
}
}
$('#issue_home_mainarea_new_file_table').empty();
$('#issue_home_new_file_table').empty();
populated_file_obj = [];
var f = $('#issue_home_mainarea_new_files').get(0);
var f = $('#issue_home_new_files').get(0);
var f_no = 0;
for (var n = 0; n < f.files.length; n++)
{
@ -102,9 +102,9 @@ function populate_selected_files ()
var desc = issue_file_desc[f.files[n].name];
if (desc == null) desc = '';
$('#issue_home_mainarea_new_file_table').append (
$('#issue_home_new_file_table').append (
codepot_sprintf (
'<tr id="issue_home_mainarea_new_file_row_%d"><td><a href="#" id="issue_home_mainarea_new_file_cancel_%d" onClick="cancel_out_new_file(%d); return false;"><i class="fa fa-trash"></i></a></td><td>%s</td><td><input type="text" id="issue_home_mainarea_new_file_desc_%d" size="40" value="%s" /></td></tr>',
'<tr id="issue_home_new_file_row_%d"><td><a href="#" id="issue_home_new_file_cancel_%d" onClick="cancel_out_new_file(%d); return false;"><i class="fa fa-trash"></i></a></td><td>%s</td><td><input type="text" id="issue_home_new_file_desc_%d" size="40" value="%s" /></td></tr>',
f_no, f_no, f_no, codepot_htmlspecialchars(f.files[n].name), f_no, codepot_addslashes(desc)
)
);
@ -119,22 +119,22 @@ function populate_selected_files ()
function cancel_out_new_file (no)
{
$('#issue_home_mainarea_new_file_row_' + no).remove ();
$('#issue_home_new_file_row_' + no).remove ();
populated_file_obj[no] = null;
}
$(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$('#issue_home_mainarea_new_files').change (function () {
$('#issue_home_new_files').change (function () {
populate_selected_files ();
});
$('#issue_home_mainarea_new_description_tabs').tabs ();
$('#issue_home_mainarea_new_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_new_description ($('#issue_home_mainarea_new_description').val());
$('#issue_home_new_description_tabs').tabs ();
$('#issue_home_new_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_new_description ($('#issue_home_new_description').val());
});
$('#issue_home_mainarea_new_form').dialog (
$('#issue_home_new_form').dialog (
{
title: '<?php print $this->lang->line('New');?>',
resizable: true,
@ -163,7 +163,7 @@ $(function () {
{
form_data.append ('issue_new_file_' + f_no, f);
var d = $('#issue_home_mainarea_new_file_desc_' + i);
var d = $('#issue_home_new_file_desc_' + i);
if (d != null) form_data.append('issue_new_file_desc_' + f_no, d.val());
f_no++;
@ -171,11 +171,11 @@ $(function () {
}
form_data.append ('issue_new_file_count', f_no);
form_data.append ('issue_new_type', $('#issue_home_mainarea_new_type').val());
form_data.append ('issue_new_summary', $('#issue_home_mainarea_new_summary').val());
form_data.append ('issue_new_description', $('#issue_home_mainarea_new_description').val());
form_data.append ('issue_new_type', $('#issue_home_new_type').val());
form_data.append ('issue_new_summary', $('#issue_home_new_summary').val());
form_data.append ('issue_new_description', $('#issue_home_new_description').val());
$('#issue_home_mainarea_new_form').dialog('disable');
$('#issue_home_new_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/issue/xhr_create/{$project->id}"; ?>'),
type: 'POST',
@ -187,8 +187,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#issue_home_mainarea_new_form').dialog('enable');
$('#issue_home_mainarea_new_form').dialog('close');
$('#issue_home_new_form').dialog('enable');
$('#issue_home_new_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -202,8 +202,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#issue_home_mainarea_new_form').dialog('enable');
$('#issue_home_mainarea_new_form').dialog('close');
$('#issue_home_new_form').dialog('enable');
$('#issue_home_new_form').dialog('close');
var errmsg = '';
if (errmsg == '' && errorThrown != null) errmsg = errorThrown;
if (errmsg == '' && textStatus != null) errmsg = textStatus;
@ -219,7 +219,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#issue_home_mainarea_new_form').dialog('close');
$('#issue_home_new_form').dialog('close');
}
},
@ -231,7 +231,7 @@ $(function () {
);
<?php endif; ?>
$("#issue_home_mainarea_search_form").dialog ({
$("#issue_home_search_form").dialog ({
title: '<?php print $this->lang->line('Search')?>',
autoOpen: false,
modal: true,
@ -254,17 +254,17 @@ $(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$("#issue_home_mainarea_new_button").button().click (
$("#issue_home_new_button").button().click (
function () {
$('#issue_home_mainarea_new_form').dialog('open');
$('#issue_home_new_form').dialog('open');
return false; // prevent the default behavior
}
);
<?php endif; ?>
$("#issue_home_mainarea_search_button").button().click (
$("#issue_home_search_button").button().click (
function () {
$('#issue_home_mainarea_search_form').dialog('open');
$('#issue_home_search_form').dialog('open');
return false; // prevent the default behavior
}
);
@ -315,14 +315,14 @@ $this->load->view (
<div class="actions">
<?php printf ($this->lang->line('ISSUE_MSG_TOTAL_NUM_ISSUES'), $total_num_issues); ?>
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="issue_home_mainarea_new_button" href='#'><?php print $this->lang->line('New')?></a>
<a id="issue_home_new_button" href='#'><?php print $this->lang->line('New')?></a>
<?php endif; ?>
<a id="issue_home_mainarea_search_button" href='#'><?php print $this->lang->line('Search')?></a>
<a id="issue_home_search_button" href='#'><?php print $this->lang->line('Search')?></a>
</div>
<div style='clear: both;'></div>
</div>
<div class="result" id="issue_home_mainarea_result">
<div class="result" id="issue_home_result">
<?php
if (empty($issues))
{
@ -330,7 +330,7 @@ if (empty($issues))
}
else
{
print '<table id="issue_home_mainarea_result_table" class="full-width-result-table">';
print '<table id="issue_home_result_table" class="full-width-result-table">';
print '<tr class="heading">';
print '<th class="id">' . $this->lang->line('ID') . '</th>';
print '<th class="type">' . $this->lang->line('Type') . '</th>';
@ -381,50 +381,50 @@ else
print '</table>';
print '<div id="issue_home_mainarea_result_pages">';
print '<div id="issue_home_result_pages">';
print $page_links;
print '</div>';
}
?>
</div> <!-- issue_home_mainarea_result -->
</div> <!-- issue_home_result -->
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div id='issue_home_mainarea_new_form'>
<div id='issue_home_new_form'>
<div style='line-height: 2em;'>
<?php
print form_dropdown (
'issue_home_new_type',
$issue_type_array,
set_value('issue_home_new_type', ''),
'id="issue_home_mainarea_new_type"'
'id="issue_home_new_type"'
);
?>
<input type='text' id='issue_home_mainarea_new_summary' name='issue_home_new_summary' size='50' placeholder='<?php print $this->lang->line('Summary'); ?>'/>
<input type='text' id='issue_home_new_summary' name='issue_home_new_summary' size='50' placeholder='<?php print $this->lang->line('Summary'); ?>'/>
</div>
<div id='issue_home_mainarea_new_description_tabs' style='width:100%;'>
<div id='issue_home_new_description_tabs' style='width:100%;'>
<ul>
<li><a href='#issue_home_mainarea_new_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#issue_home_mainarea_new_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
<li><a href='#issue_home_new_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#issue_home_new_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
</ul>
<div id='issue_home_mainarea_new_description_input'>
<textarea type='textarea' id='issue_home_mainarea_new_description' name='issue_home_new_description' rows=24 cols=100 style='width:100%;'></textarea>
<div id='issue_home_new_description_input'>
<textarea type='textarea' id='issue_home_new_description' name='issue_home_new_description' rows=24 cols=100 style='width:100%;'></textarea>
<div style='margin-top: 0.1em;'>
<?php print $this->lang->line('Attachments'); ?>
<input type='file' id='issue_home_mainarea_new_files' name='issue_home_new_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='issue_home_mainarea_new_file_table'></table>
<input type='file' id='issue_home_new_files' name='issue_home_new_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='issue_home_new_file_table'></table>
</div>
</div>
<div id='issue_home_mainarea_new_description_preview' class='form_input_preview'>
<div id='issue_home_new_description_preview' class='form_input_preview'>
</div>
</div>
</div>
<?php endif; ?>
<div id="issue_home_mainarea_search_form">
<div id="issue_home_search_form">
<?php
$issue_type_array[''] = $this->lang->line('All');
$issue_status_array[''] = $this->lang->line('All');
@ -478,7 +478,7 @@ else
</form>
</div>
<div id='issue_home_mainarea_alert'></div>
<div id='issue_home_alert'></div>
</div> <!-- issue_home_mainarea -->

View File

@ -33,7 +33,7 @@ $creole_file_base = site_url() . "/issue/file/{$project->id}/{$issue->id}/";
function show_alert (outputMsg, titleMsg)
{
$('#issue_show_mainarea_alert').html(outputMsg).dialog({
$('#issue_show_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
@ -113,15 +113,15 @@ function populate_selected_files_for_adding ()
var f = populated_file_obj_for_adding[n];
if (f != null)
{
var d = $('#issue_show_mainarea_add_file_desc_' + n);
var d = $('#issue_show_add_file_desc_' + n);
if (d != null) file_desc[f.name] = d.val();
}
}
$('#issue_show_mainarea_add_file_table').empty();
$('#issue_show_add_file_table').empty();
populated_file_obj_for_adding = [];
var f = $('#issue_show_mainarea_add_files').get(0);
var f = $('#issue_show_add_files').get(0);
var f_no = 0;
for (var n = 0; n < f.files.length; n++)
{
@ -130,9 +130,9 @@ function populate_selected_files_for_adding ()
var desc = file_desc[f.files[n].name];
if (desc == null) desc = '';
$('#issue_show_mainarea_add_file_table').append (
$('#issue_show_add_file_table').append (
codepot_sprintf (
'<tr id="issue_show_mainarea_add_file_row_%d"><td><a href="#" id="issue_show_mainarea_add_file_cancel_%d" onClick="cancel_out_add_file(%d); return false;"><i class="fa fa-trash"></i></a></td><td>%s</td><td><input type="text" id="issue_show_mainarea_add_file_desc_%d" size="40" value="%s" /></td></tr>',
'<tr id="issue_show_add_file_row_%d"><td><a href="#" id="issue_show_add_file_cancel_%d" onClick="cancel_out_add_file(%d); return false;"><i class="fa fa-trash"></i></a></td><td>%s</td><td><input type="text" id="issue_show_add_file_desc_%d" size="40" value="%s" /></td></tr>',
f_no, f_no, f_no, codepot_htmlspecialchars(f.files[n].name), f_no, codepot_addslashes(desc)
)
);
@ -147,14 +147,14 @@ function populate_selected_files_for_adding ()
function cancel_out_add_file (no)
{
$('#issue_show_mainarea_add_file_row_' + no).remove ();
$('#issue_show_add_file_row_' + no).remove ();
populated_file_obj_for_adding[no] = null;
}
function kill_edit_file (no)
{
var n = $('#issue_show_mainarea_edit_file_name_' + no);
var d = $('#issue_show_mainarea_edit_file_desc_' + no);
var n = $('#issue_show_edit_file_name_' + no);
var d = $('#issue_show_edit_file_desc_' + no);
if (n && d)
{
if (d.prop('disabled'))
@ -175,7 +175,7 @@ function preview_edit_description (input_text)
{
creole_render_wiki_with_input_text (
input_text,
"issue_show_mainarea_edit_description_preview",
"issue_show_edit_description_preview",
"<?php print $creole_base; ?>",
"<?php print $creole_file_base; ?>/"
);
@ -209,18 +209,18 @@ var original_file_desc = [
$(function () {
$('#issue_show_mainarea_state').accordion({
$('#issue_show_state').accordion({
collapsible: true,
heightStyle: "content"
});
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$('#issue_show_mainarea_edit_description_tabs').tabs ();
$('#issue_show_mainarea_edit_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_edit_description ($('#issue_show_mainarea_edit_description').val());
$('#issue_show_edit_description_tabs').tabs ();
$('#issue_show_edit_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_edit_description ($('#issue_show_edit_description').val());
});
$('#issue_show_mainarea_edit_form').dialog (
$('#issue_show_edit_form').dialog (
{
title: '<?php print $this->lang->line('Edit');?>',
resizable: true,
@ -240,10 +240,10 @@ $(function () {
var form_data = new FormData();
form_data.append ('issue_edit_summary', $('#issue_show_mainarea_edit_summary').val());
form_data.append ('issue_edit_description', $('#issue_show_mainarea_edit_description').val());
form_data.append ('issue_edit_summary', $('#issue_show_edit_summary').val());
form_data.append ('issue_edit_description', $('#issue_show_edit_description').val());
$('#issue_show_mainarea_edit_form').dialog('disable');
$('#issue_show_edit_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/issue/xhr_update/{$project->id}/{$hex_issue_id}"; ?>'),
type: 'POST',
@ -255,8 +255,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#issue_show_mainarea_edit_form').dialog('enable');
$('#issue_show_mainarea_edit_form').dialog('close');
$('#issue_show_edit_form').dialog('enable');
$('#issue_show_edit_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -270,8 +270,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#issue_show_mainarea_edit_form').dialog('enable');
$('#issue_show_mainarea_edit_form').dialog('close');
$('#issue_show_edit_form').dialog('enable');
$('#issue_show_edit_form').dialog('close');
var errmsg = '';
if (errmsg == '' && errorThrown != null) errmsg = errorThrown;
if (errmsg == '' && textStatus != null) errmsg = textStatus;
@ -287,7 +287,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#issue_show_mainarea_edit_form').dialog('close');
$('#issue_show_edit_form').dialog('close');
}
},
@ -298,7 +298,7 @@ $(function () {
}
);
$('#issue_show_mainarea_delete_form').dialog (
$('#issue_show_delete_form').dialog (
{
title: '<?php print $this->lang->line('Delete');?>',
resizable: true,
@ -317,10 +317,10 @@ $(function () {
var form_data = new FormData();
var f = $('#issue_show_mainarea_delete_confirm');
var f = $('#issue_show_delete_confirm');
if (f != null && f.is(':checked')) form_data.append ('issue_delete_confirm', 'Y');
$('#issue_show_mainarea_delete_form').dialog('disable');
$('#issue_show_delete_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/issue/xhr_delete/{$project->id}/{$hex_issue_id}"; ?>'),
type: 'POST',
@ -332,8 +332,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#issue_show_mainarea_delete_form').dialog('enable');
$('#issue_show_mainarea_delete_form').dialog('close');
$('#issue_show_delete_form').dialog('enable');
$('#issue_show_delete_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -347,8 +347,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#issue_show_mainarea_delete_form').dialog('enable');
$('#issue_show_mainarea_delete_form').dialog('close');
$('#issue_show_delete_form').dialog('enable');
$('#issue_show_delete_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -360,7 +360,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#issue_show_mainarea_delete_form').dialog('close');
$('#issue_show_delete_form').dialog('close');
}
},
@ -374,11 +374,11 @@ $(function () {
$('#issue_show_mainarea_add_files').change (function () {
$('#issue_show_add_files').change (function () {
populate_selected_files_for_adding ();
});
$('#issue_show_mainarea_add_file_form').dialog (
$('#issue_show_add_file_form').dialog (
{
title: '<?php print $this->lang->line('Add');?>',
resizable: true,
@ -405,14 +405,14 @@ $(function () {
{
form_data.append ('issue_add_file_' + f_no, f);
var d = $('#issue_show_mainarea_add_file_desc_' + i);
var d = $('#issue_show_add_file_desc_' + i);
if (d != null) form_data.append('issue_add_file_desc_' + f_no, d.val());
f_no++;
}
}
form_data.append ('issue_add_file_count', f_no);
$('#issue_show_mainarea_add_file_form').dialog('disable');
$('#issue_show_add_file_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/issue/xhr_add_file/{$project->id}/{$hex_issue_id}"; ?>'),
type: 'POST',
@ -424,8 +424,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#issue_show_mainarea_add_file_form').dialog('enable');
$('#issue_show_mainarea_add_file_form').dialog('close');
$('#issue_show_add_file_form').dialog('enable');
$('#issue_show_add_file_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -439,8 +439,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#issue_show_mainarea_add_file_form').dialog('enable');
$('#issue_show_mainarea_add_file_form').dialog('close');
$('#issue_show_add_file_form').dialog('enable');
$('#issue_show_add_file_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -452,7 +452,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#issue_show_mainarea_add_file_form').dialog('close');
$('#issue_show_add_file_form').dialog('close');
}
},
@ -464,7 +464,7 @@ $(function () {
}
);
$('#issue_show_mainarea_edit_file_form').dialog (
$('#issue_show_edit_file_form').dialog (
{
title: '<?php print $this->lang->line('Edit');?>',
resizable: true,
@ -486,8 +486,8 @@ $(function () {
var f_no = 0;
for (var i = 0; i <= <?php print $issue_file_count; ?>; i++)
{
var n = $('#issue_show_mainarea_edit_file_name_' + i);
var d = $('#issue_show_mainarea_edit_file_desc_' + i);
var n = $('#issue_show_edit_file_name_' + i);
var d = $('#issue_show_edit_file_desc_' + i);
if (n && d)
{
@ -507,7 +507,7 @@ $(function () {
}
form_data.append ('issue_edit_file_count', f_no);
$('#issue_show_mainarea_edit_file_form').dialog('disable');
$('#issue_show_edit_file_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/issue/xhr_edit_file/{$project->id}/{$hex_issue_id}"; ?>'),
type: 'POST',
@ -519,8 +519,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#issue_show_mainarea_edit_file_form').dialog('enable');
$('#issue_show_mainarea_edit_file_form').dialog('close');
$('#issue_show_edit_file_form').dialog('enable');
$('#issue_show_edit_file_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -534,8 +534,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#issue_show_mainarea_edit_file_form').dialog('enable');
$('#issue_show_mainarea_edit_file_form').dialog('close');
$('#issue_show_edit_file_form').dialog('enable');
$('#issue_show_edit_file_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -547,7 +547,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#issue_show_mainarea_edit_file_form').dialog('close');
$('#issue_show_edit_file_form').dialog('close');
}
},
@ -568,7 +568,7 @@ $(function () {
*/
/*$("#issue_change_owner").combobox();*/
$("#issue_show_mainarea_change_form").dialog (
$("#issue_show_change_form").dialog (
{
title: '<?php print $this->lang->line('Change')?>',
autoOpen: false,
@ -600,42 +600,42 @@ $(function () {
);
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$('#issue_show_mainarea_edit_button').button().click (
$('#issue_show_edit_button').button().click (
function () {
$('#issue_show_mainarea_edit_form').dialog('open');
$('#issue_show_edit_form').dialog('open');
return false; // prevent the default behavior
}
);
$('#issue_show_mainarea_delete_button').button().click (
$('#issue_show_delete_button').button().click (
function () {
$('#issue_show_mainarea_delete_form').dialog('open');
$('#issue_show_delete_form').dialog('open');
return false; // prevent the default behavior
}
);
$('#issue_show_mainarea_add_file_button').button().click (
$('#issue_show_add_file_button').button().click (
function() {
$('#issue_show_mainarea_add_file_form').dialog('open');
$('#issue_show_add_file_form').dialog('open');
return false;
}
);
$('#issue_show_mainarea_edit_file_button').button().click (
$('#issue_show_edit_file_button').button().click (
function() {
$('#issue_show_mainarea_edit_file_form').dialog('open');
$('#issue_show_edit_file_form').dialog('open');
return false;
}
);
<?php endif; ?>
$('#issue_show_mainarea_change_form_open').button().click (
$('#issue_show_change_form_open').button().click (
function () {
$('#issue_show_mainarea_change_form').dialog('open');
$('#issue_show_change_form').dialog('open');
return false;
}
);
$('#issue_show_mainarea_undo_change_confirm').dialog (
$('#issue_show_undo_change_confirm').dialog (
{
title: '<?php print $this->lang->line('Undo')?>',
resizable: false,
@ -655,9 +655,9 @@ $(function () {
}
);
$('#issue_show_mainarea_undo_change').button().click (
$('#issue_show_undo_change').button().click (
function () {
$('#issue_show_mainarea_undo_change_confirm').dialog('open');
$('#issue_show_undo_change_confirm').dialog('open');
return false;
}
);
@ -723,10 +723,10 @@ $this->load->view (
<?php
if (isset($login['id']) && $login['id'] != '')
{
print '<a id="issue_show_mainarea_edit_button" href="#">';
print '<a id="issue_show_edit_button" href="#">';
print $this->lang->line('Edit');
print '</a>';
print '<a id="issue_show_mainarea_delete_button" href="#">';
print '<a id="issue_show_delete_button" href="#">';
print $this->lang->line('Delete');
print '</a>';
}
@ -735,9 +735,9 @@ $this->load->view (
<div style='clear: both;'></div>
</div>
<div id='issue_show_mainarea_state' class='collapsible-box'>
<div id='issue_show_mainarea_state_header' class='collapsible-box-header'><?php print $this->lang->line('State')?></div>
<div id='issue_show_mainarea_state_body'>
<div id='issue_show_state' class='collapsible-box'>
<div id='issue_show_state_header' class='collapsible-box-header'><?php print $this->lang->line('State')?></div>
<div id='issue_show_state_body'>
<ul>
<?php
@ -782,19 +782,19 @@ $this->load->view (
</div>
<div id="issue_show_mainarea_description">
<pre id="issue_show_mainarea_description_pre" style="visibility: hidden">
<div id="issue_show_description">
<pre id="issue_show_description_pre" style="visibility: hidden">
<?php print htmlspecialchars($issue->description); ?>
</pre>
</div> <!-- issue_show_mainarea_description -->
</div> <!-- issue_show_description -->
<div id="issue_show_mainarea_files">
<div id="issue_show_files">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<i class='fa fa-plug'></i> <?php print $this->lang->line('Attachments'); ?>
<a id="issue_show_mainarea_add_file_button" href='#'><?php print $this->lang->line('Add')?></a>
<a id="issue_show_mainarea_edit_file_button" href='#'><?php print $this->lang->line('Edit')?></a>
<a id="issue_show_add_file_button" href='#'><?php print $this->lang->line('Add')?></a>
<a id="issue_show_edit_file_button" href='#'><?php print $this->lang->line('Edit')?></a>
<?php elseif (!empty($issue->files)): ?>
<i class='fa fa-plug'></i> <?php print $this->lang->line('Attachments'); ?>
<?php endif; ?>
@ -821,7 +821,7 @@ $this->load->view (
</div>
<div id="issue_show_mainarea_changes">
<div id="issue_show_changes">
<?php
$commentno = 0;
@ -835,18 +835,18 @@ $this->load->view (
print '</span>';
print '<a id="issue_show_mainarea_change_form_open" href="#">';
print '<a id="issue_show_change_form_open" href="#">';
print $this->lang->line('Change');
print '</a>';
print ' ';
print '<a id="issue_show_mainarea_undo_change" href="#">';
print '<a id="issue_show_undo_change" href="#">';
print $this->lang->line('Undo');
print '</a>';
print '</div>';
print '<table id="issue_show_mainarea_changes_table" class="full-width-result-table">';
print '<table id="issue_show_changes_table" class="full-width-result-table">';
while ($count > 1)
{
$new = $issue->changes[--$count];
@ -865,8 +865,8 @@ $this->load->view (
print '<td class="details">';
if ($new->comment != "")
{
print "<div id='issue_show_mainarea_changes_comment_{$commentno}' class='issue_changes_comment'>";
print "<pre id='issue_show_mainarea_changes_comment_pre_{$commentno}'>";
print "<div id='issue_show_changes_comment_{$commentno}' class='issue_changes_comment'>";
print "<pre id='issue_show_changes_comment_pre_{$commentno}'>";
print htmlspecialchars($new->comment);
print '</pre>';
print '</div>';
@ -955,46 +955,46 @@ $this->load->view (
</div>
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div id='issue_show_mainarea_edit_form'>
<div id='issue_show_edit_form'>
<div style='line-height: 2em;'>
<?php
print form_dropdown (
'issue_show_edit_type',
$issue_type_array,
set_value('issue_show_edit_type', $issue->type),
'id="issue_show_mainarea_edit_type" disabled="disabled"'
'id="issue_show_edit_type" disabled="disabled"'
);
?>
<input type='text' id='issue_show_mainarea_edit_summary' name='issue_show_edit_summary' size='50' placeholder='<?php print $this->lang->line('Summary'); ?>' value='<?php print addslashes($issue->summary); ?>'/>
<input type='text' id='issue_show_edit_summary' name='issue_show_edit_summary' size='50' placeholder='<?php print $this->lang->line('Summary'); ?>' value='<?php print addslashes($issue->summary); ?>'/>
</div>
<div id='issue_show_mainarea_edit_description_tabs' style='width:100%;'>
<div id='issue_show_edit_description_tabs' style='width:100%;'>
<ul>
<li><a href='#issue_show_mainarea_edit_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#issue_show_mainarea_edit_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
<li><a href='#issue_show_edit_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#issue_show_edit_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
</ul>
<div id='issue_show_mainarea_edit_description_input'>
<textarea type='textarea' id='issue_show_mainarea_edit_description' name='issue_show_edit_description' rows=24 cols=100 style='width:100%;'><?php print htmlspecialchars($issue->description); ?></textarea>
<div id='issue_show_edit_description_input'>
<textarea type='textarea' id='issue_show_edit_description' name='issue_show_edit_description' rows=24 cols=100 style='width:100%;'><?php print htmlspecialchars($issue->description); ?></textarea>
</div>
<div id='issue_show_mainarea_edit_description_preview' class='form_input_preview'>
<div id='issue_show_edit_description_preview' class='form_input_preview'>
</div>
</div>
</div>
<div id='issue_show_mainarea_delete_form'>
<input type='checkbox' id='issue_show_mainarea_delete_confirm' />
<div id='issue_show_delete_form'>
<input type='checkbox' id='issue_show_delete_confirm' />
<?php print $this->lang->line('MSG_SURE_TO_DELETE_THIS') . ' - ' . $issue->id . ': ' . htmlspecialchars($issue->summary); ?>
</div>
<div id='issue_show_mainarea_add_file_form'>
<div id='issue_show_mainarea_add_file_input'>
<input type='file' id='issue_show_mainarea_add_files' name='issue_show_add_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='issue_show_mainarea_add_file_table'></table>
<div id='issue_show_add_file_form'>
<div id='issue_show_add_file_input'>
<input type='file' id='issue_show_add_files' name='issue_show_add_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='issue_show_add_file_table'></table>
</div>
</div>
<div id='issue_show_mainarea_edit_file_form'>
<div id='issue_show_edit_file_form'>
<table>
<?php
@ -1005,9 +1005,9 @@ $this->load->view (
print '<tr><td>';
printf ('<a href="#" onClick="kill_edit_file(%d); return false;"><i class="fa fa-trash"></i></a>', $i);
print '</td><td>';
printf ('<span id="issue_show_mainarea_edit_file_name_%d">%s</span>', $i, htmlspecialchars($f->filename));
printf ('<span id="issue_show_edit_file_name_%d">%s</span>', $i, htmlspecialchars($f->filename));
print '</td><td>';
printf ('<input type="text" id="issue_show_mainarea_edit_file_desc_%d" value="%s" size="40" autocomplete="off" />', $i, addslashes($f->description));
printf ('<input type="text" id="issue_show_edit_file_desc_%d" value="%s" size="40" autocomplete="off" />', $i, addslashes($f->description));
print '</td></tr>';
}
?>
@ -1016,7 +1016,7 @@ $this->load->view (
<?php endif; ?>
<div id="issue_show_mainarea_change_form">
<div id="issue_show_change_form">
<?php print form_open("issue/show/{$project->id}/{$hex_issue_id}/", 'id="issue_change_form"')?>
@ -1096,11 +1096,11 @@ $this->load->view (
</div> <!-- issue_show_change_form -->
<div id="issue_show_mainarea_undo_change_confirm">
<div id="issue_show_undo_change_confirm">
<?php print $this->lang->line ('ISSUE_MSG_CONFIRM_UNDO')?>
</div>
<div id='issue_show_mainarea_alert'></div>
<div id='issue_show_alert'></div>
</div> <!-- issue_show_mainarea -->
@ -1118,8 +1118,8 @@ $this->load->view (
function render_wiki()
{
creole_render_wiki (
"issue_show_mainarea_description_pre",
"issue_show_mainarea_description",
"issue_show_description_pre",
"issue_show_description",
"<?php print $creole_base?>",
"<?php print $creole_file_base?>"
);
@ -1130,8 +1130,8 @@ function render_wiki()
for ($xxx = 0; $xxx < $commentno; $xxx++)
{
print "creole_render_wiki (
'issue_show_mainarea_changes_comment_pre_{$xxx}',
'issue_show_mainarea_changes_comment_{$xxx}',
'issue_show_changes_comment_pre_{$xxx}',
'issue_show_changes_comment_{$xxx}',
'{$creole_base}',
'{$creole_file_base}');";
}

View File

@ -23,7 +23,7 @@
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
<?php
$hexname = $this->converter->AsciiToHex ($wiki->name);
$hex_wikiname = $this->converter->AsciiToHex ($wiki->name);
?>
<script type="text/javascript">
@ -48,7 +48,7 @@ function render_wiki(input_text)
input_text,
"wiki_edit_mainarea_text_preview",
"<?php print site_url()?>/wiki/show/<?php print $project->id?>/",
"<?php print site_url()?>/wiki/attachment/<?php print $project->id?>/<?php print $hexname?>/"
"<?php print site_url()?>/wiki/attachment/<?php print $project->id?>/<?php print $hex_wikiname?>/"
);
prettyPrint ();
@ -72,6 +72,7 @@ $(function () {
$("#wiki_edit_mainarea_text_preview_button").button().click(
function () {
render_wiki ($("#wiki_edit_mainarea_text").val());
return false;
}
);
});
@ -220,6 +221,7 @@ $this->load->view (
<?php print form_close();?>
</div> <!-- form_container -->
</div> <!-- wiki_edit_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->

View File

@ -0,0 +1,256 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="<?php print base_url_make('/js/codepot.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/common.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/wiki.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/font-awesome.min.css')?>" />
<script type="text/javascript" src="<?php print base_url_make('/js/creole.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/prettify.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-css.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-lisp.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-lua.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-sql.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/prettify/lang-vb.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/jquery.min.js')?>"></script>
<script type="text/javascript" src="<?php print base_url_make('/js/jquery-ui.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
<script type="text/javascript" src="<?php print base_url_make('/js/medium-editor.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/medium-editor.min.css')?>" />
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/medium-editor-theme.min.css')?>" />
<script type="text/javascript" src="<?php print base_url_make('/js/medium-editor-tables.min.js')?>"></script>
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/medium-editor-tables.min.css')?>" />
<?php
$hex_wikiname = $this->converter->AsciiToHex ($wiki->name);
?>
<script type="text/javascript">
function show_alert (outputMsg, titleMsg)
{
$('#wiki_edit_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
width: 'auto',
height: 'auto',
buttons: {
"OK": function () {
$(this).dialog("close");
}
}
});
}
function resize_editor()
{
var titleband = $("#wiki_edit_title_band");
var editor = $("#wiki_edit_text_editor");
var attachment = $("#wiki_edit_attachment");
var footer = $("#codepot_footer");
editor.height(0); // to prevent from continuous growing. it seems to affect footer placement when not set to 0.
var ioff = titleband.offset();
var foff = footer.offset();
ioff.top += titleband.outerHeight() + 5 + attachment.outerHeight() + 10;
editor.offset (ioff);
//editor.innerHeight (foff.top - ioff.top - 5);
editor.height (foff.top - ioff.top - 5);
editor.innerWidth (titleband.innerWidth());
}
var new_attachment_no = 0;
var wiki_text_editor = null;
$(function () {
$('#wiki_edit_more_new_attachment').button().click (
function () {
var html = [
'<li><input type="file" name="wiki_new_attachment_',
++new_attachment_no,
'" /></li>'
].join("");
$('#wiki_edit_new_attachment_list').append (html);
resize_editor();
return false;
}
);
wiki_text_editor = new MediumEditor('#wiki_edit_text_editor', {
autoLink: true,
imageDragging: true,
buttonLabels: 'fontawesome',
toolbar: {
allowMultiParagraphSelection: true,
buttons: ['bold', 'italic', 'underline', 'strikethrough',
'anchor', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
'subscript', 'superscript', 'quote', 'pre',
'orderedlist', 'unorderedlist', 'indent', 'outdent',
'justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull',
'removeFormat', 'table'],
diffLeft: 0,
diffTop: -10,
firstButtonClass: 'medium-editor-button-first',
lastButtonClass: 'medium-editor-button-last',
standardizeSelectionStart: false,
static: false,
relativeContainer: null,
/* options which only apply when static is true */
align: 'center',
sticky: false,
updateOnEmptySelection: false
},
paste: {
forcePlainText: false,
cleanPastedHTML: true,
cleanReplacements: [],
cleanAttrs: ['class', 'style', 'dir'],
cleanTags: ['meta']
},
extensions: {
table: new MediumEditorTable()
}
});
$("#wiki_edit_save_button").button().click (function() {
// TODO:
var e = wiki_text_editor.serialize();
alert (e.wiki_edit_text_editor.value);
//console.log ("%o", wiki_text_editor);
//console.log ("%o", e);
return false;
});
$(window).resize(resize_editor);
resize_editor ();
});
</script>
<title><?php print htmlspecialchars($wiki->name)?></title>
</head>
<body>
<div class="content">
<!---------------------------------------------------------------------------->
<?php $this->load->view ('taskbar'); ?>
<!---------------------------------------------------------------------------->
<?php
$this->load->view (
'projectbar',
array (
'banner' => NULL,
'page' => array (
'type' => 'project',
'id' => 'wiki',
'project' => $project,
),
'ctxmenuitems' => array ()
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="wiki_edit_mainarea">
<div class="title-band" id="wiki_edit_title_band">
<div class="title"><input type="text" name="wiki_name" value="" maxlength="80" size="40" id="wiki_edit_name" placeholder="<?php print $this->lang->line('Name'); ?>" /></div>
<div class="actions">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="wiki_edit_save_button" href='#'><?php print $this->lang->line('Save')?></a>
<?php endif; ?>
</div>
<div style='clear: both'></div>
</div>
<div id='wiki_edit_attachment'>
<?php if (!empty($wiki->attachments)): ?>
<?php print form_label($this->lang->line('WIKI_ATTACHMENTS').': ', 'wiki_edit_attachment_list')?>
<ul id='wiki_edit_attachment_list'>
<?php
foreach ($wiki->attachments as $att)
{
$hexattname =
$this->converter->AsciiToHex($att->name) .
'@' .
$this->converter->AsciiToHex($att->encname);
$escattname = htmlspecialchars($att->name);
print '<li>';
print "<input type='checkbox' name='wiki_delete_attachment[]' value='{$hexattname}' title='Check to delete {$escattname}'/>";
print $escattname;
print '</li>';
}
?>
</ul>
<?php endif; ?>
<?php print form_label($this->lang->line('WIKI_NEW_ATTACHMENTS').': ', 'wiki_edit_new_attachment_list')?>
<a href='#' id='wiki_edit_more_new_attachment'>
<?php print $this->lang->line('WIKI_MORE_NEW_ATTACHMENTS')?>
</a>
<ul id='wiki_edit_new_attachment_list'>
<li>
<input type='file' name='wiki_new_attachment_0' />
<!--<input type='checkbox' name='wiki_delete_attachment[]' value='delete'/>Delete-->
</li>
</ul>
</div>
<div id="wiki_edit_result">
<input type="hidden" name="wiki_projectid" value="<?php print addslashes($wiki->projectid); ?>" id="wiki_edit_projectid" />
<?php if ($mode == 'update'): ?>
<input type="hidden" name="wiki_original_name" value="<?php print addslashes($wiki->name); ?>" id="wiki_edit_original_name" />
<?php endif; ?>
<div id='wiki_edit_text_editor'></div>
</div> <!-- wiki_edit_result -->
<div id='wiki_edit_alert'></div>
</div> <!-- wiki_edit_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->
</div> <!-- content -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</body>
</html>

View File

@ -15,6 +15,42 @@
<link type="text/css" rel="stylesheet" href="<?php print base_url_make('/css/jquery-ui.css')?>" />
<title><?php print htmlspecialchars($project->name)?></title>
<script type="text/javascript">
/* <![CDATA[ */
function show_alert (outputMsg, titleMsg)
{
$('#wiki_home_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
width: 'auto',
height: 'auto',
buttons: {
"OK": function () {
$(this).dialog("close");
}
}
});
}
$(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$("#wiki_home_new_button").button().click (
function () {
//$('#wiki_home_new_form').dialog('open');
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/createx/{$project->id}"; ?>'));
return false;
}
);
<?php endif; ?>
});
/* ]]> */
</script>
</head>
<body>
@ -55,6 +91,10 @@ $this->load->view (
<div class="title"><?php print $this->lang->line('Wikis');?></div>
<div class="actions">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="wiki_home_new_button" href='#'><?php print $this->lang->line('New')?></a>
<?php endif; ?>
<!-- <a id="wiki_home_search_button" href='#'><?php print $this->lang->line('Search')?></a> -->
</div>
<div style='clear: both'></div>
@ -78,6 +118,9 @@ else
}
?>
</div>
<div id='wiki_home_alert'></div>
</div> <!-- wiki_home_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->

View File

@ -41,7 +41,7 @@ function render_wiki()
if (x_column_count > 1)
{
column_count = x_column_count.toString();
$("#wiki_show_mainarea_wiki").css ({
$("#wiki_show_wiki").css ({
"-moz-column-count": column_count,
"-webkit-column-count": column_count,
"column-count": column_count
@ -49,8 +49,8 @@ function render_wiki()
}
creole_render_wiki (
"wiki_show_mainarea_wiki_text",
"wiki_show_mainarea_wiki",
"wiki_show_wiki_text",
"wiki_show_wiki",
"<?php print site_url()?>/wiki/show/<?php print $project->id?>/",
"<?php print site_url()?>/wiki/attachment/<?php print $project->id?>/<?php print $hexname?>/"
);
@ -59,7 +59,7 @@ function render_wiki()
}
$(function () {
$('#wiki_show_mainarea_metadata').accordion({
$('#wiki_show_metadata').accordion({
collapsible: true,
heightStyle: "content"
});
@ -113,14 +113,14 @@ $this->load->view (
<div style='clear: both'></div>
</div>
<div id="wiki_show_mainarea_result" class="result">
<div id="wiki_show_result" class="result">
<div id='wiki_show_mainarea_metadata' class='collapsible-box'>
<div id='wiki_show_mainarea_metadata_header' class='collapsible-box-header'><?php print $this->lang->line('Metadata')?></div>
<div id='wiki_show_mainarea_metadata_body'>
<div id='wiki_show_metadata' class='collapsible-box'>
<div id='wiki_show_metadata_header' class='collapsible-box-header'><?php print $this->lang->line('Metadata')?></div>
<div id='wiki_show_metadata_body'>
<div id='wiki_show_mainarea_metadata_list_div'>
<ul id='wiki_show_mainarea_metadata_list'>
<div id='wiki_show_metadata_list_div'>
<ul id='wiki_show_metadata_list'>
<li><?php print $this->lang->line('Created on')?> <?php print codepot_dbdatetodispdate($wiki->createdon); ?></li>
<li><?php print $this->lang->line('Created by')?> <?php print htmlspecialchars($wiki->createdby); ?></li>
<li><?php print $this->lang->line('Last updated on')?> <?php print codepot_dbdatetodispdate($wiki->updatedon); ?></li>
@ -128,8 +128,8 @@ $this->load->view (
</ul>
</div>
<div id='wiki_show_mainarea_attachment_list_div'>
<ul id='wiki_show_mainarea_attachment_list'>
<div id='wiki_show_attachment_list_div'>
<ul id='wiki_show_attachment_list'>
<?php
foreach ($wiki->attachments as $att)
{
@ -150,13 +150,13 @@ $this->load->view (
</div>
<div class="result" id="wiki_show_mainarea_wiki">
<pre id="wiki_show_mainarea_wiki_text" style="visibility: hidden">
<div class="result" id="wiki_show_wiki">
<pre id="wiki_show_wiki_text" style="visibility: hidden">
<?php print htmlspecialchars($wiki->text); ?>
</pre>
</div> <!-- wiki_show_mainarea_wiki -->
</div> <!-- wiki_show_wiki -->
</div> <!-- wiki_show_mainarea_result -->
</div> <!-- wiki_show_result -->
</div> <!-- wiki_show_mainarea -->

View File

@ -10,6 +10,9 @@ www_DATA = \
jquery-ui.css \
jqueryui-editable.css \
log.css \
medium-editor.min.css \
medium-editor-tables.min.css \
medium-editor-theme.min.css \
project.css \
site.css \
user.css \

View File

@ -163,6 +163,9 @@ www_DATA = \
jquery-ui.css \
jqueryui-editable.css \
log.css \
medium-editor.min.css \
medium-editor-tables.min.css \
medium-editor-theme.min.css \
project.css \
site.css \
user.css \

View File

@ -193,7 +193,7 @@
/*-----------------------------------------------
* project source edit view
*-----------------------------------------------*/
#code_edit_mainarea_result_code {
#code_edit_result_code {
font-family: consolas, monaco, "Andale Mono", monospace;
overflow: auto;
border: none;

View File

@ -95,107 +95,107 @@ li.issue-owner {
/*---------------------------------------------
* issue home
*---------------------------------------------*/
#issue_home_mainarea_result {
#issue_home_result {
overflow: auto;
}
#issue_home_mainarea_result_table tr {
#issue_home_result_table tr {
vertical-align: text-top;
}
#issue_home_mainarea_result_table tr.new td.status,
#issue_home_mainarea_result_table tr.new td.summary {
#issue_home_result_table tr.new td.status,
#issue_home_result_table tr.new td.summary {
background-color: #ffccbb;
background-color: rgba(255, 204, 187, 0.5);
}
#issue_home_mainarea_result_table tr.accepted td.status,
#issue_home_mainarea_result_table tr.accepted td.summary {
#issue_home_result_table tr.accepted td.status,
#issue_home_result_table tr.accepted td.summary {
}
#issue_home_mainarea_result_table tr.rejected td.status,
#issue_home_mainarea_result_table tr.rejected td.summary {
#issue_home_result_table tr.rejected td.status,
#issue_home_result_table tr.rejected td.summary {
background-color: #ffeedd;
background-color: rgba(255, 238, 221, 0.5);
}
#issue_home_mainarea_result_table tr.started td.status,
#issue_home_mainarea_result_table tr.started td.summary {
#issue_home_result_table tr.started td.status,
#issue_home_result_table tr.started td.summary {
background-color: #ddeeff;
background-color: rgba(221, 238, 255, 0.5);
}
#issue_home_mainarea_result_table tr.stalled td.status,
#issue_home_mainarea_result_table tr.stalled td.summary {
#issue_home_result_table tr.stalled td.status,
#issue_home_result_table tr.stalled td.summary {
background-color: #bbccff;
background-color: rgba(187, 204, 255, 0.5);
}
#issue_home_mainarea_result_table tr.resolved td.status,
#issue_home_mainarea_result_table tr.resolved td.summary {
#issue_home_result_table tr.resolved td.status,
#issue_home_result_table tr.resolved td.summary {
background-color: #ddffdd;
background-color: rgba(221, 255, 221, 0.5);
}
#issue_home_mainarea_result_table tr.other td.status,
#issue_home_mainarea_result_table tr.other td.summary {
#issue_home_result_table tr.other td.status,
#issue_home_result_table tr.other td.summary {
background-color: #ddeeff;
background-color: rgba(221, 238, 255, 0.5);
}
#issue_home_mainarea_result_table td.id,
#issue_home_mainarea_result_table td.type,
#issue_home_mainarea_result_table td.status,
#issue_home_mainarea_result_table td.priority,
#issue_home_mainarea_result_table td.owner {
#issue_home_result_table td.id,
#issue_home_result_table td.type,
#issue_home_result_table td.status,
#issue_home_result_table td.priority,
#issue_home_result_table td.owner {
width: 1px;
}
#issue_home_mainarea_result_table td.summary {
#issue_home_result_table td.summary {
white-space: normal;
}
#issue_home_mainarea_result_pages {
#issue_home_result_pages {
margin-top: 1em;
text-align: center;
width: 100%;
}
#issue_home_mainarea_search_form {
#issue_home_search_form {
}
#issue_home_mainarea_search_form div {
#issue_home_search_form div {
padding: 0.2em;
}
/*---------------------------------------------
* issue show
*---------------------------------------------*/
#issue_show_mainarea_state_body {
#issue_show_state_body {
background-color: #FCFCFC;
padding: 1em 1em;
}
#issue_show_mainarea_state_body ul {
#issue_show_state_body ul {
padding: 0;
margin: 0;
list-style: outside none none;
}
#issue_show_mainarea_state_body ul li {
#issue_show_state_body ul li {
padding: 0.2em 0.2em 0.2em 0.2em;
margin: 0 0.2em 0 0.2em;
float: left;
}
#issue_show_mainarea_change_form {
#issue_show_change_form {
}
#issue_show_mainarea_change_form div {
#issue_show_change_form div {
padding: 0.2em;
}
#issue_show_mainarea_change_form textarea {
#issue_show_change_form textarea {
-moz-box-shadow: 0 2px 4px #bbb inset;
-webkit-box-shadow: 0 2px 4px #BBB inset;
box-shadow: 0 2px 4px #BBB inset;
@ -208,47 +208,47 @@ li.issue-owner {
font-size: 0.9em;
}
#issue_show_mainarea_files {
#issue_show_files {
padding-top: 0.5em;
}
#issue_show_mainarea_changes {
#issue_show_changes {
margin-top: 1em;
padding-top: 0.5em;
padding-bottom: 0.5em;
overflow: auto;
}
#issue_show_mainarea_changes .infostrip {
#issue_show_changes .infostrip {
margin-bottom: 0.5em;
}
#issue_show_mainarea_changes .infostrip .title {
#issue_show_changes .infostrip .title {
float: left;
}
#issue_show_mainarea_changes_table td.date {
#issue_show_changes_table td.date {
min-width: 5em;
width: 1px;
}
#issue_show_mainarea_changes_table td.updater {
#issue_show_changes_table td.updater {
width: 1px;
}
#issue_show_mainarea_changes_table td.details {
#issue_show_changes_table td.details {
overflow: auto;
}
#issue_show_mainarea_changes_table td.details .list {
#issue_show_changes_table td.details .list {
background-color: #F1F1FF;
}
#issue_show_mainarea_changes_table td.details .list ul li {
#issue_show_changes_table td.details .list ul li {
padding-bottom: 0.3em;
}
#issue_show_mainarea_changes_table .issue_changes_comment .prettyprint {
#issue_show_changes_table .issue_changes_comment .prettyprint {
/* special pre-wrap rule to make the pretty-printed text to wrap
* in the issue comment listing. i didn't manage to get oveflow: auto
* or overflow: scroll to make make a scroll bar show up. */
@ -293,51 +293,28 @@ li.issue-owner {
font-size: 0.8em;
}
/*---------------------------------------------
* issue edit
*---------------------------------------------*/
#issue_edit_mainarea_type {
padding-bottom: 0.3em;
}
#issue_edit_mainarea form textarea {
display: block;
padding: 1px;
font-size: inherit;
width: 100%;
}
#project_issue_summary {
width: 100%;
}
#issue_edit_mainarea_buttons {
padding-top: 0.5em;
}
/*-----------------------------------------------
* issue home view - new issue dialog
*-----------------------------------------------*/
#issue_home_mainarea_new_description_tabs {
#issue_home_new_description_tabs {
border: none !important;
}
#issue_home_mainarea_new_description_tabs .ui-tabs-panel {
#issue_home_new_description_tabs .ui-tabs-panel {
padding: 0.2em 0em 0em 0em !important;
}
#issue_home_mainarea_new_description_tabs .ui-widget-header {
#issue_home_new_description_tabs .ui-widget-header {
border: none !important;
background: none !important;
padding: 0em !important;
}
#issue_home_mainarea_new_description_tabs .ui-tabs-nav {
#issue_home_new_description_tabs .ui-tabs-nav {
padding: 0em !important;
}
/* #issue_home_mainarea_new_description_tabs .ui-tabs-nav li { */
/* #issue_home_new_description_tabs .ui-tabs-nav li { */
.ui-tabs .ui-tabs-nav li.ui-state-default {
border-bottom: 1px solid #cccccc !important;
}
@ -349,25 +326,25 @@ li.issue-owner {
/*-----------------------------------------------
* issue home show - edit issue dialog
*-----------------------------------------------*/
#issue_show_mainarea_edit_description_tabs {
#issue_show_edit_description_tabs {
border: none !important;
}
#issue_show_mainarea_edit_description_tabs .ui-tabs-panel {
#issue_show_edit_description_tabs .ui-tabs-panel {
padding: 0.2em 0em 0em 0em !important;
}
#issue_show_mainarea_edit_description_tabs .ui-widget-header {
#issue_show_edit_description_tabs .ui-widget-header {
border: none !important;
background: none !important;
padding: 0em !important;
}
#issue_show_mainarea_edit_description_tabs .ui-tabs-nav {
#issue_show_edit_description_tabs .ui-tabs-nav {
padding: 0em !important;
}
/* #issue_show_mainarea_edit_description_tabs .ui-tabs-nav li { */
/* #issue_show_edit_description_tabs .ui-tabs-nav li { */
.ui-tabs .ui-tabs-nav li.ui-state-default {
border-bottom: 1px solid #cccccc !important;
}

View File

@ -0,0 +1 @@
.medium-editor-table-builder{display:none;position:absolute;left:0;top:101%}.medium-editor-table-builder *{box-sizing:border-box}.medium-editor-table-builder-grid{border:1px solid #000;border-radius:3px;height:162px;overflow:hidden;width:162px}.medium-editor-table-builder-cell{background-color:#333;border:1px solid #000;display:block;float:left;height:16px;margin:0;width:16px}.medium-editor-table-builder-cell.active,.medium-editor-table-builder-cell:hover{background-color:#ccc}.medium-editor-table{border-collapse:collapse;resize:both;table-layout:fixed}.medium-editor-table,.medium-editor-table td{border:1px dashed #e3e3e3}.medium-editor-table-builder-toolbar{display:block;background-color:#333;font-size:.8em;color:#fff}.medium-editor-table-builder-toolbar span{width:45px;display:block;float:left;margin-left:5px}.medium-editor-table-builder-toolbar button{margin:0 3px;background-color:#333;border:0;width:30px;cursor:pointer}.medium-editor-table-builder-toolbar button i{color:#fff}

View File

@ -0,0 +1 @@
.medium-toolbar-arrow-under:after{border-color:#000 transparent transparent;top:40px}.medium-toolbar-arrow-over:before{border-color:transparent transparent #000}.medium-editor-toolbar{background-color:#000;border:none;border-radius:50px}.medium-editor-toolbar li button{background-color:transparent;border:none;box-sizing:border-box;color:#ccc;height:40px;min-width:40px;padding:5px 12px;-webkit-transition:background-color .2s ease-in,color .2s ease-in;transition:background-color .2s ease-in,color .2s ease-in}.medium-editor-toolbar li .medium-editor-button-active,.medium-editor-toolbar li button:hover{background-color:#000;color:#a2d7c7}.medium-editor-toolbar li .medium-editor-button-first{border-bottom-left-radius:50px;border-top-left-radius:50px;padding-left:24px}.medium-editor-toolbar li .medium-editor-button-last{border-bottom-right-radius:50px;border-right:none;border-top-right-radius:50px;padding-right:24px}.medium-editor-toolbar-form{background:#000;border-radius:50px;color:#ccc;overflow:hidden}.medium-editor-toolbar-form .medium-editor-toolbar-input{background:#000;box-sizing:border-box;color:#ccc;height:40px;padding-left:16px;width:220px}.medium-editor-toolbar-form .medium-editor-toolbar-input::-webkit-input-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-moz-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input::-moz-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form .medium-editor-toolbar-input:-ms-input-placeholder{color:#f8f5f3;color:rgba(248,245,243,.8)}.medium-editor-toolbar-form a{color:#ccc;-webkit-transform:translateY(2px);-ms-transform:translateY(2px);transform:translateY(2px)}.medium-editor-toolbar-form .medium-editor-toolbar-close{margin-right:16px}.medium-editor-toolbar-anchor-preview{background:#000;border-radius:50px;padding:5px 12px}.medium-editor-anchor-preview a{color:#ccc;text-decoration:none}

1
codepot/src/css/medium-editor.min.css vendored Normal file
View File

@ -0,0 +1 @@
.medium-editor-anchor-preview,.medium-editor-toolbar{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;z-index:2000}@-webkit-keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes medium-editor-image-loading{0%{-webkit-transform:scale(0);transform:scale(0)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}100%{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}@keyframes medium-editor-pop-upwards{0%{opacity:0;-webkit-transform:matrix(.97,0,0,1,0,12);transform:matrix(.97,0,0,1,0,12)}20%{opacity:.7;-webkit-transform:matrix(.99,0,0,1,0,2);transform:matrix(.99,0,0,1,0,2)}40%{opacity:1;-webkit-transform:matrix(1,0,0,1,0,-1);transform:matrix(1,0,0,1,0,-1)}100%{-webkit-transform:matrix(1,0,0,1,0,0);transform:matrix(1,0,0,1,0,0)}}.medium-editor-anchor-preview{left:0;line-height:1.4;max-width:280px;position:absolute;text-align:center;top:0;word-break:break-all;word-wrap:break-word;visibility:hidden}.medium-editor-anchor-preview a{color:#fff;display:inline-block;margin:5px 5px 10px}.medium-editor-anchor-preview-active{visibility:visible}.medium-editor-dragover{background:#ddd}.medium-editor-image-loading{-webkit-animation:medium-editor-image-loading 1s infinite ease-in-out;animation:medium-editor-image-loading 1s infinite ease-in-out;background-color:#333;border-radius:100%;display:inline-block;height:40px;width:40px}.medium-editor-placeholder{position:relative}.medium-editor-placeholder:after{content:attr(data-placeholder)!important;font-style:italic;left:0;position:absolute;top:0;white-space:pre;padding:inherit;margin:inherit}.medium-toolbar-arrow-over:before,.medium-toolbar-arrow-under:after{border-style:solid;content:'';display:block;height:0;left:50%;margin-left:-8px;position:absolute;width:0}.medium-toolbar-arrow-under:after{border-width:8px 8px 0}.medium-toolbar-arrow-over:before{border-width:0 8px 8px;top:-8px}.medium-editor-toolbar{left:0;position:absolute;top:0;visibility:hidden}.medium-editor-toolbar ul{margin:0;padding:0}.medium-editor-toolbar li{float:left;list-style:none;margin:0;padding:0}.medium-editor-toolbar li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none}.medium-editor-toolbar li button:focus{outline:0}.medium-editor-toolbar li .medium-editor-action-underline{text-decoration:underline}.medium-editor-toolbar li .medium-editor-action-pre{font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:12px;font-weight:100;padding:15px 0}.medium-editor-toolbar-active{visibility:visible}.medium-editor-sticky-toolbar{position:fixed;top:1px}.medium-editor-relative-toolbar{position:relative}.medium-editor-toolbar-active.medium-editor-stalker-toolbar{-webkit-animation:medium-editor-pop-upwards 160ms forwards linear;animation:medium-editor-pop-upwards 160ms forwards linear}.medium-editor-action-bold{font-weight:bolder}.medium-editor-action-italic{font-style:italic}.medium-editor-toolbar-form{display:none}.medium-editor-toolbar-form a,.medium-editor-toolbar-form input{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.medium-editor-toolbar-form .medium-editor-toolbar-form-row{line-height:14px;margin-left:5px;padding-bottom:5px}.medium-editor-toolbar-form .medium-editor-toolbar-input,.medium-editor-toolbar-form label{border:none;box-sizing:border-box;font-size:14px;margin:0;padding:6px;width:316px;display:inline-block}.medium-editor-toolbar-form .medium-editor-toolbar-input:focus,.medium-editor-toolbar-form label:focus{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;outline:0}.medium-editor-toolbar-form a{display:inline-block;font-size:24px;font-weight:bolder;margin:0 10px;text-decoration:none}.medium-editor-toolbar-actions:after{clear:both;content:"";display:table}[data-medium-editor-element] img{max-width:100%}[data-medium-editor-element] sub{vertical-align:sub}[data-medium-editor-element] sup{vertical-align:super}.medium-editor-hidden{display:none}

View File

@ -2,11 +2,11 @@
* wiki show
*---------------------------------------------*/
#wiki_show_mainarea_result {
#wiki_show_result {
position: relative;
}
#wiki_show_mainarea_wiki {
#wiki_show_wiki {
margin-top: 0.5em;
-moz-column-rule: 1px dotted grey;
@ -18,33 +18,33 @@
column-gap: 2em;
}
#wiki_show_mainarea_metadata_body {
#wiki_show_metadata_body {
background-color: #FCFCFC;
}
#wiki_show_mainarea_metadata_body ul {
#wiki_show_metadata_body ul {
padding: 0em 0.5em 0em 0.5em;
margin: 0;
}
#wiki_show_mainarea_metadata_list_div {
#wiki_show_metadata_list_div {
float: left;
}
#wiki_show_mainarea_attachment_list_div {
#wiki_show_attachment_list_div {
margin-left: 2em;
float: left;
}
#wiki_show_mainarea_attachment_list {
#wiki_show_attachment_list {
}
#wiki_show_mainarea_attachment_list a,
#wiki_show_mainarea_attachment_list a:visited,
#wiki_show_mainarea_attachment_list a:focus {
#wiki_show_attachment_list a,
#wiki_show_attachment_list a:visited,
#wiki_show_attachment_list a:focus {
text-decoration: none;
color: #111111;
}
#wiki_show_mainarea_attachment_list a:hover {
#wiki_show_attachment_list a:hover {
background-color: #1C94C4;
color: #FFFFFF;
}
@ -52,25 +52,18 @@
/*---------------------------------------------
* wiki edit
*---------------------------------------------*/
#wiki_edit_mainarea_form {
border: #D4DBE8 1px solid;
padding: 0.5em;
#wiki_edit_form {
}
#wiki_edit_mainarea_text {
width: 100%;
#wiki_edit_text_editor {
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
border: none !important;
background-color: #F9F9F9 !important;
overflow-y: auto !important;
overflow-x: visible !important;
outline: none !important;
}
#wiki_edit_mainarea_text_preview {
-moz-column-rule: 1px dotted grey;
-webkit-column-rule: 1px dotted grey;
column-rule: 1px dotted grey;
-moz-column-gap: 2em;
-webkit-column-gap: 2em;
column-gap: 2em;
}
#wiki_edit_mainarea_text_column_count {
font-size: 80%;
}

View File

@ -24,6 +24,8 @@ www_DATA = \
excanvas.min.js \
jquery.flot.tickrotor.js \
jqueryui-editable.min.js \
medium-editor.min.js \
medium-editor-tables.min.js \
d3.min.js \
CodeFlower.js

View File

@ -177,6 +177,8 @@ www_DATA = \
excanvas.min.js \
jquery.flot.tickrotor.js \
jqueryui-editable.min.js \
medium-editor.min.js \
medium-editor-tables.min.js \
d3.min.js \
CodeFlower.js

File diff suppressed because one or more lines are too long

3
codepot/src/js/medium-editor.min.js vendored Normal file

File diff suppressed because one or more lines are too long