1、修改附件列表排列和样式

2、谈论区样式显示
3、讨论区:“编辑” “引用”, “回复”
4、讨论区与课程分离
This commit is contained in:
huang 2015-04-07 17:45:00 +08:00
parent c1fea1c7e2
commit 8b379711d9
6 changed files with 66 additions and 157 deletions

View File

@ -2,7 +2,7 @@
<% if defined?(container) && container && container.saved_attachments %>
<% if isReply %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>" class="attachment">
<span id="attachments_p<%= i %>" class="sub_btn">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") +
link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
@ -26,7 +26,7 @@
<% end %>
<% end %>
<% end %>
</span></br>
</span>
<script type='text/javascript'>
// function CompatibleSend()
// {
@ -38,7 +38,7 @@
<span class="add_attachment">
<%#= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()",:class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
<%= button_tag "文件浏览", :type=>"button", :onclick=>"_file.click()", :class =>"sub_btn",:style => ie8? ? 'display:none' : '' %>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => 'file_selector',

View File

@ -7,19 +7,20 @@
}
}
</script>
<div id="add-message" class="add_frame" style="display:<%= !@flag.nil?&&@flag=='true' ? '' : 'none' %>;">
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<div id="add-message" class="talk_new ml15" style="display:<%= !@flag.nil?&&@flag=='true' ? '' : 'none' %>;">
<% if User.current.logged? %>
<div class="project_r_h">
<h2 class="project_h2"><%= l(:label_message_new) %></h2>
</div>
<%= form_for @message, :url => new_board_message_path(@board), :html => {:multipart => true, :id => 'message-form'} do |f| %>
<%= render :partial => 'messages/form', :locals => {:f => f} %>
<%= render :partial => 'messages/form_project', :locals => {:f => f} %>
<p>
<a herf="#" onclick="submitProjectBoard();" class="ButtonColor m3p10"><%= l(:button_submit)%></a>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'ButtonColor m3p10' %>
<a herf="#" onclick="submitProjectBoard();" class="blue_btn fl ml55" style="margin-left: 55px"><%= l(:button_submit)%></a>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-message").hide(); return false;', :class => 'grey_btn ml10 fl' %>
</p>
<% end %>
<div id="preview" class="wiki"></div>
<br/><br/>
<% end %>
</div>
@ -37,15 +38,12 @@
<% end %>
<!-- 内容显示部分 -->
<div class="project_r_h">
<h2 class="project_h2"><%= h @board.name %></h2>
</div>
<div class="talk_top">
<div class="fl">项目讨论区共有<span><%= @topic_count %></span>个帖子 </div>
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
<span><%= link_to l(:label_message_new), new_board_message_path(@board),
:class => 'problem_new_btn fl c_dorange',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
:class => 'problem_new_btn fl c_dorange',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
<% end %>
<div class="cl"></div>
</div>

View File

@ -1,7 +1,7 @@
<%= error_messages_for 'message' %>
<% replying ||= false %>
<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
<p class="talk_top"><%= l(:label_message_new) %></p>
<li>
<label><span class="c_red">*</span>&nbsp;<%= l(:field_subject) %>&nbsp;&nbsp;</label>
<% if replying %>
@ -41,4 +41,4 @@
</li>
<li >
<div class="cl"></div>
</li>
</li>

View File

@ -7,7 +7,7 @@
</div>
<div class="talk_txt fl">
<p class="problem_tit fl fb" >
<%= link_to @topic.subject, project_boards_path(@topic.project),title: @topic.subject.to_s %></p>
<%= @topic.subject %></p>
<br/>
<p>由<%= link_to_user_header @topic.author,false,:class=> 'problem_name c_orange' %> 添加于<%= format_time(@topic.created_on) %></p>
</div>
@ -88,7 +88,7 @@
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
<div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
<a href="#" onclick="submit_message_replay();"class="blue_btn fl c_white" style="margin-left: 50px;"><%= l(:button_submit)%></a>
<% end %>
<div id="preview" class="wiki"></div>

View File

@ -13,6 +13,4 @@
<div id="preview" class="wiki"></div>
<% elsif @course %>
<%= render :partial => 'course_new' %>
<% end %>
<% end %>

View File

