summaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-03-04 12:47:07 +0000
committerGo MAEDA <maeda@farend.jp>2019-03-04 12:47:07 +0000
commit54bffb5ed6ab1a72aa4c45453851ccf5c81f7ee5 (patch)
tree09da70f50bff99a0a4d236b134c7fb4eed5e1700 /public/javascripts
parenta925f9603d6b7df86cf7f19f4358c4eb355146f4 (diff)
downloadredmine-54bffb5ed6ab1a72aa4c45453851ccf5c81f7ee5.tar.gz
redmine-54bffb5ed6ab1a72aa4c45453851ccf5c81f7ee5.zip
Reverted r17925 (#6417). The change breaks GanttHelperTest.
git-svn-id: http://svn.redmine.org/redmine/trunk@17926 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/gantt.js60
1 files changed, 1 insertions, 59 deletions
diff --git a/public/javascripts/gantt.js b/public/javascripts/gantt.js
index 0241e6f3e..2e71178b0 100644
--- a/public/javascripts/gantt.js
+++ b/public/javascripts/gantt.js
@@ -17,7 +17,6 @@ function setDrawArea() {
function getRelationsArray() {
var arr = new Array();
$.each($('div.task_todo[data-rels]'), function(index_div, element) {
- if(!$(element).is(':visible')) return true;
var element_id = $(element).attr("id");
if (element_id != null) {
var issue_id = element_id.replace("task-todo-issue-", "");
@@ -107,7 +106,6 @@ function getProgressLinesArray() {
var today_left = $('#today_line').position().left;
arr.push({left: today_left, top: 0});
$.each($('div.issue-subject, div.version-name'), function(index, element) {
- if(!$(element).is(':visible')) return true;
var t = $(element).position().top - draw_top ;
var h = ($(element).height() / 9);
var element_top_upper = t - h;
@@ -171,7 +169,7 @@ function drawGanttHandler() {
draw_gantt = Raphael(folder);
setDrawArea();
if ($("#draw_progress_line").prop('checked'))
- try{drawGanttProgressLines();}catch(e){}
+ drawGanttProgressLines();
if ($("#draw_relations").prop('checked'))
drawRelations();
}
@@ -197,59 +195,3 @@ function resizableSubjectColumn(){
$('td.gantt_subjects_column').resizable('enable');
};
}
-
-ganttEntryClick = function(e){
- var subject = $(e.target.parentElement);
- var subject_left = parseInt(subject.css('left'));
- var target_shown = null;
- var target_top = 0;
- var total_height = 0;
- var out_of_hierarchy = false;
- var iconChange = null;
- if(subject.hasClass('open'))
- iconChange = function(element){
- $(element).removeClass('open');
- };
- else
- iconChange = function(element){
- $(element).addClass('open');
- };
- iconChange(subject);
- subject.nextAll('div').each(function(_, element){
- var el = $(element);
- var json = el.data('collapse-expand');
- if(out_of_hierarchy || parseInt(el.css('left')) <= subject_left){
- out_of_hierarchy = true;
- if(target_shown == null) return false;
-
- var new_top_val = parseInt(el.css('top')) + total_height * (target_shown ? -1 : 1);
- el.css('top', new_top_val);
- $('#gantt_area form > div[data-collapse-expand="' + json.obj_id + '"]').each(function(_, task){
- $(task).css('top', new_top_val);
- });
- return true;
- }
-
- var is_shown = el.is(':visible');
- if(target_shown == null){
- target_shown = is_shown;
- target_top = parseInt(el.css('top'));
- total_height = 0;
- }
- if(is_shown == target_shown){
- $('#gantt_area form > div[data-collapse-expand="' + json.obj_id + '"]').each(function(_, task){
- var el_task = $(task);
- if(!is_shown)
- el_task.css('top', target_top + total_height);
- if(!el_task.hasClass('tooltip'))
- el_task.toggle(!is_shown);
- });
- if(!is_shown)
- el.css('top', target_top + total_height);
- iconChange(el);
- el.toggle(!is_shown);
- total_height += parseInt(json.top_increment);
- }
- });
- drawGanttHandler();
-};