finished the extended wiki editing view

This commit is contained in:
hyung-hwan 2016-01-12 18:13:00 +00:00
parent 880645f628
commit f9372bc636
29 changed files with 1029 additions and 1041 deletions

View File

@ -44,7 +44,7 @@ CREATE TABLE wiki (
projectid VARCHAR(32) NOT NULL,
name VARCHAR(255) NOT NULL,
text TEXT NOT NULL,
type CHAR(1) NOT NULL DEFAULT 'C',
doctype CHAR(1) NOT NULL DEFAULT 'C',
columns INT NOT NULL DEFAULT 1,
createdon DATETIME NOT NULL,

View File

@ -62,7 +62,7 @@ CREATE TABLE "cpot_wiki" (
"projectid" VARCHAR(32) NOT NULL,
"name" VARCHAR(255) NOT NULL,
"text" CLOB NOT NULL,
"type" CHAR(1) DEFAULT 'C' NOT NULL,
"doctype" CHAR(1) DEFAULT 'C' NOT NULL,
"columns" INT DEFAULT 1 NOT NULL,
"createdon" TIMESTAMP NOT NULL,
"updatedon" TIMESTAMP NOT NULL,

View File

@ -60,7 +60,7 @@ CREATE TABLE wiki (
projectid VARCHAR(32) NOT NULL,
name VARCHAR(255) NOT NULL,
text TEXT NOT NULL,
type CHAR(1) NOT NULL DEFAULT 'C',
doctype CHAR(1) NOT NULL DEFAULT 'C',
columns INT NOT NULL DEFAULT 1,
createdon TIMESTAMP NOT NULL,

View File

@ -5,7 +5,6 @@ class File extends Controller
var $VIEW_ERROR = 'error';
var $VIEW_HOME = 'file_home';
var $VIEW_SHOW = 'file_show';
var $VIEW_EDIT = 'file_edit';
function File ()
{
@ -237,108 +236,6 @@ class File extends Controller
}
}
/*
// DEPRECATED
function update ($projectid = '', $name = '')
{
$this->load->helper ('form');
$this->load->library ('form_validation');
$this->load->model ('ProjectModel', 'projects');
$this->load->model ('FileModel', 'files');
$login = $this->login->getUser ();
if ($login['id'] == '')
redirect ("main/signin/" . $this->converter->AsciiTohex(current_url()));
$data['login'] = $login;
$name = $this->converter->HexToAscii ($name);
$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
{
$this->form_validation->set_rules (
'file_name', 'name', 'required|max_length[255]');
$this->form_validation->set_rules (
'file_tag', 'tag', 'required|max_length[50]');
$this->form_validation->set_rules (
'file_description', 'description', 'required');
$this->form_validation->set_error_delimiters (
'<span class="form_field_error">','</span>');
$data['message'] = '';
$data['project'] = $project;
if ($this->input->post('file'))
{
$file = new stdClass();
$file->name = $this->input->post('file_name');
$file->tag = $this->input->post('file_tag');
$file->description = $this->input->post('file_description');
if ($this->form_validation->run())
{
if ($this->files->update ($login['id'], $projectid, $name, $file) === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$data['file'] = $file;
$this->load->view ($this->VIEW_EDIT, $data);
}
else
{
redirect ("file/show/{$project->id}/" . $this->converter->AsciiToHex($file->name));
}
}
else
{
$data['message'] = $this->lang->line('MSG_FORM_INPUT_INCOMPLETE');
$data['file'] = $file;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
else
{
$file = $this->files->get ($login['id'], $project, $name);
if ($file === FALSE)
{
$data['message'] = 'DATABASE ERROR';
$this->load->view ($this->VIEW_ERROR, $data);
}
else if ($file == NULL)
{
$data['message'] = sprintf
($this->lang->line('FILE_MSG_NO_SUCH_FILE'), $name);
$this->load->view ($this->VIEW_ERROR, $data);
}
else
{
$data['file'] = $file;
$this->load->view ($this->VIEW_EDIT, $data);
}
}
}
}
*/
function xhr_import ($projectid = '')
{
$this->load->model ('ProjectModel', 'projects');

View File

@ -408,6 +408,7 @@ class Wiki extends Controller
$wiki->name = $name;
$wiki->text = '';
$wiki->columns = '1';
$wiki->attachments = array();
$data['wiki'] = $wiki;
$this->load->view ($view_edit, $data);
@ -907,10 +908,11 @@ class Wiki extends Controller
$wiki->projectid = $projectid;
$wiki->name = $this->input->post('wiki_name');
$wiki->text = $this->input->post('wiki_text');
$wiki->type = $this->input->post('wiki_type');
$wiki->doctype = $this->input->post('wiki_doctype');
$wiki->original_name = $this->input->post('wiki_original_name');
$wiki_file_count = $this->input->post('wiki_file_count');
$wiki_kill_file_count = $this->input->post('wiki_kill_file_count');
if ($wiki->name === FALSE || ($wiki->name = trim($wiki->name)) == '')
{
@ -927,6 +929,7 @@ class Wiki extends Controller
else
{
if ($wiki_file_count === FALSE || $wiki_file_count <= 0) $wiki_file_count = 0;
if ($wiki_kill_file_count === FALSE || $wiki_kill_file_count <= 0) $wiki_kill_file_count = 0;
if ($wiki->original_name === FALSE) $wiki->original_name = '';
else $wiki->original_name = trim($wiki->original_name);
@ -952,7 +955,17 @@ class Wiki extends Controller
if ($status == '')
{
if ($this->wikis->editWithFiles ($login['id'], $wiki, $attached_files, $this->upload) === FALSE)
$kill_files = array();
for ($i = 0; $i < $wiki_kill_file_count; $i++)
{
$n = $this->input->post("wiki_kill_file_name_{$i}");
if ($n != '') array_push ($kill_files, $n);
}
}
if ($status == '')
{
if ($this->wikis->editWithFiles ($login['id'], $wiki, $attached_files, $kill_files, $this->upload) === FALSE)
{
$status = 'error - ' . $this->wikis->getErrorMessage();
}

View File

@ -29,6 +29,7 @@ class FileModel extends Model
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback();
return FALSE;
}
@ -45,6 +46,7 @@ class FileModel extends Model
$query = $this->db->get('file_list');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback();
return FALSE;
}
@ -79,6 +81,7 @@ class FileModel extends Model
$query = $this->db->get ('file');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback();
return FALSE;
}
@ -94,6 +97,7 @@ class FileModel extends Model
$query = $this->db->get('file_list');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback();
return FALSE;
}

View File

@ -297,6 +297,20 @@ class WikiModel extends Model
// TODO: check if userid can do this..
$this->db->trans_begin ();
$this->db->where ('projectid', $wiki->projectid);;
$this->db->where ('wikiname', $wiki->name);
$this->db->select ('encname');
$query = $this->db->get ('wiki_attachment');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback ();
$this->delete_all_files ($ok_files);
return FALSE;
}
$file_result = $query->result ();
$this->db->where ('projectid', $wiki->projectid);
$this->db->where ('wikiname', $wiki->name);
$this->db->delete ('wiki_attachment');
@ -331,6 +345,11 @@ class WikiModel extends Model
return FALSE;
}
foreach ($file_result as $r)
{
@unlink (CODEPOT_ATTACHMENT_DIR . '/' . $r->encname);
}
$this->db->trans_commit ();
return TRUE;
}
@ -344,8 +363,12 @@ class WikiModel extends Model
return $x;
}
///////////////////////////////////////////////////////////////////
private function delete_all_files ($files)
{
foreach ($files as $f) @unlink ($f);
}
private function _edit_wiki ($userid, $wiki, $attached_files, $uploader)
private function _edit_wiki ($userid, $wiki, $attached_files, $kill_files, $uploader)
{
$this->db->trans_begin (); // manual transaction. not using trans_start().
@ -357,7 +380,7 @@ class WikiModel extends Model
$this->db->set ('projectid', $wiki->projectid);;
$this->db->set ('name', $wiki->name);
$this->db->set ('text', $wiki->text);
$this->db->set ('type', $wiki->type);
$this->db->set ('doctype', $wiki->doctype);
$this->db->set ('createdon', $now);
$this->db->set ('updatedon', $now);
$this->db->set ('createdby', $userid);
@ -370,7 +393,7 @@ class WikiModel extends Model
$this->db->where ('name', $wiki->original_name);
$this->db->set ('name', $wiki->name);
$this->db->set ('text', $wiki->text);
$this->db->set ('type', $wiki->type);
$this->db->set ('doctype', $wiki->doctype);
$this->db->set ('updatedon', $now);
$this->db->set ('updatedby', $userid);
$this->db->update ('wiki');
@ -447,15 +470,51 @@ class WikiModel extends Model
return FALSE;
}
$this->db->trans_commit ();
return $newid;
if (!empty($kill_files))
{
$this->db->where ('projectid', $wiki->projectid);;
$this->db->where ('wikiname', $wiki->name);
$this->db->where_in ('name', $kill_files);
$this->db->select ('encname');
$query = $this->db->get ('wiki_attachment');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback ();
$this->delete_all_files ($ok_files);
return FALSE;
}
function editWithFiles ($userid, $wiki, $attached_files, $uploader)
$result = $query->result ();
$this->db->where ('projectid', $wiki->projectid);;
$this->db->where ('wikiname', $wiki->name);
$this->db->where_in ('name', $kill_files);
$this->db->delete ('wiki_attachment');
if ($this->db->trans_status() === FALSE)
{
$this->errmsg = $this->db->_error_message();
$this->db->trans_rollback ();
$this->delete_all_files ($ok_files);
return FALSE;
}
foreach ($result as $r)
{
@unlink (CODEPOT_ATTACHMENT_DIR . '/' . $r->encname);
}
}
$this->db->trans_commit ();
return TRUE;
}
function editWithFiles ($userid, $wiki, $attached_files, $kill_files, $uploader)
{
set_error_handler (array ($this, 'capture_error'));
$errmsg = '';
$x = $this->_edit_wiki ($userid, $wiki, $attached_files, $uploader);
$x = $this->_edit_wiki ($userid, $wiki, $attached_files, $kill_files, $uploader);
restore_error_handler ();
return $x;
}

