@@ -37,7 +37,6 | |||
|
37 | 37 | </label> |
|
38 | 38 | <% end %> |
|
39 | 39 | <%= hidden_field_tag 'project[enabled_module_names][]', '' %> |
|
40 | <%= javascript_tag 'observeProjectModules()' %> | |
|
41 | 40 | </fieldset> |
|
42 | 41 | <% end %> |
|
43 | 42 | |
@@ -87,3 +86,15 | |||
|
87 | 86 | }); |
|
88 | 87 | <% end %> |
|
89 | 88 | <% end %> |
|
89 | ||
|
90 | <%= javascript_tag do %> | |
|
91 | $(document).ready(function() { | |
|
92 | $('#project_enabled_module_names_issue_tracking').on('change', function(){ | |
|
93 | if ($(this).attr('checked')){ | |
|
94 | $('#project_trackers, #project_issue_custom_fields').show(); | |
|
95 | } else { | |
|
96 | $('#project_trackers, #project_issue_custom_fields').hide(); | |
|
97 | } | |
|
98 | }).trigger('change'); | |
|
99 | }); | |
|
100 | <% end %> |
@@ -517,20 +517,6 function observeSearchfield(fieldId, targetId, url) { | |||
|
517 | 517 | }); |
|
518 | 518 | } |
|
519 | 519 | |
|
520 | function observeProjectModules() { | |
|
521 | var f = function() { | |
|
522 | /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ | |
|
523 | if ($('#project_enabled_module_names_issue_tracking').attr('checked')) { | |
|
524 | $('#project_trackers').show(); | |
|
525 | } else { | |
|
526 | $('#project_trackers').hide(); | |
|
527 | } | |
|
528 | }; | |
|
529 | ||
|
530 | $(window).load(f); | |
|
531 | $('#project_enabled_module_names_issue_tracking').change(f); | |
|
532 | } | |
|
533 | ||
|
534 | 520 | function initMyPageSortable(list, url) { |
|
535 | 521 | $('#list-'+list).sortable({ |
|
536 | 522 | connectWith: '.block-receiver', |
General Comments 0
You need to be logged in to leave comments.
Login now