@ -8,21 +8,49 @@ a:link,a:visited{color:#7f7f7f;text-decoration:none;}
a:hover,a:active{color:#000;}
/*常用*/
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }
.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; margin-bottom:10px; background:#dbdbdb;}
.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
table{ background:#fff;}
.more{ font-weight:normal; color:#999; font-size:12px;}
.no_line{ border-bottom:none;}
.no_border{ border:none;}
/* font & color */
h2{ font-size:18px; color:#15bccf;}
h3{ font-size:14px; color:#e8770d;}
h4{ font-size:14px; color:#3b3b3b;}
.f12{font-size:12px; font-weight:normal;}
.f14{font-size:14px;}
.f16{font-size:16px;}
.f18{font-size:18px;}
.fb{font-weight:bold;}
.lh20{line-height:20px;}
.lh22{line-height:22px;}
.lh24{line-height:24px;}
.lh26{line-height:26px;}
.fmYh{font-family:"MicroSoft Yahei";}
.font999{ color:#999;}
.fontRed{color:#770000;}
/* Float & Clear */
.cl{ clear:both; overflow:hidden; }
.fl{ float: left;}
.fr{ float:right;}
.fl{float:left;display:inline;}
.fr{float:right;display:inline;}
.f_l{ float:left;}
.f_r{ float:right;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1}
/* Spacing */
.ml2{ margin-left:2px;}
.ml3{ margin-left:3px;}
.ml4{ margin-left:4px;}
.ml5{ margin-left:5px;}
.ml8{ margin-left:8px;}
.ml10{ margin-left:10px;}
.ml15{ margin-left:15px;}
.ml20{ margin-left:20px;}
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
.ml55{ margin-left:55px;}
.ml55 { margin-left:55px;}
.ml30{ margin-left:30px;}
.ml60{ margin-left:60px;}
.ml80{ margin-left:80px;}
@ -38,10 +66,12 @@ a:hover,a:active{color:#000;}
.mb5{ margin-bottom:5px;}
.mb10{ margin-bottom:10px;}
.pl15{ padding-left:15px;}
.w150{ width:150px;}
.w280{ width:280px;}
.w430{ width:470px;}
.w520{ width:520px;}
.w557{ width:557px;}
.w583{ width:583px;}
.w350{ width:350px;}
.w610{ width:610px;}
.w600{ width:600px;}
@ -49,14 +79,11 @@ a:hover,a:active{color:#000;}
.h50{ height:50px;}
.h150{ height:150px;}
h2{ font-size:18px; color:#15bccf;}
h3{ font-size:14px; color:#e8770d;}
h4{ font-size:14px; color:#3b3b3b;}
/* Font & background Color */
a.b_grey{ background: #F5F5F5;}
a.b_dgrey{ background: #CCC;}
a.c_orange{color:#e8770d;}
a:hover.c_orange{color: #F30;}
a.c_orange{color:#ff5722;}
a:hover.c_orange{color: #d33503;}
a.c_lorange{color:#ff9900;}
a:hover.c_lorange{color:#fff;}
a.c_blue{ color:#15bccf;}
@ -75,10 +102,6 @@ a:hover.c_blue02{color: #0781b4;}
a.c_red{ color:#F00;}
a:hover.c_red{ color: #C00;}
.f14{ font-size:14px;}
.fb{ font-weight:bold;}
.f12{ font-size:12px; font-weight:normal;}
.b_grey{ background: #F5F5F5;}
.b_dgrey{ background: #CCC;}
.c_orange{color:#e8770d;}
@ -91,24 +114,22 @@ a:hover.c_red{ color: #C00;}
.b_green{background:#28be6c;}
.b_w{ background:#fff;}
/* commonBtn */
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
a:hover.grey_btn{ background:#717171; color:#fff;}
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
a:hover.blue_btn{ background:#329cbd;}
.nolink_btn{ background:#BCBCBC; color: #fff; padding:2px 5px;}
.more_btn{-moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #9DCEFF; color:#9DCEFF; border-radius:3px; padding:0px 3px;}
.upbtn{ margin:42px 0 0 10px; border:none;}
/* commonpic */
.pic_date{ display:block; background:url(../images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;}
.pic_add{ display:block; background:url(../images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;}
.pic_sch{ display:block; background:url(../images/public_icon.png) -31px -195px no-repeat; width:16px; height:15px; float:left;}
.more{ font-weight:normal; color:#999; font-size:12px;}
.no_line{ border-bottom:none;}
select,input,textarea{ border:1px solid #ccc; background:#fff; color:#999; padding-left:5px;}
.sub_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;}
.sub_btn:hover{ background:#999; color:#fff; }
table{ background:#fff;}
/*框架主类容*/
#Container{ width:940px; margin:0 auto; }
@ -146,7 +167,7 @@ div#menu ul ul a.parent {background: url(../images/item.png) -20px 6px no-repea
div#menu ul ul a.parent:hover {background: url(../images/item.png) -20px -11px no-repeat;}
/* menu::level1 */
div#menu a { padding: 5px 12px 0 10px;line-height: 30px; color: #fff;}
/*div#menu li { background: url(../images/main-delimiter.png) 98% 4px no-repeat; }*/
div#menu li { background: url(images/main-delimiter.png) 98% 4px no-repeat; }
div#menu li.last { background: none; }
/* menu::level2 */
div#menu ul ul li { background: none; }
@ -159,7 +180,6 @@ div#menu ul ul li {width: 100%;}
div#menu ul ul ul {padding: 0;margin: -38px 0 0 92px !important; width:140px; }
div#menu ul ul ul li a{ width:125px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf;}
/*主类容*/
#Main{ background:#fff; margin-bottom:10px;}
#content{}
@ -212,113 +232,6 @@ a:hover.close_btn {background-position:-66px 0;}
.show_btn {background-position:-119px 0;}
.msgserver a {color:#15bccf; }
.msgserver a:hover { text-decoration:underline; }
.break_word{word-break: break-all;word-wrap: break-word;}
/***** Ajax indicator ******/
#ajax-indicator {
position: absolute; /* fixed not supported by IE */
background-color:#eee;
border: 1px solid #bbb;
top:35%;
left:40%;
width:20%;
font-weight:bold;
text-align:center;
padding:0.6em;
z-index:100000;
opacity: 0.5;
}
html>body #ajax-indicator { position: fixed; }
#ajax-indicator span {
background-position: 0% 40%;
background-repeat: no-repeat;
background-image: url(../images/loading.gif);
padding-left: 26px;
vertical-align: bottom;
}
div.modal {
border-radius: 5px;
background: #fff;
z-index: 50;
padding: 4px;
}
.ui-widget-content {
border: 1px solid #ddd;
color: #333;
}
.ui-widget {
font-family: Verdana, sans-serif;
font-size: 1.1em;
}
.ui-dialog .ui-dialog-content {
position: relative;
border: 0;
padding: .5em 1em;
background: none;
overflow: auto;
zoom: 1;
}
.ui-widget-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-widget-overlay {
background: #666 url(http://forge.trustie.net/stylesheets/jquery/images/xui-bg_diagonals-thick_20_666666_40x40.png.pagespeed.ic.9mfuw_R0z1.png) 50% 50% repeat;
opacity: .5;
filter: Alpha(Opacity=50);
}
/***** end Ajax indicator ******/
/***** Flash & error messages ****/
#errorExplanation, div.flash, .nodata, .warning, .conflict {
padding: 4px 4px 4px 30px;
margin-bottom: 12px;
font-size: 1.1em;
border: 2px solid;
}
div.flash {margin-top: 8px;}
div.flash.error, #errorExplanation {
background: url(../images/exclamation.png) 8px 50% no-repeat;
background-color: #ffe3e3;
border-color: #dd0000;
color: #880000;
}
div.flash.notice {
background: url(../images/true.png) 8px 5px no-repeat;
background-color: #dfffdf;
border-color: #9fcf9f;
color: #005f00;
}
div.flash.warning, .conflict {
background: url(../images/warning.png) 8px 5px no-repeat;
background-color: #FFEBC1;
border-color: #FDBF3B;
color: #A6750C;
text-align: left;
}
.nodata, .warning {
text-align: center;
background-color: #FFEBC1;
border-color: #FDBF3B;
color: #A6750C;
}
#errorExplanation ul { font-size: 0.9em;}
#errorExplanation h2, #errorExplanation p { display: none; }
.conflict-details {font-size:80%;}
/***** end Flash & error messages ****/
/*弹出框*/
.black_overlay{display:none;position:fixed;top:0px;left:0px;width:100%;height:100%;background-color:black;z-index:1001;-moz-opacity:0.8;opacity:.80;filter:alpha(opacity=80);}
.white_content{display:none;position:fixed;top:15%;left:30%;width:420px;height: auto; margin-bottom:20px;padding:16px;border:3px solid #15bccf;background-color:white;z-index:1002;overflow:auto;}