首页的一些优化

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 # Returns the javascript tags that are included in the html layout head
def javascript_heads 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' 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)}'); });") tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end end
@ -4004,6 +4004,15 @@ module ApplicationHelper
tags tags
end 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 def hubspot_head
tags = javascript_include_tag('hubspot/messenger.min', 'hubspot/messenger-theme-future') 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') tags << stylesheet_link_tag('hubspot/messenger', 'hubspot/messenger-theme-future', 'hubspot/messenger-theme-flat')

@ -7,25 +7,23 @@
<meta name="keywords" content="智能课堂,实训项目" /> <meta name="keywords" content="智能课堂,实训项目" />
<%= csrf_meta_tag %> <%= csrf_meta_tag %>
<%= favicon %> <%= 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> </head>
<body onload="prettyPrint();"> <body onload="prettyPrint();">
<div class="newContainer"> <!-- 页面全部内容 --> <div class="newContainer">
<div class="newHeader" id="nHeader"> <!-- 头部 --> <div class="newHeader" id="nHeader">
<%= render :partial => 'layouts/logined_header' %> <%= render :partial => 'layouts/logined_header' %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<div class="newMain clearfix"> <!-- 主提部分 --> <div class="newMain clearfix">
<div id="Container"> <div id="Container">
<%= yield %> <%= yield %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>
<!-------------------侧边提示区域-------------------------->
<%= render :partial => 'users/returnTop_btn' %> <%= render :partial => 'users/returnTop_btn' %>
</div> </div>
<!----------------------左侧导航栏 ------------------------->
<%#= render :partial => 'layouts/public_left_info' %>
<%= render :partial => 'layouts/footer' %> <%= render :partial => 'layouts/footer' %>
<div class="cl"></div> <div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div> <div id="ajax-modal" style="display:none;"></div>
@ -37,5 +35,6 @@
</div> </div>
</div> </div>
</body> </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> </html>
Loading…
Cancel
Save