Ray's changes in announcenment back-end
This commit is contained in:
parent
97adf94e15
commit
55d12e50f2
|
@ -48,7 +48,7 @@
|
||||||
}
|
}
|
||||||
.select-role {
|
.select-role {
|
||||||
display:none;
|
display:none;
|
||||||
overflow:hidden;
|
padding: 10px 0 0;
|
||||||
}
|
}
|
||||||
.file-upload {
|
.file-upload {
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
|
@ -1251,6 +1251,7 @@
|
||||||
, complete = function () {
|
, complete = function () {
|
||||||
if (startEvent == 'show') that.reset()
|
if (startEvent == 'show') that.reset()
|
||||||
that.$element.trigger(completeEvent)
|
that.$element.trigger(completeEvent)
|
||||||
|
mainTablePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element
|
this.$element
|
||||||
|
|
|
@ -44,6 +44,25 @@ $(document).ready(function(){
|
||||||
$.getScript($(this).attr('rel'));
|
$.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*/
|
/*tinyscrollbar&windows-Size*/
|
||||||
resize();
|
resize();
|
||||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
|
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
|
||||||
|
@ -80,7 +99,7 @@ function mainTablePosition() {
|
||||||
var $height = $('#main-wrap > .subnav').height()
|
var $height = $('#main-wrap > .subnav').height()
|
||||||
var $table = $('#main-wrap > .table')
|
var $table = $('#main-wrap > .table')
|
||||||
//alert ($table.height())
|
//alert ($table.height())
|
||||||
$table.stop().animate({marginTop:$height},500)
|
$table.stop().animate({marginTop:$height-17},500)
|
||||||
//$table.css({marginTop : $height})
|
//$table.css({marginTop : $height})
|
||||||
}
|
}
|
||||||
$(window).scroll(function () {
|
$(window).scroll(function () {
|
||||||
|
|
|
@ -98,7 +98,7 @@ h1, h2, h3, h4, h5, h6 {
|
||||||
border-radius: 0 0 4px 4px;
|
border-radius: 0 0 4px 4px;
|
||||||
}
|
}
|
||||||
table .span1-2 {
|
table .span1-2 {
|
||||||
width: 94px;
|
min-width: 85px;
|
||||||
float: none;
|
float: none;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
.main-list {
|
.main-list {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
.main-list thead th {
|
.main-wrap>.main-list thead th {
|
||||||
background-color: rgba(0,0,0,0.05);
|
background-color: transparent;
|
||||||
border-right: 1px solid #ddd;
|
border-right: medium none;
|
||||||
}
|
}
|
||||||
.main-list thead th:last-child {
|
.main-list thead th:last-child {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
@ -29,19 +29,22 @@
|
||||||
}
|
}
|
||||||
.main-list tbody .quick-edit {
|
.main-list tbody .quick-edit {
|
||||||
position:relative;
|
position:relative;
|
||||||
height:40px;
|
height:20px;
|
||||||
}
|
}
|
||||||
.main-list tbody .quick-edit .nav {
|
.main-list tbody .quick-edit .nav {
|
||||||
/*left: -55px;*/
|
/*left: -55px;*/
|
||||||
position: absolute;
|
position: absolute;
|
||||||
/*top: -3px;*/
|
/*top: -3px;*/
|
||||||
width: 350px;
|
width: 350px;
|
||||||
|
left: -8px;
|
||||||
}
|
}
|
||||||
.main-list td {
|
.main-list td {
|
||||||
/*height:80px;*/
|
background-color: #FFFFFF;
|
||||||
|
border-bottom: 1px solid #DDDDDD;
|
||||||
|
border-top: medium none;
|
||||||
}
|
}
|
||||||
.main-list .nav {
|
.main-list .nav {
|
||||||
margin-top: 15px;
|
margin-top: 0;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
.main-list tr.with_action:hover .hide {
|
.main-list tr.with_action:hover .hide {
|
||||||
|
@ -53,7 +56,7 @@
|
||||||
}
|
}
|
||||||
.main-list .label-td {
|
.main-list .label-td {
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
height: 60px;
|
height: 40px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -75,6 +78,15 @@
|
||||||
-moz-border-radius: 3px;
|
-moz-border-radius: 3px;
|
||||||
z-index: 5;
|
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 {
|
.route-group .route {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
@ -109,6 +121,9 @@ legend {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-right: none;
|
border-right: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 30px;
|
||||||
|
z-index: 50;
|
||||||
}
|
}
|
||||||
.subnav .nav > li:first-child > a, .subnav .nav > li:first-child > a:hover {
|
.subnav .nav > li:first-child > a, .subnav .nav > li:first-child > a:hover {
|
||||||
-moz-border-radius: 0;
|
-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;
|
-webkit-text-size-adjust:none;
|
||||||
}
|
}
|
||||||
html, body{
|
html, body{
|
||||||
background: url(<%= asset_path 'background.jpg' %>) repeat left top;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
/*自定*/
|
/*自定*/
|
||||||
|
|
|
@ -350,8 +350,6 @@
|
||||||
border-top: none;
|
border-top: none;
|
||||||
}
|
}
|
||||||
#post-body .editor {
|
#post-body .editor {
|
||||||
background-color: #333333;
|
|
||||||
height: 20px;
|
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
}
|
}
|
||||||
.select-role {
|
.select-role {
|
||||||
display:none;
|
display:none;
|
||||||
overflow:hidden;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
.file-upload {
|
.file-upload {
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
<% if bulletin.is_hidden? %>
|
<% if bulletin.is_hidden? %>
|
||||||
<span class="label"><%= t(:hidden) %></span>
|
<span class="label"><%= t(:hidden) %></span>
|
||||||
<% end %>
|
<% 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">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills hide">
|
<ul class="nav nav-pills hide">
|
||||||
<% unless bulletin.is_check_rejected?%>
|
<% 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>
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</td>
|
</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.postdate %></td>
|
||||||
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
|
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
|
||||||
<td>
|
<td>
|
||||||
|
<div class="label-group">
|
||||||
|
<div class="label-td">
|
||||||
<% bulletin.sorted_tags.each do |tag| %>
|
<% bulletin.sorted_tags.each do |tag| %>
|
||||||
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
<span class="label label-tags"><%= tag[I18n.locale] %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><%= User.from_id(bulletin.update_user_id).name rescue ''%></td>
|
<td><%= User.from_id(bulletin.update_user_id).name rescue ''%></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<thead>
|
<!--<thead>
|
||||||
<tr class="sort-header">
|
<tr class="sort-header">
|
||||||
<th class="span1 strong">
|
<th class="span1 strong">
|
||||||
<input type="checkbox">
|
<input type="checkbox">
|
||||||
|
@ -33,6 +33,18 @@
|
||||||
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
|
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</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>
|
</thead>
|
||||||
<tbody class="sort-holder">
|
<tbody class="sort-holder">
|
||||||
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
<%= render :partial => 'bulletin', :collection => @bulletins %>
|
||||||
|
|
|
@ -53,5 +53,45 @@
|
||||||
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
|
||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
|
@ -19,12 +19,15 @@
|
||||||
<%= f.error_messages %>
|
<%= f.error_messages %>
|
||||||
|
|
||||||
<div id="sub-wiget">
|
<div id="sub-wiget">
|
||||||
|
<% if params[:action] != 'new' %>
|
||||||
<div id="widget-audit" class="widget-box">
|
<div id="widget-audit" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear">
|
||||||
<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 class="widget-title"><i class="icons-link icons-white"></i>Audit</h3>
|
<h3 class="widget-title"><i class="icons-link icons-white"></i>Audit</h3>
|
||||||
<div class="widget-content">
|
<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">
|
<div class="controls">
|
||||||
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
|
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
|
||||||
|
@ -45,6 +48,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end %>
|
||||||
<div id="widget-picture" class="widget-box widget-size-300">
|
<div id="widget-picture" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear">
|
||||||
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
||||||
|
@ -100,9 +104,18 @@
|
||||||
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
|
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<%= f.check_box :is_top %><%= t('top') %>
|
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||||
<%= f.check_box :is_hot %><%= t('hot') %>
|
<%= f.check_box :is_top %>
|
||||||
<%= f.check_box :is_hidden %><%= t('hide') %>
|
<%= 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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,9 +127,11 @@
|
||||||
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
|
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
|
||||||
<div class="widget-content clear form-horizontal">
|
<div class="widget-content clear form-horizontal">
|
||||||
<% @tags.each do |tag| %>
|
<% @tags.each do |tag| %>
|
||||||
|
<%= content_tag :label,:class => "checkbox inline" do -%>
|
||||||
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
|
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
|
||||||
<%= tag[I18n.locale] %>
|
<%= tag[I18n.locale] %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
<h1><%= t('announcement.editing_announcement') %></h1>
|
<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| %>
|
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<%#= link_back %>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path, :html => {:class => 'clear'} do |f| %>
|
<div id="poststuff">
|
||||||
|
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path do |f| %>
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
</div>
|
||||||
<%#= link_back %>
|
|
||||||
|
|
Reference in New Issue