Merge branch 'szzh' into develop
This commit is contained in:
commit
1db41ba4bc
|
@ -51,7 +51,7 @@ class BoardsController < ApplicationController
|
|||
@boards = @course.boards.includes(:last_message => :author).all
|
||||
end
|
||||
end
|
||||
if @boards.size == 1
|
||||
unless @course.boards.empty?
|
||||
@board = @course.boards.first
|
||||
end
|
||||
show and return
|
||||
|
|
|
@ -88,9 +88,9 @@ $(function(){
|
|||
|
||||
function f_submit()
|
||||
{
|
||||
var subject = $("#memo_subject").val();
|
||||
var content = $("#memo_content_1").val();
|
||||
$("#memo_subject").val(subject+":"+ content.substr(0,18));
|
||||
// var subject = $("#memo_subject").val();
|
||||
// var content = $("#memo_content_1").val();
|
||||
// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"...");
|
||||
$("#new_memo").submit();
|
||||
}
|
||||
|
||||
|
@ -137,6 +137,30 @@ function cookieget(n)
|
|||
durationTime : 600
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#subject").keydown(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
$("#subject").keyup(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
<div class="scrollsidebar" id="scrollsidebar" style="float: right">
|
||||
<div class="side_content">
|
||||
|
@ -146,9 +170,10 @@ function cookieget(n)
|
|||
<div class="custom_service">
|
||||
<% get_memo %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %>
|
||||
<%= f.text_area :content,:class => "opnionText",:id=>"memo_content_1" ,:placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.text_area :subject,:id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();"><%= l(:label_submit)%></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -13,8 +13,9 @@
|
|||
<div class="custom_service">
|
||||
<% get_memo %>
|
||||
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
|
||||
<%= f.hidden_field :subject,:required => true , :value => l(:label_feedback_value) %>
|
||||
<%= f.text_area :content,:class => "opnionText" , :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.text_area :subject, :id=>"subject", :class => "opnionText", :placeholder => l(:label_feedback_tips) %>
|
||||
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
|
||||
<label class="c_grey">您还能输入<span id="textCount" class="c_orange">50</span>个字符</label>
|
||||
<a href="javascript:void(0);" class="opnionButton" style=" color:#fff;" id="" onclick="f_submit();">
|
||||
<%= l(:label_submit)%>
|
||||
</a>
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
:class => 'talk_edit fr'
|
||||
) if @message.course_destroyable_by?(User.current) %>
|
||||
<div class="cl"></div>
|
||||
<div class="talk_info mb10 upload_img"><%= @topic.content.html_safe %></div>
|
||||
<div class="talk_info mb10 upload_img break_word"><%= @topic.content.html_safe %></div>
|
||||
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
|
||||
<!-- <a href="#" class=" link_file ml60">附件:爱覅俄方if.zip(27.5kB)</a>-->
|
||||
<div class="cl"></div>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<div class="ping_C mb10 ml50" id="<%= "message-#{message.id}" %>">
|
||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop upload_img">
|
||||
<div class="ping_distop upload_img break_word">
|
||||
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
|
||||
<span class="c_grey fr"><%= format_time(message.created_on) %></span>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<div class="ping_C mb10">
|
||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(comment.author),:width => 42,:height => 42), user_path(comment.author)%></div>
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop upload_img">
|
||||
<div class="ping_distop upload_img break_word">
|
||||
<%= link_to_user_header(comment.author,false,:class => 'c_blue fb fl mb10 ') if comment.respond_to?(:author) %>
|
||||
<span class="c_grey fr">
|
||||
<%= format_time(comment.created_on) %>
|
||||
|
|
|
@ -354,7 +354,7 @@ zh:
|
|||
label_feedback_tips: "有什么想说的,尽管来咆哮吧~~"
|
||||
label_technical_support: "技术支持:"
|
||||
label_feedback_success: "您的意见已经反馈到公共贴吧的新手讨论吧,我们会第一时间解决您的问题,谢谢支持!"
|
||||
label_feedback_value: "用户反馈"
|
||||
label_feedback_value: "该帖来自用户反馈:)"
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -257,10 +257,10 @@ K.options = {
|
|||
minHeight : 100,
|
||||
minChangeSize : 50,
|
||||
zIndex : 811213,
|
||||
items : ['emoticons','imagedirectupload',
|
||||
items : [ 'emoticons','code',
|
||||
'source','plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', '|',
|
||||
'formatblock', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
|
||||
'italic', 'underline', 'removeformat', '|','table', 'link', '|', 'fullscreen'
|
||||
'italic', 'underline', 'removeformat', '|','imagedirectupload','table', 'link'
|
||||
],
|
||||
noDisableItems : ['source', 'fullscreen'],
|
||||
colorTable : [
|
||||
|
@ -3523,6 +3523,7 @@ var html, _direction = '';
|
|||
if ((html = document.getElementsByTagName('html'))) {
|
||||
_direction = html[0].dir;
|
||||
}
|
||||
|
||||
function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
|
||||
var arr = [
|
||||
(_direction === '' ? '<html>' : '<html dir="' + _direction + '">'),
|
||||
|
@ -5552,6 +5553,38 @@ _plugin('core', function(K) {
|
|||
self.clickToolbar('fullscreen', function() {
|
||||
self.fullscreen();
|
||||
});
|
||||
inputObj = document.createElement("input");
|
||||
inputObj.setAttribute('id', 'jUploadFile_ef');
|
||||
inputObj.setAttribute('type', 'button');
|
||||
inputObj.setAttribute('style', 'visibility:hidden');
|
||||
document.body.appendChild(inputObj);
|
||||
window.uploadButton = K.uploadbutton({
|
||||
button: inputObj,
|
||||
fieldName:'imgFile',
|
||||
url:K.addParam('/kindeditor/upload', 'dir=image'),
|
||||
afterUpload : function(data) {
|
||||
if (data.error === 0) {
|
||||
var url = K.formatUrl(data.url, 'absolute');
|
||||
self.exec('insertimage', url, 'image','','','1','left');
|
||||
var asset_id = data.asset_id;
|
||||
if ( asset_id != "" && parent.document.getElementById('asset_id') != null ) {
|
||||
parent.document.getElementById('asset_id').value += asset_id.toString();
|
||||
parent.document.getElementById('asset_id').value += ",";
|
||||
}else{
|
||||
//TODO 暂时什么也不做
|
||||
}
|
||||
} else {
|
||||
alert(data.message);
|
||||
}
|
||||
},
|
||||
afterError : function(str) {
|
||||
alert('error: ' + str);
|
||||
}
|
||||
});
|
||||
uploadButton.fileBox.change(function(e) {
|
||||
uploadButton.submit();
|
||||
});
|
||||
|
||||
if (self.fullscreenShortcut) {
|
||||
var loaded = false;
|
||||
self.afterCreate(function() {
|
||||
|
@ -5584,6 +5617,10 @@ _plugin('core', function(K) {
|
|||
self.clickToolbar(name, function() {
|
||||
self[name]();
|
||||
});
|
||||
});
|
||||
self.clickToolbar('imagedirectupload', function() {
|
||||
$('.ke-upload-file').focus().trigger('click');
|
||||
|
||||
});
|
||||
self.clickToolbar('formatblock', function() {
|
||||
var blocks = self.lang('formatblock.formatBlock'),
|
||||
|
|
|
@ -416,7 +416,7 @@
|
|||
|
||||
.ke-icon-imagedirectupload
|
||||
{
|
||||
background-position: 0px -1232px;
|
||||
background-position: 0px -496px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
|
|
@ -54,9 +54,9 @@ $(function(){
|
|||
|
||||
function f_submit()
|
||||
{
|
||||
var subject = $("#memo_subject").val();
|
||||
var content = $("#memo_content_1").val();
|
||||
$("#memo_subject").val(subject+":"+ content.substr(0,18));
|
||||
// var subject = $("#memo_subject").val();
|
||||
// var content = $("#memo_content").val();
|
||||
// $("#memo_subject").val(subject+":"+ content.substr(0,18)+"...");
|
||||
$("#new_memo").submit();
|
||||
}
|
||||
|
||||
|
@ -99,13 +99,6 @@ $(function(){
|
|||
});
|
||||
});
|
||||
|
||||
function f_submit()
|
||||
{
|
||||
var subject = $("#memo_subject").val();
|
||||
var content = $("#memo_content").val();
|
||||
$("#memo_subject").val(subject+":"+ content.substr(0,18));
|
||||
$("#new_memo").submit();
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
@ -118,3 +111,27 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#subject").keydown(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
$("#subject").keyup(function(){
|
||||
var curLength=$("#subject").val().length;
|
||||
if(curLength>50){
|
||||
var num=$("#subject").val().substr(0,50);
|
||||
$("#subject").val(num);
|
||||
}
|
||||
else{
|
||||
$("#textCount").text(50-$("#subject").val().length)
|
||||
}
|
||||
})
|
||||
})
|
|
@ -345,7 +345,7 @@ a:hover.st_add{ color:#ff8e15;}
|
|||
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
|
||||
.r_txt_tit{width:500px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
|
||||
|
||||
blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;}
|
||||
blockquote {background: #eeeeee;padding: 10px;margin-bottom: 10px;word-break: break-all;word-wrap: break-word;}
|
||||
.respond-form{display: none;margin: auto;clear: both;}
|
||||
|
||||
.reply_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #ccc; color:#999; border-radius:3px; padding:2px 10px; margin-bottom:10px;display: block;margin-left: 470px;}
|
||||
|
|
Loading…
Reference in New Issue