Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -177,7 +177,6 @@ class backup extends control
|
||||
|
||||
if($reload == 'yes')
|
||||
{
|
||||
echo js::alert($this->lang->backup->success->backup);
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -15,6 +15,7 @@ $(function()
|
||||
$('.rmPHPHeader').click(function()
|
||||
{
|
||||
$('#waitting .modal-body #backupType').html(rmPHPHeader);
|
||||
$('#waitting .modal-content #message').hide();
|
||||
$('#waitting').modal('show');
|
||||
})
|
||||
|
||||
@@ -26,6 +27,7 @@ $(function()
|
||||
if(result)
|
||||
{
|
||||
$('#waitting .modal-body #backupType').html(restore);
|
||||
$('#waitting .modal-content #message').hide();
|
||||
$('#waitting').modal('show');
|
||||
|
||||
$.getJSON(url, function(response)
|
||||
|
||||
@@ -122,19 +122,19 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printIcon('bug', 'report', "productID=$productID&browseType=$browseType&branchID=$branch&moduleID=$moduleID", '', 'button', 'bar-chart muted');?>
|
||||
<?php if(common::hasPriv('bug', 'export')):?>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'>
|
||||
<i class="icon icon-export muted"></i> <span class="text"> <?php echo $lang->export;?></span> <span class="caret"></span></button>
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$link = $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType");
|
||||
echo "<li>" . html::a($link, $lang->bug->export, '', "class='export'") . "</li>";
|
||||
$class = common::hasPriv('bug', 'export') ? "" : "class='disabled'";
|
||||
$misc = common::hasPriv('bug', 'export') ? "class='export'" : "class='disabled'";
|
||||
$link = common::hasPriv('bug', 'export') ? $this->createLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->bug->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
|
||||
if(commonModel::isTutorialMode())
|
||||
|
||||
@@ -25,7 +25,7 @@ class build extends control
|
||||
$buildID = $this->build->create($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('build', $buildID, 'opened');
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => 'loadBuildsFormParentPage'));//Code for task #5126.
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProjectBuilds($projectID)"));//Code for task #5126.
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,5 +18,3 @@ function loadBranches(productID)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
window.loadBuildsFormParentPage = function(){window.parent.loadProjectBuilds(0);}; //Code for task #5126.
|
||||
|
||||
@@ -306,9 +306,10 @@ class groupModel extends model
|
||||
*/
|
||||
public function updateUser($groupID)
|
||||
{
|
||||
$members = $this->post->members ? $this->post->members : array();
|
||||
$groupUsers = $this->dao->select('account')->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->fetchPairs('account');
|
||||
$newUsers = array_diff($this->post->members, $groupUsers);
|
||||
$delUsers = array_diff($groupUsers, $this->post->members);
|
||||
$newUsers = array_diff($members, $groupUsers);
|
||||
$delUsers = array_diff($groupUsers, $members);
|
||||
|
||||
$this->dao->delete()->from(TABLE_USERGROUP)->where('`group`')->eq($groupID)->andWhere('account')->in($delUsers)->exec();
|
||||
|
||||
|
||||
@@ -96,9 +96,10 @@
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export ?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('story', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -21,3 +21,4 @@
|
||||
#unlinkStoryList, #unlinkBugList {border-top: 1px solid #cbd0db;}
|
||||
.fixed-footer .text{color:#fff}
|
||||
ol, ul { padding-left: 20px; }
|
||||
#tabsNav .tab-pane>.main-table{border-radius: 0;}
|
||||
|
||||
@@ -46,9 +46,10 @@
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('task', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -56,13 +57,15 @@
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -122,9 +122,10 @@ js::set('browseType', $browseType);
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-export muted"></i> <span class="text"><?php echo $lang->export;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('task', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('task', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -133,13 +134,15 @@ js::set('browseType', $browseType);
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importTask') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('project', 'importBug') ? "class='import'" : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -38,11 +38,11 @@
|
||||
<?php
|
||||
$misc = common::hasPriv('project', 'importTask') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importTask') ? $this->createLink('project', 'importTask', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importTask, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('project', 'importBug') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('project', 'importBug') ? $this->createLink('project', 'importBug', "project=$project->id") : '#';
|
||||
echo "<li>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
echo "<li $misc>" . html::a($link, $lang->project->importBug, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -124,13 +124,15 @@
|
||||
</button>
|
||||
<ul class='dropdown-menu' id='exportActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'export') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID=$productID&orderBy=$orderBy&taskID=0&browseType=$browseType") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'exportTemplet') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID=$productID") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -138,13 +140,15 @@
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
<?php
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'import') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'import') ? "class='export'" : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'import') ? $this->createLink('testcase', 'import', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFile, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
$class = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$misc = common::hasPriv('testcase', 'importFromLib') ? '' : "class=disabled";
|
||||
$link = common::hasPriv('testcase', 'importFromLib') ? $this->createLink('testcase', 'importFromLib', "productID=$productID&branch=$branch") : '#';
|
||||
echo "<li $class>" . html::a($link, $lang->testcase->importFromLib, '', $misc) . "</li>";
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -19,8 +19,6 @@ function loadProjectRelated(projectID)
|
||||
*/
|
||||
function loadProjectBuilds(projectID)
|
||||
{
|
||||
if(!projectID) projectID = $('#project').val();
|
||||
|
||||
selectedBuild = $('#build').val();
|
||||
if(!selectedBuild) selectedBuild = 0;
|
||||
link = createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + $('#product').val() + '&varName=testTaskBuild&build=' + selectedBuild);
|
||||
|
||||
Reference in New Issue
Block a user