* Modify 'of' in the language item to 'blockTitle'.
This commit is contained in:
@@ -86,14 +86,15 @@ class block extends control
|
||||
|
||||
/* 如果没传 $code 说明是首次进入页面,直接使用待编辑 $block 的 $code。 */
|
||||
/* If no $code is passed, it indicates that you are entering the page for the first time, and you can directly use the $code of the $block to be edited. */
|
||||
$block = $this->block->getByID($blockID);
|
||||
$code = $code ? $code : $block->code;
|
||||
$codes = $this->blockZen->getAvailableCodes($block->dashboard, $this->view->module);
|
||||
$block = $this->block->getByID($blockID);
|
||||
$module = $module ? $module : $block->module;
|
||||
$code = $code ? $code : $block->code;
|
||||
$codes = $this->blockZen->getAvailableCodes($block->dashboard, $module);
|
||||
|
||||
$this->view->title = $this->lang->block->editBlock;
|
||||
$this->view->block = $block;
|
||||
$this->view->dashboard = $block->dashboard;
|
||||
$this->view->module = $module ? $module : $block->module;
|
||||
$this->view->module = $module;
|
||||
$this->view->modules = $this->blockZen->getAvailableModules($block->dashboard);
|
||||
$this->view->codes = $codes;
|
||||
/* $codes 包含 $code 时,页面才选中对应的 $code,否则为空。 */
|
||||
|
||||
@@ -8,7 +8,7 @@ function getForm(event)
|
||||
}
|
||||
|
||||
/**
|
||||
* Get block title.
|
||||
* Updates the blockTitle when the type is changed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@@ -26,17 +26,6 @@ function onParamsTypeChange()
|
||||
}
|
||||
|
||||
const $paramstype = $('#paramstype')[0];
|
||||
let blockTitle = '';
|
||||
|
||||
/* Chinese attributives come first, while other language items have attributives placed after. */
|
||||
if(lang.indexOf('zh') >= 0)
|
||||
{
|
||||
blockTitle = $paramstype.options[$paramstype.selectedIndex].text + of + $code.options[$code.selectedIndex].text;
|
||||
}
|
||||
else
|
||||
{
|
||||
blockTitle = $code.options[$code.selectedIndex].text + of + $paramstype.options[$paramstype.selectedIndex].text;
|
||||
}
|
||||
|
||||
$('#title').val(blockTitle);
|
||||
$('#title').val(blockTitle.replace('%1$s', $paramstype.options[$paramstype.selectedIndex].text).replace('%2$s', $code.options[$code.selectedIndex].text));
|
||||
}
|
||||
|
||||
+12
-16
@@ -7,29 +7,25 @@ function getForm(event)
|
||||
loadPage(url, '#codesRow, #paramsRow');
|
||||
}
|
||||
|
||||
function onParamsTypeChange(event)
|
||||
/**
|
||||
* Updates the blockTitle when the type is changed.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function onParamsTypeChange()
|
||||
{
|
||||
const lang = config.clientLang;
|
||||
const $code = document.querySelector('#code');
|
||||
const $code = $('#code')[0];
|
||||
|
||||
/* 在项目仪表盘创建的待测版本区块时,直接取类型名称为该区块的标题。*/
|
||||
/* When creating a test version block in the project dashboard, directly take the name of the block of type.*/
|
||||
if($('#module').val() == 'scrumtest' && $('#paramstype').val() != 'all')
|
||||
{
|
||||
$('#title').val($code.options[$code.selectedIndex].text);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
const $paramstype = document.querySelector('#paramstype');
|
||||
let blockTitle = '';
|
||||
|
||||
if(lang.indexOf('zh') >= 0)
|
||||
{
|
||||
blockTitle = $paramstype.options[$paramstype.selectedIndex].text + of + $code.options[$code.selectedIndex].text;
|
||||
}
|
||||
else
|
||||
{
|
||||
blockTitle = $code.options[$code.selectedIndex].text + of + $paramstype.options[$paramstype.selectedIndex].text;
|
||||
}
|
||||
const $paramstype = $('#paramstype')[0];
|
||||
|
||||
$('#title').val(blockTitle);
|
||||
}
|
||||
$('#title').val(blockTitle.replace('%1$s', $paramstype.options[$paramstype.selectedIndex].text).replace('%2$s', $code.options[$code.selectedIndex].text));
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->month = 'Month';
|
||||
$lang->block->selectProduct = "{$lang->productCommon} selection";
|
||||
$lang->block->of = ' von ';
|
||||
$lang->block->blockTitle = '%2$s von %1$s';
|
||||
$lang->block->remain = 'Left';
|
||||
$lang->block->allStories = 'All';
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->month = 'Month';
|
||||
$lang->block->selectProduct = "{$lang->productCommon} selection";
|
||||
$lang->block->of = ' of ';
|
||||
$lang->block->blockTitle = '%2$s of %1$s';
|
||||
$lang->block->remain = 'Left';
|
||||
$lang->block->allStories = 'All';
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->month = 'Month';
|
||||
$lang->block->selectProduct = "{$lang->productCommon} selection";
|
||||
$lang->block->of = ' di ';
|
||||
$lang->block->blockTitle = '%2%s di %1%s';
|
||||
$lang->block->remain = 'Left';
|
||||
$lang->block->allStories = 'All';
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ $lang->block->time = 'No';
|
||||
$lang->block->week = 'Week';
|
||||
$lang->block->month = 'Month';
|
||||
$lang->block->selectProduct = 'Product selection';
|
||||
$lang->block->of = ' thực ';
|
||||
$lang->block->blockTitle = '%1$s thực %2$s';
|
||||
$lang->block->remain = 'Left';
|
||||
|
||||
$lang->block->createBlock = 'Thêm Block';
|
||||
|
||||
@@ -77,7 +77,7 @@ $lang->block->time = '第';
|
||||
$lang->block->week = '周';
|
||||
$lang->block->month = '月';
|
||||
$lang->block->selectProduct = "选择{$lang->productCommon}";
|
||||
$lang->block->of = '的';
|
||||
$lang->block->blockTitle = '%1$s的%2$s';
|
||||
$lang->block->remain = '剩余工时';
|
||||
$lang->block->allStories = '总需求';
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ $lang->block->time = '第';
|
||||
$lang->block->week = '周';
|
||||
$lang->block->month = '月';
|
||||
$lang->block->selectProduct = '選擇產品';
|
||||
$lang->block->of = '的';
|
||||
$lang->block->blockTitle = '%1$s的%2$s';
|
||||
$lang->block->remain = '剩餘工時';
|
||||
|
||||
$lang->block->createBlock = '添加區塊';
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace zin;
|
||||
|
||||
set::title($title);
|
||||
jsVar('dashboard', $dashboard);
|
||||
jsVar('of', $lang->block->of);
|
||||
jsVar('blockTitle', $lang->block->blockTitle);
|
||||
|
||||
$paramsRows = array();
|
||||
$showModules = ($dashboard == 'my' && $modules);
|
||||
@@ -26,7 +26,12 @@ if($module == 'scrumtest' && $code != 'all')
|
||||
else
|
||||
{
|
||||
$typeOptions = isset($params['type']['options']) ? $params['type']['options'] : array();
|
||||
$blockTitle = (count($typeOptions) ? $typeOptions[array_keys($typeOptions)[0]] . $lang->block->of : '') . zget($codes, $code);
|
||||
$blockTitle = zget($codes, $code);
|
||||
if(!empty($typeOptions))
|
||||
{
|
||||
$typeName = empty($typeOptions) ? '' : $typeOptions[array_keys($typeOptions)[0]];
|
||||
$blockTitle = vsprintf($lang->block->blockTitle, array($typeName, $blockTitle));
|
||||
}
|
||||
}
|
||||
|
||||
foreach($params as $key => $row)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace zin;
|
||||
|
||||
set::title($title);
|
||||
jsVar('blockID', $block->id);
|
||||
jsVar('of', $lang->block->of);
|
||||
jsVar('blockTitle', $lang->block->blockTitle);
|
||||
|
||||
$paramsRows = array();
|
||||
$showModules = ($dashboard == 'my' && $modules);
|
||||
|
||||
Reference in New Issue
Block a user