block / unblock && sprint closed
This commit is contained in:
@ -17,6 +17,9 @@
|
||||
--colorfttitlelight-darker: {{ app.session.get('colorfttitlelight-darker')|raw }};
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/* COLOR BODY */
|
||||
|
||||
body {
|
||||
|
@ -63,6 +63,11 @@
|
||||
<div class="card-header">
|
||||
<i class="fa fa-pencil-alt fa-fw"></i> Sprints
|
||||
<button id="addsprint" type="button" class="btn float-right fa fa-plus"></button>
|
||||
|
||||
<div class="custom-control custom-switch float-right">
|
||||
<input type="checkbox" class="custom-control-input" id="viewsprintclosed">
|
||||
<label class="custom-control-label" for="viewsprintclosed">Afficher les sprint clos</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="scrumsprints" class="card-body">
|
||||
@ -423,6 +428,15 @@
|
||||
loadscrumsprints();
|
||||
});
|
||||
|
||||
$('#viewsprintclosed').change(function() {
|
||||
if(this.checked) {
|
||||
$(".sprintclosed").removeClass("hidden");
|
||||
}
|
||||
else {
|
||||
$(".sprintclosed").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
function loadscrumsprints() {
|
||||
$("#scrumsprints").empty();
|
||||
$.ajax({
|
||||
@ -431,7 +445,17 @@
|
||||
success: function(datas, dataType)
|
||||
{
|
||||
jQuery.each(datas, function(i, wid) {
|
||||
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between">';
|
||||
style='';
|
||||
classname='';
|
||||
if(wid.closed) {
|
||||
style='background-color:#cdcdcd;';
|
||||
classname='sprintclosed';
|
||||
if(!$("#viewsprintclosed").is(':checked')) {
|
||||
classname+=' hidden';
|
||||
}
|
||||
}
|
||||
|
||||
html ='<li data-id="'+wid.id+'" class="list-group-item d-flex justify-content-between '+classname+'" style="'+style+'">';
|
||||
html+='<div>';
|
||||
html+='<div class="mr-3 p-2 d-inline-block"><i class="fas fa-arrows-alt-v fa-2x"></i></div>';
|
||||
html+='<div class="d-inline-block">';
|
||||
|
@ -221,23 +221,45 @@
|
||||
<div id="issu{{ issue.id }}" data-id="{{ issue.id }}" data-issue="{{ issue.id }}" data-column="{{column.gicol}}" data-milestone="{{jalon.gijal}}" data-sprint="{{sprint.idspr}}" class="card mb-1 issue issue-{{issue.id}} {{datateams}} {{datatypes}} {{dataprioritys}} {{datalabels}} {{dataassignees}} state-{{issue.giteastate}}">
|
||||
<div class="card-footer p-1 d-flex" style="line-height:16px; border-top:none;">
|
||||
<div class="flex-grow-1 d-flex align-items-center" style="max-width:224px";>
|
||||
<div class="pr-2 issu-id" style="cursor:move">#{{issue.giteanumber}} </div>
|
||||
<div class="text-small" style="cursor:pointer; word-break: break-word;" onClick="$('#issu-detail{{ issue.id }}').toggle()">{{ issue.giteatitle }}</div>
|
||||
<div class="pr-2 issu-id" style="cursor:move">
|
||||
#{{issue.giteanumber}}
|
||||
</div>
|
||||
<div class="text-small" style="cursor:pointer; word-break: break-word;" onClick="$('#issu-detail{{ issue.id }}').toggle()">
|
||||
{% if not issue.scrumissueblock is empty %}
|
||||
<div class="text-verysmall" style="margin-bottom:-5px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: 90%;">
|
||||
#{{issue.scrumissueblock.giteanumber}} = {{issue.scrumissueblock.giteatitle}}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div style="line-height:13px;">{{ issue.giteatitle }}</div>
|
||||
|
||||
{% for depend in issue.scrumissuedependencies %}
|
||||
{% if loop.first %}
|
||||
<div class="text-verysmall" style="margin-top: 5px;line-height:11px">
|
||||
{% endif %}
|
||||
{% set style="" %}
|
||||
{% if depend.giteastate=="closed" %}
|
||||
{% set style="text-decoration: line-through;" %}
|
||||
{% endif %}
|
||||
<div style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;{{style}}">#{{depend.giteanumber}} = {{depend.giteatitle}}</div>
|
||||
{% if loop.last %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="viewissu{{ issue.id }}" class="viewissu mb-2" onMouseenter="issuhover(this,{{ issue.id }})" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}" type="button" style="line-height:9px; text-align:center;">
|
||||
<i class="btn btn-link fas fa-eye p-0 m-0 fa-fw"></i>
|
||||
<br><span class="text-verysmall issue{{issue.id}}-weight">{{ issue.weight }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="submenu{{issue.id}}" class="submenu" onmouseleave="issuout(this)" style="
|
||||
position: absolute;
|
||||
left: 223px;
|
||||
top: -1px;
|
||||
width:200px;
|
||||
width:300px;
|
||||
z-index:1200;
|
||||
display:none;
|
||||
background-color:#f7f7f7;
|
||||
@ -264,6 +286,23 @@
|
||||
Modifier le Poids = <span class="issue{{issue.id}}-weight">{{ issue.weight }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if issue.scrumissueblock is empty %}
|
||||
<div id="lockissu{{ issue.id }}" class="lockissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
|
||||
<i class="btn fas fa-lock p-0 m-0 fa-fw pl-1 pl-1"></i>
|
||||
<span>
|
||||
Ajouter ce ticket comme bloquant à
|
||||
</span>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="unlockissu{{ issue.id }}" class="unlockissu mb-2" data-issue="{{ issue.id }}" data-giteaid="{{issue.giteanumber}}" data-giteatitle="{{ issue.giteatitle }}">
|
||||
<i class="btn fas fa-lock p-0 m-0 fa-fw pl-1 pl-1"></i>
|
||||
<span>
|
||||
N'est plus bloquant pour #{{ issue.scrumissueblock.giteanumber}}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div id="issu-detail{{ issue.id }}" class="card-body p-1 issu-detail">
|
||||
@ -368,6 +407,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="mymodalblock" class="modal" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="form-group ">
|
||||
<label class="control-label required" for="issu_weight">
|
||||
Le ticket en cours bloque le ticket suivant
|
||||
</label>
|
||||
<input type="hidden" id="modal-issueid" name="modal-issueid" required="required" class=" form-control" value="">
|
||||
<input type="integer" id="modal-issueblocked" name="modal-issueweight" required="required" class=" form-control" value="">
|
||||
</div>
|
||||
<button id="issu_blockupdate" class="btn btn-success">Enregistrer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localjavascript %}
|
||||
@ -557,10 +620,64 @@
|
||||
$("#textfilters").html(textfilters);
|
||||
}
|
||||
|
||||
|
||||
$(document).on('click','.viewissu',function(){
|
||||
$(".submenu").hide();
|
||||
url="{{path('app_scrumissue_view',{id:"xxx"})}}";
|
||||
url=url.replace("xxx",$(this).data("issue"));
|
||||
|
||||
ModalLoad('mymodallarge','Aperçu Ticket',url);
|
||||
});
|
||||
|
||||
$(document).on('click','.lockissu',function(){
|
||||
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
|
||||
$("#modal-issueid").val($(this).data("issue"));
|
||||
$("#modal-issueblocked").val("");
|
||||
$("#mymodalblock").modal('show');
|
||||
$("#modal-issueblocked").focus();
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#issu_blockupdate").click(function(){
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrumissue_block")}}",
|
||||
data: {
|
||||
id:$("#modal-issueid").val(),
|
||||
issueblocked:$("#modal-issueblocked").val(),
|
||||
},
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
$("#issueblocked").modal('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.unlockissu',function(){
|
||||
if (window.confirm("Souhaitez-vous enlever le blocage ?")) {
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrumissue_unblock")}}",
|
||||
data: {
|
||||
id:$(this).data("issue"),
|
||||
},
|
||||
success: function(data) {
|
||||
location.reload();
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
alert("pb sur le déblocage");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click','.modissu',function(){
|
||||
$(".modal-title").html("#"+$(this).data("giteaid")+" - "+$(this).data("giteatitle"));
|
||||
$("#modal-issueid").val($(this).data("issue"));
|
||||
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "{{path("app_scrumissue_info")}}",
|
||||
@ -575,14 +692,6 @@
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click','.viewissu',function(){
|
||||
$(".submenu").hide();
|
||||
url="{{path('app_scrumissue_view',{id:"xxx"})}}";
|
||||
url=url.replace("xxx",$(this).data("issue"));
|
||||
|
||||
ModalLoad('mymodallarge','Aperçu Ticket',url);
|
||||
});
|
||||
|
||||
$("#issu_update").click(function(){
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% block body %}
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<button class="btn btn-secondary" onClick="closeModal();">Annuler</button>
|
||||
<a class="btn btn-secondary" onClick="closeModal();">Annuler</a>
|
||||
|
||||
{% if mode=="update" %}
|
||||
<a href="{{ path('app_scrumsprint_delete',{'id':scrumsprint.id}) }}"
|
||||
@ -36,6 +36,7 @@
|
||||
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.giteamilestone) }}
|
||||
{{ form_row(form.closed) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
@ -46,6 +47,6 @@
|
||||
});
|
||||
|
||||
function closeModal() {
|
||||
window.parent.$("#mymodaltype").modal('hide');
|
||||
window.parent.$("#mymodalsprint").modal('hide');
|
||||
}
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user