From 44f22feefd93b3e85745724bdb9cf950b74cd179 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Mon, 10 Aug 2015 09:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BD=9C=E8=80=85=E6=98=AF?= =?UTF-8?q?=E6=88=91=EF=BC=8C=E4=BD=86=E6=98=AF=E9=97=AE=E5=8D=B7=E5=9C=A8?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E8=AF=BE=E7=A8=8B=E9=87=8C=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_other_poll.html.erb | 27 +++++++++++++++++++++++++ app/views/poll/_polls_list.html.erb | 10 +++++++++ app/views/poll/import_other_poll.js.erb | 1 + app/views/poll/other_poll.js.erb | 9 +++++++++ 4 files changed, 47 insertions(+) create mode 100644 app/views/poll/_other_poll.html.erb create mode 100644 app/views/poll/_polls_list.html.erb create mode 100644 app/views/poll/import_other_poll.js.erb create mode 100644 app/views/poll/other_poll.js.erb diff --git a/app/views/poll/_other_poll.html.erb b/app/views/poll/_other_poll.html.erb new file mode 100644 index 000000000..c899f0d47 --- /dev/null +++ b/app/views/poll/_other_poll.html.erb @@ -0,0 +1,27 @@ +
+
+

将以下问卷导入本课程

+
+
+ <%= form_tag import_other_poll_poll_index_path, + method: :post, + remote: true, + id: "relation_file_form" do %> + + <%= content_tag('div', poll_check_box_tags('polls[]', polls,polls_group_id), :id => 'courses')%> + 导  入 + 取  消 + <% end -%> +
+ + +
+
+ + \ No newline at end of file diff --git a/app/views/poll/_polls_list.html.erb b/app/views/poll/_polls_list.html.erb new file mode 100644 index 000000000..c096f396d --- /dev/null +++ b/app/views/poll/_polls_list.html.erb @@ -0,0 +1,10 @@ +<% polls.each do |poll|%> + +
+<% end%> + + \ No newline at end of file diff --git a/app/views/poll/import_other_poll.js.erb b/app/views/poll/import_other_poll.js.erb new file mode 100644 index 000000000..f60cea1c5 --- /dev/null +++ b/app/views/poll/import_other_poll.js.erb @@ -0,0 +1 @@ +$('#polls_list').html('<%= escape_javascript(render :partial => 'polls_list', :locals => {:polls => @polls,:obj_pages=>@obj_pages,:obj_count=>@obj_count}) %>
'); \ No newline at end of file diff --git a/app/views/poll/other_poll.js.erb b/app/views/poll/other_poll.js.erb new file mode 100644 index 000000000..34f53b73e --- /dev/null +++ b/app/views/poll/other_poll.js.erb @@ -0,0 +1,9 @@ + +$('#ajax-modal').html('<%= escape_javascript(render :partial => 'other_poll',:locals => {:polls => @polls,:polls_group_id=>@polls_group_id}) %>'); + + +showModal('ajax-modal', '513px'); +$('#ajax-modal').siblings().remove(); +$('#ajax-modal').before(""); +$('#ajax-modal').parent().css("top","").css("left",""); +$('#ajax-modal').parent().addClass("popbox_polls"); \ No newline at end of file