首页的一些优化

dev_partners
jingquan huang 6 years ago
parent 978fbf47e5
commit 085e1ec44d

@ -3990,7 +3990,7 @@ module ApplicationHelper
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application', 'jquery.colorbox-min', 'baiduTemplate')
tags = javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'jquery.colorbox-min', 'baiduTemplate')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
@ -4004,6 +4004,15 @@ module ApplicationHelper
tags
end
# 临时本地版
def javascript_heads_local
tags = javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'jquery.colorbox-min')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
tags
end
def hubspot_head
tags = javascript_include_tag('hubspot/messenger.min', 'hubspot/messenger-theme-future')
tags << stylesheet_link_tag('hubspot/messenger', 'hubspot/messenger-theme-future', 'hubspot/messenger-theme-flat')

@ -7,25 +7,23 @@
<meta name="keywords" content="智能课堂,实训项目" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/font-awesome','educoder/edu-main','educoder/edu-all','/assets/iconfont/iconfont.css', :media => 'all' %>
<%= stylesheet_link_tag 'css/font-awesome','educoder/edu-main','educoder/edu-all','/assets/iconfont/iconfont.css', :media => 'all' %>
</head>
<body onload="prettyPrint();">
<div class="newContainer"> <!-- 页面全部内容 -->
<div class="newHeader" id="nHeader"> <!-- 头部 -->
<div class="newContainer">
<div class="newHeader" id="nHeader">
<%= render :partial => 'layouts/logined_header' %>
<div class="cl"></div>
</div>
<div class="newMain clearfix"> <!-- 主提部分 -->
<div class="newMain clearfix">
<div id="Container">
<%= yield %>
</div>
<div class="cl"></div>
<!-------------------侧边提示区域-------------------------->
<%= render :partial => 'users/returnTop_btn' %>
</div>
<!----------------------左侧导航栏 ------------------------->
<%#= render :partial => 'layouts/public_left_info' %>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
@ -37,5 +35,6 @@
</div>
</div>
</body>
<%= javascript_include_tag 'educoder/edu_application','educoder/edu_account',"educoder/edu_user" %>
<%= javascript_heads_local %>
<%= javascript_include_tag 'edu/application', 'educoder/edu_application',"educoder/edu_user" %>
</html>
Loading…
Cancel
Save