mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
update jquery; include jquery from google cdn
This commit is contained in:
parent
1d42f31fee
commit
8ba0ce3e25
21
3rdparty/jQuery/MIT-LICENSE.txt
vendored
Normal file
21
3rdparty/jQuery/MIT-LICENSE.txt
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Copyright 2013 jQuery Foundation and other contributors
|
||||||
|
http://jquery.com/
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
a copy of this software and associated documentation files (the
|
||||||
|
"Software"), to deal in the Software without restriction, including
|
||||||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
|
permit persons to whom the Software is furnished to do so, subject to
|
||||||
|
the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be
|
||||||
|
included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||||
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||||
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
5
3rdparty/jQuery/jquery-1.9.1.min.js
vendored
Normal file
5
3rdparty/jQuery/jquery-1.9.1.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -241,9 +241,9 @@ add_custom_command(OUTPUT ${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js
|
|||||||
install (TARGETS pdf2htmlEX DESTINATION bin)
|
install (TARGETS pdf2htmlEX DESTINATION bin)
|
||||||
|
|
||||||
set(PDF2HTMLEX_RESOURCE
|
set(PDF2HTMLEX_RESOURCE
|
||||||
|
${CMAKE_SOURCE_DIR}/3rdparty/jQuery/jquery-1.9.1.min.js
|
||||||
${CMAKE_SOURCE_DIR}/share/base.css
|
${CMAKE_SOURCE_DIR}/share/base.css
|
||||||
${CMAKE_SOURCE_DIR}/share/fancy.css
|
${CMAKE_SOURCE_DIR}/share/fancy.css
|
||||||
${CMAKE_SOURCE_DIR}/share/jquery.js
|
|
||||||
${CMAKE_SOURCE_DIR}/share/LICENSE
|
${CMAKE_SOURCE_DIR}/share/LICENSE
|
||||||
${CMAKE_SOURCE_DIR}/share/manifest
|
${CMAKE_SOURCE_DIR}/share/manifest
|
||||||
${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js
|
${CMAKE_SOURCE_DIR}/share/pdf2htmlEX.js
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
Developing v0.11
|
Developing v0.11
|
||||||
|
|
||||||
* Compress JS with closure-compiler
|
* Compress JS with closure-compiler
|
||||||
|
* Link to jQuery from Google CDN by default
|
||||||
|
|
||||||
v0.10
|
v0.10
|
||||||
2013.10.17
|
2013.10.17
|
||||||
|
2
TODO
2
TODO
@ -1,6 +1,4 @@
|
|||||||
annot for closure-compiler:https://developers.google.com/closure/compiler/docs/js-for-compiler#generics
|
annot for closure-compiler:https://developers.google.com/closure/compiler/docs/js-for-compiler#generics
|
||||||
update jquery -> CDN
|
|
||||||
remove default type declaration: text/javascript text/css
|
|
||||||
minimize css
|
minimize css
|
||||||
pdf:mobile device
|
pdf:mobile device
|
||||||
pdf:miui
|
pdf:miui
|
||||||
|
2
share/jquery.js
vendored
2
share/jquery.js
vendored
File diff suppressed because one or more lines are too long
@ -7,13 +7,14 @@
|
|||||||
|
|
||||||
|
|
||||||
BASEDIR=$(dirname $0)
|
BASEDIR=$(dirname $0)
|
||||||
|
CLOSURE_COMPILER_DIR="$BASEDIR/../../3rdparty/closure-compiler"
|
||||||
OUTPUT="$BASEDIR/../pdf2htmlEX.js"
|
OUTPUT="$BASEDIR/../pdf2htmlEX.js"
|
||||||
|
|
||||||
(echo 'Building pdf2htmlEX.js with closure-compiler...' && \
|
(echo 'Building pdf2htmlEX.js with closure-compiler...' && \
|
||||||
java -jar "$BASEDIR/../../3rdparty/closure-compiler/compiler.jar" \
|
java -jar "$CLOSURE_COMPILER_DIR/compiler.jar" \
|
||||||
--compilation_level ADVANCED_OPTIMIZATIONS \
|
--compilation_level ADVANCED_OPTIMIZATIONS \
|
||||||
--process_jquery_primitives \
|
--process_jquery_primitives \
|
||||||
--externs "$BASEDIR/../jquery.js" \
|
--externs "$CLOSURE_COMPILER_DIR/jquery-1.9.js" \
|
||||||
--js "$BASEDIR/header.js" \
|
--js "$BASEDIR/header.js" \
|
||||||
--js "$BASEDIR/css_class_names.js" \
|
--js "$BASEDIR/css_class_names.js" \
|
||||||
--js "$BASEDIR/viewer.js" \
|
--js "$BASEDIR/viewer.js" \
|
||||||
|
@ -169,6 +169,9 @@
|
|||||||
|
|
||||||
/* export pdf2htmlEX.Viewer */
|
/* export pdf2htmlEX.Viewer */
|
||||||
var Viewer = pdf2htmlEX['Viewer'] = function(config) {
|
var Viewer = pdf2htmlEX['Viewer'] = function(config) {
|
||||||
|
/* do nothing if jQuery is not ready */
|
||||||
|
if(!window.jQuery) return;
|
||||||
|
|
||||||
this.config = $.extend({}, DEFAULT_CONFIG, config);
|
this.config = $.extend({}, DEFAULT_CONFIG, config);
|
||||||
this.pages_loading = {};
|
this.pages_loading = {};
|
||||||
this.init_before_loading_content();
|
this.init_before_loading_content();
|
||||||
|
@ -36,14 +36,28 @@ $css
|
|||||||
|
|
||||||
#############
|
#############
|
||||||
# UI stuffs, optional
|
# UI stuffs, optional
|
||||||
# It'll be better to include a static jquery.js on your server
|
|
||||||
@jquery.js
|
# jQuery, required by pdf2htmlEX.js
|
||||||
@pdf2htmlEX.js
|
# By default
|
||||||
# entry point
|
# - the file from Google CDN is included, in order to reduce the size of output HTML
|
||||||
|
# - HTTP is always used in case the file is accessed locally
|
||||||
|
#
|
||||||
|
# You may embed the file (provided in pdf2htmlEX) into HTML:
|
||||||
|
# @jquery-1.9.1.min.js
|
||||||
|
#
|
||||||
|
# Or you may remove "http:" to match the protocol of the published HTML:
|
||||||
|
# <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
#
|
||||||
|
"""
|
||||||
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||||
|
"""
|
||||||
|
|
||||||
|
# entry point of pdf2htmlEX.Viewer
|
||||||
# You can override default configuration by passing an object to the constructor of Viewer
|
# You can override default configuration by passing an object to the constructor of Viewer
|
||||||
# Refer to DEFAULT_CONFIG in viewer.js for possible keys
|
# Refer to DEFAULT_CONFIG in viewer.js for possible keys
|
||||||
|
@pdf2htmlEX.js
|
||||||
"""
|
"""
|
||||||
<script type="text/javascript">
|
<script>
|
||||||
try{
|
try{
|
||||||
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer();
|
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer();
|
||||||
}catch(e){}
|
}catch(e){}
|
||||||
|
@ -26,12 +26,12 @@ const std::map<std::string, EmbedStringEntry> EMBED_STRING_MAP({
|
|||||||
{".css", {&Param::embed_css,
|
{".css", {&Param::embed_css,
|
||||||
"<style type=\"text/css\">",
|
"<style type=\"text/css\">",
|
||||||
"</style>", false,
|
"</style>", false,
|
||||||
"<link rel=\"stylesheet\" type=\"text/css\" href=\"",
|
"<link rel=\"stylesheet\" href=\"",
|
||||||
"\"/>" }},
|
"\"/>" }},
|
||||||
{".js", {&Param::embed_javascript,
|
{".js", {&Param::embed_javascript,
|
||||||
"<script type=\"text/javascript\">",
|
"<script>",
|
||||||
"</script>", false,
|
"</script>", false,
|
||||||
"<script type=\"text/javascript\" src=\"",
|
"<script src=\"",
|
||||||
"\"></script>" }},
|
"\"></script>" }},
|
||||||
{".png", {&Param::embed_image,
|
{".png", {&Param::embed_image,
|
||||||
"<img alt=\"\" src=\"data:image/png;base64,",
|
"<img alt=\"\" src=\"data:image/png;base64,",
|
||||||
|
Loading…
Reference in New Issue
Block a user