From 96b27267631d8b0c1a1d593d7ddcd02ab420c28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Thu, 9 Mar 2017 23:45:10 +0000 Subject: [PATCH] full screen in handy, swipe down to go back --- ax_init_standard_project.m4 | 6 +++ bootstrap.sh | 61 ++++++++++++++++++++++++--- configure.ac | 3 +- html/gallery.js | 82 +++++++++++++++++++++++++++++++------ html/index.php | 42 +++++++++++++++---- html/jquery.js | 4 -- html/jquery.migrate.js | 2 - html/jquery.mobile.css | 3 -- html/jquery.mobile.js | 10 ----- html/makefile.am | 25 +++++++++-- html/package.json.in | 25 +++++++++++ html/style.css | 29 ++++++++++++- 12 files changed, 239 insertions(+), 53 deletions(-) delete mode 100644 html/jquery.js delete mode 100644 html/jquery.migrate.js delete mode 100644 html/jquery.mobile.css delete mode 100644 html/jquery.mobile.js create mode 100644 html/package.json.in diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index b54f205..ebe8831 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -500,6 +500,12 @@ maintainer-clean-html-targets: EOF ]) +# use this in configure.ac to support HTML data for webservers +AC_DEFUN([AX_BUILD_HTML_NPM], [ + AC_CONFIG_FILES([html/package.json]) + AX_BUILD_HTML +]) + # use this in configure.ac to support C++ libraries AC_DEFUN([AX_USE_LIBTOOL], [ # libtool versioning diff --git a/bootstrap.sh b/bootstrap.sh index cdf1165..5c3adb2 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -148,7 +148,8 @@ GENERATED FILES * src/version.hxx - if you enabled AX_USE_CXX * src/version.cxx - if you enabled AX_USE_CXX * etc/makefile.am - if you enable AX_USE_ETC - * html/makefile.am - if you enabled AX_BUILD_HTML + * html/makefile.am - if you enabled AX_BUILD_HTML or AX_BUILD_HTML_NPM + * html/package.json.in - if you enabled AX_BUILD_HTML_NPM * scripts/makefile.am - if you enabled AX_USE_SCRIPTS * nodejs/makefile.am - if you add AX_USE_NODEJS * nodejs/${DEFAULT_PROJECT_NAME}.js - if you add AX_USE_NODEJS @@ -223,7 +224,7 @@ FILE DEPENDENCIES configuration a dependent, i.e.: * test/makefile.am depends on AX_USE_LIBTOOL - * html/makefile.am depends on AX_BUILD_HTML + * html/makefile.am depends on AX_BUILD_HTML or AX_BUILD_HTML_NPM * doc/doxyfile.in depends on AX_BUILD_EXAMPLES * debian/control.in depends on AX_USE_DOXYGEN, AX_USE_PERLDOC, AX_USE_CPPUNIT AX_CXX_QT, AX_CHECK_QT, AX_REQUIRE_QT, AX_USE_LIBTOOL @@ -583,6 +584,7 @@ AX_INIT_STANDARD_PROJECT #AX_BUILD_TEST #AX_BUILD_EXAMPLES #AX_BUILD_HTML +#AX_BUILD_HTML_NPM # qt features, uncomment, what you need: #AX_CHECK_QT([QT], [QtCore QtGui QtNetwork], [QtWidgets]) @@ -1280,11 +1282,60 @@ LDADD = -l${PACKAGE_NAME#lib} MAINTAINERCLEANFILES = makefile.in EOF -to --condition AX_BUILD_HTML html/makefile.am < 10) { + event.preventDefault(); + } + } + $this + .bind(touchMoveEvent, moveHandler) + .one(touchStopEvent, function(event) { + $this.unbind(touchMoveEvent, moveHandler); + if (start && stop) { + if (stop.time - start.time < 1000 && + Math.abs(start.coords[1] - stop.coords[1]) > 60 && + Math.abs(start.coords[0] - stop.coords[0]) < 20) { + start.origin + .trigger("swipeupdown") + .trigger(start.coords[1] > stop.coords[1] ? "swipeup" : "swipedown"); + } + } + start = stop = undefined; + }); + }); + } + }; + $.each({ + swipedown: "swipeupdown", + swipeup: "swipeupdown" + }, function(event, sourceEvent){ + $.event.special[event] = { + setup: function(){ + $(this).bind(sourceEvent, $.noop); + } + }; + }); + +})(); diff --git a/html/index.php b/html/index.php index f639096..78d91aa 100644 --- a/html/index.php +++ b/html/index.php @@ -162,10 +162,10 @@ function linkorselect($link, $img, $filename) { } } -function pageheader($arrows=NULL) { +function pageheader($arrows=NULL, $class="") { global $username, $subpath; ?> -