Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
chenfeiCF
2018-05-23 15:14:40 +08:00
15 changed files with 72 additions and 57 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ class admin extends control
{
$data = fixer::input('post')->get();
$this->loadModel('setting')->setItems('system.common.safe', $data);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->admin->safe->common . $this->lang->colon . $this->lang->admin->safe->set;
$this->view->position[] = $this->lang->admin->safe->common;
+2 -2
View File
@@ -19,7 +19,7 @@
</div>
<div id='mainContent' class='main-content'>
<div class='center-block mw-800px'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<table class='table table-form'>
<tr>
<th style='width:130px'><?php echo $lang->admin->safe->password?></th>
@@ -36,7 +36,7 @@
</tr>
<tr>
<th><?php echo $lang->admin->safe->weak?></th>
<td colspan='2'><?php echo html::textarea('weak', $config->safe->weak, "class='form-control' rows='4'")?></td>
<td colspan='2'><?php echo html::textarea('weak', $config->safe->weak, "class='form-control' style='height:100px'")?></td>
</tr>
<tr>
<th><?php echo $lang->admin->safe->changeWeak?></th>
+12 -12
View File
@@ -119,29 +119,29 @@ class custom extends control
/* Invalid key. It should be numbers. (It includes severityList in bug module and priList in stroy, task, bug, testcasea, testtask and todo module.) */
if($field == 'priList' or $field == 'severityList')
{
if(!is_numeric($key) or $key > 255) die(js::alert($this->lang->custom->notice->invalidNumberKey));
if(!is_numeric($key) or $key > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidNumberKey));
}
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) die(js::alert($this->lang->custom->notice->invalidStringKey));
if(!empty($key) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_0-9]+$/')) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey));
/* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */
if($field == 'roleList' or $module == 'todo' and $field == 'typeList')
{
if(strlen($key) > 10) die(js::alert($this->lang->custom->notice->invalidStrlen['ten']));
if(strlen($key) > 10) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['ten']));
}
/* The length of sourceList in story module and typeList in task module is less than 20, check it when saved. */
if($field == 'sourceList' or $module == 'task' and $field == 'typeList')
{
if(strlen($key) > 20) die(js::alert($this->lang->custom->notice->invalidStrlen['twenty']));
if(strlen($key) > 20) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twenty']));
}
/* The length of stageList in testcase module is less than 255, check it when saved. */
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) die(js::alert($this->lang->custom->notice->invalidStrlen['twoHundred']));
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twoHundred']));
/* The length of field that in bug and testcase module and reasonList in story and task module is less than 30, check it when saved. */
if($module == 'bug' or $field == 'reasonList' or $module == 'testcase')
{
if(strlen($key) > 30) die(js::alert($this->lang->custom->notice->invalidStrlen['thirty']));
if(strlen($key) > 30) $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['thirty']));
}
}
@@ -156,8 +156,8 @@ class custom extends control
$this->custom->setItem("{$lang}.{$module}.{$field}.{$key}.{$system}", $value);
}
}
if(dao::isError()) die(js::error(dao::getError()));
die(js::locate($this->createLink('custom', 'set', "module=$module&field=$field&lang=" . str_replace('-', '_', $lang)), 'parent'));
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
/* Check whether the current language has been customized. */
@@ -237,7 +237,7 @@ class custom extends control
$this->dao->update(TABLE_BLOCK)->set("`title` = REPLACE(`title`, '{$projectCommonList[$oldProjectIndex]}', '{$projectCommonList[$newProjectIndex]}')")->where('source')->eq('project')->exec();
}
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->flow;
@@ -250,7 +250,7 @@ class custom extends control
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->working;
@@ -272,7 +272,7 @@ class custom extends control
if($_POST)
{
$this->custom->saveRequiredFields($moduleName);
die(js::reload('parent.parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
foreach($this->config->custom->requiredModules as $requiredModule) $this->app->loadLang($requiredModule);
@@ -306,7 +306,7 @@ class custom extends control
if($_POST)
{
$this->loadModel('setting')->setItem('system.common.global.scoreStatus', $this->post->score);
die(js::reload('parent'));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
}
$this->view->title = $this->lang->custom->score;
+1 -1
View File
@@ -14,7 +14,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->flow?></strong>
+1 -1
View File
@@ -26,7 +26,7 @@
</div>
</div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->$moduleName->common?></strong>
+2 -2
View File
@@ -13,7 +13,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->score?></strong>
@@ -25,7 +25,7 @@
<td>
<?php $checkedKey = isset($config->global->scoreStatus) ? $config->global->scoreStatus : 0;?>
<?php foreach($lang->custom->scoreStatus as $key => $value):?>
<p><label class="radio-inline"><input type="radio" name="flow" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="flow<?php echo $key;?>"><?php echo $value;?></label></p>
<p><label class="radio-inline"><input type="radio" name="score" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="score<?php echo $key;?>"><?php echo $value;?></label></p>
<?php endforeach;?>
</td>
</tr>
+1 -1
View File
@@ -45,7 +45,7 @@ EOT;
</div>
</div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->object[$module] . $lang->arrow . $lang->custom->$module->fields[$field]?></strong>
+1 -1
View File
@@ -14,7 +14,7 @@
<div id='mainContent' class='main-row'>
<div class='side-col' id='sidebar'></div>
<div class='main-col main-content'>
<form method='post' target='hiddenwin'>
<form class="load-indicator main-form form-ajax" method='post'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->working?></strong>
+9 -1
View File
@@ -1,9 +1,17 @@
#versionMenu {margin-left: 20px;}
#versionMenu .dropdown-menu {min-width: 130px; max-height:180px;overflow-y:auto;}
#featureList {padding: 0 20px 20px; min-height:200px;}
#mainContent {min-height: 240px;}
#featureList {padding: 0 10px;}
#featureList > .item {padding: 0 0 10px 0;}
#featureList > .item > h3 {color: #114f8e; font-size: 16px; margin: 0; padding: 10px 0}
#featureList > .item > .desc {color: #666; padding-left: 18px;}
#featureList > .item > .more-link {color: #666; padding-left: 18px;}
#featureList > .item > .more {display: none}
#featureList + #details {padding: 0;}
#details .details-list {display: none; padding: 10px; background: #f1f1f1; border-radius: 4px;}
#details.show-details .details-list {display: block;}
#details > .btn > .icon-angle-right {transition: transform .2s; display: inline-block;}
#details.show-details > .btn > .icon-angle-right {transform: rotate(90deg)}
#details.show-details > .btn:focus {border-radius: 4px 4px 0 0;}
#details.show-details > .btn:focus + .details-list {border-radius: 0 0 4px 4px;}
+35 -29
View File
@@ -1,35 +1,41 @@
<?php include '../../common/view/header.lite.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block mw-800px'>
<div class='main-header clearfix'>
<h2 class='pull-left'><?php echo $lang->changeLog ?></h2>
<div class='btn-toolbar pull-left'>
<div class='dropdown' id='versionMenu'>
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $version) ?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php foreach(array_keys($lang->misc->feature->all) as $versionName):?>
<li<?php echo $versionName === $version ? " class='active'" : '' ?>>
<?php echo html::a(helper::createLink('misc', 'changeLog', "version=$versionName"), $versionName === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $versionName));?>
</li>
<?php endforeach; ?>
</ul>
<main id="main">
<div class="container">
<div id='mainContent' class='main-content'>
<div class='center-block mw-800px'>
<div class='main-header clearfix'>
<h2 class='pull-left'><?php echo $lang->changeLog ?></h2>
<div class='btn-toolbar pull-left'>
<div class='dropdown' id='versionMenu'>
<button class='btn dropdown-toggle' type='button' data-toggle='dropdown'><?php echo $version === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $version) ?> <span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php foreach(array_keys($lang->misc->feature->all) as $versionName):?>
<li<?php echo $versionName === $version ? " class='active'" : '' ?>>
<?php echo html::a(helper::createLink('misc', 'changeLog', "version=$versionName"), $versionName === 'latest' ? $lang->misc->feature->lastest : ($lang->misc->releaseDate[$versionName] . ' ' . $versionName));?>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
</div>
<div id='featureList' class='article-content'>
<?php $idx = count($features) == 1 ? '' : 1; ?>
<?php foreach ($features as $feature):?>
<div class='item'>
<h3><?php echo $idx . ($idx == '' ? '' : '. ') . $feature['title'] ?></h3>
<div class='desc'><?php echo $feature['desc'] ?></div>
</div>
<?php $idx++; ?>
<?php endforeach; ?>
</div>
<?php if($detailed and $this->app->getClientLang() != 'en'):?>
<div id="details" class='article-content'>
<a href='###' class="btn btn-link text-primary btn-block text-left" onclick="$('#details').toggleClass('show-details')"><i class="icon icon-angle-right"></i> <?php echo $lang->misc->feature->detailed;?></a>
<div class='details-list'><?php echo $detailed;?></div>
</div>
<?php endif;?>
</div>
</div>
<div id='featureList' class='article-content'>
<?php $idx = count($features) == 1 ? '' : 1; ?>
<?php foreach ($features as $feature):?>
<div class='item'>
<h3><?php echo $idx . ($idx == '' ? '' : '. ') . $feature['title'] ?></h3>
<div class='desc'><?php echo $feature['desc'] ?></div>
</div>
<?php $idx++; ?>
<?php endforeach; ?>
<?php if($detailed and $this->app->getClientLang() != 'en'):?>
<div> <a href='###' onclick="$('.detailed').toggle()"><?php echo $lang->misc->feature->detailed;?></a></div>
<div class='detailed hide'><?php echo $detailed;?></div>
<?php endif;?>
</div>
</div>
</div>
</main>
<?php include '../../common/view/footer.lite.html.php';?>
+1
View File
@@ -1,2 +1,3 @@
.todoType {margin-top: 6px;}
.dateSwitcher {margin-top: 6px;}
.form-horizontal .required::after{right: -10px;}
+1 -1
View File
@@ -23,7 +23,7 @@
<table class='table table-form'>
<tr>
<th class='w-80px'><?php echo $lang->todo->date;?></th>
<td class='w-p25-f'>
<td class='w-300px'>
<div class='input-group'>
<?php echo html::input('date', $date, "class='form-control form-date'");?>
<span class='input-group-addon switchDate'>
+1 -1
View File
@@ -91,7 +91,7 @@
<div class="row form-group">
<label class="col-sm-1"><?php echo $lang->todo->name;?></label>
<div class="col-sm-10">
<div id='nameBox'>
<div id='nameBox' class='required'>
<?php
$readType = ($todo->type == 'bug' or $todo->type == 'task') ? 'readonly' : '';
echo html::input('name', $todo->name, "$readType class='form-control' autocomplete='off'");
+3 -3
View File
@@ -161,9 +161,9 @@
unset($_GET['onlybody']);
echo "<button type='button' class='btn btn-success dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
echo "<ul class='dropdown-menu pull-right' role='menu'>";
if($createStoryPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['story'], '', "data-toggle='modal' data-target='#productModal' data-moveable='true' data-position='193px' id='toStoryLink'") . '</li>';
if($createTaskPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['task'], '', "data-toggle='modal' data-target='#projectModal' data-moveable='true' data-position='193px' id='toTaskLink'") . '</li>';
if($createBugPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['bug'], '', "data-toggle='modal' data-target='#productModal' data-moveable='true' data-position='193px' id='toBugLink'") . '</li>';
if($createStoryPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['story'], '', "data-toggle='modal' data-target='#productModal' data-moveable='true' data-position='center' id='toStoryLink'") . '</li>';
if($createTaskPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['task'], '', "data-toggle='modal' data-target='#projectModal' data-moveable='true' data-position='center' id='toTaskLink'") . '</li>';
if($createBugPriv) echo '<li>' . html::a('###', $lang->todo->reasonList['bug'], '', "data-toggle='modal' data-target='#productModal' data-moveable='true' data-position='center' id='toBugLink'") . '</li>';
echo "</ul>";
if($isonlybody) $_GET['onlybody'] = 'yes';
}
+1 -1
View File
@@ -25,7 +25,7 @@
<div class='btn-toolbar pull-right'>
<div class='btn-group'>
<div class='btn-group' id='createActionMenu'>
<?php common::printIcon('webhook', 'create', '', '', 'button', '', '', 'btn-primary');?>
<?php if(common::hasPriv('webhook', 'create')) echo html::a($this->createLink('webhook', 'create'), "<i class='icon-plus'></i> {$lang->webhook->create}", '', "class='btn btn-primary'");?>
</div>
</div>
</div>