From 273e82f6207a372caa2a7fb8537e49ad8bbfebca Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 24 Mar 2015 16:26:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9poll=E7=9A=84show=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/show.html.erb | 139 ++++++++++++++--------------------- public/javascripts/course.js | 10 +++ public/stylesheets/polls.css | 4 + 3 files changed, 69 insertions(+), 84 deletions(-) diff --git a/app/views/poll/show.html.erb b/app/views/poll/show.html.erb index ad10a5468..ffbc8c11a 100644 --- a/app/views/poll/show.html.erb +++ b/app/views/poll/show.html.erb @@ -1,97 +1,69 @@ - - - - - <%= l(:label_poll_title) %> - <%= stylesheet_link_tag 'polls', :media => 'all' %> - - - - - +<%= stylesheet_link_tag 'polls', :media => 'all' %>

<%= @poll.polls_name%>

- <%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%> +

+ <%= @poll.polls_description.nil? ? "" : @poll.polls_description.html_safe%> +

-
    <% @poll_questions.each do |pq| %> - <% if pq.question_type == 1 %> - + <% if pq.question_type == 1 %> +
  1. <%= l(:label_question_number,:question_number => pq.question_number) %> <%= pq.question_title %> [单选题] <% if pq.is_necessary == 1 %> - * + * <% end %>
    - - +
    + <% pq.poll_answers.each do |pa| %> - - - + + + <% end %> - -
    - -
    + +
    + +
  2. - <% elsif pq.question_type == 2 %> - + <% elsif pq.question_type == 2 %> +
  3. <%= l(:label_question_number,:question_number => pq.question_number) %> @@ -106,7 +78,7 @@
    - <% pq.poll_answers.each do |pa| %> + <% pq.poll_answers.each do |pa| %> - <% end %> + <% end %>
  4. <% elsif pq.question_type == 3 %> - +
  5. <%= l(:label_question_number,:question_number => pq.question_number) %> @@ -185,7 +157,7 @@
  6. <% elsif pq.question_type == 4 %> - +
  7. @@ -212,8 +184,8 @@ var dataObj = eval(data); if(dataObj.text != 'failure') { - var span = $('#percent'); - span.html(dataObj.percent); + var span = $('#percent'); + span.html(dataObj.percent); } else { @@ -229,8 +201,8 @@
  8. <% else %> - - <% end %> + + <% end %> <% end %>
- - -
- - diff --git a/public/javascripts/course.js b/public/javascripts/course.js index 4a9854fcd..2bd85093f 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -69,6 +69,8 @@ function regex_bid_name() return true; } } + +//验证匿评数量 function regex_evaluation_num() { var evaluation_num = $.trim($("#bid_evaluation_num").val()); @@ -105,6 +107,7 @@ function regex_evaluation_num() } } +//点击是否开启匿评单选框效果 $(function(){ $("#bid_open_anonymous_evaluation").click(function(){ if($("#bid_open_anonymous_evaluation").attr("checked") == "checked") @@ -118,10 +121,17 @@ $(function(){ }); }); +//老师提交新建作业 function submit_new_bid(id) { if(regex_bid_name()&®ex_evaluation_num()) { $("#"+id).submit(); } +} + +//隐藏提示狂 +function hidden_atert_form(cur_page,cur_type) +{ + hideModal($("#popbox")); } \ No newline at end of file diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 21b929bff..e07c10438 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -142,5 +142,9 @@ a:hover.btn_pu{ background:#3cb761;} .ur_button_submit{ float:left;} .polls_cha{float:left; margin-left:15px; margin-top:10px;} +/*问卷提交时弹出框*/ +.alert_box{width:480px;height:180px;position:fixed;z-index:100;left:55%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;} +.commit{height: 28px;display: block;width: 80px;color: #fff !important;background: #15bccf;text-align: center;padding-top: 4px;margin-left: 130px;margin-top: 4px;margin-right: 10px;} +