parent
dbdae2ac7e
commit
900cff8f8e
|
@ -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%>
|
||||||
|
|
|
@ -26,28 +26,35 @@
|
||||||
|
|
||||||
function clickCanel(){hideModal("#popbox02");}
|
function clickCanel(){hideModal("#popbox02");}
|
||||||
|
|
||||||
function poll_submit(poll_id)
|
function poll_submit(poll_id,poll_name)
|
||||||
{
|
{
|
||||||
$('#ajax-modal').html("<div id='popbox02'>" +
|
if(poll_name == 0)
|
||||||
"<div class='upload_con'>" +
|
{
|
||||||
"<div class='upload_box'>" +
|
alert("问卷标题不能为空");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
||||||
|
"<div class='upload_con'>" +
|
||||||
|
"<div class='upload_box'>" +
|
||||||
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
||||||
"<div class='polls_btn_box'>" +
|
"<div class='polls_btn_box'>" +
|
||||||
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
||||||
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div class='cl'></div>" +
|
"<div class='cl'></div>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"</div>");
|
"</div>");
|
||||||
showModal('ajax-modal', '310px');
|
showModal('ajax-modal', '310px');
|
||||||
$('#ajax-modal').css('height','115px');
|
$('#ajax-modal').css('height','115px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
"<a href='#' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
||||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
||||||
$('#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;">
|
||||||
|
|
|
@ -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,
|
||||||
|
|
19
db/schema.rb
19
db/schema.rb
|
@ -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
|
||||||
|
@ -844,9 +832,10 @@ ActiveRecord::Schema.define(:version => 20150121030451) do
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "published_at"
|
t.datetime "published_at"
|
||||||
t.datetime "closed_at"
|
t.datetime "closed_at"
|
||||||
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|
|
||||||
|
|
Loading…
Reference in New Issue