Mercurial > hg > soundsoftware-site
comparison public/javascripts/application.js @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 94944d00e43c |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
216 updateElement: function(value) { | 216 updateElement: function(value) { |
217 document.getElementById('issue_parent_issue_id').value = value.id; | 217 document.getElementById('issue_parent_issue_id').value = value.id; |
218 }}); | 218 }}); |
219 } | 219 } |
220 | 220 |
221 function observeRelatedIssueField(url) { | |
222 new Ajax.Autocompleter('relation_issue_to_id', | |
223 'related_issue_candidates', | |
224 url, | |
225 { minChars: 3, | |
226 frequency: 0.5, | |
227 paramName: 'q', | |
228 updateElement: function(value) { | |
229 document.getElementById('relation_issue_to_id').value = value.id; | |
230 }, | |
231 parameters: 'scope=all' | |
232 }); | |
233 } | |
234 | |
235 function setVisible(id, visible) { | |
236 var el = $(id); | |
237 if (el) {if (visible) {el.show();} else {el.hide();}} | |
238 } | |
239 | |
240 function observeProjectModules() { | |
241 var f = function() { | |
242 /* Hides trackers and issues custom fields on the new project form when issue_tracking module is disabled */ | |
243 var c = ($('project_enabled_module_names_issue_tracking').checked == true); | |
244 setVisible('project_trackers', c); | |
245 setVisible('project_issue_custom_fields', c); | |
246 }; | |
247 | |
248 Event.observe(window, 'load', f); | |
249 Event.observe('project_enabled_module_names_issue_tracking', 'change', f); | |
250 } | |
251 | |
252 | |
221 /* shows and hides ajax indicator */ | 253 /* shows and hides ajax indicator */ |
222 Ajax.Responders.register({ | 254 Ajax.Responders.register({ |
223 onCreate: function(){ | 255 onCreate: function(){ |
224 if ($('ajax-indicator') && Ajax.activeRequestCount > 0) { | 256 if ($('ajax-indicator') && Ajax.activeRequestCount > 0) { |
225 Element.show('ajax-indicator'); | 257 Element.show('ajax-indicator'); |