253 |
253 |
subject.nextAll('div').each(function(_, element){
|
254 |
254 |
var el = $(element);
|
255 |
255 |
var json = el.data('collapse-expand');
|
|
256 |
var default_top = el.data('default-top');
|
|
257 |
var el_task_bars = $('#gantt_area form > div[data-collapse-expand="' + json.obj_id + '"][data-default-top="' + default_top + '"]');
|
|
258 |
var el_selected_columns = $('td.gantt_selected_column div[data-collapse-expand="' + json.obj_id + '"][data-default-top="' + default_top + '"]');
|
256 |
259 |
if(out_of_hierarchy || parseInt(el.css('left')) <= subject_left){
|
257 |
260 |
out_of_hierarchy = true;
|
258 |
261 |
if(target_shown == null) return false;
|
259 |
262 |
|
260 |
263 |
var new_top_val = parseInt(el.css('top')) + total_height * (target_shown ? -1 : 1);
|
261 |
264 |
el.css('top', new_top_val);
|
262 |
|
$('#gantt_area form > div[data-collapse-expand="' + json.obj_id + '"], td.gantt_selected_column div[data-collapse-expand="' + json.obj_id + '"]').each(function(_, el){
|
|
265 |
[el_task_bars, el_selected_columns].forEach(function(el){
|
263 |
266 |
$(el).css('top', new_top_val);
|
264 |
267 |
});
|
265 |
268 |
return true;
|
... | ... | |
272 |
275 |
total_height = 0;
|
273 |
276 |
}
|
274 |
277 |
if(is_shown == target_shown){
|
275 |
|
$('#gantt_area form > div[data-collapse-expand="' + json.obj_id + '"]').each(function(_, task) {
|
|
278 |
el_task_bars.each(function(_, task) {
|
276 |
279 |
var el_task = $(task);
|
277 |
280 |
if(!is_shown)
|
278 |
281 |
el_task.css('top', target_top + total_height);
|
279 |
282 |
if(!el_task.hasClass('tooltip'))
|
280 |
283 |
el_task.toggle(!is_shown);
|
281 |
284 |
});
|
282 |
|
$('td.gantt_selected_column div[data-collapse-expand="' + json.obj_id + '"]'
|
283 |
|
).each(function (_, attr) {
|
|
285 |
el_selected_columns.each(function (_, attr) {
|
284 |
286 |
var el_attr = $(attr);
|
285 |
287 |
if (!is_shown)
|
286 |
288 |
el_attr.css('top', target_top + total_height);
|