Revision 10068
Added by Jean-Philippe Lang almost 13 years ago
trunk/Gemfile | ||
---|---|---|
1 | 1 |
source 'http://rubygems.org' |
2 | 2 |
|
3 | 3 |
gem 'rails', '3.2.6' |
4 |
gem 'prototype-rails', '3.2.1'
|
|
4 |
gem "jquery-rails", "~> 2.0.2"
|
|
5 | 5 |
gem "i18n", "~> 0.6.0" |
6 | 6 |
gem "coderay", "~> 1.0.6" |
7 | 7 |
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby] |
trunk/app/controllers/auto_completes_controller.rb | ||
---|---|---|
20 | 20 |
|
21 | 21 |
def issues |
22 | 22 |
@issues = [] |
23 |
q = params[:q].to_s
|
|
23 |
q = (params[:q] || params[:term]).to_s
|
|
24 | 24 |
query = (params[:scope] == "all" && Setting.cross_project_issue_relations?) ? Issue : @project.issues |
25 | 25 |
if q.match(/^\d+$/) |
26 | 26 |
@issues << query.visible.find_by_id(q.to_i) |
trunk/app/controllers/my_controller.rb | ||
---|---|---|
179 | 179 |
group = params[:group] |
180 | 180 |
@user = User.current |
181 | 181 |
if group.is_a?(String) |
182 |
group_items = (params["list-#{group}"] || []).collect(&:underscore) |
|
182 |
group_items = (params["blocks"] || []).collect(&:underscore) |
|
183 |
group_items.each {|s| s.sub!(/^block_/, '')} |
|
183 | 184 |
if group_items and group_items.is_a? Array |
184 | 185 |
layout = @user.pref[:my_page_layout] || {} |
185 | 186 |
# remove group blocks if they are presents in other groups |
trunk/app/controllers/repositories_controller.rb | ||
---|---|---|
42 | 42 |
@repository = Repository.factory(scm) |
43 | 43 |
@repository.is_default = @project.repository.nil? |
44 | 44 |
@repository.project = @project |
45 |
render :layout => !request.xhr? |
|
46 | 45 |
end |
47 | 46 |
|
48 | 47 |
def create |
trunk/app/helpers/application_helper.rb | ||
---|---|---|
43 | 43 |
link_to(name, options, html_options, *parameters_for_method_reference) if authorize_for(options[:controller] || params[:controller], options[:action]) |
44 | 44 |
end |
45 | 45 |
|
46 |
# Display a link to remote if user is authorized |
|
47 |
def link_to_remote_if_authorized(name, options = {}, html_options = nil) |
|
48 |
ActiveSupport::Deprecation.warn "ApplicationHelper#link_to_remote_if_authorized is deprecated and will be removed in Redmine 2.2." |
|
49 |
url = options[:url] || {} |
|
50 |
link_to_remote(name, options, html_options) if authorize_for(url[:controller] || params[:controller], url[:action]) |
|
51 |
end |
|
52 |
|
|
53 | 46 |
# Displays a link to user's account page if active |
54 | 47 |
def link_to_user(user, options={}) |
55 | 48 |
if user.is_a?(User) |
... | ... | |
161 | 154 |
end |
162 | 155 |
|
163 | 156 |
def toggle_link(name, id, options={}) |
164 |
onclick = "Element.toggle('#{id}'); "
|
|
165 |
onclick << (options[:focus] ? "Form.Element.focus('#{options[:focus]}'); " : "this.blur(); ")
|
|
157 |
onclick = "$('##{id}').toggle(); "
|
|
158 |
onclick << (options[:focus] ? "$('##{options[:focus]}').focus(); " : "this.blur(); ")
|
|
166 | 159 |
onclick << "return false;" |
167 | 160 |
link_to(name, "#", :onclick => onclick) |
168 | 161 |
end |
... | ... | |
175 | 168 |
})) |
176 | 169 |
end |
177 | 170 |
|
178 |
def prompt_to_remote(name, text, param, url, html_options = {}) |
|
179 |
html_options[:onclick] = "promptToRemote('#{text}', '#{param}', '#{url_for(url)}'); return false;" |
|
180 |
link_to name, {}, html_options |
|
181 |
end |
|
182 |
|
|
183 | 171 |
def format_activity_title(text) |
184 | 172 |
h(truncate_single_line(text, :length => 100)) |
185 | 173 |
end |
... | ... | |
1042 | 1030 |
end |
1043 | 1031 |
@context_menu_included = true |
1044 | 1032 |
end |
1045 |
javascript_tag "new ContextMenu('#{ url_for(url) }')"
|
|
1033 |
javascript_tag "contextMenuInit('#{ url_for(url) }')"
|
|
1046 | 1034 |
end |
1047 | 1035 |
|
1048 | 1036 |
def calendar_for(field_id) |
... | ... | |
1173 | 1161 |
|
1174 | 1162 |
# Returns the javascript tags that are included in the html layout head |
1175 | 1163 |
def javascript_heads |
1176 |
tags = javascript_include_tag('prototype', 'effects', 'dragdrop', 'controls', 'rails', 'application')
|
|
1164 |
tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.2', 'application')
|
|
1177 | 1165 |
unless User.current.pref.warn_on_leaving_unsaved == '0' |
1178 |
tags << "\n".html_safe + javascript_tag("Event.observe(window, 'load', function(){ new WarnLeavingUnsaved('#{escape_javascript( l(:text_warn_on_leaving_unsaved) )}'); });")
|
|
1166 |
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
|
|
1179 | 1167 |
end |
1180 | 1168 |
tags |
1181 | 1169 |
end |
trunk/app/helpers/journals_helper.rb | ||
---|---|---|
29 | 29 |
:method => 'post', |
30 | 30 |
:title => l(:button_quote)) if options[:reply_links] |
31 | 31 |
links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes", |
32 |
{ :controller => 'journals', :action => 'edit', :id => journal }, |
|
32 |
{ :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' },
|
|
33 | 33 |
:title => l(:button_edit)) if editable |
34 | 34 |
end |
35 | 35 |
content << content_tag('div', links.join(' ').html_safe, :class => 'contextual') unless links.empty? |
... | ... | |
40 | 40 |
end |
41 | 41 |
|
42 | 42 |
def link_to_in_place_notes_editor(text, field_id, url, options={}) |
43 |
onclick = "new Ajax.Request('#{url_for(url)}', {asynchronous:true, evalScripts:true, method:'get'}); return false;"
|
|
43 |
onclick = "$.ajax({url: '#{url_for(url)}', type: 'get'}); return false;"
|
|
44 | 44 |
link_to text, '#', options.merge(:onclick => onclick) |
45 | 45 |
end |
46 | 46 |
end |
trunk/app/helpers/repositories_helper.rb | ||
---|---|---|
141 | 141 |
select_tag('repository_scm', |
142 | 142 |
options_for_select(scm_options, repository.class.name.demodulize), |
143 | 143 |
:disabled => (repository && !repository.new_record?), |
144 |
:onchange => remote_function( |
|
145 |
:url => new_project_repository_path(@project), |
|
146 |
:method => :get, |
|
147 |
:update => 'content', |
|
148 |
:with => "Form.serialize(this.form)") |
|
149 |
) |
|
144 |
:data => {:remote => true, :method => 'get'}) |
|
150 | 145 |
end |
151 | 146 |
|
152 | 147 |
def with_leading_slash(path) |
trunk/app/views/account/login.html.erb | ||
---|---|---|
36 | 36 |
</td> |
37 | 37 |
</tr> |
38 | 38 |
</table> |
39 |
<%= javascript_tag "Form.Element.focus('username');" %>
|
|
39 |
<%= javascript_tag "$('#username').focus();" %>
|
|
40 | 40 |
<% end %> |
41 | 41 |
</div> |
42 | 42 |
<%= call_hook :view_account_login_bottom %> |
trunk/app/views/auto_completes/issues.html.erb | ||
---|---|---|
1 |
<ul> |
|
2 |
<% if @issues.any? -%> |
|
3 |
<% @issues.each do |issue| -%> |
|
4 |
<%= content_tag 'li', h("#{issue.tracker} ##{issue.id}: #{issue.subject}"), :id => issue.id %> |
|
5 |
<% end -%> |
|
6 |
<% else -%> |
|
7 |
<%= content_tag("li", l(:label_none), :style => 'display:none') %> |
|
8 |
<% end -%> |
|
9 |
</ul> |
|
1 |
<%= raw @issues.map {|issue| { |
|
2 |
'id' => issue.id, |
|
3 |
'label' => "#{issue.tracker} ##{issue.id}: #{truncate issue.subject.to_s, :length => 60}", |
|
4 |
'value' => issue.id |
|
5 |
} |
|
6 |
}.to_json |
|
7 |
%> |
trunk/app/views/boards/show.html.erb | ||
---|---|---|
4 | 4 |
<%= link_to_if_authorized l(:label_message_new), |
5 | 5 |
{:controller => 'messages', :action => 'new', :board_id => @board}, |
6 | 6 |
:class => 'icon icon-add', |
7 |
:onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
|
|
7 |
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' %>
|
|
8 | 8 |
<%= watcher_tag(@board, User.current) %> |
9 | 9 |
</div> |
10 | 10 |
|
... | ... | |
15 | 15 |
<%= render :partial => 'messages/form', :locals => {:f => f} %> |
16 | 16 |
<p><%= submit_tag l(:button_create) %> |
17 | 17 |
<%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form') %> | |
18 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
|
|
18 |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;' %></p>
|
|
19 | 19 |
<% end %> |
20 | 20 |
<div id="preview" class="wiki"></div> |
21 | 21 |
<% end %> |
trunk/app/views/calendars/show.html.erb | ||
---|---|---|
20 | 20 |
<%= label_tag('year', l(:label_year)) %> |
21 | 21 |
<%= select_year(@year, :prefix => "year", :discard_type => true) %> |
22 | 22 |
|
23 |
<%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %> |
|
23 |
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
|
24 | 24 |
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 }, :class => 'icon icon-reload' %> |
25 | 25 |
</p> |
26 | 26 |
<% end %> |
trunk/app/views/common/_tabs.html.erb | ||
---|---|---|
16 | 16 |
</div> |
17 | 17 |
|
18 | 18 |
<script> |
19 |
Event.observe(window, 'load', function() { displayTabsButtons(); });
|
|
20 |
Event.observe(window, 'resize', function() { displayTabsButtons(); });
|
|
19 |
$(document).ready(displayTabsButtons);
|
|
20 |
$(window).resize(displayTabsButtons);
|
|
21 | 21 |
</script> |
22 | 22 |
|
23 | 23 |
<% tabs.each do |tab| -%> |
trunk/app/views/custom_fields/_form.html.erb | ||
---|---|---|
3 | 3 |
<script type="text/javascript"> |
4 | 4 |
//<![CDATA[ |
5 | 5 |
function toggle_custom_field_format() { |
6 |
format = $("custom_field_field_format"); |
|
7 |
p_length = $("custom_field_min_length"); |
|
8 |
p_regexp = $("custom_field_regexp"); |
|
9 |
p_values = $("custom_field_possible_values"); |
|
10 |
p_searchable = $("custom_field_searchable"); |
|
11 |
p_default = $("custom_field_default_value"); |
|
12 |
p_multiple = $("custom_field_multiple"); |
|
6 |
var format = $("#custom_field_field_format").val(); |
|
7 |
var p_length = $("#custom_field_min_length"); |
|
8 |
var p_regexp = $("#custom_field_regexp"); |
|
9 |
var p_values = $("#custom_field_possible_values"); |
|
10 |
var p_searchable = $("#custom_field_searchable"); |
|
11 |
var p_default = $("#custom_field_default_value"); |
|
12 |
var p_multiple = $("#custom_field_multiple"); |
|
13 |
// can't change type on JQuery objects |
|
14 |
var p_default2 = document.getElementById("custom_field_default_value"); |
|
13 | 15 |
|
14 |
p_default.setAttribute('type','text');
|
|
15 |
Element.show(p_default.parentNode);
|
|
16 |
p_default2.type = 'text';
|
|
17 |
p_default.parent().show();
|
|
16 | 18 |
|
17 |
switch (format.value) {
|
|
19 |
switch (format) { |
|
18 | 20 |
case "list": |
19 |
Element.hide(p_length.parentNode);
|
|
20 |
Element.hide(p_regexp.parentNode);
|
|
21 |
if (p_searchable) Element.show(p_searchable.parentNode);
|
|
22 |
Element.show(p_values.parentNode);
|
|
23 |
Element.show(p_multiple.parentNode);
|
|
21 |
p_length.parent().hide();
|
|
22 |
p_regexp.parent().hide();
|
|
23 |
p_searchable.parent().show();
|
|
24 |
p_values.parent().show();
|
|
25 |
p_multiple.parent().show();
|
|
24 | 26 |
break; |
25 | 27 |
case "bool": |
26 |
p_default.setAttribute('type','checkbox');
|
|
27 |
Element.hide(p_length.parentNode);
|
|
28 |
Element.hide(p_regexp.parentNode);
|
|
29 |
if (p_searchable) Element.hide(p_searchable.parentNode);
|
|
30 |
Element.hide(p_values.parentNode);
|
|
31 |
Element.hide(p_multiple.parentNode);
|
|
28 |
p_default2.type = 'checkbox';
|
|
29 |
p_length.parent().hide();
|
|
30 |
p_regexp.parent().hide();
|
|
31 |
p_searchable.parent().hide();
|
|
32 |
p_values.parent().hide();
|
|
33 |
p_multiple.parent().hide();
|
|
32 | 34 |
break; |
33 | 35 |
case "date": |
34 |
Element.hide(p_length.parentNode);
|
|
35 |
Element.hide(p_regexp.parentNode);
|
|
36 |
if (p_searchable) Element.hide(p_searchable.parentNode);
|
|
37 |
Element.hide(p_values.parentNode);
|
|
38 |
Element.hide(p_multiple.parentNode);
|
|
36 |
p_length.parent().hide();
|
|
37 |
p_regexp.parent().hide();
|
|
38 |
p_searchable.parent().hide();
|
|
39 |
p_values.parent().hide();
|
|
40 |
p_multiple.parent().hide();
|
|
39 | 41 |
break; |
40 | 42 |
case "float": |
41 | 43 |
case "int": |
42 |
Element.show(p_length.parentNode);
|
|
43 |
Element.show(p_regexp.parentNode);
|
|
44 |
if (p_searchable) Element.hide(p_searchable.parentNode);
|
|
45 |
Element.hide(p_values.parentNode);
|
|
46 |
Element.hide(p_multiple.parentNode);
|
|
44 |
p_length.parent().show();
|
|
45 |
p_regexp.parent().show();
|
|
46 |
p_searchable.parent().hide();
|
|
47 |
p_values.parent().hide();
|
|
48 |
p_multiple.parent().hide();
|
|
47 | 49 |
break; |
48 | 50 |
case "user": |
49 | 51 |
case "version": |
50 |
Element.hide(p_length.parentNode);
|
|
51 |
Element.hide(p_regexp.parentNode);
|
|
52 |
if (p_searchable) Element.hide(p_searchable.parentNode);
|
|
53 |
Element.hide(p_values.parentNode);
|
|
54 |
Element.hide(p_default.parentNode);
|
|
55 |
Element.show(p_multiple.parentNode);
|
|
52 |
p_length.parent().hide();
|
|
53 |
p_regexp.parent().hide();
|
|
54 |
p_searchable.parent().hide();
|
|
55 |
p_values.parent().hide();
|
|
56 |
p_multiple.parent().show();
|
|
57 |
p_default.parent().hide();
|
|
56 | 58 |
break; |
57 | 59 |
default: |
58 |
Element.show(p_length.parentNode);
|
|
59 |
Element.show(p_regexp.parentNode);
|
|
60 |
if (p_searchable) Element.show(p_searchable.parentNode);
|
|
61 |
Element.hide(p_values.parentNode);
|
|
62 |
Element.hide(p_multiple.parentNode);
|
|
60 |
p_length.parent().show();
|
|
61 |
p_regexp.parent().show();
|
|
62 |
p_searchable.parent().show();
|
|
63 |
p_values.parent().hide();
|
|
64 |
p_multiple.parent().hide();
|
|
63 | 65 |
break; |
64 | 66 |
} |
65 | 67 |
} |
trunk/app/views/documents/index.html.erb | ||
---|---|---|
1 | 1 |
<div class="contextual"> |
2 | 2 |
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add', |
3 |
:onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
|
|
3 |
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
|
|
4 | 4 |
</div> |
5 | 5 |
|
6 | 6 |
<div id="add-document" style="display:none;"> |
... | ... | |
9 | 9 |
<%= render :partial => 'form', :locals => {:f => f} %> |
10 | 10 |
<p> |
11 | 11 |
<%= submit_tag l(:button_create) %> |
12 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %>
|
|
12 |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-document").hide(); return false;' %>
|
|
13 | 13 |
</p> |
14 | 14 |
<% end %> |
15 | 15 |
</div> |
trunk/app/views/documents/show.html.erb | ||
---|---|---|
17 | 17 |
<%= link_to_attachments @document %> |
18 | 18 |
|
19 | 19 |
<% if authorize_for('documents', 'add_attachment') %> |
20 |
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
|
20 |
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
|
21 | 21 |
:id => 'attach_files_link' %></p> |
22 | 22 |
<%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> |
23 | 23 |
<div class="box"> |
trunk/app/views/groups/_memberships.html.erb | ||
---|---|---|
25 | 25 |
<p><%= submit_tag l(:button_change) %> |
26 | 26 |
<%= link_to_function( |
27 | 27 |
l(:button_cancel), |
28 |
"$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;"
|
|
28 |
"$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;"
|
|
29 | 29 |
) %></p> |
30 | 30 |
<% end %> |
31 | 31 |
</td> |
32 | 32 |
<td class="buttons"> |
33 | 33 |
<%= link_to_function( |
34 | 34 |
l(:button_edit), |
35 |
"$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;",
|
|
35 |
"$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;",
|
|
36 | 36 |
:class => 'icon icon-edit' |
37 | 37 |
) %> |
38 | 38 |
<%= delete_link({:controller => 'groups', :action => 'destroy_membership', :id => @group, :membership_id => membership}, |
trunk/app/views/groups/_users.html.erb | ||
---|---|---|
29 | 29 |
<fieldset><legend><%=l(:label_user_new)%></legend> |
30 | 30 |
|
31 | 31 |
<p><%= label_tag "user_search", l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
32 |
<%= observe_field(:user_search, |
|
33 |
:frequency => 0.5, |
|
34 |
:update => :users, |
|
35 |
:url => autocomplete_for_user_group_path(@group), |
|
36 |
:method => :get, |
|
37 |
:before => '$("user_search").addClassName("ajax-loading")', |
|
38 |
:complete => '$("user_search").removeClassName("ajax-loading")', |
|
39 |
:with => 'q') |
|
40 |
%> |
|
32 |
<%= javascript_tag "observeSearchfield('user_search', 'users', '#{ escape_javascript autocomplete_for_user_group_path(@group) }')" %> |
|
41 | 33 |
|
42 | 34 |
<div id="users"> |
43 | 35 |
<%= principals_check_box_tags 'user_ids[]', users %> |
trunk/app/views/groups/add_users.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>');
|
|
1 |
$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>');
|
|
2 | 2 |
<% @users.each do |user| %> |
3 |
new Effect.Highlight('user-<%= user.id %>');
|
|
3 |
$('#user-<%= user.id %>').effect("highlight");
|
|
4 | 4 |
<% end %> |
trunk/app/views/groups/destroy_membership.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>'); |
|
1 |
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>'); |
trunk/app/views/groups/edit_membership.js.erb | ||
---|---|---|
1 | 1 |
<% if @membership.valid? %> |
2 |
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
|
3 |
new Effect.Highlight('member-<%= @membership.id %>');
|
|
2 |
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>');
|
|
3 |
$('#member-<%= @membership.id %>').effect("highlight");
|
|
4 | 4 |
<% else %> |
5 | 5 |
alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>'); |
6 | 6 |
<% end %> |
trunk/app/views/groups/remove_user.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-users', '<%= escape_javascript(render :partial => 'groups/users') %>'); |
|
1 |
$('#tab-content-users').html('<%= escape_javascript(render :partial => 'groups/users') %>'); |
trunk/app/views/issue_categories/create.js.erb | ||
---|---|---|
1 | 1 |
hideModal(); |
2 | 2 |
<% select = content_tag('select', content_tag('option') + options_from_collection_for_select(@project.issue_categories, 'id', 'name', @category.id), :id => 'issue_category_id', :name => 'issue[category_id]') %> |
3 |
Element.replace('issue_category_id', '<%= escape_javascript(select) %>'); |
|
3 |
$('#issue_category_id').replaceWith('<%= escape_javascript(select) %>'); |
trunk/app/views/issue_categories/new.js.erb | ||
---|---|---|
1 |
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'issue_categories/new_modal') %>');
|
|
1 |
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'issue_categories/new_modal') %>');
|
|
2 | 2 |
showModal('ajax-modal', '600px'); |
3 |
Form.Element.focus('issue_category_name'); |
trunk/app/views/issue_relations/_form.html.erb | ||
---|---|---|
9 | 9 |
<%= toggle_link l(:button_cancel), 'new-relation-form'%> |
10 | 10 |
</p> |
11 | 11 |
|
12 |
<div id="related_issue_candidates" class="autocomplete"></div> |
|
13 |
<%= javascript_tag "observeRelatedIssueField('#{auto_complete_issues_path(:id => @issue, :project_id => @project) }')" %> |
|
12 |
<%= javascript_tag "observeAutocompleteField('relation_issue_to_id', '#{escape_javascript auto_complete_issues_path(:id => @issue, :project_id => @project, :scope => 'all')}')" %> |
|
14 | 13 |
|
15 | 14 |
<%= javascript_tag "setPredecessorFieldsVisibility();" %> |
trunk/app/views/issue_relations/create.js.erb | ||
---|---|---|
1 |
Element.update('relations', '<%= escape_javascript(render :partial => 'issues/relations') %>');
|
|
1 |
$('#relations').html('<%= escape_javascript(render :partial => 'issues/relations') %>');
|
|
2 | 2 |
<% if @relation.errors.empty? %> |
3 |
$('relation_delay').value = '' |
|
4 |
$('relation_issue_to_id').value = '' |
|
3 |
$('#relation_delay').val(''); |
|
4 |
$('#relation_issue_to_id').val(''); |
|
5 |
$('#relation_issue_to_id').focus(); |
|
5 | 6 |
<% end %> |
trunk/app/views/issue_relations/destroy.js.erb | ||
---|---|---|
1 |
Element.remove('<%= "relation-#{@relation.id}" %>'); |
|
1 |
$('#relation-<%= @relation.id %>').remove(); |
trunk/app/views/issues/_attributes.html.erb | ||
---|---|---|
3 | 3 |
<div class="splitcontent"> |
4 | 4 |
<div class="splitcontentleft"> |
5 | 5 |
<% if @issue.safe_attribute? 'status_id' %> |
6 |
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
7 |
<%= observe_field :issue_status_id, :url => project_issue_form_path(@project, :id => @issue), |
|
8 |
:with => "Form.serialize('issue-form')" %> |
|
6 |
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true}, |
|
7 |
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
|
9 | 8 |
|
10 | 9 |
<% else %> |
11 | 10 |
<p><label><%= l(:field_status) %></label> <%= h(@issue.status.name) %></p> |
... | ... | |
44 | 43 |
<div class="splitcontentright"> |
45 | 44 |
<% if @issue.safe_attribute? 'parent_issue_id' %> |
46 | 45 |
<p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_attribute?('parent_issue_id') %></p> |
47 |
<div id="parent_issue_candidates" class="autocomplete"></div> |
|
48 |
<%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:id => @issue, :project_id => @issue.project) }')" %> |
|
46 |
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:id => @issue, :project_id => @issue.project)}')" %> |
|
49 | 47 |
<% end %> |
50 | 48 |
|
51 | 49 |
<% if @issue.safe_attribute? 'start_date' %> |
trunk/app/views/issues/_form.html.erb | ||
---|---|---|
8 | 8 |
<% end %> |
9 | 9 |
|
10 | 10 |
<% if @issue.safe_attribute? 'project_id' %> |
11 |
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), :required => true %></p> |
|
12 |
<%= observe_field :issue_project_id, :url => project_issue_form_path(@project, :id => @issue), |
|
13 |
:with => "Form.serialize('issue-form')" %> |
|
11 |
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true}, |
|
12 |
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
|
14 | 13 |
<% end %> |
15 | 14 |
|
16 | 15 |
<% if @issue.safe_attribute? 'tracker_id' %> |
17 |
<p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> |
|
18 |
<%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue), |
|
19 |
:with => "Form.serialize('issue-form')" %> |
|
16 |
<p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, {:required => true}, |
|
17 |
:onchange => "updateIssueFrom('#{escape_javascript project_issue_form_path(@project, :id => @issue, :format => 'js')}')" %></p> |
|
20 | 18 |
<% end %> |
21 | 19 |
|
22 | 20 |
<% if @issue.safe_attribute? 'subject' %> |
... | ... | |
26 | 24 |
<% if @issue.safe_attribute? 'description' %> |
27 | 25 |
<p> |
28 | 26 |
<%= f.label_for_field :description, :required => @issue.required_attribute?('description') %> |
29 |
<%= link_to_function image_tag('edit.png'), |
|
30 |
'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %> |
|
27 |
<%= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %> |
|
31 | 28 |
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %> |
32 | 29 |
<%= f.text_area :description, |
33 | 30 |
:cols => 60, |
trunk/app/views/issues/_list.html.erb | ||
---|---|---|
3 | 3 |
<div class="autoscroll"> |
4 | 4 |
<table class="list issues"> |
5 | 5 |
<thead><tr> |
6 |
<th class="checkbox hide-when-print"><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
|
|
6 |
<th class="checkbox hide-when-print"><%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleIssuesSelection(this); return false;',
|
|
7 | 7 |
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> |
8 | 8 |
</th> |
9 | 9 |
<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %> |
trunk/app/views/issues/_relations.html.erb | ||
---|---|---|
35 | 35 |
:as => :relation, :remote => true, |
36 | 36 |
:url => {:controller => 'issue_relations', :action => 'create', :issue_id => @issue}, |
37 | 37 |
:method => :post, |
38 |
:complete => "Form.Element.focus('relation_issue_to_id');", |
|
39 | 38 |
:html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')} |
40 | 39 |
} do |f| %> |
41 | 40 |
<%= render :partial => 'issue_relations/form', :locals => {:f => f}%> |
trunk/app/views/issues/_update_form.js.erb | ||
---|---|---|
1 |
Element.update('all_attributes', '<%= escape_javascript(render :partial => 'form') %>');
|
|
1 |
$('#all_attributes').html('<%= escape_javascript(render :partial => 'form') %>');
|
|
2 | 2 |
|
3 |
if ($('log_time')) { |
|
4 |
<% if User.current.allowed_to?(:log_time, @issue.project) %> |
|
5 |
Element.show('log_time'); |
|
6 |
<% else %> |
|
7 |
Element.hide('log_time'); |
|
8 |
<% end %> |
|
9 |
} |
|
3 |
<% if User.current.allowed_to?(:log_time, @issue.project) %> |
|
4 |
$('#log_time').show(); |
|
5 |
<% else %> |
|
6 |
$('#log_time').hide(); |
|
7 |
<% end %> |
trunk/app/views/issues/bulk_edit.html.erb | ||
---|---|---|
17 | 17 |
<% if @allowed_projects.present? %> |
18 | 18 |
<p> |
19 | 19 |
<label for="issue_project_id"><%= l(:field_project) %></label> |
20 |
<%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project)) %> |
|
20 |
<%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project), |
|
21 |
:onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %> |
|
21 | 22 |
</p> |
22 |
<%= observe_field :issue_project_id, :url => {:action => 'bulk_edit'}, |
|
23 |
:update => 'content', |
|
24 |
:with => "Form.serialize('bulk_edit_form')" %> |
|
25 | 23 |
<% end %> |
26 | 24 |
<p> |
27 | 25 |
<label for="issue_tracker_id"><%= l(:field_tracker) %></label> |
... | ... | |
97 | 95 |
<label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label> |
98 | 96 |
<%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %> |
99 | 97 |
</p> |
100 |
<div id="parent_issue_candidates" class="autocomplete"></div> |
|
101 |
<%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %> |
|
98 |
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project)}')" %> |
|
102 | 99 |
<% end %> |
103 | 100 |
|
104 | 101 |
<% if @safe_attributes.include?('start_date') %> |
trunk/app/views/issues/bulk_edit.js.erb | ||
---|---|---|
1 |
$('#content').html('<%= escape_javascript(render :template => 'issues/bulk_edit.html') %>'); |
|
0 | 2 |
trunk/app/views/issues/destroy.html.erb | ||
---|---|---|
7 | 7 |
<p> |
8 | 8 |
<label><%= radio_button_tag 'todo', 'destroy', true %> <%= l(:text_destroy_time_entries) %></label><br /> |
9 | 9 |
<label><%= radio_button_tag 'todo', 'nullify', false %> <%= l(:text_assign_time_entries_to_project) %></label><br /> |
10 |
<label><%= radio_button_tag 'todo', 'reassign', false, :onchange => 'if (this.checked) { $("reassign_to_id").focus(); }' %> <%= l(:text_reassign_time_entries) %></label> |
|
11 |
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("todo_reassign").checked=true;' %>
|
|
10 |
<label><%= radio_button_tag 'todo', 'reassign', false, :onchange => 'if (this.checked) { $("#reassign_to_id").focus(); }' %> <%= l(:text_reassign_time_entries) %></label>
|
|
11 |
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("#todo_reassign").attr("checked", true);' %>
|
|
12 | 12 |
</p> |
13 | 13 |
</div> |
14 | 14 |
<%= submit_tag l(:button_apply) %> |
trunk/app/views/issues/index.html.erb | ||
---|---|---|
44 | 44 |
<%= link_to l(:button_clear), { :set_filter => 1, :project_id => @project }, :class => 'icon icon-reload' %> |
45 | 45 |
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %> |
46 | 46 |
<%= link_to_function l(:button_save), |
47 |
"$('query_form').action='#{ @project ? new_project_query_path(@project) : new_query_path }'; submit_query_form('query_form')",
|
|
47 |
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }'); submit_query_form('query_form')",
|
|
48 | 48 |
:class => 'icon icon-save' %> |
49 | 49 |
<% end %> |
50 | 50 |
</p> |
trunk/app/views/issues/new.html.erb | ||
---|---|---|
39 | 39 |
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
40 | 40 |
<%= preview_link preview_new_issue_path(:project_id => @project), 'issue-form' %> |
41 | 41 |
|
42 |
<%= javascript_tag "Form.Element.focus('issue_subject');" %>
|
|
42 |
<%= javascript_tag "$('#issue_subject').focus();" %>
|
|
43 | 43 |
<% end %> |
44 | 44 |
|
45 | 45 |
<div id="preview" class="wiki"></div> |
trunk/app/views/journals/_notes_form.html.erb | ||
---|---|---|
11 | 11 |
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @journal.issue), |
12 | 12 |
"journal-#{@journal.id}-form", |
13 | 13 |
"journal_#{@journal.id}_preview" %> | |
14 |
<%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " + |
|
15 |
"Element.show('journal-#{@journal.id}-notes'); return false;" %></p> |
|
14 |
<%= link_to l(:button_cancel), '#', :onclick => "$('#journal-#{@journal.id}-form').remove(); $('#journal-#{@journal.id}-notes').show(); return false;" %></p> |
|
16 | 15 |
|
17 | 16 |
<div id="journal_<%= @journal.id %>_preview" class="wiki"></div> |
18 | 17 |
<% end %> |
trunk/app/views/journals/edit.js.erb | ||
---|---|---|
1 |
Element.hide("journal-<%= @journal.id %>-notes"); |
|
2 |
Element.insert("journal-<%= @journal.id %>-notes", {'after': '<%= escape_javascript(render :partial => 'notes_form') %>'}); |
|
1 |
$("#journal-<%= @journal.id %>-notes").hide(); |
|
2 |
$("#journal-<%= @journal.id %>-notes").after('<%= escape_javascript(render :partial => 'notes_form') %>'); |
trunk/app/views/journals/new.js.erb | ||
---|---|---|
1 |
$('notes').value = "<%= raw escape_javascript(@content) %>"; |
|
2 |
Element.show('update'); |
|
3 |
Form.Element.focus('notes'); |
|
4 |
Element.scrollTo('update'); |
|
5 |
$('notes').scrollTop = $('notes').scrollHeight - $('notes').clientHeight; |
|
1 |
$('#notes').val("<%= raw escape_javascript(@content) %>"); |
|
2 |
showAndScrollTo("update", "notes"); |
|
3 |
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight; |
trunk/app/views/journals/update.js.erb | ||
---|---|---|
1 | 1 |
<% if @journal.frozen? %> |
2 |
Element.remove("change-<%= @journal.id %>");
|
|
2 |
$("#change-<%= @journal.id %>").remove();
|
|
3 | 3 |
<% else %> |
4 |
Element.replace("journal-<%= @journal.id %>-notes", '<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
|
|
5 |
Element.show("journal-<%= @journal.id %>-notes");
|
|
6 |
Element.remove("journal-<%= @journal.id %>-form");
|
|
4 |
$("#journal-<%= @journal.id %>-notes").replaceWith('<%= escape_javascript(render_notes(@journal.issue, @journal, :reply_links => authorize_for('issues', 'edit'))) %>');
|
|
5 |
$("#journal-<%= @journal.id %>-notes").show();
|
|
6 |
$("#journal-<%= @journal.id %>-form").remove();
|
|
7 | 7 |
<% end %> |
8 | 8 |
|
9 | 9 |
<%= call_hook(:view_journals_update_js_bottom, { :journal => @journal }) %> |
trunk/app/views/layouts/base.html.erb | ||
---|---|---|
8 | 8 |
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> |
9 | 9 |
<%= csrf_meta_tag %> |
10 | 10 |
<%= favicon %> |
11 |
<%= stylesheet_link_tag 'application', :media => 'all' %> |
|
11 |
<%= stylesheet_link_tag 'jquery/jquery-ui-1.8.21', 'application', :media => 'all' %>
|
|
12 | 12 |
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> |
13 | 13 |
<%= javascript_heads %> |
14 | 14 |
<%= heads_for_theme %> |
trunk/app/views/members/create.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
1 |
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
2 | 2 |
hideOnLoad(); |
3 | 3 |
|
4 | 4 |
<% if @members.present? && @members.all? {|m| m.valid? } %> |
5 | 5 |
<% @members.each do |member| %> |
6 |
new Effect.Highlight("member-<%= member.id %>");
|
|
6 |
$("#member-<%= member.id %>").effect("highlight");
|
|
7 | 7 |
<% end %> |
8 | 8 |
<% else %> |
9 | 9 |
<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %> |
trunk/app/views/members/destroy.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
1 |
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
2 | 2 |
hideOnLoad(); |
trunk/app/views/members/update.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-members', '<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
1 |
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
2 | 2 |
hideOnLoad(); |
3 |
new Effect.Highlight("member-<%= @member.id %>"); |
|
3 |
$("#member-<%= @member.id %>").effect("highlight"); |
trunk/app/views/messages/quote.js.erb | ||
---|---|---|
1 |
$('message_subject').value = "<%= raw escape_javascript(@subject) %>"; |
|
2 |
$('message_content').value = "<%= raw escape_javascript(@content) %>"; |
|
3 |
Element.show('reply'); |
|
4 |
Form.Element.focus('message_content'); |
|
5 |
Element.scrollTo('reply'); |
|
6 |
$('message_content').scrollTop = $('message_content').scrollHeight - $('message_content').clientHeight; |
|
1 |
$('#message_subject').val("<%= raw escape_javascript(@subject) %>"); |
|
2 |
$('#message_content').val("<%= raw escape_javascript(@content) %>"); |
|
3 |
showAndScrollTo("reply", "message_content"); |
|
4 |
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight; |
trunk/app/views/my/page_layout.html.erb | ||
---|---|---|
5 | 5 |
<%= select_tag 'block', |
6 | 6 |
content_tag('option') + options_for_select(@block_options), |
7 | 7 |
:id => "block-select" %> |
8 |
<%= link_to l(:button_add), '#', :onclick => '$("block-form").submit()', :class => 'icon icon-add' %> |
|
8 |
<%= link_to l(:button_add), '#', :onclick => '$("#block-form").submit()', :class => 'icon icon-add' %>
|
|
9 | 9 |
<% end %> |
10 | 10 |
<% end %> |
11 | 11 |
<%= link_to l(:button_back), {:action => 'page'}, :class => 'icon icon-cancel' %> |
... | ... | |
34 | 34 |
<% end if @blocks['right'] %> |
35 | 35 |
</div> |
36 | 36 |
|
37 |
<%= sortable_element 'list-top', |
|
38 |
:tag => 'div', |
|
39 |
:only => 'mypage-box', |
|
40 |
:handle => "handle", |
|
41 |
:dropOnEmpty => true, |
|
42 |
:containment => ['list-top', 'list-left', 'list-right'], |
|
43 |
:constraint => false, |
|
44 |
:url => { :action => "order_blocks", :group => "top" } |
|
45 |
%> |
|
37 |
<%= javascript_tag "initMyPageSortable('top', '#{ escape_javascript url_for(:action => "order_blocks", :group => "top") }');" %> |
|
38 |
<%= javascript_tag "initMyPageSortable('left', '#{ escape_javascript url_for(:action => "order_blocks", :group => "left") }');" %> |
|
39 |
<%= javascript_tag "initMyPageSortable('right', '#{ escape_javascript url_for(:action => "order_blocks", :group => "right") }');" %> |
|
46 | 40 |
|
47 |
<%= sortable_element 'list-left', |
|
48 |
:tag => 'div', |
|
49 |
:only => 'mypage-box', |
|
50 |
:handle => "handle", |
|
51 |
:dropOnEmpty => true, |
|
52 |
:containment => ['list-top', 'list-left', 'list-right'], |
|
53 |
:constraint => false, |
|
54 |
:url => { :action => "order_blocks", :group => "left" } |
|
55 |
%> |
|
56 |
|
|
57 |
<%= sortable_element 'list-right', |
|
58 |
:tag => 'div', |
|
59 |
:only => 'mypage-box', |
|
60 |
:handle => "handle", |
|
61 |
:dropOnEmpty => true, |
|
62 |
:containment => ['list-top', 'list-left', 'list-right'], |
|
63 |
:constraint => false, |
|
64 |
:url => { :action => "order_blocks", :group => "right" } |
|
65 |
%> |
|
66 |
|
|
67 | 41 |
<% html_title(l(:label_my_page)) -%> |
trunk/app/views/news/index.html.erb | ||
---|---|---|
2 | 2 |
<%= link_to(l(:label_news_new), |
3 | 3 |
new_project_news_path(@project), |
4 | 4 |
:class => 'icon icon-add', |
5 |
:onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
|
5 |
:onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
|
|
6 | 6 |
</div> |
7 | 7 |
|
8 | 8 |
<div id="add-news" style="display:none;"> |
... | ... | |
12 | 12 |
<%= render :partial => 'news/form', :locals => { :f => f } %> |
13 | 13 |
<%= submit_tag l(:button_create) %> |
14 | 14 |
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> | |
15 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
|
|
15 |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
|
|
16 | 16 |
<% end if @project %> |
17 | 17 |
<div id="preview" class="wiki"></div> |
18 | 18 |
</div> |
trunk/app/views/news/show.html.erb | ||
---|---|---|
4 | 4 |
edit_news_path(@news), |
5 | 5 |
:class => 'icon icon-edit', |
6 | 6 |
:accesskey => accesskey(:edit), |
7 |
:onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
|
7 |
:onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
|
|
8 | 8 |
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %> |
9 | 9 |
</div> |
10 | 10 |
|
... | ... | |
17 | 17 |
<%= render :partial => 'form', :locals => { :f => f } %> |
18 | 18 |
<%= submit_tag l(:button_save) %> |
19 | 19 |
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> | |
20 |
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;' %>
|
|
20 |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
|
|
21 | 21 |
<% end %> |
22 | 22 |
<div id="preview" class="wiki"></div> |
23 | 23 |
</div> |
trunk/app/views/projects/new.html.erb | ||
---|---|---|
4 | 4 |
<%= render :partial => 'form', :locals => { :f => f } %> |
5 | 5 |
<%= submit_tag l(:button_create) %> |
6 | 6 |
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |
7 |
<%= javascript_tag "Form.Element.focus('project_name');" %>
|
|
7 |
<%= javascript_tag "$('#project_name').focus();" %>
|
|
8 | 8 |
<% end %> |
trunk/app/views/projects/settings/_members.html.erb | ||
---|---|---|
29 | 29 |
<%= hidden_field_tag 'membership[role_ids][]', '' %> |
30 | 30 |
<p><%= submit_tag l(:button_change), :class => "small" %> |
31 | 31 |
<%= link_to_function l(:button_cancel), |
32 |
"$('member-#{member.id}-roles').show(); $('member-#{member.id}-roles-form').hide(); return false;"
|
|
32 |
"$('#member-#{member.id}-roles').show(); $('#member-#{member.id}-roles-form').hide(); return false;"
|
|
33 | 33 |
%></p> |
34 | 34 |
<% end %> |
35 | 35 |
</td> |
36 | 36 |
<td class="buttons"> |
37 | 37 |
<%= link_to_function l(:button_edit), |
38 |
"$('member-#{member.id}-roles').hide(); $('member-#{member.id}-roles-form').show(); return false;",
|
|
38 |
"$('#member-#{member.id}-roles').hide(); $('#member-#{member.id}-roles-form').show(); return false;",
|
|
39 | 39 |
:class => 'icon icon-edit' %> |
40 | 40 |
<%= delete_link membership_path(member), |
41 | 41 |
:remote => true, |
... | ... | |
55 | 55 |
|
56 | 56 |
<div class="splitcontentright"> |
57 | 57 |
<% if roles.any? && principals.any? %> |
58 |
<%= form_for(@member, {:as => :membership, :remote => true, |
|
59 |
:url => project_memberships_path(@project), :method => :post, |
|
60 |
:loading => '$(\'member-add-submit\').disable();', |
|
61 |
:complete => 'if($(\'member-add-submit\')) $(\'member-add-submit\').enable();' |
|
62 |
} ) do |f| %> |
|
58 |
<%= form_for(@member, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %> |
|
63 | 59 |
<fieldset><legend><%=l(:label_member_new)%></legend> |
64 | 60 |
|
65 | 61 |
<p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p> |
66 |
<%= observe_field(:principal_search, |
|
67 |
:frequency => 0.5, |
|
68 |
:update => :principals, |
|
69 |
:url => autocomplete_project_memberships_path(@project), |
|
70 |
:method => :get, |
|
71 |
:before => '$("principal_search").addClassName("ajax-loading")', |
|
72 |
:complete => '$("principal_search").removeClassName("ajax-loading")', |
|
73 |
:with => 'q') |
|
74 |
%> |
|
62 |
<%= javascript_tag "observeSearchfield('principal_search', 'principals', '#{ escape_javascript autocomplete_project_memberships_path(@project) }')" %> |
|
75 | 63 |
|
76 | 64 |
<div id="principals"> |
77 | 65 |
<%= principals_check_box_tags 'membership[user_ids][]', principals %> |
trunk/app/views/queries/_filters.html.erb | ||
---|---|---|
50 | 50 |
</tr> |
51 | 51 |
</table> |
52 | 52 |
<%= hidden_field_tag 'f[]', '' %> |
53 |
<%= javascript_tag 'Event.observe(window,"load",apply_filters_observer);' %> |
|
53 |
<%= javascript_tag '$(document).ready(function(){observeIssueFilters();});' %> |
trunk/app/views/queries/_form.html.erb | ||
---|---|---|
8 | 8 |
<% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @project) %> |
9 | 9 |
<p><label for="query_is_public"><%=l(:field_is_public)%></label> |
10 | 10 |
<%= check_box 'query', 'is_public', |
11 |
:onchange => (User.current.admin? ? nil : 'if (this.checked) {$("query_is_for_all").checked = false; $("query_is_for_all").disabled = true;} else {$("query_is_for_all").disabled = false;}') %></p>
|
|
11 |
:onchange => (User.current.admin? ? nil : 'if (this.checked) {$("#query_is_for_all").removeAttr("checked"); $("#query_is_for_all").attr("disabled", true);} else {$("#query_is_for_all").removeAttr("disabled");}') %></p>
|
|
12 | 12 |
<% end %> |
13 | 13 |
|
14 | 14 |
<p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label> |
... | ... | |
17 | 17 |
|
18 | 18 |
<p><label for="query_default_columns"><%=l(:label_default_columns)%></label> |
19 | 19 |
<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns', |
20 |
:onclick => 'if (this.checked) {Element.hide("columns")} else {Element.show("columns")}' %></p>
|
|
20 |
:onclick => 'if (this.checked) {$("#columns").hide();} else {$("#columns").show();}' %></p>
|
|
21 | 21 |
|
22 | 22 |
<p><label for="query_group_by"><%= l(:field_group_by) %></label> |
23 | 23 |
<%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p> |
trunk/app/views/repositories/_dir_list_content.html.erb | ||
---|---|---|
7 | 7 |
<td style="padding-left: <%=18 * depth%>px;" class="<%= |
8 | 8 |
@repository.report_last_commit ? "filename" : "filename_no_report" %>";> |
9 | 9 |
<% if entry.is_dir? %> |
10 |
<span class="expander" onclick="<%= remote_function( |
|
11 |
:url => { |
|
10 |
<span class="expander" onclick="scmEntryClick('<%= tr_id %>', '<%= escape_javascript(url_for( |
|
12 | 11 |
:action => 'show', |
13 | 12 |
:id => @project, |
14 | 13 |
:repository_id => @repository.identifier_param, |
15 | 14 |
:path => to_path_param(ent_path), |
16 | 15 |
:rev => @rev, |
17 | 16 |
:depth => (depth + 1), |
18 |
:parent_id => tr_id |
|
19 |
}, |
|
20 |
:method => :get, |
|
21 |
:update => { :success => tr_id }, |
|
22 |
:position => :after, |
|
23 |
:success => "scmEntryLoaded('#{tr_id}')", |
|
24 |
:condition => "scmEntryClick('#{tr_id}')" |
|
25 |
) %>"> </span> |
|
17 |
:parent_id => tr_id)) %>');"> </span> |
|
26 | 18 |
<% end %> |
27 | 19 |
<%= link_to h(ent_name), |
28 | 20 |
{:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, |
trunk/app/views/repositories/_related_issues.html.erb | ||
---|---|---|
29 | 29 |
:id => @project, :repository_id => @repository.identifier_param, |
30 | 30 |
:rev => @changeset.identifier}, |
31 | 31 |
:method => :post, |
32 |
:complete => "Form.Element.focus('issue_id');", |
|
33 | 32 |
:html => {:id => 'new-relation-form', :style => (@issue ? '' : 'display: none;')}) do |f| %> |
34 | 33 |
<%= l(:label_issue) %> #<%= text_field_tag 'issue_id', '', :size => 10 %> |
35 | 34 |
<%= submit_tag l(:button_add) %> |
trunk/app/views/repositories/_revision_graph.html.erb | ||
---|---|---|
2 | 2 |
<%= javascript_include_tag 'revision_graph.js' %> |
3 | 3 |
|
4 | 4 |
<script type="text/javascript" charset="utf-8"> |
5 |
function revisionGraphHandler(){ |
|
6 |
drawRevisionGraph( |
|
7 |
document.getElementById('holder'), |
|
8 |
<%= commits.to_json.html_safe %>, |
|
9 |
<%= space %> |
|
10 |
); |
|
11 |
} |
|
5 | 12 |
|
6 |
['load', 'resize'].each(function(window_event) { |
|
7 |
|
|
8 |
Event.observe(window, window_event, function(){ |
|
9 |
|
|
10 |
drawRevisionGraph( |
|
11 |
document.getElementById('holder'), |
|
12 |
<%= commits.to_json.html_safe %>, |
|
13 |
<%= space %>); |
|
14 |
}); |
|
15 |
}); |
|
13 |
$(document).ready(revisionGraphHandler); |
|
14 |
$(window).resize(revisionGraphHandler); |
|
16 | 15 |
</script> |
17 | 16 |
|
18 | 17 |
<div id="holder" class="revision-graph"></div> |
trunk/app/views/repositories/_revisions.html.erb | ||
---|---|---|
37 | 37 |
<%= content_tag(:td, :class => 'id', :style => id_style) do %> |
38 | 38 |
<%= link_to_revision(changeset, @repository) %> |
39 | 39 |
<% end %> |
40 |
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td>
|
|
41 |
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
|
|
40 |
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
|
|
41 |
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
|
|
42 | 42 |
<td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
43 | 43 |
<td class="author"><%= h truncate(changeset.author.to_s, :length => 30) %></td> |
44 | 44 |
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td> |
trunk/app/views/repositories/add_related_issue.js.erb | ||
---|---|---|
1 | 1 |
<% if @issue %> |
2 |
Element.update('related-issues', '<%= escape_javascript(render :partial => "related_issues") %>'); |
|
3 |
Effect.highlight('related-issue-<%= @issue.id %>'); |
|
2 |
$('#related-issues').html('<%= escape_javascript(render :partial => "related_issues") %>'); |
|
3 |
$('#related-issue-<%= @issue.id %>').effect("highlight"); |
|
4 |
$('#issue_id').focus(); |
|
4 | 5 |
<% else %> |
5 | 6 |
alert("<%= escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid')) %>"); |
6 | 7 |
<% end %> |
trunk/app/views/repositories/edit.html.erb | ||
---|---|---|
1 | 1 |
<h2><%= l(:label_repository) %></h2> |
2 | 2 |
|
3 |
<%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put} do |f| %> |
|
3 |
<%= labelled_form_for :repository, @repository, :url => repository_path(@repository), :html => {:method => :put, :id => 'repository-form'} do |f| %>
|
|
4 | 4 |
<%= render :partial => 'form', :locals => {:f => f} %> |
5 | 5 |
<% end %> |
trunk/app/views/repositories/new.html.erb | ||
---|---|---|
1 | 1 |
<h2><%= l(:label_repository_new) %></h2> |
2 | 2 |
|
3 |
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project) do |f| %> |
|
3 |
<%= labelled_form_for :repository, @repository, :url => project_repositories_path(@project), :html => {:id => 'repository-form'} do |f| %>
|
|
4 | 4 |
<%= render :partial => 'form', :locals => {:f => f} %> |
5 | 5 |
<% end %> |
trunk/app/views/repositories/new.js.erb | ||
---|---|---|
1 |
$('#content').html('<%= escape_javascript(render :template => 'repositories/new.html') %>'); |
|
0 | 2 |
trunk/app/views/repositories/remove_related_issue.js.erb | ||
---|---|---|
1 |
Element.remove('related-issue-<%= @issue.id %>'); |
|
1 |
$('#related-issue-<%= @issue.id %>').remove(); |
trunk/app/views/search/index.html.erb | ||
---|---|---|
4 | 4 |
<%= form_tag({}, :method => :get) do %> |
5 | 5 |
<%= label_tag "search-input", l(:description_search), :class => "hidden-for-sighted" %> |
6 | 6 |
<p><%= text_field_tag 'q', @question, :size => 60, :id => 'search-input' %> |
7 |
<%= javascript_tag "Field.focus('search-input')" %>
|
|
7 |
<%= javascript_tag "$('#search-input').focus()" %>
|
|
8 | 8 |
<%= project_select_tag %> |
9 | 9 |
<%= hidden_field_tag 'all_words', '', :id => nil %> |
10 | 10 |
<label><%= check_box_tag 'all_words', 1, @all_words %> <%= l(:label_all_words) %></label> |
trunk/app/views/settings/_mail_handler.html.erb | ||
---|---|---|
9 | 9 |
|
10 | 10 |
<div class="box tabular settings"> |
11 | 11 |
<p><%= setting_check_box :mail_handler_api_enabled, |
12 |
:onclick => "if (this.checked) { Form.Element.enable('settings_mail_handler_api_key'); } else { Form.Element.disable('settings_mail_handler_api_key'); }"%></p>
|
|
12 |
:onclick => "if (this.checked) { $('#settings_mail_handler_api_key').removeAttr('disabled'); } else { $('#settings_mail_handler_api_key').attr('disabled', true); }"%></p>
|
|
13 | 13 |
|
14 | 14 |
<p><%= setting_text_field :mail_handler_api_key, :size => 30, |
15 | 15 |
:id => 'settings_mail_handler_api_key', |
16 | 16 |
:disabled => !Setting.mail_handler_api_enabled? %> |
17 |
<%= link_to_function l(:label_generate_key), "if ($('settings_mail_handler_api_key').disabled == false) { $('settings_mail_handler_api_key').value = randomKey(20) }" %>
|
|
17 |
<%= link_to_function l(:label_generate_key), "if (!$('#settings_mail_handler_api_key').attr('disabled')) { $('#settings_mail_handler_api_key').val(randomKey(20)) }" %>
|
|
18 | 18 |
</p> |
19 | 19 |
</div> |
20 | 20 |
|
trunk/app/views/settings/_repositories.html.erb | ||
---|---|---|
49 | 49 |
|
50 | 50 |
<p><%= setting_check_box :sys_api_enabled, |
51 | 51 |
:onclick => |
52 |
"if (this.checked) { Form.Element.enable('settings_sys_api_key'); } else { Form.Element.disable('settings_sys_api_key'); }" %></p>
|
|
52 |
"if (this.checked) { $('#settings_sys_api_key').removeAttr('disabled'); } else { $('#settings_sys_api_key').attr('disabled', true); }" %></p>
|
|
53 | 53 |
|
54 | 54 |
<p><%= setting_text_field :sys_api_key, |
55 | 55 |
:size => 30, |
... | ... | |
57 | 57 |
:disabled => !Setting.sys_api_enabled?, |
58 | 58 |
:label => :setting_mail_handler_api_key %> |
59 | 59 |
<%= link_to_function l(:label_generate_key), |
60 |
"if ($('settings_sys_api_key').disabled == false) { $('settings_sys_api_key').value = randomKey(20) }" %>
|
|
60 |
"if (!$('#settings_sys_api_key').attr('disabled')) { $('#settings_sys_api_key').val(randomKey(20)) }" %>
|
|
61 | 61 |
</p> |
62 | 62 |
|
63 | 63 |
<p><%= setting_text_field :repository_log_display_limit, :size => 6 %></p> |
... | ... | |
85 | 85 |
|
86 | 86 |
<p><%= setting_check_box :commit_logtime_enabled, |
87 | 87 |
:onclick => |
88 |
"if (this.checked) { Form.Element.enable('settings_commit_logtime_activity_id'); } else { Form.Element.disable('settings_commit_logtime_activity_id'); }"%></p>
|
|
88 |
"if (this.checked) { $('#settings_commit_logtime_activity_id').removeAttr('disabled'); } else { $('#settings_commit_logtime_activity_id').attr('disabled', true); }"%></p>
|
|
89 | 89 |
|
90 | 90 |
<p><%= setting_select :commit_logtime_activity_id, |
91 | 91 |
[[l(:label_default), 0]] + |
trunk/app/views/timelog/_date_range.html.erb | ||
---|---|---|
3 | 3 |
<div> |
4 | 4 |
<p> |
5 | 5 |
<%= label_tag "period_type_list", l(:description_date_range_list), :class => "hidden-for-sighted" %> |
6 |
<%= radio_button_tag 'period_type', '1', !@free_period, :onclick => 'Form.Element.disable("from");Form.Element.disable("to");Form.Element.enable("period");', :id => "period_type_list"%>
|
|
6 |
<%= radio_button_tag 'period_type', '1', !@free_period, :onclick => '$("#from,#to").attr("disabled", true);$("#period").removeAttr("disabled");', :id => "period_type_list"%>
|
|
7 | 7 |
<%= select_tag 'period', options_for_period_select(params[:period]), |
8 | 8 |
:onchange => 'this.form.submit();', |
9 |
:onfocus => '$("period_type_1").checked = true;',
|
|
9 |
:onfocus => '$("#period_type_1").attr("checked", true);',
|
|
10 | 10 |
:disabled => @free_period %> |
11 | 11 |
</p> |
12 | 12 |
<p> |
13 | 13 |
<%= label_tag "period_type_interval", l(:description_date_range_interval), :class => "hidden-for-sighted" %> |
14 |
<%= radio_button_tag 'period_type', '2', @free_period, :onclick => 'Form.Element.enable("from");Form.Element.enable("to");Form.Element.disable("period");', :id => "period_type_interval" %>
|
|
15 |
<span onclick="$('period_type_interval').checked = true;Form.Element.enable('from');Form.Element.enable('to');Form.Element.disable('period');">
|
|
14 |
<%= radio_button_tag 'period_type', '2', @free_period, :onclick => '$("#from,#to").removeAttr("disabled");$("#period").attr("disabled", true);', :id => "period_type_interval" %>
|
|
15 |
<span onclick="$('#period_type_interval').attr('checked', true);$('#from,#to').removeAttr('disabled');$('#period').attr('disabled', true);">
|
|
16 | 16 |
<%= l(:label_date_from_to, |
17 | 17 |
:start => ((label_tag "from", l(:description_date_from), :class => "hidden-for-sighted") + |
18 | 18 |
text_field_tag('from', @from, :size => 10, :disabled => !@free_period) + calendar_for('from')), |
... | ... | |
23 | 23 |
</div> |
24 | 24 |
</fieldset> |
25 | 25 |
<p class="buttons"> |
26 |
<%= link_to_function l(:button_apply), '$("query_form").submit()', :class => 'icon icon-checked' %> |
|
26 |
<%= link_to_function l(:button_apply), '$("#query_form").submit()', :class => 'icon icon-checked' %>
|
|
27 | 27 |
<%= link_to l(:button_clear), {:controller => controller_name, :action => action_name, :project_id => @project, :issue_id => @issue}, :class => 'icon icon-reload' %> |
28 | 28 |
</p> |
29 | 29 |
|
trunk/app/views/timelog/_list.html.erb | ||
---|---|---|
7 | 7 |
<th class="checkbox hide-when-print"> |
8 | 8 |
<%= link_to image_tag('toggle_check.png'), |
9 | 9 |
{}, |
10 |
:onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
|
|
10 |
:onclick => 'toggleIssuesSelection(this); return false;',
|
|
11 | 11 |
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> |
12 | 12 |
</th> |
13 | 13 |
<%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %> |
trunk/app/views/users/_form.html.erb | ||
---|---|---|
25 | 25 |
<fieldset class="box tabular"> |
26 | 26 |
<legend><%=l(:label_authentication)%></legend> |
27 | 27 |
<% unless @auth_sources.empty? %> |
28 |
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {Element.show('password_fields');} else {Element.hide('password_fields');}" %></p>
|
|
28 |
<p><%= f.select :auth_source_id, ([[l(:label_internal), ""]] + @auth_sources.collect { |a| [a.name, a.id] }), {}, :onchange => "if (this.value=='') {$('#password_fields').show();} else {$('#password_fields').hide();}" %></p>
|
|
29 | 29 |
<% end %> |
30 | 30 |
<div id="password_fields" style="<%= 'display:none;' if @user.auth_source %>"> |
31 | 31 |
<p><%= f.password_field :password, :required => true, :size => 25 %> |
trunk/app/views/users/_mail_notifications.html.erb | ||
---|---|---|
4 | 4 |
'user[mail_notification]', |
5 | 5 |
options_for_select( |
6 | 6 |
user_mail_notification_options(@user), @user.mail_notification), |
7 |
:onchange => 'if (this.value == "selected") {Element.show("notified-projects")} else {Element.hide("notified-projects")}'
|
|
7 |
:onchange => 'if (this.value == "selected") {$("#notified-projects").show();} else {$("#notified-projects").hide();}'
|
|
8 | 8 |
) %> |
9 | 9 |
</p> |
10 | 10 |
<%= content_tag 'div', :id => 'notified-projects', :style => (@user.mail_notification == 'selected' ? '' : 'display:none;') do %> |
trunk/app/views/users/_memberships.html.erb | ||
---|---|---|
30 | 30 |
<%= hidden_field_tag 'membership[role_ids][]', '' %> |
31 | 31 |
<p><%= submit_tag l(:button_change) %> |
32 | 32 |
<%= link_to_function l(:button_cancel), |
33 |
"$('member-#{membership.id}-roles').show(); $('member-#{membership.id}-roles-form').hide(); return false;"
|
|
33 |
"$('#member-#{membership.id}-roles').show(); $('#member-#{membership.id}-roles-form').hide(); return false;"
|
|
34 | 34 |
%></p> |
35 | 35 |
<% end %> |
36 | 36 |
</td> |
37 | 37 |
<td class="buttons"> |
38 | 38 |
<%= link_to_function l(:button_edit), |
39 |
"$('member-#{membership.id}-roles').hide(); $('member-#{membership.id}-roles-form').show(); return false;",
|
|
39 |
"$('#member-#{membership.id}-roles').hide(); $('#member-#{membership.id}-roles-form').show(); return false;",
|
|
40 | 40 |
:class => 'icon icon-edit' |
41 | 41 |
%> |
42 | 42 |
<%= delete_link user_membership_path(@user, membership), :remote => true if membership.deletable? %> |
trunk/app/views/users/destroy_membership.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-memberships', '<%= escape_javascript(render :partial => 'users/memberships') %>'); |
|
1 |
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>'); |
trunk/app/views/users/edit_membership.js.erb | ||
---|---|---|
1 | 1 |
<% if @membership.valid? %> |
2 |
Element.update("tab-content-memberships", '<%= escape_javascript(render :partial => 'users/memberships') %>');
|
|
3 |
new Effect.Highlight("member-<%= @membership.id %>")
|
|
2 |
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>');
|
|
3 |
$("#member-<%= @membership.id %>").effect("highlight");
|
|
4 | 4 |
<% else %> |
5 | 5 |
alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')) %>'); |
6 | 6 |
<% end %> |
trunk/app/views/versions/_issue_counts.html.erb | ||
---|---|---|
5 | 5 |
select_tag('status_by', |
6 | 6 |
status_by_options_for_select(criteria), |
7 | 7 |
:id => 'status_by_select', |
8 |
:onchange => remote_function(:url => status_by_version_path(version), |
|
9 |
:with => "Form.serialize('status_by_form')"))).html_safe %> |
|
8 |
:data => {:remote => true, :method => 'post', :url => status_by_version_path(version)})).html_safe %> |
|
10 | 9 |
</legend> |
11 | 10 |
<% if counts.empty? %> |
12 | 11 |
<p><em><%= l(:label_no_data) %></em></p> |
trunk/app/views/versions/create.js.erb | ||
---|---|---|
1 | 1 |
hideModal(); |
2 | 2 |
<% select = content_tag('select', content_tag('option') + version_options_for_select(@project.shared_versions.open, @version), :id => 'issue_fixed_version_id', :name => 'issue[fixed_version_id]') %> |
3 |
Element.replace('issue_fixed_version_id', '<%= escape_javascript(select) %>'); |
|
3 |
$('#issue_fixed_version_id').replaceWith('<%= escape_javascript(select) %>'); |
trunk/app/views/versions/index.html.erb | ||
---|---|---|
54 | 54 |
<% if @completed_versions.present? %> |
55 | 55 |
<p> |
56 | 56 |
<%= link_to_function l(:label_completed_versions), |
57 |
'Element.toggleClassName("toggle-completed-versions", "collapsed"); Element.toggle("completed-versions")',
|
|
57 |
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
|
|
58 | 58 |
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br /> |
59 | 59 |
<span id="completed-versions" style="display:none;"> |
60 | 60 |
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("<br />\n").html_safe %> |
trunk/app/views/versions/new.js.erb | ||
---|---|---|
1 |
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'versions/new_modal') %>');
|
|
1 |
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'versions/new_modal') %>');
|
|
2 | 2 |
showModal('ajax-modal', '600px'); |
3 |
Form.Element.focus('version_name'); |
trunk/app/views/versions/status_by.js.erb | ||
---|---|---|
1 |
Element.update('status_by', '<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>'); |
|
1 |
$('#status_by').html('<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>'); |
trunk/app/views/watchers/_new.html.erb | ||
---|---|---|
9 | 9 |
:id => 'new-watcher-form') do %> |
10 | 10 |
|
11 | 11 |
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p> |
12 |
<%= observe_field(:user_search, |
|
13 |
:frequency => 0.5, |
|
14 |
:update => :users_for_watcher, |
|
15 |
:method => :get, |
|
16 |
:before => '$("user_search").addClassName("ajax-loading")', |
|
17 |
:complete => '$("user_search").removeClassName("ajax-loading")', |
|
18 |
:url => { |
|
19 |
:controller => 'watchers', |
|
12 |
<%= javascript_tag "observeSearchfield('user_search', 'users_for_watcher', '#{ escape_javascript url_for(:controller => 'watchers', |
|
20 | 13 |
:action => 'autocomplete_for_user', |
21 | 14 |
:object_type => watched.class.name.underscore, |
22 |
:object_id => watched}, |
|
23 |
:with => 'q') %> |
|
15 |
:object_id => watched) }')" %> |
|
24 | 16 |
|
25 | 17 |
<div id="users_for_watcher"> |
26 | 18 |
<%= principals_check_box_tags 'watcher[user_ids][]', (watched ? watched.addable_watcher_users : User.active.all(:limit => 100)) %> |
trunk/app/views/watchers/_set_watcher.js.erb | ||
---|---|---|
1 | 1 |
<% selector = ".#{watcher_css(watched)}" %> |
2 |
$$("<%= selector %>").each(function(el){el.update("<%= escape_javascript watcher_link(watched, user) %>")}); |
|
2 |
$("<%= selector %>").each(function(){$(this).html("<%= escape_javascript watcher_link(watched, user) %>")}); |
trunk/app/views/watchers/append.js.erb | ||
---|---|---|
1 | 1 |
<% @users.each do |user| %> |
2 |
$$("#issue_watcher_user_ids_<%= user.id %>").each(function(el){el.remove();});
|
|
2 |
$("#issue_watcher_user_ids_<%= user.id %>").remove();
|
|
3 | 3 |
<% end %> |
4 |
Element.insert('watchers_inputs', '<%= escape_javascript(watchers_checkboxes(nil, @users, true)) %>'); |
|
4 |
$('#watchers_inputs').append('<%= escape_javascript(watchers_checkboxes(nil, @users, true)) %>'); |
trunk/app/views/watchers/create.js.erb | ||
---|---|---|
1 |
Element.update('ajax-modal', '<%= escape_javascript(render(:partial => 'watchers/new', :locals => {:watched => @watched})) %>'); |
|
2 |
Element.update('watchers', '<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>'); |
|
1 |
$('#ajax-modal').html('<%= escape_javascript(render(:partial => 'watchers/new', :locals => {:watched => @watched})) %>'); |
|
2 |
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>'); |
trunk/app/views/watchers/destroy.js.erb | ||
---|---|---|
1 |
Element.update('watchers', '<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>'); |
|
1 |
$('#watchers').html('<%= escape_javascript(render(:partial => 'watchers/watchers', :locals => {:watched => @watched})) %>'); |
trunk/app/views/watchers/new.js.erb | ||
---|---|---|
1 |
Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'watchers/new', :locals => {:watched => @watched}) %>');
|
|
1 |
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'watchers/new', :locals => {:watched => @watched}) %>');
|
|
2 | 2 |
showModal('ajax-modal', '400px'); |
3 |
$('ajax-modal').addClassName('new-watcher'); |
|
3 |
$('#ajax-modal').addClass('new-watcher'); |
trunk/app/views/wiki/destroy.html.erb | ||
---|---|---|
12 | 12 |
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_wiki_page_reassign_children) %></label>: |
13 | 13 |
<%= label_tag "reassign_to_id", l(:description_wiki_subpages_reassign), :class => "hidden-for-sighted" %> |
14 | 14 |
<%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to), |
15 |
:onclick => "$('todo_reassign').checked = true;" %>
|
|
15 |
:onclick => "$('#todo_reassign').attr('checked', true);" %>
|
|
16 | 16 |
<% end %> |
17 | 17 |
</p> |
18 | 18 |
</div> |
trunk/app/views/wiki/history.html.erb | ||
---|---|---|
23 | 23 |
<% @versions.each do |ver| %> |
24 | 24 |
<tr class="wiki-page-version <%= cycle("odd", "even") %>"> |
25 | 25 |
<td class="id"><%= link_to h(ver.version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td> |
26 |
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
|
|
26 |
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked', true);") if show_diff && (line_num < @versions.size) %></td>
|
|
27 | 27 |
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td> |
28 | 28 |
<td class="updated_on"><%= format_time(ver.updated_on) %></td> |
29 | 29 |
<td class="author"><%= link_to_user ver.author %></td> |
trunk/app/views/wiki/show.html.erb | ||
---|---|---|
40 | 40 |
|
41 | 41 |
<% if @editable && authorize_for('wiki', 'add_attachment') %> |
42 | 42 |
<div id="wiki_add_attachment"> |
43 |
<p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;",
|
|
43 |
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
|
44 | 44 |
:id => 'attach_files_link' %></p> |
45 | 45 |
<%= form_tag({:controller => 'wiki', :action => 'add_attachment', |
46 | 46 |
:project_id => @project, :id => @page.title}, |
... | ... | |
50 | 50 |
<p><%= render :partial => 'attachments/form' %></p> |
51 | 51 |
</div> |
52 | 52 |
<%= submit_tag l(:button_add) %> |
53 |
<%= link_to l(:button_cancel), {}, :onclick => "Element.hide('add_attachment_form'); Element.show('attach_files_link'); return false;" %>
|
|
53 |
<%= link_to l(:button_cancel), {}, :onclick => "$('#add_attachment_form').hide(); return false;" %>
|
|
54 | 54 |
<% end %> |
55 | 55 |
</div> |
56 | 56 |
<% end %> |
trunk/app/views/wikis/edit.js.erb | ||
---|---|---|
1 |
Element.update('tab-content-wiki', '<%= escape_javascript(render :partial => 'projects/settings/wiki') %>'); |
|
1 |
$('#tab-content-wiki').html('<%= escape_javascript(render :partial => 'projects/settings/wiki') %>'); |
Also available in: Unified diff
JQuery in, Prototype/Scriptaculous out (#11445).