blob: 9bf0a0a69a1169d178eabdfe22394e82fc136d92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
<!DOCTYPE HTML>
<html i18n-values="dir:textdirection;" id="t">
<head>
<meta charset="utf-8">
<title i18n-content="title"></title>
<!-- TODO(zelidrag) need a better icon here -->
<link rel="icon" href="../../app/theme/history_favicon.png">
<script src="chrome://resources/js/class_list.js"></script>
<script src="chrome://resources/js/cr.js"></script>
<script src="chrome://resources/js/cr/event_target.js"></script>
<script src="chrome://resources/js/cr/ui.js"></script>
<script src="chrome://resources/js/local_strings.js"></script>
<script src="chrome://resources/js/util.js"></script>
<script src="options/preferences.js"></script>
<script src="options/pref_ui.js"></script>
<script src="options/options_page.js"></script>
<if expr="pp_ifdef('chromeos')">
<script src="options/chromeos_system_options.js"></script>
</if>
<script src="options/advanced_options.js"></script>
<script src="options/browser_options.js"></script>
<script src="options/personal_options.js"></script>
<script>
///////////////////////////////////////////////////////////////////////////////
// Document Functions:
/**
* Window onload handler, sets up the page.
*/
function load() {
localStrings = new LocalStrings();
if (cr.isChromeOS) {
OptionsPage.register(SystemOptions.getInstance());
}
OptionsPage.register(BrowserOptions.getInstance());
OptionsPage.register(PersonalOptions.getInstance());
OptionsPage.register(AdvancedOptions.getInstance());
if (cr.isChromeOS) {
var labsOptions = new OptionsPage('labs',
localStrings.getString('labsPage'),
'labsPage');
OptionsPage.register(labsOptions);
}
var syncSettings = new OptionsPage('sync',
localStrings.getString('syncPage'),
'syncPage');
OptionsPage.registerSubPage(syncSettings);
var dummyPage = new OptionsPage('dummy', 'Overlay Test Page', 'dummyPage');
OptionsPage.registerOverlay(dummyPage);
Preferences.getInstance().initialize();
if (cr.isChromeOS) {
OptionsPage.showPageByName(SystemOptions.getInstance().name);
} else {
OptionsPage.showPageByName(BrowserOptions.getInstance().name);
}
}
document.addEventListener('DOMContentLoaded', load);
window.onpopstate = function(e) {
OptionsPage.setState(e.state);
};
</script>
<link rel="stylesheet" href="dom_ui.css">
<link rel="stylesheet" href="options/options_page.css">
</head>
<body i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
<div class="header">
</div>
<div id="overlay" class="hidden">
<div id="overlayview">
<button id="close-overlay" onclick="OptionsPage.clearOverlays();"></button>
<div class="page hidden" id="dummyPage">
<!-- TODO(dhg): remove this one once we get another page here -->
Dummy Overlay Page
</div>
</div>
</div>
<div id="main-content">
<div id="navbar-container">
<h1 id="settings-title" i18n-content="title"></h1>
<ul id="navbar">
</ul>
<hr/>
<ul id="subpagesnav">
</ul>
</div>
<div id="mainview">
<if expr="pp_ifdef('chromeos')">
<include src="options/chromeos_system_options.html">
<include src="options/chromeos_labs.html">
<include src="options/sync_options.html" >
</if>
<include src="options/browser_options.html">
<include src="options/personal_options.html">
<include src="options/advanced_options.html">
</div>
</div>
<script>
// Decorate the existing elements in the document.
cr.ui.decorate('input[pref][type=checkbox]', PrefCheckbox);
cr.ui.decorate('input[pref][type=range]', PrefRange);
cr.ui.decorate('select[pref]', PrefSelect);
// TODO(zelidrag) add other elements here when we implement them
</script>
</body>
</html>
|