View File

@ -9,7 +9,6 @@ www_DATA = \
code_history.php \
code_revision.php \
code_search.php \
file_edit.php \
file_home.php \
file_show.php \
footer.php \

View File

@ -154,7 +154,6 @@ www_DATA = \
code_history.php \
code_revision.php \
code_search.php \
file_edit.php \
file_home.php \
file_show.php \
footer.php \

View File

@ -215,7 +215,6 @@ $this->load->view (
</div>
<div id='code_diff_metadata_container'>
<div id='code_diff_metadata_against' class='collapsible-box'>
<div id='code_diff_metadata_against_header' class='collapsible-box-header'>
<?php
@ -291,7 +290,7 @@ $this->load->view (
if ($fileext == "") $fileext = "html"
?>
<div class="result" id="code_diff_result">
<div id="code_diff_result" class="result">
<?php
function format_diff2 ($a, $b, $css_class)
{

View File

@ -310,7 +310,7 @@ $this->load->view (
<div style="clear: both;"></div>
</div>
<div class="result" id="code_edit_result">
<div id="code_edit_result" class="result">
<?php
/*

View File

@ -985,7 +985,7 @@ $this->load->view (
?>
</div>
<div class="result" id="code_folder_result">
<div id="code_folder_result" class="result" >
<?php
function comp_files ($a, $b)
{

View File

@ -92,7 +92,7 @@ $this->load->view (
<div style="clear: both;"></div>
</div>
<div class="graph" id="code_history_mainarea_graph">
<div class="graph" id="code_history_graph">
<?php
$xfullpath = $this->converter->AsciiToHex (($fullpath == '')? '.': $fullpath);
@ -102,11 +102,10 @@ $this->load->view (
$graph_url = codepot_merge_path (site_url(), "/code/graph/commit-share-by-users/{$project->id}/{$xfullpath}{$revreq}");
print "<img src='{$graph_url}' />";
?>
</div> <!-- code_history_mainarea_graph -->
<div class="result" id="code_history_result">
</div> <!-- code_history_graph -->
<div id="code_history_result" class="result">
<table id="code_history_result_table" class="full-width-result-table">
<tr class='full-width-result-table-header'>
<th><?php print $this->lang->line('Revision')?></th>
@ -203,7 +202,7 @@ $this->load->view (
}
?>
</table>
</div> <!-- code_history_mainarea_body -->
</div> <!-- code_history_result -->
</div> <!-- code_history_mainarea -->

View File

@ -639,9 +639,6 @@ $history = $file['history'];
<div style="clear: both;"></div>
</div>
<div id="code_revision_metadata" class="collapsible-box">
<div id="code_revision_metadata_header" class="collapsible-box-header" >
<?php
@ -678,8 +675,7 @@ $history = $file['history'];
</div>
</div>
<div class="result" id="code_revision_result">
<div id="code_revision_result" class="result">
<div id="code_revision_result_files" class="collapsible-box">
<div class="collapsible-box-header"><?php print $this->lang->line('Files')?></div>
<div id="code_revision_result_files_table_container" class="collapsible-box-panel">
@ -832,7 +828,7 @@ $history = $file['history'];
print "</div>\n";
}
?>
</div> <!-- code_revision_mainarea_review_comment -->
</div>
</div> <!-- code_revision_result_comments -->
</div> <!-- code_revision_result -->

View File

@ -1,134 +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/file.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,
"file_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 () {
$("#file_edit_mainarea_description_preview_button").button().click(
function () {
render_wiki ($("#file_edit_mainarea_description").val());
}
);
});
</script>
<title><?php print htmlspecialchars($file->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' => 'file',
'project' => $project,
),
'ctxmenuitems' => array ()
)
);
?>
<!---------------------------------------------------------------------------->
<div class="mainarea" id="file_mainarea">
<?php if ($message != "") print '<div id="file_message" class="form_message">'.htmlspecialchars($message).'</div>'; ?>
<div class="form_container">
<?php print form_open_multipart("file/update/{$project->id}/" . $this->converter->AsciiToHex($file->name))?>
<div class='form_input_field'>
<?php
print form_label($this->lang->line('Name').': ', 'file_name');
print form_input('file_name', set_value('file_name', $file->name), 'maxlength="255" size="40"');
?>
<?php print form_error('file_name');?>
</div>
<div class='form_input_field'>
<?php print form_label($this->lang->line('Tag').': ', 'file_tag')?>
<?php
$extra = 'maxlength="50" size="25"';
?>
<?php print form_input('file_tag', set_value('file_tag', $file->tag), $extra)?>
<?php print form_error('file_tag');?>
</div>
<div class='form_input_label'>
<?php print form_label($this->lang->line('Description').': ', 'file_description')?>
<a href='#' id='file_edit_mainarea_description_preview_button'><?php print $this->lang->line('Preview')?></a>
<?php print form_error('file_description');?>
</div>
<div class='form_input_field'>
<?php print form_textarea('file_description', set_value('file_description', $file->description), 'id=file_edit_mainarea_description')?>
</div>
<div id='file_edit_mainarea_description_preview' class='form_input_preview'></div>
<?php print form_submit('file', $this->lang->line('Update')); ?>
<?php print form_close();?>
</div>
</div> <!-- file_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->
</div> <!-- content -->
<!---------------------------------------------------------------------------->
<?php $this->load->view ('footer'); ?>
<!---------------------------------------------------------------------------->
</body>
</html>

View File

@ -27,7 +27,7 @@
function show_alert (outputMsg, titleMsg)
{
$('#file_home_mainarea_alert').html(outputMsg).dialog({
$('#file_home_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
@ -45,7 +45,7 @@ function render_wiki(input_text)
{
creole_render_wiki_with_input_text (
input_text,
"file_home_mainarea_new_description_preview",
"file_home_new_description_preview",
"<?php print site_url()?>/wiki/show/<?php print $project->id?>/",
"<?php print site_url()?>/wiki/attachment0/<?php print $project->id?>/"
);
@ -65,15 +65,15 @@ function populate_selected_files ()
var f = populated_file_obj[n];
if (f != null)
{
var d = $('#file_home_mainarea_new_file_desc_' + n);
var d = $('#file_home_new_file_desc_' + n);
if (d != null) file_desc[f.name] = d.val();
}
}
$('#file_home_mainarea_new_file_table').empty();
$('#file_home_new_file_table').empty();
populated_file_obj = [];
var f = $('#file_home_mainarea_new_files').get(0);
var f = $('#file_home_new_files').get(0);
var f_no = 0;
for (var n = 0; n < f.files.length; n++)
{
@ -82,9 +82,9 @@ function populate_selected_files ()
var desc = file_desc[f.files[n].name];
if (desc == null) desc = '';
$('#file_home_mainarea_new_file_table').append (
$('#file_home_new_file_table').append (
codepot_sprintf (
'<tr id="file_home_mainarea_new_file_row_%d"><td><a href="#" id="file_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="file_home_mainarea_new_file_desc_%d" size="40" value="%s" /></td></tr>',
'<tr id="file_home_new_file_row_%d"><td><a href="#" id="file_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="file_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)
)
);
@ -99,7 +99,7 @@ function populate_selected_files ()
function cancel_out_new_file (no)
{
$('#file_home_mainarea_new_file_row_' + no).remove ();
$('#file_home_new_file_row_' + no).remove ();
populated_file_obj[no] = null;
}
@ -107,16 +107,16 @@ $(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$('#file_home_mainarea_new_files').change (function () {
$('#file_home_new_files').change (function () {
populate_selected_files ();
});
$("#file_home_mainarea_new_description_tabs").tabs ();
$("#file_home_mainarea_new_description_tabs").bind ('tabsshow', function (event, ui) {
if (ui.index == 2) render_wiki ($("#file_home_mainarea_new_description").val());
$("#file_home_new_description_tabs").tabs ();
$("#file_home_new_description_tabs").bind ('tabsshow', function (event, ui) {
if (ui.index == 2) render_wiki ($("#file_home_new_description").val());
});
$('#file_home_mainarea_new_form_div').dialog (
$('#file_home_new_form_div').dialog (
{
title: '<?php print $this->lang->line('New');?>',
resizable: true,
@ -145,7 +145,7 @@ $(function () {
{
form_data.append ('file_new_file_' + f_no, f);
var d = $('#file_home_mainarea_new_file_desc_' + i);
var d = $('#file_home_new_file_desc_' + i);
if (d != null) form_data.append('file_new_file_desc_' + f_no, d.val());
f_no++;
@ -153,11 +153,11 @@ $(function () {
}
form_data.append ('file_new_file_count', f_no);
form_data.append ('file_new_tag', $('#file_home_mainarea_new_tag').val());
form_data.append ('file_new_name', $('#file_home_mainarea_new_name').val());
form_data.append ('file_new_description', $('#file_home_mainarea_new_description').val());
form_data.append ('file_new_tag', $('#file_home_new_tag').val());
form_data.append ('file_new_name', $('#file_home_new_name').val());
form_data.append ('file_new_description', $('#file_home_new_description').val());
$('#file_home_mainarea_new_form_div').dialog('disable');
$('#file_home_new_form_div').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/file/xhr_import/{$project->id}"; ?>'),
type: 'POST',
@ -169,8 +169,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
import_in_progress = false;
$('#file_home_mainarea_new_form_div').dialog('enable');
$('#file_home_mainarea_new_form_div').dialog('close');
$('#file_home_new_form_div').dialog('enable');
$('#file_home_new_form_div').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -184,8 +184,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
import_in_progress = false;
$('#file_home_mainarea_new_form_div').dialog('enable');
$('#file_home_mainarea_new_form_div').dialog('close');
$('#file_home_new_form_div').dialog('enable');
$('#file_home_new_form_div').dialog('close');
var errmsg = '';
if (errmsg == '' && errorThrown != null) errmsg = errorThrown;
if (errmsg == '' && textStatus != null) errmsg = textStatus;
@ -201,7 +201,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (import_in_progress) return;
$('#file_home_mainarea_new_form_div').dialog('close');
$('#file_home_new_form_div').dialog('close');
}
},
@ -212,9 +212,9 @@ $(function () {
}
);
$("#file_home_mainarea_new_button").button().click (
$("#file_home_new_button").button().click (
function () {
$('#file_home_mainarea_new_form_div').dialog('open');
$('#file_home_new_form_div').dialog('open');
return false; // prevent the default behavior
}
);
@ -270,14 +270,14 @@ $this->load->view (
?>
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="file_home_mainarea_new_button" href='#'><?php print $this->lang->line('New')?></a>
<a id="file_home_new_button" href='#'><?php print $this->lang->line('New')?></a>
<?php endif; ?>
</div>
<div style='clear: both'></div>
</div>
<div class="result" id="file_home_mainarea_result">
<div id="file_home_result" class="result">
<?php
if (empty($files))
{
@ -325,7 +325,7 @@ else
usort ($files, 'comp_files');
print '<table id="file_home_mainarea_result_table" class="fit-width-result-table">';
print '<table id="file_home_result_table" class="fit-width-result-table">';
print '<tr class="heading">';
print '<th>' . $this->lang->line('Tag') . '</th>';
print '<th>' . $this->lang->line('Name') . '</th>';
@ -406,37 +406,35 @@ else
print '</table>';
}
?>
</div> <!-- file_home_mainarea_result -->
</div> <!-- file_home_result -->
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div id='file_home_new_form_div'>
<div style='line-height: 2em;'><?php print $this->lang->line('Tag'); ?>: <input type='text' id='file_home_new_tag' name='file_home_new_tag' /></div>
<div style='line-height: 2em;'><?php print $this->lang->line('Name'); ?>: <input type='text' id='file_home_new_name' name='file_home_new_name' size='50'/></div>
<div id='file_home_mainarea_new_form_div'>
<div style='line-height: 2em;'><?php print $this->lang->line('Tag'); ?>: <input type='text' id='file_home_mainarea_new_tag' name='file_home_new_tag' /></div>
<div style='line-height: 2em;'><?php print $this->lang->line('Name'); ?>: <input type='text' id='file_home_mainarea_new_name' name='file_home_new_name' size='50'/></div>
<div id='file_home_mainarea_new_description_tabs' style='width:100%;'>
<div id='file_home_new_description_tabs' style='width:100%;'>
<ul>
<li><a href='#file_home_mainarea_new_file_input'><?php print $this->lang->line('Files'); ?></a></li>
<li><a href='#file_home_mainarea_new_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#file_home_mainarea_new_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
<li><a href='#file_home_new_file_input'><?php print $this->lang->line('Files'); ?></a></li>
<li><a href='#file_home_new_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#file_home_new_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
</ul>
<div id='file_home_mainarea_new_file_input'>
<input type='file' id='file_home_mainarea_new_files' name='file_home_new_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='file_home_mainarea_new_file_table'></table>
<div id='file_home_new_file_input'>
<input type='file' id='file_home_new_files' name='file_home_new_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='file_home_new_file_table'></table>
</div>
<div id='file_home_mainarea_new_description_input'>
<textarea type='textarea' id='file_home_mainarea_new_description' name='file_home_new_description' rows=10 cols=80 style='width:100%;'></textarea>
<div id='file_home_new_description_input'>
<textarea type='textarea' id='file_home_new_description' name='file_home_new_description' rows=10 cols=80 style='width:100%;'></textarea>
</div>
<div id='file_home_mainarea_new_description_preview' class='form_input_preview'>
<div id='file_home_new_description_preview' class='form_input_preview'>
</div>
</div>
</div>
<?php endif; ?>
<div id='file_home_mainarea_alert'></div>
<div id='file_home_alert'></div>
</div> <!-- file_home_mainarea -->

View File

@ -34,7 +34,7 @@ $creole_file_base = site_url() . "/wiki/attachment0/{$project->id}/";
<script type="text/javascript">
function show_alert (outputMsg, titleMsg)
{
$('#file_show_mainarea_alert').html(outputMsg).dialog({
$('#file_show_alert').html(outputMsg).dialog({
title: titleMsg,
resizable: true,
modal: true,
@ -51,8 +51,8 @@ function show_alert (outputMsg, titleMsg)
function render_wiki()
{
creole_render_wiki (
"file_show_mainarea_wiki_text",
"file_show_mainarea_wiki",
"file_show_wiki_text",
"file_show_wiki",
"<?php print $creole_base; ?>",
"<?php print $creole_file_base; ?>/"
);
@ -64,7 +64,7 @@ function preview_edit_description (input_text)
{
creole_render_wiki_with_input_text (
input_text,
"file_show_mainarea_edit_description_preview",
"file_show_edit_description_preview",
"<?php print $creole_base; ?>",
"<?php print $creole_file_base; ?>/"
);
@ -83,15 +83,15 @@ function populate_selected_files_for_adding ()
var f = populated_file_obj_for_adding[n];
if (f != null)
{
var d = $('#file_show_mainarea_add_file_desc_' + n);
var d = $('#file_show_add_file_desc_' + n);
if (d != null) file_desc[f.name] = d.val();
}
}
$('#file_show_mainarea_add_file_table').empty();
$('#file_show_add_file_table').empty();
populated_file_obj_for_adding = [];
var f = $('#file_show_mainarea_add_files').get(0);
var f = $('#file_show_add_files').get(0);
var f_no = 0;
for (var n = 0; n < f.files.length; n++)
{
@ -100,9 +100,9 @@ function populate_selected_files_for_adding ()
var desc = file_desc[f.files[n].name];
if (desc == null) desc = '';
$('#file_show_mainarea_add_file_table').append (
$('#file_show_add_file_table').append (
codepot_sprintf (
'<tr id="file_show_mainarea_add_file_row_%d"><td><a href="#" id="file_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="file_show_mainarea_add_file_desc_%d" size="40" value="%s" /></td></tr>',
'<tr id="file_show_add_file_row_%d"><td><a href="#" id="file_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="file_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)
)
);
@ -118,14 +118,14 @@ function populate_selected_files_for_adding ()
function cancel_out_add_file (no)
{
$('#file_show_mainarea_add_file_row_' + no).remove ();
$('#file_show_add_file_row_' + no).remove ();
populated_file_obj_for_adding[no] = null;
}
function kill_edit_file (no)
{
var n = $('#file_show_mainarea_edit_file_name_' + no);
var d = $('#file_show_mainarea_edit_file_desc_' + no);
var n = $('#file_show_edit_file_name_' + no);
var d = $('#file_show_edit_file_desc_' + no);
if (n && d)
{
if (d.prop('disabled'))
@ -166,12 +166,12 @@ var original_file_desc = [
];
$(function () {
$('#file_show_mainarea_metadata').accordion({
$('#file_show_metadata').accordion({
collapsible: true,
heightStyle: "content"
});
$('#file_show_mainarea_files').accordion({
$('#file_show_files').accordion({
collapsible: true,
heightStyle: "content"
});
@ -179,12 +179,12 @@ $(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$('#file_show_mainarea_edit_description_tabs').tabs ();
$('#file_show_mainarea_edit_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_edit_description ($('#file_show_mainarea_edit_description').val());
$('#file_show_edit_description_tabs').tabs ();
$('#file_show_edit_description_tabs').bind ('tabsshow', function (event, ui) {
if (ui.index == 1) preview_edit_description ($('#file_show_edit_description').val());
});
$('#file_show_mainarea_edit_form').dialog (
$('#file_show_edit_form').dialog (
{
title: '<?php print $this->lang->line('Edit');?>',
resizable: true,
@ -204,13 +204,13 @@ $(function () {
var form_data = new FormData();
var new_name = $('#file_show_mainarea_edit_name').val()
var new_name = $('#file_show_edit_name').val()
form_data.append ('file_edit_name', new_name);
form_data.append ('file_edit_tag', $('#file_show_mainarea_edit_tag').val());
form_data.append ('file_edit_description', $('#file_show_mainarea_edit_description').val());
form_data.append ('file_edit_tag', $('#file_show_edit_tag').val());
form_data.append ('file_edit_description', $('#file_show_edit_description').val());
$('#file_show_mainarea_edit_form').dialog('disable');
$('#file_show_edit_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/file/xhr_update/{$project->id}/{$hexname}"; ?>'),
type: 'POST',
@ -222,8 +222,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#file_show_mainarea_edit_form').dialog('enable');
$('#file_show_mainarea_edit_form').dialog('close');
$('#file_show_edit_form').dialog('enable');
$('#file_show_edit_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -237,8 +237,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#file_show_mainarea_edit_form').dialog('enable');
$('#file_show_mainarea_edit_form').dialog('close');
$('#file_show_edit_form').dialog('enable');
$('#file_show_edit_form').dialog('close');
var errmsg = '';
if (errmsg == '' && errorThrown != null) errmsg = errorThrown;
if (errmsg == '' && textStatus != null) errmsg = textStatus;
@ -254,7 +254,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#file_show_mainarea_edit_form').dialog('close');
$('#file_show_edit_form').dialog('close');
}
},
@ -266,7 +266,7 @@ $(function () {
);
$('#file_show_mainarea_delete_form').dialog (
$('#file_show_delete_form').dialog (
{
title: '<?php print $this->lang->line('Delete');?>',
resizable: true,
@ -285,10 +285,10 @@ $(function () {
var form_data = new FormData();
var f = $('#file_show_mainarea_delete_confirm');
var f = $('#file_show_delete_confirm');
if (f != null && f.is(':checked')) form_data.append ('file_delete_confirm', 'Y');
$('#file_show_mainarea_delete_form').dialog('disable');
$('#file_show_delete_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/file/xhr_delete/{$project->id}/{$hexname}"; ?>'),
type: 'POST',
@ -300,8 +300,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#file_show_mainarea_delete_form').dialog('enable');
$('#file_show_mainarea_delete_form').dialog('close');
$('#file_show_delete_form').dialog('enable');
$('#file_show_delete_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -315,8 +315,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#file_show_mainarea_delete_form').dialog('enable');
$('#file_show_mainarea_delete_form').dialog('close');
$('#file_show_delete_form').dialog('enable');
$('#file_show_delete_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -328,7 +328,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#file_show_mainarea_delete_form').dialog('close');
$('#file_show_delete_form').dialog('close');
}
},
@ -340,11 +340,11 @@ $(function () {
}
);
$('#file_show_mainarea_add_files').change (function () {
$('#file_show_add_files').change (function () {
populate_selected_files_for_adding ();
});
$('#file_show_mainarea_add_file_form').dialog (
$('#file_show_add_file_form').dialog (
{
title: '<?php print $this->lang->line('Add');?>',
resizable: true,
@ -371,14 +371,14 @@ $(function () {
{
form_data.append ('file_add_file_' + f_no, f);
var d = $('#file_show_mainarea_add_file_desc_' + i);
var d = $('#file_show_add_file_desc_' + i);
if (d != null) form_data.append('file_add_file_desc_' + f_no, d.val());
f_no++;
}
}
form_data.append ('file_add_file_count', f_no);
$('#file_show_mainarea_add_file_form').dialog('disable');
$('#file_show_add_file_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/file/xhr_add_file/{$project->id}/{$hexname}"; ?>'),
type: 'POST',
@ -390,8 +390,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#file_show_mainarea_add_file_form').dialog('enable');
$('#file_show_mainarea_add_file_form').dialog('close');
$('#file_show_add_file_form').dialog('enable');
$('#file_show_add_file_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -405,8 +405,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#file_show_mainarea_add_file_form').dialog('enable');
$('#file_show_mainarea_add_file_form').dialog('close');
$('#file_show_add_file_form').dialog('enable');
$('#file_show_add_file_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -418,7 +418,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#file_show_mainarea_add_file_form').dialog('close');
$('#file_show_add_file_form').dialog('close');
}
},
@ -430,7 +430,7 @@ $(function () {
}
);
$('#file_show_mainarea_edit_file_form').dialog (
$('#file_show_edit_file_form').dialog (
{
title: '<?php print $this->lang->line('Edit');?>',
resizable: true,
@ -452,8 +452,8 @@ $(function () {
var f_no = 0;
for (var i = 0; i <= <?php print $file_count; ?>; i++)
{
var n = $('#file_show_mainarea_edit_file_name_' + i);
var d = $('#file_show_mainarea_edit_file_desc_' + i);
var n = $('#file_show_edit_file_name_' + i);
var d = $('#file_show_edit_file_desc_' + i);
if (n && d)
{
@ -473,7 +473,7 @@ $(function () {
}
form_data.append ('file_edit_file_count', f_no);
$('#file_show_mainarea_edit_file_form').dialog('disable');
$('#file_show_edit_file_form').dialog('disable');
$.ajax({
url: codepot_merge_path('<?php print site_url() ?>', '<?php print "/file/xhr_edit_file/{$project->id}/{$hexname}"; ?>'),
type: 'POST',
@ -485,8 +485,8 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
$('#file_show_mainarea_edit_file_form').dialog('enable');
$('#file_show_mainarea_edit_file_form').dialog('close');
$('#file_show_edit_file_form').dialog('enable');
$('#file_show_edit_file_form').dialog('close');
if (data == 'ok')
{
// refresh the page to the head revision
@ -500,8 +500,8 @@ $(function () {
error: function (jqXHR, textStatus, errorThrown) {
work_in_progress = false;
$('#file_show_mainarea_edit_file_form').dialog('enable');
$('#file_show_mainarea_edit_file_form').dialog('close');
$('#file_show_edit_file_form').dialog('enable');
$('#file_show_edit_file_form').dialog('close');
show_alert ('Failed - ' + errorThrown, "<?php print $this->lang->line('Error')?>");
}
});
@ -513,7 +513,7 @@ $(function () {
},
'<?php print $this->lang->line('Cancel')?>': function () {
if (work_in_progress) return;
$('#file_show_mainarea_edit_file_form').dialog('close');
$('#file_show_edit_file_form').dialog('close');
}
},
@ -525,29 +525,29 @@ $(function () {
}
);
$('#file_show_mainarea_edit_button').button().click (
$('#file_show_edit_button').button().click (
function () {
$('#file_show_mainarea_edit_form').dialog('open');
$('#file_show_edit_form').dialog('open');
return false; // prevent the default behavior
}
);
$('#file_show_mainarea_delete_button').button().click (
$('#file_show_delete_button').button().click (
function() {
$('#file_show_mainarea_delete_form').dialog('open');
$('#file_show_delete_form').dialog('open');
return false;
}
);
$('#file_show_mainarea_add_file_button').button().click (
$('#file_show_add_file_button').button().click (
function() {
$('#file_show_mainarea_add_file_form').dialog('open');
$('#file_show_add_file_form').dialog('open');
return false;
}
);
$('#file_show_mainarea_edit_file_button').button().click (
$('#file_show_edit_file_button').button().click (
function() {
$('#file_show_mainarea_edit_file_form').dialog('open');
$('#file_show_edit_file_form').dialog('open');
return false;
}
);
@ -601,21 +601,18 @@ $this->load->view (
<div class="actions">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="file_show_mainarea_edit_button" href='#'><?php print $this->lang->line('Edit')?></a>
<a id="file_show_mainarea_delete_button" href='#'><?php print $this->lang->line('Delete')?></a>
<a id="file_show_edit_button" href='#'><?php print $this->lang->line('Edit')?></a>
<a id="file_show_delete_button" href='#'><?php print $this->lang->line('Delete')?></a>
<?php endif; ?>
</div>
<div style='clear: both'></div>
</div>
<div id='file_show_mainarea_result'>
<div id='file_show_mainarea_metadata' class='collapsible-box'>
<div id='file_show_mainarea_metadata_header' class='collapsible-box-header'><?php print $this->lang->line('Metadata')?></div>
<div id='file_show_mainarea_metadata_body'>
<ul>
<div id='file_show_metadata' class='collapsible-box'>
<div id='file_show_metadata_header' class='collapsible-box-header'><?php print $this->lang->line('Metadata')?></div>
<div id='file_show_metadata_body'>
<ul id='file_show_metadata_list'>
<li><?php print $this->lang->line('Created on')?> <?php print codepot_dbdatetodispdate($file->createdon); ?></li>
<li><?php print $this->lang->line('Created by')?> <?php print htmlspecialchars($file->createdby); ?></li>
<li><?php print $this->lang->line('Last updated on')?> <?php print codepot_dbdatetodispdate($file->updatedon); ?></li>
@ -624,18 +621,18 @@ $this->load->view (
</div>
</div>
<div id='file_show_mainarea_files' class='collapsible-box'>
<div id='file_show_mainarea_files_header' class='collapsible-box-header'><?php print $this->lang->line('Files')?></div>
<div id='file_show_files' class='collapsible-box'>
<div id='file_show_files_header' class='collapsible-box-header'><?php print $this->lang->line('Files')?></div>
<div id='file_show_mainarea_files_body'>
<div id='file_show_files_body'>
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div>
<a id="file_show_mainarea_add_file_button" href='#'><?php print $this->lang->line('Add')?></a>
<a id="file_show_mainarea_edit_file_button" href='#'><?php print $this->lang->line('Edit')?></a>
<a id="file_show_add_file_button" href='#'><?php print $this->lang->line('Add')?></a>
<a id="file_show_edit_file_button" href='#'><?php print $this->lang->line('Edit')?></a>
</div>
<?php endif; ?>
<table id='file_show_mainarea_files_table'>
<table id='file_show_files_table'>
<?php
for ($i = 0; $i < $file_count; $i++)
{
@ -658,50 +655,47 @@ $this->load->view (
</div>
</div>
<div class="result" id="file_show_mainarea_wiki">
<pre id="file_show_mainarea_wiki_text" style="visibility: hidden">
<?php print htmlspecialchars($file->description); ?>
</pre>
</div> <!-- file_show_mainarea_wiki -->
</div> <!-- file_show_mainarea_result -->
<div id="file_show_result'" class="result">
<div id="file_show_wiki">
<pre id="file_show_wiki_text" style="visibility: hidden"><?php print htmlspecialchars($file->description); ?></pre>
</div>
</div>
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div id='file_show_mainarea_edit_form'>
<div id='file_show_edit_form'>
<div style='line-height: 2em;'>
<?php print $this->lang->line('Tag'); ?>: <input type='text' id='file_show_mainarea_edit_tag' name='file_show_edit_tag' size='30' value='<?php print addslashes($file->tag); ?>'/>
<?php print $this->lang->line('Name'); ?>: <input type='text' id='file_show_mainarea_edit_name' name='file_show_edit_name' size='60' value='<?php print addslashes($file->name); ?>'/>
<?php print $this->lang->line('Tag'); ?>: <input type='text' id='file_show_edit_tag' name='file_show_edit_tag' size='30' value='<?php print addslashes($file->tag); ?>'/>
<?php print $this->lang->line('Name'); ?>: <input type='text' id='file_show_edit_name' name='file_show_edit_name' size='60' value='<?php print addslashes($file->name); ?>'/>
</div>
<div id='file_show_mainarea_edit_description_tabs' style='width:100%;'>
<div id='file_show_edit_description_tabs' style='width:100%;'>
<ul>
<li><a href='#file_show_mainarea_edit_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#file_show_mainarea_edit_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
<li><a href='#file_show_edit_description_input'><?php print $this->lang->line('Description'); ?></a></li>
<li><a href='#file_show_edit_description_preview'><?php print $this->lang->line('Preview'); ?></a></li>
</ul>
<div id='file_show_mainarea_edit_description_input'>
<textarea type='textarea' id='file_show_mainarea_edit_description' name='file_show_edit_description' rows=24 cols=100 style='width:100%;'><?php print htmlspecialchars($file->description); ?></textarea>
<div id='file_show_edit_description_input'>
<textarea type='textarea' id='file_show_edit_description' name='file_show_edit_description' rows=24 cols=100 style='width:100%;'><?php print htmlspecialchars($file->description); ?></textarea>
</div>
<div id='file_show_mainarea_edit_description_preview' class='form_input_preview'>
<div id='file_show_edit_description_preview' class='form_input_preview'>
</div>
</div>
</div>
<div id='file_show_mainarea_delete_form'>
<input type='checkbox' id='file_show_mainarea_delete_confirm' />
<div id='file_show_delete_form'>
<input type='checkbox' id='file_show_delete_confirm' />
<?php print $this->lang->line('MSG_SURE_TO_DELETE_THIS') . ' - ' . htmlspecialchars($file->name); ?>
</div>
<div id='file_show_mainarea_add_file_form'>
<div id='file_show_mainarea_add_file_input'>
<input type='file' id='file_show_mainarea_add_files' name='file_show_add_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='file_show_mainarea_add_file_table'></table>
<div id='file_show_add_file_form'>
<div id='file_show_add_file_input'>
<input type='file' id='file_show_add_files' name='file_show_add_files' multiple='' autocomplete='off' style='color: transparent;' />
<table id='file_show_add_file_table'></table>
</div>
</div>
<div id='file_show_mainarea_edit_file_form'>
<div id='file_show_edit_file_form'>
<table>
<?php
for ($i = 0; $i < $file_count; $i++)
@ -710,9 +704,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="file_show_mainarea_edit_file_name_%d">%s</span>', $i, htmlspecialchars($f->filename));
printf ('<span id="file_show_edit_file_name_%d">%s</span>', $i, htmlspecialchars($f->filename));
print '</td><td>';
printf ('<input type="text" id="file_show_mainarea_edit_file_desc_%d" value="%s" size="40" autocomplete="off" />', $i, addslashes($f->description));
printf ('<input type="text" id="file_show_edit_file_desc_%d" value="%s" size="40" autocomplete="off" />', $i, addslashes($f->description));
print '</td></tr>';
}
?>
@ -721,7 +715,7 @@ $this->load->view (
<?php endif; ?>
<div id='file_show_mainarea_alert'></div>
<div id='file_show_alert'></div>
</div> <!-- file_show_mainarea -->

View File

@ -322,7 +322,7 @@ $this->load->view (
<div style='clear: both;'></div>
</div>
<div class="result" id="issue_home_result">
<div id="issue_home_result" class="result">
<?php
if (empty($issues))
{

View File

@ -713,7 +713,6 @@ $this->load->view (
<div class="mainarea" id="issue_show_mainarea">
<div class="title-band" id="issue_show_title_band">
<div class="title">
<?php print $this->lang->line('Issue')?> <?php print htmlspecialchars($issue->id)?>:
@ -781,16 +780,13 @@ $this->load->view (
</div>
</div>
<div id="issue_show_result" class="result">
<div id="issue_show_description">
<pre id="issue_show_description_pre" style="visibility: hidden">
<?php print htmlspecialchars($issue->description); ?>
</pre>
<pre id="issue_show_description_pre" style="visibility: hidden"><?php print htmlspecialchars($issue->description); ?></pre>
</div> <!-- issue_show_description -->
<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_add_file_button" href='#'><?php print $this->lang->line('Add')?></a>
@ -818,7 +814,7 @@ $this->load->view (
?>
</ul>
<?php endif; ?>
</div>
</div>
<div id="issue_show_changes">
@ -950,9 +946,7 @@ $this->load->view (
print '</table>';
?>
</div>
</div> <!-- issue_show_changes -->
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<div id='issue_show_edit_form'>

View File

@ -315,14 +315,15 @@ foreach ($urls as $url)
<?php print htmlspecialchars($project->name)?>
</div>
<div class="result" id="project_home_mainarea_wiki">
<pre id="project_home_mainarea_wiki_text" style="visibility: hidden">
<?php print htmlspecialchars($project->description); ?>
</pre>
<div id="project_home_result" class="result">
<div id="project_home_mainarea_wiki">
<pre id="project_home_mainarea_wiki_text" style="visibility: hidden"><?php print htmlspecialchars($project->description); ?></pre>
</div> <!-- project_home_mainarea_wiki -->
</div>
</div> <!-- project_home_mainarea -->
<div class='footer-pusher'></div> <!-- for sticky footer -->
</div> <!-- project_home_content -->

View File

@ -28,8 +28,8 @@
function render_wiki()
{
creole_render_wiki (
"site_home_mainarea_result_wiki_text",
"site_home_mainarea_result_wiki",
"site_home_result_wiki_text",
"site_home_result_wiki",
"<?php print site_url()?>/site/wiki/",
"<?php print site_url()?>/site/image/"
);
@ -41,13 +41,13 @@ $(function () {
render_wiki ();
<?php if ($issues && count($issues) > 0): ?>
$("#site_home_mainarea_result_open_issues").accordion ({
$("#site_home_result_open_issues").accordion ({
collapsible: true
});
<?php endif; ?>
<?php if ($recently_resolved_issues && count($recently_resolved_issues) > 0): ?>
$("#site_home_mainarea_result_resolved_issues").accordion ({
$("#site_home_result_resolved_issues").accordion ({
collapsible: true
});
<?php endif; ?>
@ -282,14 +282,14 @@ foreach ($latest_projects as $project)
<div class="mainarea" id="site_home_mainarea">
<div class="result" id="site_home_mainarea_result">
<div id="site_home_result" class="result">
<?php if ($issues && count($issues) > 0): ?>
<div id="site_home_mainarea_result_open_issues" class="collapsible-box">
<div id="site_home_mainarea_result_open_issues_header" class="collapsible-box-header">
<div id="site_home_result_open_issues" class="collapsible-box">
<div id="site_home_result_open_issues_header" class="collapsible-box-header">
<?php print $this->lang->line('Open issues')?>
</div>
<ul id="site_home_mainarea_result_open_issues_list" class="collapsible-box-list">
<ul id="site_home_result_open_issues_list" class="collapsible-box-list">
<?php
foreach ($issues as $issue)
{
@ -316,11 +316,11 @@ foreach ($latest_projects as $project)
<?php endif; ?>
<?php if ($recently_resolved_issues && count($recently_resolved_issues) > 0): ?>
<div id="site_home_mainarea_result_resolved_issues" class="collapsible-box">
<div id="site_home_mainarea_result_resolved_issues_header" class="collapsible-box-header">
<div id="site_home_result_resolved_issues" class="collapsible-box">
<div id="site_home_result_resolved_issues_header" class="collapsible-box-header">
<?php print $this->lang->line('Recently resolved issues')?>
</div>
<ul id="site_home_mainarea_result_resolved_issues_list" class="collapsible-box-list">
<ul id="site_home_result_resolved_issues_list" class="collapsible-box-list">
<?php
foreach ($recently_resolved_issues as $issue)
{
@ -346,15 +346,12 @@ foreach ($latest_projects as $project)
</div>
<?php endif; ?>
<div id="site_home_result_wiki">
<pre id="site_home_result_wiki_text" style="visibility: hidden"><?php print htmlspecialchars($site->text); ?></pre>
</div> <!-- site_home_text -->
<div id="site_home_mainarea_result_wiki">
<pre id="site_home_mainarea_result_wiki_text" style="visibility: hidden">
<?php print htmlspecialchars($site->text); ?>
</pre>
</div> <!-- site_home_mainarea_text -->
</div> <! -- site_home_result -->
</div> <! -- site_home_mainarea_result -->
<!-- ////////////////////////////////////////////////////////////////////// -->
</div> <!-- site_home_mainarea -->

View File

@ -31,6 +31,7 @@
<?php
$hex_wikiname = $this->converter->AsciiToHex ($wiki->name);
$file_count = count($wiki->attachments);
?>
<script type="text/javascript">
@ -51,11 +52,12 @@ function show_alert (outputMsg, titleMsg)
});
}
function resize_editor()
{
var titleband = $("#wiki_edit_title_band");
var editor = $("#wiki_edit_text_editor");
var attachment = $("#wiki_edit_attachment");
var files = $("#wiki_edit_files");
var footer = $("#codepot_footer");
editor.height(0); // to prevent from continuous growing. it seems to affect footer placement when not set to 0.
@ -63,7 +65,7 @@ function resize_editor()
var ioff = titleband.offset();
var foff = footer.offset();
ioff.top += titleband.outerHeight() + 5 + attachment.outerHeight() + 10;
ioff.top += titleband.outerHeight() + 5 + files.outerHeight() + 10;
editor.offset (ioff);
//editor.innerHeight (foff.top - ioff.top - 5);
@ -71,11 +73,128 @@ function resize_editor()
editor.innerWidth (titleband.innerWidth());
}
var new_attachment_no = 0;
var populated_file_obj_for_adding = [];
var populated_file_max_for_adding = 0;
var original_file_name_array = [
<?php
for ($i = 0; $i < $file_count; $i++)
{
$f = $wiki->attachments[$i];
printf ("%s\t'%s'", (($i == 0)? '': ",\n"), addslashes($f->name));
}
print "\n";
?>
];
function populate_selected_files_for_adding ()
{
$('#wiki_edit_add_file_list').empty();
populated_file_obj_for_adding = [];
var f = $('#wiki_edit_add_files').get(0);
var f_no = 0;
for (var n = 0; n < f.files.length; n++)
{
if (f.files[n] != null)
{
$('#wiki_edit_add_file_list').append (
codepot_sprintf (
'<li id="wiki_edit_add_file_row_%d"><a href="#" id="wiki_edit_add_file_cancel_%d" onClick="cancel_out_add_file(%d); return false;"><i class="fa fa-trash"></i></a> %s</li>',
f_no, f_no, f_no, codepot_htmlspecialchars(f.files[n].name)
)
);
populated_file_obj_for_adding[f_no] = f.files[n];
f_no++;
}
}
populated_file_max_for_adding = f_no;
}
function cancel_out_add_file (no)
{
$('#wiki_edit_add_file_row_' + no).remove ();
populated_file_obj_for_adding[no] = null;
}
function kill_file (no)
{
var n = $('#wiki_edit_file_name_' + no);
if (n)
{
if (n.prop('disabled'))
{
n.css ('text-decoration', '');
n.prop ('disabled', false);
}
else
{
n.css ('text-decoration', 'line-through');
n.prop ('disabled', true);
}
}
resize_editor ();
}
function update_original_file_name_array ()
{
$('#wiki_edit_add_file_list').empty();
for (var i = 0; i < populated_file_max_for_adding; i++)
{
var f = populated_file_obj_for_adding[i];
if (f != null) original_file_name_array.push (f.name);
}
populated_file_obj_for_adding = [];
populated_file_max_for_adding = 0;
$('#wiki_edit_add_files').empty();
var f_no = 0;
var file_name_array = [];
for (var i = 0; i < original_file_name_array.length; i++)
{
var n = $('#wiki_edit_file_name_' + i);
if (n)
{
if (n.prop('disabled'))
{
// skip
}
else
{
file_name_array.push (original_file_name_array[i]);
}
}
}
$('#wiki_edit_file_list').empty();
original_file_name_array = file_name_array;
for (var i = 0; i < original_file_name_array.length; i++)
{
$('#wiki_edit_file_list').append (
codepot_sprintf (
'<li><a href="#" onClick="kill_file(%d); return false;"><i class="fa fa-trash"></i></a><span id="wiki_edit_file_name_%d">%s</span></li>',
i, i, original_file_name_array[i]
)
);
}
}
var wiki_text_editor = null;
var work_in_progress = false;
var wiki_original_name = '<?php print addslashes($wiki->name); ?>';
var wiki_new_name = '';
<?php if (function_exists('json_encode')): ?>
var wiki_original_text = <?php print json_encode($wiki->text); ?>;
<?php else: ?>
var wiki_original_text = '<?php print addcslashes($wiki->text, "\0..\37'\"\\"); ?>';
<?php endif; ?>
function show_in_progress_message (outputMsg, titleMsg)
{
@ -101,23 +220,25 @@ function show_in_progress_message (outputMsg, titleMsg)
}
$(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();
$('#wiki_edit_files').accordion({
collapsible: true,
heightStyle: "content",
activate: function() { resize_editor(); }
});
$('#wiki_edit_add_files_button').button().click (function () {
$('#wiki_edit_add_files').trigger('click');
return false;
}
);
});
$('#wiki_edit_add_files').change (function () {
populate_selected_files_for_adding ();
});
wiki_text_editor = new MediumEditor('#wiki_edit_text_editor', {
autoLink: true,
imageDragging: true,
buttonLabels: 'fontawesome',
anchorPreview: false,
toolbar: {
allowMultiParagraphSelection: true,
@ -155,7 +276,7 @@ $(function () {
});
<?php if ($mode == 'update'): ?>
wiki_text_editor.setContent ('<?php print addslashes($wiki->text); ?>', 0);
wiki_text_editor.setContent (wiki_original_text, 0);
<?php endif; ?>
$("#wiki_edit_save_button").button().click (function() {
@ -173,26 +294,34 @@ $(function () {
var form_data = new FormData();
/*
var f_no = 0;
for (var i = 0; i <= populated_file_max; i++)
for (var i = 0; i < populated_file_max_for_adding; i++)
{
var f = populated_file_obj[i];
var f = populated_file_obj_for_adding[i];
if (f != null)
{
form_data.append ('wiki_file_' + f_no, f);
var d = $('#wiki_edit_file_desc_' + i);
if (d != null) form_data.append('wiki_file_desc_' + f_no, d.val());
f_no++;
}
}
form_data.append ('wiki_file_count', f_no);
form_data.append ('wiki_file_count', f_no);*/
f_no = 0;
for (var i = 0; i < original_file_name_array.length; i++)
{
var n = $('#wiki_edit_file_name_' + i);
if (n)
{
if (n.prop('disabled'))
{
form_data.append ('wiki_kill_file_name_' + f_no, original_file_name_array[i]);
f_no++;
}
}
}
form_data.append ('wiki_kill_file_count', f_no);
form_data.append ('wiki_type', 'H');
form_data.append ('wiki_doctype', 'H');
form_data.append ('wiki_name', wiki_new_name);
form_data.append ('wiki_original_name', wiki_original_name);
form_data.append ('wiki_text', e.wiki_edit_text_editor.value);
@ -208,14 +337,23 @@ $(function () {
success: function (data, textStatus, jqXHR) {
work_in_progress = false;
show_in_progress_message (null, null);
if (data == 'ok')
{
var name_changed = (wiki_original_name != wiki_new_name);
wiki_original_name = wiki_new_name;
// TODO: reload contents?
wiki_original_text = e.wiki_edit_text_editor.value;
update_original_file_name_array ();
show_in_progress_message (null, null);
if (name_changed)
{
// reload the whole page if the name has changed.
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/updatex/{$project->id}/"; ?>' + codepot_string_to_hex(wiki_new_name)));
}
}
else
{
show_in_progress_message (null, null);
show_alert ('<pre>' + codepot_htmlspecialchars(data) + '</pre>', "<?php print $this->lang->line('Error')?>");
}
},
@ -247,6 +385,15 @@ $(function () {
return false;
});
$(window).on ("beforeunload", function (e) {
var ed = wiki_text_editor.serialize();
if (wiki_original_text != ed.wiki_edit_text_editor.value)
{
return 'Do you want to discard changes?';
}
// return null; // this line caused firefox to show the default message.
});
$(window).resize(resize_editor);
resize_editor ();
});
@ -297,44 +444,35 @@ $this->load->view (
<div style='clear: both'></div>
</div>
<div id='wiki_edit_attachment'>
<div id='wiki_edit_files' class='collapsible-box'>
<div id='wiki_edit_files_header' class='collapsible-box-header'>
<?php print $this->lang->line('WIKI_ATTACHMENTS')?>
<a href='#' id='wiki_edit_add_files_button'><?php print $this->lang->line('New')?></a>
</div>
<div id='wiki_edit_files_body'>
<input type='file' id='wiki_edit_add_files' name='wiki_add_files' multiple='' autocomplete='off' style='color: transparent; visibility: hidden; display: none;' />
<ul id='wiki_edit_file_list'>
<?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)
for ($i = 0; $i < $file_count; $i++)
{
$hexattname =
$this->converter->AsciiToHex($att->name) .
'@' .
$this->converter->AsciiToHex($att->encname);
$escattname = htmlspecialchars($att->name);
$att = $wiki->attachments[$i];;
print '<li>';
print "<input type='checkbox' name='wiki_delete_attachment[]' value='{$hexattname}' title='Check to delete {$escattname}'/>";
print $escattname;
printf ('<a href="#" onClick="kill_file(%d); return false;"><i class="fa fa-trash"></i></a>', $i);
printf (' <span id="wiki_edit_file_name_%d">%s</span>', $i, htmlspecialchars($att->name));
print '</li>';
}
?>
</ul>
<?php endif; ?>
</ul>
<?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 id='wiki_edit_add_file_list'>
</ul>
</div>
</div>
<div id="wiki_edit_result">
<div id="wiki_edit_result" class="result">
<div id='wiki_edit_text_editor'></div>
</div> <!-- wiki_edit_result -->

View File

@ -37,12 +37,18 @@ function show_alert (outputMsg, titleMsg)
$(function () {
<?php if (isset($login['id']) && $login['id'] != ''): ?>
$("#wiki_home_new_button").button().click (
$("#wiki_home_new_h_button").button().click (
function () {
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/createx/{$project->id}"; ?>'));
return false;
}
);
$("#wiki_home_new_c_button").button().click (
function () {
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/create/{$project->id}"; ?>'));
return false;
}
);
<?php endif; ?>
});
@ -74,9 +80,7 @@ $this->load->view (
'project' => $project,
),
'ctxmenuitems' => array (
array ("wiki/create/{$project->id}", '<i class="fa fa-plus"></i> ' . $this->lang->line('New'))
)
'ctxmenuitems' => array ()
)
);
?>
@ -91,7 +95,8 @@ $this->load->view (
<div class="actions">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="wiki_home_new_button" href='#'><?php print $this->lang->line('New')?></a>
<a id="wiki_home_new_h_button" href='#'><?php print $this->lang->line('New')?> [H]</a>
<a id="wiki_home_new_c_button" href='#'><?php print $this->lang->line('New')?> [C]</a>
<?php endif; ?>
<!-- <a id="wiki_home_search_button" href='#'><?php print $this->lang->line('Search')?></a> -->
</div>
@ -99,7 +104,7 @@ $this->load->view (
<div style='clear: both'></div>
</div>
<div id="wiki_home_mainarea_result" class="result">
<div id="wiki_home_result" class="result">
<?php
if (empty($wikis))
{

View File

@ -29,7 +29,7 @@
<?php
$hex_wikiname = $this->converter->AsciiToHex ($wiki->name);
if ($wiki->type == 'H')
if ($wiki->doctype == 'H')
{
$is_html = TRUE;
$update_command = 'updatex';
@ -167,12 +167,6 @@ $(function () {
}
);
$("#wiki_show_new_button").button().click (
function () {
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/createx/{$project->id}"; ?>'));
return false;
}
);
$("#wiki_show_edit_button").button().click (
function () {
$(location).attr ('href', codepot_merge_path('<?php print site_url(); ?>', '<?php print "/wiki/{$update_command}/{$project->id}/{$hex_wikiname}"; ?>'));
@ -219,9 +213,7 @@ $this->load->view (
'project' => $project,
),
'ctxmenuitems' => array (
array ("wiki/create/{$project->id}", '<i class="fa fa-plus"></i> ' . $this->lang->line('New')),
)
'ctxmenuitems' => array ()
)
);
?>
@ -236,7 +228,6 @@ $this->load->view (
<div class="actions">
<?php if (isset($login['id']) && $login['id'] != ''): ?>
<a id="wiki_show_new_button" href='#'><?php print $this->lang->line('New')?></a>
<a id="wiki_show_edit_button" href='#'><?php print $this->lang->line('Edit')?></a>
<a id="wiki_show_delete_button" href='#'><?php print $this->lang->line('Delete')?></a>
<?php endif; ?>
@ -245,23 +236,18 @@ $this->load->view (
<div style='clear: both'></div>
</div>
<div id="wiki_show_result" class="result">
<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_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>
<li><?php print $this->lang->line('Last updated by')?> <?php print htmlspecialchars($wiki->updatedby); ?></li>
</ul>
</div>
<div id='wiki_show_attachment_list_div'>
<ul id='wiki_show_attachment_list'>
<ul id='wiki_show_file_list'>
<?php
foreach ($wiki->attachments as $att)
{
@ -275,12 +261,12 @@ $this->load->view (
}
?>
</ul>
</div>
<div style='clear: both;'></div>
</div>
</div>
<div id="wiki_show_result" class="result">
<?php
if ($is_html)
{
@ -288,15 +274,13 @@ $this->load->view (
}
else
{
print '<div class="result" id="wiki_show_wiki">';
print '<div id="wiki_show_wiki">';
print '<pre id="wiki_show_wiki_text" style="visibility: hidden">';
print htmlspecialchars($wiki->text);
print '</pre>';
print '</div>';
}
?>
</div> <!-- wiki_show_result -->

View File

@ -377,7 +377,6 @@ textarea {
}
.content .mainarea .result {
/*min-height: 30em;*/
overflow: auto;
}

View File

@ -1,64 +1,50 @@
/*-----------------------------------------------
* file home view
*-----------------------------------------------*/
#file_home_mainarea_result {
#file_home_result,
#file_show_result {
position: relative;
overflow: auto;
margin: 0.2em 0 0.2em 0;
}
#file_home_mainarea_result_table tr {
#file_home_result_table tr {
vertical-align: middle;
}
/*-----------------------------------------------
* file show view
*-----------------------------------------------*/
#file_show_mainarea_result {
position: relative;
min-height: 13em;
}
#file_show_mainarea_result_info {
position: absolute;
top: 5px;
right: 2px;
width: 22em;
background: #E5ECF9 none repeat scroll 0 0;
border: #D4DBE8 1px solid;
overflow: auto;
padding: 0.2em 0.4em 0.2em 0.4em;
font-size: 0.9em;
}
#file_show_mainarea_result_info ul {
padding-left: 2em;
}
#file_show_mainarea_result_info .title {
background-color: #8888FF;
color: #FFFFFF;
border: #D4DBE8 1px solid;
margin: 0.3em 0 0.3em 0;
padding: 0.1em 0.1em 0.1em 0.1em;
font-size: inherit;
text-transform: uppercase;
}
#file_show_mainarea_files td {
#file_show_files td {
padding-left: 0.5em;
padding-right: 0.5em;
line-height: 1.5em;
white-space: nowrap;
}
#file_show_mainarea_metadata_body,
#file_show_mainarea_files_body {
#file_show_metadata_body,
#file_show_files_body {
background-color: #FCFCFC;
margin: 0 !important;
padding: 0.5em 0.5em 0.5em 0.5em !important;
}
#file_show_mainarea_metadata_body ul {
padding: 0em 0.5em 0em 0.5em;
margin: 0;
#file_show_metadata_list {
padding: 0 !important;
margin: 0 0 0.5em 0 !important;
list-style: outside none none !important;
clear: both;
}
#file_show_metadata_list li {
padding: 0.2em 0.2em 0.2em 0.2em !important;
margin: 0em 0.2em 0.4em 0.2em !important;
float: left !important;
background-color: #EAEAEA !important;
color: #000000 !important;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
/*-----------------------------------------------
@ -95,25 +81,25 @@
/*-----------------------------------------------
* file home show - edit file dialog
*-----------------------------------------------*/
#file_show_mainarea_edit_description_tabs {
#file_show_edit_description_tabs {
border: none !important;
}
#file_show_mainarea_edit_description_tabs .ui-tabs-panel {
#file_show_edit_description_tabs .ui-tabs-panel {
padding: 0.2em 0em 0em 0em !important;
}
#file_show_mainarea_edit_description_tabs .ui-widget-header {
#file_show_edit_description_tabs .ui-widget-header {
border: none !important;
background: none !important;
padding: 0em !important;
}
#file_show_mainarea_edit_description_tabs .ui-tabs-nav {
#file_show_edit_description_tabs .ui-tabs-nav {
padding: 0em !important;
}
/* #file_show_mainarea_edit_description_tabs .ui-tabs-nav li { */
/* #file_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

@ -95,8 +95,11 @@ li.issue-owner {
/*---------------------------------------------
* issue home
*---------------------------------------------*/
#issue_home_result {
#issue_home_result,
#issue_show_result {
position: relative;
overflow: auto;
margin: 0.2em 0 0.2em 0;
}
#issue_home_result_table tr {

