# _script_loader.html
其文件路径为:horizon\horizon\templates\horizon\client_side\_script_loader.html。将它复制到我们的主题目录中:horizon\openstack_dashboard\themes\maintenance\templates\horizon\client_side\_script_loader.html。它里面的代码为:
~~~
<script type="text/javascript" charset="utf-8">
/*
Added so that we can append Horizon scoped JS events to
the DOM load events without running in to the "horizon"
name-space not currently being defined since we load the
scripts at the bottom of the page.
*/
var addHorizonLoadEvent = function(func) {
var old_onload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
old_onload();
func();
}
}
}
</script>
~~~
这里面的代码,我们不需要动的,所以这个文件也不需要放进我们的主题中,直接用默认的就行了。
- 1.概述
- 2.CSS样式引入
- 2.1 My Themes
- 2.2 Horizon
- 2.3 Angular
- 2.4 HORIZON_CONFIG.scss_files
- 2.5 Custom Styles
- 3. JS文件引入
- 31. iframe_embed_settings 标签
- 3.2 horizon/_conf.html
- 3.3 _script_loader.html
- 3.4 _custom_head_js.html
- 3.5 horizon/_scripts.html
- 4. 主题替换
- 4.1 ACE主题
- 4.2 引入ACE主题的CSS样式
- 4.3 引入ACE主题的JS文件
- 4.4 收集和压缩
- 4.5 总结
- 4.6 错误与冲突收集
- 5.错误修正
- 6.openstack里所有功能浏览
- 7.前端hightchart.js分析
- 8.命令使用