Changes for nccu
This commit is contained in:
parent
5223a7a3e9
commit
6b2aeadde6
2
Gemfile
2
Gemfile
|
@ -20,7 +20,7 @@ gem 'rubyzip'
|
|||
gem 'sinatra'
|
||||
gem 'sprockets'
|
||||
gem 'tinymce-rails'
|
||||
# gem 'therubyracer'
|
||||
gem 'therubyracer'
|
||||
|
||||
# Gems used only for assets and not required
|
||||
# in production environments by default.
|
||||
|
|
|
@ -84,6 +84,7 @@ GEM
|
|||
railties (~> 3.0)
|
||||
thor (~> 0.14)
|
||||
json (1.6.5)
|
||||
libv8 (3.3.10.4)
|
||||
linecache19 (0.5.12)
|
||||
ruby_core_source (>= 0.1.4)
|
||||
mail (2.3.0)
|
||||
|
@ -179,6 +180,8 @@ GEM
|
|||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
subexec (0.2.1)
|
||||
therubyracer (0.9.9)
|
||||
libv8 (~> 3.3.10)
|
||||
thor (0.14.6)
|
||||
tilt (1.3.3)
|
||||
tinymce-rails (3.4.8)
|
||||
|
@ -234,6 +237,7 @@ DEPENDENCIES
|
|||
sinatra
|
||||
spork
|
||||
sprockets
|
||||
therubyracer
|
||||
tinymce-rails
|
||||
uglifier
|
||||
watchr
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -1,104 +1,97 @@
|
|||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
windH=document.clientHeight;
|
||||
windW=document.clientWidht;
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '.language-menu li', function(){
|
||||
$(this).each(function(i){
|
||||
$(this).siblings().removeClass('active')
|
||||
$(this).addClass('active')
|
||||
})
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.orbit-bar-member', function(){
|
||||
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
||||
$('.bar-login .dropdown-menu').toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).click(function() {
|
||||
$('.orbit-bar-member').removeClass("open");
|
||||
$('.bar-login .dropdown-menu').hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
||||
e.stopPropagation();
|
||||
$('.bar-login .dropdown-menu').show();
|
||||
});
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
$(document).on('click', '.privacy', function() {
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.toggle-tr-edit', function() {
|
||||
$(this).parents('tr').next('.qe-block').removeClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('.qe-edit-div').addClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('#qe-' + $(this).attr('rel')).toggleClass('hide');
|
||||
});
|
||||
|
||||
$(document).on('click', '.sort-header > .sort', function() {
|
||||
$.getScript($(this).attr('rel'));
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
$('#main-sidebar').css("height", viewportheight-40);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-sidebar').tinyscrollbar();
|
||||
$('.detal-list').tinyscrollbar();
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-44)});
|
||||
|
||||
/*isotope*/
|
||||
var $container = $('#isotope');
|
||||
$container.isotope({
|
||||
itemSelector : '.item',
|
||||
layoutMode : 'masonry',
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$(window).resize(function(){
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
|
||||
$('#main-sidebar').css("height", viewportheight-30);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-30);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft)
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
|
||||
mainTablePosition()
|
||||
});
|
||||
/*main-table position*/
|
||||
function mainTablePosition() {
|
||||
var $height = $('#main-wrap > .subnav').height()
|
||||
var $table = $('#main-wrap > .table')
|
||||
//alert ($table.height())
|
||||
$table.stop().animate({marginTop:$height},500)
|
||||
//$table.css({marginTop : $height})
|
||||
}
|
||||
$(window).scroll(function () {
|
||||
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
|
||||
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
|
||||
var $winLeft = $(window).scrollLeft()
|
||||
$(".table-label").css({left:$winLeft*-1} );
|
||||
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
|
||||
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
|
||||
//console.log($mainWrapMarginLeft+($winLeft*-1)+5);
|
||||
});
|
||||
var viewportwidth,
|
||||
viewportheight;
|
||||
function resize() {
|
||||
viewportheight=$(window).height();
|
||||
viewportwidth=$(window).width();
|
||||
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
||||
windH=document.clientHeight;
|
||||
windW=document.clientWidht;
|
||||
}
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '.orbit-bar-member', function(){
|
||||
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
||||
$('.bar-login .dropdown-menu').toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).click(function() {
|
||||
$('.orbit-bar-member').removeClass("open");
|
||||
$('.bar-login .dropdown-menu').hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
||||
e.stopPropagation();
|
||||
$('.bar-login .dropdown-menu').show();
|
||||
});
|
||||
|
||||
$('.tip').tooltip({
|
||||
placement: "left"
|
||||
});
|
||||
|
||||
$(document).on('click', '.privacy', function() {
|
||||
switch ($(this).val()) {
|
||||
case 'true':
|
||||
$(this).parents('.controls').children('.select-role').slideUp(300);
|
||||
break;
|
||||
case 'false':
|
||||
$(this).parents('.controls').children('.select-role').slideDown(300);
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.toggle-tr-edit', function() {
|
||||
$(this).parents('tr').next('.qe-block').removeClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('.qe-edit-div').addClass('hide');
|
||||
$(this).parents('tr').next('.qe-block').find('#qe-' + $(this).attr('rel')).toggleClass('hide');
|
||||
});
|
||||
|
||||
$(document).on('click', '.sort-header > .sort', function() {
|
||||
$.getScript($(this).attr('rel'));
|
||||
});
|
||||
|
||||
/*tinyscrollbar&windows-Size*/
|
||||
resize();
|
||||
$('#main-sidebar').css("height", viewportheight-40);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-sidebar').tinyscrollbar();
|
||||
$('.detal-list').tinyscrollbar();
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-44)});
|
||||
|
||||
/*isotope*/
|
||||
var $container = $('#isotope');
|
||||
$container.isotope({
|
||||
itemSelector : '.item',
|
||||
layoutMode : 'masonry',
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
$(window).resize(function(){
|
||||
resize();
|
||||
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
|
||||
$('#main-sidebar').css("height", viewportheight-30);
|
||||
$('#main-sidebar .viewport').css("height", viewportheight-30);
|
||||
$('.post-title').css("width", viewportwidth-495);
|
||||
$('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft)
|
||||
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
|
||||
mainTablePosition()
|
||||
});
|
||||
/*main-table position*/
|
||||
function mainTablePosition() {
|
||||
var $height = $('#main-wrap > .subnav').height()
|
||||
var $table = $('#main-wrap > .table')
|
||||
//alert ($table.height())
|
||||
$table.stop().animate({marginTop:$height},500)
|
||||
//$table.css({marginTop : $height})
|
||||
}
|
||||
$(window).scroll(function () {
|
||||
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
|
||||
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
|
||||
var $winLeft = $(window).scrollLeft()
|
||||
$(".table-label").css({left:$winLeft*-1} );
|
||||
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
|
||||
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
|
||||
//console.log($mainWrapMarginLeft+($winLeft*-1)+5);
|
||||
});
|
||||
|
|
|
@ -2642,8 +2642,8 @@ button.btn.small, input[type="submit"].btn.small {
|
|||
color: #333333;
|
||||
}
|
||||
.pagination {
|
||||
height: 36px;
|
||||
margin: 18px 0;
|
||||
height: 36px;
|
||||
margin: 18px 0;
|
||||
}
|
||||
.pagination ul {
|
||||
display: inline-block;
|
||||
|
@ -2663,7 +2663,8 @@ button.btn.small, input[type="submit"].btn.small {
|
|||
.pagination li {
|
||||
display: inline;
|
||||
}
|
||||
.pagination a {
|
||||
|
||||
.pagination .page{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
|
@ -2671,6 +2672,28 @@ button.btn.small, input[type="submit"].btn.small {
|
|||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination a {
|
||||
float: left;
|
||||
}
|
||||
.pagination .next{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination .last{
|
||||
float: left;
|
||||
padding: 0 14px;
|
||||
line-height: 34px;
|
||||
text-decoration: none;
|
||||
border: 1px solid #ddd;
|
||||
border-left-width: 0;
|
||||
}
|
||||
.pagination .current{
|
||||
border-left-width: 1px;
|
||||
}
|
||||
.pagination a:hover, .pagination .active a {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,10 +26,10 @@
|
|||
</ul>
|
||||
</li>
|
||||
<% if user_signed_in? %>
|
||||
<li class="dropdown active clear">
|
||||
<li class="dropdown active">
|
||||
<a class="orbit-bar-account" href="#" data-toggle="dropdown">
|
||||
<!-- <img src="images/menber-pic.png" /> -->
|
||||
<%= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<img class="member-img" src="/assets/menber-pic.png" />
|
||||
<%#= image_tag current_user.avatar.thumb.url, :class => 'member-img' %>
|
||||
<span class="member-name"><%= current_user.name %></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu account-menu">
|
||||
|
@ -45,7 +45,7 @@
|
|||
<%= t(:desktop) %>
|
||||
</a>
|
||||
</li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + t(:logout), destroy_user_session_path %></li>
|
||||
<li><%= link_to content_tag(:i, nil, :class => 'icons-out') + ' ' + t(:logout), destroy_user_session_path %></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<form class="navbar-search span6" action="">
|
||||
<input class="search-query span4" type="text" placeholder="Search NCCU">
|
||||
<input class="search-query span4" type="text" placeholder="<%= t(:search_nccu) %>">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('users') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), panel_web_resource_back_end_web_links_path %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-member') + t('admin.member'), admin_users_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), nil %>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-link') + t('admin.link'), panel_web_resource_back_end_web_links_path %>
|
||||
<% end -%>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers(nil) do -%>
|
||||
|
|
|
@ -47,7 +47,7 @@ module PrototypeR4
|
|||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
# config.i18n.default_locale = :de
|
||||
config.i18n.default_locale = :en
|
||||
config.i18n.default_locale = :zh_tw
|
||||
|
||||
# JavaScript files you want as :defaults (application.js is always included).
|
||||
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
||||
|
|
|
@ -24,21 +24,21 @@ PrototypeR4::Application.configure do
|
|||
config.action_dispatch.best_standards_support = :builtin
|
||||
|
||||
|
||||
config.middleware.use ExceptionNotifier,
|
||||
:email_prefix => "[R4_error]",
|
||||
:sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||
:exception_recipients => %w{chris@rulingcom.com}
|
||||
# config.middleware.use ExceptionNotifier,
|
||||
# :email_prefix => "[R4_error]",
|
||||
# :sender_address => %{"notifier" <redmine@rulingcom.com>},
|
||||
# :exception_recipients => %w{chris@rulingcom.com}
|
||||
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = {
|
||||
:tls => true,
|
||||
:enable_starttls_auto => true,
|
||||
:address => "smtp.gmail.com",
|
||||
:port => '587',
|
||||
:domain => "smtp.gmail.com",
|
||||
:authentication => "plain",
|
||||
:user_name => "redmine@rulingcom.com",
|
||||
:password => "rulingredmine" }
|
||||
# config.action_mailer.delivery_method = :smtp
|
||||
# config.action_mailer.smtp_settings = {
|
||||
# :tls => true,
|
||||
# :enable_starttls_auto => true,
|
||||
# :address => "smtp.gmail.com",
|
||||
# :port => '587',
|
||||
# :domain => "smtp.gmail.com",
|
||||
# :authentication => "plain",
|
||||
# :user_name => "redmine@rulingcom.com",
|
||||
# :password => "rulingredmine" }
|
||||
|
||||
end
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ en:
|
|||
password: Password
|
||||
register: Register
|
||||
remember_me: Remember me
|
||||
search_nccu: Search NCCU
|
||||
show: Show
|
||||
submit: Submit
|
||||
sure?: Are you sure?
|
||||
|
|
|
@ -17,7 +17,7 @@ zh_tw:
|
|||
edit: 編輯
|
||||
email: 電子郵件
|
||||
enable: 啟用
|
||||
forget_password: 忘記密碼?
|
||||
forgot_password: 忘記密碼?
|
||||
help: 協助
|
||||
hide: 隱藏
|
||||
homepage: 首頁
|
||||
|
@ -25,10 +25,11 @@ zh_tw:
|
|||
logout: 登出
|
||||
no_: "No"
|
||||
nothing: 無
|
||||
or_lower: 或者
|
||||
or_lower: 或
|
||||
password: 密碼
|
||||
register: 註冊
|
||||
remember_me: 記住我
|
||||
search_nccu: 搜尋政大
|
||||
show: 顯示
|
||||
submit: 送出
|
||||
sure?: 您肯定嗎?
|
||||
|
|
|
@ -81,7 +81,7 @@ module ParserFrontEnd
|
|||
res << "<script type='text/javascript' src='/assets/orbit_bar.js'></script>"
|
||||
res << "<script type='text/javascript' src='/assets/event.js'></script>"
|
||||
page.design.javascripts.each do |js|
|
||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
# res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
res
|
||||
end
|
||||
|
|
|
@ -17,7 +17,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < ObitWidgetController
|
|||
@bulletins = Bulletin.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
end
|
||||
|
||||
get_categorys
|
||||
get_categorys
|
||||
|
||||
@current_category = BulletinCategory.from_id(params[:bulletin_category_id]) rescue nil
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -14,4 +14,8 @@ class BulletinCategory
|
|||
|
||||
has_many :bulletins
|
||||
|
||||
def self.from_id(id)
|
||||
BulletinCategory.find(id) rescue nil
|
||||
end
|
||||
|
||||
end
|
|
@ -2,7 +2,11 @@
|
|||
|
||||
<%= flash_messages %>
|
||||
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% if @current_category %>
|
||||
<h1 class="h1"><%= @current_category.i18n_variable[I18n.locale] + t('announcement.bulletin.list_lower') %></h1>
|
||||
<% else %>
|
||||
<h1 class="h1"><%= t('announcement.list_announcement') %></h1>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<li>
|
||||
<div class="news_img"><%= image_tag(post.image.url, :size => "290x130") if post.image.file %></div>
|
||||
<h3 class="h3 news_title"><%= link_to post.title[I18n.locale], panel_announcement_front_end_bulletin_path(post, :category_id => post.bulletin_category_id) %></h3>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale] %></p>
|
||||
<p class="news_wrap"><%= post.subtitle[I18n.locale].html_safe %></p>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -14,7 +14,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
|||
|
||||
# @web_link = WebLink.where( :is_hidden => false ).desc(:is_top, :name).first
|
||||
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
|
||||
# get_categorys
|
||||
|
||||
|
@ -24,7 +24,7 @@ class Panel::WebResource::Widget::WebLinksController < ObitWidgetController
|
|||
end
|
||||
|
||||
def reload_web_links
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(9)
|
||||
@web_links = WebLink.widget_datas.page(params[:page]).per(5)
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue