From 21742a46c5f4e9f5a33e5ec84240b31e89afe392 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 18 Jan 2016 10:30:29 +0000 Subject: [PATCH] added primitive issue comment editing --- codepot/README | 2 + codepot/etc/codepot.mysql | 2 + codepot/etc/codepot.oracle | 10 +- codepot/etc/codepot.pgsql | 6 +- codepot/src/codepot/controllers/issue.php | 80 +++++ .../codepot/language/english/issue_lang.php | 1 - .../codepot/language/korean/issue_lang.php | 1 - codepot/src/codepot/models/issuemodel.php | 148 ++++++++- codepot/src/codepot/views/code_history.php | 2 +- codepot/src/codepot/views/issue_home.php | 2 +- codepot/src/codepot/views/issue_show.php | 312 ++++++++++++------ codepot/src/codepot/views/wiki_edit.php | 8 +- codepot/src/codepot/views/wiki_show.php | 2 +- codepot/src/css/issue.css | 57 +++- 14 files changed, 483 insertions(+), 150 deletions(-) diff --git a/codepot/README b/codepot/README index 7cf63a3b..f2b5d510 100644 --- a/codepot/README +++ b/codepot/README @@ -24,6 +24,8 @@ UPGRADING FROM 0.2.0 mysql> ALTER TABLE project ADD COLUMN (codecharset VARCHAR(32)); mysql> DROP TABLE issue_attachment; mysql> create the issue_file_list table according to the definition found in codepot.mysql + mysql> ALTER TABLE issue_change ADD COLUMN(createdon datetime not null, createdby varchar(32) not null); + mysql> UPDATE issue_change SET createdby=updatedby, createdon=updatedon; INSTALLATION ON CENTOS diff --git a/codepot/etc/codepot.mysql b/codepot/etc/codepot.mysql index 0c4fb671..a7f904b5 100644 --- a/codepot/etc/codepot.mysql +++ b/codepot/etc/codepot.mysql @@ -134,7 +134,9 @@ CREATE TABLE issue_change ( priority VARCHAR(32) NOT NULL, comment TEXT NOT NULL, + createdon DATETIME NOT NULL, updatedon DATETIME NOT NULL, + createdby VARCHAR(32) NOT NULL, updatedby VARCHAR(32) NOT NULL, PRIMARY KEY (projectid, id, sno), diff --git a/codepot/etc/codepot.oracle b/codepot/etc/codepot.oracle index 4ff81379..929f31bc 100644 --- a/codepot/etc/codepot.oracle +++ b/codepot/etc/codepot.oracle @@ -14,9 +14,9 @@ -- DROP TABLE "cpot_log"; -- DROP TABLE "cpot_code_review"; -- DROP TABLE "cpot_file"; --- DROP TABLE "cpot_issue_change_attachment"; +-- DROP TABLE "cpot_issue_change_file_list"; -- DROP TABLE "cpot_issue_change"; --- DROP TABLE "cpot_issue_attachment"; +-- DROP TABLE "cpot_issue_file_list"; -- DROP TABLE "cpot_issue"; -- DROP TABLE "cpot_wiki_attachment"; -- DROP TABLE "cpot_wiki"; @@ -130,8 +130,10 @@ CREATE TABLE "cpot_issue_change" ( "owner" VARCHAR(255) NOT NULL, "priority" VARCHAR(32) NOT NULL, "comment" CLOB NOT NULL, - "updatedon" TIMESTAMP NOT NULL, - "updatedby" VARCHAR(32) NOT NULL, + "createdon" TIMESTAMP NOT NULL, + "updatedon" TIMESTAMP NOT NULL, + "createdby" VARCHAR(32) NOT NULL, + "updatedby" VARCHAR(32) NOT NULL, PRIMARY KEY ("projectid", "id", "sno"), CONSTRAINT issue_update_id FOREIGN KEY ("projectid","id") REFERENCES "cpot_issue"("projectid","id") ); diff --git a/codepot/etc/codepot.pgsql b/codepot/etc/codepot.pgsql index 73470943..bc351f0d 100644 --- a/codepot/etc/codepot.pgsql +++ b/codepot/etc/codepot.pgsql @@ -152,8 +152,10 @@ CREATE TABLE issue_change ( priority VARCHAR(32) NOT NULL, comment TEXT NOT NULL, - updatedon TIMESTAMP NOT NULL, - updatedby VARCHAR(32) NOT NULL, + createdon TIMESTAMP NOT NULL, + updatedon TIMESTAMP NOT NULL, + createdby VARCHAR(32) NOT NULL, + updatedby VARCHAR(32) NOT NULL, PRIMARY KEY (projectid, id, sno), diff --git a/codepot/src/codepot/controllers/issue.php b/codepot/src/codepot/controllers/issue.php index 1f09a8a0..af0e3196 100644 --- a/codepot/src/codepot/controllers/issue.php +++ b/codepot/src/codepot/controllers/issue.php @@ -663,6 +663,67 @@ class Issue extends Controller print $status; } + + function xhr_edit_comment ($projectid = '', $issueid = '') + { + $this->load->model ('ProjectModel', 'projects'); + $this->load->model ('IssueModel', 'issues'); + + $login = $this->login->getUser (); + $revision_saved = -1; + + if ($login['id'] == '') + { + $status = 'error - anonymous user'; + } + else + { + $issueid = $this->converter->HexToAscii ($issueid); + + $project = $this->projects->get ($projectid); + if ($project === FALSE) + { + $status = "error - failed to get the project {$projectid}"; + } + else if ($project === NULL) + { + $status = "error - no such project {$projectid}"; + } + else if (($comment_sno = $this->input->post('issue_edit_comment_sno')) === FALSE || $comment_sno <= 0) + { + $status = "error - invalid comment number"; + } + else if (!$login['sysadmin?'] && + /*$this->projects->projectHasMember($projectid, $login['id']) === FALSE &&*/ + $this->issues->isIssueChangeCreatedBy($projectid, $issueid, $comment_sno, $login['id']) === FALSE) + { + $status = "error - comment not created by {$login['id']}"; + } + else + { + $text = $this->input->post('issue_edit_comment_text'); + + if ($text === FALSE ||$text == '') + { + $status = "error - empty comment text"; + } + else + { + if ($this->issues->editComment ($login['id'], $projectid, $issueid, $comment_sno, $text) === FALSE) + { + $status = 'error - ' . $this->issues->getErrorMessage(); + } + else + { + $status = 'ok'; + } + } + } + } + + print $status; + } + //////////////////////////////////////////////////////////////////////// // Handling of attached files share the (almost) same code // between issue.php and wiki.php. It would be way better @@ -884,6 +945,25 @@ class Issue extends Controller } if ($part[2] != '') $filename = $part[2]; } + else if (count($part) == 2) + { + //$target => wikiname:attachment + //$target => #I1:file + if ($part[0] != '') + { + if ($part[0][0] == '#' && $part[0][1] == 'I') + { + $issueid = substr ($part[0],2); + $wikiname = ''; + } + else + { + $wikiname = $part[0]; + $issueid = ''; + } + } + if ($part[1] != '') $filename = $part[1]; + } if ($wikiname != '') $this->_handle_wiki_attachment ($login, $projectid, $wikiname, $filename); diff --git a/codepot/src/codepot/language/english/issue_lang.php b/codepot/src/codepot/language/english/issue_lang.php index 98eaf46b..b05b27ad 100644 --- a/codepot/src/codepot/language/english/issue_lang.php +++ b/codepot/src/codepot/language/english/issue_lang.php @@ -25,7 +25,6 @@ $lang['ISSUE_PRIORITY_OTHER'] = 'Other'; $lang['ISSUE_MSG_CHANGED_X_TO_Z'] = "Changed %s to %s"; $lang['ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'] = "Changed %s from %s to %s"; $lang['ISSUE_MSG_CONFIRM_UNDO'] = 'Are you sure to undo the last change?'; -$lang['ISSUE_MSG_CREATED'] = 'Created'; $lang['ISSUE_MSG_NO_ISSUES_AVAILABLE'] = 'No outstanding issues'; $lang['ISSUE_MSG_NO_SUCH_ISSUE'] = 'No such issue - %s'; $lang['ISSUE_MSG_TOTAL_NUM_ISSUES'] = 'Total %d issues'; diff --git a/codepot/src/codepot/language/korean/issue_lang.php b/codepot/src/codepot/language/korean/issue_lang.php index b7bb9eb0..15307657 100644 --- a/codepot/src/codepot/language/korean/issue_lang.php +++ b/codepot/src/codepot/language/korean/issue_lang.php @@ -24,7 +24,6 @@ $lang['ISSUE_PRIORITY_OTHER'] = '기타'; $lang['ISSUE_MSG_CHANGED_X_TO_Z'] = "%s을/를 %s(으)로 변경"; $lang['ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'] = "%s을/를 %s에서 %s(으)로 변경"; $lang['ISSUE_MSG_CONFIRM_UNDO'] = '마지막 변경내용을 취소할까요?'; -$lang['ISSUE_MSG_CREATED'] = '생성됨'; $lang['ISSUE_MSG_NO_ISSUES_AVAILABLE'] = '처리해야 할 이슈가 없습니다'; $lang['ISSUE_MSG_NO_SUCH_ISSUE'] = '해당 이슈가 없습니다 - %s'; $lang['ISSUE_MSG_TOTAL_NUM_ISSUES'] = '전체 이슈 %d개'; diff --git a/codepot/src/codepot/models/issuemodel.php b/codepot/src/codepot/models/issuemodel.php index ec59bacf..f629ed5c 100644 --- a/codepot/src/codepot/models/issuemodel.php +++ b/codepot/src/codepot/models/issuemodel.php @@ -181,6 +181,8 @@ class IssueModel extends Model function create ($userid, $issue) { + $now = codepot_nowtodbdate(); + // TODO: check if userid can do this.. $this->db->trans_start (); @@ -206,8 +208,8 @@ class IssueModel extends Model $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); - $this->db->set ('createdon', codepot_nowtodbdate()); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); + $this->db->set ('updatedon', $now); $this->db->set ('createdby', $userid); $this->db->set ('updatedby', $userid); $this->db->insert ('issue'); @@ -220,11 +222,13 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('comment', ''); $this->db->set ('priority', $issue->priority); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); + $this->db->set ('createdby', $userid); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); - $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); $this->db->set ('type', 'issue'); $this->db->set ('action', 'create'); $this->db->set ('projectid', $issue->projectid); @@ -240,16 +244,18 @@ class IssueModel extends Model function update_partial ($userid, $issue) { + $now = codepot_nowtodbdate(); + $this->db->trans_start (); $this->db->where ('projectid', $issue->projectid); $this->db->where ('id', $issue->id); $this->db->set ('summary', $issue->summary); $this->db->set ('description', $issue->description); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); - $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $issue->projectid); @@ -265,6 +271,8 @@ class IssueModel extends Model function update ($userid, $issue) { + $now = codepot_nowtodbdate(); + // TODO: check if userid can do this.. $this->db->trans_start (); $this->db->where ('projectid', $issue->projectid); @@ -275,7 +283,7 @@ class IssueModel extends Model $this->db->set ('status', $issue->status); $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); @@ -287,11 +295,11 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('priority', $issue->priority); $this->db->set ('comment', ''); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->update ('issue_change'); - $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $issue->projectid); @@ -307,6 +315,8 @@ class IssueModel extends Model function change ($userid, $project, $id, $change) { + $now = codepot_nowtodbdate(); + $this->db->trans_start (); $this->db->where ('projectid', $project->id); @@ -330,7 +340,9 @@ class IssueModel extends Model $this->db->set ('owner', $change->owner); $this->db->set ('priority', $change->priority); $this->db->set ('comment', $change->comment); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); + $this->db->set ('createdby', $userid); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); @@ -340,11 +352,11 @@ class IssueModel extends Model $this->db->set ('status', $change->status); $this->db->set ('owner', $change->owner); $this->db->set ('priority', $change->priority); - $this->db->set ('updatedon', codepot_nowtodbdate()); + $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->update ('issue'); - $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); $this->db->set ('type', 'issue'); $this->db->set ('action', 'change'); $this->db->set ('projectid', $project->id); @@ -505,6 +517,8 @@ class IssueModel extends Model $this->db->set ('owner', $issue->owner); $this->db->set ('comment', ''); $this->db->set ('priority', $issue->priority); + $this->db->set ('createdon', $now); + $this->db->set ('createdby', $userid); $this->db->set ('updatedon', $now); $this->db->set ('updatedby', $userid); $this->db->insert ('issue_change'); @@ -888,7 +902,7 @@ class IssueModel extends Model } } - $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('createdon', $now); $this->db->set ('type', 'issue'); $this->db->set ('action', 'update'); $this->db->set ('projectid', $projectid); @@ -917,6 +931,55 @@ class IssueModel extends Model return $x; } + private function _edit_comment ($userid, $projectid, $issueid, $sno, $text) + { + $this->db->trans_begin (); // manual transaction. not using trans_start(). + + $now = codepot_nowtodbdate(); + + $this->db->where ('projectid', $projectid); + $this->db->where ('id', $issueid); + $this->db->where ('sno', $sno); + $this->db->set ('comment', $text); + $this->db->set ('updatedon', $now); + $this->db->set ('updatedby', $userid); + $this->db->update ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->errmsg = $this->db->_error_message(); + $this->db->trans_rollback (); + return FALSE; + } + + /* + $this->db->set ('createdon', codepot_nowtodbdate()); + $this->db->set ('type', 'issue'); + $this->db->set ('action', 'update'); + $this->db->set ('projectid', $projectid); + $this->db->set ('userid', $userid); + $this->db->set ('message', $issueid); + $this->db->insert ('log'); + + if ($this->db->trans_status() === FALSE) + { + $this->errmsg = $this->db->_error_message(); + $this->db->trans_rollback (); + return FALSE; + }*/ + + $this->db->trans_commit (); + return TRUE; + } + + function editComment ($userid, $projectid, $issueid, $sno, $text) + { + set_error_handler (array ($this, 'capture_error')); + $errmsg = ''; + $x = $this->_edit_comment ($userid, $projectid, $issueid, $sno, $text); + restore_error_handler (); + return $x; + } + function isIssueCreatedBy ($projectid, $issueid, $userid) { $this->db->trans_begin (); // manual transaction. not using trans_start(). @@ -926,6 +989,7 @@ class IssueModel extends Model $query = $this->db->get ('issue'); if ($this->db->trans_status() === FALSE) { + $this->errmsg = $this->db->_error_message(); $this->db->trans_rollback (); return FALSE; } @@ -940,7 +1004,63 @@ class IssueModel extends Model $this->db->trans_commit (); $issue = &$result[0]; - return ($issue->created_by == $userid); + return ($issue->createdby == $userid); + } + + function isIssueChangeCreatedBy ($projectid, $issueid, $sno, $userid) + { + $this->db->trans_begin (); // manual transaction. not using trans_start(). + + $this->db->where ('projectid', $projectid); + $this->db->where ('id', $issueid); + $this->db->where ('sno', $sno); + $query = $this->db->get ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->errmsg = $this->db->_error_message(); + $this->db->trans_rollback (); + return FALSE; + } + + $result = $query->result (); + if (empty($result)) + { + $this->db->trans_commit (); + return FALSE; + } + + $this->db->trans_commit (); + + $issue = &$result[0]; + return $issue->createdby == $userid; + } + + function isIssueChangeMadeBy ($projectid, $issueid, $sno, $userid) + { + $this->db->trans_begin (); // manual transaction. not using trans_start(). + + $this->db->where ('projectid', $projectid); + $this->db->where ('id', $issueid); + $this->db->where ('sno', $sno); + $query = $this->db->get ('issue_change'); + if ($this->db->trans_status() === FALSE) + { + $this->errmsg = $this->db->_error_message(); + $this->db->trans_rollback (); + return FALSE; + } + + $result = $query->result (); + if (empty($result)) + { + $this->db->trans_commit (); + return FALSE; + } + + $this->db->trans_commit (); + + $issue = &$result[0]; + return ($issue->createdby == $userid || $issue->updatedby == $userid); } } diff --git a/codepot/src/codepot/views/code_history.php b/codepot/src/codepot/views/code_history.php index 68c7947f..178b6faa 100644 --- a/codepot/src/codepot/views/code_history.php +++ b/codepot/src/codepot/views/code_history.php @@ -147,7 +147,7 @@ $this->load->view ( if (array_key_exists('author', $h)) { $user_icon_url = codepot_merge_path (site_url(), '/user/icon/' . $this->converter->AsciiToHex($h['author'])); - print ""; + print " "; print htmlspecialchars($h['author']); } diff --git a/codepot/src/codepot/views/issue_home.php b/codepot/src/codepot/views/issue_home.php index 1917d04d..eb8957ca 100644 --- a/codepot/src/codepot/views/issue_home.php +++ b/codepot/src/codepot/views/issue_home.php @@ -42,7 +42,7 @@ function show_alert (outputMsg, titleMsg) width: 'auto', height: 'auto', buttons: { - "OK": function () { + 'lang->line('OK')?>': function () { $(this).dialog("close"); } } diff --git a/codepot/src/codepot/views/issue_show.php b/codepot/src/codepot/views/issue_show.php index ec0fcca7..3debc02c 100644 --- a/codepot/src/codepot/views/issue_show.php +++ b/codepot/src/codepot/views/issue_show.php @@ -27,6 +27,8 @@ $issue_file_count = count ($issue->files); $creole_base = site_url() . "/wiki/show/{$project->id}/"; $creole_file_base = site_url() . "/issue/file/{$project->id}/{$issue->id}/"; + +$change_count = count($issue->changes); ?> @@ -736,48 +870,57 @@ $this->load->view (
-
lang->line('State')?>
-
-
    - lang->line('State')?>
+
+
    +
  • lang->line('Created on')?> createdon); ?>
  • +
  • lang->line('Created by')?> createdby); ?>
  • +
  • lang->line('Last updated on')?> updatedon); ?>
  • +
  • lang->line('Last updated by')?> updatedby); ?>
  • +
