1、空数据库情况下3个主页布局修改。2、上传附件成功提交后公开自动变成私有的bug

This commit is contained in:
z9hang 2014-10-23 14:36:10 +08:00
parent 2f2b916ef8
commit 269e1cf497
5 changed files with 27 additions and 9 deletions

View File

@ -152,7 +152,7 @@
<div style="clear:both"></div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" >
<div id="J_Slide" class="d-p-index-box d-p-index-left" >
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_hot_contest)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;">
<% if User.current.logged? %>
@ -193,7 +193,7 @@
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_notification)%></strong>
</h3>
@ -218,7 +218,7 @@
</ul>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%=l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE" }%>
@ -255,7 +255,7 @@
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: left;">
<div id="J_Slide" class="d-p-index-box d-p-index-left">
<h3 style="margin-left: 5px; color: #e8770d;"><strong><%=l(:label_current_attendingcontest_work)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more_information), {:controller => 'softapplications', :action => 'index'}, :target => "_blank" %></span>
<div class="d-p-projectlist-box">

View File

@ -76,7 +76,7 @@
<div style="clear:both"></div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
<h3><strong><%= l(:lable_hot_course)%></strong></h3>
<% month_now = Time.now.strftime("%m").to_i %>
@ -122,7 +122,7 @@
<% end %>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<div id="J_Slide" class="d-p-index-box d-p-index-hot" style="float: right;">
<h3 style="padding-bottom:0px ;margin-left: 5px; color: #e8770d;">
<strong><%= l(:label_issue_feedback_activities)%></strong>
<%= link_to l(:label_my_question), newbie_send_path, {:class => 'orangeButton idea_btn', :style => "color: #EEEEEE"} %>

View File

@ -54,7 +54,7 @@
<div style="clear:both"></div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject">
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
<h3 style="margin-left: 5px; color: #e8770d;">
<strong><%= l(:lable_hot_projects)%></strong>
</h3>
@ -107,7 +107,7 @@
</div>
</div>
<div id="J_Slide" class="d-p-index-box d-p-index-hotproject" style="float: right;">
<div id="J_Slide" class="d-p-index-box d-p-index-Dynamic">
<ul class="user-welcome-message-list">
<h3 style="color: rgb(21, 188, 207)"><strong><%= l(:lable_user_active)%></strong></h3>
<span style="margin-top: -20px;float: right; display: block;"><%= link_to l(:label_more), { :controller => 'users', :action => 'index'}, :target => "_blank" %></span>

View File

@ -24,7 +24,7 @@ function addFile(inputEl, file, eagerUpload) {
$('<input>', { 'type': 'text', 'class': 'filename readonly', 'name': 'attachments[' + attachmentId + '][filename]', 'readonly': 'readonly'} ).val(file.name),
$('<input>', { 'type': 'text', 'class': 'description', 'name': 'attachments[' + attachmentId + '][description]', 'maxlength': 254, 'placeholder': $(inputEl).data('description-placeholder') } ).toggle(!eagerUpload),
$('<span >公开:</span>').attr({ 'class': 'ispublic-label' }) ,
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public]', checked:'checked' } ).toggle(!eagerUpload),
$('<input>', { 'type': 'checkbox', 'class': 'is_public_checkbox','value':1, 'name': 'attachments[' + attachmentId + '][is_public_checkbox]', checked:'checked' } ).toggle(!eagerUpload),
$('<a>&nbsp</a>').attr({ 'href': "#", 'class': 'remove-upload', 'data-confirm' : "您确定要删除吗?" }).click(removeFile).toggle(!eagerUpload),
$('<div>', { 'class': 'div_attachments', 'name': 'div_'+'attachments_' + attachmentId} )
).appendTo('#attachments_fields');

View File

@ -103,6 +103,24 @@ ul.welcome-message-list{
margin-top: 10px;
float: left;
}
.d-p-index-hot{
width: 48%;
margin-top: 10px;
float: left;
min-height: 400px;
}
.d-p-index-left{
width: 48%;
margin-top: 10px;
float: left;
min-height: 200px;
}
.d-p-index-Dynamic{
width: 48%;
margin-top: 10px;
float: right;
min-height: 200px;
}
ul.d-p-index-hdright{
padding: 0px;
margin-top: -30px;