37 |
37 |
end
|
38 |
38 |
|
39 |
39 |
if request.xhr?
|
40 |
|
reptags << javascript_tag("$('repository_save')." + (button_disabled ? 'disable' : 'enable') + "();")
|
|
40 |
reptags << javascript_tag("$('#repository_save')." + (button_disabled ? "attr('disabled','disabled')" : "removeAttr('enable')") + ";")
|
41 |
41 |
else
|
42 |
|
reptags << javascript_tag("Event.observe(window, 'load', function() { $('repository_save')." + (button_disabled ? 'disable' : 'enable') + "(); });")
|
|
42 |
reptags << javascript_tag("$(document).ready(function() { $('#repository_save')." + (button_disabled ? "attr('disabled','disabled')" : "removeAttr('enable')") + "; });")
|
43 |
43 |
end
|
44 |
44 |
|
45 |
45 |
return reptags
|
... | ... | |
54 |
54 |
end
|
55 |
55 |
|
56 |
56 |
if repository.new_record? && SubversionCreator.enabled?
|
57 |
|
add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
|
|
57 |
add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
|
58 |
58 |
svntags['<br />'] = ' ' + add + '<br />'
|
59 |
59 |
svntags << hidden_field_tag(:operation, '', :id => 'repository_operation')
|
60 |
60 |
unless request.post?
|
... | ... | |
62 |
62 |
if SubversionCreator.repository_exists?(@project.identifier) && @project.respond_to?(:repositories)
|
63 |
63 |
path << '.' + @project.repositories.select{ |r| r.created_with_scm }.size.to_s
|
64 |
64 |
end
|
65 |
|
svntags << javascript_tag("$('repository_url').value = '#{escape_javascript(path)}';")
|
|
65 |
svntags << javascript_tag("$('#repository_url').val('#{escape_javascript(path)}');")
|
66 |
66 |
end
|
67 |
67 |
|
68 |
68 |
elsif !repository.new_record? && repository.created_with_scm &&
|
... | ... | |
85 |
85 |
end
|
86 |
86 |
|
87 |
87 |
if repository.new_record? && MercurialCreator.enabled?
|
88 |
|
add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
|
|
88 |
add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
|
89 |
89 |
if hgtags.include?('<br />')
|
90 |
90 |
hgtags['<br />'] = ' ' + add + '<br />'
|
91 |
91 |
else
|
... | ... | |
97 |
97 |
if MercurialCreator.repository_exists?(@project.identifier) && @project.respond_to?(:repositories)
|
98 |
98 |
path << '.' + @project.repositories.select{ |r| r.created_with_scm }.size.to_s
|
99 |
99 |
end
|
100 |
|
hgtags << javascript_tag("$('repository_url').value = '#{escape_javascript(path)}';")
|
|
100 |
hgtags << javascript_tag("$('#repository_url').val('#{escape_javascript(path)}');")
|
101 |
101 |
end
|
102 |
102 |
|
103 |
103 |
elsif !repository.new_record? && repository.created_with_scm &&
|
... | ... | |
126 |
126 |
end
|
127 |
127 |
|
128 |
128 |
if repository.new_record? && BazaarCreator.enabled?
|
129 |
|
add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
|
|
129 |
add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
|
130 |
130 |
bzrtags['</p>'] = ' ' + add + '</p>'
|
131 |
131 |
bzrtags << hidden_field_tag(:operation, '', :id => 'repository_operation')
|
132 |
132 |
unless request.post?
|
... | ... | |
134 |
134 |
if BazaarCreator.repository_exists?(@project.identifier) && @project.respond_to?(:repositories)
|
135 |
135 |
path << '.' + @project.repositories.select{ |r| r.created_with_scm }.size.to_s
|
136 |
136 |
end
|
137 |
|
bzrtags << javascript_tag("$('repository_url').value = '#{escape_javascript(path)}';")
|
|
137 |
bzrtags << javascript_tag("$('#repository_url').val('#{escape_javascript(path)}');")
|
138 |
138 |
if BazaarCreator.options['log_encoding']
|
139 |
|
bzrtags << javascript_tag("$('repository_log_encoding').value = '#{escape_javascript(BazaarCreator.options['log_encoding'])}';")
|
|
139 |
bzrtags << javascript_tag("$('#repository_log_encoding').val('#{escape_javascript(BazaarCreator.options['log_encoding'])}');")
|
140 |
140 |
end
|
141 |
141 |
end
|
142 |
142 |
|
... | ... | |
160 |
160 |
end
|
161 |
161 |
|
162 |
162 |
if repository.new_record? && GitCreator.enabled?
|
163 |
|
add = submit_tag(l(:button_create_new_repository), :onclick => "$('repository_operation').value = 'add';")
|
|
163 |
add = submit_tag(l(:button_create_new_repository), :onclick => "$('#repository_operation').val('add');")
|
164 |
164 |
if gittags.include?('<br />')
|
165 |
165 |
gittags['<br />'] = ' ' + add + '<br />'
|
166 |
166 |
else
|
... | ... | |
172 |
172 |
if GitCreator.repository_exists?(@project.identifier) && @project.respond_to?(:repositories)
|
173 |
173 |
path << '.' + @project.repositories.select{ |r| r.created_with_scm }.size.to_s
|
174 |
174 |
end
|
175 |
|
gittags << javascript_tag("$('repository_url').value = '#{escape_javascript(path)}';")
|
|
175 |
gittags << javascript_tag("$('#repository_url').val('#{escape_javascript(path)}');")
|
176 |
176 |
end
|
177 |
177 |
|
178 |
178 |
elsif !repository.new_record? && repository.created_with_scm &&
|