Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 67d4ca1

Browse files
committed
updated WinJS
1 parent 14f583f commit 67d4ca1

File tree

8 files changed

+69226
-65987
lines changed

8 files changed

+69226
-65987
lines changed

apache-cordova/www/css/ui-dark.css

+2,226-1,842
Large diffs are not rendered by default.

apache-cordova/www/css/ui-light.css

+2,229-1,845
Large diffs are not rendered by default.

apache-cordova/www/fonts/Symbols.ttf

-9.87 KB
Binary file not shown.

apache-cordova/www/index.html

+114-47
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,132 @@
11
<!DOCTYPE html>
22
<html>
3-
<head>
4-
<meta charset="utf-8" />
5-
3+
<head>
4+
<meta charset="utf-8">
5+
66
<meta name="format-detection" content="telephone=no" />
77

88
<meta name="msapplication-tap-highlight" content="no" />
99

10-
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
11-
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
12-
10+
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
11+
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
12+
1313
<link href="images/readium_favicon.png" rel="shortcut icon"/>
14-
<!-- link href="images/readium-touch-icon.png" rel="apple-touch-icon"/ -->
15-
16-
<title>Readium</title>
17-
18-
<!-- link rel="stylesheet" type="text/css" href="css/ui-dark.css" / -->
19-
20-
<!-- script type="text/javascript" src="cordova.js"></script -->
21-
22-
<!-- script type="text/javascript" src="js/WinJS.js"></script -->
23-
14+
<link href="images/readium-touch-icon.png" rel="apple-touch-icon"/>
15+
16+
<style>
17+
.library-item{
18+
height: 100px;
19+
20+
}
21+
22+
body:not(.list-view) .library-item .no-cover{
23+
width: 300px;
24+
height: 400px;
25+
font-size: 40px;
26+
}
27+
</style>
28+
29+
<link rel="stylesheet" type="text/css" href="css/readium-all.css">
30+
2431
<script type="text/javascript" src="js/winstore-jscompat.js"></script>
2532

26-
<!-- script type="text/javascript" src="js/index.js"></script -->
27-
28-
<style>
29-
.library-item{
30-
height: 100px;
33+
<script type="text/javascript" src="scripts/readium-js-viewer_all.js"> </script>
3134

32-
}
33-
34-
body:not(.list-view) .library-item .no-cover{
35-
width: 300px;
36-
height: 400px;
37-
font-size: 40px;
38-
}
39-
</style>
40-
35+
<script type="text/javascript">
4136

42-
<!-- link rel="stylesheet" type="text/css" href="css/sourcesanspro.css">
43-
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
44-
<link rel="stylesheet" type="text/css" href="css/bootstrap-accessibility.css">
45-
<link rel="stylesheet" type="text/css" href="css/readium_js.css">
46-
<link rel="stylesheet" type="text/css" href="css/viewer.css">
47-
<link rel="stylesheet" type="text/css" href="css/viewer_audio.css">
48-
<link rel="stylesheet" type="text/css" href="css/settings.css">
49-
<link rel="stylesheet" type="text/css" href="css/library.css" -->
50-
51-
<!-- script data-main="../lib/ReadiumViewer.js" src="./lib/require.js" type="text/javascript"></script>
52-
<script src="require_config.js" type="text/javascript"></script>
37+
var HTMLFILENAME = "index.html";
38+
39+
var HTTPServerRootFolder =
40+
window.location ? (
41+
window.location.protocol
42+
+ "//"
43+
+ window.location.hostname
44+
+ (window.location.port ? (':' + window.location.port) : '')
45+
+ (window.location.pathname ?
46+
(
47+
(
48+
window.location.pathname.indexOf(HTMLFILENAME) == (window.location.pathname.length - HTMLFILENAME.length)
49+
? window.location.pathname.substr(0, window.location.pathname.length - HTMLFILENAME.length - 1)
50+
: (
51+
window.location.pathname.charAt(window.location.pathname.length-1) == '/'
52+
? window.location.pathname.substr(0, window.location.pathname.length-1)
53+
: window.location.pathname
54+
)
55+
)
56+
57+
)
58+
: '')
59+
) : ''
60+
;
61+
62+
console.log(HTTPServerRootFolder);
63+
64+
65+
66+
var getURLQueryParams = function() {
67+
var params = {};
68+
69+
var query = window.location.search;
70+
if (query && query.length) {
71+
query = query.substring(1);
72+
var keyParams = query.split('&');
73+
for (var x = 0; x < keyParams.length; x++)
74+
{
75+
var keyVal = keyParams[x].split('=');
76+
if (keyVal.length > 1) {
77+
params[keyVal[0]] = decodeURIComponent(keyVal[1]);
78+
}
79+
}
80+
}
81+
82+
return params;
83+
};
84+
85+
var urlParams = getURLQueryParams();
86+
console.log(urlParams);
87+
88+
89+
90+
// MUST BE *SINGLE* CALL TO require.config() FOR ALMOND (SINGLE BUNDLE) TO WORK CORRECTLY!!!
91+
require.config({
92+
/* http://requirejs.org/docs/api.html#config-waitSeconds */
93+
waitSeconds: 0,
94+
95+
config : {
96+
97+
'readium_js_viewer/ModuleConfig' : {
98+
99+
'mathJaxUrl': HTTPServerRootFolder + '/scripts/mathjax/MathJax.js',
100+
101+
'annotationCSSUrl': HTTPServerRootFolder + '/css/annotations.css',
102+
103+
'jsLibRoot': HTTPServerRootFolder + '/scripts/zip/',
104+
105+
'useSimpleLoader' : false, // cloud reader (strictly-speaking, this config option is false by default, but we prefer to have it explicitly set here).
106+
107+
'epubLibraryPath': urlParams['epubs'] ? urlParams['epubs'] : undefined, // defaults to /epub_content/epub_library.json relative to the application's root index.html
108+
109+
'imagePathPrefix': undefined,
110+
111+
'canHandleUrl' : false,
112+
'canHandleDirectory' : false,
113+
114+
115+
'workerUrl': undefined,
116+
'epubReadingSystemUrl': undefined
117+
}
118+
}
119+
});
120+
</script>
53121

54-
<script src="extend_require_config.js" type="text/javascript"></script -->
55-
56-
<link rel="stylesheet" type="text/css" href="css/readium-all.css">
57-
<script src="scripts/readium-all.js" type="text/javascript"></script>
58122
</head>
59-
<body class="chrome-app">
123+
124+
<!-- This is all application-specific HTML -->
125+
<body>
60126
<nav id="app-navbar" class="navbar" role="banner" aria-label="{{Strings.i18n_toolbar}}">
61127
</nav>
62128
<div id="app-container">
63129
</div>
64130
</body>
65-
</html>
131+
132+
</html>

0 commit comments

Comments
 (0)