This commit is contained in:
whimlex 2015-01-23 15:09:03 +08:00
commit 14685f2656
15 changed files with 232 additions and 69 deletions

View File

@ -70,8 +70,8 @@ class PollController < ApplicationController
end end
def update def update
@poll.polls_name = params[:polls_name].empty? ? l(:label_poll_title) : params[:polls_name] @poll.polls_name = params[:polls_name]
@poll.polls_description = params[:polls_description].empty? ? l(:label_poll_description) : params[:polls_description] @poll.polls_description = params[:polls_description]
if @poll.save if @poll.save
respond_to do |format| respond_to do |format|
format.js format.js

View File

@ -36,7 +36,7 @@ class Mailer < ActionMailer::Base
@author = forum.creator @author = forum.creator
recipients = forum.creator.mail recipients = forum.creator.mail
# cc = wiki_content.page.wiki.watcher_recipients - recipients # cc = wiki_content.page.wiki.watcher_recipients - recipients
@issue_author_url = url_for(user_activities_url(@author))
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id) @forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id)
mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]" mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]"
@ -47,6 +47,8 @@ class Mailer < ActionMailer::Base
redmine_headers 'Memo' => memo.id redmine_headers 'Memo' => memo.id
@forum = memo.forum @forum = memo.forum
@author = memo.author @author = memo.author
@forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id)
@issue_author_url = url_for(user_activities_url(@author))
recipients ||= [] recipients ||= []
mems = memo.self_and_siblings mems = memo.self_and_siblings
mems.each do |mem| mems.each do |mem|
@ -69,7 +71,7 @@ class Mailer < ActionMailer::Base
@mail = journals_for_message.at_user if journals_for_message.at_user @mail = journals_for_message.at_user if journals_for_message.at_user
@message = journals_for_message.notes @message = journals_for_message.notes
@title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}" @title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}"
@issue_author_url = url_for(user_activities_url(@user))
@url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型 @url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型
when :Bid when :Bid
course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}") course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}")
@ -289,6 +291,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Project' => document.project.identifier redmine_headers 'Project' => document.project.identifier
@author = User.current @author = User.current
@document = document @document = document
@issue_author_url = url_for(user_activities_url(@author))
@document_url = url_for(:controller => 'documents', :action => 'show', :id => document) @document_url = url_for(:controller => 'documents', :action => 'show', :id => document)
mail :to => document.recipients, mail :to => document.recipients,
:subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" :subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
@ -304,6 +307,7 @@ class Mailer < ActionMailer::Base
added_to = '' added_to = ''
added_to_url = '' added_to_url = ''
@author = attachments.first.author @author = attachments.first.author
@issue_author_url = url_for(user_activities_url(@author))
case container.class.name case container.class.name
when 'Project' when 'Project'
added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container)
@ -356,6 +360,7 @@ class Mailer < ActionMailer::Base
if news.project if news.project
redmine_headers 'Project' => news.project.identifier redmine_headers 'Project' => news.project.identifier
@author = news.author @author = news.author
@issue_author_url = url_for(user_activities_url(@author))
message_id news message_id news
@news = news @news = news
@news_url = url_for(:controller => 'news', :action => 'show', :id => news) @news_url = url_for(:controller => 'news', :action => 'show', :id => news)
@ -364,6 +369,7 @@ class Mailer < ActionMailer::Base
elsif news.course elsif news.course
redmine_headers 'Course' => news.course.id redmine_headers 'Course' => news.course.id
@author = news.author @author = news.author
@issue_author_url = url_for(user_activities_url(@author))
message_id news message_id news
@news = news @news = news
recipients = news.course.notified_users.select { |user| user.allowed_to?(:view_files, news.course) }.collect { |u| u.mail } recipients = news.course.notified_users.select { |user| user.allowed_to?(:view_files, news.course) }.collect { |u| u.mail }
@ -383,6 +389,7 @@ class Mailer < ActionMailer::Base
if news.project if news.project
redmine_headers 'Project' => news.project.identifier redmine_headers 'Project' => news.project.identifier
@author = comment.author @author = comment.author
@issue_author_url = url_for(user_activities_url(@author))
message_id comment message_id comment
@news = news @news = news
@comment = comment @comment = comment
@ -393,6 +400,7 @@ class Mailer < ActionMailer::Base
elsif news.course elsif news.course
redmine_headers 'Course' => news.course.id redmine_headers 'Course' => news.course.id
@author = comment.author @author = comment.author
@issue_author_url = url_for(user_activities_url(@author))
message_id comment message_id comment
@news = news @news = news
@comment = comment @comment = comment
@ -414,6 +422,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Project' => message.project.identifier, redmine_headers 'Project' => message.project.identifier,
'Topic-Id' => (message.parent_id || message.id) 'Topic-Id' => (message.parent_id || message.id)
@author = message.author @author = message.author
@issue_author_url = url_for(user_activities_url(@author))
message_id message message_id message
references message.parent unless message.parent.nil? references message.parent unless message.parent.nil?
recipients = message.recipients recipients = message.recipients
@ -427,6 +436,7 @@ class Mailer < ActionMailer::Base
redmine_headers 'Course' => message.course.id, redmine_headers 'Course' => message.course.id,
'Topic-Id' => (message.parent_id || message.id) 'Topic-Id' => (message.parent_id || message.id)
@author = message.author @author = message.author
@issue_author_url = url_for(user_activities_url(@author))
message_id message message_id message
references message.parent unless message.parent.nil? references message.parent unless message.parent.nil?
recipients = message.course.notified_users.select { |user| user.allowed_to?(:view_files, message.course) }.collect { |u| u.mail } recipients = message.course.notified_users.select { |user| user.allowed_to?(:view_files, message.course) }.collect { |u| u.mail }

