Merge branch 'zenops_44' into zenops_46

This commit is contained in:
liyuchun
2022-09-20 08:33:44 +08:00
1197 changed files with 936742 additions and 352 deletions
+2
View File
@@ -262,3 +262,5 @@ UPDATE `zt_grouppriv` SET `module` = 'product' WHERE `module` = 'story' and `met
ALTER TABLE `zt_job` ADD `lastSyncDate` datetime DEFAULT NULL AFTER `lastTag`;
INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*/5', '*', '*', '*', '*', 'moduleName=compile&methodName=syncCompile', '定时同步构建记录', 'zentao', 1, 'normal', '0000-00-00 00:00:00');
ALTER TABLE `zt_repofiles` ADD `oldPath` varchar(255) DEFAULT '' AFTER `path`;
+1 -1
View File
@@ -1232,7 +1232,7 @@ EOT;
}
/* Fix value is '0123' error. */
if(is_numeric($value) and !preg_match('/^0[1-9]/', $value))
if(is_numeric($value) and !preg_match('/^0[0-9]+/', $value))
{
$js .= "{$prefix}{$key} = {$value};";
}
+55 -4
View File
@@ -213,6 +213,8 @@ class Gitea
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
execCmd(escapeCmd("$this->client pull"));
$path = ltrim($path, DIRECTORY_SEPARATOR);
$count = $count == 0 ? '' : "-n $count";
/* compatible with svn. */
@@ -278,6 +280,9 @@ class Gitea
$blame['lines'] = 1;
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
$log = $this->log('', '', '', 1);
$blame['message'] = $log[0]->comment;
$revision = $matches[1];
$revLine = $matches[5];
$blames[$revLine] = $blame;
@@ -611,6 +616,7 @@ class Gitea
$parsedFile = new stdclass();
$parsedFile->revision = $hash;
$parsedFile->path = '/' . trim($path);
$parsedFile->oldPath = isset($file[2]) ? '/' . trim($file[2]) : '';
$parsedFile->type = 'file';
$parsedFile->action = $action;
$logs['files'][$hash][] = $parsedFile;
@@ -683,12 +689,14 @@ class Gitea
}
elseif(strpos($line, "\t") !== false)
{
list($action, $entry) = explode("\t", $line);
$lineList = explode("\t", $line);
list($action, $entry) = $lineList;
$entry = '/' . trim($entry);
$pathInfo = array();
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$changes[$entry] = $pathInfo;
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$pathInfo['oldPath'] = isset($lineList[2]) ? '/' . trim($lineList[2]) : '';
$changes[$entry] = $pathInfo;
}
}
@@ -717,4 +725,47 @@ class Gitea
$api = $app->control->loadModel('gitea')->getApiRoot($this->repo->serviceHost);
return sprintf($api, "/repos/{$this->repo->serviceProject}/archive/{$branch}.zip");
}
/**
* List all files.
*
* @param string $path
* @param string $revision
* @param array $lists
* @access public
* @return array
*/
public function getAllFiles($path, $revision = 'HEAD', &$lists = array())
{
if(!scm::checkRevision($revision)) return array();
$path = ltrim($path, DIRECTORY_SEPARATOR);
$sub = '';
chdir($this->root);
if(!empty($path)) $sub = ":$path";
if(!empty($this->branch))$revision = $this->branch;
$cmd = escapeCmd("$this->client ls-tree -l $revision$sub");
$list = execCmd($cmd . ' 2>&1', 'array', $result);
if($result) return array();
$infos = array();
foreach($list as $entry)
{
list($mod, $kind, $revision, $size, $name) = preg_split('/[\t ]+/', $entry);
/* Get commit info. */
$pathName = ltrim($path . DIRECTORY_SEPARATOR . $name, DIRECTORY_SEPARATOR);
$info->kind = $kind == 'tree' ? 'dir' : 'file';
if($kind == 'tree')
{
$this->getAllFiles($pathName, $revision, $lists);
}
else
{
$lists[] = rtrim($pathName, DIRECTORY_SEPARATOR);
}
}
return $lists;
}
}
+50 -6
View File
@@ -257,6 +257,7 @@ class gitlab
$param = new stdclass;
$param->ref = ($revision and $revision != 'HEAD') ? $revision : $this->branch;
$results = $this->fetch($api, $param);
if(isset($results->message)) return array();
$blames = array();
$revLine = 0;
@@ -268,7 +269,8 @@ class gitlab
$line = array();
$line['revision'] = $blame->commit->id;
$line['committer'] = $blame->commit->committer_name;
$line['time'] = $blame->commit->committer_name;
$line['message'] = $blame->commit->message;
$line['time'] = date('Y-m-d H:i:s', strtotime($blame->commit->committed_date));
$line['line'] = $lineNumber;
$line['lines'] = count($blame->lines);
$line['content'] = array_shift($blame->lines);
@@ -342,7 +344,7 @@ class gitlab
if(!scm::checkRevision($revision)) return false;
if($revision == 'HEAD' and $this->branch) $revision = $this->branch;
$file = $this->files($entry, $revision);
return base64_decode($file->content);
return isset($file->content) ? base64_decode($file->content) : '';
}
/**
@@ -688,7 +690,7 @@ class gitlab
/**
* Get files by commit.
*
* @param string $commit
* @param string $commit
* @access public
* @return void
*/
@@ -717,8 +719,9 @@ class gitlab
$file->revision = $revision;
$file->path = '/' . $row->new_path;
$file->type = 'file';
$file->oldPath = '/' . $row->old_path;
$file->action = 'M';
$file->action = 'M';
if($row->new_file) $file->action = 'A';
if($row->renamed_file) $file->action = 'R';
if($row->deleted_file) $file->action = 'D';
@@ -827,8 +830,9 @@ class gitlab
foreach($commit->diffs as $diff)
{
$parsedLog->change[$diff->path] = array();
$parsedLog->change[$diff->path]['action'] = $diff->action;
$parsedLog->change[$diff->path]['kind'] = $diff->type;
$parsedLog->change[$diff->path]['action'] = $diff->action;
$parsedLog->change[$diff->path]['kind'] = $diff->type;
$parsedLog->change[$diff->path]['oldPath'] = $diff->oldPath;
}
$parsedLogs[] = $parsedLog;
}
@@ -853,4 +857,44 @@ class gitlab
return "{$this->root}archive.{$ext}" . '?' . http_build_query($params);
}
/**
* List all files.
*
* @param string $path
* @param string $revision
* @param array $lists
* @access public
* @return array
*/
public function getAllFiles($path = '', $revision = 'HEAD', &$lists = array())
{
if(!scm::checkRevision($revision)) return array();
$api = "tree";
$param = new stdclass();
$param->path = ltrim($path, '/');
$param->ref = $revision;
$param->recursive = 0;
if(!empty($this->branch)) $param->ref = $this->branch;
$list = $this->fetch($api, $param, true);
if(empty($list)) return array();
$infos = array();
foreach($list as $file)
{
if(!isset($file->type)) continue;
if($file->type == 'blob')
{
$lists[] = $file->path;
}
else
{
$this->getAllFiles($file->path, $revision, $lists);
}
}
return $lists;
}
}
+56 -5
View File
@@ -199,6 +199,8 @@ class GitRepo
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
execCmd(escapeCmd("$this->client pull"));
$path = ltrim($path, DIRECTORY_SEPARATOR);
$count = $count == 0 ? '' : "-n $count";
/* compatible with svn. */
@@ -264,6 +266,9 @@ class GitRepo
$blame['lines'] = 1;
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
$log = $this->log('', '', '', 1);
$blame['message'] = $log[0]->comment;
$revision = $matches[1];
$revLine = $matches[5];
$blames[$revLine] = $blame;
@@ -594,9 +599,10 @@ class GitRepo
$parsedFile = new stdclass();
$parsedFile->revision = $hash;
$parsedFile->path = '/' . trim($path);
$parsedFile->oldPath = isset($file[2]) ? '/' . trim($file[2]) : '';
$parsedFile->type = 'file';
$parsedFile->action = $action;
$logs['files'][$hash][] = $parsedFile;
$logs['files'][$hash][] = $parsedFile;
}
}
return $logs;
@@ -667,12 +673,14 @@ class GitRepo
}
elseif(strpos($line, "\t") !== false)
{
list($action, $entry) = explode("\t", $line);
$lineList = explode("\t", $line);
list($action, $entry) = $lineList;
$entry = '/' . trim($entry);
$pathInfo = array();
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$changes[$entry] = $pathInfo;
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$pathInfo['oldPath'] = isset($lineList[2]) ? '/' . trim($lineList[2]) : '';
$changes[$entry] = $pathInfo;
}
}
@@ -712,4 +720,47 @@ class GitRepo
return $config->webRoot . $app->getAppName() . 'data' . DS . 'repo' . DS . "{$this->repo->name}_$branch.zip";
}
/**
* List all files.
*
* @param string $path
* @param string $revision
* @param array $lists
* @access public
* @return array
*/
public function getAllFiles($path, $revision = 'HEAD', &$lists = array())
{
if(!scm::checkRevision($revision)) return array();
$path = ltrim($path, DIRECTORY_SEPARATOR);
$sub = '';
chdir($this->root);
if(!empty($path)) $sub = ":$path";
if(!empty($this->branch))$revision = $this->branch;
$cmd = escapeCmd("$this->client ls-tree -l $revision$sub");
$list = execCmd($cmd . ' 2>&1', 'array', $result);
if($result) return array();
$infos = array();
foreach($list as $entry)
{
list($mod, $kind, $revision, $size, $name) = preg_split('/[\t ]+/', $entry);
/* Get commit info. */
$pathName = ltrim($path . DIRECTORY_SEPARATOR . $name, DIRECTORY_SEPARATOR);
$info->kind = $kind == 'tree' ? 'dir' : 'file';
if($kind == 'tree')
{
$this->getAllFiles($pathName, $revision, $lists);
}
else
{
$lists[] = rtrim($pathName, DIRECTORY_SEPARATOR);
}
}
return $lists;
}
}
+55 -4
View File
@@ -213,6 +213,8 @@ class Gogs
if(!scm::checkRevision($fromRevision)) return array();
if(!scm::checkRevision($toRevision)) return array();
execCmd(escapeCmd("$this->client pull"));
$path = ltrim($path, DIRECTORY_SEPARATOR);
$count = $count == 0 ? '' : "-n $count";
/* compatible with svn. */
@@ -278,6 +280,9 @@ class Gogs
$blame['lines'] = 1;
$blame['content'] = strpos($matches[6], ' ') === false ? $matches[6] : substr($matches[6], 1);
$log = $this->log('', '', '', 1);
$blame['message'] = $log[0]->comment;
$revision = $matches[1];
$revLine = $matches[5];
$blames[$revLine] = $blame;
@@ -611,6 +616,7 @@ class Gogs
$parsedFile = new stdclass();
$parsedFile->revision = $hash;
$parsedFile->path = '/' . trim($path);
$parsedFile->oldPath = isset($file[2]) ? '/' . trim($file[2]) : '';
$parsedFile->type = 'file';
$parsedFile->action = $action;
$logs['files'][$hash][] = $parsedFile;
@@ -704,12 +710,14 @@ class Gogs
}
elseif(strpos($line, "\t") !== false)
{
list($action, $entry) = explode("\t", $line);
$lineList = explode("\t", $line);
list($action, $entry) = $lineList;
$entry = '/' . trim($entry);
$pathInfo = array();
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$changes[$entry] = $pathInfo;
$pathInfo['action'] = $action;
$pathInfo['kind'] = 'file';
$pathInfo['oldPath'] = isset($lineList[2]) ? '/' . trim($lineList[2]) : '';
$changes[$entry] = $pathInfo;
}
}
@@ -752,4 +760,47 @@ class Gogs
return $config->webRoot . $app->getAppName() . 'data' . DS . 'repo' . DS . "{$this->repo->name}_$branch.zip";
}
/**
* List all files.
*
* @param string $path
* @param string $revision
* @param array $lists
* @access public
* @return array
*/
public function getAllFiles($path, $revision = 'HEAD', &$lists = array())
{
if(!scm::checkRevision($revision)) return array();
$path = ltrim($path, DIRECTORY_SEPARATOR);
$sub = '';
chdir($this->root);
if(!empty($path)) $sub = ":$path";
if(!empty($this->branch))$revision = $this->branch;
$cmd = escapeCmd("$this->client ls-tree -l $revision$sub");
$list = execCmd($cmd . ' 2>&1', 'array', $result);
if($result) return array();
$infos = array();
foreach($list as $entry)
{
list($mod, $kind, $revision, $size, $name) = preg_split('/[\t ]+/', $entry);
/* Get commit info. */
$pathName = ltrim($path . DIRECTORY_SEPARATOR . $name, DIRECTORY_SEPARATOR);
$info->kind = $kind == 'tree' ? 'dir' : 'file';
if($kind == 'tree')
{
$this->getAllFiles($pathName, $revision, $lists);
}
else
{
$lists[] = rtrim($pathName, DIRECTORY_SEPARATOR);
}
}
return $lists;
}
}
+25
View File
@@ -271,6 +271,31 @@ class scm
{
return $this->engine->getDownloadUrl($branch, $savePath, $ext);
}
/**
* Get all files.
*
* @param string $path
* @param string $revision
* @access public
* @return string
*/
public function getAllFiles($path = '', $revision = 'HEAD')
{
return $this->engine->getAllFiles($path, $revision);
}
/**
* Get files by commit.
*
* @param string $commit
* @access public
* @return array
*/
public function getFilesByCommit($revision)
{
return $this->engine->getFilesByCommit($revision);
}
}
/**
+57 -2
View File
@@ -306,10 +306,14 @@ class Subversion
$blame = array();
$blame['revision'] = (int)$line->commit['revision'];
$blame['committer'] = (string)$line->commit->author;
$blame['time'] = substr($line->commit->date, 0, 10);
$blame['time'] = date('Y-m-d H:i:s', strtotime($line->commit->date));
$blame['line'] = (int)$line['line-number'];
$blame['lines'] = 1;
$blame['content'] = $content[$blame['line'] - 1];
$log = $this->log('', $blame['revision'], 'HEAD', 1);
$blame['message'] = $log[0]->comment;
$revision = $blame['revision'];
$revLine = $blame['line'];
$blames[$revLine] = $blame;
@@ -318,7 +322,7 @@ class Subversion
{
$blame = array();
$blame['line'] = (int)$line['line-number'];
$blame['content'] = $content[$blame['line'] - 1];
$blame['content'] = zget($content, $blame['line'] - 1, '');
$blames[$blame['line']] = $blame;
$blames[$revLine]['lines'] ++;
@@ -712,4 +716,55 @@ class Subversion
$zfile->removeDir($repoDir);
return $config->webRoot . $app->getAppName() . 'data' . DS . 'repo' . DS . $this->repo->name . '.zip';
}
/**
* List all files.
*
* @param string $path
* @param string $revision
* @param array $lists
* @access public
* @return array
*/
public function getAllFiles($path = '', $revision = 'HEAD', &$lists = array())
{
if(!scm::checkRevision($revision)) return array();
$resourcePath = $path;
$path = '"' . $this->root . '/' . str_replace(array('%2F', '+'), array('/', ' '), urlencode($path)) . '"';
$cmd = $this->replaceAuth(escapeCmd($this->buildCMD($path, 'ls', "-r $revision --xml")));
$list = execCmd($cmd, 'string', $result);
if($result)
{
$path = '"' . $this->root . '/' . $resourcePath . '"';
$cmd = $this->replaceAuth(escapeCmd($this->buildCMD($path, 'ls', "-r $revision --xml")));
$list = execCmd($cmd, 'string', $result);
if($result) $list = '';
}
$listObject = simplexml_load_string($list);
if(!empty($list) and empty($listObject))
{
$list = helper::convertEncoding($list, $this->encoding, 'utf-8');
$listObject = simplexml_load_string($list);
}
if(!empty($listObject->list->entry)) $listObject = $listObject->list->entry;
$infos = array();
if(empty($listObject)) return $infos;
foreach($listObject as $list)
{
$kind = (string)$list['kind'];
$pathName = ltrim($path . DIRECTORY_SEPARATOR . (string)$list->name, DIRECTORY_SEPARATOR);
if($kind == 'dir')
{
$this->getAllFiles($pathName, $revision, $lists);
}
else
{
$lists[] = rtrim($pathName, DIRECTORY_SEPARATOR);
}
}
return $lists;
}
}
+61 -51
View File
@@ -306,6 +306,8 @@ $lang->action->label->unlinkedfromproject = "Unlink Project";
$lang->action->label->unlinkedfrombuild = "Unlink Build";
$lang->action->label->linked2release = "Link Release";
$lang->action->label->unlinkedfromrelease = "Unlink Release";
$lang->action->label->linked2revision = "Link Revision";
$lang->action->label->unlinkedfromrevision = "Unlink Revision";
$lang->action->label->linkrelatedbug = "Link to Bug";
$lang->action->label->unlinkrelatedbug = "Unlink";
$lang->action->label->linkrelatedcase = "Link to Case";
@@ -472,6 +474,8 @@ $lang->action->dynamicAction->story['linked2plan'] = 'Link Story to Pl
$lang->action->dynamicAction->story['unlinkedfromplan'] = 'Unlink Story from Plan';
$lang->action->dynamicAction->story['linked2release'] = 'Link Story to Release';
$lang->action->dynamicAction->story['unlinkedfromrelease'] = 'Unlink Story from Plan';
$lang->action->dynamicAction->story['linked2revision'] = 'Link Story to Revision';
$lang->action->dynamicAction->story['unlinkedfromrevision'] = 'Unlink Story from Revision';
$lang->action->dynamicAction->story['linked2build'] = 'Link Story to Build';
$lang->action->dynamicAction->story['unlinkedfrombuild'] = 'Unlink Story from Build';
$lang->action->dynamicAction->story['unlinkedfromproject'] = 'Unlink Project';
@@ -529,62 +533,66 @@ $lang->action->dynamicAction->kanbancard['deleted'] = 'Delete Card';
$lang->action->dynamicAction->team['managedTeam'] = 'Manage Team';
$lang->action->dynamicAction->task['opened'] = 'Create Task';
$lang->action->dynamicAction->task['importfromgitlab'] = "Issue associate create task";
$lang->action->dynamicAction->task['edited'] = 'Edit Task';
$lang->action->dynamicAction->task['commented'] = 'Task Comment';
$lang->action->dynamicAction->task['assigned'] = 'Assign Task';
$lang->action->dynamicAction->task['confirmed'] = 'Confirm Task';
$lang->action->dynamicAction->task['started'] = 'Start Task';
$lang->action->dynamicAction->task['finished'] = 'Finish Task';
$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates';
$lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates';
$lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates';
$lang->action->dynamicAction->task['paused'] = 'Pause Task';
$lang->action->dynamicAction->task['closed'] = 'Close Task';
$lang->action->dynamicAction->task['canceled'] = 'Cancel Task';
$lang->action->dynamicAction->task['activated'] = 'Activate Task';
$lang->action->dynamicAction->task['createchildren'] = 'Create Child Task';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Unlink Parent Task';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Delete children task';
$lang->action->dynamicAction->task['linkparenttask'] = 'Link Parent Task';
$lang->action->dynamicAction->task['linkchildtask'] = 'Link Child Task';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Create Child Story';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Unlink Parent Story';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Delete children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Link Parent Story';
$lang->action->dynamicAction->task['linkchildstory'] = 'Link Child Story';
$lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
$lang->action->dynamicAction->task['opened'] = 'Create Task';
$lang->action->dynamicAction->task['importfromgitlab'] = "Issue associate create task";
$lang->action->dynamicAction->task['edited'] = 'Edit Task';
$lang->action->dynamicAction->task['commented'] = 'Task Comment';
$lang->action->dynamicAction->task['assigned'] = 'Assign Task';
$lang->action->dynamicAction->task['confirmed'] = 'Confirm Task';
$lang->action->dynamicAction->task['started'] = 'Start Task';
$lang->action->dynamicAction->task['finished'] = 'Finish Task';
$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates';
$lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates';
$lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates';
$lang->action->dynamicAction->task['paused'] = 'Pause Task';
$lang->action->dynamicAction->task['closed'] = 'Close Task';
$lang->action->dynamicAction->task['canceled'] = 'Cancel Task';
$lang->action->dynamicAction->task['activated'] = 'Activate Task';
$lang->action->dynamicAction->task['createchildren'] = 'Create Child Task';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Unlink Parent Task';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Delete children task';
$lang->action->dynamicAction->task['linkparenttask'] = 'Link Parent Task';
$lang->action->dynamicAction->task['linkchildtask'] = 'Link Child Task';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Create Child Story';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Unlink Parent Story';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Delete children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Link Parent Story';
$lang->action->dynamicAction->task['linkchildstory'] = 'Link Child Story';
$lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
$lang->action->dynamicAction->task['linked2revision'] = 'Link Task to Revision';
$lang->action->dynamicAction->task['unlinkedfromrevision'] = 'Unlink Task from Revision';
$lang->action->dynamicAction->build['opened'] = 'Create Build';
$lang->action->dynamicAction->build['edited'] = 'Edit Build';
$lang->action->dynamicAction->build['deleted'] = 'Delete Build';
$lang->action->dynamicAction->bug['opened'] = 'Report Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "Issue associate create bug";
$lang->action->dynamicAction->bug['edited'] = 'Edit Bug';
$lang->action->dynamicAction->bug['activated'] = 'Activate Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Assign Bug';
$lang->action->dynamicAction->bug['closed'] = 'Close Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Confirm Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Resolve Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Restore Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Hide Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Delete Bug';
$lang->action->dynamicAction->bug['confirmed'] = 'Confirm Story Change';
$lang->action->dynamicAction->bug['tostory'] = 'Convert to Story';
$lang->action->dynamicAction->bug['totask'] = 'Convert to Task';
$lang->action->dynamicAction->bug['linked2plan'] = 'Link Plan';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2release'] = 'Link Release';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2bug'] = 'Link Build';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Unlink Build';
$lang->action->dynamicAction->bug['fromsonarqube'] = 'Create Bug from SonarQube Issue';
$lang->action->dynamicAction->bug['opened'] = 'Report Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "Issue associate create bug";
$lang->action->dynamicAction->bug['edited'] = 'Edit Bug';
$lang->action->dynamicAction->bug['activated'] = 'Activate Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Assign Bug';
$lang->action->dynamicAction->bug['closed'] = 'Close Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Confirm Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Resolve Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Restore Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Hide Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Delete Bug';
$lang->action->dynamicAction->bug['confirmed'] = 'Confirm Story Change';
$lang->action->dynamicAction->bug['tostory'] = 'Convert to Story';
$lang->action->dynamicAction->bug['totask'] = 'Convert to Task';
$lang->action->dynamicAction->bug['linked2plan'] = 'Link Plan';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2release'] = 'Link Release';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2revision'] = 'Link Bug to Revision';
$lang->action->dynamicAction->bug['unlinkedfromrevision'] = 'Unlink Bug from Revision';
$lang->action->dynamicAction->bug['linked2bug'] = 'Link Build';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Unlink Build';
$lang->action->dynamicAction->bug['fromsonarqube'] = 'Create Bug from SonarQube Issue';
$lang->action->dynamicAction->testtask['opened'] = 'Create Test Request';
$lang->action->dynamicAction->testtask['edited'] = 'Edit Test Request';
@@ -888,6 +896,8 @@ $lang->action->apiTitle->unlinkedfromproject = "Unlinked from project";
$lang->action->apiTitle->unlinkedfrombuild = "Unlinked from build";
$lang->action->apiTitle->linked2release = "Linked to release";
$lang->action->apiTitle->unlinkedfromrelease = "Unlinked from release";
$lang->action->apiTitle->linked2revision = "Linked to revision";
$lang->action->apiTitle->unlinkedfromrevision = "Unlinked from revision";
$lang->action->apiTitle->linkrelatedbug = "Linked related Bug";
$lang->action->apiTitle->unlinkrelatedbug = "Unlinked related Bug";
$lang->action->apiTitle->linkrelatedstory = "Link related story {$lang->SRCommon}";
+62 -51
View File
@@ -306,6 +306,8 @@ $lang->action->label->unlinkedfromproject = "unlinked from project";
$lang->action->label->unlinkedfrombuild = "unlinked Build ";
$lang->action->label->linked2release = "linked Release ";
$lang->action->label->unlinkedfromrelease = "unlinked Release ";
$lang->action->label->linked2revision = "Link Revision";
$lang->action->label->unlinkedfromrevision = "Unlink Revision";
$lang->action->label->linkrelatedbug = "linked Bug ";
$lang->action->label->unlinkrelatedbug = "unlinked Bug ";
$lang->action->label->linkrelatedcase = "linked Case ";
@@ -472,6 +474,9 @@ $lang->action->dynamicAction->story['linked2plan'] = 'Link Story to Pl
$lang->action->dynamicAction->story['unlinkedfromplan'] = 'Unlink Story from Plan';
$lang->action->dynamicAction->story['linked2release'] = 'Link Story to Release';
$lang->action->dynamicAction->story['unlinkedfromrelease'] = 'Unlink Story from Plan';
$lang->action->dynamicAction->story['linked2revision'] = 'Link Story to Revision';
$lang->action->dynamicAction->story['unlinkedfromrevision'] = 'Unlink Story from Revision';
$lang->action->dynamicAction->story['unlinkedfromrelease'] = 'Unlink Story from Plan';
$lang->action->dynamicAction->story['linked2build'] = 'Link Story to Build';
$lang->action->dynamicAction->story['unlinkedfrombuild'] = 'Unlink Story from Build';
$lang->action->dynamicAction->story['unlinkedfromproject'] = 'Unlink Project';
@@ -529,62 +534,66 @@ $lang->action->dynamicAction->kanbancard['deleted'] = 'Delete Card';
$lang->action->dynamicAction->team['managedTeam'] = 'Manage Team';
$lang->action->dynamicAction->task['opened'] = 'Create Task';
$lang->action->dynamicAction->task['importfromgitlab'] = "Issue associate create task";
$lang->action->dynamicAction->task['edited'] = 'Edit Task';
$lang->action->dynamicAction->task['commented'] = 'Task Comment';
$lang->action->dynamicAction->task['assigned'] = 'Assign Task';
$lang->action->dynamicAction->task['confirmed'] = 'Confirm Task';
$lang->action->dynamicAction->task['started'] = 'Start Task';
$lang->action->dynamicAction->task['finished'] = 'Finish Task';
$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates';
$lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates';
$lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates';
$lang->action->dynamicAction->task['paused'] = 'Pause Task';
$lang->action->dynamicAction->task['closed'] = 'Close Task';
$lang->action->dynamicAction->task['canceled'] = 'Cancel Task';
$lang->action->dynamicAction->task['activated'] = 'Activate Task';
$lang->action->dynamicAction->task['createchildren'] = 'Create Child Task';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Unlink Parent Task';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Delete children task';
$lang->action->dynamicAction->task['linkparenttask'] = 'Link Parent Task';
$lang->action->dynamicAction->task['linkchildtask'] = 'Link Child Task';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Create Child Story';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Unlink Parent Story';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Delete children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Link Parent Story';
$lang->action->dynamicAction->task['linkchildstory'] = 'Link Child Story';
$lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
$lang->action->dynamicAction->task['opened'] = 'Create Task';
$lang->action->dynamicAction->task['importfromgitlab'] = "Issue associate create task";
$lang->action->dynamicAction->task['edited'] = 'Edit Task';
$lang->action->dynamicAction->task['commented'] = 'Task Comment';
$lang->action->dynamicAction->task['assigned'] = 'Assign Task';
$lang->action->dynamicAction->task['confirmed'] = 'Confirm Task';
$lang->action->dynamicAction->task['started'] = 'Start Task';
$lang->action->dynamicAction->task['finished'] = 'Finish Task';
$lang->action->dynamicAction->task['recordestimate'] = 'Add Estimates';
$lang->action->dynamicAction->task['editestimate'] = 'Edit Estimates';
$lang->action->dynamicAction->task['deleteestimate'] = 'Delete Estimates';
$lang->action->dynamicAction->task['paused'] = 'Pause Task';
$lang->action->dynamicAction->task['closed'] = 'Close Task';
$lang->action->dynamicAction->task['canceled'] = 'Cancel Task';
$lang->action->dynamicAction->task['activated'] = 'Activate Task';
$lang->action->dynamicAction->task['createchildren'] = 'Create Child Task';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Unlink Parent Task';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Delete children task';
$lang->action->dynamicAction->task['linkparenttask'] = 'Link Parent Task';
$lang->action->dynamicAction->task['linkchildtask'] = 'Link Child Task';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Create Child Story';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Unlink Parent Story';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Delete children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Link Parent Story';
$lang->action->dynamicAction->task['linkchildstory'] = 'Link Child Story';
$lang->action->dynamicAction->task['undeleted'] = 'Restore Task';
$lang->action->dynamicAction->task['hidden'] = 'Hide Task';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
$lang->action->dynamicAction->task['linked2revision'] = 'Link Task to Revision';
$lang->action->dynamicAction->task['unlinkedfromrevision'] = 'Unlink Task from Revision';
$lang->action->dynamicAction->build['opened'] = 'Create Build';
$lang->action->dynamicAction->build['edited'] = 'Edit Build';
$lang->action->dynamicAction->build['deleted'] = 'Delete Build';
$lang->action->dynamicAction->bug['opened'] = 'Report Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "Issue associate create bug";
$lang->action->dynamicAction->bug['edited'] = 'Edit Bug';
$lang->action->dynamicAction->bug['activated'] = 'Activate Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Assign Bug';
$lang->action->dynamicAction->bug['closed'] = 'Close Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Confirm Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Resolve Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Restore Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Hide Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Delete Bug';
$lang->action->dynamicAction->bug['confirmed'] = 'Confirm Story Change';
$lang->action->dynamicAction->bug['tostory'] = 'Convert to Story';
$lang->action->dynamicAction->bug['totask'] = 'Convert to Task';
$lang->action->dynamicAction->bug['linked2plan'] = 'Link Plan';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2release'] = 'Link Release';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2bug'] = 'Link Build';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Unlink Build';
$lang->action->dynamicAction->bug['fromsonarqube'] = 'Create Bug from SonarQube Issue';
$lang->action->dynamicAction->bug['opened'] = 'Report Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "Issue associate create bug";
$lang->action->dynamicAction->bug['edited'] = 'Edit Bug';
$lang->action->dynamicAction->bug['activated'] = 'Activate Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Assign Bug';
$lang->action->dynamicAction->bug['closed'] = 'Close Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Confirm Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Resolve Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Restore Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Hide Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Delete Bug';
$lang->action->dynamicAction->bug['confirmed'] = 'Confirm Story Change';
$lang->action->dynamicAction->bug['tostory'] = 'Convert to Story';
$lang->action->dynamicAction->bug['totask'] = 'Convert to Task';
$lang->action->dynamicAction->bug['linked2plan'] = 'Link Plan';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2release'] = 'Link Release';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Unlink Plan';
$lang->action->dynamicAction->bug['linked2revision'] = 'Link Bug to Revision';
$lang->action->dynamicAction->bug['unlinkedfromrevision'] = 'Unlink Bug from Revision';
$lang->action->dynamicAction->bug['linked2bug'] = 'Link Build';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Unlink Build';
$lang->action->dynamicAction->bug['fromsonarqube'] = 'Create Bug from SonarQube Issue';
$lang->action->dynamicAction->testtask['opened'] = 'Create Test Request';
$lang->action->dynamicAction->testtask['edited'] = 'Edit Test Request';
@@ -888,6 +897,8 @@ $lang->action->apiTitle->unlinkedfromproject = "Unlinked from project";
$lang->action->apiTitle->unlinkedfrombuild = "Unlinked from build";
$lang->action->apiTitle->linked2release = "Linked to release";
$lang->action->apiTitle->unlinkedfromrelease = "Unlinked from release";
$lang->action->apiTitle->linked2revision = "Linked to revision";
$lang->action->apiTitle->unlinkedfromrevision = "Unlinked from revision";
$lang->action->apiTitle->linkrelatedbug = "Linked related Bug";
$lang->action->apiTitle->unlinkrelatedbug = "Unlinked related Bug";
$lang->action->apiTitle->linkrelatedstory = "Link related story {$lang->SRCommon}";
+10
View File
@@ -305,6 +305,8 @@ $lang->action->label->unlinkedfromproject = "Unlink Project";
$lang->action->label->unlinkedfrombuild = "a enlevé du Build ";
$lang->action->label->linked2release = "a ajouté à une Release ";
$lang->action->label->unlinkedfromrelease = "a enlevé de la Release ";
$lang->action->label->linked2revision = "Link Revision";
$lang->action->label->unlinked2revision = "Unlink Revision";
$lang->action->label->linkrelatedbug = "a lié à un Bug ";
$lang->action->label->unlinkrelatedbug = "a délié du Bug ";
$lang->action->label->linkrelatedcase = "a mis en relation avec un CasTest ";
@@ -471,6 +473,8 @@ $lang->action->dynamicAction->story['linked2plan'] = 'Inclure Story au
$lang->action->dynamicAction->story['unlinkedfromplan'] = 'Enlever Story du Plan';
$lang->action->dynamicAction->story['linked2release'] = 'Inclure Story à la Release';
$lang->action->dynamicAction->story['unlinkedfromrelease'] = 'Enlever Story de la Release';
$lang->action->dynamicAction->story['linked2revision'] = 'Inclure Story à la Revision';
$lang->action->dynamicAction->story['unlinked2revision'] = 'Unlink Stroy to Revision';
$lang->action->dynamicAction->story['linked2build'] = 'Ajouter Story au Build';
$lang->action->dynamicAction->story['unlinkedfrombuild'] = 'Détacher Story du Build';
$lang->action->dynamicAction->story['unlinkedfromproject'] = 'Détacher du Project';
@@ -558,6 +562,8 @@ $lang->action->dynamicAction->task['hidden'] = 'Masquer Tâche';
$lang->action->dynamicAction->task['svncommited'] = 'Committer SVN';
$lang->action->dynamicAction->task['gitcommited'] = 'Committer GIT';
$lang->action->dynamicAction->task['ganttmove'] = 'Order';
$lang->action->dynamicAction->task['linked2revision'] = 'Link Task to Revision';
$lang->action->dynamicAction->task['unlinked2revision'] = 'Unlink Task to Revision';
$lang->action->dynamicAction->build['opened'] = 'Créer Build';
$lang->action->dynamicAction->build['edited'] = 'Editer Build';
@@ -581,6 +587,8 @@ $lang->action->dynamicAction->bug['linked2plan'] = 'Lié au Plan';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Enlevé du Plan';
$lang->action->dynamicAction->bug['linked2release'] = 'Ajouté à la Release';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Enlevé de la Release';
$lang->action->dynamicAction->bug['linked2revision'] = 'Ajouté à la Revision';
$lang->action->dynamicAction->bug['unlinked2revision'] = 'Unlink Bug to Revision';
$lang->action->dynamicAction->bug['linked2bug'] = 'Lié au Build';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Retiré du Build';
$lang->action->dynamicAction->bug['fromsonarqube'] = 'Create Bug from SonarQube Issue';
@@ -887,6 +895,8 @@ $lang->action->apiTitle->unlinkedfromproject = "Unlinked from project";
$lang->action->apiTitle->unlinkedfrombuild = "Unlinked from build";
$lang->action->apiTitle->linked2release = "Linked to release";
$lang->action->apiTitle->unlinkedfromrelease = "Unlinked from release";
$lang->action->apiTitle->linked2revision = "Linked to revision";
$lang->action->apiTitle->unlinked2revision = "Unlinked to revision";
$lang->action->apiTitle->linkrelatedbug = "Linked related Bug";
$lang->action->apiTitle->unlinkrelatedbug = "Unlinked related Bug";
$lang->action->apiTitle->linkrelatedstory = "Link related story {$lang->SRCommon}";
+56 -47
View File
@@ -257,6 +257,8 @@ $lang->action->label->unlinkedfromproject = "Unlink Project";
$lang->action->label->unlinkedfrombuild = "hủy liên kết Bản dựng ";
$lang->action->label->linked2release = "liên kết Phát hành ";
$lang->action->label->unlinkedfromrelease = "hủy liên kết Release ";
$lang->action->label->linked2revision = "Link Revision";
$lang->action->label->unlinkedfromrevision = "Unlink Revision";
$lang->action->label->linkrelatedbug = "linked Bug ";
$lang->action->label->unlinkrelatedbug = "hủy liên kết Bug ";
$lang->action->label->linkrelatedcase = "linked Case ";
@@ -372,6 +374,8 @@ $lang->action->dynamicAction->story['linked2plan'] = 'Liên kết Stor
$lang->action->dynamicAction->story['unlinkedfromplan'] = 'Hủy liên kết Story from kế hoạch';
$lang->action->dynamicAction->story['linked2release'] = 'Liên kết Story to phát hành';
$lang->action->dynamicAction->story['unlinkedfromrelease'] = 'Hủy liên kết Story from kế hoạch';
$lang->action->dynamicAction->story['linked2revision'] = 'Link Stroy to Revision';
$lang->action->dynamicAction->story['unlinkedfromrevision'] = 'Unlink Stroy from Revision';
$lang->action->dynamicAction->story['linked2build'] = 'Liên kết Story to bản dựng';
$lang->action->dynamicAction->story['unlinkedfrombuild'] = 'Hủy liên kết Story from bản dựng';
$lang->action->dynamicAction->story['unlinkedfromproject'] = 'Hủy liên kết Project';
@@ -396,58 +400,63 @@ $lang->action->dynamicAction->execution['moved'] = 'Nhập nhiệm vụ';
$lang->action->dynamicAction->team['managedTeam'] = 'Manage Team';
$lang->action->dynamicAction->task['opened'] = 'Tạo nhiệm vụ';
$lang->action->dynamicAction->task['edited'] = 'Sửa nhiệm vụ';
$lang->action->dynamicAction->task['commented'] = 'Task nhận xét';
$lang->action->dynamicAction->task['assigned'] = 'Bàn giao nhiệm vụ';
$lang->action->dynamicAction->task['confirmed'] = 'Xác nhận nhiệm vụ';
$lang->action->dynamicAction->task['started'] = 'Bắt đầu nhiệm vụ';
$lang->action->dynamicAction->task['finished'] = 'Nhiệm vụ hoàn thành';
$lang->action->dynamicAction->task['recordestimate'] = 'Thêm dự tính';
$lang->action->dynamicAction->task['editestimate'] = 'Sửa dự tính';
$lang->action->dynamicAction->task['deleteestimate'] = 'Xóa dự tính';
$lang->action->dynamicAction->task['paused'] = 'Pause nhiệm vụ';
$lang->action->dynamicAction->task['closed'] = 'Đóng nhiệm vụ';
$lang->action->dynamicAction->task['canceled'] = 'Hủy nhiệm vụ';
$lang->action->dynamicAction->task['activated'] = 'Kích hoạt nhiệm vụ';
$lang->action->dynamicAction->task['createchildren'] = 'Tạo Nhiệm vụ con';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Hủy liên kết Nhiệm vụ mẹ';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Xóa children nhiệm vụ';
$lang->action->dynamicAction->task['linkparenttask'] = 'Liên kết Nhiệm vụ mẹ';
$lang->action->dynamicAction->task['linkchildtask'] = 'Liên kết Nhiệm vụ con';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Tạo Câu chuyện con';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Hủy liên kết Parent câu chuyện';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Xóa children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Liên kết Parent câu chuyện';
$lang->action->dynamicAction->task['linkchildstory'] = 'Liên kết Câu chuyện con';
$lang->action->dynamicAction->task['undeleted'] = 'Khôi phục nhiệm vụ';
$lang->action->dynamicAction->task['hidden'] = 'Ẩn nhiệm vụ';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['opened'] = 'Tạo nhiệm vụ';
$lang->action->dynamicAction->task['edited'] = 'Sửa nhiệm vụ';
$lang->action->dynamicAction->task['commented'] = 'Task nhận xét';
$lang->action->dynamicAction->task['assigned'] = 'Bàn giao nhiệm vụ';
$lang->action->dynamicAction->task['confirmed'] = 'Xác nhận nhiệm vụ';
$lang->action->dynamicAction->task['started'] = 'Bắt đầu nhiệm vụ';
$lang->action->dynamicAction->task['finished'] = 'Nhiệm vụ hoàn thành';
$lang->action->dynamicAction->task['recordestimate'] = 'Thêm dự tính';
$lang->action->dynamicAction->task['editestimate'] = 'Sửa dự tính';
$lang->action->dynamicAction->task['deleteestimate'] = 'Xóa dự tính';
$lang->action->dynamicAction->task['paused'] = 'Pause nhiệm vụ';
$lang->action->dynamicAction->task['closed'] = 'Đóng nhiệm vụ';
$lang->action->dynamicAction->task['canceled'] = 'Hủy nhiệm vụ';
$lang->action->dynamicAction->task['activated'] = 'Kích hoạt nhiệm vụ';
$lang->action->dynamicAction->task['createchildren'] = 'Tạo Nhiệm vụ con';
$lang->action->dynamicAction->task['unlinkparenttask'] = 'Hủy liên kết Nhiệm vụ mẹ';
$lang->action->dynamicAction->task['deletechildrentask'] = 'Xóa children nhiệm vụ';
$lang->action->dynamicAction->task['linkparenttask'] = 'Liên kết Nhiệm vụ mẹ';
$lang->action->dynamicAction->task['linkchildtask'] = 'Liên kết Nhiệm vụ con';
$lang->action->dynamicAction->task['createchildrenstory'] = 'Tạo Câu chuyện con';
$lang->action->dynamicAction->task['unlinkparentstory'] = 'Hủy liên kết Parent câu chuyện';
$lang->action->dynamicAction->task['deletechildrenstory'] = 'Xóa children story';
$lang->action->dynamicAction->task['linkparentstory'] = 'Liên kết Parent câu chuyện';
$lang->action->dynamicAction->task['linkchildstory'] = 'Liên kết Câu chuyện con';
$lang->action->dynamicAction->task['undeleted'] = 'Khôi phục nhiệm vụ';
$lang->action->dynamicAction->task['hidden'] = 'Ẩn nhiệm vụ';
$lang->action->dynamicAction->task['svncommited'] = 'SVN Commit';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT Commit';
$lang->action->dynamicAction->task['linked2revision'] = 'Link Task to Revision';
$lang->action->dynamicAction->task['unlinkedfromrevision'] = 'Unlink Task from Revision';
$lang->action->dynamicAction->build['opened'] = 'Tạo bản dựng';
$lang->action->dynamicAction->build['edited'] = 'Sửa bản dựng';
$lang->action->dynamicAction->build['deleted'] = 'Delete Build';
$lang->action->dynamicAction->bug['opened'] = 'Báo cáo Bug';
$lang->action->dynamicAction->bug['edited'] = 'Sửa Bug';
$lang->action->dynamicAction->bug['activated'] = 'Kích hoạt Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Bàn giao Bug';
$lang->action->dynamicAction->bug['closed'] = 'Đóng Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Xác nhận Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Giải quyết Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Khôi phục Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Ẩn Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Xóa tìBug';
$lang->action->dynamicAction->bug['confirmed'] = 'Xác nhận thay đổi câu chuyện';
$lang->action->dynamicAction->bug['tostory'] = 'Chuyển thành câu chuyện';
$lang->action->dynamicAction->bug['totask'] = 'Chuyển thành nhiệm vụ';
$lang->action->dynamicAction->bug['linked2plan'] = 'Liên kết kế hoạch';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Hủy liên kết kế hoạch';
$lang->action->dynamicAction->bug['linked2release'] = 'Liên kết phát hành';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Hủy liên kết kế hoạch';
$lang->action->dynamicAction->bug['linked2bug'] = 'Liên kết bản dựng';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Hủy liên kết bản dựng';
$lang->action->dynamicAction->bug['opened'] = 'Báo cáo Bug';
$lang->action->dynamicAction->bug['edited'] = 'Sửa Bug';
$lang->action->dynamicAction->bug['activated'] = 'Kích hoạt Bug';
$lang->action->dynamicAction->bug['assigned'] = 'Bàn giao Bug';
$lang->action->dynamicAction->bug['closed'] = 'Đóng Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = 'Xác nhận Bug';
$lang->action->dynamicAction->bug['resolved'] = 'Giải quyết Bug';
$lang->action->dynamicAction->bug['undeleted'] = 'Khôi phục Bug';
$lang->action->dynamicAction->bug['hidden'] = 'Ẩn Bug';
$lang->action->dynamicAction->bug['deleted'] = 'Xóa tìBug';
$lang->action->dynamicAction->bug['confirmed'] = 'Xác nhận thay đổi câu chuyện';
$lang->action->dynamicAction->bug['tostory'] = 'Chuyển thành câu chuyện';
$lang->action->dynamicAction->bug['totask'] = 'Chuyển thành nhiệm vụ';
$lang->action->dynamicAction->bug['linked2plan'] = 'Liên kết kế hoạch';
$lang->action->dynamicAction->bug['unlinkedfromplan'] = 'Hủy liên kết kế hoạch';
$lang->action->dynamicAction->bug['linked2release'] = 'Liên kết phát hành';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = 'Hủy liên kết kế hoạch';
$lang->action->dynamicAction->bug['linked2release'] = 'Link Revision';
$lang->action->dynamicAction->bug['linked2bug'] = 'Liên kết bản dựng';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = 'Hủy liên kết bản dựng';
$lang->action->dynamicAction->bug['linked2revision'] = 'Link Bug to Revision';
$lang->action->dynamicAction->bug['unlinkedfromrevision'] = 'Unlink Bug from Revision';
$lang->action->dynamicAction->testtask['opened'] = 'Tạo Yêu cầu Test';
$lang->action->dynamicAction->testtask['edited'] = 'Sửa Yêu cầu Test';
+61 -51
View File
@@ -306,6 +306,8 @@ $lang->action->label->unlinkedfromproject = "移除项目";
$lang->action->label->unlinkedfrombuild = "移除版本";
$lang->action->label->linked2release = "关联发布";
$lang->action->label->unlinkedfromrelease = "移除发布";
$lang->action->label->linked2revision = "关联代码提交";
$lang->action->label->unlinkedfromrevision = "取消关联代码提交";
$lang->action->label->linkrelatedbug = "关联了相关Bug";
$lang->action->label->unlinkrelatedbug = "移除了相关Bug";
$lang->action->label->linkrelatedcase = "关联了相关用例";
@@ -472,6 +474,8 @@ $lang->action->dynamicAction->story['linked2plan'] = "{$lang->SRCommon
$lang->action->dynamicAction->story['unlinkedfromplan'] = "计划移除{$lang->SRCommon}";
$lang->action->dynamicAction->story['linked2release'] = "{$lang->SRCommon}关联发布";
$lang->action->dynamicAction->story['unlinkedfromrelease'] = "发布移除{$lang->SRCommon}";
$lang->action->dynamicAction->story['linked2revision'] = "{$lang->SRCommon}关联代码提交";
$lang->action->dynamicAction->story['unlinkedfromrevision'] = "{$lang->SRCommon}取消关联代码提交";
$lang->action->dynamicAction->story['linked2build'] = "{$lang->SRCommon}关联版本";
$lang->action->dynamicAction->story['unlinkedfrombuild'] = "版本移除{$lang->SRCommon}";
$lang->action->dynamicAction->story['unlinkedfromproject'] = '移除项目';
@@ -529,62 +533,66 @@ $lang->action->dynamicAction->kanbancard['deleted'] = '删除看板卡片';
$lang->action->dynamicAction->team['managedTeam'] = '维护团队';
$lang->action->dynamicAction->task['opened'] = '创建任务';
$lang->action->dynamicAction->task['importfromgitlab'] = "从Gitlab关联创建任务";
$lang->action->dynamicAction->task['edited'] = '编辑任务';
$lang->action->dynamicAction->task['commented'] = '备注任务';
$lang->action->dynamicAction->task['assigned'] = '指派任务';
$lang->action->dynamicAction->task['confirmed'] = "确认{$lang->SRCommon}变更";
$lang->action->dynamicAction->task['started'] = '开始任务';
$lang->action->dynamicAction->task['finished'] = '完成任务';
$lang->action->dynamicAction->task['recordestimate'] = '记录工时';
$lang->action->dynamicAction->task['editestimate'] = '编辑工时';
$lang->action->dynamicAction->task['deleteestimate'] = '删除工时';
$lang->action->dynamicAction->task['paused'] = '暂停任务';
$lang->action->dynamicAction->task['closed'] = '关闭任务';
$lang->action->dynamicAction->task['canceled'] = '取消任务';
$lang->action->dynamicAction->task['activated'] = '激活任务';
$lang->action->dynamicAction->task['createchildren'] = '创建子任务';
$lang->action->dynamicAction->task['unlinkparenttask'] = '从父任务取消关联';
$lang->action->dynamicAction->task['deletechildrentask'] = '删除子任务';
$lang->action->dynamicAction->task['linkparenttask'] = '关联到父任务';
$lang->action->dynamicAction->task['linkchildtask'] = '关联子任务';
$lang->action->dynamicAction->task['createchildrenstory'] = '创建子需求';
$lang->action->dynamicAction->task['unlinkparentstory'] = '从父需求取消关联';
$lang->action->dynamicAction->task['deletechildrenstory'] = '删除子需求';
$lang->action->dynamicAction->task['linkparentstory'] = '关联到父需求';
$lang->action->dynamicAction->task['linkchildstory'] = '关联子需求';
$lang->action->dynamicAction->task['undeleted'] = '还原任务';
$lang->action->dynamicAction->task['hidden'] = '隐藏任务';
$lang->action->dynamicAction->task['svncommited'] = 'SVN提交';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT提交';
$lang->action->dynamicAction->task['ganttmove'] = '排序';
$lang->action->dynamicAction->task['opened'] = '创建任务';
$lang->action->dynamicAction->task['importfromgitlab'] = "从Gitlab关联创建任务";
$lang->action->dynamicAction->task['edited'] = '编辑任务';
$lang->action->dynamicAction->task['commented'] = '备注任务';
$lang->action->dynamicAction->task['assigned'] = '指派任务';
$lang->action->dynamicAction->task['confirmed'] = "确认{$lang->SRCommon}变更";
$lang->action->dynamicAction->task['started'] = '开始任务';
$lang->action->dynamicAction->task['finished'] = '完成任务';
$lang->action->dynamicAction->task['recordestimate'] = '记录工时';
$lang->action->dynamicAction->task['editestimate'] = '编辑工时';
$lang->action->dynamicAction->task['deleteestimate'] = '删除工时';
$lang->action->dynamicAction->task['paused'] = '暂停任务';
$lang->action->dynamicAction->task['closed'] = '关闭任务';
$lang->action->dynamicAction->task['canceled'] = '取消任务';
$lang->action->dynamicAction->task['activated'] = '激活任务';
$lang->action->dynamicAction->task['createchildren'] = '创建子任务';
$lang->action->dynamicAction->task['unlinkparenttask'] = '从父任务取消关联';
$lang->action->dynamicAction->task['deletechildrentask'] = '删除子任务';
$lang->action->dynamicAction->task['linkparenttask'] = '关联到父任务';
$lang->action->dynamicAction->task['linkchildtask'] = '关联子任务';
$lang->action->dynamicAction->task['createchildrenstory'] = '创建子需求';
$lang->action->dynamicAction->task['unlinkparentstory'] = '从父需求取消关联';
$lang->action->dynamicAction->task['deletechildrenstory'] = '删除子需求';
$lang->action->dynamicAction->task['linkparentstory'] = '关联到父需求';
$lang->action->dynamicAction->task['linkchildstory'] = '关联子需求';
$lang->action->dynamicAction->task['undeleted'] = '还原任务';
$lang->action->dynamicAction->task['hidden'] = '隐藏任务';
$lang->action->dynamicAction->task['svncommited'] = 'SVN提交';
$lang->action->dynamicAction->task['gitcommited'] = 'GIT提交';
$lang->action->dynamicAction->task['ganttmove'] = '排序';
$lang->action->dynamicAction->task['linked2revision'] = '任务关联代码提交';
$lang->action->dynamicAction->task['unlinkedfromrevision'] = '任务取消关联代码提交';
$lang->action->dynamicAction->build['opened'] = '创建版本';
$lang->action->dynamicAction->build['edited'] = '编辑版本';
$lang->action->dynamicAction->build['deleted'] = '删除版本';
$lang->action->dynamicAction->bug['opened'] = '创建Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "从Gitlab关联创建Bug";
$lang->action->dynamicAction->bug['edited'] = '编辑Bug';
$lang->action->dynamicAction->bug['activated'] = '激活Bug';
$lang->action->dynamicAction->bug['assigned'] = '指派Bug';
$lang->action->dynamicAction->bug['closed'] = '关闭Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = '确认Bug';
$lang->action->dynamicAction->bug['resolved'] = '解决Bug';
$lang->action->dynamicAction->bug['undeleted'] = '还原Bug';
$lang->action->dynamicAction->bug['hidden'] = '隐藏Bug';
$lang->action->dynamicAction->bug['deleted'] = '删除Bug';
$lang->action->dynamicAction->bug['confirmed'] = "确认{$lang->SRCommon}变更";
$lang->action->dynamicAction->bug['tostory'] = "转{$lang->SRCommon}";
$lang->action->dynamicAction->bug['totask'] = '转任务';
$lang->action->dynamicAction->bug['linked2plan'] = "Bug关联计划";
$lang->action->dynamicAction->bug['unlinkedfromplan'] = "计划移除Bug";
$lang->action->dynamicAction->bug['linked2release'] = 'Bug关联发布';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = '发布移除Bug';
$lang->action->dynamicAction->bug['linked2bug'] = 'Bug关联版本';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = '版本移除Bug';
$lang->action->dynamicAction->bug['fromsonarqube'] = '由SonarQube问题创建';
$lang->action->dynamicAction->bug['opened'] = '创建Bug';
$lang->action->dynamicAction->bug['importfromgitlab'] = "从Gitlab关联创建Bug";
$lang->action->dynamicAction->bug['edited'] = '编辑Bug';
$lang->action->dynamicAction->bug['activated'] = '激活Bug';
$lang->action->dynamicAction->bug['assigned'] = '指派Bug';
$lang->action->dynamicAction->bug['closed'] = '关闭Bug';
$lang->action->dynamicAction->bug['bugconfirmed'] = '确认Bug';
$lang->action->dynamicAction->bug['resolved'] = '解决Bug';
$lang->action->dynamicAction->bug['undeleted'] = '还原Bug';
$lang->action->dynamicAction->bug['hidden'] = '隐藏Bug';
$lang->action->dynamicAction->bug['deleted'] = '删除Bug';
$lang->action->dynamicAction->bug['confirmed'] = "确认{$lang->SRCommon}变更";
$lang->action->dynamicAction->bug['tostory'] = "转{$lang->SRCommon}";
$lang->action->dynamicAction->bug['totask'] = '转任务';
$lang->action->dynamicAction->bug['linked2plan'] = "Bug关联计划";
$lang->action->dynamicAction->bug['unlinkedfromplan'] = "计划移除Bug";
$lang->action->dynamicAction->bug['linked2release'] = 'Bug关联发布';
$lang->action->dynamicAction->bug['unlinkedfromrelease'] = '发布移除Bug';
$lang->action->dynamicAction->bug['linked2revision'] = 'Bug关联代码提交';
$lang->action->dynamicAction->bug['unlinkedfromrevision'] = 'Bug取消关联代码提交';
$lang->action->dynamicAction->bug['linked2bug'] = 'Bug关联版本';
$lang->action->dynamicAction->bug['unlinkedfrombuild'] = '版本移除Bug';
$lang->action->dynamicAction->bug['fromsonarqube'] = '由SonarQube问题创建';
$lang->action->dynamicAction->testtask['opened'] = '创建测试单';
$lang->action->dynamicAction->testtask['edited'] = '编辑测试单';
@@ -888,6 +896,8 @@ $lang->action->apiTitle->unlinkedfromproject = "移除项目";
$lang->action->apiTitle->unlinkedfrombuild = "移除版本";
$lang->action->apiTitle->linked2release = "关联发布";
$lang->action->apiTitle->unlinkedfromrelease = "移除发布";
$lang->action->apiTitle->linked2revision = "关联代码提交";
$lang->action->apiTitle->unlinkedfromrevision = "取消关联代码提交";
$lang->action->apiTitle->linkrelatedbug = "关联了相关Bug";
$lang->action->apiTitle->unlinkrelatedbug = "移除了相关Bug";
$lang->action->apiTitle->linkrelatedstory = "关联了相关{$lang->SRCommon}";
+11
View File
@@ -253,6 +253,8 @@ class actionModel extends model
case 'task':
$fields = 'project, execution, story';
$result = $this->dao->select($fields)->from($this->config->objectTables[$objectType])->where('id')->eq($objectID)->fetch();
if(empty($result)) break;
if($result->story != 0)
{
$product = $this->dao->select('product')->from(TABLE_STORY)->where('id')->eq($result->story)->fetchPairs('product');
@@ -414,6 +416,15 @@ class actionModel extends model
$name = $this->dao->select('name')->from(TABLE_TESTTASK)->where('id')->eq($action->extra)->fetch('name');
if($name) $action->extra = common::hasPriv('testtask', 'view') ? html::a(helper::createLink('testtask', 'view', "taskID=$action->extra"), $name) : $name;
}
elseif($actionName == 'linked2revision' or $actionName == 'unlinkedfromrevision')
{
$commit = $this->dao->select('repo,revision')->from(TABLE_REPOHISTORY)->where('id')->eq($action->extra)->fetch();
if($commit)
{
$revision = substr($commit->revision, 0, 10);
$action->extra = common::hasPriv('repo', 'revision') ? html::a(helper::createLink('repo', 'revision', "repoID=$commit->repo&objectID=0&revision=$commit->revision"), $revision) : $revision;
}
}
elseif($actionName == 'moved' and $action->objectType != 'module')
{
$name = $this->dao->select('name')->from(TABLE_PROJECT)->where('id')->eq($action->extra)->fetch('name');
+1
View File
@@ -934,6 +934,7 @@ class bug extends control
$this->view->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', '');
$this->view->preAndNext = $this->loadModel('common')->getPreAndNextObject('bug', $bugID);
$this->view->product = $product;
$this->view->linkCommits = $this->loadModel('repo')->getCommitsByObject($bugID, 'bug');
$this->view->projects = array('' => '') + $projects;
+2 -1
View File
@@ -8,4 +8,5 @@
.osContent, .browserContent {margin: 0 0 5px;}
.browserContent {margin-left: -4px;}
.resolution {white-space: nowrap; overflow: hidden;}
.main-actions .btn-toolbar{display: inline-flex; flex-wrap: wrap;}
.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
.main-actions .btn-toolbar{display: inline-flex; flex-wrap: wrap;}
+15 -12
View File
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->linkCommit = 'Related Commits';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
@@ -396,18 +397,20 @@ $lang->bug->report->bugHistories->graph->xAxisName = 'Bearbeitungsschri
/* Operating record. */
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, gelöst von <strong>$actor</strong> und die Lösung ist <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, konvertiert von <strong>$actor</strong> zu <strong>Story</strong> mit ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, importiert von <strong>$actor</strong> als <strong>Aufgabe</strong> mit ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> von Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, verknüpft von <strong>$actor</strong> zum Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> von Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, verknüpft von <strong>$actor</strong> zu Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> vom Release <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> zum Bug <strong>$extra</strong>.');
$lang->bug->action->resolved = array('main' => '$date, gelöst von <strong>$actor</strong> und die Lösung ist <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, konvertiert von <strong>$actor</strong> zu <strong>Story</strong> mit ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, importiert von <strong>$actor</strong> als <strong>Aufgabe</strong> mit ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> von Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, verknüpft von <strong>$actor</strong> zum Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> von Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, verknüpft von <strong>$actor</strong> zu Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> vom Release <strong>$extra</strong>.');
$lang->bug->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, verknüpfung aufgehoben von <strong>$actor</strong> zum Bug <strong>$extra</strong>.');
$lang->bug->placeholder = new stdclass();
$lang->bug->placeholder->chooseBuilds = 'Build wählen...';
+15 -12
View File
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->linkCommit = 'Related Commits';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
@@ -396,18 +397,20 @@ $lang->bug->report->bugHistories->graph->xAxisName = 'Handling Steps';
/* Operating record. */
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, resolved by <strong>$actor</strong> and the resolution is <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, converted by <strong>$actor</strong> to <strong>Story</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, linked by <strong>$actor</strong> to Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, deleted by <strong>$actor</strong> from Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, linked by <strong>$actor</strong> to Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, unlinked by <strong>$actor</strong> from Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, linked by <strong>$actor</strong> to Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, unlinked by <strong>$actor</strong> from Release <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, linked by <strong>$actor</strong> to Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, unlinked by <strong>$actor</strong> from Bug <strong>$extra</strong>.');
$lang->bug->action->resolved = array('main' => '$date, resolved by <strong>$actor</strong> and the resolution is <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, converted by <strong>$actor</strong> to <strong>Story</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, linked by <strong>$actor</strong> to Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, deleted by <strong>$actor</strong> from Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, linked by <strong>$actor</strong> to Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, unlinked by <strong>$actor</strong> from Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, linked by <strong>$actor</strong> to Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, unlinked by <strong>$actor</strong> from Release <strong>$extra</strong>.');
$lang->bug->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, linked by <strong>$actor</strong> to Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, unlinked by <strong>$actor</strong> from Bug <strong>$extra</strong>.');
$lang->bug->placeholder = new stdclass();
$lang->bug->placeholder->chooseBuilds = 'Select Build';
+15 -12
View File
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed';
$lang->bug->changed = 'Changed';
$lang->bug->storyChanged = 'Story Changed';
$lang->bug->linkMR = 'Related MRs';
$lang->bug->linkCommit = 'Related Commits';
$lang->bug->duplicateTip = 'Please enter keyword search';
/* Page tags. */
@@ -396,18 +397,20 @@ $lang->bug->report->bugHistories->graph->xAxisName = 'Etapes résolutio
/* Operating record. */
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, résolu par <strong>$actor</strong> et la résolution est <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, converti par <strong>$actor</strong> en <strong>Story</strong> avec ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, importé par <strong>$actor</strong> en tant que <strong>Task</strong> avec ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, lié par <strong>$actor</strong> au Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, supprimé par <strong>$actor</strong> du Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, lié par <strong>$actor</strong> au Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, retiré par <strong>$actor</strong> du Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, ajouté par <strong>$actor</strong> à la Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, retiré par <strong>$actor</strong> de la Release <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, associé par <strong>$actor</strong> au Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, dissocié par <strong>$actor</strong> du Bug <strong>$extra</strong>.');
$lang->bug->action->resolved = array('main' => '$date, résolu par <strong>$actor</strong> et la résolution est <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, converti par <strong>$actor</strong> en <strong>Story</strong> avec ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, importé par <strong>$actor</strong> en tant que <strong>Task</strong> avec ID <strong>$extra</strong>.');
$lang->bug->action->converttotask = array('main' => '$date, imported by <strong>$actor</strong> as <strong>Task</strong>,with ID <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, lié par <strong>$actor</strong> au Plan <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, supprimé par <strong>$actor</strong> du Plan <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, lié par <strong>$actor</strong> au Build <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, retiré par <strong>$actor</strong> du Build <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, ajouté par <strong>$actor</strong> à la Release <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, retiré par <strong>$actor</strong> de la Release <strong>$extra</strong>.');
$lang->bug->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, associé par <strong>$actor</strong> au Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, dissocié par <strong>$actor</strong> du Bug <strong>$extra</strong>.');
$lang->bug->placeholder = new stdclass();
$lang->bug->placeholder->chooseBuilds = 'Sélect Build';
+15 -11
View File
@@ -172,6 +172,8 @@ $lang->bug->legendComment = 'Ghi chú';
$lang->bug->legendLife = 'Toàn bộ';
$lang->bug->legendMisc = 'Khác';
$lang->bug->legendRelated = 'Thông tin liên quan';
$lang->bug->linkMRs = 'Related MRs';
$lang->bug->linkCommit = 'Related Commits';
/* Button. */
$lang->bug->buttonConfirm = 'Xác nhận';
@@ -376,17 +378,19 @@ $lang->bug->report->bugHistories->graph->xAxisName = 'Cột bước';
/* Operating record. */
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, được giải quyết bởi <strong>$actor</strong> và giải pháp là <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, được chuyển bởi <strong>$actor</strong> thành <strong>Story</strong> với ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, nhập bởi <strong>$actor</strong> như <strong>Task</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->linked2plan = array('main' => '$date, liên kết bởi <strong>$actor</strong> cho kế hoạch <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, được xóa bởi <strong>$actor</strong> từ kế hoạch <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Bản dựng <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ bản dựng <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Phát hành <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Phát hành <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Bug <strong>$extra</strong>.');
$lang->bug->action->resolved = array('main' => '$date, được giải quyết bởi <strong>$actor</strong> và giải pháp là <strong>$extra</strong> $appendLink.', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, được chuyển bởi <strong>$actor</strong> thành <strong>Story</strong> với ID <strong>$extra</strong>.');
$lang->bug->action->totask = array('main' => '$date, nhập bởi <strong>$actor</strong> như <strong>Task</strong> with ID <strong>$extra</strong>.');
$lang->bug->action->linked2plan = array('main' => '$date, liên kết bởi <strong>$actor</strong> cho kế hoạch <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, được xóa bởi <strong>$actor</strong> từ kế hoạch <strong>$extra</strong>.');
$lang->bug->action->linked2build = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Bản dựng <strong>$extra</strong>.');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ bản dựng <strong>$extra</strong>.');
$lang->bug->action->linked2release = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Phát hành <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Phát hành <strong>$extra</strong>.');
$lang->bug->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->bug->action->linkrelatedbug = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Bug <strong>$extra</strong>.');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Bug <strong>$extra</strong>.');
$lang->bug->placeholder = new stdclass();
$lang->bug->placeholder->chooseBuilds = 'Chọn bản dựng';
+14 -12
View File
@@ -176,6 +176,7 @@ $lang->bug->labelPostponed = '被延期';
$lang->bug->changed = '已变动';
$lang->bug->storyChanged = '需求变动';
$lang->bug->linkMR = '相关合并请求';
$lang->bug->linkCommit = '相关代码版本';
$lang->bug->duplicateTip = '请输入关键字';
/* 页面标签。*/
@@ -396,18 +397,19 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
/* 操作记录。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' . $lang->SRCommon . '</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->converttotask = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, 由 <strong>$actor</strong> 从版本 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2release = array('main' => '$date, 由 <strong>$actor</strong> 关联到发布 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, 由 <strong>$actor</strong> 从发布 <strong>$extra</strong> 移除。');
$lang->bug->action->linkrelatedbug = array('main' => '$date, 由 <strong>$actor</strong> 关联相关Bug <strong>$extra</strong>。');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, 由 <strong>$actor</strong> 移除相关Bug <strong>$extra</strong>。');
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' . $lang->SRCommon . '</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->converttotask = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到计划 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从计划 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2build = array('main' => '$date, 由 <strong>$actor</strong> 关联到版本 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfrombuild = array('main' => '$date, 由 <strong>$actor</strong> 从版本 <strong>$extra</strong> 移除。');
$lang->bug->action->unlinkedfromrelease = array('main' => '$date, 由 <strong>$actor</strong> 从发布 <strong>$extra</strong> 移除。');
$lang->bug->action->linked2release = array('main' => '$date, 由 <strong>$actor</strong> 关联到发布 <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromrevision = array('main' => '$date, 由 <strong>$actor</strong> 取消关联到代码提交 <strong>$extra</strong>。');
$lang->bug->action->linkrelatedbug = array('main' => '$date, 由 <strong>$actor</strong> 关联相关Bug <strong>$extra</strong>。');
$lang->bug->action->unlinkrelatedbug = array('main' => '$date, 由 <strong>$actor</strong> 移除相关Bug <strong>$extra</strong>。');
$lang->bug->placeholder = new stdclass();
$lang->bug->placeholder->chooseBuilds = '选择相关版本...';
+14
View File
@@ -433,6 +433,20 @@
?>
</td>
</tr>
<tr>
<th><?php echo $lang->bug->linkCommit;?></th>
<td>
<?php
$canViewRevision = common::hasPriv('repo', 'revision');
foreach($linkCommits as $commit)
{
$revision = substr($commit->revision, 0, 10);
$commitTitle = $revision . ' ' . $commit->comment;
echo "<div class='link-commit' title='$commitTitle'>" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) . " $commit->comment" : $commitTitle) . '</div>';
}
?>
</td>
</tr>
</tbody>
</table>
</div>
+14 -1
View File
@@ -189,7 +189,20 @@ class gitModel extends model
' task:' . join(' ', $objects['tasks']) .
' bug:' . join(',', $objects['bugs']));
if($lastVersion != $version) $this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git', $accountPairs);
if($lastVersion != $version)
{
$this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git', $accountPairs);
/* Objects link commit. */
foreach($objects as $objectType => $objectIDs)
{
$objectTypeMap = array('stories' => 'story', 'bugs' => 'bug', 'tasks' => 'task');
if(empty($objectIDs) or !isset($objectTypeMap[$objectType])) continue;
$this->post->$objectType = $objectIDs;
$this->repo->link($repo->id, $log->revision, $objectTypeMap[$objectType]);
}
}
}
else
{
+1 -1
View File
@@ -234,7 +234,7 @@ class gitlab extends control
$gitLab = $this->gitlab->getByID($id);
$changes = common::createChanges($oldGitLab, $gitLab);
$this->action->logHistory($actionID, $changes);
$this->loadModel('action')->logHistory($actionID, $changes);
echo js::reload('parent');
}
+8
View File
@@ -1244,6 +1244,10 @@ $lang->resource->repo->maintain = 'maintain';
$lang->resource->repo->setRules = 'setRules';
$lang->resource->repo->apiGetRepoByUrl = 'apiGetRepoByUrl';
$lang->resource->repo->downloadCode = 'downloadCode';
$lang->resource->repo->linkStory = 'linkStory';
$lang->resource->repo->linkBug = 'linkBug';
$lang->resource->repo->linkTask = 'linkTask';
$lang->resource->repo->unlink = 'unlink';
$lang->repo->methodOrder[5] = 'create';
$lang->repo->methodOrder[10] = 'edit';
@@ -1260,6 +1264,10 @@ $lang->repo->methodOrder[60] = 'download';
$lang->repo->methodOrder[65] = 'setRules';
$lang->repo->methodOrder[70] = 'apiGetRepoByUrl';
$lang->repo->methodOrder[75] = 'downloadCode';
$lang->repo->methodOrder[80] = 'linkStory';
$lang->repo->methodOrder[85] = 'linkBug';
$lang->repo->methodOrder[90] = 'linkTask';
$lang->repo->methodOrder[95] = 'unlink';
$lang->resource->ci = new stdclass();
$lang->resource->ci->commitResult = 'commitResult';
+1 -1
View File
@@ -41,7 +41,7 @@
<li><?php echo html::a(inlink('diff', "MRID={$MR->id}"), $lang->mr->viewDiff);?></li>
<li class='<?php if($type == 'story') echo 'active'?>'><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-primary') . ' ' . $lang->productplan->linkedStories;?></a></li>
<li class='<?php if($type == 'bug') echo 'active'?>'><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->productplan->linkedBugs;?></a></li>
<li class='<?php if($type == 'task') echo 'active'?>'><a href='#tasks' data-toggle='tab'><?php echo html::icon('todo', 'text-info') . ' ' . $lang->mr->linkedTasks;?></a></li>
<li class='<?php if($type == 'task') echo 'active'?>'><a href='#tasks' data-toggle='tab'><?php echo html::icon('check-sign', 'text-info') . ' ' . $lang->mr->linkedTasks;?></a></li>
</ul>
<div class='tab-content'>
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
+68
View File
@@ -26,6 +26,7 @@ $config->repo->syncTime = 10;
$config->repo->batchNum = 100;
$config->repo->images = '|png|gif|jpg|ico|jpeg|bmp|';
$config->repo->binary = '|pdf|';
$config->repo->synced = '';
$config->repo->editor = new stdclass();
$config->repo->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
@@ -70,3 +71,70 @@ $config->repo->rules['mark']['consumed'] = ':';
$config->repo->rules['mark']['left'] = ':';
$config->repo->rules['unit']['consumed'] = 'h';
$config->repo->rules['unit']['left'] = 'h';
$config->repo->fileExt["abap"] = array('.abap');
$config->repo->fileExt["apex"] = array('.cls');
$config->repo->fileExt["azcli"] = array('.azcli');
$config->repo->fileExt["bat"] = array('.bat', '.cmd');
$config->repo->fileExt["c"] = array('.c', '.h');
$config->repo->fileExt["cameligo"] = array('.mligo');
$config->repo->fileExt["clojure"] = array('.clj', '.cljs', '.cljc', '.edn');
$config->repo->fileExt["coffeescript"] = array('.coffee');
$config->repo->fileExt["cpp"] = array('.cpp', '.cc', '.cxx', '.hpp', '.hh', '.hxx');
$config->repo->fileExt["csharp"] = array('.cs', '.csx', '.cake');
$config->repo->fileExt["css"] = array('.css');
$config->repo->fileExt["dart"] = array('.dart');
$config->repo->fileExt["dockerfile"] = array('.dockerfile');
$config->repo->fileExt["ecl"] = array('.ecl');
$config->repo->fileExt["fsharp"] = array('.fs', '.fsi', '.ml', '.mli', '.fsx', '.fsscript');
$config->repo->fileExt["go"] = array('.go');
$config->repo->fileExt["graphql"] = array('.graphql', '.gql');
$config->repo->fileExt["handlebars"] = array('.handlebars', '.hbs');
$config->repo->fileExt["hcl"] = array('.tf', '.tfvars', '.hcl');
$config->repo->fileExt["html"] = array('.html', '.htm', '.shtml', '.xhtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm');
$config->repo->fileExt["ini"] = array('.ini', '.properties', '.gitconfig');
$config->repo->fileExt["java"] = array('.java', '.jav');
$config->repo->fileExt["javascript"] = array('.js', '.es6', '.jsx', '.mjs');
$config->repo->fileExt["julia"] = array('.jl');
$config->repo->fileExt["kotlin"] = array('.kt');
$config->repo->fileExt["less"] = array('.less');
$config->repo->fileExt["lexon"] = array('.lex');
$config->repo->fileExt["lua"] = array('.lua');
$config->repo->fileExt["m3"] = array('.m3', '.i3', '.mg', '.ig');
$config->repo->fileExt["markdown"] = array('.md', '.markdown', '.mdown', '.mkdn', '.mkd', '.mdwn', '.mdtxt', '.mdtext');
$config->repo->fileExt["mips"] = array('.s');
$config->repo->fileExt["msdax"] = array('.dax', '.msdax');
$config->repo->fileExt["objective-c"] = array('.m');
$config->repo->fileExt["pascal"] = array('.pas', '.p', '.pp');
$config->repo->fileExt["pascaligo"] = array('.ligo');
$config->repo->fileExt["perl"] = array('.pl');
$config->repo->fileExt["php"] = array('.php', '.php4', '.php5', '.phtml', '.ctp');
$config->repo->fileExt["postiats"] = array('.dats', '.sats', '.hats');
$config->repo->fileExt["powerquery"] = array('.pq', '.pqm');
$config->repo->fileExt["powershell"] = array('.ps1', '.psm1', '.psd1');
$config->repo->fileExt["pug"] = array('.jade', '.pug');
$config->repo->fileExt["python"] = array('.py', '.rpy', '.pyw', '.cpy', '.gyp', '.gypi');
$config->repo->fileExt["r"] = array('.r', '.rhistory', '.rmd', '.rprofile', '.rt');
$config->repo->fileExt["razor"] = array('.cshtml');
$config->repo->fileExt["redis"] = array('.redis');
$config->repo->fileExt["restructuredtext"] = array('.rst');
$config->repo->fileExt["ruby"] = array('.rb', '.rbx', '.rjs', '.gemspec', '.pp');
$config->repo->fileExt["rust"] = array('.rs', '.rlib');
$config->repo->fileExt["sb"] = array('.sb');
$config->repo->fileExt["scala"] = array('.scala', '.sc', '.sbt');
$config->repo->fileExt["scheme"] = array('.scm', '.ss', '.sch', '.rkt');
$config->repo->fileExt["scss"] = array('.scss');
$config->repo->fileExt["shell"] = array('.sh', '.bash');
$config->repo->fileExt["sophia"] = array('.aes');
$config->repo->fileExt["sol"] = array('.sol');
$config->repo->fileExt["sql"] = array('.sql');
$config->repo->fileExt["st"] = array('.st', '.iecst', '.iecplc', '.lc3lib');
$config->repo->fileExt["swift"] = array('.swift');
$config->repo->fileExt["systemverilog"] = array('.sv', '.svh');
$config->repo->fileExt["tcl"] = array('.tcl');
$config->repo->fileExt["twig"] = array('.twig');
$config->repo->fileExt["typescript"] = array('.ts', '.tsx');
$config->repo->fileExt["vb"] = array('.vb');
$config->repo->fileExt["verilog"] = array('.v', '.vh');
$config->repo->fileExt["xml"] = array('.xml', '.dtd', '.ascx', '.csproj', '.config', '.wxi', '.wxl', '.wxs', '.xaml', '.svg', '.svgz', '.opf', '.xsl');
$config->repo->fileExt["yaml"] = array('.yaml', '.yml');
+582 -50
View File
@@ -247,6 +247,152 @@ class repo extends control
return print(js::reload('parent'));
}
/**
* Get diff editor content by ajax.
*
* @param int $repoID
* @param int $objectID
* @param string $entry
* @param string $oldRevision
* @param string $newRevision
* @param string $showBug
* @param string $encoding
* @access public
* @return void
*/
public function ajaxGetDiffEditorContent($repoID, $objectID = 0, $entry = '', $oldRevision = '', $newRevision = '', $showBug = 'false', $encoding = '')
{
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = urldecode($this->repo->decodePath($entry));
$revision = str_replace('*', '-', $oldRevision);
$nRevision = str_replace('*', '-', $newRevision);
$entry = urldecode($entry);
$pathInfo = pathinfo($entry);
$encoding = empty($encoding) ? $repo->encoding : $encoding;
$encoding = strtolower(str_replace('_', '-', $encoding));
$this->scm->setEngine($repo);
$info = $this->scm->info($entry, $nRevision);
$path = $entry ? $info->path : '';
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->diff;
$this->view->type = 'diff';
$this->view->encoding = str_replace('-', '_', $encoding);
$this->view->repoID = $repoID;
$this->view->objectID = $objectID;
$this->view->repo = $repo;
$this->view->revision = $nRevision;
$this->view->oldRevision = $revision;
$this->view->file = $file;
$this->view->entry = $entry;
$this->view->content = '';
$this->view->pathInfo = $pathInfo;
$this->view->suffix = 'c';
$this->view->blames = array();
$this->view->showEditor = true;
$this->display('repo', 'ajaxGetEditorContent');
}
/**
* Get editor content by ajax.
*
* @param int $repoID
* @param int $objectID
* @param string $entry
* @param string $revision
* @param string $showBug
* @param string $encoding
* @access public
* @return void
*/
public function ajaxGetEditorContent($repoID, $objectID = 0, $entry = '', $revision = 'HEAD', $showBug = 'false', $encoding = '')
{
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = urldecode($this->repo->decodePath($entry));
$revision = str_replace('*', '-', $revision);
$this->scm->setEngine($repo);
$info = $this->scm->info($entry, $revision);
$path = $entry ? $info->path : '';
if($info->kind == 'dir') $this->locate($this->repo->createLink('browse', "repoID=$repoID&branchID=&objectID=$objectID&path=" . $this->repo->encodePath($path) . "&revision=$revision"));
$content = $this->scm->cat($entry, $revision);
$entry = urldecode($entry);
$pathInfo = pathinfo($entry);
$encoding = empty($encoding) ? $repo->encoding : $encoding;
$encoding = strtolower(str_replace('_', '-', $encoding));
$suffix = '';
if(isset($pathInfo["extension"])) $suffix = strtolower($pathInfo["extension"]);
if(!$suffix or (!array_key_exists($suffix, $this->config->program->suffix) and strpos($this->config->repo->images, "|$suffix|") === false)) $suffix = $this->repo->isBinary($content, $suffix) ? 'binary' : 'c';
if(strpos($this->config->repo->images, "|$suffix|") !== false)
{
$content = base64_encode($content);
}
elseif($encoding != 'utf-8')
{
$content = helper::convertEncoding($content, $encoding);
}
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->view;
$this->view->type = 'view';
$this->view->showBug = $showBug;
$this->view->encoding = str_replace('-', '_', $encoding);
$this->view->repoID = $repoID;
$this->view->branchID = $this->cookie->repoBranch;
$this->view->objectID = $objectID;
$this->view->repo = $repo;
$this->view->revision = $revision;
$this->view->oldRevision = $revision;
$this->view->file = $file;
$this->view->entry = $entry;
$this->view->path = $entry;
$this->view->info = $info;
$this->view->suffix = $suffix;
$this->view->content = $content ? $content : '';
$this->view->pathInfo = $pathInfo;
$this->view->showEditor = (strpos($this->config->repo->images, "|$suffix|") === false and $suffix != 'binary') ? true : false;
$this->display();
}
/**
* View repo file with monaco editor.
*
* @param int $repoID
* @param int $objectID
* @param string $entry
* @param string $revision
* @param string $showBug
* @param string $encoding
* @access public
* @return void
*/
public function monaco($repoID, $objectID = 0, $entry = '', $revision = 'HEAD', $showBug = 'false', $encoding = '')
{
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = $this->repo->decodePath($entry);
$entry = urldecode($entry);
$pathInfo = pathinfo($entry);
$this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->view;
$this->view->type = 'view';
$this->view->branchID = $this->cookie->repoBranch;
$this->view->showBug = $showBug;
$this->view->encoding = $encoding;
$this->view->repoID = $repoID;
$this->view->objectID = $objectID;
$this->view->repo = $repo;
$this->view->revision = $revision;
$this->view->file = $file;
$this->view->entry = $entry;
$this->view->pathInfo = $pathInfo;
$this->display();
}
/**
* View repo file.
*
@@ -261,10 +407,14 @@ class repo extends control
*/
public function view($repoID, $objectID = 0, $entry = '', $revision = 'HEAD', $showBug = 'false', $encoding = '')
{
$browser = helper::getBrowser();
if($this->get->repoPath) $entry = $this->get->repoPath;
$this->repo->setBackSession('view', $withOtherModule = true);
if($repoID == 0) $repoID = $this->session->repoID;
$this->commonAction($repoID, $objectID);
if($browser['name'] != 'ie') return print($this->fetch('repo', 'monaco', "repoID=$repoID&objectID=$objectID&entry=$entry&revision=$revision&showBug=$showBug&encoding=$encoding"));
if($_POST)
{
$oldRevision = isset($this->post->revision[1]) ? $this->post->revision[1] : '';
@@ -273,8 +423,6 @@ class repo extends control
$this->locate($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=$entry&oldrevision=$oldRevision&newRevision=$newRevision"));
}
$this->commonAction($repoID, $objectID);
$file = $entry;
$repo = $this->repo->getRepoByID($repoID);
$entry = $this->repo->decodePath($entry);
@@ -414,10 +562,8 @@ class repo extends control
$this->repo->setRepoBranch('');
}
/* Decrypt path and get cacheFile. */
$path = $this->repo->decodePath($path);
$cacheFile = $this->repo->getCacheFile($repoID, $path, $revision);
$this->scm->setEngine($repo);
/* Decrypt path. */
$path = $this->repo->decodePath($path);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
@@ -431,58 +577,29 @@ class repo extends control
$this->locate($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($path) . "&oldrevision=$oldRevision&newRevision=$newRevision"));
}
/* Cache infos. */
if($refresh or !$cacheFile or !file_exists($cacheFile) or (time() - filemtime($cacheFile)) / 60 > $this->config->repo->cacheTime)
/* Refresh repo. */
if($refresh)
{
/* Get cache infos. */
$infos = $this->scm->ls($path, $revision);
/* Update code commit history. */
$commentGroup = $this->loadModel('job')->getTriggerGroup('commit', array($repo->id));
if($infos)
if(in_array($repo->SCM, $this->config->repo->gitTypeList))
{
/* Update code commit history. */
$commentGroup = $this->loadModel('job')->getTriggerGroup('commit', array($repo->id));
if($refresh and in_array($repo->SCM, $this->config->repo->gitTypeList))
{
$branch = $this->cookie->repoBranch;
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
if($refresh and $repo->SCM == 'Subversion') $this->loadModel('svn')->updateCommit($repo, $commentGroup, false);
$revisionList = array();
foreach($infos as $info) $revisionList[$info->revision] = $info->revision;
$comments = $this->repo->getHistory($repoID, $revisionList);
foreach($infos as $info)
{
if(isset($comments[$info->revision]))
{
$comment = $comments[$info->revision];
$info->comment = $comment->comment;
}
}
$branch = $this->cookie->repoBranch;
$this->loadModel('git')->updateCommit($repo, $commentGroup, false);
$_COOKIE['repoBranch'] = $branch;
}
if($cacheFile)
{
if(!file_exists($cacheFile . '.lock'))
{
touch($cacheFile . '.lock');
file_put_contents($cacheFile, serialize($infos));
unlink($cacheFile . '.lock');
}
}
}
else
{
$infos = unserialize(file_get_contents($cacheFile));
if($repo->SCM == 'Subversion') $this->loadModel('svn')->updateCommit($repo, $commentGroup, false);
}
/* Get files info. */
$infos = $this->repo->getFileCommits($repo, $branchID, $path);
if($this->cookie->repoRefresh) setcookie('repoRefresh', 0, 0, $this->config->webRoot, '', $this->config->cookieSecure, true);
/* Set logType and revisions. */
$logType = 'dir';
$revisions = $this->repo->getCommits($repo, $path, $revision, $logType, $pager);
$logType = 'dir';
$revisions = $this->repo->getCommits($repo, $path, $revision, $logType, $pager);
$lastRevision = current($revisions);
/* Synchronous commit only in root path. */
if(in_array($repo->SCM, $this->config->repo->gitTypeList) and empty($path) and $infos and empty($revisions)) $this->locate($this->repo->createLink('showSyncCommit', "repoID=$repoID&objectID=$objectID&branch=" . helper::safe64Encode(base64_encode($this->cookie->repoBranch))));
@@ -504,8 +621,9 @@ class repo extends control
$this->view->path = urldecode($path);
$this->view->logType = $logType;
$this->view->cloneUrl = $this->repo->getCloneUrl($repo);
$this->view->cacheTime = date('m-d H:i', filemtime($cacheFile));
$this->view->cacheTime = date('m-d H:i', strtotime($lastRevision->time));
$this->view->branchOrTag = $branchOrTag;
$this->view->syncedRF = strpos(",{$this->config->repo->synced},", ",$repoID,") !== false; //Check has synced rename files.
$this->display();
}
@@ -935,6 +1053,292 @@ class repo extends control
$this->display();
}
/**
* Link story to commit.
*
* @param int $repoID
* @param string $revision
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function linkStory($repoID, $revision, $browseType = '', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if(!empty($_POST['stories']))
{
$this->repo->link($repoID, $revision, 'story');
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent', '', "parent.parent[2].getRelation('$revision')"));
}
$this->loadModel('story');
$this->app->loadLang('productplan');
$repo = $this->repo->getRepoByID($repoID);
$product = $this->loadModel('product')->getById($repo->product);
$modules = $this->loadModel('tree')->getOptionMenu($repo->product, 'story');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
unset($this->lang->story->statusList['closed']);
$storyStatusList = $this->lang->story->statusList;
$queryID = $browseType == 'bySearch' ? (int)$param : 0;
unset($this->config->product->search['fields']['product']);
$this->config->product->search['actionURL'] = $this->createLink('repo', 'linkStory', "repoID=$repoID&revision=$revision&browseType=bySearch&queryID=myQueryID");
$this->config->product->search['queryID'] = $queryID;
$this->config->product->search['style'] = 'simple';
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($product->id => $product->id));
$this->config->product->search['params']['module']['values'] = $modules;
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $storyStatusList);
if($product->type == 'normal')
{
unset($this->config->product->search['fields']['branch']);
unset($this->config->product->search['params']['branch']);
}
else
{
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
$this->config->product->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($product->id, 'noempty');
}
session_start();
$this->loadModel('search')->setSearchParams($this->config->product->search);
session_write_close();
$linkedStories = $this->repo->getRelationByCommit($repoID, $revision, 'story');
if($browseType == 'bySearch')
{
$allStories = $this->story->getBySearch($product->id, 0, $queryID, 'id', '', 'story', array_keys($linkedStories), $pager);
}
else
{
$allStories = $this->story->getProductStories($product->id, 0, '0', 'draft,active,changed', 'story', 'id_desc', false, array_keys($linkedStories), $pager);
}
$this->view->modules = $modules;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->allStories = $allStories;
$this->view->product = $product;
$this->view->repoID = $repoID;
$this->view->revision = $revision;
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
/**
* Link bug to commit.
*
* @param int $repoID
* @param string $revision
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function linkBug($repoID, $revision = '', $browseType = '', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if(!empty($_POST['bugs']))
{
$this->repo->link($repoID, $revision, 'bug');
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent', '', "parent.parent[2].getRelation('$revision')"));
}
$this->loadModel('bug');
$this->app->loadLang('productplan');
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$repo = $this->repo->getRepoByID($repoID);
$product = $this->loadModel('product')->getById($repo->product);
$modules = $this->loadModel('tree')->getOptionMenu($product->id, 'bug');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
$this->config->bug->search['actionURL'] = $this->createLink('repo', 'linkBug', "repoID=$repoID&revision=$revision&browseType=bySearch&queryID=myQueryID");
$this->config->bug->search['queryID'] = $queryID;
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($product->id => $product->id));
$this->config->bug->search['params']['module']['values'] = $modules;
$this->config->bug->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($product->id);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($product->id, $branch = 'all', $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->loadModel('build')->getBuildPairs($product->id, $branch = 'all', $params = '');
unset($this->config->bug->search['fields']['product']);
if($product->type == 'normal')
{
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
}
else
{
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
$this->config->bug->search['params']['branch']['values'] = array('' => '') + $this->loadModel('branch')->getPairs($productID, 'noempty');
}
session_start();
$this->loadModel('search')->setSearchParams($this->config->bug->search);
session_write_close();
$linkedBugs = $this->repo->getRelationByCommit($repoID, $revision, 'bug');
if($browseType == 'bySearch')
{
$allBugs = $this->bug->getBySearch($product->id, 0, $queryID, 'id_desc', array_keys($linkedBugs), $pager);
}
else
{
$allBugs = $this->bug->getActiveBugs($product->id, 0, '0', array_keys($linkedBugs), $pager);
}
$this->view->modules = $modules;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->allBugs = $allBugs;
$this->view->product = $product;
$this->view->repoID = $repoID;
$this->view->revision = $revision;
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
/**
* Link task to commit.
*
* @param int $repoID
* @param string $revision
* @param string $browseType
* @param int $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function linkTask($repoID, $revision = '', $browseType = 'unclosed', $param = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if(!empty($_POST['tasks']))
{
$this->repo->link($repoID, $revision, 'task');
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent', '', "parent.parent[2].getRelation('$revision')"));
}
$this->loadModel('execution');
$this->loadModel('product');
$this->app->loadLang('task');
/* Set browse type. */
$browseType = strtolower($browseType);
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
$repo = $this->repo->getRepoByID($repoID);
$product = $this->loadModel('product')->getById($repo->product);
$modules = $this->loadModel('tree')->getOptionMenu($product->id, $viewType = 'task');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
$this->config->execution->search['actionURL'] = $this->createLink('repo', 'linkTask', "repoID=$repoID&revision=$revision&browseType=bySearch&queryID=myQueryID", '', true);
$this->config->execution->search['queryID'] = $queryID;
$this->config->execution->search['style'] = 'simple';
$this->config->execution->search['params']['module']['values'] = $modules;
$this->config->execution->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($product->id);
/* Get executions by product. */
$productExecutions = $this->product->getExecutionPairsByProduct($product->id);
$productExecutionIDs = array_filter(array_keys($productExecutions));
$this->config->execution->search['params']['execution']['values'] = array_filter($productExecutions);
session_start();
$this->loadModel('search')->setSearchParams($this->config->execution->search);
session_write_close();
/* Get tasks by executions. */
$allTasks = array();
foreach($productExecutionIDs as $productExecutionID)
{
$tasks = $this->execution->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null);
$allTasks = array_merge($tasks, $allTasks);
}
/* Filter linked tasks. */
$linkedTasks = $this->repo->getRelationByCommit($repoID, $revision, 'task');
$linkedTaskIDs = array_keys($linkedTasks);
foreach($allTasks as $key => $task)
{
if(in_array($task->id, $linkedTaskIDs)) unset($allTasks[$key]);
}
/* Page the records. */
$pager->setRecTotal(count($allTasks));
$pager->setPageTotal();
if($pager->pageID > $pager->pageTotal) $pager->setPageID($pager->pageTotal);
$count = 1;
$limitMin = ($pager->pageID - 1) * $pager->recPerPage;
$limitMax = $pager->pageID * $pager->recPerPage;
foreach($allTasks as $key => $task)
{
if($count <= $limitMin or $count > $limitMax) unset($allTasks[$key]);
$count ++;
}
$this->view->modules = $modules;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->allTasks = $allTasks;
$this->view->product = $product;
$this->view->repoID = $repoID;
$this->view->revision = $revision;
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
/**
* Unlink object and commit revision.
*
* @param int $repoID
* @param string $revision
* @param string $objectType story|task|bug
* @param int $objectID
* @access public
* @return void
*/
public function unlink($repoID, $revision, $objectType, $objectID)
{
$this->repo->unlink($repoID, $revision, $objectType, $objectID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'revision' => $revision));
}
/**
* Ajax sync comment.
*
@@ -1423,4 +1827,132 @@ class repo extends control
$this->locate($url);
}
/**
* Ajax get branches and tags.
*
* @param int $repoID
* @param string $oldRevision
* @param string $newRevision
* @access public
* @return void
*/
public function ajaxGetBranchesAndTags($repoID, $oldRevision = '0', $newRevision = 'HEAD')
{
$branchesAndTags = $this->repo->getBranchesAndTags($repoID, $oldRevision, $newRevision);
return print(json_encode($branchesAndTags));
}
/**
* Get file tree by ajax.
*
* @param int $repoID
* @param string $branch
* @access public
* @return string
*/
public function ajaxGetFileTree($repoID, $branch = '')
{
$branch = base64_decode($branch);
$repo = $this->repo->getRepoByID($repoID);
$files = $this->repo->getFileTree($repo, $branch);
return print($files);
}
/**
* Ajax sync rename record.
*
* @param int $repoID
* @access public
* @return void
*/
public function ajaxSyncRenameRecord($repoID)
{
$this->repo->insertDeleteRecord($repoID);
}
/**
* Get relation by commit.
*
* @param int $repoID
* @param string $commit
* @access public
* @return object
*/
public function ajaxGetCommitRelation($repoID, $commit)
{
$titleList = $this->repo->getRelationByCommit($repoID, $commit);
return $this->send(array('titleList' => $titleList));
}
/**
* Get relation story, task, bug info.
*
* @param int $objectID
* @param string $objectType
* @access public
* @return void
*/
public function ajaxGetRelationInfo($objectID, $objectType = 'story')
{
$this->app->loadLang('release');
$this->view->object = $this->loadModel($objectType)->getById($objectID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->actions = $this->loadModel('action')->getList($objectType, $objectID);
$this->view->objectID = $objectID;
$this->view->objectType = $objectType;
$this->display();
}
/**
* Ajax get commit info.
*
* @access public
* @return void
*/
public function ajaxGetCommitInfo()
{
$line = $this->post->line;
$repo = $this->repo->getRepoByID($this->post->repoID);
$entry = $this->repo->decodePath($this->post->entry);
$revision = $this->post->revision;
$returnType = $this->post->returnType ? $this->post->returnType : 'view';
$this->scm->setEngine($repo);
$blames = $this->scm->blame($entry, $this->post->revision);
if(!$blames) $blames =$this->scm->blame($entry, $this->post->sourceRevision);
while($line > 0)
{
if(isset($blames[$line]['revision']))
{
$revision = $blames[$line]['revision'];
break;
}
$line--;
}
if($returnType == 'json') return $this->send(array('result' => 'success', 'blames' => $blames));
$commits = $this->scm->getCommits($revision, 1);
if(!empty($commits['commits'][$revision]))
{
$commit = $commits['commits'][$revision];
$objects = $this->repo->getLinkedObjects($commit->comment);
$stories = $this->dao->select('id,title')->from(TABLE_STORY)->where('deleted')->eq(0)->andWhere('id')->in($objects['stories'])->fetchPairs();
$tasks = $this->dao->select('id,name')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('id')->in($objects['tasks'])->fetchPairs();
$bugs = $this->dao->select('id,title')->from(TABLE_BUG)->where('deleted')->eq(0)->andWhere('id')->in($objects['bugs'])->fetchPairs();
$this->view->repoID = $this->post->repoID;
$this->view->commit = $commit;
$this->view->stories = $stories;
$this->view->tasks = $tasks;
$this->view->bugs = $bugs;
$this->display();
}
else
{
echo '';
}
}
}
+23
View File
@@ -0,0 +1,23 @@
.m-repo-ajaxgeteditorcontent {overflow: hidden;}
#monacoEditor .tip {width: 15px; height: 15px; background: #D9D9D9; border-radius: 10px;}
#log {background: #fff; margin-top: 2px; color: #707070; display: none; padding: 5px;}
#log .history {margin-left: 5px;}
#related {display: none; margin-top: 2px; background: #fff;}
#relationTabs .nav > li > a {padding: 8px 10px; display: flex; white-space: pre;}
#relationTabs .nav-tabs > li > a > span {margin-right: 5px;}
#relationTabs .tab-pane {display: none;}
#relationTabs .tabs-navbar {background: #F4F5F7;}
#relationTabs .tab-pane.active {display: block;}
#relationTabs .tab-nav-item {max-width: none !important;}
#relationTabs .tab-nav-item .icon {line-height: inherit;}
#relationTabs > .tabs-navbar {overflow: hidden; padding-bottom: 10px; position: relative; height: 35px;}
#relationTabs > .tabs-navbar > .nav-tabs {position: absolute; display: flex;}
#relationTabs .tab-nav-link .title {max-width: 300px; display: inline-block; white-space: nowrap; width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 0 5px;}
#related .content, #related .btn {background-color: #F4F5F7; border: none;}
#related .nav-tabs > li.active > a:before {background: none; height: 0;}
#related .table-empty-tip {padding: 35px 10px;}
.repoCode .binary a .icon-download {font-size: 50px;}
.repoCode .binary, .repoCode .image {text-align: center;}
.repoCode .binary a {margin: 100px 0px; display: block;}
.repoCode .image {margin-top: 10px;}
+8
View File
@@ -0,0 +1,8 @@
body {background-color: #fff; padding-bottom: 20px;}
.linkContent .panel {margin-bottom: 0; padding-bottom: 10px; border: none;}
.left-content {padding-top: 15px;}
.right-content {border-left: 1px solid #EDEEF2; padding-top: 15px;}
.text {width: 85%; white-space: normal; word-wrap: break-word; word-break: break-all; font-weight: normal; padding-left: 10px;}
.cell {min-height: 300px;}
.menu-title {width: 100%;}
.detail-content {margin-top: 0;}
+38
View File
@@ -198,3 +198,41 @@ h3 {font-size: 16px;}
.comment.show-form .comment-form-div {margin-top: 20px; padding-bottom: 10px;}
.comment .avatar {margin-right: 10px;}
#fileTree li {padding: 0 0 0 8px;}
#fileTree li.has-list {padding-left: 20px;}
#fileTree li > a {display: block; padding: 6px 0; border-radius: 2px; padding-left: 6px; height: 30px; text-decoration: none;}
#fileTree li > a > span {display: inline-block;}
#fileTree li > a > span + span {margin-left: 8px;}
#fileTree li.selected > a {background-color: #E8F3FC;}
#fileTree li.selected > a > span.title {color: #006AF1;}
#fileTree .label-id {border-color: #cbd0db; color: #7d8599}
#fileTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599}
#fileTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;}
#fileTree li > a > span.user {color: #838a9d;}
#fileTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8}
#fileTree li > a:first-child {padding-left: 18px;}
#fileTree li a.selected {color: #e9f2fb; background-color: #0c64eb;}
#fileTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;}
#fileTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;}
#fileTree li > .list-toggle:hover:before, #fileTree li > .list-toggle:hover {border-color: #006AF1;}
#fileTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;}
#fileTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;}
#fileTree li.open > .list-toggle:hover {background: #006AF1;}
#fileTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 1px dashed #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;}
#fileTree ul > li:before, #fileTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 1px dashed #cbd0db; top: -13px; bottom: 12px; left: -12px;}
#fileTree ul > li:last-child:before {bottom: auto; height: 29px;}
#fileTree ul > li:first-child:before {top: -9px;}
#fileTree ul > li.has-list:first-child:before {top: -13px;}
#fileTree ul > li.tree-single-item:before {height: 23px;}
#fileTree ul > li.has-list:after {width: 14px;}
#modules li {padding: 5px 0 0 15px;}
.file-tree #modules .icon {color: #9EA3B0;}
.file-tree #modules .icon-folder {padding-left: 5px;}
li.selected .doc-title .icon, li.selected .doc-title a {color: #438EFF !important;}
.btn-left, .btn-right {display: none;}
+10
View File
@@ -24,3 +24,13 @@ table.diff {margin-bottom: 0px;}
.body-modal #mainMenu {padding-bottom: 40px;}
.repoCode td.code {white-space: inherit;}
.repoCode .content, .repoCode .btn {background-color: #F4F5F7; border: none;}
.repoCode .nav-tabs > li.active > a:before {background: none; height: 0;}
#fileTabs .tab-pane {display: none;}
#fileTabs .tab-pane.active {display: block;}
#fileTabs .tab-nav-item {max-width: none !important;}
#fileTabs > .tabs-navbar {overflow: hidden; padding-bottom: 10px; position: relative; height: 35px;}
#fileTabs > .tabs-navbar > .nav-tabs {position: absolute; display: flex;}
#filesTree #modules {margin-top: 5px;}
#filesTree {overflow-y: auto;}
+21
View File
@@ -0,0 +1,21 @@
.m-repo-monaco {overflow: hidden;}
.repoCode .nav > li > a {padding: 8px 10px;}
.repoCode .nav-tabs > li > a > span {margin-right: 5px;}
#fileTabs .tab-pane {display: none;}
#fileTabs .tab-pane.active {display: block;}
#fileTabs .tab-nav-item {max-width: none !important;}
#fileTabs > .tabs-navbar {overflow: hidden; padding-bottom: 10px; position: relative; height: 35px;}
#fileTabs > .tabs-navbar > .nav-tabs {position: absolute; display: flex;}
.repoCode .content {padding: 5px;}
.repoCode .nav > li > a {display: flex; white-space: pre;}
#sourceSwapper {border: 1px solid #D8DBDE; border-radius: 2px; width: 100%;}
#sourceSwapper .repo-select {width: 100%;}
#sourceSwapper .repo-select .caret {margin-top: 6px;}
#sourceSwapper .hide-in-search {padding-left: 5px;}
#sourceSwapper .tree li > a {max-width: 100%;}
.version-name {max-width: 90%}
#filesTree #modules {margin-top: 5px;}
#filesTree {overflow-y: auto;}
.repoCode .content, .repoCode .btn {background-color: #F4F5F7; border: none;}
.repoCode .nav-tabs > li.active > a:before {background: none; height: 0;}
+7
View File
@@ -109,4 +109,11 @@ $(function()
var link = createLink('repo', 'downloadCode', 'repoID=' + repoID + '&branch=' + branch);
window.open(link);
})
/* Sync rename record. */
if(!syncedRF)
{
var link = createLink('repo', 'ajaxSyncRenameRecord', 'repoID=' + repoID);
$.get(link);
}
})
+42
View File
@@ -61,6 +61,48 @@ $("input:checkbox[name='revision[]']").click(function(){
}
});
var distance = 0;
/**
* Aarrow tabs area.
*
* @param string domID
* @param number shift 1|-1
* @param bool hideRightBtn
* @access public
* @return void
*/
function arrowTabs(domID, shift, hideRightBtn)
{
if($('#' + domID).html() == '') return;
$('.btn-right, .btn-left').show();
if(hideRightBtn) $('.btn-right').hide();
var tabItemWidth = $('#' + domID + ' > .tabs-navbar > .nav-tabs')[0].clientWidth;
var tabsWidth = $('#' + domID + '')[0].clientWidth;
if(tabItemWidth < tabsWidth)
{
$('.btn-right, .btn-left').hide();
return;
}
distance += tabsWidth * shift * 0.2;
if(distance > 0) distance = 0;
if(distance == 0)
{
$('.btn-left').hide();
}
if((tabItemWidth + distance) < tabsWidth * 0.75)
{
$('.btn-right').hide();
return arrowTabs(domID, 1, true);
}
$('#' + domID + ' > .tabs-navbar > .tabs-nav')[0].style.transform = 'translateX('+ distance +'px)';
}
$(function()
{
$(document).on('click', '.ajaxPager', function()
+187 -6
View File
@@ -1,11 +1,192 @@
$(document).ready(function()
{
$("#inline").click(function(){$('#arrange').val('inline');this.form.submit();});
$("#appose").click(function(){$('#arrange').val('appose');this.form.submit();});
$(".label-exchange").click(function(){ $('#exchange').submit();});
});
/**
* Change code encoding.
*
* @param string encoding
* @access public
* @return void
*/
function changeEncoding(encoding)
{
$('#encoding').val(encoding);
$('#encoding').parents('form').submit();
}
/**
* Html code decode.
*
* @param string str
* @access public
* @return string
*/
function htmlspecialchars_decode(str){
str = str.replace(/&amp;/g, '&');
str = str.replace(/&lt;/g, '<');
str = str.replace(/&gt;/g, '>');
str = str.replace(/&quot;/g, "''");
str = str.replace(/&#039;/g, "'");
return str;
}
/**
* Get diffs by file name.
*
* @param string fileName
* @access public
* @return object
*/
function getDiffs(fileName)
{
if(fileName.indexOf('./') === 0) fileName = fileName.substring(2);
var result = {
'code': {'new': '', 'old': ''},
'line': {'new': [], 'old': []}
};
$.each(diffs, function(i, diff)
{
if(diff.fileName == fileName)
{
if(typeof diff.contents[0].lines != 'object') return result;
var lines = diff.contents[0].lines;
$.each(lines, function(l, code)
{
if(code.type == 'all' || code.type == 'new')
{
result.code.new += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.new.push(code.newlc);
}
if(code.type == 'all' || code.type == 'old')
{
result.code.old += htmlspecialchars_decode(code.line.substring(2)) + "\n";
result.line.old.push(code.oldlc);
}
})
return result;
}
});
return result;
}
/**
* Create file tab.
*
* @param string filename
* @param string filepath
* @access public
* @return object
*/
function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
var tabID = Base64.encode(filepath).replaceAll('=', '-');
return {
title: filename,
id: tabID,
type: 'iframe',
url: createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath))))
};
}
$(document).ready(function()
{
var diffAppose = true;
$('.dropdown #appose').hide();
if(!browser || browser == 'ie')
{
$("#inline").click(function(){$('#arrange').val('inline');this.form.submit();});
$("#appose").click(function(){$('#arrange').val('appose');this.form.submit();});
}
$(".label-exchange").click(function(){ $('#exchange').submit();});
$('.btn-left').click(function() {arrowTabs('fileTabs', 1);});
$('.btn-right').click(function() {arrowTabs('fileTabs', -2);});
if(file) $('#fileTabs').tabs({tabs: [createTab(file['basename'], entry)]});
/**
* Set pane height.
*
* @access public
* @return void
*/
function setHeight()
{
var paneHeight = $(window).height() - 120;
$('#fileTabs .tab-pane').css('height', paneHeight + 'px')
$('#filesTree').css('height', paneHeight + 45)
}
setHeight();
$(document).on('click', '.repoFileName', function()
{
var path = $(this).data('path');
var name = $(this).text();
var $tabs = $('#fileTabs').data('zui.tabs');
$tabs.open(createTab(name, path));
setHeight();
arrowTabs('fileTabs', -2);
});
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
openedFiles.splice(index, 1)
$('[data-path="' + filepath + '"]').closest('li').removeClass('selected');
}
if(index == openedFiles.length) arrowTabs('fileTabs', -2);
});
/* Append file path into the title. */
$('#fileTabs').on('onLoad', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
$('#tab-nav-item-' + tab.id).attr('title', filepath);
document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
if(openedFiles.indexOf(filepath) == -1) openedFiles.push(filepath);
});
$('#fileTabs').on('onOpen', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1) document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose);
});
$('.inline-appose').on('click', function()
{
$('.inline-appose').hide();
diffAppose = !diffAppose;
if(diffAppose)
{
$('.dropdown #inline').show();
}
else
{
$('.dropdown #appose').show();
}
var type = $(this).attr('id');
var tabID = $('.tab-nav-item.active').data('id');
document.getElementById('tab-iframe-' + tabID).contentWindow.updateEditorInline(diffAppose);
return;
});
});
/**
* Load link object page.
*
* @param string $link
* @access public
* @return void
*/
function loadLinkPage(link)
{
$('#linkObject').attr('href', link);
$('#linkObject').click()
}
+137
View File
@@ -0,0 +1,137 @@
/**
* Create file tab.
*
* @param string filename
* @param string filepath
* @access public
* @return object
*/
function createTab(filename, filepath)
{
$('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected');
var tabID = Base64.encode(filepath).replaceAll('=', '-');
return {
title: filename,
id: tabID,
type: 'iframe',
url: createLink('repo', 'ajaxGetEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath))))
};
}
$(function()
{
$('.btn-left').click(function() {arrowTabs('fileTabs', 1);});
$('.btn-right').click(function() {arrowTabs('fileTabs', -2);});
$('#fileTabs').tabs({tabs: [createTab(file['basename'], entry)]});
/**
* Set pane height.
*
* @access public
* @return void
*/
function setHeight()
{
var paneHeight = $(window).height() - 120;
$('#fileTabs .tab-pane').css('height', paneHeight + 'px')
$('#filesTree').css('height', paneHeight + 45)
}
setHeight();
$(document).on('click', '.repoFileName', function()
{
var path = $(this).data('path');
var name = $(this).text();
var $tabs = $('#fileTabs').data('zui.tabs');
if(openedFiles.indexOf(path) == -1) openedFiles.push(path);
$tabs.open(createTab(name, path));
setHeight();
arrowTabs('fileTabs', -2);
});
/* Remove file path for opened files. */
$('#fileTabs').on('onClose', function(event, tab) {
var filepath = decodeURIComponent(Base64.decode(tab.id.replaceAll('-', '=')));
var index = openedFiles.indexOf(filepath);
if(index > -1)
{
openedFiles.splice(index, 1)
$('[data-path="' + filepath + '"]').closest('li').removeClass('selected');
}
if(index == openedFiles.length) arrowTabs('fileTabs', -2);
});
/* Append file path into the title. */
$('#fileTabs').on('onLoad', function(event, tab) {
var filepath = Base64.decode(tab.id.replaceAll('-', '='));
$('#tab-nav-item-' + tab.id).attr('title', decodeURIComponent(filepath));
});
if(['Git', 'Gitlab', 'Gogs', 'Gitea'].indexOf(repo.SCM) != -1)
{
var link = createLink('repo', 'ajaxGetBranchesAndTags', 'repoID=' + repoID + '&oldRevision=' + branchID);
$.get(link, function(data)
{
var result = $.parseJSON(data);
$('#branchList').empty();
$('#branchList').append(result.sourceHtml);
$('#branchList #branchesAndTags').tree({initialState: 'expand'});
});
}
else
{
$('#sourceSwapper').hide();
}
/**
* Refresh files tree.
*
* @param string branchOrTag
* @access public
* @return void
*/
function refreshFiles(branchOrTag)
{
var link = createLink('repo', 'ajaxGetFileTree', 'repoID=' + repoID + '&branch=' + Base64.encode(branchOrTag));
$.get(link, function(data)
{
$('#modules').remove();
$('#filesTree').append(data);
$('#modules').tree();
$('#filesTree').removeClass('loading');
});
}
$(document).on('click', '.branch-or-tag', function()
{
var branchOrTag = $(this).text();
if(branchOrTag != $.cookie('repoBranch'))
{
$('#filesTree').addClass('loading');
$.cookie('repoBranch', branchOrTag);
$('#fileTabs').data('zui.tabs').closeAll();
refreshFiles(branchOrTag);
$('.branch-or-tag').removeClass('selected');
$(this).addClass('selected');
$('.repo-select').attr('title', branchOrTag);
$('.repo-select .version-name').text(branchOrTag);
}
})
});
/**
* Load link object page.
*
* @param string $link
* @access public
* @return void
*/
function loadLinkPage(link)
{
$('#linkObject').attr('href', link);
$('#linkObject').click()
}
+8
View File
@@ -26,6 +26,8 @@ $lang->repo->branch = 'Branch';
$lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->blamTmpl = '%time %name commited %version %comment';
$lang->repo->notRelated = 'There is currently no related ZenTao object';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
@@ -40,6 +42,8 @@ $lang->repo->downloadZip = 'Download Zip file';
$lang->repo->sshClone = 'Clone with SSH';
$lang->repo->httpClone = 'Clone with HTTP';
$lang->repo->cloneUrl = 'Clone URL';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlinkedTasks = 'Unlinked Tasks';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
@@ -103,6 +107,10 @@ $lang->repo->job = 'Job';
$lang->repo->fileServerUrl = 'File Server Url';
$lang->repo->fileServerAccount = 'File Server Account';
$lang->repo->fileServerPassword = 'File Server Password';
$lang->repo->linkStory = 'Link ' . $lang->SRCommon;
$lang->repo->linkBug = 'Link Bug';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlink = 'Unlink';
$lang->repo->title = 'Title';
$lang->repo->status = 'Status';
+8
View File
@@ -26,6 +26,8 @@ $lang->repo->branch = 'Branch';
$lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->blamTmpl = '%time %name commited %version %comment';
$lang->repo->notRelated = 'There is currently no related ZenTao object';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
@@ -40,6 +42,8 @@ $lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone with SSH';
$lang->repo->httpClone = 'Clone with HTTP';
$lang->repo->cloneUrl = 'Clone URL';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlinkedTasks = 'Unlinked Tasks';
$lang->repo->submit = 'Submit';
$lang->repo->cancel = 'Cancel';
@@ -103,6 +107,10 @@ $lang->repo->job = 'Job';
$lang->repo->fileServerUrl = 'File Server Url';
$lang->repo->fileServerAccount = 'File Server Account';
$lang->repo->fileServerPassword = 'File Server Password';
$lang->repo->linkStory = 'Link ' . $lang->SRCommon;
$lang->repo->linkBug = 'Link Bug';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlink = 'Unlink';
$lang->repo->title = 'Title';
$lang->repo->status = 'Status';
+8
View File
@@ -26,6 +26,8 @@ $lang->repo->branch = 'Branch';
$lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->blamTmpl = '%time %name commited %version %comment';
$lang->repo->notRelated = 'There is currently no related ZenTao object';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Créer Ref';
@@ -40,6 +42,8 @@ $lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone with SSH';
$lang->repo->httpClone = 'Clone with HTTP';
$lang->repo->cloneUrl = 'Clone URL';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlinkedTasks = 'Unlinked Tasks';
$lang->repo->submit = 'Soumettre';
$lang->repo->cancel = 'Annuler';
@@ -103,6 +107,10 @@ $lang->repo->job = 'Job';
$lang->repo->fileServerUrl = 'File Server Url';
$lang->repo->fileServerAccount = 'File Server Account';
$lang->repo->fileServerPassword = 'File Server Password';
$lang->repo->linkStory = 'Link ' . $lang->SRCommon;
$lang->repo->linkBug = 'Link Bug';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlink = 'Unlink';
$lang->repo->title = 'Titre';
$lang->repo->status = 'Statut';
+8
View File
@@ -26,6 +26,8 @@ $lang->repo->branch = 'Branch';
$lang->repo->tag = 'Tag';
$lang->repo->addWebHook = 'Add Webhook';
$lang->repo->apiGetRepoByUrl = 'API: Get repo by URL';
$lang->repo->blamTmpl = '%time %name commited %version %comment';
$lang->repo->notRelated = 'There is currently no related ZenTao object';
$lang->repo->browseAction = 'Browse Repo';
$lang->repo->createAction = 'Create Repo';
@@ -40,6 +42,8 @@ $lang->repo->downloadZip = 'Download compressed package';
$lang->repo->sshClone = 'Clone with SSH';
$lang->repo->httpClone = 'Clone with HTTP';
$lang->repo->cloneUrl = 'Clone URL';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlinkedTasks = 'Unlinked Tasks';
$lang->repo->submit = 'Gửi';
$lang->repo->cancel = 'Hủy';
@@ -103,6 +107,10 @@ $lang->repo->job = 'Job';
$lang->repo->fileServerUrl = 'File Server Url';
$lang->repo->fileServerAccount = 'File Server Account';
$lang->repo->fileServerPassword = 'File Server Password';
$lang->repo->linkStory = 'Link ' . $lang->SRCommon;
$lang->repo->linkBug = 'Link Bug';
$lang->repo->linkTask = 'Link Task';
$lang->repo->unlink = 'Unlink';
$lang->repo->title = 'Tiêu đề';
$lang->repo->status = 'Tình trạng';
+8
View File
@@ -26,6 +26,8 @@ $lang->repo->branch = '分支';
$lang->repo->tag = '标签';
$lang->repo->addWebHook = '添加Webhook';
$lang->repo->apiGetRepoByUrl = '接口:通过URL获取代码库';
$lang->repo->blamTmpl = '%time 由 %name 提交 %version %comment';
$lang->repo->notRelated = '暂时没有关联禅道对象';
$lang->repo->browseAction = '浏览代码库';
$lang->repo->createAction = '创建代码库';
@@ -40,6 +42,8 @@ $lang->repo->downloadZip = '下载压缩包';
$lang->repo->sshClone = '使用SSH克隆';
$lang->repo->httpClone = '使用HTTP克隆';
$lang->repo->cloneUrl = '克隆地址';
$lang->repo->linkTask = '关联任务';
$lang->repo->unlinkedTasks = '未关联任务';
$lang->repo->submit = '提交';
$lang->repo->cancel = '取消';
@@ -103,6 +107,10 @@ $lang->repo->job = '构建任务';
$lang->repo->fileServerUrl = '预合并后上传服务器目录';
$lang->repo->fileServerAccount = '文件服务器登录用户名';
$lang->repo->fileServerPassword = '文件服务器登录密码';
$lang->repo->linkStory = '关联' . $lang->SRCommon;
$lang->repo->linkBug = '关联Bug';
$lang->repo->linkTask = '关联任务';
$lang->repo->unlink = '取消关联';
$lang->repo->title = '标题';
$lang->repo->status = '状态';
+544 -7
View File
@@ -313,6 +313,63 @@ class repoModel extends model
return true;
}
/**
* Create commit link.
*
* @param int $repoID
* @param string $revision
* @param string $type
* @access public
* @return void
*/
public function link($repoID, $revision, $type = 'story')
{
$this->loadModel('action');
if($type == 'story') $links = $this->post->stories;
if($type == 'bug') $links = $this->post->bugs;
if($type == 'task') $links = $this->post->tasks;
$revisionID = $this->dao->select('id')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->andWhere('revision')->eq($revision)->fetch('id');
foreach($links as $linkID)
{
$relation = new stdclass;
$relation->AType = 'revision';
$relation->AID = $revisionID;
$relation->relation = 'commit';
$relation->BType = $type;
$relation->BID = $linkID;
$this->dao->replace(TABLE_RELATION)->data($relation)->exec();
if($type == 'story') $this->action->create('story', $linkID, 'linked2revision', '', $revisionID);
if($type == 'bug') $this->action->create('bug', $linkID, 'linked2revision', '', $revisionID);
if($type == 'task') $this->action->create('task', $linkID, 'linked2revision', '', $revisionID);
}
}
/**
* Unlink object and commit revision.
*
* @param int $repoID
* @param string $revision
* @param string $objectType story|bug|task
* @param int $objectID
* @access public
* @return void
*/
public function unlink($repoID, $revision, $objectType, $objectID)
{
$revisionID = $this->dao->select('id')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->andWhere('revision')->eq($revision)->fetch('id');
$this->dao->delete()->from(TABLE_RELATION)
->where('AID')->eq($revisionID)
->andWhere('AType')->eq('revision')
->andWhere('relation')->eq('commit')
->andWhere('BType')->eq($objectType)
->andWhere('BID')->eq($objectID)->exec();
if(!dao::isError()) $this->loadModel('action')->create($objectType, $objectID, 'unlinkedfromrevision', '', $revisionID);
}
/**
* Save repo state.
*
@@ -877,6 +934,15 @@ class repoModel extends model
$file->revision = $commitID;
$file->repo = $repoID;
$this->dao->insert(TABLE_REPOFILES)->data($file)->exec();
if($file->oldPath and $file->action == 'R')
{
$file->path = $file->oldPath;
$file->parent = dirname($file->path);
$file->oldPath = '';
$file->action = 'D';
$this->dao->insert(TABLE_REPOFILES)->data($file)->exec();
}
}
}
$revisionPairs[$commit->revision] = $commit->revision;
@@ -933,7 +999,20 @@ class repoModel extends model
$repoFile->parent = $parentPath == '\\' ? '/' : $parentPath;
$repoFile->type = $info['kind'];
$repoFile->action = $info['action'];
$repoFile->oldPath = $info['oldPath'];
$this->dao->insert(TABLE_REPOFILES)->data($repoFile)->exec();
if($repoFile->oldPath and $repoFile->action == 'R')
{
$parentPath = dirname($repoFile->oldPath);
$repoFile->path = $repoFile->oldPath;
$repoFile->parent = $parentPath == '\\' ? '/' : $parentPath;
$repoFile->type = $info['kind'];
$repoFile->action = 'D';
$repoFile->oldPath = '';
$this->dao->insert(TABLE_REPOFILES)->data($repoFile)->exec();
}
}
$version++;
}
@@ -1166,7 +1245,7 @@ class repoModel extends model
*/
public function setRepoBranch($branch)
{
setcookie("repoBranch", $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure, true);
setcookie("repoBranch", $branch, 0, $this->config->webRoot, '', $this->config->cookieSecure);
$_COOKIE['repoBranch'] = $branch;
}
@@ -1712,11 +1791,10 @@ class repoModel extends model
}
$action = new stdclass();
$action->actor = $log->author;
$action->date = $log->date;
$action->extra = $scm == 'svn' ? $log->revision : substr($log->revision, 0, 10);
$comment = htmlSpecialString($this->iconvComment($log->msg, $encodings));
$action->actor = $log->author;
$action->date = $log->date;
$action->extra = $scm == 'svn' ? $log->revision : substr($log->revision, 0, 10);
$action->comment = $this->lang->repo->revisionA . ': #' . $action->extra . "<br />" . htmlSpecialString($this->iconvComment($log->msg, $encodings));
$this->loadModel('action');
$actions = $objects['actions'];
@@ -1733,7 +1811,6 @@ class repoModel extends model
$action->objectID = $taskID;
$action->product = $productsAndExecutions[$taskID]['product'];
$action->execution = $productsAndExecutions[$taskID]['execution'];
$action->comment = $this->lang->repo->revisionA . ': #' . $action->extra . "<br />" . $comment;
foreach($taskActions as $taskAction => $params)
{
$_POST = array();
@@ -2207,4 +2284,464 @@ class repoModel extends model
return $url;
}
/**
* Get file commits.
*
* @param object $repo
* @param string $branch
* @param string $parent
* @access public
* @return array
*/
public function getFileCommits($repo, $branch, $parent = '')
{
$parent = '/' . ltrim($parent, '/');
/* Get file commits by repo. */
if($repo->SCM != 'Subversion' and empty($branch)) $branch = $this->cookie->repoBranch;
$fileCommits = $this->dao->select('t1.path,t1.type,t1.action,t1.oldPath,t1.parent,t2.revision,t2.comment,t2.committer,t2.time')->from(TABLE_REPOFILES)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.revision=t2.id')
->leftJoin(TABLE_REPOBRANCH)->alias('t3')->on('t2.id=t3.revision')
->where('t1.repo')->eq($repo->id)
->andWhere('left(t2.comment, 12)')->ne('Merge branch')
->beginIF($repo->SCM != 'Subversion' and $branch)->andWhere('t3.branch')->eq($branch)->fi()
->andWhere('t1.parent')->like("$parent%")->fi()
->orderBy('t2.`time` asc')
->fetchAll('path');
$files = array();
$folders = array();
$dirList = array();
$fileSort = $dirSort = array(); // Use it to sort array.
foreach($fileCommits as $fileCommit)
{
/* Filter by parent. */
if($fileCommit->action == 'D') continue;
if(strpos($fileCommit->path, $parent) !== 0) continue;
$pathList = explode('/', ltrim($fileCommit->path, '/'));
if($fileCommit->parent == $parent and $fileCommit->type == 'file')
{
$file = new stdclass();
$file->name = end($pathList);
$file->kind = 'file';
$file->revision = $fileCommit->revision;
$file->comment = $fileCommit->comment;
$file->account = $fileCommit->committer;
$file->date = $fileCommit->time;
$files[] = $file;
$fileSort[] = $file->name;
}
else
{
$childPath = ltrim(substr($fileCommit->path, strlen($parent)), '/');
$childPath = explode('/', $childPath);
$fileName = $fileCommit->type == 'dir' ? end($pathList) : $childPath[0];
if(in_array($fileName, $dirList)) continue;
$folder = new stdclass();
$folder->name = $fileName;
$folder->kind = 'dir';
$folder->revision = $fileCommit->revision;
$folder->comment = $fileCommit->comment;
$folder->account = $fileCommit->committer;
$folder->date = $fileCommit->time;
$dirList[] = $fileName;
$folders[] = $folder;
$dirSort[] = $fileName;
}
}
array_multisort($fileSort, SORT_ASC, $files);
array_multisort($dirSort, SORT_ASC, $folders);
return array_merge($folders, $files);
}
/**
* Get html for file tree.
*
* @param object $repo
* @param string $branch
* @param array $diffs
* @access public
* @return string
*/
public function getFileTree($repo, $branch = '', $diffs = array())
{
$allFiles = array();
if(empty($diffs))
{
if($repo->SCM != 'Subversion' and empty($branch)) $branch = $this->cookie->repoBranch;
$files = $this->dao->select('t1.path,t1.action')->from(TABLE_REPOFILES)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.revision=t2.id')
->leftJoin(TABLE_REPOBRANCH)->alias('t3')->on('t2.id=t3.revision')
->where('t1.repo')->eq($repo->id)
->andWhere('t1.type')->eq('file')
->andWhere('left(t2.comment, 12)')->ne('Merge branch')
->beginIF($repo->SCM != 'Subversion' and $branch)->andWhere('t3.branch')->eq($branch)->fi()
->orderBy('t2.`time` asc')
->fetchPairs();
foreach($files as $file => $action)
{
if($action != 'D') $allFiles[] = $file;
}
}
else
{
foreach($diffs as $diff) $allFiles[] = $diff->fileName;
}
return $this->buildFileTree($allFiles);
}
/**
* Build file tree.
*
* @param array $allFiles
* @access public
* @return string
*/
public function buildFileTree($allFiles = array())
{
$files = array();
$id = 0;
foreach($allFiles as $key => $file)
{
$fileName = explode('/', $file);
$parent = '';
foreach($fileName as $path)
{
if($path === '') continue;
$parentID = $parent == '' ? 0 : $files[$parent]['id'];
$parent .= $parent == '' ? $path : '/' . $path;
if(!isset($files[$parent])){
$id++;
$files[$parent] = array(
'id' => $id,
'parent' => $parentID,
'name' => $path,
'path' => $parent,
'key' => $key,
);
}
}
}
sort($files);
$fileTree = $this->buildTree($files);
$html = '<ul data-name="filesTree" data-ride="tree" data-initial-state="preserve" id="modules" class="tree">';
foreach($fileTree as $file)
{
$html .= "<li class='open' data-id='{$file['id']}'>";
if(isset($file['children']))
{
$html .= "<i class='icon icon-folder'></i> {$file['name']}";
$html .= $this->getFrontFiles($file['children']);
}
else
{
$html .= "<span class='item doc-title text-ellipsis'><i class='icon icon-file-text-alt'></i> " . html::a('#filePath' . $file['key'], $file['name'], '', "class='repoFileName' data-path='{$file['path']}' title='{$file['path']}'") . '</span>';
}
$html .= '</li>';
}
$html .= '</ul>';
return $html;
}
/**
* Build tree.
*
* @param array $files
* @param int $parent
* @access public
* @return array
*/
public function buildTree($files = array(), $parent = 0)
{
$treeList = [];
$key = 0;
$pathName = array();
$fileName = array();
foreach($files as $key => $file)
{
if ($file['parent'] == $parent)
{
$treeList[$key] = $file;
$fileName[$key] = $file['name'];
/* Default value is '~', because his ascii code is large in string. */
$pathName[$key] = '~';
$children = $this->buildTree($files, $file['id']);
if($children)
{
$treeList[$key]['children'] = $children;
$fileName[$key] = '';
$pathName[$key] = $file['path'];
}
$key++;
}
}
array_multisort($pathName, SORT_ASC, $fileName, SORT_ASC, $treeList);
return $treeList;
}
/**
* Get front files.
*
* @param array $nodes
* @access public
* @return string
*/
public function getFrontFiles($nodes)
{
$html = '<ul>';
foreach($nodes as $childNode)
{
$html .= "<li class='open'>";
if(isset($childNode['children']))
{
$html .= "<div class='tree-group'>";
$html .= "<i class='module-name icon icon-folder'></i> {$childNode['name']}";
$html .= '</div>';
$html .= $this->getFrontFiles($childNode['children']);
}
else
{
$html .= "<span class='item doc-title text-ellipsis'><i class='file icon icon-file-text-alt'></i> " . html::a('#filePath' . $childNode['key'], $childNode['name'], '', "class='repoFileName' data-path='{$childNode['path']}' title='{$childNode['path']}'") . '</span>';
}
$html .= '</li>';
}
$html .= '</ul>';
return $html;
}
/**
* Get git branch and tag.
*
* @param int $repoID
* @param string $oldRevision
* @param string $newRevision
* @access public
* @return object
*/
public function getBranchesAndTags($repoID, $oldRevision = '0', $newRevision = 'HEAD')
{
$output = new stdClass();
$scm = $this->app->loadClass('scm');
$repo = $this->getRepoByID($repoID);
if(!$repo) return $output;
$scm->setEngine($repo);
$branches = $scm->branch();
$tags = $scm->tags('');
$branchAndtag = array('branch' => $branches, 'tag' =>$tags);
$html = '<ul class="tree tree-angles" data-ride="tree" data-idx="0" id="branchesAndTags">';
foreach($branchAndtag as $type => $data)
{
if(empty($data)) continue;
$html .= "<li data-idx='$type' data-id='$type' class='has-list open in' style='cursor: pointer;'><i class='list-toggle icon'></i>";
$html .= "<div class='hide-in-search'><a class='text-muted' title='{$this->lang->repo->{$type}}'>{$this->lang->repo->{$type}}</a></div><ul data-idx='$type'>";
foreach($data as $name)
{
$selectedSource = $name == $oldRevision ? 'selected-source' : '';
$selectedTarget = $name == $newRevision ? 'selected-target' : '';
$html .= "<li data-idx='$name' data-id='$type-$name'><a href='javascript:;' id='$type-$name' class='$selectedSource $selectedTarget branch-or-tag text-ellipsis' title='$name' data-key='$name'>$name</a></li>";
}
$html .= '</ul></li>';
}
$html .= '</ul>';
$sourceHtml = str_replace('branch-or-tag', 'branch-or-tag source', $html);
$targetHtml = str_replace('branch-or-tag', 'branch-or-tag target', $html);
$output->sourceHtml = str_replace('selected-source', 'selected', $sourceHtml);
$output->targetHtml = str_replace('selected-target', 'selected', $targetHtml);
return $output;
}
/**
* Get relation by commit.
*
* @param int $repoID
* @param string $commit
* @param string $type story|bug|task
* @access public
* @return array
*/
public function getRelationByCommit($repoID, $commit, $type = '')
{
$relationList = $this->dao->select('t1.BID as id, t1.BType as type')->from(TABLE_RELATION)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.AID = t2.id')
->where('t2.revision')->eq($commit)
->andWhere('t2.repo')->eq($repoID)
->andWhere('t1.AType')->eq('revision')
->beginIF($type)->andWhere('t1.BType')->eq($type)->fi()
->fetchAll();
$storyIDs = array();
$bugIDs = array();
$taskIDs = array();
foreach($relationList as $relation)
{
if($relation->type == 'story')
{
$storyIDs[] = $relation->id;
}
elseif($relation->type == 'bug')
{
$bugIDs[] = $relation->id;
}
elseif($relation->type == 'task')
{
$taskIDs[] = $relation->id;
}
}
$stories = empty($storyIDs) ? array() : $this->loadModel('story')->getByList($storyIDs);
$bugs = empty($bugIDs) ? array() : $this->loadModel('bug')->getByList($bugIDs);
$tasks = empty($taskIDs) ? array() : $this->loadModel('task')->getByList($taskIDs);
$titleList = array();
foreach($relationList as $key => $relation)
{
if($type) $key = $relation->id;
$titleList[$key] = array(
'id' => $relation->id,
'type' => $relation->type,
'title' => "#$relation->id "
);
if($relation->type == 'story')
{
$story = zget($stories, $relation->id, array());
$titleList[$key]['title'] .= zget($story, 'title', '');
}
elseif($relation->type == 'bug')
{
$bug = zget($bugs, $relation->id, array());
$titleList[$key]['title'] .= zget($bug, 'title', '');
}
elseif($relation->type == 'task')
{
$task = zget($tasks, $relation->id, array());
$titleList[$key]['title'] .= zget($task, 'name', '');
}
}
return $titleList;
}
/**
* Get relation commit.
*
* @param int $objectID
* @param string $objectType story|bug|task
* @access public
* @return array
*/
public function getCommitsByObject($objectID, $objectType)
{
return $this->dao->select('t2.*')->from(TABLE_RELATION)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.AID = t2.id')
->where('t1.BID')->eq($objectID)
->andWhere('t1.BType')->eq($objectType)
->andWhere('t1.AType')->eq('revision')
->andWhere('t1.relation')->eq('commit')
->fetchAll();
}
/**
* Insert delete record.
*
* @param int $repoID
* @access public
* @return void
*/
public function insertDeleteRecord($repoID)
{
set_time_limit(0);
$repo = $this->loadModel('repo')->getRepoByID($repoID);
if(empty($repo)) return false;
$scm = $this->app->loadClass('scm');
$scm->setEngine($repo);
$values = '';
if($repo->SCM == 'Gitlab')
{
$renameRevisions = $this->dao->select('t1.revision as revisionID,t2.revision')->from(TABLE_REPOFILES)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.revision=t2.id')
->where('t1.action')->eq('R')
->andWhere('t1.repo')->eq($repoID)
->andWhere('t1.oldPath')->eq('')
->orderBy('t2.time desc')
->fetchAll('revisionID');
foreach($renameRevisions as $revision)
{
$files = $scm->getFilesByCommit($revision->revision);
foreach($files as $file)
{
if($file->action != 'R') continue;
$parentPath = dirname($file->oldPath) == '\\' ? '/' : dirname($file->oldPath);
$values .= "($repoID,{$revision->revisionID},'{$file->oldPath}','','$parentPath','{$file->type}','D'),";
$this->dao->update(TABLE_REPOFILES)->set('oldPath')->eq($file->oldPath)->where('revision')->eq($revision->revisionID)->andWhere('path')->eq($file->path)->exec();
}
}
}
else
{
$branchGroups = $this->dao->select('t1.id as fileID,t1.revision as revisionID,t2.revision,t3.branch')->from(TABLE_REPOFILES)->alias('t1')
->leftJoin(TABLE_REPOHISTORY)->alias('t2')->on('t1.revision=t2.id')
->leftJoin(TABLE_REPOBRANCH)->alias('t3')->on('t3.revision=t2.id')
->where('t1.action')->eq('R')
->andWhere('t1.repo')->eq($repoID)
->andWhere('t1.oldPath')->eq('')
->orderBy('t2.time desc')
->fetchGroup('branch');
$revisionPairs = $this->dao->select('revision,id')->from(TABLE_REPOHISTORY)->where('repo')->eq($repoID)->fetchPairs();
foreach($branchGroups as $branch => $group)
{
$firstCommit = end($group);
$commits = $scm->getCommits($firstCommit->revision, 0, $branch);
foreach($commits['files'] as $revision => $commit)
{
if(!isset($revisionPairs[$revision])) continue;
$revisionID = $revisionPairs[$revision];
foreach($commit as $file)
{
if(!$file->oldPath) continue;
$parentPath = dirname($file->oldPath) == '\\' ? '/' : dirname($file->oldPath);
$values .= "($repoID,$revisionID,'{$file->oldPath}','','$parentPath','{$file->type}','D'),";
$this->dao->update(TABLE_REPOFILES)->set('oldPath')->eq($file->oldPath)->where('revision')->eq($revisionID)->andWhere('path')->eq($file->path)->exec();
}
}
}
}
if($values)
{
$sql = 'INSERT INTO ' . TABLE_REPOFILES . ' (`repo`,`revision`,`path`,`oldPath`,`parent`,`type`,`action`) VALUES ' . trim($values, ',');
$result = $this->dao->exec($sql);
}
$this->loadModel('setting')->setItem('system.repo.synced', $this->config->repo->synced . ',' . $repoID);
}
}
@@ -0,0 +1,48 @@
<div id='commit-box' class='open'>
<div class='dropdown-menu commit-show'>
<div class='commit-title'><?php echo $lang->repo->commitInfo;?></div>
<table>
<tr class='empty'>
<th><?php echo $lang->repo->revisionA;?></th>
<td><?php echo html::a($this->repo->createLink('revision', "repoID=$repoID&objectID=0&revision={$commit->revision}"), substr($commit->revision, 0, 10));?></td>
</tr>
<tr class='empty'>
<th><?php echo $lang->repo->committer;?></th>
<td><?php echo $commit->committer;?></td>
</tr>
<tr class='empty'>
<th><?php echo $lang->repo->comment;?></th>
<td title='<?php echo $commit->comment;?>'><?php echo $commit->comment;?></td>
</tr>
<tr class='empty'>
<th><?php echo $lang->repo->time;?></th>
<td><?php echo $commit->time;?></td>
</tr>
<?php $storyIndex = $taskIndex = $bugIndex = 1;?>
<?php $canViewStory = common::hasPriv('story', 'view');?>
<?php $canViewTask = common::hasPriv('task', 'view');?>
<?php $canViewBug = common::hasPriv('bug', 'view');?>
<?php foreach($stories as $storyID => $storyTitle):?>
<tr class='empty'>
<th><?php echo $storyIndex == 1 ? $lang->repo->linkedStory : '';?></th>
<td><?php echo $canViewStory ? html::a($this->createLink('story', 'view', "storyID=$storyID"), "#$storyID $storyTitle") : "#$storyID $storyTitle";?></td>
</tr>
<?php $storyIndex++;?>
<?php endforeach;?>
<?php foreach($tasks as $taskID => $taskName):?>
<tr class='empty'>
<th><?php echo $taskIndex == 1 ? $lang->repo->linkedTask : '';?></th>
<td><?php echo $canViewTask ? html::a($this->createLink('task', 'view', "taskID=$taskID"), "#$taskID $taskName") : "#$taskID $taskName";?></td>
</tr>
<?php $taskIndex++;?>
<?php endforeach;?>
<?php foreach($bugs as $bugID => $bugTitle):?>
<tr class='empty'>
<th><?php echo $bugIndex == 1 ? $lang->repo->linkedBug : '';?></th>
<td><?php echo $canViewBug ? html::a($this->createLink('bug', 'view', "bugID=$bugID"), "#$bugID $bugTitle") : "#$bugID $bugTitle";?></td>
</tr>
<?php $bugIndex++;?>
<?php endforeach;?>
</table>
</div>
</div>
@@ -0,0 +1,365 @@
<?php
/**
* The create view file of repo module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @author Yanyi Cao
* @package repo
* @version $Id: create.html.php $
*/
?>
<?php
include '../../common/view/header.lite.html.php';
$canLinkStory = common::hasPriv('repo', 'linkStory');
$canLinkBug = common::hasPriv('repo', 'linkBug');
$canLinkTask = common::hasPriv('repo', 'linkTask');
$canUnlinkObject = common::hasPriv('repo', 'unlink');
js::set('jsRoot', $jsRoot);
js::set('clientLang', $app->clientLang);
js::set('fileExt', $this->config->repo->fileExt);
js::set('file', $pathInfo);
js::set('blameTmpl', $lang->repo->blamTmpl);
js::set('repoID', $repoID);
js::set('showEditor', $showEditor);
js::set('canLinkStory', $canLinkStory);
js::set('canLinkBug', $canLinkBug);
js::set('canLinkTask', $canLinkTask);
js::set('objectID', 0);
js::set('objectType', 'story');
js::set('pageType', $type);
js::set('revision', $revision);
js::set('sourceRevision', $oldRevision);
js::set('encodePath', $this->repo->encodePath($entry));
if($showEditor) js::set('codeContent', $content);
js::import($jsRoot . '/zui/tabs/tabs.min.js');
js::import($jsRoot . 'monaco-editor/min/vs/loader.js');
?>
<div id="monacoEditor" class='repoCode'>
<?php if(strpos($config->repo->images, "|$suffix|") !== false):?>
<div class='image'><img src='data:image/<?php echo $suffix?>;base64,<?php echo $content?>' /></div>
<?php elseif($suffix == 'binary'):?>
<div class='binary'><?php echo html::a($this->repo->createLink('download', "repoID=$repoID&path=" . $this->repo->encodePath($entry) . "&fromRevision=$revision"), "<i class='icon-download'></i>", 'hiddenwin', "title='{$lang->repo->download}'"); ?></div>
<?php else:?>
<div id="codeContainer"></div>
<?php endif;?>
<div id="log">
<div class="tip"></div>
<div class="history"></div>
</div>
<div id="related">
<div class="main-col main">
<div class="content panel">
<div class='btn-toolbar'>
<div class="btn btn-left pull-left"><i class="icon icon-chevron-left"></i></div>
<?php if($canLinkStory or $canLinkBug or $canLinkTask or $canUnlinkObject):?>
<div class="dropdown pull-right">
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
<ul class="dropdown-menu">
<?php
if($canLinkStory) echo '<li id="linkStory">' . html::a('javascript:;', '<i class="icon icon-lightbulb"></i> ' . $lang->repo->linkStory) . '</li>';
if($canLinkBug) echo '<li id="linkBug">' . html::a('javascript:;', '<i class="icon icon-bug"></i> ' . $lang->repo->linkBug) . '</li>';
if($canLinkTask) echo '<li id="linkTask">' . html::a('javascript:;', '<i class="icon icon-todo"></i> ' . $lang->repo->linkTask) . '</li>';
if($canUnlinkObject) echo '<li id="unlink">' . html::a('javascript:;', '<i class="icon icon-unlink"></i> ' . $lang->repo->unlink) . '</li>';
?>
</ul>
</div>
<?php endif;?>
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
<div class='panel-title'>
<div class="tabs w-10" id="relationTabs"></div>
</div>
</div>
</div>
</div>
<div class="table-empty-tip">
<p><?php echo $lang->repo->notRelated;?></p>
</div>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
<script>
var editor = null;
var modifiedEditor = null;
var diffContent = null;
var blames = null;
var globalCommit = '';
var codeHeight = $(window).innerHeight() - $('#mainHeader').height() - $('#appsBar').height() - $('#fileTabs .tabs-navbar').height();
if(codeHeight > 0) $.cookie('codeContainerHeight', codeHeight);
$('#codeContainer').css('height', $.cookie('codeContainerHeight'));
/**
* Get relation by commit.
*
* @param string $commit
* @access public
* @return void
*/
function getRelation(commit)
{
$('.table-empty-tip').show();
$('#codeContainer').css('height', codeHeight / 5 * 3);
var relatedHeight = codeHeight / 5 * 2 - $('#log').height() - 10;
$('#related').css('height', relatedHeight);
$tabs = $('#relationTabs').data('zui.tabs');
if($tabs) $tabs.closeAll();
$.post(createLink('repo', 'ajaxGetCommitRelation', 'repoID=' + repoID + '&commit=' + commit), function(data)
{
var titleList = JSON.parse(data).titleList;
var tabs = [];
$.each(titleList, function(i, titleObj)
{
var tab = setTab(titleObj);
if($tabs)
{
$tabs.open(tab);
}
else
{
tabs.push(tab);
}
});
if(titleList.length > 0)
{
if($tabs)
{
$tabs.open(setTab(titleList[0]));
}
else
{
$('#relationTabs').tabs({tabs: tabs});
}
$('.table-empty-tip').hide();
$('#unlink').show();
$('#related button').show();
}
else
{
$('#unlink').hide();
if(!canLinkStory && !canLinkBug && !canLinkTask) $('#related button').hide();
}
arrowTabs('relationTabs', 1);
});
globalCommit = commit;
var linkStory = createLink('repo', 'linkStory', 'repoID=' + repoID + '&commit=' + commit, '', true);
var linkBug = createLink('repo', 'linkBug', 'repoID=' + repoID + '&commit=' + commit, '', true);
var linkTask = createLink('repo', 'linkTask', 'repoID=' + repoID + '&commit=' + commit, '', true);
$('#linkStory a').attr('data-link', linkStory);
$('#linkBug a').attr('data-link', linkBug);
$('#linkTask a').attr('data-link', linkTask);
$('#related').show();
}
/**
* Set tab data.
*
* @param object $titleObj
* @access public
* @return object
*/
function setTab(titleObj)
{
return {
id: titleObj.type + '-' + titleObj.id,
title: titleObj.title,
icon: titleObj.type == 'story' ? 'icon-lightbulb text-primary' : (titleObj.type == 'task' ? 'icon-check-sign text-info' : 'icon-bug text-red'),
type: 'iframe',
url: createLink('repo', 'ajaxGetRelationInfo', 'objectID=' + titleObj.id + '&objectType=' + titleObj.type)
};
}
/**
* Update diff editor inline style.
*
* @param bool display
* @access public
* @return void
*/
function updateEditorInline(display){
modifiedEditor.updateOptions({renderSideBySide: display});
}
/**
* Show commit info.
*
* @access public
* @return void
*/
function showCommitInfo()
{
var link = createLink('repo', 'ajaxGetCommitInfo');
var data = {
repoID : repoID,
entry : encodePath,
revision : revision,
sourceRevision: sourceRevision,
line : 0,
returnType : 'json'
};
$.post(link, data, function(res)
{
res = JSON.parse(res);
blames = res.blames;
})
}
/**
* Show blame info and relations.
*
* @param int line
* @access public
* @return void
*/
function showBlameAndRelation(line)
{
if(!blames) return;
if(pageType == 'diff') line = diffContent.line.new[line -1];
var blame = blames[line];
if(!blame) return;
var p_line = parseInt(line);
while(!blame.revision)
{
p_line--;
blame = blames[p_line];
}
if($('#log').data('line') == p_line) return;
var time = blame.time != 'unknown' ? blame.time : '';
var user = blame.committer != 'unknown' ? blame.committer : '';
var version = blame.revision.toString().substring(0, 10);
var content = blameTmpl.replace('%time', time).replace('%name', user).replace('%version', version).replace('%comment', blame.message);
$('.history').text(content);
$('#log').data('line', p_line);
$('#log').css('display', 'flex');
getRelation(blame.revision);
}
$(function()
{
$('.btn-left').click(function() {arrowTabs('relationTabs', 1);});
$('.btn-right').click(function() {arrowTabs('relationTabs', -2);});
if(showEditor)
{
require.config({
paths: {vs: jsRoot + 'monaco-editor/min/vs'},
'vs/nls': {
availableLanguages: {
'*': clientLang
}
}
});
require(['vs/editor/editor.main'], function ()
{
var lang = 'php';
$.each(fileExt, function(langName, ext)
{
if(ext.indexOf('.' + file.extension) !== -1) lang = langName;
});
if(pageType == 'diff')
{
diffContent = parent.getDiffs(file.dirname + '/' + file.basename);
modifiedEditor = monaco.editor.createDiffEditor(document.getElementById('codeContainer'),
{
readOnly: true,
language: lang,
autoIndent: true,
inDiffEditor: true,
contextmenu: true,
automaticLayout: true,
renderSideBySide: true,
EditorMinimapOptions: {enabled: false},
lineNumbers: function(number)
{
var newlc = diffContent.line.new;
var oldlc = diffContent.line.old;
return newlc[number - 1];
}
});
modifiedEditor.setModel({
original: monaco.editor.createModel(diffContent.code.old.trim("\n"), lang),
modified: monaco.editor.createModel(diffContent.code.new.trim("\n"), lang),
});
editor = modifiedEditor.getModifiedEditor();
var getOriginalEditor = modifiedEditor.getOriginalEditor();
getOriginalEditor.onMouseDown(function(obj)
{
showBlameAndRelation(obj.target.position.lineNumber);
})
}
else
{
editor = monaco.editor.create(document.getElementById('codeContainer'),
{
value: codeContent.toString(),
language: lang,
readOnly: true,
autoIndent: true,
contextmenu: true,
automaticLayout: true,
EditorMinimapOptions: {enabled: false}
});
}
editor.onMouseDown(function(obj)
{
showBlameAndRelation(obj.target.position.lineNumber);
})
});
}
$('#linkStory a, #linkBug a, #linkTask a').on('click', function()
{
var link = $(this).attr('data-link');
parent.loadLinkPage(link);
});
$('#unlink a').on('click', function()
{
var link = $(this).attr('data-link');
$.post(link, function(data)
{
data = JSON.parse(data);
if(data.result)
{
getRelation(data.revision);
}
else
{
alert(data.message);
}
})
})
$('#relationTabs').on('onOpen', function(event, tab)
{
$('#tab-nav-item-' + tab.id).attr('title', tab.title);
var objectInfo = tab.id.split('-');
objectID = objectInfo[0];
objectType = objectInfo[1];
$('#unlink a').attr('data-link', createLink('repo', 'unlink', 'repoID=' + repoID + '&commit=' + globalCommit + '&objectID=' + objectID + '&objectType=' + objectType));
var relatedHeight = codeHeight / 5 * 2 - $('#log').height() - 45;
$('#relationTabs iframe').css('height', relatedHeight);
});
/* Get file commits. */
showCommitInfo();
});
</script>
@@ -0,0 +1,51 @@
<?php
/**
* The create view file of repo module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @author Yanyi Cao
* @package repo
* @version $Id: ajaxgetcommitrelation.html.php $
*/
?>
<?php
include '../../common/view/header.lite.html.php';
?>
<div class="main-col linkContent main">
<div class="content pane">
<div class="fade main-row split-row in col-md-12">
<div class="left-content col-md-8">
<table class="menu-title">
<?php if($objectType == 'story'):?>
<tr><th class='text-right'><?php echo $lang->release->storyTitle;?>: </th><td class="text"><?php echo $object->title; ?></td></tr>
<tr><th class='text-right'><?php echo $lang->story->legendSpec;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->spec; ?></div></td></tr>
<tr><th class='text-right'><?php echo $lang->story->verify;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->verify; ?></div></td></tr>
<?php elseif($objectType == 'task'):?>
<tr><th class='text-right'><?php echo $lang->task->name;?>: </th><td class="text"><?php echo $object->name; ?></td></tr>
<tr><th class='text-right'><?php echo $lang->task->desc;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->desc; ?></div></td></tr>
<tr><th class='text-right'><?php echo $lang->task->story;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->storyTitle; ?></div></td></tr>
<?php elseif($objectType == 'bug'):?>
<tr><th class='text-right'><?php echo $lang->bug->title;?>: </th><td class="text"><?php echo $object->title; ?></td></tr>
<tr><th class='text-right'><?php echo $lang->bug->type;?>: </th><td class="text"><?php echo zget($lang->bug->typeList, $object->type); ?></td></tr>
<tr><th class='text-right'><?php echo $lang->bug->steps;?>: </th><td class="text"><div class="detail-content article-content"><?php echo $object->steps; ?></div></td></tr>
<?php endif;?>
</table>
</div>
<div class="main-col right-content col-md-4">
<?php include '../../common/view/action.html.php';?>
</div>
</div>
</div>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
<script>
$(function()
{
$('a').each(function()
{
var content = $(this).html();
$(this).replaceWith(content);
})
$('blockquote a').empty();
});
</script>
+1
View File
@@ -13,6 +13,7 @@
<?php js::set('branch', $branchID);?>
<?php js::set('lang', $lang->repo);?>
<?php js::set('cloneUrl', $cloneUrl);?>
<?php js::set('syncedRF', $syncedRF);?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php if(!empty($branchesAndTags)):?>
+8
View File
@@ -11,6 +11,10 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/form.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php
$browser = helper::getBrowser();
js::set('browser', $browser);
?>
<?php if(!isonlybody()):?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
@@ -55,6 +59,7 @@
</div>
</div>
<?php endif;?>
<?php if($browser == 'ie'):?>
<div class="repo panel">
<div class='panel-heading'>
<form method='post'>
@@ -154,6 +159,9 @@
</div>
<?php endforeach?>
</div>
<?php else:?>
<?php include 'diffeditor.html.php';?>
<?php endif;?>
<div class='revisions hidden'>
<?php
if(strpos($repo->SCM, 'Subversion') === false)
+50
View File
@@ -0,0 +1,50 @@
<?php
js::import($jsRoot . '/zui/tabs/tabs.min.js');
js::import($jsRoot . 'misc/base64.js');
$entry = count($diffs) ? $diffs[0]->fileName : '';
$file = $entry ? pathinfo($entry) : array();
js::set('diffs', $diffs);
js::set('file', $file);
js::set('entry', $entry);
js::set('openedFiles', array($entry));
js::set('urlParams', "repoID=$repoID&objectID=$objectID&entry=%s&oldRevision=$oldRevision&newRevision=$newRevision&showBug=$showBug&encoding=$encoding");
?>
<?php if(!isonlybody()):?>
<div id="mainContent" class="main-row fade">
<?php $sideWidth = common::checkNotCN() ? '270' : '240';?>
<div class="side-col" style="width: <?php echo $sideWidth;?>px; padding-top: <?php echo isonlybody() ? 22 : 0;?>px;">
<div class="side-col file-tree" style="width: <?php echo $sideWidth;?>px;" data-min-width="<?php echo $sideWidth;?>">
<div id="filesTree" class="cell load-indicator <?php if(isonlybody()) echo 'pull-left';?>">
<?php echo $this->repo->getFileTree($repo, '', $diffs);?>
</div>
</div>
</div>
<?php endif;?>
<div class="main-col repoCode main">
<div class="content panel">
<div class='btn-toolbar'>
<?php if(!isonlybody()):?>
<div class="btn btn-left pull-left"><i class="icon icon-chevron-left"></i></div>
<div class="dropdown pull-right">
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
<ul class="dropdown-menu">
<?php
if(common::hasPriv('repo', 'download')) echo '<li>' . html::a($this->repo->createLink('download', "repoID=$repoID&path=" . $this->repo->encodePath($entry) . "&fromRevison=$oldRevision&toRevision=$newRevision&type=path"), '<i class="icon icon-download"></i> ' . $lang->repo->downloadDiff, 'hiddenwin') . '</li>';
echo '<li>' . html::a('javascript:;', '<i class="icon icon-download"></i> ' . $lang->repo->viewDiffList['inline'], '', "class='inline-appose' id='inline'") . '</li>';
echo '<li>' . html::a('javascript:;', '<i class="icon icon-download"></i> ' . $lang->repo->viewDiffList['appose'], '', "class='inline-appose' id='appose'") . '</li>';
?>
</ul>
</div>
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
<?php endif;?>
<div class='panel-title'>
<div class="tabs w-10" id="fileTabs"></div>
</div>
</div>
</div>
</div>
<?php if(!isonlybody()):?>
</div>
<?php endif;?>
<a href='' class='iframe' data-width='90%' id='linkObject'></a>
+85
View File
@@ -0,0 +1,85 @@
<?php
/**
* The link bug view of productplan module of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package mr
* @version $Id: linkbug.html.php$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<style>
#queryBox {padding-top: 25px;}
</style>
<div class='main-content' id='mainContent'>
<div id='queryBox' data-module='bug' class='show no-margin'></div>
<div id='unlinkBugList'>
<form class='main-table table-bug' data-ride='table' method='post' id='unlinkedBugsForm' target='hiddenwin' action='<?php echo $this->createLink('repo', 'linkBug', "repoID=$repoID&revision=$revision&browseType=$browseType&param=$param&orderBy=$orderBy")?>'>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedBugs;?>
</div>
<table class='table tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($allBugs):?>
<div class="checkbox-primary check-all tablesorter-noSort" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->assignedToAB;?></th>
<th class='c-status'><?php echo $lang->bug->status;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php $unlinkedCount = 0;?>
<?php foreach($allBugs as $bug):?>
<tr>
<td class='c-id text-left'>
<?php echo html::checkbox('bugs', array($bug->id => sprintf('%03d', $bug->id)));?>
</td>
<td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo zget($users, $bug->assignedTo);?></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'>
<?php echo $this->processStatus('bug', $bug);?>
</span>
</td>
</tr>
<?php $unlinkedCount++;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->productplan->linkBug, '', 'btn');?>
</div>
<?php endif;?>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<iframe frameborder="0" name="hiddenwin" id="hiddenwin" scrolling="no" class="debugwin hidden"></iframe>
</div>
</div>
<script>
$(function()
{
$('#unlinkBugList .tablesorter').sortTable();
setForm();
});
</script>
+93
View File
@@ -0,0 +1,93 @@
<?php
/**
* The link story view of repo module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author yuchun li
* @package repo
* @version $Id: linkstory.html.php 5096 2022-07-25 07:02:43Z liycuhun@easycorp.ltd $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<div class='main-content' id='mainContent'>
<div id='queryBox' data-module='story' class='show no-margin'></div>
<form class="main-table table-story" data-ride="table" method="post" target='hiddenwin' id='linkStoryForm' action="<?php echo $this->createLink('repo', 'linkStory', "repoID=$repoID&revision=$revision&browseType=$browseType&param=$param&orderBy=$orderBy")?>">
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedStories;?>
</div>
<table class='table tablesorter'>
<thead>
<tr>
<th class='c-id text-left'>
<?php if($allStories):?>
<div class="checkbox-primary check-all tablesorter-noSort" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='c-plan'><?php echo $lang->story->plan;?></th>
<th class='c-module'><?php echo $lang->story->module;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->assignedToAB;?></th>
<th class='c-number text-right'><?php echo $lang->story->estimateAB;?></th>
<th class='c-status'><?php echo $lang->statusAB;?></th>
<th class='c-stage'><?php echo $lang->story->stageAB;?></th>
</tr>
</thead>
<tbody>
<?php $unlinkedCount = 0;?>
<?php foreach($allStories as $story):?>
<tr>
<td class='c-id text-left'>
<?php echo html::checkbox('stories', array($story->id => sprintf('%03d', $story->id)));?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri)?></span></td>
<td><?php echo $story->planTitle;?></td>
<td title='<?php echo zget($modules, $story->module, '/')?>' class='text-left'><?php echo zget($modules, $story->module, '/');?></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label label-badge label-light' title={$lang->story->children}>{$lang->story->childrenAB}</span>";
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td class='text-right'title="<?php echo $story->estimate . ' ' . $lang->hourCommon;?>"><?php echo $story->estimate . $config->hourUnit;?></td>
<td>
<span class='status-story status-<?php echo $story->status?>'>
<?php echo $this->processStatus('story', $story);?>
</span>
</td>
<td class='text-center'><?php echo $lang->story->stageList[$story->stage];?></td>
</tr>
<?php $unlinkedCount++;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->productplan->linkStory, '', 'btn');?>
</div>
<?php endif;?>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<iframe frameborder="0" name="hiddenwin" id="hiddenwin" scrolling="no" class="debugwin hidden"></iframe>
</div>
<script>
$(function()
{
$('#unlinkStoryList .tablesorter').sortTable();
setForm();
});
</script>
+85
View File
@@ -0,0 +1,85 @@
<?php
/**
* The link task view of repo module of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yuchun Li <liyuchun@easycorp.ltd>
* @package repo
* @version $Id: linktask.html.php$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/sortable.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<style>
#queryBox {padding-top: 25px;}
</style>
<div class='main-content' id='mainContent'>
<div id='queryBox' data-module='task' class='show no-margin'></div>
<div id='unlinkTaskList'>
<form class='main-table table-task' data-ride='table' method='post' id='unlinkedTasksForm' target='hiddenwin' action='<?php echo $this->createLink('repo', 'linkTask', "repoID=$repoID&revision=$revision&browseType=$browseType&param=$param&orderBy=$orderBy")?>'>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->repo->unlinkedTasks;?>
</div>
<table class='table tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($allTasks):?>
<div class="checkbox-primary check-all tablesorter-noSort" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri' title=<?php echo $lang->pri;?>><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->task->name;?></th>
<th class='c-user'><?php echo $lang->task->finishedByAB;?></th>
<th class='c-user'><?php echo $lang->task->assignedToAB;?></th>
<th class='c-status'><?php echo $lang->task->status;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php $unlinkedCount = 0;?>
<?php foreach($allTasks as $task):?>
<tr>
<td class='c-id text-left'>
<?php echo html::checkbox('tasks', array($task->id => sprintf('%03d', $task->id)));?>
</td>
<td><span class='label-pri label-pri-<?php echo $task->pri;?>' title='<?php echo zget($lang->task->priList, $task->pri, $task->pri)?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
<td class='text-left nobr' title='<?php echo $task->name?>'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), $task->name, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
<td><?php echo zget($users, $task->finishedBy);?></td>
<td><?php echo zget($users, $task->assignedTo);?></td>
<td>
<span class='status-task status-<?php echo $task->status?>'>
<?php echo $this->processStatus('task', $task);?>
</span>
</td>
</tr>
<?php $unlinkedCount++;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->repo->linkTask, '', 'btn');?>
</div>
<?php endif;?>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
<iframe frameborder="0" name="hiddenwin" id="hiddenwin" scrolling="no" class="debugwin hidden"></iframe>
</div>
</div>
<script>
$(function()
{
$('#unlinkTaskList .tablesorter').sortTable();
setForm();
});
</script>
+82
View File
@@ -0,0 +1,82 @@
<?php
/**
* The create view file of repo module of ZenTaoPMS.
*
* @copyright Copyright 2009-2012 青岛易软天创网络科技有限公司 (QingDao Nature Easy Soft Network Technology Co,LTD www.cnezsoft.com)
* @author Wang Yidong, Zhu Jinyong
* @package repo
* @version $Id: create.html.php $
*/
?>
<?php
include '../../common/view/header.html.php';
js::import($jsRoot . '/zui/tabs/tabs.min.js');
js::import($jsRoot . 'misc/base64.js');
js::set('entry', $entry);
js::set('repoID', $repoID);
js::set('repo', $repo);
js::set('revision', $revision);
js::set('branchID', $branchID);
js::set('file', $pathInfo);
js::set('openedFiles', array($entry));
js::set('urlParams', "repoID=$repoID&objectID=$objectID&entry=%s&revision=$revision&showBug=$showBug&encoding=$encoding");
$encodePath = $this->repo->encodePath($entry);
?>
<?php if(!isonlybody()):?>
<div id="mainContent" class="main-row fade">
<?php $sideWidth = common::checkNotCN() ? '270' : '240';?>
<div class="side-col" style="width: <?php echo $sideWidth;?>px; padding-top: <?php echo isonlybody() ? 22 : 0;?>px;">
<div class="side-col file-tree" style="width: <?php echo $sideWidth;?>px;" data-min-width="<?php echo $sideWidth;?>">
<div id="filesTree" class="cell load-indicator <?php if(isonlybody()) echo 'pull-left';?>">
<div class='btn-group' id='sourceSwapper'>
<button data-toggle='dropdown' type='button' class='btn btn-link repo-select text-ellipsis' title='<?php echo $branchID;?>'>
<span class='text version-name pull-left text-ellipsis'><?php echo $branchID;?></span>
<span class='caret pull-right' style='margin-bottom: -1px'></span>
</button>
<div id='dropMenuSource' class='dropdown-menu search-list' data-ride='searchList' data-url=''>
<div class="input-control search-box has-icon-left has-icon-right search-example">
<input type="search" class="form-control search-input" id="searchSource" />
<label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
</div>
<div class="table-row">
<div class="table-col col-left">
<div class="list-group" id="branchList"></div>
</div>
</div>
</div>
</div>
<?php echo $this->repo->getFileTree($repo);?>
</div>
</div>
</div>
<?php endif;?>
<div class="main-col repoCode main">
<div class="content panel">
<div class='btn-toolbar'>
<?php if(!isonlybody()):?>
<div class="btn btn-left pull-left"><i class="icon icon-chevron-left"></i></div>
<?php if(common::hasPriv('repo', 'blame') or common::hasPriv('repo', 'download')):?>
<div class="dropdown pull-right">
<button class="btn" type="button" data-toggle="context-dropdown"><i class="icon icon-ellipsis-v icon-rotate-90"></i></button>
<ul class="dropdown-menu">
<?php
if(common::hasPriv('repo', 'blame')) echo '<li>' . html::a($this->repo->createLink('blame', "repoID=$repoID&objectID=$objectID&entry=$encodePath&revision=$revision&encoding=$encoding"), '<i class="icon icon-blame"></i> ' . $lang->repo->blame, '', "data-app='{$app->tab}'") . '</li>';
if(common::hasPriv('repo', 'download')) echo '<li>' . html::a($this->repo->createLink('download', "repoID=$repoID&path=$encodePath&fromRevision=$revision"), '<i class="icon icon-download"></i> ' . $lang->repo->download, 'hiddenwin') . '</li>';
?>
</ul>
</div>
<?php endif;?>
<div class="btn btn-right pull-right"><i class="icon icon-chevron-right"></i></div>
<?php endif;?>
<div class='panel-title'>
<div class="tabs w-10" id="fileTabs"></div>
</div>
</div>
</div>
</div>
<?php if(!isonlybody()):?>
</div>
<?php endif;?>
<a href='' class='iframe' data-width='90%' id='linkObject'></a>
<?php include '../../common/view/footer.html.php';?>
+2
View File
@@ -1245,6 +1245,7 @@ class story extends control
$fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch();
$cases = $this->dao->select('id,title,status,pri')->from(TABLE_CASE)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
$linkedMRs = $this->loadModel('mr')->getLinkedMRPairs($storyID, 'story');
$linkedCommits = $this->loadModel('repo')->getCommitsByObject($storyID, 'story');
$modulePath = $this->tree->getParents($story->module);
$storyModule = empty($story->module) ? '' : $this->tree->getById($story->module);
$linkedStories = isset($story->linkStoryTitles) ? array_keys($story->linkStoryTitles) : array();
@@ -1292,6 +1293,7 @@ class story extends control
$this->view->cases = $cases;
$this->view->story = $story;
$this->view->linkedMRs = $linkedMRs;
$this->view->linkedCommits = $linkedCommits;
$this->view->track = $this->story->getTrackByID($story->id);
$this->view->users = $this->user->getPairs('noletter');
$this->view->reviewers = $reviewers;
+2 -1
View File
@@ -4,7 +4,7 @@
#legendStories ul li:last-child {display: block;}
.main-actions .btn-toolbar .btn {padding-right: 6px; padding-left: 6px;}
.btn-edit-comment {z-index: 100;}
#legendRelated .table-data tbody>tr>th {width: 90px;}
#legendRelated .table-data tbody>tr>th {width: 100px;}
#legendStories .list-unstyled li a {padding: 6px;}
#legendStories .list-unstyled li a:not(.removeButton) {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;}
[lang^='zh'] #legendStories .list-unstyled li:last-child {padding: 6px 12px;}
@@ -13,3 +13,4 @@
.linkStoryTr > td {padding-left: 0px !important;}
.removeButton {margin-left: -10px;}
.resolution {white-space: nowrap; overflow: hidden;}
.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
+3
View File
@@ -181,6 +181,7 @@ $lang->story->completeRate = 'Completion Rate';
$lang->story->reviewed = 'Reviewed';
$lang->story->toBeReviewed = 'To Be Reviewed';
$lang->story->linkMR = 'Related MRs';
$lang->story->linkCommit = 'Related Commits';
$lang->story->ditto = 'Dito';
$lang->story->dittoNotice = 'Die Story gehört nicht zum Projekt wie die vorherige!';
@@ -335,6 +336,8 @@ $lang->story->action->linked2build = array('main' => '$date, verknüpft
$lang->story->action->unlinkedfrombuild = array('main' => '$date, Verknüpfung aufgelöst durch <strong>$actor</strong> von Build <strong>$extra</strong>.');
$lang->story->action->linked2release = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Release <strong>$extra</strong>');
$lang->story->action->unlinkedfromrelease = array('main' => '$date, Verknüpfung aufgelöst durch <strong>$actor</strong> von Release <strong>$extra</strong>.');
$lang->story->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->linkrelatedstory = array('main' => '$date, verknüpft von <strong>$actor</strong> mit Story <strong>$extra</strong>.');
$lang->story->action->subdividestory = array('main' => '$date, aufgeteilt von <strong>$actor</strong> mit Story <strong>$extra</strong>.');
$lang->story->action->unlinkrelatedstory = array('main' => '$date, Verknüpfung aufgelöst durch <strong>$actor</strong> von Story <strong>$extra</strong>.');
+3
View File
@@ -181,6 +181,7 @@ $lang->story->completeRate = 'Completion Rate';
$lang->story->reviewed = 'Reviewed';
$lang->story->toBeReviewed = 'To Be Reviewed';
$lang->story->linkMR = 'Related MRs';
$lang->story->linkCommit = 'Related Commits';
$lang->story->ditto = 'Ditto';
$lang->story->dittoNotice = 'This story is not linked to the same product as the last one is!';
@@ -335,6 +336,8 @@ $lang->story->action->linked2build = array('main' => '$date, linked by
$lang->story->action->unlinkedfrombuild = array('main' => '$date, unlinked by <strong>$actor</strong> from Build <strong>$extra</strong>.');
$lang->story->action->linked2release = array('main' => '$date, linked by <strong>$actor</strong> to Release <strong>$extra</strong>');
$lang->story->action->unlinkedfromrelease = array('main' => '$date, unlinked by <strong>$actor</strong> from Release <strong>$extra</strong>.');
$lang->story->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->linkrelatedstory = array('main' => '$date, linked by <strong>$actor</strong> to Story <strong>$extra</strong>.');
$lang->story->action->subdividestory = array('main' => '$date, decomposed by <strong>$actor</strong> to Story <strong>$extra</strong>.');
$lang->story->action->unlinkrelatedstory = array('main' => '$date, unlinked by <strong>$actor</strong> from Story <strong>$extra</strong>.');
+3
View File
@@ -181,6 +181,7 @@ $lang->story->completeRate = 'Completion Rate';
$lang->story->reviewed = 'Reviewed';
$lang->story->toBeReviewed = 'To Be Reviewed';
$lang->story->linkMR = 'Related MRs';
$lang->story->linkCommit = 'Related Commits';
$lang->story->ditto = 'Idem';
$lang->story->dittoNotice = "La story n'est pas associée au même product que la précédente !";
@@ -335,6 +336,8 @@ $lang->story->action->linked2build = array('main' => '$date, intégrée
$lang->story->action->unlinkedfrombuild = array('main' => '$date, retirée par <strong>$actor</strong> du Build <strong>$extra</strong>.');
$lang->story->action->linked2release = array('main' => '$date, ajoutée par <strong>$actor</strong> à la Release <strong>$extra</strong>');
$lang->story->action->unlinkedfromrelease = array('main' => '$date, retirée par <strong>$actor</strong> de la Release <strong>$extra</strong>.');
$lang->story->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->linkrelatedstory = array('main' => '$date, associée par <strong>$actor</strong> à la Story <strong>$extra</strong>.');
$lang->story->action->subdividestory = array('main' => '$date, décomposée par <strong>$actor</strong> en Story <strong>$extra</strong>.');
$lang->story->action->unlinkrelatedstory = array('main' => '$date, dissociée par <strong>$actor</strong> de la Story <strong>$extra</strong>.');
+3
View File
@@ -175,6 +175,7 @@ $lang->story->completeRate = 'Completion Rate';
$lang->story->reviewed = 'Reviewed';
$lang->story->toBeReviewed = 'To Be Reviewed';
$lang->story->linkMR = 'Related MRs';
$lang->story->linkCommit = 'Related Commits';
$lang->story->ditto = 'Như trên';
$lang->story->dittoNotice = 'Câu chuyện này chưa liên kết tới cùng sản phẩm bởi bởi vì nó là cuối cùng!';
@@ -327,6 +328,8 @@ $lang->story->action->linked2build = array('main' => '$date, liên kế
$lang->story->action->unlinkedfrombuild = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ bản dựng <strong>$extra</strong>.');
$lang->story->action->linked2release = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Phát hành <strong>$extra</strong>');
$lang->story->action->unlinkedfromrelease = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Phát hành <strong>$extra</strong>.');
$lang->story->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>');
$lang->story->action->linkrelatedstory = array('main' => '$date, liên kết bởi <strong>$actor</strong> tới Câu chuyện <strong>$extra</strong>.');
$lang->story->action->subdividestory = array('main' => '$date, được phân rã bởi <strong>$actor</strong> tới Câu chuyện <strong>$extra</strong>.');
$lang->story->action->unlinkrelatedstory = array('main' => '$date, bị hủy bởi <strong>$actor</strong> từ Câu chuyện <strong>$extra</strong>.');
+3
View File
@@ -181,6 +181,7 @@ $lang->story->completeRate = '完成率';
$lang->story->reviewed = '已评审';
$lang->story->toBeReviewed = '待评审';
$lang->story->linkMR = '相关合并请求';
$lang->story->linkCommit = '相关代码版本';
$lang->story->ditto = '同上';
$lang->story->dittoNotice = "该{$lang->SRCommon}与上一{$lang->SRCommon}不属于同一产品!";
@@ -335,6 +336,8 @@ $lang->story->action->linked2build = array('main' => '$date, 由 <stron
$lang->story->action->unlinkedfrombuild = array('main' => '$date, 由 <strong>$actor</strong> 从版本 <strong>$extra</strong> 移除。');
$lang->story->action->linked2release = array('main' => '$date, 由 <strong>$actor</strong> 关联到发布 <strong>$extra</strong>。');
$lang->story->action->unlinkedfromrelease = array('main' => '$date, 由 <strong>$actor</strong> 从发布 <strong>$extra</strong> 移除。');
$lang->story->action->linked2revision = array('main' => '$date, 由 <strong>$actor</strong> 关联到代码提交 <strong>$extra</strong>');
$lang->story->action->unlinkedfromrevision = array('main' => '$date, 由 <strong>$actor</strong> 取消关联到代码提交 <strong>$extra</strong>');
$lang->story->action->linkrelatedstory = array('main' => "\$date, 由 <strong>\$actor</strong> 关联相关{$lang->SRCommon} <strong>\$extra</strong>。");
$lang->story->action->subdividestory = array('main' => "\$date, 由 <strong>\$actor</strong> 细分为{$lang->SRCommon} <strong>\$extra</strong>。");
$lang->story->action->unlinkrelatedstory = array('main' => "\$date, 由 <strong>\$actor</strong> 移除相关{$lang->SRCommon} <strong>\$extra</strong>。");
+23
View File
@@ -574,6 +574,29 @@
</ul>
</td>
</tr>
<tr>
<th><?php echo $lang->story->linkCommit;?></th>
<td class='pd-0'>
<ul class='list-unstyled'>
<?php
$canViewRevision = common::hasPriv('repo', 'revision');
foreach($linkedCommits as $commit)
{
$revision = substr($commit->revision, 0, 10);
$commitTitle = $revision . ' ' . $commit->comment;
if($canViewRevision)
{
echo "<li class='link-commit' title='$commitTitle'>" . html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), $revision) . ' ' . $commit->comment . '</li>';
}
else
{
echo "<li class='link-commit' title='$commitTitle'>" . "$commitTitle" . '</li>';
}
}
?>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
+1
View File
@@ -989,6 +989,7 @@ class task extends control
$this->view->product = $this->tree->getProduct($task->module);
$this->view->modulePath = $this->tree->getParents($task->module);
$this->view->linkMRTitles = $this->loadModel('mr')->getLinkedMRPairs($taskID, 'task');
$this->view->linkCommits = $this->loadModel('repo')->getCommitsByObject($taskID, 'task');
$this->display();
}
+2 -1
View File
@@ -1,8 +1,9 @@
.side-col .cell {padding: 0px;}
.side-col #legendProjectAndTask .list-unstyled {padding: 10px; border: 1px solid #ddd; border-top: 0px; margin: 0px;}
.tab-pane table {border: 1px solid #ddd; border-top: none;}
.MRThWidth {width: 90px !important;}
.MRThWidth {width: 100px !important;}
.btn-edit-comment {z-index: 100;}
.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;}
#assignedTo a {border-color: transparent;}
#assignedTo a:hover {border-color: rgba(0,0,0,.2);}
+5
View File
@@ -177,6 +177,7 @@ $lang->task->noClosed = 'Niht geschlossen';
$lang->task->yesterdayFinished = 'Gestern abgeschlossen';
$lang->task->allTasks = 'Alle Aufgaben';
$lang->task->linkMR = 'Related MRs';
$lang->task->linkCommit = 'Related Commits';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = 'Wartend';
@@ -221,6 +222,10 @@ $lang->task->legendDesc = 'Aufgabenbeschreibung';
$lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
$lang->task->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?";
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
+5
View File
@@ -177,6 +177,7 @@ $lang->task->noClosed = 'Unclosed';
$lang->task->yesterdayFinished = 'Task Finished Yesterday';
$lang->task->allTasks = 'Task';
$lang->task->linkMR = 'Related MRs';
$lang->task->linkCommit = 'Related Commits';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = 'Waiting';
@@ -221,6 +222,10 @@ $lang->task->legendDesc = 'Task Description';
$lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
$lang->task->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->confirmDelete = "Do you want to delete this task?";
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
+5
View File
@@ -177,6 +177,7 @@ $lang->task->noClosed = 'Non Fermées';
$lang->task->yesterdayFinished = 'Tâche Terminée Hier';
$lang->task->allTasks = 'Tâche';
$lang->task->linkMR = 'Related MRs';
$lang->task->linkCommit = 'Related Commits';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = 'A Faire';
@@ -221,6 +222,10 @@ $lang->task->legendDesc = 'Description Tâche';
$lang->task->legendDetail = 'Task Detail';
$lang->task->legendMisc = 'Misc.';
$lang->task->action = new stdclass();
$lang->task->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?";
$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?";
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
+6
View File
@@ -145,6 +145,8 @@ $lang->task->noFinished = 'Chưa kết thúc';
$lang->task->noClosed = 'Chưa đóng';
$lang->task->yesterdayFinished = 'Kết thúc hôm qua';
$lang->task->allTasks = 'Nhiệm vụ';
$lang->task->linkMR = 'Related MRs';
$lang->task->linkCommit = 'Related Commits';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = 'Đang đợi';
@@ -205,6 +207,10 @@ $lang->task->createDenied = 'Tạo nhiệm vụ bị từ chối trong
$lang->task->cannotDeleteParent = 'Không thể xóa nhiệm vụ cha';
$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.';
$lang->task->action = new stdclass();
$lang->task->action->linked2revision = array('main' => '$date, linked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->action->unlinkedfromrevision = array('main' => '$date, unlinked by <strong>$actor</strong> to Revision <strong>$extra</strong>.');
$lang->task->error = new stdclass();
$lang->task->error->totalNumber = '"Total Cost" must be numbers.';
$lang->task->error->consumedNumber = '"Giờ làm" phải là số.';
+5
View File
@@ -177,6 +177,7 @@ $lang->task->noClosed = '未关闭';
$lang->task->yesterdayFinished = '昨日完成任务数';
$lang->task->allTasks = '总任务';
$lang->task->linkMR = '相关合并请求';
$lang->task->linkCommit = '相关代码版本';
$lang->task->statusList[''] = '';
$lang->task->statusList['wait'] = '未开始';
@@ -221,6 +222,10 @@ $lang->task->legendDesc = '任务描述';
$lang->task->legendDetail = '任务详情';
$lang->task->legendMisc = '其他相关';
$lang->task->action = new stdclass();
$lang->task->action->linked2revision = array('main' => '$date, 由 <strong>$actor</strong> 关联到代码提交 <strong>$extra</strong>。');
$lang->task->action->unlinkedfromrevision = array('main' => '$date, 由 <strong>$actor</strong> 取消关联到代码提交 <strong>$extra</strong>。');
$lang->task->confirmDelete = "您确定要删除这个任务吗?";
$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?";
$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。";
+11 -2
View File
@@ -1811,9 +1811,18 @@ class taskModel extends model
foreach($record->dates as $id => $item) if($item > $today) dao::$errors[] = 'ID #' . $id . ' ' . $this->lang->task->error->date;
if(dao::isError()) return false;
$task = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch();;
$task->team = $this->dao->select('*')->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->orderBy('order')->fetchAll('id');
/* Check if the current user is in the team. */
$inTeam = empty($task->team) ? true : false;
foreach($task->team as $teamMember)
{
if($teamMember->account == $this->app->user->account) $inTeam = true;
}
if(!$inTeam) return false;
$estimates = array();
$task = $this->dao->select('*')->from(TABLE_TASK)->where('id')->eq($taskID)->fetch();;
$task->team = $this->dao->select('*')->from(TABLE_TASKTEAM)->where('task')->eq($taskID)->orderBy('order')->fetchAll('id');
$earliestTime = '';
foreach(array_keys($record->dates) as $id)
{
+14
View File
@@ -420,6 +420,20 @@
?>
</td>
</tr>
<tr>
<th class='MRThWidth'><?php echo $lang->task->linkCommit;?></th>
<td>
<?php
$canViewRevision = common::hasPriv('repo', 'revision');
foreach($linkCommits as $commit)
{
$revision = substr($commit->revision, 0, 10);
$commitTitle = $revision . ' ' . $commit->comment;
echo "<div class='link-commit' title='$commitTitle'>" . ($canViewRevision ? html::a($this->createLink('repo', 'revision', "repoID={$commit->repo}&objectID=0&revision={$commit->revision}"), "$revision") . ' ' . $commit->comment : $commitTitle) . '<br />';
}
?>
</td>
</tr>
</table>
</div>
</div>
File diff suppressed because it is too large Load Diff
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 - present Microsoft Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+96
View File
@@ -0,0 +1,96 @@
# Monaco Editor
[![Build Status](https://dev.azure.com/ms/monaco-editor/_apis/build/status/microsoft.monaco-editor?label=website)](https://dev.azure.com/ms/monaco-editor/_build/latest?definitionId=3)
The Monaco Editor is the code editor which powers [VS Code](https://github.com/microsoft/vscode), with the features better described [here](https://code.visualstudio.com/docs/editor/editingevolved).
Please note that this repository contains no source code for the code editor, it only contains the scripts to package everything together and ship the `monaco-editor` npm module.
![image](https://user-images.githubusercontent.com/5047891/94183711-290c0780-fea3-11ea-90e3-c88ff9d21bd6.png)
## Try it out
Try the editor out [on our website](https://microsoft.github.io/monaco-editor/index.html).
## Installing
```
$ npm install monaco-editor
```
You will get:
- inside `esm`: ESM version of the editor (compatible with e.g. webpack)
- inside `dev`: AMD bundled, not minified
- inside `min`: AMD bundled, and minified
- inside `min-maps`: source maps for `min`
- `monaco.d.ts`: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).
It is recommended to develop against the `dev` version, and in production to use the `min` version.
## Documentation
- Learn how to integrate the editor with these [complete samples](./samples/).
- [Integrate the AMD version](./docs/integrate-amd.md).
- [Integrate the ESM version](./docs/integrate-esm.md)
- Learn how to use the editor API and try out your own customizations in the [playground](https://microsoft.github.io/monaco-editor/playground.html).
- Explore the [API docs](https://microsoft.github.io/monaco-editor/api/index.html) or read them straight from [`monaco.d.ts`](https://github.com/microsoft/monaco-editor/blob/main/website/typedoc/monaco.d.ts).
- Read [this guide](https://github.com/microsoft/monaco-editor/wiki/Accessibility-Guide-for-Integrators) to ensure the editor is accessible to all your users!
- Create a Monarch tokenizer for a new programming language [in the Monarch playground](https://microsoft.github.io/monaco-editor/monarch.html).
- Ask questions on [StackOverflow](https://stackoverflow.com/questions/tagged/monaco-editor)! Search open and closed issues, there are a lot of tips in there!
## Issues
Create [issues](https://github.com/microsoft/monaco-editor/issues) in this repository for anything related to the Monaco Editor. Always mention **the version** of the editor when creating issues and **the browser** you're having trouble in. Please search for existing issues to avoid duplicates.
## FAQ
❓ **What is the relationship between VS Code and the Monaco Editor?**
The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
❓ **What is the relationship between VS Code's version and the Monaco Editor's version?**
None. The Monaco Editor is a library and it reflects directly the source code.
❓ **I've written an extension for VS Code, will it work on the Monaco Editor in a browser?**
No.
> Note: If the extension is fully based on the [LSP](https://microsoft.github.io/language-server-protocol/) and if the language server is authored in JavaScript, then it would be possible.
❓ **Why all these web workers and why should I care?**
Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
❓ **What is this `loader.js`? Can I use `require.js`?**
It is an AMD loader that we use in VS Code. Yes.
❓ **I see the warning "Could not create web worker". What should I do?**
HTML5 does not allow pages loaded on `file://` to create web workers. Please load the editor with a web server on `http://` or `https://` schemes.
❓ **Is the editor supported in mobile browsers or mobile web app frameworks?**
No.
❓ **Why doesn't the editor support TextMate grammars?**
- Please see https://github.com/bolinfest/monaco-tm which puts together `monaco-editor`, `vscode-oniguruma` and `vscode-textmate` to get TM grammar support in the editor.
❓ **What about IE 11 support?**
- The Monaco Editor no longer supports IE 11. The last version that was tested on IE 11 is `0.18.1`.
## Development setup
Please see [CONTRIBUTING](./CONTRIBUTING.md)
## Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
## License
Licensed under the [MIT](https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt) License.
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.de", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.es", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.fr", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.it", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.ja", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,15 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
/*---------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls", {
"vs/base/common/platform": [
"_"
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.ko", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.ru", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.zh-cn", {
"vs/base/common/platform": [
"_",
]
});
@@ -0,0 +1,12 @@
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(4b8a47f3570a4a05ace9d00ae0df044b55befcd5)
* Released under the MIT license
* https://github.com/microsoft/vscode/blob/main/LICENSE.txt
*-----------------------------------------------------------*/
define("vs/base/common/worker/simpleWorker.nls.zh-tw", {
"vs/base/common/platform": [
"_",
]
});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,347 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/apex/apex", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/apex/apex.ts
var apex_exports = {};
__export(apex_exports, {
conf: () => conf,
language: () => language
});
var conf = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: {
lineComment: "//",
blockComment: ["/*", "*/"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' },
{ open: "'", close: "'" },
{ open: "<", close: ">" }
],
folding: {
markers: {
start: new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),
end: new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")
}
}
};
var keywords = [
"abstract",
"activate",
"and",
"any",
"array",
"as",
"asc",
"assert",
"autonomous",
"begin",
"bigdecimal",
"blob",
"boolean",
"break",
"bulk",
"by",
"case",
"cast",
"catch",
"char",
"class",
"collect",
"commit",
"const",
"continue",
"convertcurrency",
"decimal",
"default",
"delete",
"desc",
"do",
"double",
"else",
"end",
"enum",
"exception",
"exit",
"export",
"extends",
"false",
"final",
"finally",
"float",
"for",
"from",
"future",
"get",
"global",
"goto",
"group",
"having",
"hint",
"if",
"implements",
"import",
"in",
"inner",
"insert",
"instanceof",
"int",
"interface",
"into",
"join",
"last_90_days",
"last_month",
"last_n_days",
"last_week",
"like",
"limit",
"list",
"long",
"loop",
"map",
"merge",
"native",
"new",
"next_90_days",
"next_month",
"next_n_days",
"next_week",
"not",
"null",
"nulls",
"number",
"object",
"of",
"on",
"or",
"outer",
"override",
"package",
"parallel",
"pragma",
"private",
"protected",
"public",
"retrieve",
"return",
"returning",
"rollback",
"savepoint",
"search",
"select",
"set",
"short",
"sort",
"stat",
"static",
"strictfp",
"super",
"switch",
"synchronized",
"system",
"testmethod",
"then",
"this",
"this_month",
"this_week",
"throw",
"throws",
"today",
"tolabel",
"tomorrow",
"transaction",
"transient",
"trigger",
"true",
"try",
"type",
"undelete",
"update",
"upsert",
"using",
"virtual",
"void",
"volatile",
"webservice",
"when",
"where",
"while",
"yesterday"
];
var uppercaseFirstLetter = (lowercase) => lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
var keywordsWithCaseVariations = [];
keywords.forEach((lowercase) => {
keywordsWithCaseVariations.push(lowercase);
keywordsWithCaseVariations.push(lowercase.toUpperCase());
keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
});
var language = {
defaultToken: "",
tokenPostfix: ".apex",
keywords: keywordsWithCaseVariations,
operators: [
"=",
">",
"<",
"!",
"~",
"?",
":",
"==",
"<=",
">=",
"!=",
"&&",
"||",
"++",
"--",
"+",
"-",
"*",
"/",
"&",
"|",
"^",
"%",
"<<",
">>",
">>>",
"+=",
"-=",
"*=",
"/=",
"&=",
"|=",
"^=",
"%=",
"<<=",
">>=",
">>>="
],
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
digits: /\d+(_+\d+)*/,
octaldigits: /[0-7]+(_+[0-7]+)*/,
binarydigits: /[0-1]+(_+[0-1]+)*/,
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
tokenizer: {
root: [
[
/[a-z_$][\w$]*/,
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "identifier"
}
}
],
[
/[A-Z][\w\$]*/,
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "type.identifier"
}
}
],
{ include: "@whitespace" },
[/[{}()\[\]]/, "@brackets"],
[/[<>](?!@symbols)/, "@brackets"],
[
/@symbols/,
{
cases: {
"@operators": "delimiter",
"@default": ""
}
}
],
[/@\s*[a-zA-Z_\$][\w\$]*/, "annotation"],
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, "number.float"],
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, "number.float"],
[/(@digits)[fFdD]/, "number.float"],
[/(@digits)[lL]?/, "number"],
[/[;,.]/, "delimiter"],
[/"([^"\\]|\\.)*$/, "string.invalid"],
[/'([^'\\]|\\.)*$/, "string.invalid"],
[/"/, "string", '@string."'],
[/'/, "string", "@string.'"],
[/'[^\\']'/, "string"],
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
[/'/, "string.invalid"]
],
whitespace: [
[/[ \t\r\n]+/, ""],
[/\/\*\*(?!\/)/, "comment.doc", "@apexdoc"],
[/\/\*/, "comment", "@comment"],
[/\/\/.*$/, "comment"]
],
comment: [
[/[^\/*]+/, "comment"],
[/\*\//, "comment", "@pop"],
[/[\/*]/, "comment"]
],
apexdoc: [
[/[^\/*]+/, "comment.doc"],
[/\*\//, "comment.doc", "@pop"],
[/[\/*]/, "comment.doc"]
],
string: [
[/[^\\"']+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[
/["']/,
{
cases: {
"$#==$S2": { token: "string", next: "@pop" },
"@default": "string"
}
}
]
]
}
};
return __toCommonJS(apex_exports);
})();
return moduleExports;
});
@@ -0,0 +1,102 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/azcli/azcli", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/azcli/azcli.ts
var azcli_exports = {};
__export(azcli_exports, {
conf: () => conf,
language: () => language
});
var conf = {
comments: {
lineComment: "#"
}
};
var language = {
defaultToken: "keyword",
ignoreCase: true,
tokenPostfix: ".azcli",
str: /[^#\s]/,
tokenizer: {
root: [
{ include: "@comment" },
[
/\s-+@str*\s*/,
{
cases: {
"@eos": { token: "key.identifier", next: "@popall" },
"@default": { token: "key.identifier", next: "@type" }
}
}
],
[
/^-+@str*\s*/,
{
cases: {
"@eos": { token: "key.identifier", next: "@popall" },
"@default": { token: "key.identifier", next: "@type" }
}
}
]
],
type: [
{ include: "@comment" },
[
/-+@str*\s*/,
{
cases: {
"@eos": { token: "key.identifier", next: "@popall" },
"@default": "key.identifier"
}
}
],
[
/@str+\s*/,
{
cases: {
"@eos": { token: "string", next: "@popall" },
"@default": "string"
}
}
]
],
comment: [
[
/#.*$/,
{
cases: {
"@eos": { token: "comment", next: "@popall" }
}
}
]
]
}
};
return __toCommonJS(azcli_exports);
})();
return moduleExports;
});
@@ -0,0 +1,123 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/bat/bat", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/bat/bat.ts
var bat_exports = {};
__export(bat_exports, {
conf: () => conf,
language: () => language
});
var conf = {
comments: {
lineComment: "REM"
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' }
],
surroundingPairs: [
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' }
],
folding: {
markers: {
start: new RegExp("^\\s*(::\\s*|REM\\s+)#region"),
end: new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")
}
}
};
var language = {
defaultToken: "",
ignoreCase: true,
tokenPostfix: ".bat",
brackets: [
{ token: "delimiter.bracket", open: "{", close: "}" },
{ token: "delimiter.parenthesis", open: "(", close: ")" },
{ token: "delimiter.square", open: "[", close: "]" }
],
keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,
symbols: /[=><!~?&|+\-*\/\^;\.,]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
tokenizer: {
root: [
[/^(\s*)(rem(?:\s.*|))$/, ["", "comment"]],
[/(\@?)(@keywords)(?!\w)/, [{ token: "keyword" }, { token: "keyword.$2" }]],
[/[ \t\r\n]+/, ""],
[/setlocal(?!\w)/, "keyword.tag-setlocal"],
[/endlocal(?!\w)/, "keyword.tag-setlocal"],
[/[a-zA-Z_]\w*/, ""],
[/:\w*/, "metatag"],
[/%[^%]+%/, "variable"],
[/%%[\w]+(?!\w)/, "variable"],
[/[{}()\[\]]/, "@brackets"],
[/@symbols/, "delimiter"],
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, "number.hex"],
[/\d+/, "number"],
[/[;,.]/, "delimiter"],
[/"/, "string", '@string."'],
[/'/, "string", "@string.'"]
],
string: [
[
/[^\\"'%]+/,
{
cases: {
"@eos": { token: "string", next: "@popall" },
"@default": "string"
}
}
],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/%[\w ]+%/, "variable"],
[/%%[\w]+(?!\w)/, "variable"],
[
/["']/,
{
cases: {
"$#==$S2": { token: "string", next: "@pop" },
"@default": "string"
}
}
],
[/$/, "string", "@popall"]
]
}
};
return __toCommonJS(bat_exports);
})();
return moduleExports;
});
@@ -0,0 +1,143 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/bicep/bicep", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/bicep/bicep.ts
var bicep_exports = {};
__export(bicep_exports, {
conf: () => conf,
language: () => language
});
var bounded = (text) => `\\b${text}\\b`;
var identifierStart = "[_a-zA-Z]";
var identifierContinue = "[_a-zA-Z0-9]";
var identifier = bounded(`${identifierStart}${identifierContinue}*`);
var keywords = [
"targetScope",
"resource",
"module",
"param",
"var",
"output",
"for",
"in",
"if",
"existing"
];
var namedLiterals = ["true", "false", "null"];
var nonCommentWs = `[ \\t\\r\\n]`;
var numericLiteral = `[0-9]+`;
var conf = {
comments: {
lineComment: "//",
blockComment: ["/*", "*/"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "'", close: "'" },
{ open: "'''", close: "'''" }
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "'", close: "'", notIn: ["string", "comment"] },
{ open: "'''", close: "'''", notIn: ["string", "comment"] }
],
autoCloseBefore: ":.,=}])' \n ",
indentationRules: {
increaseIndentPattern: new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),
decreaseIndentPattern: new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")
}
};
var language = {
defaultToken: "",
tokenPostfix: ".bicep",
brackets: [
{ open: "{", close: "}", token: "delimiter.curly" },
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" }
],
symbols: /[=><!~?:&|+\-*/^%]+/,
keywords,
namedLiterals,
escapes: `\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\\${)`,
tokenizer: {
root: [{ include: "@expression" }, { include: "@whitespace" }],
stringVerbatim: [
{ regex: `(|'|'')[^']`, action: { token: "string" } },
{ regex: `'''`, action: { token: "string.quote", next: "@pop" } }
],
stringLiteral: [
{ regex: `\\\${`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
{ regex: `[^\\\\'$]+`, action: { token: "string" } },
{ regex: "@escapes", action: { token: "string.escape" } },
{ regex: `\\\\.`, action: { token: "string.escape.invalid" } },
{ regex: `'`, action: { token: "string", next: "@pop" } }
],
bracketCounting: [
{ regex: `{`, action: { token: "delimiter.bracket", next: "@bracketCounting" } },
{ regex: `}`, action: { token: "delimiter.bracket", next: "@pop" } },
{ include: "expression" }
],
comment: [
{ regex: `[^\\*]+`, action: { token: "comment" } },
{ regex: `\\*\\/`, action: { token: "comment", next: "@pop" } },
{ regex: `[\\/*]`, action: { token: "comment" } }
],
whitespace: [
{ regex: nonCommentWs },
{ regex: `\\/\\*`, action: { token: "comment", next: "@comment" } },
{ regex: `\\/\\/.*$`, action: { token: "comment" } }
],
expression: [
{ regex: `'''`, action: { token: "string.quote", next: "@stringVerbatim" } },
{ regex: `'`, action: { token: "string.quote", next: "@stringLiteral" } },
{ regex: numericLiteral, action: { token: "number" } },
{
regex: identifier,
action: {
cases: {
"@keywords": { token: "keyword" },
"@namedLiterals": { token: "keyword" },
"@default": { token: "identifier" }
}
}
}
]
}
};
return __toCommonJS(bicep_exports);
})();
return moduleExports;
});
@@ -0,0 +1,196 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/cameligo/cameligo", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/cameligo/cameligo.ts
var cameligo_exports = {};
__export(cameligo_exports, {
conf: () => conf,
language: () => language
});
var conf = {
comments: {
lineComment: "//",
blockComment: ["(*", "*)"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "<", close: ">" },
{ open: "'", close: "'" },
{ open: '"', close: '"' },
{ open: "(*", close: "*)" }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "<", close: ">" },
{ open: "'", close: "'" },
{ open: '"', close: '"' },
{ open: "(*", close: "*)" }
]
};
var language = {
defaultToken: "",
tokenPostfix: ".cameligo",
ignoreCase: true,
brackets: [
{ open: "{", close: "}", token: "delimiter.curly" },
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" },
{ open: "<", close: ">", token: "delimiter.angle" }
],
keywords: [
"abs",
"assert",
"block",
"Bytes",
"case",
"Crypto",
"Current",
"else",
"failwith",
"false",
"for",
"fun",
"if",
"in",
"let",
"let%entry",
"let%init",
"List",
"list",
"Map",
"map",
"match",
"match%nat",
"mod",
"not",
"operation",
"Operation",
"of",
"record",
"Set",
"set",
"sender",
"skip",
"source",
"String",
"then",
"to",
"true",
"type",
"with"
],
typeKeywords: ["int", "unit", "string", "tz", "nat", "bool"],
operators: [
"=",
">",
"<",
"<=",
">=",
"<>",
":",
":=",
"and",
"mod",
"or",
"+",
"-",
"*",
"/",
"@",
"&",
"^",
"%",
"->",
"<-",
"&&",
"||"
],
symbols: /[=><:@\^&|+\-*\/\^%]+/,
tokenizer: {
root: [
[
/[a-zA-Z_][\w]*/,
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "identifier"
}
}
],
{ include: "@whitespace" },
[/[{}()\[\]]/, "@brackets"],
[/[<>](?!@symbols)/, "@brackets"],
[
/@symbols/,
{
cases: {
"@operators": "delimiter",
"@default": ""
}
}
],
[/\d*\.\d+([eE][\-+]?\d+)?/, "number.float"],
[/\$[0-9a-fA-F]{1,16}/, "number.hex"],
[/\d+/, "number"],
[/[;,.]/, "delimiter"],
[/'([^'\\]|\\.)*$/, "string.invalid"],
[/'/, "string", "@string"],
[/'[^\\']'/, "string"],
[/'/, "string.invalid"],
[/\#\d+/, "string"]
],
comment: [
[/[^\(\*]+/, "comment"],
[/\*\)/, "comment", "@pop"],
[/\(\*/, "comment"]
],
string: [
[/[^\\']+/, "string"],
[/\\./, "string.escape.invalid"],
[/'/, { token: "string.quote", bracket: "@close", next: "@pop" }]
],
whitespace: [
[/[ \t\r\n]+/, "white"],
[/\(\*/, "comment", "@comment"],
[/\/\/.*$/, "comment"]
]
}
};
return __toCommonJS(cameligo_exports);
})();
return moduleExports;
});
@@ -0,0 +1,782 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/clojure/clojure", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/clojure/clojure.ts
var clojure_exports = {};
__export(clojure_exports, {
conf: () => conf,
language: () => language
});
var conf = {
comments: {
lineComment: ";;"
},
brackets: [
["[", "]"],
["(", ")"],
["{", "}"]
],
autoClosingPairs: [
{ open: "[", close: "]" },
{ open: '"', close: '"' },
{ open: "(", close: ")" },
{ open: "{", close: "}" }
],
surroundingPairs: [
{ open: "[", close: "]" },
{ open: '"', close: '"' },
{ open: "(", close: ")" },
{ open: "{", close: "}" }
]
};
var language = {
defaultToken: "",
ignoreCase: true,
tokenPostfix: ".clj",
brackets: [
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" },
{ open: "{", close: "}", token: "delimiter.curly" }
],
constants: ["true", "false", "nil"],
numbers: /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,
characters: /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,
escapes: /^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
qualifiedSymbols: /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,
specialForms: [
".",
"catch",
"def",
"do",
"if",
"monitor-enter",
"monitor-exit",
"new",
"quote",
"recur",
"set!",
"throw",
"try",
"var"
],
coreSymbols: [
"*",
"*'",
"*1",
"*2",
"*3",
"*agent*",
"*allow-unresolved-vars*",
"*assert*",
"*clojure-version*",
"*command-line-args*",
"*compile-files*",
"*compile-path*",
"*compiler-options*",
"*data-readers*",
"*default-data-reader-fn*",
"*e",
"*err*",
"*file*",
"*flush-on-newline*",
"*fn-loader*",
"*in*",
"*math-context*",
"*ns*",
"*out*",
"*print-dup*",
"*print-length*",
"*print-level*",
"*print-meta*",
"*print-namespace-maps*",
"*print-readably*",
"*read-eval*",
"*reader-resolver*",
"*source-path*",
"*suppress-read*",
"*unchecked-math*",
"*use-context-classloader*",
"*verbose-defrecords*",
"*warn-on-reflection*",
"+",
"+'",
"-",
"-'",
"->",
"->>",
"->ArrayChunk",
"->Eduction",
"->Vec",
"->VecNode",
"->VecSeq",
"-cache-protocol-fn",
"-reset-methods",
"..",
"/",
"<",
"<=",
"=",
"==",
">",
">=",
"EMPTY-NODE",
"Inst",
"StackTraceElement->vec",
"Throwable->map",
"accessor",
"aclone",
"add-classpath",
"add-watch",
"agent",
"agent-error",
"agent-errors",
"aget",
"alength",
"alias",
"all-ns",
"alter",
"alter-meta!",
"alter-var-root",
"amap",
"ancestors",
"and",
"any?",
"apply",
"areduce",
"array-map",
"as->",
"aset",
"aset-boolean",
"aset-byte",
"aset-char",
"aset-double",
"aset-float",
"aset-int",
"aset-long",
"aset-short",
"assert",
"assoc",
"assoc!",
"assoc-in",
"associative?",
"atom",
"await",
"await-for",
"await1",
"bases",
"bean",
"bigdec",
"bigint",
"biginteger",
"binding",
"bit-and",
"bit-and-not",
"bit-clear",
"bit-flip",
"bit-not",
"bit-or",
"bit-set",
"bit-shift-left",
"bit-shift-right",
"bit-test",
"bit-xor",
"boolean",
"boolean-array",
"boolean?",
"booleans",
"bound-fn",
"bound-fn*",
"bound?",
"bounded-count",
"butlast",
"byte",
"byte-array",
"bytes",
"bytes?",
"case",
"cast",
"cat",
"char",
"char-array",
"char-escape-string",
"char-name-string",
"char?",
"chars",
"chunk",
"chunk-append",
"chunk-buffer",
"chunk-cons",
"chunk-first",
"chunk-next",
"chunk-rest",
"chunked-seq?",
"class",
"class?",
"clear-agent-errors",
"clojure-version",
"coll?",
"comment",
"commute",
"comp",
"comparator",
"compare",
"compare-and-set!",
"compile",
"complement",
"completing",
"concat",
"cond",
"cond->",
"cond->>",
"condp",
"conj",
"conj!",
"cons",
"constantly",
"construct-proxy",
"contains?",
"count",
"counted?",
"create-ns",
"create-struct",
"cycle",
"dec",
"dec'",
"decimal?",
"declare",
"dedupe",
"default-data-readers",
"definline",
"definterface",
"defmacro",
"defmethod",
"defmulti",
"defn",
"defn-",
"defonce",
"defprotocol",
"defrecord",
"defstruct",
"deftype",
"delay",
"delay?",
"deliver",
"denominator",
"deref",
"derive",
"descendants",
"destructure",
"disj",
"disj!",
"dissoc",
"dissoc!",
"distinct",
"distinct?",
"doall",
"dorun",
"doseq",
"dosync",
"dotimes",
"doto",
"double",
"double-array",
"double?",
"doubles",
"drop",
"drop-last",
"drop-while",
"eduction",
"empty",
"empty?",
"ensure",
"ensure-reduced",
"enumeration-seq",
"error-handler",
"error-mode",
"eval",
"even?",
"every-pred",
"every?",
"ex-data",
"ex-info",
"extend",
"extend-protocol",
"extend-type",
"extenders",
"extends?",
"false?",
"ffirst",
"file-seq",
"filter",
"filterv",
"find",
"find-keyword",
"find-ns",
"find-protocol-impl",
"find-protocol-method",
"find-var",
"first",
"flatten",
"float",
"float-array",
"float?",
"floats",
"flush",
"fn",
"fn?",
"fnext",
"fnil",
"for",
"force",
"format",
"frequencies",
"future",
"future-call",
"future-cancel",
"future-cancelled?",
"future-done?",
"future?",
"gen-class",
"gen-interface",
"gensym",
"get",
"get-in",
"get-method",
"get-proxy-class",
"get-thread-bindings",
"get-validator",
"group-by",
"halt-when",
"hash",
"hash-combine",
"hash-map",
"hash-ordered-coll",
"hash-set",
"hash-unordered-coll",
"ident?",
"identical?",
"identity",
"if-let",
"if-not",
"if-some",
"ifn?",
"import",
"in-ns",
"inc",
"inc'",
"indexed?",
"init-proxy",
"inst-ms",
"inst-ms*",
"inst?",
"instance?",
"int",
"int-array",
"int?",
"integer?",
"interleave",
"intern",
"interpose",
"into",
"into-array",
"ints",
"io!",
"isa?",
"iterate",
"iterator-seq",
"juxt",
"keep",
"keep-indexed",
"key",
"keys",
"keyword",
"keyword?",
"last",
"lazy-cat",
"lazy-seq",
"let",
"letfn",
"line-seq",
"list",
"list*",
"list?",
"load",
"load-file",
"load-reader",
"load-string",
"loaded-libs",
"locking",
"long",
"long-array",
"longs",
"loop",
"macroexpand",
"macroexpand-1",
"make-array",
"make-hierarchy",
"map",
"map-entry?",
"map-indexed",
"map?",
"mapcat",
"mapv",
"max",
"max-key",
"memfn",
"memoize",
"merge",
"merge-with",
"meta",
"method-sig",
"methods",
"min",
"min-key",
"mix-collection-hash",
"mod",
"munge",
"name",
"namespace",
"namespace-munge",
"nat-int?",
"neg-int?",
"neg?",
"newline",
"next",
"nfirst",
"nil?",
"nnext",
"not",
"not-any?",
"not-empty",
"not-every?",
"not=",
"ns",
"ns-aliases",
"ns-imports",
"ns-interns",
"ns-map",
"ns-name",
"ns-publics",
"ns-refers",
"ns-resolve",
"ns-unalias",
"ns-unmap",
"nth",
"nthnext",
"nthrest",
"num",
"number?",
"numerator",
"object-array",
"odd?",
"or",
"parents",
"partial",
"partition",
"partition-all",
"partition-by",
"pcalls",
"peek",
"persistent!",
"pmap",
"pop",
"pop!",
"pop-thread-bindings",
"pos-int?",
"pos?",
"pr",
"pr-str",
"prefer-method",
"prefers",
"primitives-classnames",
"print",
"print-ctor",
"print-dup",
"print-method",
"print-simple",
"print-str",
"printf",
"println",
"println-str",
"prn",
"prn-str",
"promise",
"proxy",
"proxy-call-with-super",
"proxy-mappings",
"proxy-name",
"proxy-super",
"push-thread-bindings",
"pvalues",
"qualified-ident?",
"qualified-keyword?",
"qualified-symbol?",
"quot",
"rand",
"rand-int",
"rand-nth",
"random-sample",
"range",
"ratio?",
"rational?",
"rationalize",
"re-find",
"re-groups",
"re-matcher",
"re-matches",
"re-pattern",
"re-seq",
"read",
"read-line",
"read-string",
"reader-conditional",
"reader-conditional?",
"realized?",
"record?",
"reduce",
"reduce-kv",
"reduced",
"reduced?",
"reductions",
"ref",
"ref-history-count",
"ref-max-history",
"ref-min-history",
"ref-set",
"refer",
"refer-clojure",
"reify",
"release-pending-sends",
"rem",
"remove",
"remove-all-methods",
"remove-method",
"remove-ns",
"remove-watch",
"repeat",
"repeatedly",
"replace",
"replicate",
"require",
"reset!",
"reset-meta!",
"reset-vals!",
"resolve",
"rest",
"restart-agent",
"resultset-seq",
"reverse",
"reversible?",
"rseq",
"rsubseq",
"run!",
"satisfies?",
"second",
"select-keys",
"send",
"send-off",
"send-via",
"seq",
"seq?",
"seqable?",
"seque",
"sequence",
"sequential?",
"set",
"set-agent-send-executor!",
"set-agent-send-off-executor!",
"set-error-handler!",
"set-error-mode!",
"set-validator!",
"set?",
"short",
"short-array",
"shorts",
"shuffle",
"shutdown-agents",
"simple-ident?",
"simple-keyword?",
"simple-symbol?",
"slurp",
"some",
"some->",
"some->>",
"some-fn",
"some?",
"sort",
"sort-by",
"sorted-map",
"sorted-map-by",
"sorted-set",
"sorted-set-by",
"sorted?",
"special-symbol?",
"spit",
"split-at",
"split-with",
"str",
"string?",
"struct",
"struct-map",
"subs",
"subseq",
"subvec",
"supers",
"swap!",
"swap-vals!",
"symbol",
"symbol?",
"sync",
"tagged-literal",
"tagged-literal?",
"take",
"take-last",
"take-nth",
"take-while",
"test",
"the-ns",
"thread-bound?",
"time",
"to-array",
"to-array-2d",
"trampoline",
"transduce",
"transient",
"tree-seq",
"true?",
"type",
"unchecked-add",
"unchecked-add-int",
"unchecked-byte",
"unchecked-char",
"unchecked-dec",
"unchecked-dec-int",
"unchecked-divide-int",
"unchecked-double",
"unchecked-float",
"unchecked-inc",
"unchecked-inc-int",
"unchecked-int",
"unchecked-long",
"unchecked-multiply",
"unchecked-multiply-int",
"unchecked-negate",
"unchecked-negate-int",
"unchecked-remainder-int",
"unchecked-short",
"unchecked-subtract",
"unchecked-subtract-int",
"underive",
"unquote",
"unquote-splicing",
"unreduced",
"unsigned-bit-shift-right",
"update",
"update-in",
"update-proxy",
"uri?",
"use",
"uuid?",
"val",
"vals",
"var-get",
"var-set",
"var?",
"vary-meta",
"vec",
"vector",
"vector-of",
"vector?",
"volatile!",
"volatile?",
"vreset!",
"vswap!",
"when",
"when-first",
"when-let",
"when-not",
"when-some",
"while",
"with-bindings",
"with-bindings*",
"with-in-str",
"with-loading-context",
"with-local-vars",
"with-meta",
"with-open",
"with-out-str",
"with-precision",
"with-redefs",
"with-redefs-fn",
"xml-seq",
"zero?",
"zipmap"
],
tokenizer: {
root: [
{ include: "@whitespace" },
[/@numbers/, "number"],
[/@characters/, "string"],
{ include: "@string" },
[/[()\[\]{}]/, "@brackets"],
[/\/#"(?:\.|(?:")|[^"\n])*"\/g/, "regexp"],
[/[#'@^`~]/, "meta"],
[
/@qualifiedSymbols/,
{
cases: {
"^:.+$": "constant",
"@specialForms": "keyword",
"@coreSymbols": "keyword",
"@constants": "constant",
"@default": "identifier"
}
}
]
],
whitespace: [
[/[\s,]+/, "white"],
[/;.*$/, "comment"],
[/\(comment\b/, "comment", "@comment"]
],
comment: [
[/\(/, "comment", "@push"],
[/\)/, "comment", "@pop"],
[/[^()]/, "comment"]
],
string: [[/"/, "string", "@multiLineString"]],
multiLineString: [
[/"/, "string", "@popall"],
[/@escapes/, "string.escape"],
[/./, "string"]
]
}
};
return __toCommonJS(clojure_exports);
})();
return moduleExports;
});
@@ -0,0 +1,256 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/coffee/coffee", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/coffee/coffee.ts
var coffee_exports = {};
__export(coffee_exports, {
conf: () => conf,
language: () => language
});
var conf = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: {
blockComment: ["###", "###"],
lineComment: "#"
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
folding: {
markers: {
start: new RegExp("^\\s*#region\\b"),
end: new RegExp("^\\s*#endregion\\b")
}
}
};
var language = {
defaultToken: "",
ignoreCase: true,
tokenPostfix: ".coffee",
brackets: [
{ open: "{", close: "}", token: "delimiter.curly" },
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" }
],
regEx: /\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,
keywords: [
"and",
"or",
"is",
"isnt",
"not",
"on",
"yes",
"@",
"no",
"off",
"true",
"false",
"null",
"this",
"new",
"delete",
"typeof",
"in",
"instanceof",
"return",
"throw",
"break",
"continue",
"debugger",
"if",
"else",
"switch",
"for",
"while",
"do",
"try",
"catch",
"finally",
"class",
"extends",
"super",
"undefined",
"then",
"unless",
"until",
"loop",
"of",
"by",
"when"
],
symbols: /[=><!~?&%|+\-*\/\^\.,\:]+/,
escapes: /\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
tokenizer: {
root: [
[/\@[a-zA-Z_]\w*/, "variable.predefined"],
[
/[a-zA-Z_]\w*/,
{
cases: {
this: "variable.predefined",
"@keywords": { token: "keyword.$0" },
"@default": ""
}
}
],
[/[ \t\r\n]+/, ""],
[/###/, "comment", "@comment"],
[/#.*$/, "comment"],
["///", { token: "regexp", next: "@hereregexp" }],
[/^(\s*)(@regEx)/, ["", "regexp"]],
[/(\()(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
[/(\,)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\=)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\:)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\[)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
[/(\!)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\&)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\|)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\?)(\s*)(@regEx)/, ["delimiter", "", "regexp"]],
[/(\{)(\s*)(@regEx)/, ["@brackets", "", "regexp"]],
[/(\;)(\s*)(@regEx)/, ["", "", "regexp"]],
[
/}/,
{
cases: {
"$S2==interpolatedstring": {
token: "string",
next: "@pop"
},
"@default": "@brackets"
}
}
],
[/[{}()\[\]]/, "@brackets"],
[/@symbols/, "delimiter"],
[/\d+[eE]([\-+]?\d+)?/, "number.float"],
[/\d+\.\d+([eE][\-+]?\d+)?/, "number.float"],
[/0[xX][0-9a-fA-F]+/, "number.hex"],
[/0[0-7]+(?!\d)/, "number.octal"],
[/\d+/, "number"],
[/[,.]/, "delimiter"],
[/"""/, "string", '@herestring."""'],
[/'''/, "string", "@herestring.'''"],
[
/"/,
{
cases: {
"@eos": "string",
"@default": { token: "string", next: '@string."' }
}
}
],
[
/'/,
{
cases: {
"@eos": "string",
"@default": { token: "string", next: "@string.'" }
}
}
]
],
string: [
[/[^"'\#\\]+/, "string"],
[/@escapes/, "string.escape"],
[/\./, "string.escape.invalid"],
[/\./, "string.escape.invalid"],
[
/#{/,
{
cases: {
'$S2=="': {
token: "string",
next: "root.interpolatedstring"
},
"@default": "string"
}
}
],
[
/["']/,
{
cases: {
"$#==$S2": { token: "string", next: "@pop" },
"@default": "string"
}
}
],
[/#/, "string"]
],
herestring: [
[
/("""|''')/,
{
cases: {
"$1==$S2": { token: "string", next: "@pop" },
"@default": "string"
}
}
],
[/[^#\\'"]+/, "string"],
[/['"]+/, "string"],
[/@escapes/, "string.escape"],
[/\./, "string.escape.invalid"],
[/#{/, { token: "string.quote", next: "root.interpolatedstring" }],
[/#/, "string"]
],
comment: [
[/[^#]+/, "comment"],
[/###/, "comment", "@pop"],
[/#/, "comment"]
],
hereregexp: [
[/[^\\\/#]+/, "regexp"],
[/\\./, "regexp"],
[/#.*$/, "comment"],
["///[igm]*", { token: "regexp", next: "@pop" }],
[/\//, "regexp"]
]
}
};
return __toCommonJS(coffee_exports);
})();
return moduleExports;
});
@@ -0,0 +1,415 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/cpp/cpp", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/cpp/cpp.ts
var cpp_exports = {};
__export(cpp_exports, {
conf: () => conf,
language: () => language
});
var conf = {
comments: {
lineComment: "//",
blockComment: ["/*", "*/"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "[", close: "]" },
{ open: "{", close: "}" },
{ open: "(", close: ")" },
{ open: "'", close: "'", notIn: ["string", "comment"] },
{ open: '"', close: '"', notIn: ["string"] }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
folding: {
markers: {
start: new RegExp("^\\s*#pragma\\s+region\\b"),
end: new RegExp("^\\s*#pragma\\s+endregion\\b")
}
}
};
var language = {
defaultToken: "",
tokenPostfix: ".cpp",
brackets: [
{ token: "delimiter.curly", open: "{", close: "}" },
{ token: "delimiter.parenthesis", open: "(", close: ")" },
{ token: "delimiter.square", open: "[", close: "]" },
{ token: "delimiter.angle", open: "<", close: ">" }
],
keywords: [
"abstract",
"amp",
"array",
"auto",
"bool",
"break",
"case",
"catch",
"char",
"class",
"const",
"constexpr",
"const_cast",
"continue",
"cpu",
"decltype",
"default",
"delegate",
"delete",
"do",
"double",
"dynamic_cast",
"each",
"else",
"enum",
"event",
"explicit",
"export",
"extern",
"false",
"final",
"finally",
"float",
"for",
"friend",
"gcnew",
"generic",
"goto",
"if",
"in",
"initonly",
"inline",
"int",
"interface",
"interior_ptr",
"internal",
"literal",
"long",
"mutable",
"namespace",
"new",
"noexcept",
"nullptr",
"__nullptr",
"operator",
"override",
"partial",
"pascal",
"pin_ptr",
"private",
"property",
"protected",
"public",
"ref",
"register",
"reinterpret_cast",
"restrict",
"return",
"safe_cast",
"sealed",
"short",
"signed",
"sizeof",
"static",
"static_assert",
"static_cast",
"struct",
"switch",
"template",
"this",
"thread_local",
"throw",
"tile_static",
"true",
"try",
"typedef",
"typeid",
"typename",
"union",
"unsigned",
"using",
"virtual",
"void",
"volatile",
"wchar_t",
"where",
"while",
"_asm",
"_based",
"_cdecl",
"_declspec",
"_fastcall",
"_if_exists",
"_if_not_exists",
"_inline",
"_multiple_inheritance",
"_pascal",
"_single_inheritance",
"_stdcall",
"_virtual_inheritance",
"_w64",
"__abstract",
"__alignof",
"__asm",
"__assume",
"__based",
"__box",
"__builtin_alignof",
"__cdecl",
"__clrcall",
"__declspec",
"__delegate",
"__event",
"__except",
"__fastcall",
"__finally",
"__forceinline",
"__gc",
"__hook",
"__identifier",
"__if_exists",
"__if_not_exists",
"__inline",
"__int128",
"__int16",
"__int32",
"__int64",
"__int8",
"__interface",
"__leave",
"__m128",
"__m128d",
"__m128i",
"__m256",
"__m256d",
"__m256i",
"__m64",
"__multiple_inheritance",
"__newslot",
"__nogc",
"__noop",
"__nounwind",
"__novtordisp",
"__pascal",
"__pin",
"__pragma",
"__property",
"__ptr32",
"__ptr64",
"__raise",
"__restrict",
"__resume",
"__sealed",
"__single_inheritance",
"__stdcall",
"__super",
"__thiscall",
"__try",
"__try_cast",
"__typeof",
"__unaligned",
"__unhook",
"__uuidof",
"__value",
"__virtual_inheritance",
"__w64",
"__wchar_t"
],
operators: [
"=",
">",
"<",
"!",
"~",
"?",
":",
"==",
"<=",
">=",
"!=",
"&&",
"||",
"++",
"--",
"+",
"-",
"*",
"/",
"&",
"|",
"^",
"%",
"<<",
">>",
">>>",
"+=",
"-=",
"*=",
"/=",
"&=",
"|=",
"^=",
"%=",
"<<=",
">>=",
">>>="
],
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
floatsuffix: /[fFlL]?/,
encoding: /u|u8|U|L/,
tokenizer: {
root: [
[/@encoding?R\"(?:([^ ()\\\t]*))\(/, { token: "string.raw.begin", next: "@raw.$1" }],
[
/[a-zA-Z_]\w*/,
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "identifier"
}
}
],
[/^\s*#\s*include/, { token: "keyword.directive.include", next: "@include" }],
[/^\s*#\s*\w+/, "keyword.directive"],
{ include: "@whitespace" },
[/\[\s*\[/, { token: "annotation", next: "@annotation" }],
[/[{}()\[\]]/, "@brackets"],
[/[<>](?!@symbols)/, "@brackets"],
[
/@symbols/,
{
cases: {
"@operators": "delimiter",
"@default": ""
}
}
],
[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/, "number.float"],
[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/, "number.float"],
[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/, "number.hex"],
[/0[0-7']*[0-7](@integersuffix)/, "number.octal"],
[/0[bB][0-1']*[0-1](@integersuffix)/, "number.binary"],
[/\d[\d']*\d(@integersuffix)/, "number"],
[/\d(@integersuffix)/, "number"],
[/[;,.]/, "delimiter"],
[/"([^"\\]|\\.)*$/, "string.invalid"],
[/"/, "string", "@string"],
[/'[^\\']'/, "string"],
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
[/'/, "string.invalid"]
],
whitespace: [
[/[ \t\r\n]+/, ""],
[/\/\*\*(?!\/)/, "comment.doc", "@doccomment"],
[/\/\*/, "comment", "@comment"],
[/\/\/.*\\$/, "comment", "@linecomment"],
[/\/\/.*$/, "comment"]
],
comment: [
[/[^\/*]+/, "comment"],
[/\*\//, "comment", "@pop"],
[/[\/*]/, "comment"]
],
linecomment: [
[/.*[^\\]$/, "comment", "@pop"],
[/[^]+/, "comment"]
],
doccomment: [
[/[^\/*]+/, "comment.doc"],
[/\*\//, "comment.doc", "@pop"],
[/[\/*]/, "comment.doc"]
],
string: [
[/[^\\"]+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/"/, "string", "@pop"]
],
raw: [
[
/(.*)(\))(?:([^ ()\\\t"]*))(\")/,
{
cases: {
"$3==$S2": [
"string.raw",
"string.raw.end",
"string.raw.end",
{ token: "string.raw.end", next: "@pop" }
],
"@default": ["string.raw", "string.raw", "string.raw", "string.raw"]
}
}
],
[/.*/, "string.raw"]
],
annotation: [
{ include: "@whitespace" },
[/using|alignas/, "keyword"],
[/[a-zA-Z0-9_]+/, "annotation"],
[/[,:]/, "delimiter"],
[/[()]/, "@brackets"],
[/\]\s*\]/, { token: "annotation", next: "@pop" }]
],
include: [
[
/(\s*)(<)([^<>]*)(>)/,
[
"",
"keyword.directive.include.begin",
"string.include.identifier",
{ token: "keyword.directive.include.end", next: "@pop" }
]
],
[
/(\s*)(")([^"]*)(")/,
[
"",
"keyword.directive.include.begin",
"string.include.identifier",
{ token: "keyword.directive.include.end", next: "@pop" }
]
]
]
}
};
return __toCommonJS(cpp_exports);
})();
return moduleExports;
});
@@ -0,0 +1,348 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/csharp/csharp", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/csharp/csharp.ts
var csharp_exports = {};
__export(csharp_exports, {
conf: () => conf,
language: () => language
});
var conf = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: {
lineComment: "//",
blockComment: ["/*", "*/"]
},
brackets: [
["{", "}"],
["[", "]"],
["(", ")"]
],
autoClosingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "'", close: "'", notIn: ["string", "comment"] },
{ open: '"', close: '"', notIn: ["string", "comment"] }
],
surroundingPairs: [
{ open: "{", close: "}" },
{ open: "[", close: "]" },
{ open: "(", close: ")" },
{ open: "<", close: ">" },
{ open: "'", close: "'" },
{ open: '"', close: '"' }
],
folding: {
markers: {
start: new RegExp("^\\s*#region\\b"),
end: new RegExp("^\\s*#endregion\\b")
}
}
};
var language = {
defaultToken: "",
tokenPostfix: ".cs",
brackets: [
{ open: "{", close: "}", token: "delimiter.curly" },
{ open: "[", close: "]", token: "delimiter.square" },
{ open: "(", close: ")", token: "delimiter.parenthesis" },
{ open: "<", close: ">", token: "delimiter.angle" }
],
keywords: [
"extern",
"alias",
"using",
"bool",
"decimal",
"sbyte",
"byte",
"short",
"ushort",
"int",
"uint",
"long",
"ulong",
"char",
"float",
"double",
"object",
"dynamic",
"string",
"assembly",
"is",
"as",
"ref",
"out",
"this",
"base",
"new",
"typeof",
"void",
"checked",
"unchecked",
"default",
"delegate",
"var",
"const",
"if",
"else",
"switch",
"case",
"while",
"do",
"for",
"foreach",
"in",
"break",
"continue",
"goto",
"return",
"throw",
"try",
"catch",
"finally",
"lock",
"yield",
"from",
"let",
"where",
"join",
"on",
"equals",
"into",
"orderby",
"ascending",
"descending",
"select",
"group",
"by",
"namespace",
"partial",
"class",
"field",
"event",
"method",
"param",
"public",
"protected",
"internal",
"private",
"abstract",
"sealed",
"static",
"struct",
"readonly",
"volatile",
"virtual",
"override",
"params",
"get",
"set",
"add",
"remove",
"operator",
"true",
"false",
"implicit",
"explicit",
"interface",
"enum",
"null",
"async",
"await",
"fixed",
"sizeof",
"stackalloc",
"unsafe",
"nameof",
"when"
],
namespaceFollows: ["namespace", "using"],
parenFollows: ["if", "for", "while", "switch", "foreach", "using", "catch", "when"],
operators: [
"=",
"??",
"||",
"&&",
"|",
"^",
"&",
"==",
"!=",
"<=",
">=",
"<<",
"+",
"-",
"*",
"/",
"%",
"!",
"~",
"++",
"--",
"+=",
"-=",
"*=",
"/=",
"%=",
"&=",
"|=",
"^=",
"<<=",
">>=",
">>",
"=>"
],
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
tokenizer: {
root: [
[
/\@?[a-zA-Z_]\w*/,
{
cases: {
"@namespaceFollows": {
token: "keyword.$0",
next: "@namespace"
},
"@keywords": {
token: "keyword.$0",
next: "@qualified"
},
"@default": { token: "identifier", next: "@qualified" }
}
}
],
{ include: "@whitespace" },
[
/}/,
{
cases: {
"$S2==interpolatedstring": {
token: "string.quote",
next: "@pop"
},
"$S2==litinterpstring": {
token: "string.quote",
next: "@pop"
},
"@default": "@brackets"
}
}
],
[/[{}()\[\]]/, "@brackets"],
[/[<>](?!@symbols)/, "@brackets"],
[
/@symbols/,
{
cases: {
"@operators": "delimiter",
"@default": ""
}
}
],
[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/, "number.float"],
[/0[xX][0-9a-fA-F_]+/, "number.hex"],
[/0[bB][01_]+/, "number.hex"],
[/[0-9_]+/, "number"],
[/[;,.]/, "delimiter"],
[/"([^"\\]|\\.)*$/, "string.invalid"],
[/"/, { token: "string.quote", next: "@string" }],
[/\$\@"/, { token: "string.quote", next: "@litinterpstring" }],
[/\@"/, { token: "string.quote", next: "@litstring" }],
[/\$"/, { token: "string.quote", next: "@interpolatedstring" }],
[/'[^\\']'/, "string"],
[/(')(@escapes)(')/, ["string", "string.escape", "string"]],
[/'/, "string.invalid"]
],
qualified: [
[
/[a-zA-Z_][\w]*/,
{
cases: {
"@keywords": { token: "keyword.$0" },
"@default": "identifier"
}
}
],
[/\./, "delimiter"],
["", "", "@pop"]
],
namespace: [
{ include: "@whitespace" },
[/[A-Z]\w*/, "namespace"],
[/[\.=]/, "delimiter"],
["", "", "@pop"]
],
comment: [
[/[^\/*]+/, "comment"],
["\\*/", "comment", "@pop"],
[/[\/*]/, "comment"]
],
string: [
[/[^\\"]+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/"/, { token: "string.quote", next: "@pop" }]
],
litstring: [
[/[^"]+/, "string"],
[/""/, "string.escape"],
[/"/, { token: "string.quote", next: "@pop" }]
],
litinterpstring: [
[/[^"{]+/, "string"],
[/""/, "string.escape"],
[/{{/, "string.escape"],
[/}}/, "string.escape"],
[/{/, { token: "string.quote", next: "root.litinterpstring" }],
[/"/, { token: "string.quote", next: "@pop" }]
],
interpolatedstring: [
[/[^\\"{]+/, "string"],
[/@escapes/, "string.escape"],
[/\\./, "string.escape.invalid"],
[/{{/, "string.escape"],
[/}}/, "string.escape"],
[/{/, { token: "string.quote", next: "root.interpolatedstring" }],
[/"/, { token: "string.quote", next: "@pop" }]
],
whitespace: [
[/^[ \t\v\f]*#((r)|(load))(?=\s)/, "directive.csx"],
[/^[ \t\v\f]*#\w.*$/, "namespace.cpp"],
[/[ \t\v\f\r\n]+/, ""],
[/\/\*/, "comment", "@comment"],
[/\/\/.*$/, "comment"]
]
}
};
return __toCommonJS(csharp_exports);
})();
return moduleExports;
});
@@ -0,0 +1,85 @@
"use strict";
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.34.0(9d278685b078158491964f8fd7ac9628fffa0f30)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
define("vs/basic-languages/csp/csp", ["require"],(require)=>{
var moduleExports = (() => {
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/basic-languages/csp/csp.ts
var csp_exports = {};
__export(csp_exports, {
conf: () => conf,
language: () => language
});
var conf = {
brackets: [],
autoClosingPairs: [],
surroundingPairs: []
};
var language = {
keywords: [],
typeKeywords: [],
tokenPostfix: ".csp",
operators: [],
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
tokenizer: {
root: [
[/child-src/, "string.quote"],
[/connect-src/, "string.quote"],
[/default-src/, "string.quote"],
[/font-src/, "string.quote"],
[/frame-src/, "string.quote"],
[/img-src/, "string.quote"],
[/manifest-src/, "string.quote"],
[/media-src/, "string.quote"],
[/object-src/, "string.quote"],
[/script-src/, "string.quote"],
[/style-src/, "string.quote"],
[/worker-src/, "string.quote"],
[/base-uri/, "string.quote"],
[/plugin-types/, "string.quote"],
[/sandbox/, "string.quote"],
[/disown-opener/, "string.quote"],
[/form-action/, "string.quote"],
[/frame-ancestors/, "string.quote"],
[/report-uri/, "string.quote"],
[/report-to/, "string.quote"],
[/upgrade-insecure-requests/, "string.quote"],
[/block-all-mixed-content/, "string.quote"],
[/require-sri-for/, "string.quote"],
[/reflected-xss/, "string.quote"],
[/referrer/, "string.quote"],
[/policy-uri/, "string.quote"],
[/'self'/, "string.quote"],
[/'unsafe-inline'/, "string.quote"],
[/'unsafe-eval'/, "string.quote"],
[/'strict-dynamic'/, "string.quote"],
[/'unsafe-hashed-attributes'/, "string.quote"]
]
}
};
return __toCommonJS(csp_exports);
})();
return moduleExports;
});

Some files were not shown because too many files have changed in this diff Show More