';
html+='';
html+='
';
html+='
';
html+=wid.name;
html+='
';
html+='
';
html+='';
html+='';
$("#scrumcolumns").append(html);
});
$( "#scrumcolumns" ).sortable({
axis: "y",
handle: ".fa-arrows-alt-v",
update: function( event, ui ) {
lstordered="";
$( "#scrumcolumns li" ).each(function( index ) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
});
$.ajax({
method: "POST",
url: "{{path("app_scrumcolumn_order",{scrumid:scrum.id})}}",
data: {
lstordered:lstordered
}
});
}
});
},
});
}
$("#addteam").click(function() {
ModalLoad('mymodalteam','Ajouter une colonne','{{path('app_scrumteam_submit',{scrumid:scrum.id})}}');
});
$('#scrumteams').on('click', '.modteam', function(event) {
url="{{path('app_scrumteam_update',{id:'xxx'})}}";
url=url.replace("xxx",$(this).data("id"));
ModalLoad('mymodalteam','Modifier une team',url);
});
$('#mymodalteam').on('hidden.bs.modal', function () {
loadscrumteams();
});
function loadscrumteams() {
$("#scrumteams").empty();
$.ajax({
method: "POST",
url: "{{path("app_scrumteam_select",{scrumid:scrum.id})}}",
success: function(datas, dataType)
{
jQuery.each(datas, function(i, wid) {
html ='';
html+='';
html+='
';
html+='
';
html+=wid.name;
html+='
';
html+='
';
html+='';
html+='';
$("#scrumteams").append(html);
});
$( "#scrumteams" ).sortable({
axis: "y",
handle: ".fa-arrows-alt-v",
update: function( event, ui ) {
lstordered="";
$( "#scrumteams li" ).each(function( index ) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
});
$.ajax({
method: "POST",
url: "{{path("app_scrumteam_order",{scrumid:scrum.id})}}",
data: {
lstordered:lstordered
}
});
}
});
},
});
}
$("#addpriority").click(function() {
ModalLoad('mymodalpriority','Ajouter une colonne','{{path('app_scrumpriority_submit',{scrumid:scrum.id})}}');
});
$('#scrumprioritys').on('click', '.modpriority', function(event) {
url="{{path('app_scrumpriority_update',{id:'xxx'})}}";
url=url.replace("xxx",$(this).data("id"));
ModalLoad('mymodalpriority','Modifier une priority',url);
});
$('#mymodalpriority').on('hidden.bs.modal', function () {
loadscrumprioritys();
});
function loadscrumprioritys() {
$("#scrumprioritys").empty();
$.ajax({
method: "POST",
url: "{{path("app_scrumpriority_select",{scrumid:scrum.id})}}",
success: function(datas, dataType)
{
jQuery.each(datas, function(i, wid) {
html ='';
html+='';
html+='
';
html+='
';
html+=wid.name;
html+='
';
html+='
';
html+='';
html+='';
$("#scrumprioritys").append(html);
});
$( "#scrumprioritys" ).sortable({
axis: "y",
handle: ".fa-arrows-alt-v",
update: function( event, ui ) {
lstordered="";
$( "#scrumprioritys li" ).each(function( index ) {
if(index==0) lstordered=$(this).data("id");
else lstordered=lstordered+","+$(this).data("id");
});
$.ajax({
method: "POST",
url: "{{path("app_scrumpriority_order",{scrumid:scrum.id})}}",
data: {
lstordered:lstordered
}
});
}
});
},
});
}
{% endif %}
{% endblock %}