Ray's changes in announcenment back-end
This commit is contained in:
parent
662c8c7a8a
commit
422a49f56c
|
@ -48,7 +48,7 @@
|
|||
}
|
||||
.select-role {
|
||||
display:none;
|
||||
overflow:hidden;
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
.file-upload {
|
||||
position:relative;
|
||||
|
|
|
@ -1252,6 +1252,7 @@
|
|||
, complete = function () {
|
||||
if (startEvent == 'show') that.reset()
|
||||
that.$element.trigger(completeEvent)
|
||||
mainTablePosition();
|
||||
}
|
||||
|
||||
this.$element
|
||||
|
|
|
@ -50,6 +50,25 @@ $(document).ready(function(){
|
|||
$.getScript($(this).attr('rel'));
|
||||
});
|
||||
|
||||
|
||||
var $role = $('.select-role');
|
||||
var method =$('.privacy:eq(1)').attr('checked');
|
||||
if(method == 'checked'){
|
||||
$role.slideDown(0);
|
||||
}
|
||||
$('.privacy').each(function($i) {
|
||||
$(this).click(function() {
|
||||
switch ($i) {
|
||||
case 0:
|
||||
$role.slideUp(300);
|
||||
break;
|
||||
case 1:
|
||||
$role.slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
|
||||
|
@ -86,7 +105,7 @@ function mainTablePosition() {
|
|||
var $height = $('#main-wrap > .subnav').height()
|
||||
var $table = $('#main-wrap > .table')
|
||||
//alert ($table.height())
|
||||
$table.stop().animate({marginTop:$height},500)
|
||||
$table.stop().animate({marginTop:$height-17},500)
|
||||
//$table.css({marginTop : $height})
|
||||
}
|
||||
$(window).scroll(function () {
|
||||
|
|
|
@ -98,7 +98,7 @@ h1, h2, h3, h4, h5, h6 {
|
|||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
table .span1-2 {
|
||||
width: 94px;
|
||||
min-width: 85px;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
.main-list {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.main-list thead th {
|
||||
background-color: rgba(0,0,0,0.05);
|
||||
border-right: 1px solid #ddd;
|
||||
.main-wrap>.main-list thead th {
|
||||
background-color: transparent;
|
||||
border-right: medium none;
|
||||
}
|
||||
.main-list thead th:last-child {
|
||||
border-right: none;
|
||||
|
@ -29,19 +29,22 @@
|
|||
}
|
||||
.main-list tbody .quick-edit {
|
||||
position:relative;
|
||||
height:40px;
|
||||
height:20px;
|
||||
}
|
||||
.main-list tbody .quick-edit .nav {
|
||||
/*left: -55px;*/
|
||||
position: absolute;
|
||||
/*top: -3px;*/
|
||||
width: 350px;
|
||||
left: -8px;
|
||||
}
|
||||
.main-list td {
|
||||
/*height:80px;*/
|
||||
background-color: #FFFFFF;
|
||||
border-bottom: 1px solid #DDDDDD;
|
||||
border-top: medium none;
|
||||
}
|
||||
.main-list .nav {
|
||||
margin-top: 15px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.main-list tr.with_action:hover .hide {
|
||||
|
@ -53,7 +56,7 @@
|
|||
}
|
||||
.main-list .label-td {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
height: 60px;
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
@ -75,6 +78,15 @@
|
|||
-moz-border-radius: 3px;
|
||||
z-index: 5;
|
||||
}
|
||||
.table-label {
|
||||
background-color: #F2F2F2;
|
||||
position: relative;
|
||||
}
|
||||
.table-label .main-list thead th {
|
||||
background-color: #F2F2F2;
|
||||
border-right: 1px solid #DDDDDD;
|
||||
border-top: 1px solid #DDDDDD !important;
|
||||
}
|
||||
.route-group .route {
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -109,6 +121,9 @@ legend {
|
|||
border-radius: 0;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
position: fixed;
|
||||
top: 30px;
|
||||
z-index: 50;
|
||||
}
|
||||
.subnav .nav > li:first-child > a, .subnav .nav > li:first-child > a:hover {
|
||||
-moz-border-radius: 0;
|
||||
|
|
|
@ -2,7 +2,6 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
|
|||
-webkit-text-size-adjust:none;
|
||||
}
|
||||
html, body{
|
||||
background: url(<%= asset_path 'background.jpg' %>) repeat left top;
|
||||
height: 100%;
|
||||
}
|
||||
/*自定*/
|
||||
|
|
|
@ -350,8 +350,6 @@
|
|||
border-top: none;
|
||||
}
|
||||
#post-body .editor {
|
||||
background-color: #333333;
|
||||
height: 20px;
|
||||
margin: 8px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
}
|
||||
.select-role {
|
||||
display:none;
|
||||
overflow:hidden;
|
||||
padding: 10px 0;
|
||||
}
|
||||
.file-upload {
|
||||
position:relative;
|
||||
|
|
|
@ -10,7 +10,10 @@
|
|||
<% if bulletin.is_hidden? %>
|
||||
<span class="label"><%= t(:hidden) %></span>
|
||||
<% end %>
|
||||
|
||||
</td>
|
||||
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
|
||||
<td>
|
||||
<%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills hide">
|
||||
<% unless bulletin.is_check_rejected?%>
|
||||
|
@ -34,16 +37,17 @@
|
|||
<li class="dropdown"><%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(bulletin), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
|
||||
<td><%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%></td>
|
||||
<td><%= bulletin.postdate %></td>
|
||||
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
|
||||
<td>
|
||||
<% bulletin.sorted_tags.each do |tag| %>
|
||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||
<% end %>
|
||||
<div class="label-group">
|
||||
<div class="label-td">
|
||||
<% bulletin.sorted_tags.each do |tag| %>
|
||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><%= User.from_id(bulletin.update_user_id).name rescue ''%></td>
|
||||
</tr>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<thead>
|
||||
<!--<thead>
|
||||
<tr class="sort-header">
|
||||
<th class="span1 strong">
|
||||
<input type="checkbox">
|
||||
|
@ -33,6 +33,18 @@
|
|||
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>-->
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="span1"></th>
|
||||
<th class="span1-2"></th>
|
||||
<th class="span1-2"></th>
|
||||
<th class="span7"></th>
|
||||
<th class="span1-2"></th>
|
||||
<th class="span1-2"></th>
|
||||
<th class="span1-2"></th>
|
||||
<th class="span1-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="sort-holder">
|
||||
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
||||
|
|
|
@ -53,5 +53,45 @@
|
|||
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-label">
|
||||
<table class="table main-list">
|
||||
<thead>
|
||||
<tr class="sort-header">
|
||||
<th class="span1 strong">
|
||||
<input type="checkbox">
|
||||
<a href class="list-remove"><i class="icon-trash"></i></a>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('status') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('status')) %>">
|
||||
<%= t('bulletin.status') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('status')) %>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('category') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('category')) %>">
|
||||
<%= t('bulletin.category') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('category')) %>
|
||||
</th>
|
||||
<th class="sort span7 <%= is_sort_active?('title') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('title')) %>">
|
||||
<%= t('bulletin.title') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('title')) %>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('postdate') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('postdate')) %>">
|
||||
<%= t('bulletin.start_date') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('postdate')) %>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('deadline') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('deadline')) %>">
|
||||
<%= t('bulletin.end_date') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('deadline')) %>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('tags') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('tags')) %>">
|
||||
<%= t('bulletin.tags') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('tags')) %>
|
||||
</th>
|
||||
<th class="sort span1-2 <%= is_sort_active?('update_user_id') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('update_user_id')) %>">
|
||||
<%= t('bulletin.last_modified') %>
|
||||
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -3,13 +3,16 @@
|
|||
<%= f.error_messages %>
|
||||
|
||||
<div id="sub-wiget">
|
||||
<% if params[:action] != 'new' %>
|
||||
<div id="widget-audit" class="widget-box">
|
||||
<div class="widget-action clear">
|
||||
<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||
</div>
|
||||
|
||||
<h3 class="widget-title"><i class="icons-link icons-white"></i>Audit</h3>
|
||||
<div class="widget-content">
|
||||
<% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin?%>
|
||||
|
||||
<% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin? %>
|
||||
<div class="controls">
|
||||
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
|
||||
<%= content_tag :label,:class => "radio inline" do -%>
|
||||
|
@ -29,6 +32,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="widget-picture" class="widget-box widget-size-300">
|
||||
<div class="widget-action clear">
|
||||
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||
|
@ -84,9 +88,18 @@
|
|||
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
|
||||
<div class="widget-content clear">
|
||||
<div class="controls">
|
||||
<%= f.check_box :is_top %><%= t('top') %>
|
||||
<%= f.check_box :is_hot %><%= t('hot') %>
|
||||
<%= f.check_box :is_hidden %><%= t('hide') %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= f.check_box :is_top %>
|
||||
<%= t('top') %>
|
||||
<% end -%>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= f.check_box :is_hot %>
|
||||
<%= t('hot') %>
|
||||
<% end -%>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= f.check_box :is_hidden %>
|
||||
<%= t('hide') %>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -98,8 +111,10 @@
|
|||
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
|
||||
<div class="widget-content clear form-horizontal">
|
||||
<% @tags.each do |tag| %>
|
||||
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
|
||||
<%= tag[I18n.locale] %>
|
||||
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
|
||||
<%= tag[I18n.locale] %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<h1><%= t('announcement.editing_announcement') %></h1>
|
||||
|
||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
<ul class="breadcrumb">
|
||||
<li><span>Home</span><span class="divider">/</span></li>
|
||||
<li><span>Library</span><span class="divider">/</span></li>
|
||||
<li class="text-blue"><%= t('announcement.editing_announcement') %></li>
|
||||
</ul>
|
||||
<div id="poststuff">
|
||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,5 +1,5 @@
|
|||
<div id="poststuff">
|
||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<% end %>
|
||||
|
||||
<%= link_back %>
|
||||
</div>
|
Reference in New Issue