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

This commit is contained in:
wangyidong
2018-05-24 16:54:31 +08:00
10 changed files with 58 additions and 49 deletions
+1
View File
@@ -7,3 +7,4 @@
#addChildModal form > .form-control {margin-bottom: 8px;}
#addChildModal .modal-dialog {max-width: 360px;}
#deptTree li {padding-left: 20px;}
+1 -1
View File
@@ -147,7 +147,7 @@ class deptModel extends model
$deptMenu[$dept->parent] .= "</li>\n";
}
$lastMenu = "<ul class='tree tree-lines'>" . @array_pop($deptMenu) . "</ul>\n";
$lastMenu = "<ul class='tree' data-ride='tree' data-name='tree-dept'>" . @array_pop($deptMenu) . "</ul>\n";
return $lastMenu;
}
+14 -7
View File
@@ -23,7 +23,7 @@
<div class='panel-title'><?php echo $title;?></div>
</div>
<div class='panel-body'>
<ul class='tree-lines' id='deptTree'></ul>
<ul data-name='tree-dept' id='deptTree'></ul>
</div>
</div>
</div>
@@ -85,10 +85,19 @@ $(function()
name: 'deptTree',
initialState: 'preserve',
data: data,
sortable:
{
lazy: true,
nested: true,
canMoveHere: function($ele, $target)
{
if($ele && $target && $ele.parent().closest('li').attr('data-id') !== $target.parent().closest('li').attr('data-id')) return false;
}
},
itemCreator: function($li, item)
{
var link = item.id !== undefined ? ('<a href="' + createLink('dept', 'browse', 'dept={0}'.format(item.id)) + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var $toggle = $('<span class="dept-name" data-id="' + item.id + '">' + link + '</span>');
var $toggle = $('<span class="dept-name module-name" data-id="' + item.id + '">' + link + '</span>');
if(item.manager)
{
$toggle.append('&nbsp; <span class="dept-manager text-muted"><i class="icon icon-user"></i> ' + item.managerName + '</span>');
@@ -101,19 +110,19 @@ $(function()
sort:
{
title: '<?php echo $lang->dept->dragAndSort ?>',
template: '<a class="sort-handler" data-toggle="tooltip" href="javascript:;"><?php echo $lang->sort;?></a>'
template: '<a class="sort-handler" href="javascript:;"><?php echo $lang->sort;?></a>'
},
edit:
{
linkTemplate: '<?php echo helper::createLink('dept', 'edit', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->edit ?>',
template: '<a data-toggle="tooltip" href="javascript:;" data-width="600"><?php echo $lang->edit?></a>'
template: '<a href="javascript:;" data-width="600"><?php echo $lang->edit?></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('dept', 'delete', "deptid={0}"); ?>',
title: '<?php echo $lang->dept->delete ?>',
template: '<a data-toggle="tooltip" href="javascript:;"><?php echo $lang->delete?></a>'
template: '<a href="javascript:;"><?php echo $lang->delete?></a>'
}
},
action: function(event)
@@ -163,8 +172,6 @@ $(function()
$(this).addClass('hover');
e.stopPropagation();
});
$tree.find('[data-toggle="tooltip"]').tooltip();
});
</script>
<?php include '../../common/view/footer.html.php';?>
File diff suppressed because one or more lines are too long
+11 -18
View File
@@ -71,32 +71,25 @@ function setStoryRelated(num)
/* Toggle zero task story. */
function toggleZeroTaskStory()
{
if($('#zeroTaskStory').hasClass('zeroTask'))
{
$('#zeroTaskStory').removeClass('zeroTask');
zeroTask = false;
}
else
{
$('#zeroTaskStory').addClass('zeroTask');
zeroTask = true;
}
var $toggle = $('#zeroTaskStory').toggleClass('checked');
var zeroTask = $toggle.hasClass('checked');
$.cookie('zeroTask', zeroTask, {expires:config.cookieLife, path:config.webRoot});
$('select[name^="story"]').each(function()
{
selectVal = $(this).val();
$(this).find('option').each(function()
var $select = $(this);
var selectVal = $select.val();
$select.find('option').each(function()
{
value = $(this).attr('value');
$(this).show();
var $option = $(this);
var value = $option.attr('value');
$option.show();
if(value != 'ditto' && storyTasks[value] > 0 && zeroTask)
{
$(this).hide();
if(selectVal == value) selectVal = '';
$option.hide();
if(selectVal == value) selectVal = '';
}
})
$(this).val(selectVal);
$(this).trigger("chosen:updated");
$select.val(selectVal).trigger("chosen:updated");
})
}
+10 -8
View File
@@ -12,19 +12,21 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2>
<div id="mainContent" class="main-content fade">
<div class="main-header clearfix">
<h2 class="pull-left">
<?php if($parent):?>
<span class='pull-left'><?php echo $parentTitle;?></span>
<?php echo $lang->task->batchCreateChildren;?>
<?php else:?>
<?php echo $lang->task->batchCreate;?>
<?php endif;?>
<?php if($project->type != 'ops'):?>
<span><small><a href='javascript:toggleZeroTaskStory();' id='zeroTaskStory'><?php echo $lang->story->zeroTask;?><i class='icon icon-sm icon-close'></i></a></small></span>
<?php endif;?>
</h2>
<?php if($project->type != 'ops'):?>
<a class="checkbox-primary pull-left" id='zeroTaskStory' href='javascript:toggleZeroTaskStory();'>
<label><?php echo $lang->story->zeroTask;?></label>
</a>
<?php endif;?>
<div class="pull-right btn-toolbar">
<button type='button' data-toggle="importLinesModal" class="btn btn-info"><?php echo $lang->pasteText;?></button>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=task&section=custom&key=batchCreateFields')?>
@@ -115,7 +117,7 @@
<?php echo html::input("name[$i]", '', "class='form-control input-story-title' autocomplete='off'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<ul class="dropdown-menu clearfix pull-right">
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-icon='color' data-wrapper='input-control-icon-right' data-update-color='#name\\[$i\\]'");?>
@@ -133,7 +135,7 @@
</tr>
<?php endfor;?>
<tr>
<td colspan='<?php echo $colspan?>' class='text-center'>
<td colspan='<?php echo $colspan?>' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+12 -6
View File
@@ -13,10 +13,10 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('dittoNotice', $this->lang->task->dittoNotice);?>
<div id='mainContent' class='main-content'>
<div id='mainContent' class='main-content fade'>
<div class='main-header'>
<h2>
<?php echo $lang->task->common . $lang->colon . $lang->task->batchEdit;?>
<?php echo $lang->task->common . $lang->colon . $lang->task->batchEdit;?>
<?php if($projectName):?>
<small class='text-muted'><?php echo html::icon($lang->icons['project']) . ' ' . $lang->task->project . $lang->colon . ' ' . $projectName;?></small>
<?php endif;?>
@@ -85,9 +85,15 @@
<?php $disableHour = isset($teams[$taskID]) ? "disabled='disabled'" : '';?>
<td><?php echo $taskID . html::hidden("taskIDList[$taskID]", $taskID);?></td>
<td style='overflow:visible' title='<?php echo $tasks[$taskID]->name?>'>
<div class='input-group'>
<?php echo html::hidden("colors[$taskID]", $tasks[$taskID]->color, "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->task->colorTag}' data-update-text='#names\\[{$taskID}\\]'");?>
<?php echo html::input("names[$taskID]", $tasks[$taskID]->name, "class='form-control' autocomplete='off'");?>
<div class="input-control has-icon-right">
<?php echo html::input("names[$taskID]", $tasks[$taskID]->name, "class='form-control' autocomplete='off'");?>
<div class="colorpicker">
<button type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><span class="color-bar"></span><i class="ic"></i></button>
<ul class="dropdown-menu clearfix">
<li class="heading"><?php echo $lang->story->colorTag;?><i class="icon icon-close"></i></li>
</ul>
<?php echo html::hidden("colors[$taskID]", $tasks[$taskID]->color, "data-provide='colorpicker' data-wrapper='input-control-icon-right' data-icon='color' data-btn-tip='{$lang->task->colorTag}' data-update-text='#names\\[{$taskID}\\]'");?>
</div>
</div>
</td>
<td class='text-left<?php echo zget($visibleFields, 'module', ' hidden')?>' style='overflow:visible'><?php echo html::select("modules[$taskID]", $modules, $tasks[$taskID]->module, "class='form-control chosen'")?></td>
@@ -109,7 +115,7 @@
</tbody>
<tfoot>
<tr>
<td colspan='<?php echo count($visibleFields) + 3;?>' class='text-center'>
<td colspan='<?php echo count($visibleFields) + 3;?>' class='text-center form-actions'>
<?php echo html::submitButton('', '', 'btn btn-wide btn-primary');?>
<?php echo html::backButton('', '', 'btn btn-wide');?>
</td>
+2 -2
View File
@@ -186,8 +186,8 @@ $(function()
{
sort:
{
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler"><?php echo $lang->tree->sort ?></a>'
title: '<?php echo $lang->tree->dragAndSort ?>',
template: '<a class="sort-handler"><?php echo $lang->tree->sort ?></a>'
},
edit:
{
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long