Salve,
ho scaricato questo script:
live view: http://thegrubbsian.github.io/jquery...ple/index.html
sorgente: https://github.com/thegrubbsian/jquery.ganttView
Dovrei fare in modo che gli elementi si spostino in verticale invece che orizzontale.
Nel file jquery.ganttView.js, alla riga 302 ho sostituito
axis: "y"
con
axis: "x"
e ora il drag lo fa in verticale.
Il problema è che non rilascia l'oggetto.
Dovrei modificare la logica di questa funzione:
codice:
function updateDataAndPosition(div, block, cellWidth, startDate) {
var container = jQuery("div.ganttview-slide-container", div);
var scroll = container.scrollLeft();
var offset = block.offset().left - container.offset().left - 1 + scroll;
// Set new start date
var daysFromStart = Math.round(offset / cellWidth);
var newStart = startDate.clone().addDays(daysFromStart);
block.data("block-data").start = newStart;
// Set new end date
var width = block.outerWidth();
var numberOfDays = Math.round(width / cellWidth) - 1;
block.data("block-data").end = newStart.clone().addDays(numberOfDays);
jQuery("div.ganttview-block-text", block).text(numberOfDays + 1);
// Remove top and left properties to avoid incorrect block positioning,
// set position to relative to keep blocks relative to scrollbar when scrolling
block.css("top", "").css("left", "")
.css("position", "relative").css("margin-left", offset + "px");
}
Mi dareste una mano?
p.s.: anche a pagamento se fosse necessario.
Grazie mille