- $type = array_key_exists($issue->type, $issue_type_array)? - $issue_type_array[$issue->type]: $issue->type; +
    + status, $issue_status_array)? - $issue_status_array[$issue->status]: $issue->status; + $type = array_key_exists($issue->type, $issue_type_array)? + $issue_type_array[$issue->type]: $issue->type; - $priority = array_key_exists($issue->priority, $issue_priority_array)? - $issue_priority_array[$issue->priority]: $issue->priority; + $status = array_key_exists($issue->status, $issue_status_array)? + $issue_status_array[$issue->status]: $issue->status; - printf ('
  • ', $issue->type); - print $this->lang->line('Type'); - print ': '; - print htmlspecialchars($type); - print '
  • '; + $priority = array_key_exists($issue->priority, $issue_priority_array)? + $issue_priority_array[$issue->priority]: $issue->priority; - printf ('
  • ', $issue->status); - print $this->lang->line('Status'); - print ': '; - print htmlspecialchars($status); - print '
  • '; - - printf ('
  • ', $issue->priority); - print $this->lang->line('Priority'); - print ': '; - print htmlspecialchars($priority); - print '
  • '; - - print '
  • '; - if ($issue->owner != '') - { - print $this->lang->line('Owner'); + printf ('
  • ', $issue->type); + print $this->lang->line('Type'); print ': '; - print htmlspecialchars($issue->owner); + print htmlspecialchars($type); print '
  • '; - } - ?> -
+ + printf ('
  • ', $issue->status); + print $this->lang->line('Status'); + print ': '; + print htmlspecialchars($status); + print '
  • '; + + printf ('
  • ', $issue->priority); + print $this->lang->line('Priority'); + print ': '; + print htmlspecialchars($priority); + print '
  • '; + + print '
  • '; + if ($issue->owner != '') + { + print $this->lang->line('Owner'); + print ': '; + print htmlspecialchars($issue->owner); + print '
  • '; + } + ?> + + +
    @@ -838,17 +981,16 @@ $this->load->view (
    lang->line ('ISSUE_MSG_CHANGED_X_FROM_Y_TO_Z'); $msgfmt_changed_to = $this->lang->line ('ISSUE_MSG_CHANGED_X_TO_Z'); - $count = count($issue->changes); print ''; - while ($count > 1) +// TODO: displa changes[0]; + for ($i = 1; $i < $change_count; $i++) { - $new = $issue->changes[--$count]; - $old = $issue->changes[$count-1]; + $new = $issue->changes[$i]; + $old = $issue->changes[$i - 1]; print ''; @@ -856,21 +998,31 @@ $this->load->view ( print codepot_dbdatetodispdate($new->updatedon); print ''; - print ''; - print ''; } - print ''; - print ''; - - print ''; - - print ''; - - print ''; - print '
    '; - print htmlspecialchars($new->updatedby); - print ''; - if ($new->comment != "") + + print "
    "; + print "
    "; + $user_icon_url = codepot_merge_path (site_url(), '/user/icon/' . $this->converter->AsciiToHex($new->updatedby)); + print " "; + print htmlspecialchars($new->updatedby); + print "
    "; + printf ("", $i, $this->lang->line('Edit')); + print "
    "; + print "
    "; + + $escaped_comment = htmlspecialchars($new->comment); + if(isset($login['id']) && $login['id'] != '') { - print "
    "; - print "
    ";
    -			print htmlspecialchars($new->comment);
    -			print '
    '; + print "
    "; + printf ('', $i, addslashes($new->sno)); + printf ('', $i, $escaped_comment); print '
    '; - $commentno++; } + print "
    "; + printf ("
    %s
    ", $i, $escaped_comment); + print '
    '; + print '
    '; print '
      '; if ($new->type != $old->type) @@ -931,21 +1083,6 @@ $this->load->view ( print '
    '; - print codepot_dbdatetodispdate($issue->createdon); - print ''; - print htmlspecialchars($issue->createdby); - print ''; - print $this->lang->line('ISSUE_MSG_CREATED'); - print '
    '; ?>
    @@ -971,7 +1108,7 @@ $this->load->view (
    - +
    @@ -1110,47 +1247,6 @@ $this->load->view ( - - diff --git a/codepot/src/codepot/views/wiki_edit.php b/codepot/src/codepot/views/wiki_edit.php index af34fc77..335321d5 100644 --- a/codepot/src/codepot/views/wiki_edit.php +++ b/codepot/src/codepot/views/wiki_edit.php @@ -45,7 +45,7 @@ function show_alert (outputMsg, titleMsg) width: 'auto', height: 'auto', buttons: { - "OK": function () { + 'lang->line('OK')?>': function () { $(this).dialog("close"); } } @@ -68,7 +68,7 @@ function show_in_progress_message (outputMsg, titleMsg) height: 'auto', buttons: { - "OK": function () { + 'lang->line('OK')?>': function () { // do nothing, don't event close the dialog. } }, @@ -381,11 +381,11 @@ function save_wiki_with_confirmation (outputMsg, titleMsg, wiki_new_name, wiki_n width: 'auto', height: 'auto', buttons: { - "OK": function () { + 'lang->line('OK')?>': function () { $(this).dialog("close"); save_wiki (wiki_new_name, wiki_new_text); }, - "Cancel": function () { + 'lang->line('Cancel')?>': function () { $(this).dialog("close"); } } diff --git a/codepot/src/codepot/views/wiki_show.php b/codepot/src/codepot/views/wiki_show.php index c04839bd..3e8662ce 100644 --- a/codepot/src/codepot/views/wiki_show.php +++ b/codepot/src/codepot/views/wiki_show.php @@ -52,7 +52,7 @@ function show_alert (outputMsg, titleMsg) width: 'auto', height: 'auto', buttons: { - "OK": function () { + 'lang->line('OK')?>': function () { $(this).dialog("close"); } } diff --git a/codepot/src/css/issue.css b/codepot/src/css/issue.css index 7f09548c..6b45e8d2 100644 --- a/codepot/src/css/issue.css +++ b/codepot/src/css/issue.css @@ -1,3 +1,27 @@ +.codepot-issue-comment-updater { + float: left; +} + +.codepot-issue-comment-actions { + float: right; +} + +.codepot-issue-comment-action-button { + font-size: 75% !important; +} + +textarea.codepot-issue-edit-comment { + + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + + border: 0 none; + width: 100%; + font-size: 0.9em; +} + + li.issue-type-defect { background-color: #D9534F; color: #FFFFFF; @@ -179,23 +203,38 @@ li.issue-owner { /*--------------------------------------------- * issue show *---------------------------------------------*/ -#issue_show_state_body { +#issue_show_metadata_body { background-color: #FCFCFC; padding: 1em 1em; } -#issue_show_state_body ul { +#issue_show_metadata_list, +#issue_show_state_list { + clear: both; padding: 0; margin: 0; list-style: outside none none; } -#issue_show_state_body ul li { +#issue_show_state_list { + padding-top: 0.2em; +} + +#issue_show_metadata_list li, +#issue_show_state_list li { padding: 0.2em 0.2em 0.2em 0.2em; margin: 0 0.2em 0 0.2em; float: left; } +#issue_show_metadata_list li { + background-color: #EAEAEA !important; + color: #000000 !important; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; +} + #issue_show_change_form { } @@ -229,11 +268,6 @@ li.issue-owner { } #issue_show_changes { - /* - margin-top: 1em; - padding-top: 0.5em; - padding-bottom: 0.5em; - */ overflow: auto; } @@ -246,10 +280,7 @@ li.issue-owner { #issue_show_changes_table td.date { min-width: 5em; width: 1px; -} - -#issue_show_changes_table td.updater { - width: 1px; + vertical-align: top; } #issue_show_changes_table td.details { @@ -304,7 +335,7 @@ li.issue-owner { } /*----------------------------------------------- - * issue home show - edit issue dialog + * issue show - edit issue dialog *-----------------------------------------------*/ #issue_show_edit_description_tabs { border: none !important;