summaryrefslogtreecommitdiffstats
path: root/app/views/versions
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-22 13:29:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-07-22 13:29:26 +0000
commit6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46 (patch)
treeaf09ea2d29ce61690b656be91fbf82a3009ea1ed /app/views/versions
parent387836f8aa736eba4dfe0da879ad71bbc19dd224 (diff)
downloadredmine-6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46.tar.gz
redmine-6a2ca5e0342751b6d38a1a05ad25b5c0002d6e46.zip
JQuery in, Prototype/Scriptaculous out (#11445).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10068 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/versions')
-rw-r--r--app/views/versions/_issue_counts.html.erb3
-rw-r--r--app/views/versions/create.js.erb2
-rw-r--r--app/views/versions/index.html.erb2
-rw-r--r--app/views/versions/new.js.erb3
-rw-r--r--app/views/versions/status_by.js.erb2
5 files changed, 5 insertions, 7 deletions
diff --git a/app/views/versions/_issue_counts.html.erb b/app/views/versions/_issue_counts.html.erb
index e4bb6e666..d4b33255c 100644
--- a/app/views/versions/_issue_counts.html.erb
+++ b/app/views/versions/_issue_counts.html.erb
@@ -5,8 +5,7 @@
select_tag('status_by',
status_by_options_for_select(criteria),
:id => 'status_by_select',
- :onchange => remote_function(:url => status_by_version_path(version),
- :with => "Form.serialize('status_by_form')"))).html_safe %>
+ :data => {:remote => true, :method => 'post', :url => status_by_version_path(version)})).html_safe %>
</legend>
<% if counts.empty? %>
<p><em><%= l(:label_no_data) %></em></p>
diff --git a/app/views/versions/create.js.erb b/app/views/versions/create.js.erb
index 01720bf90..e6e0bec45 100644
--- a/app/views/versions/create.js.erb
+++ b/app/views/versions/create.js.erb
@@ -1,3 +1,3 @@
hideModal();
<% 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]') %>
-Element.replace('issue_fixed_version_id', '<%= escape_javascript(select) %>');
+$('#issue_fixed_version_id').replaceWith('<%= escape_javascript(select) %>');
diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb
index d8ac53401..a05320ac5 100644
--- a/app/views/versions/index.html.erb
+++ b/app/views/versions/index.html.erb
@@ -54,7 +54,7 @@
<% if @completed_versions.present? %>
<p>
<%= link_to_function l(:label_completed_versions),
- 'Element.toggleClassName("toggle-completed-versions", "collapsed"); Element.toggle("completed-versions")',
+ '$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %><br />
<span id="completed-versions" style="display:none;">
<%= @completed_versions.map {|version| link_to format_version_name(version), version_path(version)}.join("<br />\n").html_safe %>
diff --git a/app/views/versions/new.js.erb b/app/views/versions/new.js.erb
index cce80e029..114b9c7c5 100644
--- a/app/views/versions/new.js.erb
+++ b/app/views/versions/new.js.erb
@@ -1,3 +1,2 @@
-Element.update('ajax-modal', '<%= escape_javascript(render :partial => 'versions/new_modal') %>');
+$('#ajax-modal').html('<%= escape_javascript(render :partial => 'versions/new_modal') %>');
showModal('ajax-modal', '600px');
-Form.Element.focus('version_name');
diff --git a/app/views/versions/status_by.js.erb b/app/views/versions/status_by.js.erb
index e3a667a89..94e01279c 100644
--- a/app/views/versions/status_by.js.erb
+++ b/app/views/versions/status_by.js.erb
@@ -1 +1 @@
-Element.update('status_by', '<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');
+$('#status_by').html('<%= escape_javascript(render_issue_status_by(@version, params[:status_by])) %>');