help designer to push code

This commit is contained in:
nccu 2015-02-25 11:41:53 +08:00
parent f41f128154
commit 95da400843
4 changed files with 17 additions and 28 deletions

View File

@ -2,7 +2,15 @@
// Init functions
function init() {
function checkAdBannerAlt() {
$( ".widget-adBanner .slide-img > img" ).each( function(){
if( $(this).attr( "alt" ) === "" ) {
$(this).attr( "alt", "AD Banner Image" );
}
});
}
// Add link and cursor class name on element that has data-link attribute
function addLinkOnADBanner( els ) {
$.each( els, function() {
@ -164,7 +172,7 @@
removeSignUpItem();
addClassOnLastMenuItem();
addLinkOnADBanner( $(".cycle-slideshow > .slide-img") );
checkAdBannerAlt();
}
$(document).ready(function($) {

View File

@ -15,7 +15,7 @@
data-overlay-template="<h2>{{title}}</h2>{{desc}}"
data-target="{{target}}"
>
<img src="{{image_link}}">
<img src="{{image_link}}" alt="{{title}}">
</div>
</div>
<div class="widget-adBanner-overlay">

View File

@ -15,7 +15,7 @@
data-overlay-template="<h2>{{title}}</h2>{{desc}}"
data-target="{{target}}"
>
<img src="{{image_link}}">
<img src="{{image_link}}" alt="{{title}}">
</div>
</div>
<div class="widget-adBanner-overlay2">

View File

@ -37,7 +37,7 @@
<i class="icons-list-2"></i>
</label>
<h2 class="orbit-bar-title">
<a href="/">Orbit</a>
<a href="/">NCCU</a>
</h2>
<ul class="orbit-bar-menu">
<li>
@ -112,11 +112,11 @@
<ul>
<% @site_in_use_locales.each do |l| %>
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
<a href="<%= switch_language(l) %>" data-toggle="modal" ><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
</li>
<% if current_site.enable_zh_cn and l == :zh_tw and !request.path.include?("/admin/") %>
<li class="<%= locale==:zh_cn ? "active" : "" %>">
<a href="<%= switch_language(:zh_cn) %>" data-toggle="modal" ><%= t(:zh_cn, :locale => :zh_tw) %></a>
<a href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
</li>
<% end %>
<% end %>
@ -127,7 +127,6 @@
<li>
<span id="user"><%= current_user.member_profile.name.nil? ? current_user.user_name : current_user.member_profile.name %></span>
<ul>
<li><%= link_to content_tag(:i, nil, class: 'icons-tools') + ' ' + t("users.change_passwd"),admin_member_edit_passwd_path(current_user.member_profile.to_param), tabindex: '-1' %></li>
<li><%= link_to content_tag(:i, nil, class: 'icons-vcard') + ' ' + t("users.user_basic_data"),admin_member_path(current_user.member_profile.to_param), tabindex: '-1' %></li>
<li>
<a href="/logout"><i class="icons-logout"></i><%= t(:logout) %></a>
@ -144,28 +143,10 @@
</ul>
</div>
</div>
<% if params[:controller] == "pages" %>
<div class="modal fade" id="language_alert">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">We are sorry.</h4>
</div>
<div class="modal-body">
<p>This page is not available in this language.</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<% end %>
<script type="text/javascript">
<script type="text/javascript">
$("#open-orbit-login").on("change",function(){
if($(this).is(":checked")){
$("#user_user_id").focus();
}
})
</script>
</script>