Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

Conflicts:
	app/views/users/user_import_homeworks.js.erb
	db/schema.rb
This commit is contained in:
cxt 2016-02-02 15:55:07 +08:00
commit 6e93a5af33
17 changed files with 1034 additions and 995 deletions

View File

@ -211,8 +211,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @article.id %>").html(); $("#message_description_<%= @article.id %> p,#message_description_<%= @article.id %> span,#message_description_<%= @article.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @article.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -217,8 +217,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @article.id %>").html(); $("#message_description_<%= @article.id %> p,#message_description_<%= @article.id %> span,#message_description_<%= @article.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @article.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -139,8 +139,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @memo.id %>").html(); $("#message_description_<%= @memo.id %> p,#message_description_<%= @memo.id %> span,#message_description_<%= @memo.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @memo.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -171,8 +171,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @topic.id %>").html(); $("#message_description_<%= @topic.id %> p,#message_description_<%= @topic.id %> span,#message_description_<%= @topic.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @topic.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -201,8 +201,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @topic.id %>").html(); $("#message_description_<%= @topic.id %> p,#message_description_<%= @topic.id %> span,#message_description_<%= @topic.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @topic.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -227,8 +227,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @topic.id %>").html(); $("#message_description_<%= @topic.id %> p,#message_description_<%= @topic.id %> span,#message_description_<%= @topic.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @topic.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -184,8 +184,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @news.id %>").html(); $("#message_description_<%= @news.id %> p,#message_description_<%= @news.id %> span,#message_description_<%= @news.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @news.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -174,8 +174,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @news.id %>").html(); $("#message_description_<%= @news.id %> p,#message_description_<%= @news.id %> span,#message_description_<%= @news.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @news.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -184,8 +184,13 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#message_description_<%= @news.id %>").html(); $("#message_description_<%= @news.id %> p,#message_description_<%= @news.id %> span,#message_description_<%= @news.id %> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @news.id %>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
</script> </script>

View File

@ -150,9 +150,14 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#intro_content_<%= @document.id%>").html(); $("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#intro_content_<%= @document.id%>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
}); });
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);

View File

@ -50,9 +50,14 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var postContent = $("#intro_content_<%= document.id%>").html(); $("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#intro_content_<%= document.id%>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);
var btn = $(btnid); var btn = $(btnid);

View File

@ -5,9 +5,14 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
var postContent = $("#intro_content_<%= user_activity_id%>").html(); $("#intro_content_<%= user_activity_id%> p,#intro_content_<%= user_activity_id%> span,#intro_content_<%= user_activity_id%> em").each(function(){
var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#intro_content_<%= user_activity_id%>").html(postContent); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
postContent=postContent.replace(/&nbsp; &nbsp;/g,"&nbsp;&nbsp;&nbsp;");
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent);
});
description_show_hide(<%=user_activity_id %>); description_show_hide(<%=user_activity_id %>);
}); });
</script> </script>

View File

@ -17,7 +17,7 @@
<% end %> <% end %>
</li> </li>
<li class="subjectCount fl"><%= homework.quotes %></li> <li class="subjectCount fl"><%= homework.quotes %></li>
<li class="subjectPublisher fl"><%= homework.user.show_name %></li> <li class="subjectPublisher fl hidden"><%= homework.user.show_name %></li>
<li class="fl subjectDate"><%=format_date homework.publish_time %></li> <li class="fl subjectDate"><%=format_date homework.publish_time %></li>
</ul> </ul>
<% end %> <% end %>

View File

@ -1,5 +1,6 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_homeworks') %>'); $('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_user_homeworks') %>');
showModal('ajax-modal', '1040px'); showModal('ajax-modal', '1040px');
$('#ajax-modal').siblings().remove(); $('#ajax-modal').siblings().remove();
$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed").css("border","3px solid #269ac9"); var mTop = ($(window).height()-646)/2;
$('#ajax-modal').css("margin","15px"); var mLeft = ($(window).width()-1054)/2;
$('#ajax-modal').parent().css("border","3px solid #269ac9").css("top","mTop").css("left","mLeft").css("position","fixed");

View File

@ -1219,6 +1219,7 @@ ActiveRecord::Schema.define(:version => 20160202034530) do
create_table "org_members", :force => true do |t| create_table "org_members", :force => true do |t|
t.integer "user_id" t.integer "user_id"
t.integer "organization_id" t.integer "organization_id"
t.string "role"
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
@ -1870,25 +1871,6 @@ ActiveRecord::Schema.define(:version => 20160202034530) do
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade" add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count" add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
create_table "user_wechats", :force => true do |t|
t.integer "subscribe"
t.string "openid"
t.string "nickname"
t.integer "sex"
t.string "language"
t.string "city"
t.string "province"
t.string "country"
t.string "headimgurl"
t.string "subscribe_time"
t.string "unionid"
t.string "remark"
t.integer "groupid"
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "users", :force => true do |t| create_table "users", :force => true do |t|
t.string "login", :default => "", :null => false t.string "login", :default => "", :null => false
t.string "hashed_password", :limit => 40, :default => "", :null => false t.string "hashed_password", :limit => 40, :default => "", :null => false
@ -1964,14 +1946,6 @@ ActiveRecord::Schema.define(:version => 20160202034530) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
end end
create_table "wechat_logs", :force => true do |t|
t.string "openid", :null => false
t.text "request_raw"
t.text "response_raw"
t.text "session_raw"
t.datetime "created_at", :null => false
end
create_table "wiki_content_versions", :force => true do |t| create_table "wiki_content_versions", :force => true do |t|
t.integer "wiki_content_id", :null => false t.integer "wiki_content_id", :null => false
t.integer "page_id", :null => false t.integer "page_id", :null => false

View File

@ -694,6 +694,8 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;} .homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} .homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;} a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;}
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyPortrait {float:left; width:33px;} .homepagePostReplyPortrait {float:left; width:33px;}

View File

@ -612,6 +612,8 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;} .homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;} .homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;} .homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
/*a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}*/ /*a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}*/
/*a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}*/ /*a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}*/
.homepagePostReplyPortrait {float:left; width:45px;} .homepagePostReplyPortrait {float:left; width:45px;}