diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb
index 774923404..0f759011e 100644
--- a/app/controllers/poll_controller.rb
+++ b/app/controllers/poll_controller.rb
@@ -1,9 +1,9 @@
class PollController < ApplicationController
- before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question]
+ before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer]
before_filter :find_container, :only => [:new,:create, :index]
before_filter :is_member_of_course, :only => [:index,:show]
before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy]
-
+ include PollHelper
def index
if @course
@is_teacher = User.current.allowed_to?(:as_teacher,@course)
@@ -19,10 +19,16 @@ class PollController < ApplicationController
def show
@poll = Poll.find params[:id]
- poll_questions = @poll.poll_questions
- @poll_questions = paginateHelper poll_questions,3 #分页
- respond_to do |format|
- format.html {render :layout => 'base_courses'}
+ #已提交问卷的用户不能再访问该界面
+ if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?)
+ render_403
+ else
+ @can_edit_poll = (!has_commit_poll?(@poll.id,User.current.id)) || User.current.admin?
+ poll_questions = @poll.poll_questions
+ @poll_questions = paginateHelper poll_questions,3 #分页
+ respond_to do |format|
+ format.html {render :layout => 'base_courses'}
+ end
end
end
@@ -60,12 +66,14 @@ class PollController < ApplicationController
end
def update
- @poll.polls_name = params[:polls_name]
+ @poll.polls_name = params[:polls_name].empty? ? l(:label_poll_title) : params[:polls_name]
+ @poll.polls_description = params[:polls_description].empty? ? l(:label_poll_description) : params[:polls_description]
if @poll.save
respond_to do |format|
- format.html { redirect_to poll_index_url(:polls_type => @course.class.to_s, :polls_group_id => @course.id) }
+ format.js
end
else
+ render_404
end
end
@@ -79,10 +87,8 @@ class PollController < ApplicationController
def statistics_result
@poll = Poll.find(params[:id])
- @offset, @limit = api_offset_and_limit({:limit => 10})
- @poll_questions = @poll.poll_questions
- @poll_questions_count = @poll_questions.count
- @poll_questions_pages = Paginator.new @poll_questions_count, @limit, params['page']
+ poll_questions = @poll.poll_questions
+ @poll_questions = paginateHelper poll_questions,3 #分页
respond_to do |format|
format.html{render :layout => 'base_courses'}
end
@@ -96,11 +102,12 @@ class PollController < ApplicationController
@every_answer_count = poll_answer.poll_votes.count
end
+
#添加单选题
def create_poll_question
question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title]
option = {
- :is_necessary => params[:is_necessary] || true,
+ :is_necessary => (params[:is_necessary]=="true" ? 1 : 0),
:question_title => question_title,
:question_type => params[:question_type] || 1,
:question_number => @poll.poll_questions.count + 1
@@ -111,7 +118,7 @@ class PollController < ApplicationController
answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
question_option = {
:answer_position => i,
- :answer_text => params[:question_answer].values[i-1]
+ :answer_text => answer
}
@poll_questions.poll_answers.new question_option
end
@@ -123,7 +130,136 @@ class PollController < ApplicationController
end
end
- private
+ #修改单选题
+ def update_poll_question
+ @poll_question = PollQuestion.find params[:poll_question]
+ @poll = @poll_question.poll
+
+ @poll_question.is_necessary = params[:is_necessary]=="true" ? 1 : 0
+ @poll_question.question_title = params[:poll_questions_title].nil? || params[:poll_questions_title].empty? ? l(:label_enter_single_title) : params[:poll_questions_title]
+ ################处理选项
+ if params[:question_answer]
+ @poll_question.poll_answers.each do |answer|
+ answer.destroy unless params[:question_answer].keys.include? answer.id.to_s
+ end
+ for i in 1..params[:question_answer].count
+ question = @poll_question.poll_answers.find_by_id params[:question_answer].keys[i-1]
+ answer = (params[:question_answer].values[i-1].nil? || params[:question_answer].values[i-1].empty?) ? l(:label_new_answer) : params[:question_answer].values[i-1]
+ if question
+ question.answer_position = i
+ question.answer_text = answer
+ question.save
+ else
+ question_option = {
+ :answer_position => i,
+ :answer_text => answer
+ }
+ @poll_question.poll_answers.new question_option
+ end
+ end
+ end
+ @poll_question.save
+ respond_to do |format|
+ format.js
+ end
+ end
+
+ #删除单选题
+ def delete_poll_question
+ @poll_question = PollQuestion.find params[:poll_question]
+ @poll = @poll_question.poll
+ poll_questions = @poll.poll_questions.where("question_number > #{@poll_question.question_number}")
+ poll_questions.each do |question|
+ question.question_number -= 1
+ question.save
+ end
+ if @poll_question && @poll_question.destroy
+ respond_to do |format|
+ format.js
+ end
+ end
+ end
+
+ #提交答案
+ def commit_answer
+ pq = PollQuestion.find(params[:poll_question_id])
+ if has_commit_poll?(@poll.id,User.current.id) && (!User.current.admin?)
+ render :text => 'failure'
+ return
+ end
+ if pq.question_type == 1
+ #单选题
+ pv = PollVote.find_by_poll_question_id_and_user_id(params[:poll_question_id],User.current.id)
+ if pv.nil?
+ pv = PollVote.new
+ pv.user_id = User.current.id
+ pv.poll_question_id = params[:poll_question_id]
+ end
+ pv.poll_answer_id = params[:poll_answer_id]
+ if pv.save
+ render :text => "ok"
+ else
+ render :text => "failure"
+ end
+ elsif pq.question_type == 2
+ pv = PollVote.find_by_poll_answer_id_and_user_id(params[:poll_answer_id],User.current.id)
+ if pv.nil?
+ pv = PollVote.new
+ pv.user_id = User.current.id
+ pv.poll_question_id = params[:poll_question_id]
+ pv.poll_answer_id = params[:poll_answer_id]
+ if pv.save
+ render :text => "true"
+ else
+ render :text => "failure"
+ end
+ else
+ if pv.delete
+ render :text => "false"
+ else
+ render :text => "failure"
+ end
+ end
+ elsif pq.question_type == 3 || pq.question_type == 4
+ pv = PollVote.find_by_poll_question_id_and_user_id(params[:poll_question_id],User.current.id)
+ if pv.nil?
+ pv = PollVote.new
+ pv.user_id = User.current.id
+ pv.poll_question_id = params[:poll_question_id]
+ end
+ pv.vote_text = params[:vote_text]
+ if pv.save
+ render :text => pv.vote_text
+ else
+ render :text => "failure"
+ end
+ else
+ render :text => "failure"
+ end
+ end
+
+ #提交问卷
+ def commit_poll
+ @uncomplete_question = get_uncomplete_question(@poll)
+ if @uncomplete_question.count < 1
+ pu = get_poll_user(@poll.id,User.current.id)
+ pu.user_id = User.current.id
+ pu.poll_id = @poll.id
+ if pu.save
+ #redirect_to poll_index_path(:polls_group_id => @course.id,:polls_type => 'Course')
+ @status = 0 #提交成功
+ else
+ @status = 2 #未知错误
+ end
+ else
+ @status = 1 #有未做得必答题
+ end
+ respond_to do |format|
+ format.js
+ end
+ end
+
+ private
def find_poll_and_course
@poll = Poll.find params[:id]
@course = Course.find @poll.polls_group_id
@@ -151,5 +287,25 @@ class PollController < ApplicationController
def is_course_teacher
render_403 unless(@course && User.current.allowed_to?(:as_teacher,@course))
end
-
+
+ #获取未完成的题目
+ def get_uncomplete_question poll
+ necessary_questions = poll.poll_questions.where("#{PollQuestion.table_name}.is_necessary = 1")
+ uncomplete_question = []
+ necessary_questions.each do |question|
+ if question.poll_votes.nil? || question.poll_votes.count < 1
+ uncomplete_question << question
+ end
+ end
+ uncomplete_question
+ end
+
+ #PollUser记录用户是否已提交问卷有对应的记录则已提交,没有则新建一个
+ def get_poll_user poll_id,user_id
+ pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id)
+ if pu.nil?
+ pu = PollUser.new
+ end
+ pu
+ end
end
\ No newline at end of file
diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb
new file mode 100644
index 000000000..7816d8e37
--- /dev/null
+++ b/app/helpers/poll_helper.rb
@@ -0,0 +1,50 @@
+# encoding: utf-8
+#
+# Redmine - project management software
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+module PollHelper
+ #判断选项是否被选中
+ def answer_be_selected?(answer,user)
+ pv = answer.poll_votes.where("#{PollVote.table_name}.user_id = #{user.id} ")
+ if !pv.nil? && pv.count > 0
+ true
+ else
+ false
+ end
+ end
+
+ #获取文本题答案
+ def get_anwser_vote_text(question_id,user_id)
+ pv = PollVote.find_by_poll_question_id_and_user_id(question_id,user_id)
+ if pv.nil?
+ ''
+ else
+ pv.vote_text
+ end
+ end
+
+ #判断用户是否已经提交了问卷
+ def has_commit_poll?(poll_id,user_id)
+ pu = PollUser.find_by_poll_id_and_user_id(poll_id,user_id)
+ if pu.nil?
+ false
+ else
+ true
+ end
+ end
+end
\ No newline at end of file
diff --git a/app/views/poll/_commit_alert.html.erb b/app/views/poll/_commit_alert.html.erb
new file mode 100644
index 000000000..76bbda416
--- /dev/null
+++ b/app/views/poll/_commit_alert.html.erb
@@ -0,0 +1,12 @@
+
+ <% if status == 0 %>
+
提交成功!
+ <%= link_to "确定", poll_index_path(:polls_group_id => @course.id,:polls_type => 'Course'),:class => 'commit'%>
+ <% elsif status == 1 %>
+ 您还有尚未作答的题目请完成后在提交!
+ <%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
+ <% else %>
+ 发生未知错误,请检查您的网络。
+ <%= link_to "确定", "javascript:void(0)",:onclick => 'hidden_atert_form();',:class => 'commit'%>
+ <% end %>
+
diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb
index 0f031f61c..12dc9f92b 100644
--- a/app/views/poll/_edit_MC.html.erb
+++ b/app/views/poll/_edit_MC.html.erb
@@ -1,45 +1,31 @@
-<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
-
-
-
-
- 问题:
-
-
-
- 必答
-
-
-
-
+<%= form_for("",:url => update_poll_question_poll_index_path(:poll_question => poll_question.id),:remote => true) do |f|%>
+
+
+
<% end%>
\ No newline at end of file
diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb
index 759fe58a1..ea36cbedf 100644
--- a/app/views/poll/_edit_head.html.erb
+++ b/app/views/poll/_edit_head.html.erb
@@ -1,21 +1,15 @@
-
-
\ No newline at end of file
+<%= form_for @poll,:remote => true do |f|%>
+
+<% end%>
diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb
new file mode 100644
index 000000000..013bf0ed0
--- /dev/null
+++ b/app/views/poll/_new_MC.html.erb
@@ -0,0 +1,45 @@
+<%= form_for PollQuestion.new,:url =>create_poll_question_poll_path(@poll.id),:remote => true do |f|%>
+
+
+
+
+ 问题:
+
+
+
+ 必答
+
+
+
+
+
+
+
+<% end%>
\ No newline at end of file
diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb
new file mode 100644
index 000000000..6739c233e
--- /dev/null
+++ b/app/views/poll/_new_MCQ.html.erb
@@ -0,0 +1,33 @@
+
+
+
+ 问题:
+
+
+ 必答
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/poll/_new_mulit.html.erb b/app/views/poll/_new_mulit.html.erb
new file mode 100644
index 000000000..6c3528473
--- /dev/null
+++ b/app/views/poll/_new_mulit.html.erb
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/app/views/poll/_new_single.html.erb b/app/views/poll/_new_single.html.erb
new file mode 100644
index 000000000..b7d5a9725
--- /dev/null
+++ b/app/views/poll/_new_single.html.erb
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/app/views/poll/_poll_content.html.erb b/app/views/poll/_poll_content.html.erb
new file mode 100644
index 000000000..6c2e61215
--- /dev/null
+++ b/app/views/poll/_poll_content.html.erb
@@ -0,0 +1,10 @@
+<% poll.poll_questions.each do |poll_question|%>
+
+
+ <%= render :partial => 'show_MC', :locals => {:poll_question => poll_question} %>
+
+
+ <%= render :partial => 'edit_MC', :locals => {:poll_question => poll_question} %>
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb
index 473c1df83..598ef1207 100644
--- a/app/views/poll/_poll_form.html.erb
+++ b/app/views/poll/_poll_form.html.erb
@@ -4,16 +4,42 @@
问卷调查_问卷编辑
<%= stylesheet_link_tag 'polls', :media => 'all' %>
+ <%#= javascript_include_tag "polls" %>
@@ -33,20 +54,38 @@
<% elsif pq.question_type == 2 %>
@@ -61,20 +100,45 @@
<% elsif pq.question_type == 3 %>
@@ -89,9 +153,27 @@
-
+
+ >
-
+
<% elsif pq.question_type == 4 %>
@@ -105,7 +187,23 @@
@@ -119,7 +217,7 @@
答题已完成 0%
diff --git a/app/views/poll/statistics_result.html.erb b/app/views/poll/statistics_result.html.erb
index 1bdbb0ff1..d6181fb1a 100644
--- a/app/views/poll/statistics_result.html.erb
+++ b/app/views/poll/statistics_result.html.erb
@@ -22,10 +22,11 @@
<%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %>
-
<% end %>
+
+ <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
+
+
diff --git a/app/views/poll/update.js.erb b/app/views/poll/update.js.erb
new file mode 100644
index 000000000..15d0fabd5
--- /dev/null
+++ b/app/views/poll/update.js.erb
@@ -0,0 +1,6 @@
+$("#polls_title").val("<%= @poll.polls_name%>");
+$("#polls_description").val("<%= @poll.polls_description %>");
+$("#polls_name_h").html("<%= @poll.polls_name %>");
+$("#polls_description_p").html("<%= @poll.polls_description %>");
+$("#polls_head_edit").hide();
+$("#polls_head_show").show();
\ No newline at end of file
diff --git a/app/views/poll/update_poll_question.js.erb b/app/views/poll/update_poll_question.js.erb
new file mode 100644
index 000000000..39d0fcfd6
--- /dev/null
+++ b/app/views/poll/update_poll_question.js.erb
@@ -0,0 +1,6 @@
+$("#poll_questions_<%= @poll_question.id%>").html("
" +
+ "<%= escape_javascript(render :partial => 'show_MC', :locals => {:poll_question => @poll_question}) %>" +
+ "
" +
+ "
" +
+ "<%= escape_javascript(render :partial => 'edit_MC', :locals => {:poll_question => @poll_question}) %>" +
+ "
");
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 9dae54818..95ab07d5d 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2251,5 +2251,7 @@ zh:
label_mulit: 多行文字
label_enter_single_title: 请输入单选题标题
label_new_answer: 新建选项
+ label_poll_title: 问卷标题
+ label_poll_description: 问卷描述
diff --git a/config/routes.rb b/config/routes.rb
index d2d0c73a8..dc8205e2d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -61,7 +61,13 @@ RedmineApp::Application.routes.draw do
resources :poll do
member do
get 'statistics_result'
+ post 'commit_answer'
post 'create_poll_question'
+ post 'commit_poll'
+ end
+ collection do
+ delete 'delete_poll_question'
+ post 'update_poll_question'
end
end
diff --git a/public/javascripts/polls.js b/public/javascripts/polls.js
new file mode 100644
index 000000000..c10bf6d1f
--- /dev/null
+++ b/public/javascripts/polls.js
@@ -0,0 +1,65 @@
+function add_MC(){
+ var now = new Date().getTime();
+ $("#poll_content").append("
");
+}
+function add_MCQ(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_MCQ') %>");}
+function add_single(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_single') %>");}
+function add_mulit(){$("#poll_content").append("<%= escape_javascript(render :partial => 'new_mulit') %>");}
+//问卷头
+function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();}
+function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();}
+//单选题
+function add_single_answer(doc)
+{
+ doc.parent().after("
选项 : " +
+ " "+
+ "
");
+}
+function remove_single_answer(doc)
+{
+ if(doc.parent().siblings("li").length == 0){doc.parent().parent().parent().parent().parent().parent().remove();}else{doc.parent().remove();}
+}
\ No newline at end of file
diff --git a/public/plugin_assets/redmine_code_review/stylesheets/window_js/mac_os_x_dialog.css b/public/plugin_assets/redmine_code_review/stylesheets/window_js/mac_os_x_dialog.css
index 4c89f602d..e663e3c5e 100644
--- a/public/plugin_assets/redmine_code_review/stylesheets/window_js/mac_os_x_dialog.css
+++ b/public/plugin_assets/redmine_code_review/stylesheets/window_js/mac_os_x_dialog.css
@@ -1,160 +1,160 @@
-.overlay_mac_os_x_dialog {
- background-color: #FF7224;
- filter:alpha(opacity=60);
- -moz-opacity: 0.6;
- opacity: 0.6;
-}
-
-.mac_os_x_dialog_nw {
- background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
- width:16px;
- height:16px;
-}
-
-.mac_os_x_dialog_n {
- background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
- height:18px;
-}
-
-.mac_os_x_dialog_ne {
- background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
- width:16px;
- height:16px;
-}
-
-.mac_os_x_dialog_w {
- background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
- width:16px;
-}
-
-.mac_os_x_dialog_e {
- background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
- width:16px;
-}
-
-.mac_os_x_dialog_sw {
- background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
- width:31px;
- height:40px;
-}
-
-.mac_os_x_dialog_s {
- background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
- height:40px;
-}
-
-.mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
- background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
- width:31px;
- height:40px;
-}
-
-.mac_os_x_dialog_sizer {
- cursor:se-resize;
-}
-
-.mac_os_x_dialog_close {
- width: 19px;
- height: 19px;
- background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
- position:absolute;
- top:12px;
- left:25px;
- cursor:pointer;
- z-index:1000;
-}
-
-.mac_os_x_dialog_minimize {
- width: 19px;
- height: 19px;
- background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
- position:absolute;
- top:12px;
- left:45px;
- cursor:pointer;
- z-index:1000;
-}
-
-.mac_os_x_dialog_maximize {
- width: 19px;
- height: 19px;
- background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
- position:absolute;
- top:12px;
- left:65px;
- cursor:pointer;
- z-index:1000;
-}
-
-.mac_os_x_dialog_title {
- float:left;
- height:14px;
- font-family: Tahoma, Arial, sans-serif;
- font-size:12px;
- text-align:center;
- margin-top:6px;
- width:100%;
- color:#000;
-}
-
-.mac_os_x_dialog_content {
- overflow:auto;
- color: #222;
- font-family: Tahoma, Arial, sans-serif;
- font-size: 10px;
- background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
-}
-
-.mac_os_x_dialog_buttons {
- text-align: center;
-}
-/* FOR IE */
-* html .mac_os_x_dialog_nw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
-}
-
-
-* html .mac_os_x_dialog_ne {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
-}
-
-* html .mac_os_x_dialog_w {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
-}
-
-* html .mac_os_x_dialog_e {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
-}
-
-* html .mac_os_x_dialog_sw {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
-}
-
-* html .mac_os_x_dialog_s {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
-}
-
-* html .mac_os_x_dialog_se {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
-}
-
-* html .mac_os_x_dialog_sizer {
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
-}
-
+.overlay_mac_os_x_dialog {
+ background-color: #FF7224;
+ filter:alpha(opacity=60);
+ -moz-opacity: 0.6;
+ opacity: 0.6;
+}
+
+.mac_os_x_dialog_nw {
+ background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
+ width:16px;
+ height:16px;
+}
+
+.mac_os_x_dialog_n {
+ background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
+ height:18px;
+}
+
+.mac_os_x_dialog_ne {
+ background: transparent url(mac_os_x_dialog/R.png) repeat-y top left;
+ width:16px;
+ height:16px;
+}
+
+.mac_os_x_dialog_w {
+ background: transparent url(mac_os_x_dialog/L.png) repeat-y top left;
+ width:16px;
+}
+
+.mac_os_x_dialog_e {
+ background: transparent url(mac_os_x_dialog/R.png) repeat-y top right;
+ width:16px;
+}
+
+.mac_os_x_dialog_sw {
+ background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0;
+ width:31px;
+ height:40px;
+}
+
+.mac_os_x_dialog_s {
+ background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0;
+ height:40px;
+}
+
+.mac_os_x_dialog_se, .mac_os_x_dialog_sizer {
+ background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0;
+ width:31px;
+ height:40px;
+}
+
+.mac_os_x_dialog_sizer {
+ cursor:se-resize;
+}
+
+.mac_os_x_dialog_close {
+ width: 19px;
+ height: 19px;
+ background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0;
+ position:absolute;
+ top:12px;
+ left:25px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.mac_os_x_dialog_minimize {
+ width: 19px;
+ height: 19px;
+ background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0;
+ position:absolute;
+ top:12px;
+ left:45px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.mac_os_x_dialog_maximize {
+ width: 19px;
+ height: 19px;
+ background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0;
+ position:absolute;
+ top:12px;
+ left:65px;
+ cursor:pointer;
+ z-index:1000;
+}
+
+.mac_os_x_dialog_title {
+ float:left;
+ height:14px;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size:12px;
+ text-align:center;
+ margin-top:6px;
+ width:100%;
+ color:#000;
+}
+
+.mac_os_x_dialog_content {
+ overflow:auto;
+ color: #222;
+ font-family: Tahoma, Arial, sans-serif;
+ font-size: 10px;
+ background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0;
+}
+
+.mac_os_x_dialog_buttons {
+ text-align: center;
+}
+/* FOR IE */
+* html .mac_os_x_dialog_nw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
+}
+
+
+* html .mac_os_x_dialog_ne {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
+}
+
+* html .mac_os_x_dialog_w {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale");
+}
+
+* html .mac_os_x_dialog_e {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale");
+}
+
+* html .mac_os_x_dialog_sw {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop");
+}
+
+* html .mac_os_x_dialog_s {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale");
+}
+
+* html .mac_os_x_dialog_se {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
+}
+
+* html .mac_os_x_dialog_sizer {
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop");
+}
+
diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css
index b13cb1da2..e89e50be4 100644
--- a/public/stylesheets/polls.css
+++ b/public/stylesheets/polls.css
@@ -27,6 +27,7 @@ a.newbtn{ float:right; display:block; width:80px; height:30px; background:#64bdd
a:hover.newbtn{ background:#55a1b9; text-decoration:none;}
.polls_list ul{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:32px; padding-top:8px;}
a.polls_title{ font-weight:bold; color:#3e6d8e;}
+.polls_title{ font-weight:bold; color:#3e6d8e;}
a.pollsbtn{ display:block; width:66px; height:22px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;}
a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;}
.polls_date{ color:#666666;}