View File

@ -1,4 +1,29 @@
<h1><%= link_to(h(@forum.name), @forum_url) %></h1>
<em><%=h @forum.creator.name %></em>
<%= @forum.description.html_safe %> <p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@forum.creator.login}(#{@forum.creator.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:label_forum_new)%>
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @forum.description.html_safe %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @forum_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,4 +1,32 @@
<h1><%= link_to(h(@memo.subject), @memo_url) %></h1>
<em><%=h @memo.author.name %></em>
<%= @memo.content.html_safe %> <p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@memo.subject), @memo_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @memo.content.html_safe %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @memo_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,5 +1,25 @@
<em>尊敬的用户,<%= @user %>给你留言了:</em>
<div><%= @message %></div> <p>
<p>点击链接查看最新回复<%= link_to(@url, @url) %> <span class="c_blue" style="color:#1b55a7;">
&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%></p>
<%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span>给你留言了
</p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @message %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,7 +1,8 @@
<p> <p>
<span class="c_blue" style="color:#1b55a7;"> <span class="c_blue" style="color:#1b55a7;">
<%= h @message.author %>(<%= @message.author.show_name %>) <%= link_to(h("#{@message.author.login}(#{@message.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%> </span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;"> <span class="c_blue" style="color:#1b55a7;">
<% if @message.project %> <% if @message.project %>
@ -29,7 +30,7 @@
</ul> </ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div> <div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply"> <label class="mail_reply">
<%= link_to(h(:mail_issue_reply), @message_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %> <%= link_to(l(:mail_issue_reply), @message_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label> </label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div> <div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div> </div>

View File

@ -1,4 +1,41 @@
<h1><%= link_to(h(@news.title), @news_url) %></h1>
<em><%=h @news.author.name %></em>
<%= textilizable(@news, :description, :only_path => false) %> <p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<% if @news.project %>
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% elsif @news.course %>
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% end %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<% if @news.project %>
<span style="float: left; width: 526px"><%=h @news.project.name %></span>
<% elsif @news.course %>
<span style="float: left; width: 526px"><%=h @news.course.name %></span>
<% end %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @news.description %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @news_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -1,5 +1,40 @@
<h1><%= link_to(h(@news.title), @news_url) %></h1>
<p><%= l(:text_user_wrote, :value => h(@comment.author)) %></p> <p>
<span class="c_blue" style="color:#1b55a7;">
<%= link_to(h("#{@comment.author.login}(#{@comment.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
</span><%= l(:mail_issue_title_userin)%>
<span class="c_blue" style="color:#1b55a7;">
<% if @news.project %>
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% elsif @news.course %>
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
<% end %>
</span><%= l(:mail_issue_title_active)%></p>
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
<span style="float: left; width: 526px"> <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %></span></li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_sent_from)%></strong></span>
<% if @news.project %>
<span style="float: left; width: 526px"><%=h @news.project.name %></span>
<% elsif @news.course %>
<span style="float: left; width: 526px"><%=h @news.course.name %></span>
<% end %>
</li>
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<%= @news.description %>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
<label class="mail_reply">
<%= link_to(l(:mail_issue_reply), @news_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
</label>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>
<%= textilizable @comment, :comments, :only_path => false %>

View File

@ -7,7 +7,7 @@
<textarea name="polls_description" maxlength="300" id="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea> <textarea name="polls_description" maxlength="300" id="polls_description" class="textarea_editor"><%= @poll.polls_description%></textarea>
</div> </div>
<div class="ur_editor_footer"> <div class="ur_editor_footer">
<a class="btn_submit" data-button="ok" onclick="$(this).parent().parent().parent().submit();">确定</a> <a class="btn_submit" data-button="ok" onclick="pollsSubmit($(this));">确定</a>
<a class="btn_cancel" data-button="cancel" onclick="pollsCancel();">取消</a> <a class="btn_cancel" data-button="cancel" onclick="pollsCancel();">取消</a>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

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

@ -25,6 +25,10 @@
} }
//问卷头 //问卷头
function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();} function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();}
function pollsSubmit(doc){
var title = $.trim($("#polls_title").val());
if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();}
}
function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();} function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();}
// //
function pollQuestionCancel(question_id){ function pollQuestionCancel(question_id){
@ -57,15 +61,22 @@
function poll_submit() function poll_submit()
{ {
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); var title = $.trim($("#polls_name_h").html());
showModal('ajax-modal', '310px'); if(title.length == 0)
$('#ajax-modal').css('height','115px'); {
$('#ajax-modal').siblings().remove(); alert("问卷标题不能为空");
$('#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>"); else{
$('#ajax-modal').parent().removeClass("alert_praise"); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
$('#ajax-modal').parent().css("top","").css("left",""); showModal('ajax-modal', '310px');
$('#ajax-modal').parent().addClass("popbox_polls"); $('#ajax-modal').css('height','115px');
$('#ajax-modal').siblings().remove();
$('#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>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("popbox_polls");
}
} }
</script> </script>
</head> </head>

View File

@ -1,7 +1,7 @@
<div class="ur_page_head ur_editor02"><!--头部显示 start--> <div class="ur_page_head ur_editor02"><!--头部显示 start-->
<a href="#" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a> <a href="#" class="ur_icon_edit" title="编辑" onclick="pollsEdit();"></a>
<h1 class="ur_page_title" id="polls_name_h"> <h1 class="ur_page_title" id="polls_name_h">
<%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> <%= poll.polls_name%>
</h1> </h1>
<p class="ur_prefix_content" id="polls_description_p"> <p class="ur_prefix_content" id="polls_description_p">
<%= @poll.polls_description%> <%= @poll.polls_description%>

View File

@ -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'>确&nbsp;&nbsp;定</a>" + "<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确&nbsp;&nbsp;定</a>" +
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</a>" + "<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取&nbsp;&nbsp;消</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;">

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
@ -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|