From 900cff8f8e51c9b585e7afc5327b198526dd185f Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 23 Jan 2015 14:43:40 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=97=AE=E5=8D=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=8F=91=E5=B8=83=E9=97=AE=E5=8D=B7=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=A2=9E=E5=8A=A0=E9=97=AE=E5=8D=B7=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E4=B8=BA=E7=A9=BA=E7=9A=84=E5=88=A4=E6=96=AD?= =?UTF-8?q?=202=E3=80=81=E5=8E=BB=E6=8E=89=E9=94=99=E8=AF=AF=E7=9A=84?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/poll/_poll.html.erb | 2 +- app/views/poll/index.html.erb | 41 ++++++++++++++++++++--------------- config/application.rb | 6 ++--- db/schema.rb | 19 ++++------------ 4 files changed, 32 insertions(+), 36 deletions(-) diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index c53f09361..1bf6b3716 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -34,7 +34,7 @@
  • <%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 + 发布问卷 <% elsif poll.polls_status == 2%> 取消发布 <% end%> diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index a8aca1308..3962768da 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -26,28 +26,35 @@ function clickCanel(){hideModal("#popbox02");} - function poll_submit(poll_id) + function poll_submit(poll_id,poll_name) { - $('#ajax-modal').html("
    " + - "
    " + - "
    " + + if(poll_name == 0) + { + alert("问卷标题不能为空"); + } + else + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + "
    " + - "确  定" + - "取  消" + + "确  定" + + "取  消" + "
    " + "
    " + - "
    " + - "
    " + - "
    "); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','115px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } }
    diff --git a/config/application.rb b/config/application.rb index 2f1534d00..7e47cc64e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,9 +17,9 @@ module RedmineApp # -- all .rb files in that directory are automatically loaded. # verifier if email is real - EmailVerifier.config do |config| - config.verifier_email = "lizanle521@126.com" - end + #EmailVerifier.config do |config| + # config.verifier_email = "lizanle521@126.com" + #end config.generators do |g| g.test_framework :rspec, diff --git a/db/schema.rb b/db/schema.rb index d0d755bd3..20c74ba1e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20150121030451) do +ActiveRecord::Schema.define(:version => 20150123020615) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -23,18 +23,6 @@ ActiveRecord::Schema.define(:version => 20150121030451) do add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type" add_index "activities", ["user_id"], :name => "index_activities_on_user_id" - create_table "api_keys", :force => true do |t| - t.string "access_token" - t.datetime "expires_at" - t.integer "user_id" - t.boolean "active", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - end - - add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token" - add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id" - create_table "applied_projects", :force => true do |t| t.integer "project_id", :null => false t.integer "user_id", :null => false @@ -844,9 +832,10 @@ ActiveRecord::Schema.define(:version => 20150121030451) do t.integer "user_id" t.datetime "published_at" t.datetime "closed_at" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false t.text "polls_description" + t.integer "show_result", :default => 1 end create_table "praise_tread_caches", :force => true do |t|