|
|
|
@ -485,21 +485,19 @@ function observeRelatedIssueField(url) { |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function setVisible(id, visible) { |
|
|
|
|
var el = $(id); |
|
|
|
|
if (el) {if (visible) {el.show();} else {el.hide();}} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Hides types and issues custom fields on the new project form when |
|
|
|
|
// work_package_tracking module is disabled. |
|
|
|
|
function observeProjectModules() { |
|
|
|
|
var f = function() { |
|
|
|
|
/* Hides types and issues custom fields on the new project form when work_package_tracking module is disabled */ |
|
|
|
|
var c = ($('project_enabled_module_names_work_package_tracking').checked == true); |
|
|
|
|
setVisible('project_types', c); |
|
|
|
|
setVisible('project_issue_custom_fields', c); |
|
|
|
|
if (jQuery('#project_enabled_module_names_work_package_tracking').attr('checked')) { |
|
|
|
|
jQuery('#project_types, #project_issue_custom_fields').show(); |
|
|
|
|
} else { |
|
|
|
|
jQuery('#project_types, #project_issue_custom_fields').hide(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
Event.observe(window, 'load', f); |
|
|
|
|
Event.observe('project_enabled_module_names_work_package_tracking', 'change', f); |
|
|
|
|
jQuery(window).load(f); |
|
|
|
|
jQuery('#project_enabled_module_names_work_package_tracking').change(f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|