View File

@ -1,9 +1,32 @@
/*---------------------------------------------
* wiki show
* wiki
*---------------------------------------------*/
#wiki_home_result,
#wiki_show_result {
position: relative;
overflow: auto;
margin: 0.2em 0 0.2em 0;
}
#wiki_show_result pre {
white-space: pre-wrap !important;
}
#wiki_show_result table
{
border-collapse: collapse;
}
#wiki_show_result table td {
border: 1px solid #E0E0E0;
}
#wiki_edit_result {
position: relative;
overflow: hidden !important;
margin: 0.2em 0 0.2em 0;
}
#wiki_show_wiki {
@ -18,41 +41,76 @@
column-gap: 2em;
}
#wiki_show_metadata_body {
#wiki_show_metadata_body,
#wiki_edit_files_body {
background-color: #FCFCFC;
margin: 0 !important;
padding: 0.5em 0.5em 0.5em 0.5em !important;
}
#wiki_show_metadata_body ul {
padding: 0em 0.5em 0em 0.5em;
margin: 0;
}
#wiki_show_metadata_list_div {
float: left;
}
#wiki_show_attachment_list_div {
margin-left: 2em;
float: left;
/*
#wiki_show_file_list a,
*/
#wiki_show_metadata_list,
#wiki_show_file_list,
#wiki_edit_file_list,
#wiki_edit_add_file_list {
padding: 0 !important;
margin: 0 0 0.5em 0 !important;
list-style: outside none none !important;
clear: both;
}
#wiki_show_attachment_list {
#wiki_show_metadata_list li {
padding: 0.2em 0.2em 0.2em 0.2em !important;
margin: 0em 0.2em 0.4em 0.2em !important;
float: left !important;
background-color: #EAEAEA !important;
color: #000000 !important;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#wiki_show_attachment_list a,
#wiki_show_attachment_list a:visited,
#wiki_show_attachment_list a:focus {
#wiki_show_file_list li,
#wiki_edit_file_list li {
padding: 0.2em 0.2em 0.2em 0.2em !important;
margin: 0em 0.2em 0.4em 0.2em !important;
float: left !important;
/*background-color: #44AD8E !important;*/
background-color: #015067 !important;
color: #FFFFFF !important;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#wiki_show_file_list a,
#wiki_show_file_list a:visited,
#wiki_show_file_list a:focus {
text-decoration: none;
color: #111111;
}
#wiki_show_attachment_list a:hover {
background-color: #1C94C4;
color: #FFFFFF;
}
/*---------------------------------------------
* wiki edit
*---------------------------------------------*/
#wiki_edit_form {
#wiki_show_file_list a:hover {
color: #90AACC;
}
#wiki_edit_add_file_list li {
padding: 0.2em 0.2em 0.2em 0.2em !important;
margin: 0em 0.2em 0.4em 0.2em !important;
float: left !important;
background-color: #994044 !important;
color: #FFFFFF !important;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#wiki_edit_file_list .fa,
#wiki_edit_add_file_list .fa {
color: #FFFFFF !important;
}
#wiki_edit_text_area,