* Fix bug#2942,15431,21981
This commit is contained in:
@@ -248,7 +248,8 @@ class jobModel extends model
|
||||
|
||||
$this->dao->insert(TABLE_JOB)->data($job)
|
||||
->batchCheck($this->config->job->create->requiredFields, 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule', "atDay,atTime", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule' and $job->atDay !== '0', "atDay", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule', "atTime", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'commit', "comment", 'notempty')
|
||||
->batchCheckIF(($this->post->repoType == 'Subversion' and $job->triggerType == 'tag'), "svnDir", 'notempty')
|
||||
->batchCheckIF($job->frame === 'sonarqube', "sonarqubeServer,projectKey", 'notempty')
|
||||
@@ -366,7 +367,8 @@ class jobModel extends model
|
||||
|
||||
$this->dao->update(TABLE_JOB)->data($job)
|
||||
->batchCheck($this->config->job->edit->requiredFields, 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule', "atDay,atTime", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule' and $job->atDay !== '0', "atDay", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'schedule', "atTime", 'notempty')
|
||||
->batchCheckIF($job->triggerType === 'commit', "comment", 'notempty')
|
||||
->batchCheckIF(($this->post->repoType == 'Subversion' and $job->triggerType == 'tag'), "svnDir", 'notempty')
|
||||
->batchCheckIF($job->frame === 'sonarqube', "sonarqubeServer,projectKey", 'notempty')
|
||||
|
||||
@@ -783,6 +783,7 @@ class programplanModel extends model
|
||||
->batchCheck($this->config->programplan->edit->requiredFields, 'notempty')
|
||||
->checkIF($plan->end != '0000-00-00', 'end', 'ge', $plan->begin)
|
||||
->checkIF($plan->percent != false, 'percent', 'float')
|
||||
->checkIF((!empty($plan->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != {$planID} and type in ('sprint','stage') and `project` = {$oldPlan->project}")
|
||||
->where('id')->eq($planID)
|
||||
->exec();
|
||||
|
||||
|
||||
@@ -189,3 +189,5 @@ h3 {font-size: 16px;}
|
||||
#submitLabel {text-align: left;}
|
||||
|
||||
.header-btn .btn > .text {text-overflow: unset !important;}
|
||||
|
||||
#repoPageSize {right: 90px;}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
$pathInfo = '&root=' . $this->repo->encodePath(empty($path) ? '/' : $path);
|
||||
if(isset($entry)) $pathInfo .= '&type=file';
|
||||
?>
|
||||
<?php js::set('paramsBase', "repoID=$repoID&path=" . $this->repo->encodePath($path) . "&objectID=$objectID&type=$logType");?>
|
||||
<form id='logForm' class='main-table' data-ride='table' method='post'>
|
||||
<table class='table table-fixed'>
|
||||
<thead>
|
||||
@@ -52,6 +53,7 @@ if(isset($entry)) $pathInfo .= '&type=file';
|
||||
<?php if(common::hasPriv('repo', 'diff')) echo html::submitButton($lang->repo->diff, '', count($revisions) < 2 ? 'disabled btn btn-primary' : 'btn btn-primary')?>
|
||||
<?php echo html::a($this->repo->createLink('log', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($path) . "&revision=HEAD&type=$logType"), $lang->repo->allLog, '', "class='allLogs' data-app='{$this->app->tab}'");?>
|
||||
<div class='pull-right'>
|
||||
<ul id="repoPageSize" class="pager" data-ride="pager" data-elements="size_menu" data-rec-total="<?php echo $pager->recTotal;?>" data-rec-per-page="<?php echo $pager->recPerPage;?>" data-page="<?php echo $pager->pageID;?>"></ul>
|
||||
<div class='btn-group'>
|
||||
<?php
|
||||
$prePage = $pager->pageID == 1 ? 1 : $pager->pageID - 1;
|
||||
@@ -84,4 +86,15 @@ $("input:checkbox[name='revision[]']").click(function(){
|
||||
$("input:checkbox[name='revision[]']").each(function(){$(this).attr("disabled", false)});
|
||||
}
|
||||
});
|
||||
|
||||
$(function()
|
||||
{
|
||||
var myPager = $('#repoPageSize').data('zui.pager');
|
||||
if(!myPager) $('#repoPageSize').pager();
|
||||
|
||||
$('#repoPageSize').on('onPageChange', function(e, state, oldState) {
|
||||
var link = createLink('repo', 'ajaxSideCommits', paramsBase + '&recTotal=' + state.recTotal + '&recPerPage=' + state.recPerPage + '&pageID=' + state.page);
|
||||
$('#sidebar .side-body').load(link);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user