* adjust for task #2545,2547.
This commit is contained in:
@@ -64,7 +64,7 @@ $lang->duplicate = '%s has the same title';
|
||||
$lang->ipLimited = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body>Sorry, current IP is limited by Administrator. Please contact the Administrator to lift the restrictions.</body></html>";
|
||||
$lang->unfold = '+';
|
||||
$lang->fold = '-';
|
||||
$lang->checked2Hide = 'Hide checked field.';
|
||||
$lang->hideNotCheck = 'Hide not checked field';
|
||||
|
||||
$lang->preShortcutKey = '[Shortcut key:←]';
|
||||
$lang->nextShortcutKey = '[Shortcut key:→]';
|
||||
|
||||
@@ -64,7 +64,7 @@ $lang->duplicate = '已有相同标题的%s';
|
||||
$lang->ipLimited = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8' /></head><body>抱歉,管理员限制当前IP登录,请联系管理员解除限制。</body></html>";
|
||||
$lang->unfold = '+';
|
||||
$lang->fold = '-';
|
||||
$lang->checked2Hide = '选中字段在页面不显示';
|
||||
$lang->hideNotCheck = '页面隐藏取消选中字段';
|
||||
|
||||
$lang->preShortcutKey = '[快捷键:←]';
|
||||
$lang->nextShortcutKey = '[快捷键:→]';
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo $customLink?>'>
|
||||
<p><?php echo html::checkbox('fields', $customFields, $hiddenFields);?></p>
|
||||
<p><?php echo html::submitButton() . ' ' . $lang->checked2Hide?></p>
|
||||
<p><?php echo html::checkbox('fields', $customFields, $showFields);?></p>
|
||||
<p><?php echo html::submitButton() . ' ' . $lang->hideNotCheck?></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -155,14 +155,9 @@ class custom extends control
|
||||
public function ajaxSaveCustom($module, $section, $key)
|
||||
{
|
||||
$account = $this->app->user->account;
|
||||
if($_POST)
|
||||
{
|
||||
$this->loadModel('setting')->setItem("$account.$module.$section.$key", join(',', $this->post->fields));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->loadModel('setting')->deleteItems("owner=$account&module=$module§ion=$section&key=$key");
|
||||
}
|
||||
$fields = $this->post->fields;
|
||||
if(is_array($fields)) $fields = join(',', $fields);
|
||||
$this->loadModel('setting')->setItem("$account.$module.$section.$key", $fields);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@ $config->story->list->exportFields = '
|
||||
childStories, linkStories, duplicateStory, files';
|
||||
$config->story->list->customCreateFields = 'source,verify,pri,estimate,mailto,keywords';
|
||||
|
||||
$config->story->custom = new stdclass();
|
||||
$config->story->custom->create = $config->story->list->customCreateFields;
|
||||
|
||||
$config->story->datatable = new stdclass();
|
||||
$config->story->datatable->defaultField = array('id', 'pri', 'title', 'plan', 'source', 'openedBy', 'assignedTo', 'estimate', 'status', 'stage', 'actions');
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ class story extends control
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->story->list->customCreateFields) as $field) $customFields[$field] = $this->lang->story->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->hiddenFields = isset($this->config->story->custom->create) ? $this->config->story->custom->create : '';
|
||||
$this->view->showFields = $this->config->story->custom->create;
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->create;
|
||||
$this->view->position[] = html::a($this->createLink('product', 'browse', "product=$productID&branch=$branch"), $product->name);
|
||||
|
||||
@@ -145,7 +145,7 @@ class storyModel extends model
|
||||
->cleanInt('product,module,pri,plan')
|
||||
->cleanFloat('estimate')
|
||||
->callFunc('title', 'trim')
|
||||
->setDefault('plan', '')
|
||||
->setDefault('plan,verify', '')
|
||||
->add('openedBy', $this->app->user->account)
|
||||
->add('openedDate', $now)
|
||||
->add('assignedDate', 0)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<?php if(strpos($hiddenFields, 'source') === false):?>
|
||||
<?php if(strpos(",$showFields,", ',source,') !== false):?>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo $lang->story->source?></span>
|
||||
@@ -93,8 +93,8 @@
|
||||
<?php echo html::input('title', $storyTitle, "class='form-control'");?>
|
||||
</div>
|
||||
<?php
|
||||
$hiddenPri = strpos($hiddenFields, 'pri') !== false;
|
||||
$hiddenEst = strpos($hiddenFields, 'estimate') !== false;
|
||||
$hiddenPri = strpos(",$showFields,", ',pri,') === false;
|
||||
$hiddenEst = strpos(",$showFields,", ',estimate,') === false;
|
||||
?>
|
||||
<?php if(!$hiddenPri or !$hiddenEst):?>
|
||||
<?php $widthClass = ($hiddenPri or $hiddenEst) ? 'w-100px' : 'w-230px';?>
|
||||
@@ -129,15 +129,15 @@
|
||||
<th><?php echo $lang->story->spec;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('spec', $spec, "rows='9' class='form-control'");?><div class='help-block'><?php echo $lang->story->specTemplate;?></div></td>
|
||||
</tr>
|
||||
<?php if(strpos($hiddenFields, 'verify') === false):?>
|
||||
<?php if(strpos(",$showFields,", ',verify,') !== false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->story->verify;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('verify', $verify, "rows='6' class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$hiddenMailto = strpos($hiddenFields, 'mailto') !== false;
|
||||
$hiddenKeywords = strpos($hiddenFields, 'keywords') !== false;
|
||||
$hiddenMailto = strpos(",$showFields,", ',mailto,') === false;
|
||||
$hiddenKeywords = strpos(",$showFields,", ',keywords,') === false;
|
||||
?>
|
||||
<?php if(!$hiddenMailto or !$hiddenKeywords):?>
|
||||
<?php $colspan = ($hiddenMailto or $hiddenKeywords) ? "colspan='2'" : '';?>
|
||||
|
||||
@@ -42,6 +42,9 @@ $config->task->exportFields = '
|
||||
';
|
||||
$config->task->customCreateFields = 'story,estStarted,deadline,mailto,pri,estimate';
|
||||
|
||||
$config->task->custom = new stdclass();
|
||||
$config->task->custom->create = $config->task->customCreateFields;
|
||||
|
||||
$config->task->datatable = new stdclass();
|
||||
$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'finishedDate', 'estimate', 'consumed', 'left', 'story', 'actions');
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ class task extends control
|
||||
/* Set Custom*/
|
||||
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->hiddenFields = isset($this->config->task->custom->create) ? $this->config->task->custom->create : '';
|
||||
$this->view->showFields = $this->config->task->custom->create;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<button type='button' class='btn btn-link<?php echo $task->type == 'affair' ? '' : ' hidden'?>' id='selectAllUser'><?php echo $lang->task->selectAllUser ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if(strpos($hiddenFields, 'story') === false):?>
|
||||
<?php if(strpos(",$showFields,", ',story,') !== false):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
@@ -64,8 +64,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$hiddenPri = strpos($hiddenFields, 'pri') !== false;
|
||||
$hiddenEst = strpos($hiddenFields, 'estimate') !== false;
|
||||
$hiddenPri = strpos(",$showFields,", ',pri,') === false;
|
||||
$hiddenEst = strpos(",$showFields,", ',estimate,') === false;
|
||||
?>
|
||||
<?php if(!$hiddenPri or !$hiddenEst):?>
|
||||
<?php $widthClass = ($hiddenPri or $hiddenEst) ? 'w-120px' : 'w-250px';?>
|
||||
@@ -101,9 +101,9 @@
|
||||
<td colspan='3'><?php echo html::textarea('desc', $task->desc, "rows='10' class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php
|
||||
$hiddenEstStarted = strpos($hiddenFields, 'estStarted') !== false;
|
||||
$hiddenDeadline = strpos($hiddenFields, 'deadline') !== false;
|
||||
$hiddenMailto = strpos($hiddenFields, 'mailto') !== false;
|
||||
$hiddenEstStarted = strpos(",$showFields,", ',estStarted,') === false;
|
||||
$hiddenDeadline = strpos(",$showFields,", ',deadline,') === false;
|
||||
$hiddenMailto = strpos(",$showFields,", ',mailto,') === false;
|
||||
?>
|
||||
<?php if(!$hiddenEstStarted or !$hiddenDeadline or !$hiddenMailto):?>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user