1、问卷列表界面发布问卷按钮增加问卷标题不能为空的判断

2、去掉错误的插件引用
This commit is contained in:
sw 2015-01-23 14:43:40 +08:00
parent dbdae2ac7e
commit 900cff8f8e
4 changed files with 32 additions and 36 deletions

View File

@ -34,7 +34,7 @@
<li> <li>
<%if @is_teacher %> <%if @is_teacher %>
<% if poll.polls_status == 1 %> <% if poll.polls_status == 1 %>
<a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>);">发布问卷</a> <a href="#" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>);">发布问卷</a>
<% elsif poll.polls_status == 2%> <% elsif poll.polls_status == 2%>
<a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">取消发布</a> <a href="#" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">取消发布</a>
<% end%> <% end%>

View File

@ -26,7 +26,13 @@
function clickCanel(){hideModal("#popbox02");} function clickCanel(){hideModal("#popbox02");}
function poll_submit(poll_id) function poll_submit(poll_id,poll_name)
{
if(poll_name == 0)
{
alert("问卷标题不能为空");
}
else
{ {
$('#ajax-modal').html("<div id='popbox02'>" + $('#ajax-modal').html("<div id='popbox02'>" +
"<div class='upload_con'>" + "<div class='upload_con'>" +
@ -49,6 +55,7 @@
$('#ajax-modal').parent().css("top","").css("left",""); $('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').parent().addClass("popbox_polls");
} }
}
</script> </script>
<div class="polls_content" id="polls" style="width:677px;"> <div class="polls_content" id="polls" style="width:677px;">
<div class="polls_head"> <div class="polls_head">

View File

@ -17,9 +17,9 @@ module RedmineApp
# -- all .rb files in that directory are automatically loaded. # -- all .rb files in that directory are automatically loaded.
# verifier if email is real # verifier if email is real
EmailVerifier.config do |config| #EmailVerifier.config do |config|
config.verifier_email = "lizanle521@126.com" # config.verifier_email = "lizanle521@126.com"
end #end
config.generators do |g| config.generators do |g|
g.test_framework :rspec, g.test_framework :rspec,

View File

@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # 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| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false 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", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id" 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| create_table "applied_projects", :force => true do |t|
t.integer "project_id", :null => false t.integer "project_id", :null => false
t.integer "user_id", :null => false t.integer "user_id", :null => false
@ -847,6 +835,7 @@ ActiveRecord::Schema.define(:version => 20150121030451) do
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.text "polls_description" t.text "polls_description"
t.integer "show_result", :default => 1
end end
create_table "praise_tread_caches", :force => true do |t| create_table "praise_tread_caches", :force => true do |t|