From 705f1cf309d6f9bbf6d584066440db3200580571 Mon Sep 17 00:00:00 2001 From: Nikolaus Krismer <niko@krismer.de> Date: Wed, 16 Apr 2014 15:11:17 +0200 Subject: [PATCH] removed files that have been moved to isochrone-web project --- src/main/webapp/META-INF/MANIFEST.MF | 2 - src/main/webapp/WEB-INF/web.xml | 4 - src/main/webapp/css/geosearch.css | 232 -- src/main/webapp/css/isomap.css | 64 - .../webapp/css/jquery-ui-timepicker-addon.css | 11 - src/main/webapp/img/geosearch.png | Bin 1338 -> 0 bytes src/main/webapp/img/help_filled.png | Bin 618 -> 0 bytes src/main/webapp/img/icon-isochrone.png | Bin 7422 -> 0 bytes src/main/webapp/img/settings.png | Bin 2010 -> 0 bytes src/main/webapp/img/start_calculation.png | Bin 5901 -> 0 bytes src/main/webapp/img/warning.png | Bin 1788 -> 0 bytes src/main/webapp/index.html | 60 - src/main/webapp/js/app.js | 52 - src/main/webapp/js/guidelines.txt | 24 - src/main/webapp/js/isochrone/configuration.js | 81 - src/main/webapp/js/isochrone/initHelper.js | 76 - src/main/webapp/js/isochrone/isoMap.js | 310 --- src/main/webapp/js/isochrone/isochrone.js | 167 -- .../webapp/js/isochrone/searchExtender.js | 353 --- src/main/webapp/js/lib/console.js | 52 - .../js/lib/jquery-ui-timepicker-addon.js | 2145 ----------------- src/main/webapp/js/lib/require.js | 36 - src/main/webapp/js/map/control/geosearch.js | 411 ---- .../js/map/control/geosearchProvider/osm.js | 99 - src/main/webapp/js/map/control/help.js | 25 - src/main/webapp/js/map/control/settings.js | 25 - src/main/webapp/js/map/control/wswarning.js | 19 - src/main/webapp/js/map/ipLocator/ipLocator.js | 53 - .../webapp/js/map/ipLocator/ipProvider.js | 59 - .../webapp/js/map/ipLocator/mapIncluder.js | 49 - src/main/webapp/js/map/layer/bing.js | 125 - src/main/webapp/js/map/layer/google.js | 200 -- .../webapp/js/service/serviceConfiguration.js | 90 - .../webapp/js/service/serviceIsochrone.js | 116 - src/main/webapp/js/service/websocket.js | 135 -- src/main/webapp/js/util/geoUtils.js | 41 - src/main/webapp/js/util/stringUtils.js | 42 - src/main/webapp/js/versions.txt | 8 - 38 files changed, 5166 deletions(-) delete mode 100644 src/main/webapp/META-INF/MANIFEST.MF delete mode 100644 src/main/webapp/WEB-INF/web.xml delete mode 100644 src/main/webapp/css/geosearch.css delete mode 100644 src/main/webapp/css/isomap.css delete mode 100644 src/main/webapp/css/jquery-ui-timepicker-addon.css delete mode 100644 src/main/webapp/img/geosearch.png delete mode 100644 src/main/webapp/img/help_filled.png delete mode 100644 src/main/webapp/img/icon-isochrone.png delete mode 100644 src/main/webapp/img/settings.png delete mode 100644 src/main/webapp/img/start_calculation.png delete mode 100644 src/main/webapp/img/warning.png delete mode 100644 src/main/webapp/index.html delete mode 100644 src/main/webapp/js/app.js delete mode 100644 src/main/webapp/js/guidelines.txt delete mode 100644 src/main/webapp/js/isochrone/configuration.js delete mode 100644 src/main/webapp/js/isochrone/initHelper.js delete mode 100644 src/main/webapp/js/isochrone/isoMap.js delete mode 100644 src/main/webapp/js/isochrone/isochrone.js delete mode 100644 src/main/webapp/js/isochrone/searchExtender.js delete mode 100644 src/main/webapp/js/lib/console.js delete mode 100644 src/main/webapp/js/lib/jquery-ui-timepicker-addon.js delete mode 100644 src/main/webapp/js/lib/require.js delete mode 100644 src/main/webapp/js/map/control/geosearch.js delete mode 100644 src/main/webapp/js/map/control/geosearchProvider/osm.js delete mode 100644 src/main/webapp/js/map/control/help.js delete mode 100644 src/main/webapp/js/map/control/settings.js delete mode 100644 src/main/webapp/js/map/control/wswarning.js delete mode 100644 src/main/webapp/js/map/ipLocator/ipLocator.js delete mode 100644 src/main/webapp/js/map/ipLocator/ipProvider.js delete mode 100644 src/main/webapp/js/map/ipLocator/mapIncluder.js delete mode 100644 src/main/webapp/js/map/layer/bing.js delete mode 100644 src/main/webapp/js/map/layer/google.js delete mode 100644 src/main/webapp/js/service/serviceConfiguration.js delete mode 100644 src/main/webapp/js/service/serviceIsochrone.js delete mode 100644 src/main/webapp/js/service/websocket.js delete mode 100644 src/main/webapp/js/util/geoUtils.js delete mode 100644 src/main/webapp/js/util/stringUtils.js delete mode 100644 src/main/webapp/js/versions.txt diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF deleted file mode 100644 index 275bbb5e..00000000 --- a/src/main/webapp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index cf6c68b8..00000000 --- a/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> - <display-name>Using Isochrones for Geospatial Analysis</display-name> -</web-app> diff --git a/src/main/webapp/css/geosearch.css b/src/main/webapp/css/geosearch.css deleted file mode 100644 index 29ecc692..00000000 --- a/src/main/webapp/css/geosearch.css +++ /dev/null @@ -1,232 +0,0 @@ -.geosearch-result-icons, -.isochrone-config-icons { - border-left: 1px solid #EEEEEE; - color: #00CC44; - cursor: pointer; - float: right; - height: 40px; - opacity: 0.8; - text-align: center; - width: 64px; -} - -.geosearch-result-icons:hover, -.isochrone-config-icons:hover { - text-decoration: underline; - opacity: 1; -} - -.geosearch-result-icons-disabled { - color: #CCCCCC; - cursor: default; - opacity: 0.4; - text-align: center; -} - -.geosearch-result-icons-disabled:hover { - text-decoration: none; - opacity: 0.4; -} - -.geosearch-result-text { - background-color: #EEEEEE; -} - -.geosearch-result-text, -.isochrone-config-content { - min-height: 40px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.isochrone-config-content div.container { - position: relative; - height: 20px; -} - -.isochrone-config-content div label { - display: block; - float: left; - left: 0px; - position: absolute; - top: 0px; - width: 75px; -} - -.isochrone-config-content .dataset-datetimepicker { - position: relative; - z-index: 100000; -} - -.isochrone-config-content .dataset-dmax-slider { - font-size: 10px; - margin: 7px 0px; -} - -.isochrone-config-content .dmax-display { - float: right; - margin-right: 10px; -} - -.isochrone-config-content div div, -.isochrone-config-content div input { - display: block; - left: 100px; - position: absolute; - top: 0px; - width: 170px; -} - -.isochrone-config-content div input { - background-color: transparent; - border: 0px solid transparent; - margin: 2px 0px 0px -5px; -} - -.geosearch-result-text .result-name { - display: block; - font-size: 16px; - font-weight: 800; -} - -.geosearch-result-icons-disabled .icon-isochrone:before { - background-position: -24px 0px; -} - -.icon-isochrone:before { - background: url('/isochrone/img/icon-isochrone.png') no-repeat scroll center center transparent; - background-position: 0px 0px; - background-size: 48px 24px; - content: " "; - display: block; - height: 24px; - margin: 0px auto; - width: 24px; -} - -.icon-isochrone-start-calc:before { - background: url('/isochrone/img/start_calculation.png') no-repeat scroll center center transparent; - background-position: 0px 0px; - background-size: 24px 24px; - content: " "; - display: block; - height: 24px; - margin: 0px auto; - width: 24px; -} - -.isochrone-config-icons { - float: right; -} - -.leaflet-control-geosearch-msg ul { - background-color: transparent; - list-style: none; - display: none; -} - -.leaflet-control-geosearch-result-config, -.leaflet-control-geosearch-msg ul { - height: auto; - margin: 0px; - padding: 0px; - width: 400px; -} - -.leaflet-control-geosearch-msg ul li { - background-color: #FFFFFF; -} - -.leaflet-control-geosearch-result-config, -.leaflet-control-geosearch-msg ul.leaflet-control-geosearch-result { - margin-top: 5px; -} - -.leaflet-control-geosearch-msg ul.leaflet-control-geosearch-result li { - border: 1px solid #CCCCCC; - border-radius: 4px; - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65); -} - -.leaflet-control-geosearch-result-config .ui-tabs { - background: transparent; - border-width: 0px; - padding: 0px; -} - -.leaflet-control-geosearch-result-config .ui-tabs div.dataset { - background-color: #FFFFFF; - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-top-right-radius: 4px; - border-width: 1px; - padding: 4px; -} - -.leaflet-control-geosearch-result-config .ui-tabs .ui-tabs-nav { - padding: 0px; -} - -.leaflet-control-geosearch-result-config .ui-tabs .ui-tabs-nav li.ui-state-default { - background-image: none; -} - -.ui-tabs .ui-tabs-nav li { - margin: 0px; -} - -.leaflet-control-geosearch-result-config .ui-tabs .ui-tabs-nav .ui-tabs-anchor { - padding: 0.5em; -} - -.leaflet-control-geosearch-result-config .ui-helper-reset { - line-height: 1; -} - -.leaflet-control-geosearch-result-config .ui-tabs .ui-widget-header { - background-color: transparent; - background-image: none; - border-width: 0px; -} - -.leaflet-control-geosearch-result-config .ui-tabs div.dataset { - box-shadow: 0 1px 2px rgba(0, 0, 0, 0.65); -} - -.leaflet-control-geosearch-msg ul.leaflet-control-geosearch-result li div { - padding: 4px; -} - -.leaflet-control-geosearch-msg ul.leaflet-control-geosearch-suggests li { - border: 1px solid #CCCCCC; - padding: 4px; -} - -.leaflet-control-geosearch-msg ul.leaflet-control-geosearch-suggests li:hover { - background-color: #EEEEEE; -} - -.leaflet-control-geosearch-searchdiv { - background: none repeat scroll 0 0 #FFFFFF; - border-radius: 4px; - box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65) -} - -.leaflet-control-geosearch-searchdiv input { - background-color: #FFFFFF; - border: none; - height: 28px; - margin: 5px; - width: 390px; -} - -.leaflet-control-geosearch-btn { - background: url('/isochrone/img/geosearch.png') no-repeat scroll center center #00CC44; - background-size: auto 100%; - border: 0px none; - border-radius: 0px 4px 4px 0px; - float: right; - height: 38px; - width: 72px; -} diff --git a/src/main/webapp/css/isomap.css b/src/main/webapp/css/isomap.css deleted file mode 100644 index 3d96d735..00000000 --- a/src/main/webapp/css/isomap.css +++ /dev/null @@ -1,64 +0,0 @@ -html { - height: 100%; - width: 100%; -} - -body { - margin: 0px; - padding: 0px; -} - -div.map { - display: block; - height: 100%; -} - -div.clipped { - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - width: 200px; -} - -div.page-wrapper { - font-family: Helvetica; - margin-left: auto; - margin-right: auto; - padding: 0px; - width: 100%; -} - -fieldset { padding:0; border:0; margin-top:25px; } - -.help-control-div { - background: url('/isochrone/img/help_filled.png') no-repeat scroll 0px 0px transparent; -} - -.wsWarning-control-div { - background: url('/isochrone/img/warning.png') no-repeat scroll 0px 0px transparent; -} - -.settings-control-div { - background: url('/isochrone/img/settings.png') no-repeat scroll 0px 0px transparent; - clear: none; -} - -.help-control-div, -.settings-control-div, -.wsWarning-control-div { - background-position: center; - background-size: 90%; - cursor: pointer; - height: 24px; - opacity: 0.8; - width: 24px; -} - -.help-control-div:hover, -.settings-control-div:hover { - opacity: 1; -} - -.olControlLayerSwitcher .layersDiv { - background-color: #191919; -} diff --git a/src/main/webapp/css/jquery-ui-timepicker-addon.css b/src/main/webapp/css/jquery-ui-timepicker-addon.css deleted file mode 100644 index da12d983..00000000 --- a/src/main/webapp/css/jquery-ui-timepicker-addon.css +++ /dev/null @@ -1,11 +0,0 @@ -.ui-timepicker-div .ui-widget-header { margin-bottom: 8px; } -.ui-timepicker-div dl { text-align: left; } -.ui-timepicker-div dl dt { float: left; clear:left; padding: 0 0 0 5px; } -.ui-timepicker-div dl dd { margin: 0 10px 10px 40%; } -.ui-timepicker-div td { font-size: 90%; } -.ui-tpicker-grid-label { background: none; border: none; margin: 0; padding: 0; } - -.ui-timepicker-rtl{ direction: rtl; } -.ui-timepicker-rtl dl { text-align: right; padding: 0 5px 0 0; } -.ui-timepicker-rtl dl dt{ float: right; clear: right; } -.ui-timepicker-rtl dl dd { margin: 0 40% 10px 10px; } \ No newline at end of file diff --git a/src/main/webapp/img/geosearch.png b/src/main/webapp/img/geosearch.png deleted file mode 100644 index e5d4684cd60987f418b75a521464580439701fdf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1338 zcmV-A1;zS_P)<h;3K|Lk000e1NJLTq003kF003kN1^@s6aN?Cz00006VoOIv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-X(iu?0ekyz+Xj+5OC*rLr=gO;6-ZR=Ux>d1K`=b z$N-vh3}{Q_5uE`uyLt-uZ#T2&Bg^>F%x3247*I3L_C6LlBkl#h1U3OTL_~A9Z|c5_ z=rbl5^CPg_(5$1ROMy>-v#R)=BfbyX$N!I#_68<>SquZW238YVUdY5mZBtGj%)Nd9 z&~z!yd>vsk?oFvbb0DM#_>dfIQ03u;otuC+fO$C(Q}&VaQxPL%f{%Tlva5k*?8luc z4sofEl=F)$WMXo5J?=bixz6`pja%No5%?xj%12F;lBY4azuL^K-^_+=>WrA#eP%Y} zw0n1&+1HWxD4W>@t^PVfwOoW-1@6P0o0>gIo>REZrLw<<{6b-+wW;~I_t!6vD1XHF zDam#cOVjLM9?jw3zvR&71stIIoxb_Fci3a*E~CKBsic$&{6DBVyp$^=rCbY~C`zZ^ z437F4`ksiqm*7^R6(I?j=Og8+h!I=2BBb&B>?37&ME`|^q~RAY<*ST5pR37APdo4) zaLs8y|J8TuWkpC@j`<n=3%EZha13}ml?+8l4pD?ih>#Eo5fUOHLP8`&NQi_82@w(^ wAwohVL`aB)2nmr8At6FSBt%Gvgoyg`4@()qmGYs4hyVZp07*qoM6N<$f}%NQu>b%7 diff --git a/src/main/webapp/img/help_filled.png b/src/main/webapp/img/help_filled.png deleted file mode 100644 index 5567cdf7442cb7318e8e1c984a12a6892e2977c6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)<h;3K|Lk000e1NJLTq001BW001Be1ONa4*>kdg00002VoOIv0RM-N z%)bBt010qNS#tmY3ljhU3ljkVnw%H_000McNliru-3${BG#N1W#vA|u0sBcrK~zY` zwUxhX6JZ#~KX)k?HC0QY9)}hemm5SuB1oV^LC|IhFXAFy6<47oIEg5fqzL{CLYAWO z!69yDP=bS?Xof^8Ds(sx2d$^ov=kkhw3NQ@<s$k_FYouq^FHsd$3hb-%`^pkJUk#E zpv@y1(%sFqc8OhXFw1_8Z$y=w62=%PhZ03bF~@f*lx0n8pj>L?7#vM5Y_DU>Kpm&f zB*|i#ytH;0D3=$B<(n4S%~jaF+G|6}VUn71whSmGs(okVDD@1KOHoUC%O#F-kTX2c z;zi{`3j76a{x_VKSN<>d$WrINpV4p}GM&1m(tOrln<;swt}@Rki!!Uyd}2&<wI(ce zp2r&bPbP5q$N>OO$xHQwX$@~?go3udy{xd(lW*_^NNafo8{e?YDaL!Fhw?#<b5hIl zZM*@;wZ<)Ao{Sdt1{++LmO95}1L|2SihX_0$>H*vL#Eeh6U64fC%>69${`qJPzNr? z;K2xOreX+ZRm9;KyluKjNn^&QL1cv2nd2H?jd(=EmM&EzVO8$PT|y&Xm97QK<(=Uu zS2@83PdQ@vV2?>?gM?HJ8TPTndxIP*683+jGR>j4uSxmeeX1ZKd6tKe=lh+(?$1e! zY{EjCWcytKQrq*LAAXf}vN*A=?KW5B+y82=f79Oo0B-A?TIBI^IRF3v07*qoM6N<$ Ef(#fBZvX%Q diff --git a/src/main/webapp/img/icon-isochrone.png b/src/main/webapp/img/icon-isochrone.png deleted file mode 100644 index 7cb8f4dcf7e51f67dcaccbdfcc84cb28a29f0686..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7422 zcmV<a90B8rP)<h;3K|Lk000e1NJLTq004jh002J-1^@s6D5Ah?00006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY4#NNd4#NS*Z>VGd000McNliru-U1s7DJW!~jPU>f9E(Xr zK~#9!)qQzjR7JY)@2fi9>Fgna00Bh>+@1@L50phhx;sGuMHx57%k}!^I*epx^QyRT zFBc!mmJQs%$IMf48FdikvUCDrb=Rx1h>GHZY}u1ey3eWl?jPOYLP(zuVVU|X>8?|! ze)a8NeN|29#MXDU7hjL^{pz#p=ehCj??3?uk!28B5+G(`B4`onBNe~|fWU^u5Slo~ z)Lb{h!-N^f#!A|pjfU&i;~%XR7Z;Ndf~1s0L||qjA`lS(Kx>Wg|E!b(09HzIVPPSk z>bcRW7}WdMENt#i4%X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$r5WgiG&BIRL4@)js zu%K5=Ow6qS{vd=HbQ%c{X5PrmFItxMT2WC^eTUbwBM(i#@nOt;vI4jyw4WZg*>k1o zAdeQfg9(E)ojSq`%~e9vYq70*Z9`V&vFujDrW`a4Uw1|%v9z@GN-3p>i0&YwL8qAT zRm}XFWm#*Bii*BE=`}r>hckTH*dM+hkdaTWZ96Z~lCEO#4FKg>65TojxKw;VFs%Z3 zt+en_%dnw)3I72ANb|W-?X5iHMtJz};dJ}$w_hTJxQdx?AflWo4s=FJCLKWNKESnF z>yPsD^E+*?p;KhF`<jtBc>T}eR@@d(Is+L>(#1>|#)Lsi;0n8kMg^l$XnYFbJ;B%p zja@Mo4m1w;{e0%`lVNyt>UH>!ivN4og=1x9W$6Gigb)`47#7wFS444Ww2_%V1@Im- zZ)4_NTI&M^1qIceJ=acC);%h6aKQ6x6+C)@S8N=_iKaw?5)|uDNYeu6YC?A~rzlBI zVn8sr5>P8N4oD@wYmMQ0!-8Kjnnu54H2!VMnqx6-%0>_BMpWP*p*{4_L!xKTo{2=1 zKt!?3oJK_F5>a<%P6=NW31)63qFQD?ptb(aFpPSwwV#=r4jw$%IBV9dQ<i%;CDyv% z>pA%9_ifwb^a_t`bU`vh1Y(GU1{{jnp`cS6l(ld4#^YnyeOF^r(T!OA=1lyfw~~?) wDW#OmETohaw(HEyIv5OEQ>RYVr*l641F}I3+cCzF0000007*qoM6N<$g6TI5$p8QV diff --git a/src/main/webapp/img/settings.png b/src/main/webapp/img/settings.png deleted file mode 100644 index c463df2ad0e74e0f974d980e139e076506f86a83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2010 zcmV<02POE4P)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F800006VoOIv0RI60 z0RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru-3${BG%XQBGN}Ln2WLq{ zK~z}7#aC-=99I?o&b{-vGqJs~opm;eAM3T__?0vyAd*75V>gbel*Xk3L=bgC;->td zB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2V?|VL&+;pwFs%m?4V&xEn;X2Nn%)DtP9kXV*t~2WUKAIBE-~8K! zw_pA2Ll6G!<(GzQdq32BRM~cKV?2?X$&g}JzBQw<A(2wH-PiZwzHd}lRjo_Jn}&iQ zfYut3#gP-tJSRrnMT^d9o$K|9c+)Et<rVAt`nElxY`eFyA!mFhE{r+56a(>w#uO2K zE<e*T7{r8FY}udYYBbD@#gWMCd0nkF8XFShAna%6!W=N?k4a@^B^LO1iocIuECVnx sk47S1-#BusPMBYR9eFF~!2fgo56vA$!~JgMc>n+a07*qoM6N<$f*1b8qyPW_ diff --git a/src/main/webapp/img/start_calculation.png b/src/main/webapp/img/start_calculation.png deleted file mode 100644 index 9b8226bfc21527dd01aaf6443a07514d6dc084c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5901 zcmV+o7xL(dP)<h;3K|Lk000e1NJLTq002M$002M;1^@s6s%dfF0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU|uSrBfRCwC#TX~cnRhj?YTHn^&>pk6_ zbUI51%mRd<qJj=*bi!sJ;4q-#;E6LRpmRpY{fwMZTo}jojLN|gbr4ZeaRE{0IA@R% zB!q+{khRmDPVdWG`z`fqneSHJdavH=B^%-&&TB4J^<LGz_xJmL-*>-zZ-qIIgFokw zgg^7o{}b@%PJj};V2r&SZJuf)&dW}~8GS-jY$`GpE1)SRu8lHaer%@FNcT3<Z=v#2 zGP3ml44o&bWCVCy9Gx;5x;U~xoB2OA0SkQ!0yIMhb#en@*sR5|A=HKyTBFpc$Fw>* zENhYkW|wTIm^J5$>C&7ri`n8d2CO9Z5U@S;{0js*E2y+kEE5B0FO5Q2a2Pxz7w{F} zTUsGI0k35BxTay9bV<v`*ow~n=BCcxWvsok6U_}Rh(u!0G#wI?V45b1#XQn;X-rQ~ zVD!W&Mh}maCiW*2v-^xgg<(8Sbw5h*4^q9QG8xqh`4bbsEiMyqhRd`r+|vDq*kATt z+Eusu6>G7w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HQRfY#@1XV=&Gj%Rn~<9BoP29_*o^gdV%Hw1l}%CZw(^Gghi1j zJ78hpkz{J@x0zuY<c<@hw1`Qmfb1v4(cccwEf)CBh5%m)x^M?hLR=8xl{osfRq}?` z&9UB&SI6RQYol^qn+`q7;{X*(8#N+BrV&AM=eG_4Ch2pF69M^r4!L9wiIE&8_Rbj- zPt7Hh&*jIR6J+sX8CWJT)cFKVi|Zw${@K1N%WB+#uNT(~muL=@Cep|<I$N$SQ@SFn zl(u+(sIjRp9E!Duq)?0$p?V{MW!f-`CFIgYBu5J7?2%kPeV~{r4q6Fw+@2*{CrAwb zWTqDUj3~3>yKKPcPYV9b-xU_Adtl2cDu`$blt%YEh8W$|NOv?*&}^clD8?cz?7sBN zCBR<;%F$#m?-)*o&awnHPe-#1q*wz!CH&qmDdF$Az`H=F1pe&a7O#+?2$u*4h-eT; zUh2df8vYKg9+(`<s9xhJFUE+W*9c5$vjGBp(3!wozjQh;NuTM<(lzt9GSmL_*(j&Z zUMFLM6u*Q6Bq)`|?eYZAs_ZV5!3PNl9&>?}o-_Kl0x!)!nW<KTzYnL25)z=pHQ=>? z3Tg>31Jd{9?-Nl76yszsLB3oB)CS1F_J|8oTcD^lFD$X@z27nkMolT5%G;lRDgtU1 zA=Qwf)STC@6*)C-U<Kkq?Q-^61OH<Zu)y9;+0r%ZL<_DBIg9M%ykwwXE&`S!ge|dQ jxlkbcqy015{}W&UEUd#A*f?%u00000NkvXXu0mjfv@cyz diff --git a/src/main/webapp/img/warning.png b/src/main/webapp/img/warning.png deleted file mode 100644 index 4bd83676556113763715cafb46bc450e04c8ab2f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1788 zcmV<Y1_SwtP)<h;3K|Lk000e1NJLTq001BW001Be1^@s6b9#F8000KVNkl<ZScS!x z+mBaQ6~{mOaxTBi{AT7i7hq;!U>KNjW+;pls90#BqA0C^wjkA*Ce{}dTT_z?54D$< zJ{z?!YK{B>O*Cp!TT|mDrl}(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<UdYMB$|pudoMLy9lIvA eo16dN%6|bfIKeP8fRRQ30000<MNUMnLSTY$d|qAv diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html deleted file mode 100644 index 653c740b..00000000 --- a/src/main/webapp/index.html +++ /dev/null @@ -1,60 +0,0 @@ -<!DOCTYPE html PUBLIC> - -<html> -<head> - <title>IsoMap: Isochrone enabled Map</title> - <link type="text/css" rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" /> - <link type="text/css" rel="stylesheet" href="//rawgithub.com/domoritz/leaflet-locatecontrol/gh-pages/src/L.Control.Locate.css" /> - <link type="text/css" rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> - <link type="text/css" rel="stylesheet" href="css/jquery-ui-timepicker-addon.css" /> - <link type="text/css" rel="stylesheet" href="css/geosearch.css" /> - <link type="text/css" rel="stylesheet" href="css/isomap.css" /> - <!--[if lt IE 9]> - <link rel="stylesheet" href="//cdn.leafletjs.com/leaflet-0.7.2/leaflet.ie.css" /> - <link rel="stylesheet" href="//rawgithub.com/domoritz/leaflet-locatecontrol/gh-pages/src/L.Control.Locate.ie.css"/> - <![endif]--> - - <script data-main="js/app" src="js/lib/require.js"></script> - <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3&sensor=false"></script> -</head> - -<body> - <div class="page-wrapper"> - <div id="map" class="map"></div> - <div id="help-dialog" title="Hilfe"> - <p>Momentan ist keine Hilfe verfügbar!</p> - </div> - <div id="settings-dialog" title="Einstellungen"> - <form id="settings-form"> - <fieldset id="settings-fields"> - <label for="email">Algorithmus</label><br> - <select name="algorithm" id="algorithm" class="ui-widget-content ui-corner-all"> - <option>MineX</option> - <option>MrneX</option> - <option>MDijkstra</option> - </select><br> - <label for="name">Geschwindigkeit</label><br> - <input name="speed" id="speed"/><br> - <label for="name">T-Mode</label><br> - <select name="tmode" id="tmode" class="ui-widget-content ui-corner-all"> - <option>Unimodal</option> - <option selected="selected">Multimodal</option> - </select><br> - <label for="name">Richtung</label><br> - <select name="direction" id="direction" class="ui-widget-content ui-corner-all"> - <option>Incoming</option> - <option>Outgoing</option> - </select><br> - <label for="name">Enclosure</label><br> - <select name="enclosure" id="enclosure" class="ui-widget-content ui-corner-all"> - <option>Buffer</option> - <option selected="selected">Surface</option> - </select><br> - <label for="name">Expiration Mode</label><br> - <input type="checkbox" name="expirationMode" id="expirationMode" class="ui-widget-content ui-corner-all" /> - </fieldset> - </form> - </div> - </div> -</body> -</html> \ No newline at end of file diff --git a/src/main/webapp/js/app.js b/src/main/webapp/js/app.js deleted file mode 100644 index 71e39caa..00000000 --- a/src/main/webapp/js/app.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * RequireJS Configuration - */ -require.config({ - baseUrl: 'js', - paths: { - 'console': 'lib/console', - 'jQuery': '//code.jquery.com/jquery-2.1.0.min', - 'jQueryUI': '//code.jquery.com/ui/1.10.4/jquery-ui', - 'jQueryUI-timepicker': 'lib/jquery-ui-timepicker-addon', - 'leaflet': '//cdn.leafletjs.com/leaflet-0.7.2/leaflet', - 'locateControl': '//rawgithub.com/domoritz/leaflet-locatecontrol/gh-pages/src/L.Control.Locate', - //'spinner': '//fgnass.github.io/spin.js/spin', - 'spinner': '//raw.githubusercontent.com/fgnass/spin.js/1.3.3/spin', - 'stamenMap': '//maps.stamen.com/js/tile.stamen' - }, - shim: { - 'console': { - exports: 'console' - }, - 'jQuery': { - exports: '$' - }, - 'jQueryUI': { - deps: ['jQuery'], - exports: '$' - }, - 'jQueryUI-timepicker': { - deps: ['jQueryUI'] - }, - 'leaflet': { - exports: 'L' - }, - 'jquery-ui-timepicker-addon': { - deps: ['jQueryUI'] - }, - 'locateControl': { - deps: ['leaflet'] - }, - 'stamenMap': { - deps: ['leaflet'] - } - } -}); - -require(['jQuery', 'isochrone/initHelper'], function($, InitHelper) { - $(function() { - var h = new InitHelper(); - h.initPreferences(); - h.initMap(); - }); -}); diff --git a/src/main/webapp/js/guidelines.txt b/src/main/webapp/js/guidelines.txt deleted file mode 100644 index 61e9f02b..00000000 --- a/src/main/webapp/js/guidelines.txt +++ /dev/null @@ -1,24 +0,0 @@ -JS coding guidelines: ---------------------- - - - Use jsDoc and document your methods - - Use the gradle task "jsDoc" to check the code documentation - - Use the gradle task "jsHint" to check the coding styleguide - -Class Design: -------------- - -The JavaScript files are used in an object-orientated way. -Each file should contain one class (which is created using -the RequireJS define method). -There is one exception to this rule: the classes using leaflet. -All these classes are located in the map folder and can be -implemented in a slightly different way from the guidlines -(e.g. they can extend the leaflet "L" object). -All the other classes should be implemented according to the -guidlines described in Pattern1 on the following website: - -https://gist.github.com/lucastan/5421897 - -=> Pattern 1: Self-construction used and applied to AMD -(for a documented example see IsoMap class in js/map/isoMap.js) diff --git a/src/main/webapp/js/isochrone/configuration.js b/src/main/webapp/js/isochrone/configuration.js deleted file mode 100644 index e65b6a0a..00000000 --- a/src/main/webapp/js/isochrone/configuration.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Used to store the client's configuration - * - * @singleton - * @class Configuration - */ -define(['console'], function(logger) { - var instance = null; - - function Configuration() { - var datasetConfigMap = {}; - var mapserverUrl = null; - - /** - * @private - * @method Configuration#addDatasetConfig - */ - this.addDatasetConfig = function(dSetConfig) { - if (!dSetConfig || !dSetConfig.datasetName) { - logger.warn('Not adding invalid dataset configuration to client configuration singleton'); - logger.debug(' - dSetConfig given:', dSetConfig); - return; - } - - datasetConfigMap[dSetConfig.datasetName] = dSetConfig; - }; - - /** - * @private - * @method Configuration#getDatasetConfigMap - */ - this.getDatasetConfigMap = function() { - return datasetConfigMap; - }; - - /** - * @private - * @method Configuration#getDatasetConfig - */ - this.getDatasetConfig = function(datasetName) { - return datasetConfigMap[datasetName]; - }; - - /** - * @private - * @method Configuration#getMapserverUrl - */ - this.getMapserverUrl = function() { - return mapserverUrl; - }; - - /** - * @private - * @method Configuration#setMapserverUrl - */ - this.setMapserverUrl = function(url) { - var i = url.indexOf('://'); - if (i <= 0) { - i = 0; - } else { - i = i + 1; - } - - mapserverUrl = location.protocol + url.substring(i).replace('localhost', window.location.hostname); - }; - } - - return { - /** - * @public - * @method Configuration.getInstance - */ - getInstance: function() { - if (instance === null) { - instance = new Configuration(); - } - - return instance; - } - }; -}); diff --git a/src/main/webapp/js/isochrone/initHelper.js b/src/main/webapp/js/isochrone/initHelper.js deleted file mode 100644 index 6ef6662d..00000000 --- a/src/main/webapp/js/isochrone/initHelper.js +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @class InitHelper - */ -define(['jQuery', 'console', 'isochrone/isoMap', 'service/websocket', 'service/serviceIsochrone', 'service/serviceConfiguration', 'isochrone/searchExtender', 'jQueryUI', 'jQueryUI-timepicker'], function($, logger, IsoMap, Websocket, ServiceIsochrone, ServiceConfiguration, SearchExtender) { - function InitHelper() { - var serviceConfig = null; - var serviceIsochrone = null; - var isoMap = null; - var ws = null; - - // Public methods - - /** - * @public - * @method InitHelper#initMap - */ - this.initMap = function() { - logger.debug('Initializing map'); - - isoMap = new IsoMap('map'); - isoMap.locateAndDraw(); - - ws = new Websocket(); - serviceConfig = new ServiceConfiguration(ws); - serviceConfig.initFromServer(); // prepares ConfigurationInstance - serviceIsochrone = new ServiceIsochrone(ws, isoMap); - - $(document).on('isomap_draw', extendSearch.bind(this)); - }; - - /** - * @public - * @method InitHelper#initPreferences - */ - this.initPreferences = function() { - $('#help-dialog').dialog({ - autoOpen: false, - modal: true, - resizable: false - }); - - $('#settings-dialog').dialog({ - autoOpen: false, - modal: true, - resizable: false - }); - - $('#speed').spinner({ - min: 0, - max: 5000, - numberFormat: 'n', - step: 0.1 - }).val(0.5); - - $('#settings-dialog select').css({'width':'100%'}); - $('#settings-dialog input').css({'width':'100%'}); - - }; - - // Private methods - - /** - * @private - * @method InitHelper#extendSearch - */ - function extendSearch() { - var searchExtender = new SearchExtender(isoMap.getMap(), function() { - serviceIsochrone.sentRequest.apply(this, arguments); - }); - - searchExtender.extendResult(); - } - } - - return InitHelper; -}); \ No newline at end of file diff --git a/src/main/webapp/js/isochrone/isoMap.js b/src/main/webapp/js/isochrone/isoMap.js deleted file mode 100644 index 84a5c04f..00000000 --- a/src/main/webapp/js/isochrone/isoMap.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * @class IsoMap - */ -define(['jQuery', 'leaflet', 'console', 'map/layer/bing','map/layer/google', 'map/control/help', 'map/control/settings', 'map/control/wswarning', 'map/control/geosearch', 'map/control/geosearchProvider/osm', 'map/ipLocator/ipProvider', 'map/ipLocator/ipLocator'], function($, L, logger, BingLayer, GoogleLayer, HelpControl, SettingsControl, WsWarningControl, GeoSearch, OSMProvider, IpProvider, IpLocator) { - // Private static fields - var INNSBRUCK = [47.265718, 11.391342]; -// var VIENNA = [48.186312, 16.317615]; - - // Class function (a.k.a. constructor) - - function IsoMap(div) { - // self has to be used instead of this in private methods to refer to public vars/mathods - // var self = this; - - // Private fields - var layerControl = null; - var mDiv = null; - var map = null; - var mapOptions = { -// attributionControl: false, - center: INNSBRUCK, - ipProvider: IpProvider.Wikimedia, - zoomControl: false, // hide default zoom control, so we can create a bottomright one - zoom: 12 - }; - var wsWarningControl = null; - - // Constructor code - - mDiv = div; - layerControl = L.control.layers(); - - // Public methods - - /** - * Gets the internal map object. - * This is only useful after the map has been drawn - * - * @public - * @method IsoMap#getMap - * @return {Object} the map object. Null if the map has not been drawn. - */ - this.getMap = function() { - return map; - }; - - /** - * Draws the map into the div container referenced by the mDiv class attribute. - * - * @public - * @method IsoMap#draw - */ - this.draw = function() { - logger.log('Drawing map'); - logger.debug(' - options:', mapOptions); - - // Base + Overlay map definition - mapOptions.layers = addOsmLayer(); - addStamenLayer(); - addBlueMarbleLayers(); - addBingLayers(); - addGoogleLayers(); - - // Map creation and control assignment - require(['locateControl', 'map/ipLocator/mapIncluder'], function() { - map = L.map(mDiv, mapOptions); - map.addControl(L.control.scale({position: 'bottomleft'})); - map.addControl(new SettingsControl()); - map.addControl(new HelpControl()); - map.addControl(layerControl); - map.addControl(L.control.locate({position: 'bottomright'})); - map.addControl(L.control.zoom({position: 'bottomright'})); - map.addControl(new GeoSearch({ - doReverseLookup: true, - position: 'topleft', - provider: new OSMProvider(), - showMarker: true - })); - - map.attributionControl.setPrefix('IsoMap v@version@'); - - warningIndicatorShow(); - $(document).on('websocket_error', warningIndicatorShow); - $(document).on('websocket_close', warningIndicatorShow); - $(document).on('getConfiguration', warningIndicatorHide); - $(document).trigger('isomap_draw'); - }); - }; - - /** - * @public - * @method IsoMap#getLayerControl - */ - this.getLayerControl = function() { - return layerControl; - }; - - /** - * Draws the map into the div container referenced by the mDiv class attribute after getting the user's location. - * The estimated user location is used as an initial center of the map shown. - * - * @public - * @method IsoMap#locateAndDraw - */ - this.locateAndDraw = function() { - var locator = new IpLocator(); - locator.locateByIp(mapOptions.ipProvider, onLocationSuccess.bind(this), onLocationError.bind(this)); - }; - - // Private methods - - /** - * @private - * @method IsoMap#addBingLayers - */ - function addBingLayers() { - var apiKey = 'AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf', - bAerial, - bHybrid, - bRoad; - - bRoad = new BingLayer(apiKey, { - type: 'Road' - }); - bHybrid = new BingLayer(apiKey, { - type: 'AerialWithLabels' - }); - bAerial = new BingLayer(apiKey, { - type: 'Aerial' - }); - - logger.debug('Adding bing layers'); - layerControl.addBaseLayer(bRoad, 'Bing Road'); - layerControl.addBaseLayer(bHybrid, 'Bing Hybrid'); - layerControl.addBaseLayer(bAerial, 'Bing Aerial'); - - return bAerial; - } - - /** - * @private - * @method IsoMap#addBlueMarbleLayers - */ - function addBlueMarbleLayers() { - if (!L.tileLayer) { - return; - } - - var blueMarbleJpg, - blueMarblePng, - openGeoOSM; - - blueMarbleJpg = new L.tileLayer.wms( - 'http://maps.opengeo.org/geowebcache/service/wms', - {layers: 'bluemarble'} - ); - - blueMarblePng = new L.tileLayer.wms( - 'http://maps.opengeo.org/geowebcache/service/wms', - {layers: 'bluemarble', format: 'image/png'} - ); - - openGeoOSM = new L.tileLayer.wms( - 'http://maps.opengeo.org/geowebcache/service/wms', - {layers: 'openstreetmap', format: 'image/png'} - ); - - logger.debug('Adding openGeo layers (blueMarbel and openGeo OSM)'); - layerControl.addBaseLayer(blueMarbleJpg, 'OpenGeo BlueMarble (jpg)'); - layerControl.addBaseLayer(blueMarblePng, 'OpenGeo BlueMarble (png)'); - layerControl.addBaseLayer(openGeoOSM, 'OpenGeo OSM (png)'); - - return openGeoOSM; - } - - /** - * @private - * @method IsoMap#addGoogleLayers - */ - function addGoogleLayers() { - var gPhysical, - gStreet, - gHybrid, - gSatellite; - - gPhysical = new GoogleLayer('TERRAIN'); - gStreet = new GoogleLayer('ROADMAP', - {maxZoom: 20 } - ); - gHybrid = new GoogleLayer('HYBRID', - {maxZoom: 20 } - ); - gSatellite = new GoogleLayer('SATELLITE', - {maxZoom: 22 } - ); - - logger.debug('Adding google layers'); - layerControl.addBaseLayer(gPhysical, 'Google Physical'); - layerControl.addBaseLayer(gStreet, 'Google Streets'); - layerControl.addBaseLayer(gHybrid, 'Google Hybrid'); - layerControl.addBaseLayer(gSatellite, 'Google Satellite'); - - return gSatellite; - } - - /** - * @private - * @method IsoMap#addOsmLayer - */ - function addOsmLayer() { - if (!L.tileLayer) { - return; - } - - var layerOsm = new L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { - attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' - }); - - logger.debug('Adding openstreetmap layer'); - layerControl.addBaseLayer(layerOsm, 'OpenStreetMap'); - - return layerOsm; - } - - /** - * @private - * @method IsoMap#addStamenLayer - */ - function addStamenLayer() { - if (!L.StamenTileLayer) { - return; - } - - var layerStamen = new L.StamenTileLayer('watercolor'); - - logger.debug('Adding stamen watercolor layer'); - layerControl.addBaseLayer(layerStamen, 'Stamen Watercolor Map'); - - return layerStamen; - } - - /** - * @private - * @method IsoMap#onLocationError - */ - function onLocationError(message) { - logger.info('Could not get GeoLocation', message); - logger.debug(' - will continue with default location'); - - this.draw(); - } - - /** - * @private - * @method IsoMap#onLocationSuccess - */ - function onLocationSuccess(location) { - if (!location || !location.coords) { - logger.debug('Invalid geoLocation found... no coordinates returned!'); - return; - } - - logger.log('GeoLocation found. It will be used as center'); - logger.debug(' - location:', location); - - mapOptions.center = [location.coords.latitude, location.coords.longitude]; - - this.draw(); - } - - /** - * @private - * @method IsoMap#warningIndicatorHide - */ - function warningIndicatorHide() { - if (wsWarningControl !== null) { - map.removeControl(wsWarningControl); - wsWarningControl = null; - } - } - - /** - * @private - * @method IsoMap#warningIndicatorShow - */ - function warningIndicatorShow() { - if (wsWarningControl === null) { - wsWarningControl = new WsWarningControl(); - map.addControl(wsWarningControl); - } - } - } - - // Public static field -// IsoMap.staticVar = 0; - - // Public static method -// IsoMap.capitalize = function(name){ -// return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase(); -// }; - - // Private static method -// function createWithName(name) { -// var obj = new cls(); -// obj.setName(cls.capitalize(name)); -// return obj; -// } - - return IsoMap; -}); diff --git a/src/main/webapp/js/isochrone/isochrone.js b/src/main/webapp/js/isochrone/isochrone.js deleted file mode 100644 index 439dfc7e..00000000 --- a/src/main/webapp/js/isochrone/isochrone.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * @class Isochrone - */ -define(['jQuery', 'leaflet', 'console', 'isochrone/configuration', 'util/stringUtils'], function($, L, logger, Configuration, StringUtils) { - function Isochrone(iMap) { - var isoMap = null; - var layerMap = null; - - // Constructor - - isoMap = iMap; - - // Public methods - - /** - * @public - * @method Isochrone#showLayers - */ - this.showLayers = function(requestData, bBoxLatLng) { - var config = Configuration.getInstance(); - if (layerMap === null) { - addLayers(requestData, config.getDatasetConfig(requestData.dataset), config.getMapserverUrl()); - } else { - updateLayers(requestData); - } - - // TODO: For some reason we need to double click after the layers have been added (and the map is fit in bounds) - // to fire a click listener... why is this the case? - fitMap(bBoxLatLng); - }; - - // Private methods - - /** - * @private - * @method Isochrone#addLayers - */ - function addLayers(requestData, clientConfig, baseUrl) { - var layerCoverage = null, - layerEdge = null, - layerVertex = null; - - logger.debug('Adding isochrone layers'); - layerCoverage = new L.tileLayer.wms(baseUrl + '/wms', { - format : 'image/png', - layers : clientConfig.isoCoverageLayer.layer, - transparent : true - }); - layerEdge = new L.tileLayer.wms(baseUrl + '/wms', { - format : 'image/png', - layers : clientConfig.isoEdgeLayer.layer, - transparent : true - }); - layerVertex = new L.tileLayer.wms(baseUrl + '/wms', { - format : 'image/png', - layers : clientConfig.isoVertexLayer.layer, - transparent : true - }); - - // creating layer map (availability/visiblily will be handled in updateLayers, so setting it to true by now) - layerMap = { - coverage: { - addedToControl: false, - available: true, - getLayerParams: function() { - return { styles : 'StyleIsoCoverage' }; - }, - layer : layerCoverage, - visible : true - }, - edge: { - addedToControl: false, - available: true, - getLayerParams: function(requestData) { - return { styles : requestData.expirationMode ? 'StyleEdgeExpiration' : 'StyleEdge' }; - }, - layer : layerEdge, - visible : true - }, - vertex: { - addedToControl: false, - available: true, - getLayerParams: function(requestData) { - return { styles : requestData.expirationMode ? 'StyleVertexExpiration' : 'StyleTransportationStations' }; - }, - layer : layerVertex, - visible : true - } - }; - - updateLayers(requestData); - } - - /** - * @private - * @method Isochrone#fitMap - */ - function fitMap(bBoxLatLng) { - var map = null; - - logger.debug('Fitting map to bounds: ', bBoxLatLng); - map = (isoMap === null) ? null : isoMap.getMap(); - if (map) { - map.fitBounds(bBoxLatLng); - } - } - - /** - * @private - * @method Isochrone#updateLayers - */ - function updateLayers(requestData) { - if (layerMap === null) { - logger.warn('Can not update layers... no layers available (call addLayers first!)'); - return; - } - - var cachePreventer = new Date().getTime(), - l = null, - layerControl = isoMap.getLayerControl(), - map = isoMap.getMap(), - name = null, - o = null; - - logger.info('Drawing isochrone layers'); - logger.info('Updating layer availability/visibility'); - layerMap.coverage.available = !requestData.expirationMode; - layerMap.edge.available = true; - layerMap.vertex.available = requestData.expirationMode || requestData.mode === 'Multimodal'; - - for (name in layerMap) { - if (!layerMap.hasOwnProperty(name)) { - continue; - } - - o = layerMap[name]; - l = o.layer; - - if (o.available) { - if (!o.addedToControl) { - logger.debug(' - adding ' + name + ' layer'); - l = l.setParams(L.extend(o.getLayerParams(requestData), { - cachingTag: cachePreventer - }), true); - layerControl.addOverlay(l, StringUtils.capitalize(name)); - o.addedToControl = true; - if (o.visible) { - l.addTo(map); - } - } else { - logger.debug(' - updating ' + name + ' layer'); - l = l.setParams(L.extend(o.getLayerParams(requestData), { - cachingTag: cachePreventer - }), false); - } - } else { - logger.debug(' - removing ' + name + ' layer'); - map.removeLayer(l); - layerControl.removeOverlay(l); - o.addedToControl = false; - } - } - } - } - - return Isochrone; -}); diff --git a/src/main/webapp/js/isochrone/searchExtender.js b/src/main/webapp/js/isochrone/searchExtender.js deleted file mode 100644 index dc4408b8..00000000 --- a/src/main/webapp/js/isochrone/searchExtender.js +++ /dev/null @@ -1,353 +0,0 @@ -/** - * @class SearchExtender - */ -define(['jQueryUI', 'console', 'isochrone/configuration', 'util/stringUtils'], function($, logger, Configuration, StringUtils) { - function SearchExtender(m, callback) { - var callbackFn = null; - var configIsochroneDiv = null; - var geosearchEventName = 'geosearch_showresult'; - var iconIsochrone = null; - var iconDiv = null; - var isActive = true; - var map = null; - var self = this; - - // Constructors - - callbackFn = callback; - map = m; - - // Public methods - - /** - * @public - * @method SearchExtender#extendResult - */ - this.extendResult = function() { - appendMapListener(); - appendStateListeners(); - }; - - /** - * @public - * @method SearchExtender#setState - */ - this.setState = function(state) { - isActive = state; - - if (iconDiv) { - $(iconDiv).toggleClass('geosearch-result-icons-disabled', !isActive); - } - - if (!isActive) { - clearDatasetConfigTab(); - } - }; - - // Private methods - - /** - * @private - * @method SearchExtender#appendIconListener - */ - function appendIconListener(geosearchResultEl, datasetConfigs, pointArr) { - logger.debug('Appending icon listeners for searchExtender'); - - $(iconIsochrone).on('click', function() { - if (!isActive) { - logger.debug('Not calling extended search function, since state is inactive'); - return; - } - - showIsochroneConfig(geosearchResultEl, datasetConfigs, pointArr); - }); - } - - /** - * @private - * @method SearchExtender#appendMapListener - */ - function appendMapListener() { - logger.debug('Appending map listeners for searchExtender'); - - map.on(geosearchEventName, onSearchResult.bind(this)); - } - - /** - * @private - * @method SearchExtender#appendStateListeners - */ - function appendStateListeners() { - var fnDisable = self.setState.bind(this, false), - fnEnable = self.setState.bind(this, true); - - logger.debug('Appending state listeners for searchExtender'); - - $(document).on('websocket_close', fnDisable); - $(document).on('websocket_open', fnEnable); - } - - /** - * @private - * @method SearchExtender#clearDatasetConfigTab - */ - function clearDatasetConfigTab() { - if (configIsochroneDiv === null) { - return; - } - - $(configIsochroneDiv).remove(); - configIsochroneDiv = null; - } - - /** - * @private - * @method SearchExtender#createDatasetConfigTab - */ - function createDatasetConfigTab(cfg) { - var a = document.createElement('a'), - container1 = document.createElement('div'), - container2 = document.createElement('div'), - divContent = document.createElement('div'), - date = (cfg.date === null) ? new Date() : cfg.date, - displayDMax = document.createElement('span'), - divDMax = document.createElement('div'), - divIcons = document.createElement('div'), - divStart = document.createElement('div'), - inputDate = document.createElement('input'), - labelDate = document.createElement('label'), - labelDMax = document.createElement('label'), - tabLi = document.createElement('li'), - tabContent = document.createElement('span'), - tabDiv = document.createElement('div'), - tabId = cfg.datasetName; - - a.href = '#' + tabId; - a.appendChild(document.createTextNode(cfg.datasetName)); - tabLi.appendChild(a); - - divContent.className = tabId + '-isochrone-config-content isochrone-config-content'; - divContent.id = tabId + '-isochrone-config-content'; - - inputDate.className = tabId + '-dataset-datetimepicker dataset-datetimepicker'; - inputDate.id = tabId + '-datetimepicker'; - inputDate.value = StringUtils.dateToString(date); - labelDate.setAttribute('for', tabId + '-datetimepicker'); - labelDate.innerHTML = 'Datum:'; - - displayDMax.className = tabId + '-dmax-display dmax-display'; - displayDMax.id = tabId + '-dmax-display'; - displayDMax.appendChild(document.createTextNode('15min')); - divDMax.className = tabId + '-dataset-dmax-slider dataset-dmax-slider'; - divDMax.id = tabId + '-dmax-slider'; - labelDMax.setAttribute('for', tabId + '-dmax-slider'); - labelDMax.innerHTML = 'DMax:'; - - container1.className = 'container container-date'; - container1.appendChild(labelDate); - container1.appendChild(inputDate); - container2.className = 'container container-dmax'; - container2.appendChild(labelDMax); - container2.appendChild(divDMax); - container2.appendChild(displayDMax); - - divContent.appendChild(container1); - divContent.appendChild(container2); - - divStart.className = tabId + '-icon-isochrone-start-calc icon-isochrone-start-calc'; - divStart.id = tabId + '-icon-isochrone-start-calc'; - divStart.appendChild(document.createTextNode('Start')); - - divIcons.className = tabId + '-isochrone-config-icons isochrone-config-icons'; - divIcons.id = tabId + '-isochrone-config-icons'; - divIcons.appendChild(divStart); - - tabContent.appendChild(divIcons); - tabContent.appendChild(divContent); - - tabDiv.id = tabId; - tabDiv.className = tabId + '-dataset dataset'; - tabDiv.appendChild(tabContent); - - return { - li: tabLi, - div: tabDiv - }; - } - - /** - * @private - * @method SearchExtender#getDmaxSliderSteps - */ - function getDmaxSliderSteps() { - return [{ - display: '1min', - seconds: 60 - }, { - display: '5min', - seconds: 300 - }, { - display: '10min', - seconds: 600 - }, { - display: '15min', - seconds: 900 - }, { - display: '30min', - seconds: 1800 - }, { - display: '1h', - seconds: 3600 - }, { - display: '3h', - seconds: 10800 - }, { - display: '6h', - seconds: 21600 - }, { - display: '9h', - seconds: 32400 - }, { - display: '12h', - seconds: 43200 - }, { - display: '24h', - seconds: 86400 - }]; - } - - /** - * @private - * @method SearchExtender#getDSetConfigs - */ - function getDSetConfigs(point) { - var config = Configuration.getInstance(), - configCandidates = [], - datasetConfigs = config.getDatasetConfigMap(); - - for (var dSetConfigName in datasetConfigs) { - var dSetConfig = datasetConfigs[dSetConfigName]; - if (dSetConfig.bBoxLatLng.contains(point)) { - configCandidates[configCandidates.length] = dSetConfig; - } - } - - // Check if only one datasets bbox contains the query point. - var resultLength = configCandidates.length; - if (resultLength === 0) { - return []; - } - - if (resultLength === 1) { - return configCandidates; - } - - configCandidates.sort(sortDatasetFn); - return configCandidates; - } - - /** - * @private - * @method SearchExtender#onSearchResult - */ - function onSearchResult(data) { - var dSetConfigs = null, - liFirstChild, - geosearchResultEl = data.element; - - clearDatasetConfigTab(); - if (!data.point) { - return; - } - - dSetConfigs = getDSetConfigs(data.point); - if (!dSetConfigs || dSetConfigs.length <= 0) { - return; - } - - iconDiv = document.createElement('div'); - liFirstChild = $(geosearchResultEl).find('li:first div'); - - iconIsochrone = document.createElement('div'); - iconIsochrone.id = 'icon-isochrone'; - iconIsochrone.className = 'icon-isochrone'; - iconIsochrone.appendChild(document.createTextNode('Isochrone')); - - iconDiv.className = 'geosearch-result-icons'; - iconDiv.appendChild(iconIsochrone); - - $(iconDiv).insertBefore(liFirstChild); - appendIconListener(geosearchResultEl, dSetConfigs, [data.point]); - } - - /** - * @private - * @method SearchExtender#showIsochroneConfig - */ - function showIsochroneConfig(geosearchResultEl, datasetConfigs, pointArr) { - // we write the datasetconfigs to a map while creating the config tabs, so - // that they can easily be retrieved on start button click - var datasetMap = {}, - i = 0, - sliderSteps = getDmaxSliderSteps(), - tabContainer = document.createElement('div'), - tabList = document.createElement('ul'); - - tabContainer.appendChild(tabList); - - for (i = 0; i < datasetConfigs.length; ++i) { - datasetMap[datasetConfigs[i].datasetName] = datasetConfigs[i]; - - var o = createDatasetConfigTab(datasetConfigs[i]); - tabList.appendChild(o.li); - tabContainer.appendChild(o.div); - } - - configIsochroneDiv = document.createElement('div'); - configIsochroneDiv.id = 'leaflet-control-geosearch-result-config'; - configIsochroneDiv.className = 'leaflet-control-geosearch-result-config'; - configIsochroneDiv.appendChild(tabContainer); - - $(configIsochroneDiv).insertAfter($(geosearchResultEl).parent()); - - $('.dataset .dataset-datetimepicker').datetimepicker({ - dateFormat: 'dd.mm.yy', - timeFormat: 'HH:mm' - }); - $('.dataset .dataset-dmax-slider').slider({ - animate: true, - min: 0, - max: sliderSteps.length - 1, - step: 1, - value: 3, - slide: function(event, ui) { - $(this).siblings('.dmax-display').html(sliderSteps[ui.value].display); - } - }); - $(tabContainer).tabs().on('click', '.icon-isochrone-start-calc', function() { - var datasetDiv = $(this).parents('div.dataset'), - datasetName = datasetDiv.attr('id'), - date = datasetDiv.find('.dataset-datetimepicker').datepicker('getDate'), - sliderValue = datasetDiv.find('.dataset-dmax-slider').slider('option', 'value'); - - callbackFn(datasetMap[datasetName], pointArr, { - datetime: date.getTime(), - dmax: sliderSteps[sliderValue].seconds - }); - }); - } - - /** - * @private - * @method SearchExtender#sortDatasetFn - */ - function sortDatasetFn(d0, d1) { - var s0 = d0.bBox.getSize(), - s1 = d1.bBox.getSize(); - - return (s0.x * s0.y) - (s1.x * s1.y); - } - } - - return SearchExtender; -}); diff --git a/src/main/webapp/js/lib/console.js b/src/main/webapp/js/lib/console.js deleted file mode 100644 index b33b25cc..00000000 --- a/src/main/webapp/js/lib/console.js +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2012 Sergiy Kovalchuk (serg472@gmail.com) under the Apache License 2.0 */ -(function() { - if(window.location.hash.toLowerCase() == "#debug" || window.location.href.match(/[&?]debug\b/i)) { - DEBUG = true; - } - - var logProps = ["log", "debug", "info", "warn", "error"]; - var generalProps = ["assert", "clear", "count", "dir", "dirxml", "exception", "group", "groupCollapsed", "groupEnd", "markTimeline", "memoryProfile", "memoryProfileEnd", "profile", "profileEnd", "table", "time", "timeEnd", "timeStamp", "trace"]; - - //console is not available or disabled - if(typeof(window.console) === "undefined" || typeof(DEBUG) === "undefined" || (typeof(DEBUG) === "boolean" && !DEBUG) || (typeof(DEBUG) === "string" && DEBUG.toLowerCase() == "off")) { - //disable all - window.console = {}; - var props = generalProps.concat(logProps); - for(var i=0; i<props.length; i++) { - disableProp(props[i]); - } - } else if(typeof(window.console) !== "undefined") { - //console is available and not disabled - - for(var i=0; i<generalProps.length; i++) { - //enable all general console props if debug mode is on, disable otherwise - if((typeof(DEBUG) === "boolean" && DEBUG) || (typeof(DEBUG) === "string" && DEBUG.toLowerCase() == "on")) { - enableProp(generalProps[i]); - } else { - disableProp(generalProps[i]); - } - } - - //enable log props above logging level - var level = logProps[0]; - if(typeof(DEBUG) === "string") { - level = (DEBUG.toLowerCase() == "on" ? logProps[0] : DEBUG); - } - - var levelReached = false; - for(var i=0; i<logProps.length; i++) { - if(logProps[i] == level) { - levelReached = true; - } - levelReached ? enableProp(logProps[i]) : disableProp(logProps[i]); - } - } - - function disableProp(prop) { - window.console[prop] = function(){}; - } - - function enableProp(prop) { - if(typeof(window.console[prop]) === "undefined") disableProp(prop); - } -})(); \ No newline at end of file diff --git a/src/main/webapp/js/lib/jquery-ui-timepicker-addon.js b/src/main/webapp/js/lib/jquery-ui-timepicker-addon.js deleted file mode 100644 index b7e5adcf..00000000 --- a/src/main/webapp/js/lib/jquery-ui-timepicker-addon.js +++ /dev/null @@ -1,2145 +0,0 @@ -/*! jQuery Timepicker Addon - v1.4.3 - 2013-11-30 -* http://trentrichardson.com/examples/timepicker -* Copyright (c) 2013 Trent Richardson; Licensed MIT */ -(function ($) { - - /* - * Lets not redefine timepicker, Prevent "Uncaught RangeError: Maximum call stack size exceeded" - */ - $.ui.timepicker = $.ui.timepicker || {}; - if ($.ui.timepicker.version) { - return; - } - - /* - * Extend jQueryUI, get it started with our version number - */ - $.extend($.ui, { - timepicker: { - version: "1.4.3" - } - }); - - /* - * Timepicker manager. - * Use the singleton instance of this class, $.timepicker, to interact with the time picker. - * Settings for (groups of) time pickers are maintained in an instance object, - * allowing multiple different settings on the same page. - */ - var Timepicker = function () { - this.regional = []; // Available regional settings, indexed by language code - this.regional[''] = { // Default regional settings - currentText: 'Now', - closeText: 'Done', - amNames: ['AM', 'A'], - pmNames: ['PM', 'P'], - timeFormat: 'HH:mm', - timeSuffix: '', - timeOnlyTitle: 'Choose Time', - timeText: 'Time', - hourText: 'Hour', - minuteText: 'Minute', - secondText: 'Second', - millisecText: 'Millisecond', - microsecText: 'Microsecond', - timezoneText: 'Time Zone', - isRTL: false - }; - this._defaults = { // Global defaults for all the datetime picker instances - showButtonPanel: true, - timeOnly: false, - showHour: null, - showMinute: null, - showSecond: null, - showMillisec: null, - showMicrosec: null, - showTimezone: null, - showTime: true, - stepHour: 1, - stepMinute: 1, - stepSecond: 1, - stepMillisec: 1, - stepMicrosec: 1, - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0, - timezone: null, - hourMin: 0, - minuteMin: 0, - secondMin: 0, - millisecMin: 0, - microsecMin: 0, - hourMax: 23, - minuteMax: 59, - secondMax: 59, - millisecMax: 999, - microsecMax: 999, - minDateTime: null, - maxDateTime: null, - onSelect: null, - hourGrid: 0, - minuteGrid: 0, - secondGrid: 0, - millisecGrid: 0, - microsecGrid: 0, - alwaysSetTime: true, - separator: ' ', - altFieldTimeOnly: true, - altTimeFormat: null, - altSeparator: null, - altTimeSuffix: null, - pickerTimeFormat: null, - pickerTimeSuffix: null, - showTimepicker: true, - timezoneList: null, - addSliderAccess: false, - sliderAccessArgs: null, - controlType: 'slider', - defaultValue: null, - parse: 'strict' - }; - $.extend(this._defaults, this.regional['']); - }; - - $.extend(Timepicker.prototype, { - $input: null, - $altInput: null, - $timeObj: null, - inst: null, - hour_slider: null, - minute_slider: null, - second_slider: null, - millisec_slider: null, - microsec_slider: null, - timezone_select: null, - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0, - timezone: null, - hourMinOriginal: null, - minuteMinOriginal: null, - secondMinOriginal: null, - millisecMinOriginal: null, - microsecMinOriginal: null, - hourMaxOriginal: null, - minuteMaxOriginal: null, - secondMaxOriginal: null, - millisecMaxOriginal: null, - microsecMaxOriginal: null, - ampm: '', - formattedDate: '', - formattedTime: '', - formattedDateTime: '', - timezoneList: null, - units: ['hour', 'minute', 'second', 'millisec', 'microsec'], - support: {}, - control: null, - - /* - * Override the default settings for all instances of the time picker. - * @param {Object} settings object - the new settings to use as defaults (anonymous object) - * @return {Object} the manager object - */ - setDefaults: function (settings) { - extendRemove(this._defaults, settings || {}); - return this; - }, - - /* - * Create a new Timepicker instance - */ - _newInst: function ($input, opts) { - var tp_inst = new Timepicker(), - inlineSettings = {}, - fns = {}, - overrides, i; - - for (var attrName in this._defaults) { - if (this._defaults.hasOwnProperty(attrName)) { - var attrValue = $input.attr('time:' + attrName); - if (attrValue) { - try { - inlineSettings[attrName] = eval(attrValue); - } catch (err) { - inlineSettings[attrName] = attrValue; - } - } - } - } - - overrides = { - beforeShow: function (input, dp_inst) { - if ($.isFunction(tp_inst._defaults.evnts.beforeShow)) { - return tp_inst._defaults.evnts.beforeShow.call($input[0], input, dp_inst, tp_inst); - } - }, - onChangeMonthYear: function (year, month, dp_inst) { - // Update the time as well : this prevents the time from disappearing from the $input field. - tp_inst._updateDateTime(dp_inst); - if ($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)) { - tp_inst._defaults.evnts.onChangeMonthYear.call($input[0], year, month, dp_inst, tp_inst); - } - }, - onClose: function (dateText, dp_inst) { - if (tp_inst.timeDefined === true && $input.val() !== '') { - tp_inst._updateDateTime(dp_inst); - } - if ($.isFunction(tp_inst._defaults.evnts.onClose)) { - tp_inst._defaults.evnts.onClose.call($input[0], dateText, dp_inst, tp_inst); - } - } - }; - for (i in overrides) { - if (overrides.hasOwnProperty(i)) { - fns[i] = opts[i] || null; - } - } - - tp_inst._defaults = $.extend({}, this._defaults, inlineSettings, opts, overrides, { - evnts: fns, - timepicker: tp_inst // add timepicker as a property of datepicker: $.datepicker._get(dp_inst, 'timepicker'); - }); - tp_inst.amNames = $.map(tp_inst._defaults.amNames, function (val) { - return val.toUpperCase(); - }); - tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function (val) { - return val.toUpperCase(); - }); - - // detect which units are supported - tp_inst.support = detectSupport( - tp_inst._defaults.timeFormat + - (tp_inst._defaults.pickerTimeFormat ? tp_inst._defaults.pickerTimeFormat : '') + - (tp_inst._defaults.altTimeFormat ? tp_inst._defaults.altTimeFormat : '')); - - // controlType is string - key to our this._controls - if (typeof(tp_inst._defaults.controlType) === 'string') { - if (tp_inst._defaults.controlType === 'slider' && typeof($.ui.slider) === 'undefined') { - tp_inst._defaults.controlType = 'select'; - } - tp_inst.control = tp_inst._controls[tp_inst._defaults.controlType]; - } - // controlType is an object and must implement create, options, value methods - else { - tp_inst.control = tp_inst._defaults.controlType; - } - - // prep the timezone options - var timezoneList = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -270, -240, -210, -180, -120, -60, - 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 525, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840]; - if (tp_inst._defaults.timezoneList !== null) { - timezoneList = tp_inst._defaults.timezoneList; - } - var tzl = timezoneList.length, tzi = 0, tzv = null; - if (tzl > 0 && typeof timezoneList[0] !== 'object') { - for (; tzi < tzl; tzi++) { - tzv = timezoneList[tzi]; - timezoneList[tzi] = { value: tzv, label: $.timepicker.timezoneOffsetString(tzv, tp_inst.support.iso8601) }; - } - } - tp_inst._defaults.timezoneList = timezoneList; - - // set the default units - tp_inst.timezone = tp_inst._defaults.timezone !== null ? $.timepicker.timezoneOffsetNumber(tp_inst._defaults.timezone) : - ((new Date()).getTimezoneOffset() * -1); - tp_inst.hour = tp_inst._defaults.hour < tp_inst._defaults.hourMin ? tp_inst._defaults.hourMin : - tp_inst._defaults.hour > tp_inst._defaults.hourMax ? tp_inst._defaults.hourMax : tp_inst._defaults.hour; - tp_inst.minute = tp_inst._defaults.minute < tp_inst._defaults.minuteMin ? tp_inst._defaults.minuteMin : - tp_inst._defaults.minute > tp_inst._defaults.minuteMax ? tp_inst._defaults.minuteMax : tp_inst._defaults.minute; - tp_inst.second = tp_inst._defaults.second < tp_inst._defaults.secondMin ? tp_inst._defaults.secondMin : - tp_inst._defaults.second > tp_inst._defaults.secondMax ? tp_inst._defaults.secondMax : tp_inst._defaults.second; - tp_inst.millisec = tp_inst._defaults.millisec < tp_inst._defaults.millisecMin ? tp_inst._defaults.millisecMin : - tp_inst._defaults.millisec > tp_inst._defaults.millisecMax ? tp_inst._defaults.millisecMax : tp_inst._defaults.millisec; - tp_inst.microsec = tp_inst._defaults.microsec < tp_inst._defaults.microsecMin ? tp_inst._defaults.microsecMin : - tp_inst._defaults.microsec > tp_inst._defaults.microsecMax ? tp_inst._defaults.microsecMax : tp_inst._defaults.microsec; - tp_inst.ampm = ''; - tp_inst.$input = $input; - - if (tp_inst._defaults.altField) { - tp_inst.$altInput = $(tp_inst._defaults.altField).css({ - cursor: 'pointer' - }).focus(function () { - $input.trigger("focus"); - }); - } - - if (tp_inst._defaults.minDate === 0 || tp_inst._defaults.minDateTime === 0) { - tp_inst._defaults.minDate = new Date(); - } - if (tp_inst._defaults.maxDate === 0 || tp_inst._defaults.maxDateTime === 0) { - tp_inst._defaults.maxDate = new Date(); - } - - // datepicker needs minDate/maxDate, timepicker needs minDateTime/maxDateTime.. - if (tp_inst._defaults.minDate !== undefined && tp_inst._defaults.minDate instanceof Date) { - tp_inst._defaults.minDateTime = new Date(tp_inst._defaults.minDate.getTime()); - } - if (tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date) { - tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime()); - } - if (tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date) { - tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime()); - } - if (tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date) { - tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime()); - } - tp_inst.$input.bind('focus', function () { - tp_inst._onFocus(); - }); - - return tp_inst; - }, - - /* - * add our sliders to the calendar - */ - _addTimePicker: function (dp_inst) { - var currDT = (this.$altInput && this._defaults.altFieldTimeOnly) ? this.$input.val() + ' ' + this.$altInput.val() : this.$input.val(); - - this.timeDefined = this._parseTime(currDT); - this._limitMinMaxDateTime(dp_inst, false); - this._injectTimePicker(); - }, - - /* - * parse the time string from input value or _setTime - */ - _parseTime: function (timeString, withDate) { - if (!this.inst) { - this.inst = $.datepicker._getInst(this.$input[0]); - } - - if (withDate || !this._defaults.timeOnly) { - var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); - try { - var parseRes = parseDateTimeInternal(dp_dateFormat, this._defaults.timeFormat, timeString, $.datepicker._getFormatConfig(this.inst), this._defaults); - if (!parseRes.timeObj) { - return false; - } - $.extend(this, parseRes.timeObj); - } catch (err) { - $.timepicker.log("Error parsing the date/time string: " + err + - "\ndate/time string = " + timeString + - "\ntimeFormat = " + this._defaults.timeFormat + - "\ndateFormat = " + dp_dateFormat); - return false; - } - return true; - } else { - var timeObj = $.datepicker.parseTime(this._defaults.timeFormat, timeString, this._defaults); - if (!timeObj) { - return false; - } - $.extend(this, timeObj); - return true; - } - }, - - /* - * generate and inject html for timepicker into ui datepicker - */ - _injectTimePicker: function () { - var $dp = this.inst.dpDiv, - o = this.inst.settings, - tp_inst = this, - litem = '', - uitem = '', - show = null, - max = {}, - gridSize = {}, - size = null, - i = 0, - l = 0; - - // Prevent displaying twice - if ($dp.find("div.ui-timepicker-div").length === 0 && o.showTimepicker) { - var noDisplay = ' style="display:none;"', - html = '<div class="ui-timepicker-div' + (o.isRTL ? ' ui-timepicker-rtl' : '') + '"><dl>' + '<dt class="ui_tpicker_time_label"' + ((o.showTime) ? '' : noDisplay) + '>' + o.timeText + '</dt>' + - '<dd class="ui_tpicker_time"' + ((o.showTime) ? '' : noDisplay) + '></dd>'; - - // Create the markup - for (i = 0, l = this.units.length; i < l; i++) { - litem = this.units[i]; - uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); - show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; - - // Added by Peter Medeiros: - // - Figure out what the hour/minute/second max should be based on the step values. - // - Example: if stepMinute is 15, then minMax is 45. - max[litem] = parseInt((o[litem + 'Max'] - ((o[litem + 'Max'] - o[litem + 'Min']) % o['step' + uitem])), 10); - gridSize[litem] = 0; - - html += '<dt class="ui_tpicker_' + litem + '_label"' + (show ? '' : noDisplay) + '>' + o[litem + 'Text'] + '</dt>' + - '<dd class="ui_tpicker_' + litem + '"><div class="ui_tpicker_' + litem + '_slider"' + (show ? '' : noDisplay) + '></div>'; - - if (show && o[litem + 'Grid'] > 0) { - html += '<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>'; - - if (litem === 'hour') { - for (var h = o[litem + 'Min']; h <= max[litem]; h += parseInt(o[litem + 'Grid'], 10)) { - gridSize[litem]++; - var tmph = $.datepicker.formatTime(this.support.ampm ? 'hht' : 'HH', {hour: h}, o); - html += '<td data-for="' + litem + '">' + tmph + '</td>'; - } - } - else { - for (var m = o[litem + 'Min']; m <= max[litem]; m += parseInt(o[litem + 'Grid'], 10)) { - gridSize[litem]++; - html += '<td data-for="' + litem + '">' + ((m < 10) ? '0' : '') + m + '</td>'; - } - } - - html += '</tr></table></div>'; - } - html += '</dd>'; - } - - // Timezone - var showTz = o.showTimezone !== null ? o.showTimezone : this.support.timezone; - html += '<dt class="ui_tpicker_timezone_label"' + (showTz ? '' : noDisplay) + '>' + o.timezoneText + '</dt>'; - html += '<dd class="ui_tpicker_timezone" ' + (showTz ? '' : noDisplay) + '></dd>'; - - // Create the elements from string - html += '</dl></div>'; - var $tp = $(html); - - // if we only want time picker... - if (o.timeOnly === true) { - $tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">' + '<div class="ui-datepicker-title">' + o.timeOnlyTitle + '</div>' + '</div>'); - $dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide(); - } - - // add sliders, adjust grids, add events - for (i = 0, l = tp_inst.units.length; i < l; i++) { - litem = tp_inst.units[i]; - uitem = litem.substr(0, 1).toUpperCase() + litem.substr(1); - show = o['show' + uitem] !== null ? o['show' + uitem] : this.support[litem]; - - // add the slider - tp_inst[litem + '_slider'] = tp_inst.control.create(tp_inst, $tp.find('.ui_tpicker_' + litem + '_slider'), litem, tp_inst[litem], o[litem + 'Min'], max[litem], o['step' + uitem]); - - // adjust the grid and add click event - if (show && o[litem + 'Grid'] > 0) { - size = 100 * gridSize[litem] * o[litem + 'Grid'] / (max[litem] - o[litem + 'Min']); - $tp.find('.ui_tpicker_' + litem + ' table').css({ - width: size + "%", - marginLeft: o.isRTL ? '0' : ((size / (-2 * gridSize[litem])) + "%"), - marginRight: o.isRTL ? ((size / (-2 * gridSize[litem])) + "%") : '0', - borderCollapse: 'collapse' - }).find("td").click(function (e) { - var $t = $(this), - h = $t.html(), - n = parseInt(h.replace(/[^0-9]/g), 10), - ap = h.replace(/[^apm]/ig), - f = $t.data('for'); // loses scope, so we use data-for - - if (f === 'hour') { - if (ap.indexOf('p') !== -1 && n < 12) { - n += 12; - } - else { - if (ap.indexOf('a') !== -1 && n === 12) { - n = 0; - } - } - } - - tp_inst.control.value(tp_inst, tp_inst[f + '_slider'], litem, n); - - tp_inst._onTimeChange(); - tp_inst._onSelectHandler(); - }).css({ - cursor: 'pointer', - width: (100 / gridSize[litem]) + '%', - textAlign: 'center', - overflow: 'hidden' - }); - } // end if grid > 0 - } // end for loop - - // Add timezone options - this.timezone_select = $tp.find('.ui_tpicker_timezone').append('<select></select>').find("select"); - $.fn.append.apply(this.timezone_select, - $.map(o.timezoneList, function (val, idx) { - return $("<option />").val(typeof val === "object" ? val.value : val).text(typeof val === "object" ? val.label : val); - })); - if (typeof(this.timezone) !== "undefined" && this.timezone !== null && this.timezone !== "") { - var local_timezone = (new Date(this.inst.selectedYear, this.inst.selectedMonth, this.inst.selectedDay, 12)).getTimezoneOffset() * -1; - if (local_timezone === this.timezone) { - selectLocalTimezone(tp_inst); - } else { - this.timezone_select.val(this.timezone); - } - } else { - if (typeof(this.hour) !== "undefined" && this.hour !== null && this.hour !== "") { - this.timezone_select.val(o.timezone); - } else { - selectLocalTimezone(tp_inst); - } - } - this.timezone_select.change(function () { - tp_inst._onTimeChange(); - tp_inst._onSelectHandler(); - }); - // End timezone options - - // inject timepicker into datepicker - var $buttonPanel = $dp.find('.ui-datepicker-buttonpane'); - if ($buttonPanel.length) { - $buttonPanel.before($tp); - } else { - $dp.append($tp); - } - - this.$timeObj = $tp.find('.ui_tpicker_time'); - - if (this.inst !== null) { - var timeDefined = this.timeDefined; - this._onTimeChange(); - this.timeDefined = timeDefined; - } - - // slideAccess integration: http://trentrichardson.com/2011/11/11/jquery-ui-sliders-and-touch-accessibility/ - if (this._defaults.addSliderAccess) { - var sliderAccessArgs = this._defaults.sliderAccessArgs, - rtl = this._defaults.isRTL; - sliderAccessArgs.isRTL = rtl; - - setTimeout(function () { // fix for inline mode - if ($tp.find('.ui-slider-access').length === 0) { - $tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs); - - // fix any grids since sliders are shorter - var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true); - if (sliderAccessWidth) { - $tp.find('table:visible').each(function () { - var $g = $(this), - oldWidth = $g.outerWidth(), - oldMarginLeft = $g.css(rtl ? 'marginRight' : 'marginLeft').toString().replace('%', ''), - newWidth = oldWidth - sliderAccessWidth, - newMarginLeft = ((oldMarginLeft * newWidth) / oldWidth) + '%', - css = { width: newWidth, marginRight: 0, marginLeft: 0 }; - css[rtl ? 'marginRight' : 'marginLeft'] = newMarginLeft; - $g.css(css); - }); - } - } - }, 10); - } - // end slideAccess integration - - tp_inst._limitMinMaxDateTime(this.inst, true); - } - }, - - /* - * This function tries to limit the ability to go outside the - * min/max date range - */ - _limitMinMaxDateTime: function (dp_inst, adjustSliders) { - var o = this._defaults, - dp_date = new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay); - - if (!this._defaults.showTimepicker) { - return; - } // No time so nothing to check here - - if ($.datepicker._get(dp_inst, 'minDateTime') !== null && $.datepicker._get(dp_inst, 'minDateTime') !== undefined && dp_date) { - var minDateTime = $.datepicker._get(dp_inst, 'minDateTime'), - minDateTimeDate = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), 0, 0, 0, 0); - - if (this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null || this.microsecMinOriginal === null) { - this.hourMinOriginal = o.hourMin; - this.minuteMinOriginal = o.minuteMin; - this.secondMinOriginal = o.secondMin; - this.millisecMinOriginal = o.millisecMin; - this.microsecMinOriginal = o.microsecMin; - } - - if (dp_inst.settings.timeOnly || minDateTimeDate.getTime() === dp_date.getTime()) { - this._defaults.hourMin = minDateTime.getHours(); - if (this.hour <= this._defaults.hourMin) { - this.hour = this._defaults.hourMin; - this._defaults.minuteMin = minDateTime.getMinutes(); - if (this.minute <= this._defaults.minuteMin) { - this.minute = this._defaults.minuteMin; - this._defaults.secondMin = minDateTime.getSeconds(); - if (this.second <= this._defaults.secondMin) { - this.second = this._defaults.secondMin; - this._defaults.millisecMin = minDateTime.getMilliseconds(); - if (this.millisec <= this._defaults.millisecMin) { - this.millisec = this._defaults.millisecMin; - this._defaults.microsecMin = minDateTime.getMicroseconds(); - } else { - if (this.microsec < this._defaults.microsecMin) { - this.microsec = this._defaults.microsecMin; - } - this._defaults.microsecMin = this.microsecMinOriginal; - } - } else { - this._defaults.millisecMin = this.millisecMinOriginal; - this._defaults.microsecMin = this.microsecMinOriginal; - } - } else { - this._defaults.secondMin = this.secondMinOriginal; - this._defaults.millisecMin = this.millisecMinOriginal; - this._defaults.microsecMin = this.microsecMinOriginal; - } - } else { - this._defaults.minuteMin = this.minuteMinOriginal; - this._defaults.secondMin = this.secondMinOriginal; - this._defaults.millisecMin = this.millisecMinOriginal; - this._defaults.microsecMin = this.microsecMinOriginal; - } - } else { - this._defaults.hourMin = this.hourMinOriginal; - this._defaults.minuteMin = this.minuteMinOriginal; - this._defaults.secondMin = this.secondMinOriginal; - this._defaults.millisecMin = this.millisecMinOriginal; - this._defaults.microsecMin = this.microsecMinOriginal; - } - } - - if ($.datepicker._get(dp_inst, 'maxDateTime') !== null && $.datepicker._get(dp_inst, 'maxDateTime') !== undefined && dp_date) { - var maxDateTime = $.datepicker._get(dp_inst, 'maxDateTime'), - maxDateTimeDate = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), 0, 0, 0, 0); - - if (this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null || this.millisecMaxOriginal === null) { - this.hourMaxOriginal = o.hourMax; - this.minuteMaxOriginal = o.minuteMax; - this.secondMaxOriginal = o.secondMax; - this.millisecMaxOriginal = o.millisecMax; - this.microsecMaxOriginal = o.microsecMax; - } - - if (dp_inst.settings.timeOnly || maxDateTimeDate.getTime() === dp_date.getTime()) { - this._defaults.hourMax = maxDateTime.getHours(); - if (this.hour >= this._defaults.hourMax) { - this.hour = this._defaults.hourMax; - this._defaults.minuteMax = maxDateTime.getMinutes(); - if (this.minute >= this._defaults.minuteMax) { - this.minute = this._defaults.minuteMax; - this._defaults.secondMax = maxDateTime.getSeconds(); - if (this.second >= this._defaults.secondMax) { - this.second = this._defaults.secondMax; - this._defaults.millisecMax = maxDateTime.getMilliseconds(); - if (this.millisec >= this._defaults.millisecMax) { - this.millisec = this._defaults.millisecMax; - this._defaults.microsecMax = maxDateTime.getMicroseconds(); - } else { - if (this.microsec > this._defaults.microsecMax) { - this.microsec = this._defaults.microsecMax; - } - this._defaults.microsecMax = this.microsecMaxOriginal; - } - } else { - this._defaults.millisecMax = this.millisecMaxOriginal; - this._defaults.microsecMax = this.microsecMaxOriginal; - } - } else { - this._defaults.secondMax = this.secondMaxOriginal; - this._defaults.millisecMax = this.millisecMaxOriginal; - this._defaults.microsecMax = this.microsecMaxOriginal; - } - } else { - this._defaults.minuteMax = this.minuteMaxOriginal; - this._defaults.secondMax = this.secondMaxOriginal; - this._defaults.millisecMax = this.millisecMaxOriginal; - this._defaults.microsecMax = this.microsecMaxOriginal; - } - } else { - this._defaults.hourMax = this.hourMaxOriginal; - this._defaults.minuteMax = this.minuteMaxOriginal; - this._defaults.secondMax = this.secondMaxOriginal; - this._defaults.millisecMax = this.millisecMaxOriginal; - this._defaults.microsecMax = this.microsecMaxOriginal; - } - } - - if (adjustSliders !== undefined && adjustSliders === true) { - var hourMax = parseInt((this._defaults.hourMax - ((this._defaults.hourMax - this._defaults.hourMin) % this._defaults.stepHour)), 10), - minMax = parseInt((this._defaults.minuteMax - ((this._defaults.minuteMax - this._defaults.minuteMin) % this._defaults.stepMinute)), 10), - secMax = parseInt((this._defaults.secondMax - ((this._defaults.secondMax - this._defaults.secondMin) % this._defaults.stepSecond)), 10), - millisecMax = parseInt((this._defaults.millisecMax - ((this._defaults.millisecMax - this._defaults.millisecMin) % this._defaults.stepMillisec)), 10), - microsecMax = parseInt((this._defaults.microsecMax - ((this._defaults.microsecMax - this._defaults.microsecMin) % this._defaults.stepMicrosec)), 10); - - if (this.hour_slider) { - this.control.options(this, this.hour_slider, 'hour', { min: this._defaults.hourMin, max: hourMax }); - this.control.value(this, this.hour_slider, 'hour', this.hour - (this.hour % this._defaults.stepHour)); - } - if (this.minute_slider) { - this.control.options(this, this.minute_slider, 'minute', { min: this._defaults.minuteMin, max: minMax }); - this.control.value(this, this.minute_slider, 'minute', this.minute - (this.minute % this._defaults.stepMinute)); - } - if (this.second_slider) { - this.control.options(this, this.second_slider, 'second', { min: this._defaults.secondMin, max: secMax }); - this.control.value(this, this.second_slider, 'second', this.second - (this.second % this._defaults.stepSecond)); - } - if (this.millisec_slider) { - this.control.options(this, this.millisec_slider, 'millisec', { min: this._defaults.millisecMin, max: millisecMax }); - this.control.value(this, this.millisec_slider, 'millisec', this.millisec - (this.millisec % this._defaults.stepMillisec)); - } - if (this.microsec_slider) { - this.control.options(this, this.microsec_slider, 'microsec', { min: this._defaults.microsecMin, max: microsecMax }); - this.control.value(this, this.microsec_slider, 'microsec', this.microsec - (this.microsec % this._defaults.stepMicrosec)); - } - } - - }, - - /* - * when a slider moves, set the internal time... - * on time change is also called when the time is updated in the text field - */ - _onTimeChange: function () { - if (!this._defaults.showTimepicker) { - return; - } - var hour = (this.hour_slider) ? this.control.value(this, this.hour_slider, 'hour') : false, - minute = (this.minute_slider) ? this.control.value(this, this.minute_slider, 'minute') : false, - second = (this.second_slider) ? this.control.value(this, this.second_slider, 'second') : false, - millisec = (this.millisec_slider) ? this.control.value(this, this.millisec_slider, 'millisec') : false, - microsec = (this.microsec_slider) ? this.control.value(this, this.microsec_slider, 'microsec') : false, - timezone = (this.timezone_select) ? this.timezone_select.val() : false, - o = this._defaults, - pickerTimeFormat = o.pickerTimeFormat || o.timeFormat, - pickerTimeSuffix = o.pickerTimeSuffix || o.timeSuffix; - - if (typeof(hour) === 'object') { - hour = false; - } - if (typeof(minute) === 'object') { - minute = false; - } - if (typeof(second) === 'object') { - second = false; - } - if (typeof(millisec) === 'object') { - millisec = false; - } - if (typeof(microsec) === 'object') { - microsec = false; - } - if (typeof(timezone) === 'object') { - timezone = false; - } - - if (hour !== false) { - hour = parseInt(hour, 10); - } - if (minute !== false) { - minute = parseInt(minute, 10); - } - if (second !== false) { - second = parseInt(second, 10); - } - if (millisec !== false) { - millisec = parseInt(millisec, 10); - } - if (microsec !== false) { - microsec = parseInt(microsec, 10); - } - if (timezone !== false) { - timezone = timezone.toString(); - } - - var ampm = o[hour < 12 ? 'amNames' : 'pmNames'][0]; - - // If the update was done in the input field, the input field should not be updated. - // If the update was done using the sliders, update the input field. - var hasChanged = ( - hour !== parseInt(this.hour,10) || // sliders should all be numeric - minute !== parseInt(this.minute,10) || - second !== parseInt(this.second,10) || - millisec !== parseInt(this.millisec,10) || - microsec !== parseInt(this.microsec,10) || - (this.ampm.length > 0 && (hour < 12) !== ($.inArray(this.ampm.toUpperCase(), this.amNames) !== -1)) || - (this.timezone !== null && timezone !== this.timezone.toString()) // could be numeric or "EST" format, so use toString() - ); - - if (hasChanged) { - - if (hour !== false) { - this.hour = hour; - } - if (minute !== false) { - this.minute = minute; - } - if (second !== false) { - this.second = second; - } - if (millisec !== false) { - this.millisec = millisec; - } - if (microsec !== false) { - this.microsec = microsec; - } - if (timezone !== false) { - this.timezone = timezone; - } - - if (!this.inst) { - this.inst = $.datepicker._getInst(this.$input[0]); - } - - this._limitMinMaxDateTime(this.inst, true); - } - if (this.support.ampm) { - this.ampm = ampm; - } - - // Updates the time within the timepicker - this.formattedTime = $.datepicker.formatTime(o.timeFormat, this, o); - if (this.$timeObj) { - if (pickerTimeFormat === o.timeFormat) { - this.$timeObj.text(this.formattedTime + pickerTimeSuffix); - } - else { - this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat, this, o) + pickerTimeSuffix); - } - } - - this.timeDefined = true; - if (hasChanged) { - this._updateDateTime(); - this.$input.focus(); - } - }, - - /* - * call custom onSelect. - * bind to sliders slidestop, and grid click. - */ - _onSelectHandler: function () { - var onSelect = this._defaults.onSelect || this.inst.settings.onSelect; - var inputEl = this.$input ? this.$input[0] : null; - if (onSelect && inputEl) { - onSelect.apply(inputEl, [this.formattedDateTime, this]); - } - }, - - /* - * update our input with the new date time.. - */ - _updateDateTime: function (dp_inst) { - dp_inst = this.inst || dp_inst; - var dtTmp = (dp_inst.currentYear > 0? - new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay) : - new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)), - dt = $.datepicker._daylightSavingAdjust(dtTmp), - //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)), - //dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.currentYear, dp_inst.currentMonth, dp_inst.currentDay)), - dateFmt = $.datepicker._get(dp_inst, 'dateFormat'), - formatCfg = $.datepicker._getFormatConfig(dp_inst), - timeAvailable = dt !== null && this.timeDefined; - this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); - var formattedDateTime = this.formattedDate; - - // if a slider was changed but datepicker doesn't have a value yet, set it - if (dp_inst.lastVal === "") { - dp_inst.currentYear = dp_inst.selectedYear; - dp_inst.currentMonth = dp_inst.selectedMonth; - dp_inst.currentDay = dp_inst.selectedDay; - } - - /* - * remove following lines to force every changes in date picker to change the input value - * Bug descriptions: when an input field has a default value, and click on the field to pop up the date picker. - * If the user manually empty the value in the input field, the date picker will never change selected value. - */ - //if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) { - // return; - //} - - if (this._defaults.timeOnly === true) { - formattedDateTime = this.formattedTime; - } else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { - formattedDateTime += this._defaults.separator + this.formattedTime + this._defaults.timeSuffix; - } - - this.formattedDateTime = formattedDateTime; - - if (!this._defaults.showTimepicker) { - this.$input.val(this.formattedDate); - } else if (this.$altInput && this._defaults.timeOnly === false && this._defaults.altFieldTimeOnly === true) { - this.$altInput.val(this.formattedTime); - this.$input.val(this.formattedDate); - } else if (this.$altInput) { - this.$input.val(formattedDateTime); - var altFormattedDateTime = '', - altSeparator = this._defaults.altSeparator ? this._defaults.altSeparator : this._defaults.separator, - altTimeSuffix = this._defaults.altTimeSuffix ? this._defaults.altTimeSuffix : this._defaults.timeSuffix; - - if (!this._defaults.timeOnly) { - if (this._defaults.altFormat) { - altFormattedDateTime = $.datepicker.formatDate(this._defaults.altFormat, (dt === null ? new Date() : dt), formatCfg); - } - else { - altFormattedDateTime = this.formattedDate; - } - - if (altFormattedDateTime) { - altFormattedDateTime += altSeparator; - } - } - - if (this._defaults.altTimeFormat) { - altFormattedDateTime += $.datepicker.formatTime(this._defaults.altTimeFormat, this, this._defaults) + altTimeSuffix; - } - else { - altFormattedDateTime += this.formattedTime + altTimeSuffix; - } - this.$altInput.val(altFormattedDateTime); - } else { - this.$input.val(formattedDateTime); - } - - this.$input.trigger("change"); - }, - - _onFocus: function () { - if (!this.$input.val() && this._defaults.defaultValue) { - this.$input.val(this._defaults.defaultValue); - var inst = $.datepicker._getInst(this.$input.get(0)), - tp_inst = $.datepicker._get(inst, 'timepicker'); - if (tp_inst) { - if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) { - try { - $.datepicker._updateDatepicker(inst); - } catch (err) { - $.timepicker.log(err); - } - } - } - } - }, - - /* - * Small abstraction to control types - * We can add more, just be sure to follow the pattern: create, options, value - */ - _controls: { - // slider methods - slider: { - create: function (tp_inst, obj, unit, val, min, max, step) { - var rtl = tp_inst._defaults.isRTL; // if rtl go -60->0 instead of 0->60 - return obj.prop('slide', null).slider({ - orientation: "horizontal", - value: rtl ? val * -1 : val, - min: rtl ? max * -1 : min, - max: rtl ? min * -1 : max, - step: step, - slide: function (event, ui) { - tp_inst.control.value(tp_inst, $(this), unit, rtl ? ui.value * -1 : ui.value); - tp_inst._onTimeChange(); - }, - stop: function (event, ui) { - tp_inst._onSelectHandler(); - } - }); - }, - options: function (tp_inst, obj, unit, opts, val) { - if (tp_inst._defaults.isRTL) { - if (typeof(opts) === 'string') { - if (opts === 'min' || opts === 'max') { - if (val !== undefined) { - return obj.slider(opts, val * -1); - } - return Math.abs(obj.slider(opts)); - } - return obj.slider(opts); - } - var min = opts.min, - max = opts.max; - opts.min = opts.max = null; - if (min !== undefined) { - opts.max = min * -1; - } - if (max !== undefined) { - opts.min = max * -1; - } - return obj.slider(opts); - } - if (typeof(opts) === 'string' && val !== undefined) { - return obj.slider(opts, val); - } - return obj.slider(opts); - }, - value: function (tp_inst, obj, unit, val) { - if (tp_inst._defaults.isRTL) { - if (val !== undefined) { - return obj.slider('value', val * -1); - } - return Math.abs(obj.slider('value')); - } - if (val !== undefined) { - return obj.slider('value', val); - } - return obj.slider('value'); - } - }, - // select methods - select: { - create: function (tp_inst, obj, unit, val, min, max, step) { - var sel = '<select class="ui-timepicker-select" data-unit="' + unit + '" data-min="' + min + '" data-max="' + max + '" data-step="' + step + '">', - format = tp_inst._defaults.pickerTimeFormat || tp_inst._defaults.timeFormat; - - for (var i = min; i <= max; i += step) { - sel += '<option value="' + i + '"' + (i === val ? ' selected' : '') + '>'; - if (unit === 'hour') { - sel += $.datepicker.formatTime($.trim(format.replace(/[^ht ]/ig, '')), {hour: i}, tp_inst._defaults); - } - else if (unit === 'millisec' || unit === 'microsec' || i >= 10) { sel += i; } - else {sel += '0' + i.toString(); } - sel += '</option>'; - } - sel += '</select>'; - - obj.children('select').remove(); - - $(sel).appendTo(obj).change(function (e) { - tp_inst._onTimeChange(); - tp_inst._onSelectHandler(); - }); - - return obj; - }, - options: function (tp_inst, obj, unit, opts, val) { - var o = {}, - $t = obj.children('select'); - if (typeof(opts) === 'string') { - if (val === undefined) { - return $t.data(opts); - } - o[opts] = val; - } - else { o = opts; } - return tp_inst.control.create(tp_inst, obj, $t.data('unit'), $t.val(), o.min || $t.data('min'), o.max || $t.data('max'), o.step || $t.data('step')); - }, - value: function (tp_inst, obj, unit, val) { - var $t = obj.children('select'); - if (val !== undefined) { - return $t.val(val); - } - return $t.val(); - } - } - } // end _controls - - }); - - $.fn.extend({ - /* - * shorthand just to use timepicker. - */ - timepicker: function (o) { - o = o || {}; - var tmp_args = Array.prototype.slice.call(arguments); - - if (typeof o === 'object') { - tmp_args[0] = $.extend(o, { - timeOnly: true - }); - } - - return $(this).each(function () { - $.fn.datetimepicker.apply($(this), tmp_args); - }); - }, - - /* - * extend timepicker to datepicker - */ - datetimepicker: function (o) { - o = o || {}; - var tmp_args = arguments; - - if (typeof(o) === 'string') { - if (o === 'getDate') { - return $.fn.datepicker.apply($(this[0]), tmp_args); - } else { - return this.each(function () { - var $t = $(this); - $t.datepicker.apply($t, tmp_args); - }); - } - } else { - return this.each(function () { - var $t = $(this); - $t.datepicker($.timepicker._newInst($t, o)._defaults); - }); - } - } - }); - - /* - * Public Utility to parse date and time - */ - $.datepicker.parseDateTime = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { - var parseRes = parseDateTimeInternal(dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings); - if (parseRes.timeObj) { - var t = parseRes.timeObj; - parseRes.date.setHours(t.hour, t.minute, t.second, t.millisec); - parseRes.date.setMicroseconds(t.microsec); - } - - return parseRes.date; - }; - - /* - * Public utility to parse time - */ - $.datepicker.parseTime = function (timeFormat, timeString, options) { - var o = extendRemove(extendRemove({}, $.timepicker._defaults), options || {}), - iso8601 = (timeFormat.replace(/\'.*?\'/g, '').indexOf('Z') !== -1); - - // Strict parse requires the timeString to match the timeFormat exactly - var strictParse = function (f, s, o) { - - // pattern for standard and localized AM/PM markers - var getPatternAmpm = function (amNames, pmNames) { - var markers = []; - if (amNames) { - $.merge(markers, amNames); - } - if (pmNames) { - $.merge(markers, pmNames); - } - markers = $.map(markers, function (val) { - return val.replace(/[.*+?|()\[\]{}\\]/g, '\\$&'); - }); - return '(' + markers.join('|') + ')?'; - }; - - // figure out position of time elements.. cause js cant do named captures - var getFormatPositions = function (timeFormat) { - var finds = timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|c{1}|t{1,2}|z|'.*?')/g), - orders = { - h: -1, - m: -1, - s: -1, - l: -1, - c: -1, - t: -1, - z: -1 - }; - - if (finds) { - for (var i = 0; i < finds.length; i++) { - if (orders[finds[i].toString().charAt(0)] === -1) { - orders[finds[i].toString().charAt(0)] = i + 1; - } - } - } - return orders; - }; - - var regstr = '^' + f.toString() - .replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) { - var ml = match.length; - switch (match.charAt(0).toLowerCase()) { - case 'h': - return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; - case 'm': - return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; - case 's': - return ml === 1 ? '(\\d?\\d)' : '(\\d{' + ml + '})'; - case 'l': - return '(\\d?\\d?\\d)'; - case 'c': - return '(\\d?\\d?\\d)'; - case 'z': - return '(z|[-+]\\d\\d:?\\d\\d|\\S+)?'; - case 't': - return getPatternAmpm(o.amNames, o.pmNames); - default: // literal escaped in quotes - return '(' + match.replace(/\'/g, "").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g, function (m) { return "\\" + m; }) + ')?'; - } - }) - .replace(/\s/g, '\\s?') + - o.timeSuffix + '$', - order = getFormatPositions(f), - ampm = '', - treg; - - treg = s.match(new RegExp(regstr, 'i')); - - var resTime = { - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0 - }; - - if (treg) { - if (order.t !== -1) { - if (treg[order.t] === undefined || treg[order.t].length === 0) { - ampm = ''; - resTime.ampm = ''; - } else { - ampm = $.inArray(treg[order.t].toUpperCase(), o.amNames) !== -1 ? 'AM' : 'PM'; - resTime.ampm = o[ampm === 'AM' ? 'amNames' : 'pmNames'][0]; - } - } - - if (order.h !== -1) { - if (ampm === 'AM' && treg[order.h] === '12') { - resTime.hour = 0; // 12am = 0 hour - } else { - if (ampm === 'PM' && treg[order.h] !== '12') { - resTime.hour = parseInt(treg[order.h], 10) + 12; // 12pm = 12 hour, any other pm = hour + 12 - } else { - resTime.hour = Number(treg[order.h]); - } - } - } - - if (order.m !== -1) { - resTime.minute = Number(treg[order.m]); - } - if (order.s !== -1) { - resTime.second = Number(treg[order.s]); - } - if (order.l !== -1) { - resTime.millisec = Number(treg[order.l]); - } - if (order.c !== -1) { - resTime.microsec = Number(treg[order.c]); - } - if (order.z !== -1 && treg[order.z] !== undefined) { - resTime.timezone = $.timepicker.timezoneOffsetNumber(treg[order.z]); - } - - - return resTime; - } - return false; - };// end strictParse - - // First try JS Date, if that fails, use strictParse - var looseParse = function (f, s, o) { - try { - var d = new Date('2012-01-01 ' + s); - if (isNaN(d.getTime())) { - d = new Date('2012-01-01T' + s); - if (isNaN(d.getTime())) { - d = new Date('01/01/2012 ' + s); - if (isNaN(d.getTime())) { - throw "Unable to parse time with native Date: " + s; - } - } - } - - return { - hour: d.getHours(), - minute: d.getMinutes(), - second: d.getSeconds(), - millisec: d.getMilliseconds(), - microsec: d.getMicroseconds(), - timezone: d.getTimezoneOffset() * -1 - }; - } - catch (err) { - try { - return strictParse(f, s, o); - } - catch (err2) { - $.timepicker.log("Unable to parse \ntimeString: " + s + "\ntimeFormat: " + f); - } - } - return false; - }; // end looseParse - - if (typeof o.parse === "function") { - return o.parse(timeFormat, timeString, o); - } - if (o.parse === 'loose') { - return looseParse(timeFormat, timeString, o); - } - return strictParse(timeFormat, timeString, o); - }; - - /** - * Public utility to format the time - * @param {string} format format of the time - * @param {Object} time Object not a Date for timezones - * @param {Object} [options] essentially the regional[].. amNames, pmNames, ampm - * @returns {string} the formatted time - */ - $.datepicker.formatTime = function (format, time, options) { - options = options || {}; - options = $.extend({}, $.timepicker._defaults, options); - time = $.extend({ - hour: 0, - minute: 0, - second: 0, - millisec: 0, - microsec: 0, - timezone: null - }, time); - - var tmptime = format, - ampmName = options.amNames[0], - hour = parseInt(time.hour, 10); - - if (hour > 11) { - ampmName = options.pmNames[0]; - } - - tmptime = tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[zZ]|[lc]|'.*?')/g, function (match) { - switch (match) { - case 'HH': - return ('0' + hour).slice(-2); - case 'H': - return hour; - case 'hh': - return ('0' + convert24to12(hour)).slice(-2); - case 'h': - return convert24to12(hour); - case 'mm': - return ('0' + time.minute).slice(-2); - case 'm': - return time.minute; - case 'ss': - return ('0' + time.second).slice(-2); - case 's': - return time.second; - case 'l': - return ('00' + time.millisec).slice(-3); - case 'c': - return ('00' + time.microsec).slice(-3); - case 'z': - return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, false); - case 'Z': - return $.timepicker.timezoneOffsetString(time.timezone === null ? options.timezone : time.timezone, true); - case 'T': - return ampmName.charAt(0).toUpperCase(); - case 'TT': - return ampmName.toUpperCase(); - case 't': - return ampmName.charAt(0).toLowerCase(); - case 'tt': - return ampmName.toLowerCase(); - default: - return match.replace(/'/g, ""); - } - }); - - return tmptime; - }; - - /* - * the bad hack :/ override datepicker so it doesn't close on select - // inspired: http://stackoverflow.com/questions/1252512/jquery-datepicker-prevent-closing-picker-when-clicking-a-date/1762378#1762378 - */ - $.datepicker._base_selectDate = $.datepicker._selectDate; - $.datepicker._selectDate = function (id, dateStr) { - var inst = this._getInst($(id)[0]), - tp_inst = this._get(inst, 'timepicker'); - - if (tp_inst) { - tp_inst._limitMinMaxDateTime(inst, true); - inst.inline = inst.stay_open = true; - //This way the onSelect handler called from calendarpicker get the full dateTime - this._base_selectDate(id, dateStr); - inst.inline = inst.stay_open = false; - this._notifyChange(inst); - this._updateDatepicker(inst); - } else { - this._base_selectDate(id, dateStr); - } - }; - - /* - * second bad hack :/ override datepicker so it triggers an event when changing the input field - * and does not redraw the datepicker on every selectDate event - */ - $.datepicker._base_updateDatepicker = $.datepicker._updateDatepicker; - $.datepicker._updateDatepicker = function (inst) { - - // don't popup the datepicker if there is another instance already opened - var input = inst.input[0]; - if ($.datepicker._curInst && $.datepicker._curInst !== inst && $.datepicker._datepickerShowing && $.datepicker._lastInput !== input) { - return; - } - - if (typeof(inst.stay_open) !== 'boolean' || inst.stay_open === false) { - - this._base_updateDatepicker(inst); - - // Reload the time control when changing something in the input text field. - var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { - tp_inst._addTimePicker(inst); - } - } - }; - - /* - * third bad hack :/ override datepicker so it allows spaces and colon in the input field - */ - $.datepicker._base_doKeyPress = $.datepicker._doKeyPress; - $.datepicker._doKeyPress = function (event) { - var inst = $.datepicker._getInst(event.target), - tp_inst = $.datepicker._get(inst, 'timepicker'); - - if (tp_inst) { - if ($.datepicker._get(inst, 'constrainInput')) { - var ampm = tp_inst.support.ampm, - tz = tp_inst._defaults.showTimezone !== null ? tp_inst._defaults.showTimezone : tp_inst.support.timezone, - dateChars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat')), - datetimeChars = tp_inst._defaults.timeFormat.toString() - .replace(/[hms]/g, '') - .replace(/TT/g, ampm ? 'APM' : '') - .replace(/Tt/g, ampm ? 'AaPpMm' : '') - .replace(/tT/g, ampm ? 'AaPpMm' : '') - .replace(/T/g, ampm ? 'AP' : '') - .replace(/tt/g, ampm ? 'apm' : '') - .replace(/t/g, ampm ? 'ap' : '') + - " " + tp_inst._defaults.separator + - tp_inst._defaults.timeSuffix + - (tz ? tp_inst._defaults.timezoneList.join('') : '') + - (tp_inst._defaults.amNames.join('')) + (tp_inst._defaults.pmNames.join('')) + - dateChars, - chr = String.fromCharCode(event.charCode === undefined ? event.keyCode : event.charCode); - return event.ctrlKey || (chr < ' ' || !dateChars || datetimeChars.indexOf(chr) > -1); - } - } - - return $.datepicker._base_doKeyPress(event); - }; - - /* - * Fourth bad hack :/ override _updateAlternate function used in inline mode to init altField - * Update any alternate field to synchronise with the main field. - */ - $.datepicker._base_updateAlternate = $.datepicker._updateAlternate; - $.datepicker._updateAlternate = function (inst) { - var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { - var altField = tp_inst._defaults.altField; - if (altField) { // update alternate field too - var altFormat = tp_inst._defaults.altFormat || tp_inst._defaults.dateFormat, - date = this._getDate(inst), - formatCfg = $.datepicker._getFormatConfig(inst), - altFormattedDateTime = '', - altSeparator = tp_inst._defaults.altSeparator ? tp_inst._defaults.altSeparator : tp_inst._defaults.separator, - altTimeSuffix = tp_inst._defaults.altTimeSuffix ? tp_inst._defaults.altTimeSuffix : tp_inst._defaults.timeSuffix, - altTimeFormat = tp_inst._defaults.altTimeFormat !== null ? tp_inst._defaults.altTimeFormat : tp_inst._defaults.timeFormat; - - altFormattedDateTime += $.datepicker.formatTime(altTimeFormat, tp_inst, tp_inst._defaults) + altTimeSuffix; - if (!tp_inst._defaults.timeOnly && !tp_inst._defaults.altFieldTimeOnly && date !== null) { - if (tp_inst._defaults.altFormat) { - altFormattedDateTime = $.datepicker.formatDate(tp_inst._defaults.altFormat, date, formatCfg) + altSeparator + altFormattedDateTime; - } - else { - altFormattedDateTime = tp_inst.formattedDate + altSeparator + altFormattedDateTime; - } - } - $(altField).val(altFormattedDateTime); - } - } - else { - $.datepicker._base_updateAlternate(inst); - } - }; - - /* - * Override key up event to sync manual input changes. - */ - $.datepicker._base_doKeyUp = $.datepicker._doKeyUp; - $.datepicker._doKeyUp = function (event) { - var inst = $.datepicker._getInst(event.target), - tp_inst = $.datepicker._get(inst, 'timepicker'); - - if (tp_inst) { - if (tp_inst._defaults.timeOnly && (inst.input.val() !== inst.lastVal)) { - try { - $.datepicker._updateDatepicker(inst); - } catch (err) { - $.timepicker.log(err); - } - } - } - - return $.datepicker._base_doKeyUp(event); - }; - - /* - * override "Today" button to also grab the time. - */ - $.datepicker._base_gotoToday = $.datepicker._gotoToday; - $.datepicker._gotoToday = function (id) { - var inst = this._getInst($(id)[0]), - $dp = inst.dpDiv; - this._base_gotoToday(id); - var tp_inst = this._get(inst, 'timepicker'); - selectLocalTimezone(tp_inst); - var now = new Date(); - this._setTime(inst, now); - $('.ui-datepicker-today', $dp).click(); - }; - - /* - * Disable & enable the Time in the datetimepicker - */ - $.datepicker._disableTimepickerDatepicker = function (target) { - var inst = this._getInst(target); - if (!inst) { - return; - } - - var tp_inst = this._get(inst, 'timepicker'); - $(target).datepicker('getDate'); // Init selected[Year|Month|Day] - if (tp_inst) { - inst.settings.showTimepicker = false; - tp_inst._defaults.showTimepicker = false; - tp_inst._updateDateTime(inst); - } - }; - - $.datepicker._enableTimepickerDatepicker = function (target) { - var inst = this._getInst(target); - if (!inst) { - return; - } - - var tp_inst = this._get(inst, 'timepicker'); - $(target).datepicker('getDate'); // Init selected[Year|Month|Day] - if (tp_inst) { - inst.settings.showTimepicker = true; - tp_inst._defaults.showTimepicker = true; - tp_inst._addTimePicker(inst); // Could be disabled on page load - tp_inst._updateDateTime(inst); - } - }; - - /* - * Create our own set time function - */ - $.datepicker._setTime = function (inst, date) { - var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { - var defaults = tp_inst._defaults; - - // calling _setTime with no date sets time to defaults - tp_inst.hour = date ? date.getHours() : defaults.hour; - tp_inst.minute = date ? date.getMinutes() : defaults.minute; - tp_inst.second = date ? date.getSeconds() : defaults.second; - tp_inst.millisec = date ? date.getMilliseconds() : defaults.millisec; - tp_inst.microsec = date ? date.getMicroseconds() : defaults.microsec; - - //check if within min/max times.. - tp_inst._limitMinMaxDateTime(inst, true); - - tp_inst._onTimeChange(); - tp_inst._updateDateTime(inst); - } - }; - - /* - * Create new public method to set only time, callable as $().datepicker('setTime', date) - */ - $.datepicker._setTimeDatepicker = function (target, date, withDate) { - var inst = this._getInst(target); - if (!inst) { - return; - } - - var tp_inst = this._get(inst, 'timepicker'); - - if (tp_inst) { - this._setDateFromField(inst); - var tp_date; - if (date) { - if (typeof date === "string") { - tp_inst._parseTime(date, withDate); - tp_date = new Date(); - tp_date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); - tp_date.setMicroseconds(tp_inst.microsec); - } else { - tp_date = new Date(date.getTime()); - tp_date.setMicroseconds(date.getMicroseconds()); - } - if (tp_date.toString() === 'Invalid Date') { - tp_date = undefined; - } - this._setTime(inst, tp_date); - } - } - - }; - - /* - * override setDate() to allow setting time too within Date object - */ - $.datepicker._base_setDateDatepicker = $.datepicker._setDateDatepicker; - $.datepicker._setDateDatepicker = function (target, date) { - var inst = this._getInst(target); - if (!inst) { - return; - } - - if (typeof(date) === 'string') { - date = new Date(date); - if (!date.getTime()) { - $.timepicker.log("Error creating Date object from string."); - } - } - - var tp_inst = this._get(inst, 'timepicker'); - var tp_date; - if (date instanceof Date) { - tp_date = new Date(date.getTime()); - tp_date.setMicroseconds(date.getMicroseconds()); - } else { - tp_date = date; - } - - // This is important if you are using the timezone option, javascript's Date - // object will only return the timezone offset for the current locale, so we - // adjust it accordingly. If not using timezone option this won't matter.. - // If a timezone is different in tp, keep the timezone as is - if (tp_inst && tp_date) { - // look out for DST if tz wasn't specified - if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) { - tp_inst.timezone = tp_date.getTimezoneOffset() * -1; - } - date = $.timepicker.timezoneAdjust(date, tp_inst.timezone); - tp_date = $.timepicker.timezoneAdjust(tp_date, tp_inst.timezone); - } - - this._updateDatepicker(inst); - this._base_setDateDatepicker.apply(this, arguments); - this._setTimeDatepicker(target, tp_date, true); - }; - - /* - * override getDate() to allow getting time too within Date object - */ - $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker; - $.datepicker._getDateDatepicker = function (target, noDefault) { - var inst = this._getInst(target); - if (!inst) { - return; - } - - var tp_inst = this._get(inst, 'timepicker'); - - if (tp_inst) { - // if it hasn't yet been defined, grab from field - if (inst.lastVal === undefined) { - this._setDateFromField(inst, noDefault); - } - - var date = this._getDate(inst); - if (date && tp_inst._parseTime($(target).val(), tp_inst.timeOnly)) { - date.setHours(tp_inst.hour, tp_inst.minute, tp_inst.second, tp_inst.millisec); - date.setMicroseconds(tp_inst.microsec); - - // This is important if you are using the timezone option, javascript's Date - // object will only return the timezone offset for the current locale, so we - // adjust it accordingly. If not using timezone option this won't matter.. - if (tp_inst.timezone != null) { - // look out for DST if tz wasn't specified - if (!tp_inst.support.timezone && tp_inst._defaults.timezone === null) { - tp_inst.timezone = date.getTimezoneOffset() * -1; - } - date = $.timepicker.timezoneAdjust(date, tp_inst.timezone); - } - } - return date; - } - return this._base_getDateDatepicker(target, noDefault); - }; - - /* - * override parseDate() because UI 1.8.14 throws an error about "Extra characters" - * An option in datapicker to ignore extra format characters would be nicer. - */ - $.datepicker._base_parseDate = $.datepicker.parseDate; - $.datepicker.parseDate = function (format, value, settings) { - var date; - try { - date = this._base_parseDate(format, value, settings); - } catch (err) { - // Hack! The error message ends with a colon, a space, and - // the "extra" characters. We rely on that instead of - // attempting to perfectly reproduce the parsing algorithm. - if (err.indexOf(":") >= 0) { - date = this._base_parseDate(format, value.substring(0, value.length - (err.length - err.indexOf(':') - 2)), settings); - $.timepicker.log("Error parsing the date string: " + err + "\ndate string = " + value + "\ndate format = " + format); - } else { - throw err; - } - } - return date; - }; - - /* - * override formatDate to set date with time to the input - */ - $.datepicker._base_formatDate = $.datepicker._formatDate; - $.datepicker._formatDate = function (inst, day, month, year) { - var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { - tp_inst._updateDateTime(inst); - return tp_inst.$input.val(); - } - return this._base_formatDate(inst); - }; - - /* - * override options setter to add time to maxDate(Time) and minDate(Time). MaxDate - */ - $.datepicker._base_optionDatepicker = $.datepicker._optionDatepicker; - $.datepicker._optionDatepicker = function (target, name, value) { - var inst = this._getInst(target), - name_clone; - if (!inst) { - return null; - } - - var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { - var min = null, - max = null, - onselect = null, - overrides = tp_inst._defaults.evnts, - fns = {}, - prop; - if (typeof name === 'string') { // if min/max was set with the string - if (name === 'minDate' || name === 'minDateTime') { - min = value; - } else if (name === 'maxDate' || name === 'maxDateTime') { - max = value; - } else if (name === 'onSelect') { - onselect = value; - } else if (overrides.hasOwnProperty(name)) { - if (typeof (value) === 'undefined') { - return overrides[name]; - } - fns[name] = value; - name_clone = {}; //empty results in exiting function after overrides updated - } - } else if (typeof name === 'object') { //if min/max was set with the JSON - if (name.minDate) { - min = name.minDate; - } else if (name.minDateTime) { - min = name.minDateTime; - } else if (name.maxDate) { - max = name.maxDate; - } else if (name.maxDateTime) { - max = name.maxDateTime; - } - for (prop in overrides) { - if (overrides.hasOwnProperty(prop) && name[prop]) { - fns[prop] = name[prop]; - } - } - } - for (prop in fns) { - if (fns.hasOwnProperty(prop)) { - overrides[prop] = fns[prop]; - if (!name_clone) { name_clone = $.extend({}, name); } - delete name_clone[prop]; - } - } - if (name_clone && isEmptyObject(name_clone)) { return; } - if (min) { //if min was set - if (min === 0) { - min = new Date(); - } else { - min = new Date(min); - } - tp_inst._defaults.minDate = min; - tp_inst._defaults.minDateTime = min; - } else if (max) { //if max was set - if (max === 0) { - max = new Date(); - } else { - max = new Date(max); - } - tp_inst._defaults.maxDate = max; - tp_inst._defaults.maxDateTime = max; - } else if (onselect) { - tp_inst._defaults.onSelect = onselect; - } - } - if (value === undefined) { - return this._base_optionDatepicker.call($.datepicker, target, name); - } - return this._base_optionDatepicker.call($.datepicker, target, name_clone || name, value); - }; - - /* - * jQuery isEmptyObject does not check hasOwnProperty - if someone has added to the object prototype, - * it will return false for all objects - */ - var isEmptyObject = function (obj) { - var prop; - for (prop in obj) { - if (obj.hasOwnProperty(prop)) { - return false; - } - } - return true; - }; - - /* - * jQuery extend now ignores nulls! - */ - var extendRemove = function (target, props) { - $.extend(target, props); - for (var name in props) { - if (props[name] === null || props[name] === undefined) { - target[name] = props[name]; - } - } - return target; - }; - - /* - * Determine by the time format which units are supported - * Returns an object of booleans for each unit - */ - var detectSupport = function (timeFormat) { - var tf = timeFormat.replace(/'.*?'/g, '').toLowerCase(), // removes literals - isIn = function (f, t) { // does the format contain the token? - return f.indexOf(t) !== -1 ? true : false; - }; - return { - hour: isIn(tf, 'h'), - minute: isIn(tf, 'm'), - second: isIn(tf, 's'), - millisec: isIn(tf, 'l'), - microsec: isIn(tf, 'c'), - timezone: isIn(tf, 'z'), - ampm: isIn(tf, 't') && isIn(timeFormat, 'h'), - iso8601: isIn(timeFormat, 'Z') - }; - }; - - /* - * Converts 24 hour format into 12 hour - * Returns 12 hour without leading 0 - */ - var convert24to12 = function (hour) { - hour %= 12; - - if (hour === 0) { - hour = 12; - } - - return String(hour); - }; - - var computeEffectiveSetting = function (settings, property) { - return settings && settings[property] ? settings[property] : $.timepicker._defaults[property]; - }; - - /* - * Splits datetime string into date and time substrings. - * Throws exception when date can't be parsed - * Returns {dateString: dateString, timeString: timeString} - */ - var splitDateTime = function (dateTimeString, timeSettings) { - // The idea is to get the number separator occurrences in datetime and the time format requested (since time has - // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split. - var separator = computeEffectiveSetting(timeSettings, 'separator'), - format = computeEffectiveSetting(timeSettings, 'timeFormat'), - timeParts = format.split(separator), // how many occurrences of separator may be in our format? - timePartsLen = timeParts.length, - allParts = dateTimeString.split(separator), - allPartsLen = allParts.length; - - if (allPartsLen > 1) { - return { - dateString: allParts.splice(0, allPartsLen - timePartsLen).join(separator), - timeString: allParts.splice(0, timePartsLen).join(separator) - }; - } - - return { - dateString: dateTimeString, - timeString: '' - }; - }; - - /* - * Internal function to parse datetime interval - * Returns: {date: Date, timeObj: Object}, where - * date - parsed date without time (type Date) - * timeObj = {hour: , minute: , second: , millisec: , microsec: } - parsed time. Optional - */ - var parseDateTimeInternal = function (dateFormat, timeFormat, dateTimeString, dateSettings, timeSettings) { - var date, - parts, - parsedTime; - - parts = splitDateTime(dateTimeString, timeSettings); - date = $.datepicker._base_parseDate(dateFormat, parts.dateString, dateSettings); - - if (parts.timeString === '') { - return { - date: date - }; - } - - parsedTime = $.datepicker.parseTime(timeFormat, parts.timeString, timeSettings); - - if (!parsedTime) { - throw 'Wrong time format'; - } - - return { - date: date, - timeObj: parsedTime - }; - }; - - /* - * Internal function to set timezone_select to the local timezone - */ - var selectLocalTimezone = function (tp_inst, date) { - if (tp_inst && tp_inst.timezone_select) { - var now = date || new Date(); - tp_inst.timezone_select.val(-now.getTimezoneOffset()); - } - }; - - /* - * Create a Singleton Instance - */ - $.timepicker = new Timepicker(); - - /** - * Get the timezone offset as string from a date object (eg '+0530' for UTC+5.5) - * @param {number} tzMinutes if not a number, less than -720 (-1200), or greater than 840 (+1400) this value is returned - * @param {boolean} iso8601 if true formats in accordance to iso8601 "+12:45" - * @return {string} - */ - $.timepicker.timezoneOffsetString = function (tzMinutes, iso8601) { - if (isNaN(tzMinutes) || tzMinutes > 840 || tzMinutes < -720) { - return tzMinutes; - } - - var off = tzMinutes, - minutes = off % 60, - hours = (off - minutes) / 60, - iso = iso8601 ? ':' : '', - tz = (off >= 0 ? '+' : '-') + ('0' + Math.abs(hours)).slice(-2) + iso + ('0' + Math.abs(minutes)).slice(-2); - - if (tz === '+00:00') { - return 'Z'; - } - return tz; - }; - - /** - * Get the number in minutes that represents a timezone string - * @param {string} tzString formatted like "+0500", "-1245", "Z" - * @return {number} the offset minutes or the original string if it doesn't match expectations - */ - $.timepicker.timezoneOffsetNumber = function (tzString) { - var normalized = tzString.toString().replace(':', ''); // excuse any iso8601, end up with "+1245" - - if (normalized.toUpperCase() === 'Z') { // if iso8601 with Z, its 0 minute offset - return 0; - } - - if (!/^(\-|\+)\d{4}$/.test(normalized)) { // possibly a user defined tz, so just give it back - return tzString; - } - - return ((normalized.substr(0, 1) === '-' ? -1 : 1) * // plus or minus - ((parseInt(normalized.substr(1, 2), 10) * 60) + // hours (converted to minutes) - parseInt(normalized.substr(3, 2), 10))); // minutes - }; - - /** - * No way to set timezone in js Date, so we must adjust the minutes to compensate. (think setDate, getDate) - * @param {Date} date - * @param {string} toTimezone formatted like "+0500", "-1245" - * @return {Date} - */ - $.timepicker.timezoneAdjust = function (date, toTimezone) { - var toTz = $.timepicker.timezoneOffsetNumber(toTimezone); - if (!isNaN(toTz)) { - date.setMinutes(date.getMinutes() + -date.getTimezoneOffset() - toTz); - } - return date; - }; - - /** - * Calls `timepicker()` on the `startTime` and `endTime` elements, and configures them to - * enforce date range limits. - * n.b. The input value must be correctly formatted (reformatting is not supported) - * @param {Element} startTime - * @param {Element} endTime - * @param {Object} options Options for the timepicker() call - * @return {jQuery} - */ - $.timepicker.timeRange = function (startTime, endTime, options) { - return $.timepicker.handleRange('timepicker', startTime, endTime, options); - }; - - /** - * Calls `datetimepicker` on the `startTime` and `endTime` elements, and configures them to - * enforce date range limits. - * @param {Element} startTime - * @param {Element} endTime - * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, - * a boolean value that can be used to reformat the input values to the `dateFormat`. - * @param {string} method Can be used to specify the type of picker to be added - * @return {jQuery} - */ - $.timepicker.datetimeRange = function (startTime, endTime, options) { - $.timepicker.handleRange('datetimepicker', startTime, endTime, options); - }; - - /** - * Calls `datepicker` on the `startTime` and `endTime` elements, and configures them to - * enforce date range limits. - * @param {Element} startTime - * @param {Element} endTime - * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, - * a boolean value that can be used to reformat the input values to the `dateFormat`. - * @return {jQuery} - */ - $.timepicker.dateRange = function (startTime, endTime, options) { - $.timepicker.handleRange('datepicker', startTime, endTime, options); - }; - - /** - * Calls `method` on the `startTime` and `endTime` elements, and configures them to - * enforce date range limits. - * @param {string} method Can be used to specify the type of picker to be added - * @param {Element} startTime - * @param {Element} endTime - * @param {Object} options Options for the `timepicker()` call. Also supports `reformat`, - * a boolean value that can be used to reformat the input values to the `dateFormat`. - * @return {jQuery} - */ - $.timepicker.handleRange = function (method, startTime, endTime, options) { - options = $.extend({}, { - minInterval: 0, // min allowed interval in milliseconds - maxInterval: 0, // max allowed interval in milliseconds - start: {}, // options for start picker - end: {} // options for end picker - }, options); - - function checkDates(changed, other) { - var startdt = startTime[method]('getDate'), - enddt = endTime[method]('getDate'), - changeddt = changed[method]('getDate'); - - if (startdt !== null) { - var minDate = new Date(startdt.getTime()), - maxDate = new Date(startdt.getTime()); - - minDate.setMilliseconds(minDate.getMilliseconds() + options.minInterval); - maxDate.setMilliseconds(maxDate.getMilliseconds() + options.maxInterval); - - if (options.minInterval > 0 && minDate > enddt) { // minInterval check - endTime[method]('setDate', minDate); - } - else if (options.maxInterval > 0 && maxDate < enddt) { // max interval check - endTime[method]('setDate', maxDate); - } - else if (startdt > enddt) { - other[method]('setDate', changeddt); - } - } - } - - function selected(changed, other, option) { - if (!changed.val()) { - return; - } - var date = changed[method].call(changed, 'getDate'); - if (date !== null && options.minInterval > 0) { - if (option === 'minDate') { - date.setMilliseconds(date.getMilliseconds() + options.minInterval); - } - if (option === 'maxDate') { - date.setMilliseconds(date.getMilliseconds() - options.minInterval); - } - } - if (date.getTime) { - other[method].call(other, 'option', option, date); - } - } - - $.fn[method].call(startTime, $.extend({ - onClose: function (dateText, inst) { - checkDates($(this), endTime); - }, - onSelect: function (selectedDateTime) { - selected($(this), endTime, 'minDate'); - } - }, options, options.start)); - $.fn[method].call(endTime, $.extend({ - onClose: function (dateText, inst) { - checkDates($(this), startTime); - }, - onSelect: function (selectedDateTime) { - selected($(this), startTime, 'maxDate'); - } - }, options, options.end)); - - checkDates(startTime, endTime); - selected(startTime, endTime, 'minDate'); - selected(endTime, startTime, 'maxDate'); - return $([startTime.get(0), endTime.get(0)]); - }; - - /** - * Log error or data to the console during error or debugging - * @param {Object} err pass any type object to log to the console during error or debugging - * @return {void} - */ - $.timepicker.log = function (err) { - if (window.console) { - window.console.log(err); - } - }; - - /* - * Add util object to allow access to private methods for testability. - */ - $.timepicker._util = { - _extendRemove: extendRemove, - _isEmptyObject: isEmptyObject, - _convert24to12: convert24to12, - _detectSupport: detectSupport, - _selectLocalTimezone: selectLocalTimezone, - _computeEffectiveSetting: computeEffectiveSetting, - _splitDateTime: splitDateTime, - _parseDateTimeInternal: parseDateTimeInternal - }; - - /* - * Microsecond support - */ - if (!Date.prototype.getMicroseconds) { - Date.prototype.microseconds = 0; - Date.prototype.getMicroseconds = function () { return this.microseconds; }; - Date.prototype.setMicroseconds = function (m) { - this.setMilliseconds(this.getMilliseconds() + Math.floor(m / 1000)); - this.microseconds = m % 1000; - return this; - }; - } - - /* - * Keep up with the version - */ - $.timepicker.version = "1.4.3"; - -})(jQuery); diff --git a/src/main/webapp/js/lib/require.js b/src/main/webapp/js/lib/require.js deleted file mode 100644 index 84d1d678..00000000 --- a/src/main/webapp/js/lib/require.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - RequireJS 2.1.10 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. - Available via the MIT or new BSD license. - see: http://github.com/jrburke/requirejs for details -*/ -var requirejs,require,define; -(function(ca){function G(b){return"[object Function]"===N.call(b)}function H(b){return"[object Array]"===N.call(b)}function v(b,c){if(b){var d;for(d=0;d<b.length&&(!b[d]||!c(b[d],d,b));d+=1);}}function U(b,c){if(b){var d;for(d=b.length-1;-1<d&&(!b[d]||!c(b[d],d,b));d-=1);}}function s(b,c){return ga.call(b,c)}function j(b,c){return s(b,c)&&b[c]}function B(b,c){for(var d in b)if(s(b,d)&&c(b[d],d))break}function V(b,c,d,g){c&&B(c,function(c,h){if(d||!s(b,h))g&&"object"===typeof c&&c&&!H(c)&&!G(c)&&!(c instanceof -RegExp)?(b[h]||(b[h]={}),V(b[h],c,d,g)):b[h]=c});return b}function t(b,c){return function(){return c.apply(b,arguments)}}function da(b){throw b;}function ea(b){if(!b)return b;var c=ca;v(b.split("."),function(b){c=c[b]});return c}function C(b,c,d,g){c=Error(c+"\nhttp://requirejs.org/docs/errors.html#"+b);c.requireType=b;c.requireModules=g;d&&(c.originalError=d);return c}function ha(b){function c(a,e,b){var f,n,c,d,g,h,i,I=e&&e.split("/");n=I;var m=l.map,k=m&&m["*"];if(a&&"."===a.charAt(0))if(e){n= -I.slice(0,I.length-1);a=a.split("/");e=a.length-1;l.nodeIdCompat&&R.test(a[e])&&(a[e]=a[e].replace(R,""));n=a=n.concat(a);d=n.length;for(e=0;e<d;e++)if(c=n[e],"."===c)n.splice(e,1),e-=1;else if(".."===c)if(1===e&&(".."===n[2]||".."===n[0]))break;else 0<e&&(n.splice(e-1,2),e-=2);a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if(b&&m&&(I||k)){n=a.split("/");e=n.length;a:for(;0<e;e-=1){d=n.slice(0,e).join("/");if(I)for(c=I.length;0<c;c-=1)if(b=j(m,I.slice(0,c).join("/")))if(b=j(b,d)){f=b; -g=e;break a}!h&&(k&&j(k,d))&&(h=j(k,d),i=e)}!f&&h&&(f=h,g=i);f&&(n.splice(0,g,f),a=n.join("/"))}return(f=j(l.pkgs,a))?f:a}function d(a){z&&v(document.getElementsByTagName("script"),function(e){if(e.getAttribute("data-requiremodule")===a&&e.getAttribute("data-requirecontext")===i.contextName)return e.parentNode.removeChild(e),!0})}function g(a){var e=j(l.paths,a);if(e&&H(e)&&1<e.length)return e.shift(),i.require.undef(a),i.require([a]),!0}function u(a){var e,b=a?a.indexOf("!"):-1;-1<b&&(e=a.substring(0, -b),a=a.substring(b+1,a.length));return[e,a]}function m(a,e,b,f){var n,d,g=null,h=e?e.name:null,l=a,m=!0,k="";a||(m=!1,a="_@r"+(N+=1));a=u(a);g=a[0];a=a[1];g&&(g=c(g,h,f),d=j(p,g));a&&(g?k=d&&d.normalize?d.normalize(a,function(a){return c(a,h,f)}):c(a,h,f):(k=c(a,h,f),a=u(k),g=a[0],k=a[1],b=!0,n=i.nameToUrl(k)));b=g&&!d&&!b?"_unnormalized"+(Q+=1):"";return{prefix:g,name:k,parentMap:e,unnormalized:!!b,url:n,originalName:l,isDefine:m,id:(g?g+"!"+k:k)+b}}function q(a){var e=a.id,b=j(k,e);b||(b=k[e]=new i.Module(a)); -return b}function r(a,e,b){var f=a.id,n=j(k,f);if(s(p,f)&&(!n||n.defineEmitComplete))"defined"===e&&b(p[f]);else if(n=q(a),n.error&&"error"===e)b(n.error);else n.on(e,b)}function w(a,e){var b=a.requireModules,f=!1;if(e)e(a);else if(v(b,function(e){if(e=j(k,e))e.error=a,e.events.error&&(f=!0,e.emit("error",a))}),!f)h.onError(a)}function x(){S.length&&(ia.apply(A,[A.length,0].concat(S)),S=[])}function y(a){delete k[a];delete W[a]}function F(a,e,b){var f=a.map.id;a.error?a.emit("error",a.error):(e[f]= -!0,v(a.depMaps,function(f,c){var d=f.id,g=j(k,d);g&&(!a.depMatched[c]&&!b[d])&&(j(e,d)?(a.defineDep(c,p[d]),a.check()):F(g,e,b))}),b[f]=!0)}function D(){var a,e,b=(a=1E3*l.waitSeconds)&&i.startTime+a<(new Date).getTime(),f=[],c=[],h=!1,k=!0;if(!X){X=!0;B(W,function(a){var i=a.map,m=i.id;if(a.enabled&&(i.isDefine||c.push(a),!a.error))if(!a.inited&&b)g(m)?h=e=!0:(f.push(m),d(m));else if(!a.inited&&(a.fetched&&i.isDefine)&&(h=!0,!i.prefix))return k=!1});if(b&&f.length)return a=C("timeout","Load timeout for modules: "+ -f,null,f),a.contextName=i.contextName,w(a);k&&v(c,function(a){F(a,{},{})});if((!b||e)&&h)if((z||fa)&&!Y)Y=setTimeout(function(){Y=0;D()},50);X=!1}}function E(a){s(p,a[0])||q(m(a[0],null,!0)).init(a[1],a[2])}function L(a){var a=a.currentTarget||a.srcElement,e=i.onScriptLoad;a.detachEvent&&!Z?a.detachEvent("onreadystatechange",e):a.removeEventListener("load",e,!1);e=i.onScriptError;(!a.detachEvent||Z)&&a.removeEventListener("error",e,!1);return{node:a,id:a&&a.getAttribute("data-requiremodule")}}function M(){var a; -for(x();A.length;){a=A.shift();if(null===a[0])return w(C("mismatch","Mismatched anonymous define() module: "+a[a.length-1]));E(a)}}var X,$,i,K,Y,l={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},k={},W={},aa={},A=[],p={},T={},ba={},N=1,Q=1;K={require:function(a){return a.require?a.require:a.require=i.makeRequire(a.map)},exports:function(a){a.usingExports=!0;if(a.map.isDefine)return a.exports?a.exports:a.exports=p[a.map.id]={}},module:function(a){return a.module?a.module: -a.module={id:a.map.id,uri:a.map.url,config:function(){return j(l.config,a.map.id)||{}},exports:K.exports(a)}}};$=function(a){this.events=j(aa,a.id)||{};this.map=a;this.shim=j(l.shim,a.id);this.depExports=[];this.depMaps=[];this.depMatched=[];this.pluginMaps={};this.depCount=0};$.prototype={init:function(a,e,b,f){f=f||{};if(!this.inited){this.factory=e;if(b)this.on("error",b);else this.events.error&&(b=t(this,function(a){this.emit("error",a)}));this.depMaps=a&&a.slice(0);this.errback=b;this.inited= -!0;this.ignore=f.ignore;f.enabled||this.enabled?this.enable():this.check()}},defineDep:function(a,e){this.depMatched[a]||(this.depMatched[a]=!0,this.depCount-=1,this.depExports[a]=e)},fetch:function(){if(!this.fetched){this.fetched=!0;i.startTime=(new Date).getTime();var a=this.map;if(this.shim)i.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],t(this,function(){return a.prefix?this.callPlugin():this.load()}));else return a.prefix?this.callPlugin():this.load()}},load:function(){var a= -this.map.url;T[a]||(T[a]=!0,i.load(this.map.id,a))},check:function(){if(this.enabled&&!this.enabling){var a,e,b=this.map.id;e=this.depExports;var f=this.exports,c=this.factory;if(this.inited)if(this.error)this.emit("error",this.error);else{if(!this.defining){this.defining=!0;if(1>this.depCount&&!this.defined){if(G(c)){if(this.events.error&&this.map.isDefine||h.onError!==da)try{f=i.execCb(b,c,e,f)}catch(d){a=d}else f=i.execCb(b,c,e,f);this.map.isDefine&&void 0===f&&((e=this.module)?f=e.exports:this.usingExports&& -(f=this.exports));if(a)return a.requireMap=this.map,a.requireModules=this.map.isDefine?[this.map.id]:null,a.requireType=this.map.isDefine?"define":"require",w(this.error=a)}else f=c;this.exports=f;if(this.map.isDefine&&!this.ignore&&(p[b]=f,h.onResourceLoad))h.onResourceLoad(i,this.map,this.depMaps);y(b);this.defined=!0}this.defining=!1;this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var a= -this.map,b=a.id,d=m(a.prefix);this.depMaps.push(d);r(d,"defined",t(this,function(f){var d,g;g=j(ba,this.map.id);var J=this.map.name,u=this.map.parentMap?this.map.parentMap.name:null,p=i.makeRequire(a.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(f.normalize&&(J=f.normalize(J,function(a){return c(a,u,!0)})||""),f=m(a.prefix+"!"+J,this.map.parentMap),r(f,"defined",t(this,function(a){this.init([],function(){return a},null,{enabled:!0,ignore:!0})})),g=j(k,f.id)){this.depMaps.push(f); -if(this.events.error)g.on("error",t(this,function(a){this.emit("error",a)}));g.enable()}}else g?(this.map.url=i.nameToUrl(g),this.load()):(d=t(this,function(a){this.init([],function(){return a},null,{enabled:!0})}),d.error=t(this,function(a){this.inited=!0;this.error=a;a.requireModules=[b];B(k,function(a){0===a.map.id.indexOf(b+"_unnormalized")&&y(a.map.id)});w(a)}),d.fromText=t(this,function(f,c){var g=a.name,J=m(g),k=O;c&&(f=c);k&&(O=!1);q(J);s(l.config,b)&&(l.config[g]=l.config[b]);try{h.exec(f)}catch(j){return w(C("fromtexteval", -"fromText eval for "+b+" failed: "+j,j,[b]))}k&&(O=!0);this.depMaps.push(J);i.completeLoad(g);p([g],d)}),f.load(a.name,p,d,l))}));i.enable(d,this);this.pluginMaps[d.id]=d},enable:function(){W[this.map.id]=this;this.enabling=this.enabled=!0;v(this.depMaps,t(this,function(a,b){var c,f;if("string"===typeof a){a=m(a,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap);this.depMaps[b]=a;if(c=j(K,a.id)){this.depExports[b]=c(this);return}this.depCount+=1;r(a,"defined",t(this,function(a){this.defineDep(b, -a);this.check()}));this.errback&&r(a,"error",t(this,this.errback))}c=a.id;f=k[c];!s(K,c)&&(f&&!f.enabled)&&i.enable(a,this)}));B(this.pluginMaps,t(this,function(a){var b=j(k,a.id);b&&!b.enabled&&i.enable(a,this)}));this.enabling=!1;this.check()},on:function(a,b){var c=this.events[a];c||(c=this.events[a]=[]);c.push(b)},emit:function(a,b){v(this.events[a],function(a){a(b)});"error"===a&&delete this.events[a]}};i={config:l,contextName:b,registry:k,defined:p,urlFetched:T,defQueue:A,Module:$,makeModuleMap:m, -nextTick:h.nextTick,onError:w,configure:function(a){a.baseUrl&&"/"!==a.baseUrl.charAt(a.baseUrl.length-1)&&(a.baseUrl+="/");var b=l.shim,c={paths:!0,bundles:!0,config:!0,map:!0};B(a,function(a,b){c[b]?(l[b]||(l[b]={}),V(l[b],a,!0,!0)):l[b]=a});a.bundles&&B(a.bundles,function(a,b){v(a,function(a){a!==b&&(ba[a]=b)})});a.shim&&(B(a.shim,function(a,c){H(a)&&(a={deps:a});if((a.exports||a.init)&&!a.exportsFn)a.exportsFn=i.makeShimExports(a);b[c]=a}),l.shim=b);a.packages&&v(a.packages,function(a){var b, -a="string"===typeof a?{name:a}:a;b=a.name;a.location&&(l.paths[b]=a.location);l.pkgs[b]=a.name+"/"+(a.main||"main").replace(ja,"").replace(R,"")});B(k,function(a,b){!a.inited&&!a.map.unnormalized&&(a.map=m(b))});if(a.deps||a.callback)i.require(a.deps||[],a.callback)},makeShimExports:function(a){return function(){var b;a.init&&(b=a.init.apply(ca,arguments));return b||a.exports&&ea(a.exports)}},makeRequire:function(a,e){function g(f,c,d){var j,l;e.enableBuildCallback&&(c&&G(c))&&(c.__requireJsBuild= -!0);if("string"===typeof f){if(G(c))return w(C("requireargs","Invalid require call"),d);if(a&&s(K,f))return K[f](k[a.id]);if(h.get)return h.get(i,f,a,g);j=m(f,a,!1,!0);j=j.id;return!s(p,j)?w(C("notloaded",'Module name "'+j+'" has not been loaded yet for context: '+b+(a?"":". Use require([])"))):p[j]}M();i.nextTick(function(){M();l=q(m(null,a));l.skipMap=e.skipMap;l.init(f,c,d,{enabled:!0});D()});return g}e=e||{};V(g,{isBrowser:z,toUrl:function(b){var e,d=b.lastIndexOf("."),g=b.split("/")[0];if(-1!== -d&&(!("."===g||".."===g)||1<d))e=b.substring(d,b.length),b=b.substring(0,d);return i.nameToUrl(c(b,a&&a.id,!0),e,!0)},defined:function(b){return s(p,m(b,a,!1,!0).id)},specified:function(b){b=m(b,a,!1,!0).id;return s(p,b)||s(k,b)}});a||(g.undef=function(b){x();var c=m(b,a,!0),e=j(k,b);d(b);delete p[b];delete T[c.url];delete aa[b];U(A,function(a,c){a[0]===b&&A.splice(c,1)});e&&(e.events.defined&&(aa[b]=e.events),y(b))});return g},enable:function(a){j(k,a.id)&&q(a).enable()},completeLoad:function(a){var b, -c,f=j(l.shim,a)||{},d=f.exports;for(x();A.length;){c=A.shift();if(null===c[0]){c[0]=a;if(b)break;b=!0}else c[0]===a&&(b=!0);E(c)}c=j(k,a);if(!b&&!s(p,a)&&c&&!c.inited){if(l.enforceDefine&&(!d||!ea(d)))return g(a)?void 0:w(C("nodefine","No define call for "+a,null,[a]));E([a,f.deps||[],f.exportsFn])}D()},nameToUrl:function(a,b,c){var f,d,g;(f=j(l.pkgs,a))&&(a=f);if(f=j(ba,a))return i.nameToUrl(f,b,c);if(h.jsExtRegExp.test(a))f=a+(b||"");else{f=l.paths;a=a.split("/");for(d=a.length;0<d;d-=1)if(g=a.slice(0, -d).join("/"),g=j(f,g)){H(g)&&(g=g[0]);a.splice(0,d,g);break}f=a.join("/");f+=b||(/^data\:|\?/.test(f)||c?"":".js");f=("/"===f.charAt(0)||f.match(/^[\w\+\.\-]+:/)?"":l.baseUrl)+f}return l.urlArgs?f+((-1===f.indexOf("?")?"?":"&")+l.urlArgs):f},load:function(a,b){h.load(i,a,b)},execCb:function(a,b,c,d){return b.apply(d,c)},onScriptLoad:function(a){if("load"===a.type||ka.test((a.currentTarget||a.srcElement).readyState))P=null,a=L(a),i.completeLoad(a.id)},onScriptError:function(a){var b=L(a);if(!g(b.id))return w(C("scripterror", -"Script error for: "+b.id,a,[b.id]))}};i.require=i.makeRequire();return i}var h,x,y,D,L,E,P,M,q,Q,la=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,ma=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,R=/\.js$/,ja=/^\.\//;x=Object.prototype;var N=x.toString,ga=x.hasOwnProperty,ia=Array.prototype.splice,z=!!("undefined"!==typeof window&&"undefined"!==typeof navigator&&window.document),fa=!z&&"undefined"!==typeof importScripts,ka=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/, -Z="undefined"!==typeof opera&&"[object Opera]"===opera.toString(),F={},r={},S=[],O=!1;if("undefined"===typeof define){if("undefined"!==typeof requirejs){if(G(requirejs))return;r=requirejs;requirejs=void 0}"undefined"!==typeof require&&!G(require)&&(r=require,require=void 0);h=requirejs=function(b,c,d,g){var u,m="_";!H(b)&&"string"!==typeof b&&(u=b,H(c)?(b=c,c=d,d=g):b=[]);u&&u.context&&(m=u.context);(g=j(F,m))||(g=F[m]=h.s.newContext(m));u&&g.configure(u);return g.require(b,c,d)};h.config=function(b){return h(b)}; -h.nextTick="undefined"!==typeof setTimeout?function(b){setTimeout(b,4)}:function(b){b()};require||(require=h);h.version="2.1.10";h.jsExtRegExp=/^\/|:|\?|\.js$/;h.isBrowser=z;x=h.s={contexts:F,newContext:ha};h({});v(["toUrl","undef","defined","specified"],function(b){h[b]=function(){var c=F._;return c.require[b].apply(c,arguments)}});if(z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0]))y=x.head=D.parentNode;h.onError=da;h.createNode=function(b){var c= -b.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");c.type=b.scriptType||"text/javascript";c.charset="utf-8";c.async=!0;return c};h.load=function(b,c,d){var g=b&&b.config||{};if(z)return g=h.createNode(g,c,d),g.setAttribute("data-requirecontext",b.contextName),g.setAttribute("data-requiremodule",c),g.attachEvent&&!(g.attachEvent.toString&&0>g.attachEvent.toString().indexOf("[native code"))&&!Z?(O=!0,g.attachEvent("onreadystatechange",b.onScriptLoad)): -(g.addEventListener("load",b.onScriptLoad,!1),g.addEventListener("error",b.onScriptError,!1)),g.src=d,M=g,D?y.insertBefore(g,D):y.appendChild(g),M=null,g;if(fa)try{importScripts(d),b.completeLoad(c)}catch(j){b.onError(C("importscripts","importScripts failed for "+c+" at "+d,j,[c]))}};z&&!r.skipDataMain&&U(document.getElementsByTagName("script"),function(b){y||(y=b.parentNode);if(L=b.getAttribute("data-main"))return q=L,r.baseUrl||(E=q.split("/"),q=E.pop(),Q=E.length?E.join("/")+"/":"./",r.baseUrl= -Q),q=q.replace(R,""),h.jsExtRegExp.test(q)&&(q=L),r.deps=r.deps?r.deps.concat(q):[q],!0});define=function(b,c,d){var g,h;"string"!==typeof b&&(d=c,c=b,b=null);H(c)||(d=c,c=null);!c&&G(d)&&(c=[],d.length&&(d.toString().replace(la,"").replace(ma,function(b,d){c.push(d)}),c=(1===d.length?["require"]:["require","exports","module"]).concat(c)));if(O){if(!(g=M))P&&"interactive"===P.readyState||U(document.getElementsByTagName("script"),function(b){if("interactive"===b.readyState)return P=b}),g=P;g&&(b|| -(b=g.getAttribute("data-requiremodule")),h=F[g.getAttribute("data-requirecontext")])}(h?h.defQueue:S).push([b,c,d])};define.amd={jQuery:!0};h.exec=function(b){return eval(b)};h(r)}})(this); diff --git a/src/main/webapp/js/map/control/geosearch.js b/src/main/webapp/js/map/control/geosearch.js deleted file mode 100644 index cea471c5..00000000 --- a/src/main/webapp/js/map/control/geosearch.js +++ /dev/null @@ -1,411 +0,0 @@ -/** - * GeoSearch - search for an address and zoom to its location. - * - * @see https://github.com/smeijer/leaflet.control.geosearch - */ -define(['leaflet'], function(L) { - L.Control.GeoSearch = L.Control.extend({ - options: { - doReverseLookup: false, - position: 'topleft', - provider: null, - showMarker: true - }, - - _config: { - country: '', - searchLabel: 'Search for address ...', - notFoundMessage: 'Sorry, that address could not be found.', - messageHideDelay: 3000, - zoomLevel: 18 - }, - - // Public methods - - initialize: function (options) { - L.Util.extend(this.options, options); - L.Util.extend(this._config, options); - }, - - geosearch: function (qry) { - try { - var provider = this._config.provider; - - if(typeof provider.GetLocations == 'function') { - provider.GetLocations(qry, function(results) { - this._processResults(results); - }.bind(this)); - } else { - var url = provider.GetServiceUrl(qry); - this.sendRequest(provider, url); - } - } catch (error) { - this._printError(error); - } - }, - - onAdd: function (map) { - this._map = map; - this._container = L.DomUtil.create('div', 'leaflet-control-geosearch'); - this._suggestSet = []; - - var searchdiv = document.createElement('div'); - searchdiv.id = 'leaflet-control-geosearch-searchdiv'; - searchdiv.className = 'leaflet-control-geosearch-searchdiv'; - this._searchdiv = searchdiv; - - var searchbox = document.createElement('input'); - searchbox.id = 'leaflet-control-geosearch-qry'; - searchbox.type = 'text'; - searchbox.placeholder = this._config.searchLabel; - this._searchbox = searchbox; - - var searchbtn = document.createElement('button'); - searchbtn.id = 'leaflet-control-geosearch-btn'; - searchbtn.className = 'leaflet-control-geosearch-btn'; - this._searchbtn = searchbtn; - - var msgbox = document.createElement('div'); - msgbox.id = 'leaflet-control-geosearch-msg'; - msgbox.className = 'leaflet-control-geosearch-msg'; - this._msgbox = msgbox; - - var result = document.createElement('ul'); - result.id = 'leaflet-control-geosearch-result'; - result.className = 'leaflet-control-geosearch-result'; - this._result = result; - - var suggestlist = document.createElement('ul'); - suggestlist.id = 'leaflet-control-geosearch-suggests'; - suggestlist.className = 'leaflet-control-geosearch-suggests'; - this._suggestlist = suggestlist; - - this._msgbox.appendChild(this._suggestlist); - this._msgbox.appendChild(this._result); - this._searchdiv.appendChild(this._searchbtn); - this._searchdiv.appendChild(this._searchbox); - this._container.appendChild(this._searchdiv); - this._container.appendChild(this._msgbox); - - L.DomEvent - .addListener(this._container, 'click', L.DomEvent.stop) - .addListener(this._searchbtn, 'click', this._onSearchClick, this) - .addListener(this._searchbox, 'keypress', this._onKeyUp, this); - - if (this._config.doReverseLookup && this._config.provider.options.reverseable) { - L.DomEvent.addListener(this._map, 'click', this._onMapClick, this); - } - - L.DomEvent.disableClickPropagation(this._container); - - return this._container; - }, - - sendRequest: function (provider, url) { - var that = this; - - window.parseLocation = function (response) { - var results = provider.ParseJSON(response); - that._processResults(results); - - document.body.removeChild(document.getElementById('getJsonP')); - delete window.parseLocation; - }; - - function getJsonP (url) { - url = url + '&callback=parseLocation'; - var script = document.createElement('script'); - script.id = 'getJsonP'; - script.src = url; - script.async = true; - document.body.appendChild(script); - } - - if (XMLHttpRequest) { - var xhr = new XMLHttpRequest(); - - if ('withCredentials' in xhr) { - var xhrSec = new XMLHttpRequest(); - - xhrSec.onreadystatechange = function () { - if (xhrSec.readyState == 4) { - if (xhrSec.status == 200) { - var response = JSON.parse(xhrSec.responseText), - results = provider.ParseJSON(response); - - that._processResults(results); - } else if (xhrSec.status === 0 || xhrSec.status === 400) { - getJsonP(url); - } else { - that._printError(xhrSec.responseText); - } - } - }; - - xhrSec.open('GET', url, true); - xhrSec.send(); - } else if (XDomainRequest) { - var xdr = new XDomainRequest(); - - xdr.onerror = function (err) { - that._printError(err); - }; - - xdr.onload = function () { - var response = JSON.parse(xdr.responseText), - results = provider.ParseJSON(response); - - that._processResults(results); - }; - - xdr.open('GET', url); - xdr.send(); - } else { - getJsonP(url); - } - } - }, - - // Private methods - - _addressToString : function(address) { - if (!address) { - return ''; - } - - var addressStr = ''; - if (address.road) addressStr += address.road + ', '; - if (address.postcode) addressStr += address.postcode + ', '; - if (address.country) addressStr += address.country; - if (/, $/.test(addressStr)) addressStr = addressStr.substring(0, addressStr.length - 2); - - return addressStr; - }, - - _clearResult : function() { - if (this._timeout !== null) { - clearTimeout(this._timeout); - this._timeout = null; - } - - var elem = this._result; - elem.innerHTML = ''; - elem.style.display = 'none'; - }, - - _clearSuggestList : function() { - this._suggestSet = []; - if (this._timeout !== null) { - clearTimeout(this._timeout); - this._timeout = null; - } - - var elem = this._suggestlist; - elem.innerHTML = ''; - elem.style.display = 'none'; - }, - - _isInSuggestSet : function(o) { - var i = 0, - set = this._suggestSet; - - for (i = 0; i < set.length; ++i) { - if (set[i].lat == o.lat && set[i].lon == o.lon) { - return true; - } - } - - return false; - }, - - _onKeyUp: function (e) { - var esc = 27, - enter = 13, - queryBox = document.getElementById('leaflet-control-geosearch-qry'); - - if (e.keyCode === esc) { // escape key detection is unreliable - queryBox.value = ''; - this._map._container.focus(); - } else if (e.keyCode === enter) { - this.geosearch(queryBox.value); - } - }, - - _onMapClick: function (e) { - var location = e.latlng, - provider = this._config.provider; - - if (!location || !provider) { - return; - } - - try { - var url = provider.GetServiceUrl(location.lat, location.lng); - this.sendRequest(provider, url); - } catch (error) { - this._printError(error); - } - }, - - _onSearchClick: function () { - var queryBox = document.getElementById('leaflet-control-geosearch-qry'); - this.geosearch(queryBox.value); - }, - - _onSuggestClick: function (e) { - var suggestId = e.target.id, - suggestIndex = -1, - suggest = null; - - if (suggestId) { - suggestIndex = suggestId.substring(suggestId.lastIndexOf('-') + 1); - } - - if (suggestIndex >= 0) { - suggest = this._suggestSet[suggestIndex]; - } - - if (suggest) { - this._showLocation(suggest); - } - }, - - _processResults: function(results) { - if (results instanceof Array) { - this._processForwardResults(results); - } else { - this._processReverseResults(results); - } - }, - - _processForwardResults: function(results) { - var resultCount = results.length; - if (resultCount <= 0) { - this._printError(this._config.notFoundMessage); - return; - } - - this._map.fireEvent('geosearch_foundlocations', {Locations: results}); - if (resultCount == 1) { - // only one result found... show it - this._showLocation(results[0]); - } else { - // multiple results found... add to results list and let user choose which one to show - this._setSuggestList(results); - } - }, - - _processReverseResults: function(result) { - if (!result) { - this._printError(this._config.notFoundMessage); - } - - this._map.fireEvent('geosearch_clicklocation', {Location: result}); - this._setResult(result); - }, - - _setResult: function(result) { - var displayName = null, - displayDescription = null, - divText = document.createElement('div'), - elem = this._result, - index = -1, - li = document.createElement('li'), - txtDescription = null, - txtName = null; - - if (result.lat === undefined || result.lon === undefined) { - return; - } - - this._clearResult(); - - index = result.displayName.indexOf(','); - displayName = result.displayName.substring(0, index); - displayDescription = result.displayName.substring(index + 1); - - li.id = 'geosearch-result'; - li.className = 'geosearch-result'; - txtDescription = document.createElement('span'); - txtDescription.className = 'result-description'; - txtDescription.innerHTML = displayDescription.replace(/^\s+|\s+$/g,''); - txtName = document.createElement('span'); - txtName.className = 'result-name'; - txtName.innerHTML = displayName.replace(/^\s+|\s+$/g,''); - divText.className = 'geosearch-result-text'; - divText.appendChild(txtName); - divText.appendChild(txtDescription); - li.appendChild(divText); - - elem.appendChild(li); - elem.style.display = 'block'; - - this._map.fireEvent('geosearch_showresult', {element: elem, point: L.latLng({lat: parseFloat(result.lat), lon: parseFloat(result.lon)})}); - }, - - _setSuggestList: function(results) { - var elem = this._suggestlist, - i = 0, - j = 0, - li = null, - liText = null, - r = null; - - this._clearSuggestList(); - - for (i = 0, j = 0; i < results.length; ++i) { - r = results[i]; - if (r.lat === undefined || r.lon === undefined) { - continue; - } - - if (this._isInSuggestSet(r)) { - continue; - } - - this._suggestSet[this._suggestSet.length] = r; - li = document.createElement('li'); - li.id = 'geosearch-suggest-' + j; - li.className = 'geosearch-suggest'; - liText = document.createTextNode(r.displayName); - li.appendChild(liText); - elem.appendChild(li); - L.DomEvent.addListener(li, 'click', this._onSuggestClick, this); - - ++j; - } - - elem.style.display = 'block'; - }, - - _showLocation: function (location) { - this._setResult(location); - this._clearSuggestList(); - - if (this.options.showMarker === true) { - if (typeof this._positionMarker === 'undefined') { - this._positionMarker = L.marker([location.lat, location.lon]).addTo(this._map); - } else { - this._positionMarker.setLatLng([location.lat, location.lon]); - } - } - - this._map.setView([location.lat, location.lon], this._config.zoomLevel, false); - this._map.fireEvent('geosearch_showlocation', {Location: location}); - }, - - _printError: function(message) { - var elem = this._result; - elem.innerHTML = '<li>' + message + '</li>'; - elem.style.display = 'block'; - - var self = this; - self._timeout = setTimeout(function () { - elem.style.display = 'none'; - self._timeout = null; - }, 3000); - } - }); - - return L.Control.GeoSearch; -}); diff --git a/src/main/webapp/js/map/control/geosearchProvider/osm.js b/src/main/webapp/js/map/control/geosearchProvider/osm.js deleted file mode 100644 index e0e08885..00000000 --- a/src/main/webapp/js/map/control/geosearchProvider/osm.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Uses openstreetmap geocoding service for providing geosearch. - * - * @see https://github.com/smeijer/leaflet.control.geosearch - */ -define(['leaflet'], function(L) { - L.Geosearch = { - ReverseResult: function (lon, lat, address, displayName) { - this.lon = lon; - this.lat = lat; - this.address = address; - this.displayName = displayName; - }, - Result: function (lon, lat, displayName) { - this.lon = lon; - this.lat = lat; - this.displayName = displayName; - }, - Provider: { - OsmProvider: L.Class.extend({ - options : { - reverseable: true - }, - - initialize : function(options) { - options = L.Util.setOptions(this, options); - }, - - GetServiceUrl : function(qry, lon) { - if (!lon) { - // only one parameter given (query).. perform a forward lookup - return this._getForwardServiceUrl(qry); - } - - // second parameter set... perform a reverse lookup - return this._getReverseServiceUrl(qry, lon); - }, - - ParseJSON : function(data) { - if (data instanceof Array) { - return this._parseForwardJSON(data); - } - - return this._parseReverseJSON(data); - }, - - _getReverseServiceUrl : function(lat, lon) { - var parameters = L.Util.extend({ - lat: lat, - lon: lon, - format : 'json' - }, this.options); - - return 'http://nominatim.openstreetmap.org/reverse' + L.Util.getParamString(parameters); - }, - - _getForwardServiceUrl: function(qry) { - var parameters = L.Util.extend({ - q : qry, - format : 'json' - }, this.options); - - return 'http://nominatim.openstreetmap.org/search' + L.Util.getParamString(parameters); - }, - - _parseForwardJSON : function(data) { - if (data.length === 0) { - return []; - } - - var results = []; - for (var i = 0; i < data.length; i++) - results.push(new L.Geosearch.Result( - data[i].lon, - data[i].lat, - data[i].display_name - )); - - return results; - }, - - _parseReverseJSON : function(data) { - if (data.length === 0) { - return {}; - } - - return new L.Geosearch.ReverseResult( - data.lon, - data.lat, - data.address, - data.display_name - ); - } - }) - } - }; - - return L.Geosearch.Provider.OsmProvider; -}); diff --git a/src/main/webapp/js/map/control/help.js b/src/main/webapp/js/map/control/help.js deleted file mode 100644 index 39e67502..00000000 --- a/src/main/webapp/js/map/control/help.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['leaflet', 'console'], function(L, logger) { - L.HelpControl = L.Control.extend({ - options: { - position: 'bottomright' - }, - - onAdd: function() { - this._container = L.DomUtil.create('div', 'help-control'); - this._container.id = 'help-control-div'; - this._container.className = 'help-control-div'; - - L.DomEvent.addListener(this._container, 'click', this._onOpen); - L.DomEvent.disableClickPropagation(this._container); - - return this._container; - }, - - _onOpen: function() { - logger.log('Showing helper dialog'); - $('#help-dialog').dialog('open'); - } - }); - - return L.HelpControl; -}); diff --git a/src/main/webapp/js/map/control/settings.js b/src/main/webapp/js/map/control/settings.js deleted file mode 100644 index 4ced945c..00000000 --- a/src/main/webapp/js/map/control/settings.js +++ /dev/null @@ -1,25 +0,0 @@ -define(['leaflet', 'console'], function(L, logger) { - L.SettingsControl = L.Control.extend({ - options: { - position: 'bottomright' - }, - - onAdd: function() { - this._container = L.DomUtil.create('div', 'settings-control'); - this._container.id = 'settings-control-div'; - this._container.className = 'settings-control-div'; - - L.DomEvent.addListener(this._container, 'click', this._onOpen); - L.DomEvent.disableClickPropagation(this._container); - - return this._container; - }, - - _onOpen: function() { - logger.log('Showing settings'); - $('#settings-dialog').dialog('open'); - } - }); - - return L.SettingsControl; -}); diff --git a/src/main/webapp/js/map/control/wswarning.js b/src/main/webapp/js/map/control/wswarning.js deleted file mode 100644 index dc0126ed..00000000 --- a/src/main/webapp/js/map/control/wswarning.js +++ /dev/null @@ -1,19 +0,0 @@ -define(['leaflet'], function(L) { - L.WsWarningControl = L.Control.extend({ - options: { - position: 'bottomleft' - }, - - onAdd: function() { - this._container = L.DomUtil.create('div', 'help-control'); - this._container.id = 'wsWarning-control-div'; - this._container.className = 'wsWarning-control-div'; - this._container.title = 'Problem regarding websocket/configuration'; - - L.DomEvent.disableClickPropagation(this._container); - return this._container; - } - }); - - return L.WsWarningControl; -}); diff --git a/src/main/webapp/js/map/ipLocator/ipLocator.js b/src/main/webapp/js/map/ipLocator/ipLocator.js deleted file mode 100644 index ae12b978..00000000 --- a/src/main/webapp/js/map/ipLocator/ipLocator.js +++ /dev/null @@ -1,53 +0,0 @@ -define(['leaflet'], function(L) { - L.IpLocator = L.Class.extend({ - locateByIp: function (source, responseCallback, errorCallback) { - var handlerFn = L.bind(function (data) { - this._handleIpResponse(source, data, responseCallback, errorCallback); - }, this); - - if (source.cbParam === undefined || source.cbParam === null || source.cbParam === '') { - this._loadScript(source.url, handlerFn); - return; - } - - window.cbObject = {}; - window.cbObject.fn = handlerFn; - this._loadScript(source.url + '?' + source.cbParam + '= window.cbObject.fn'); - }, - - _handleIpResponse: function (source, data, responseCallback, errorCallback) { - window.cbObject = null; - delete window.cbObject; - - var pos = source.buildLocationObject(data); - if (pos === null) { - if (errorCallback) { errorCallback('Could not get location.'); } - } else if (responseCallback) { - responseCallback(pos); - } - }, - - _loadScript: function (url, callback, type) { - var script = document.createElement('script'); - script.type = (type === undefined) ? 'text/javascript' : type; - - if (typeof callback === 'function') { - if (script.readyState) { - script.onreadystatechange = function () { - if (script.readyState === 'loaded' || script.readyState === 'complete') { - script.onreadystatechange = null; - callback(); - } - }; - } else { - script.onload = function () { callback(); }; - } - } - - script.src = url; - document.getElementsByTagName('head')[0].appendChild(script); - } - }); - - return L.IpLocator; -}); diff --git a/src/main/webapp/js/map/ipLocator/ipProvider.js b/src/main/webapp/js/map/ipLocator/ipProvider.js deleted file mode 100644 index 01bc7e7e..00000000 --- a/src/main/webapp/js/map/ipLocator/ipProvider.js +++ /dev/null @@ -1,59 +0,0 @@ -define({ - None: null, - FreeGeoIp: { - url: 'http://freegeoip.net/json/', - cbParam: 'callback', - buildLocationObject: function (data) { - if (!data) { - return null; - } - - return { - coords: { - accuracy: 10000, - latitude: parseFloat(data.latitude), - longitude: parseFloat(data.longitude) - }, - timestamp: new Date().getTime() - }; - } - }, - GeoPlugin: { - url: 'http://www.geoplugin.net/json.gp', - cbParam: 'jsoncallback', - buildLocationObject: function (data) { - if (!data) { - return null; - } - - return { - coords: { - accuracy: 10000, - /* jshint ignore:start */ - latitude: parseFloat(data.geoplugin_latitude), - longitude: parseFloat(data.geoplugin_longitude) - /* jshint ignore:end */ - }, - timestamp: new Date().getTime() - }; - } - }, - Wikimedia: { - url: 'http://geoiplookup.wikimedia.org/', - cbParam: '', - buildLocationObject: function () { - var data = window.Geo, - result = { - coords: { - accuracy: 10000, - latitude: parseFloat(data.lat), - longitude: parseFloat(data.lon) - }, - timestamp: new Date().getTime() - }; - - delete window.Geo; - return result; - } - } -}); diff --git a/src/main/webapp/js/map/ipLocator/mapIncluder.js b/src/main/webapp/js/map/ipLocator/mapIncluder.js deleted file mode 100644 index 2d66153c..00000000 --- a/src/main/webapp/js/map/ipLocator/mapIncluder.js +++ /dev/null @@ -1,49 +0,0 @@ -define(['leaflet', 'map/ipLocator/ipProvider', 'map/ipLocator/ipLocator'], function(L, IpProvider, IpLocator) { - L.Map.include({ - _defaultLocateOptions: { - ipProvider: IpProvider.Wikimedia, - timeout: 10000, - watch: false - // setView: false - // maxZoom: <Number> - // maximumAge: 0 - // enableHighAccuracy: false - }, - - locate: function (/*Object*/ options) { - options = this._locateOptions = L.extend(this._defaultLocateOptions, options); - - if (!navigator.geolocation && !options.ipProvider) { - this._handleGeolocationError({ - code: 0, - message: 'Geolocation not supported.' - }); - return this; - } - - var onResponse = L.bind(this._handleGeolocationResponse, this), - onError = L.bind((options.ipProvider) ? this._fallbackToIp : this._handleGeolocationError, this); - - if (options.watch) { - this._locationWatchId = - navigator.geolocation.watchPosition(onResponse, onError, options); - } else { - navigator.geolocation.getCurrentPosition(onResponse, onError, options); - } - - return this; - }, - - _fallbackToIp: function (errMsg) { - if (!this._locateOptions.ipProvider) { - this._handleGeolocationError(errMsg); - return; - } - - var onResponse = L.bind(this._handleGeolocationResponse, this), - onError = L.bind(this._handleGeolocationError, this); - - (new IpLocator()).locateByIp(this._locateOptions.ipProvider, onResponse, onError); - } - }); -}); \ No newline at end of file diff --git a/src/main/webapp/js/map/layer/bing.js b/src/main/webapp/js/map/layer/bing.js deleted file mode 100644 index ee99c13a..00000000 --- a/src/main/webapp/js/map/layer/bing.js +++ /dev/null @@ -1,125 +0,0 @@ -define(['leaflet', 'console'], function(L, logger) { - L.BingLayer = L.TileLayer.extend({ - options: { - subdomains: [0, 1, 2, 3], - type: 'Aerial', - attribution: 'Bing', - culture: '' - }, - - initialize: function(key, options) { - L.Util.setOptions(this, options); - - this._key = key; - this._url = null; - this.meta = {}; - this.loadMetadata(); - }, - - tile2quad: function(x, y, z) { - var quad = ''; - for (var i = z; i > 0; i--) { - var digit = 0; - var mask = 1 << (i - 1); - if ((x & mask) !== 0) digit += 1; - if ((y & mask) !== 0) digit += 2; - quad = quad + digit; - } - return quad; - }, - - getTileUrl: function(p) { - var zoom = this._getZoomForUrl(); - var subdomains = this.options.subdomains, - s = this.options.subdomains[Math.abs((p.x + p.y) % subdomains.length)]; - return this._url.replace('{subdomain}', s) - .replace('{quadkey}', this.tile2quad(p.x, p.y, zoom)) - .replace('{culture}', this.options.culture); - }, - - loadMetadata: function() { - var _this = this; - var cbid = '_bing_metadata_' + L.Util.stamp(this); - window[cbid] = function (meta) { - _this.meta = meta; - window[cbid] = undefined; - var e = document.getElementById(cbid); - e.parentNode.removeChild(e); - if (meta.errorDetails) { - logger.log('Leaflet Bing Plugin Error - Got metadata: ' + meta.errorDetails); - return; - } - _this.initMetadata(); - }; - var url = document.location.protocol + '//dev.virtualearth.net/REST/v1/Imagery/Metadata/' + this.options.type + '?include=ImageryProviders&jsonp=' + cbid + - '&key=' + this._key + '&UriScheme=' + document.location.protocol.slice(0, -1); - var script = document.createElement('script'); - script.type = 'text/javascript'; - script.src = url; - script.id = cbid; - document.getElementsByTagName('head')[0].appendChild(script); - }, - - initMetadata: function() { - var r = this.meta.resourceSets[0].resources[0]; - this.options.subdomains = r.imageUrlSubdomains; - this._url = r.imageUrl; - this._providers = []; - if (r.imageryProviders) { - for (var i = 0; i < r.imageryProviders.length; i++) { - var p = r.imageryProviders[i]; - for (var j = 0; j < p.coverageAreas.length; j++) { - var c = p.coverageAreas[j]; - var coverage = {zoomMin: c.zoomMin, zoomMax: c.zoomMax, active: false}; - var bounds = new L.LatLngBounds( - new L.LatLng(c.bbox[0]+0.01, c.bbox[1]+0.01), - new L.LatLng(c.bbox[2]-0.01, c.bbox[3]-0.01) - ); - coverage.bounds = bounds; - coverage.attrib = p.attribution; - this._providers.push(coverage); - } - } - } - this._update(); - }, - - _update: function() { - if (this._url === null || !this._map) return; - this._update_attribution(); - L.TileLayer.prototype._update.apply(this, []); - }, - - _update_attribution: function() { - var bounds = this._map.getBounds(); - var zoom = this._map.getZoom(); - for (var i = 0; i < this._providers.length; i++) { - var p = this._providers[i]; - if ((zoom <= p.zoomMax && zoom >= p.zoomMin) && - bounds.intersects(p.bounds)) { - if (!p.active && this._map.attributionControl) - this._map.attributionControl.addAttribution(p.attrib); - p.active = true; - } else { - if (p.active && this._map.attributionControl) - this._map.attributionControl.removeAttribution(p.attrib); - p.active = false; - } - } - }, - - onRemove: function(map) { - for (var i = 0; i < this._providers.length; i++) { - var p = this._providers[i]; - if (p.active && this._map.attributionControl) { - this._map.attributionControl.removeAttribution(p.attrib); - p.active = false; - } - } - - L.TileLayer.prototype.onRemove.apply(this, [map]); - } - }); - - return L.BingLayer; -}); diff --git a/src/main/webapp/js/map/layer/google.js b/src/main/webapp/js/map/layer/google.js deleted file mode 100644 index 1b3402d3..00000000 --- a/src/main/webapp/js/map/layer/google.js +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Google layer using Google Maps API - */ -define(['leaflet'], function(L) { - L.Google = L.Class.extend({ - includes: L.Mixin.Events, - - options: { - minZoom: 0, - maxZoom: 18, - tileSize: 256, - subdomains: 'abc', - errorTileUrl: '', - attribution: '', - opacity: 1, - continuousWorld: false, - noWrap: false, - mapOptions: { - backgroundColor: '#dddddd' - } - }, - - // Possible types: SATELLITE, ROADMAP, HYBRID, TERRAIN - initialize: function(type, options) { - L.Util.setOptions(this, options); - - this._ready = google.maps.Map !== undefined; - if (!this._ready) L.Google.asyncWait.push(this); - - this._type = type || 'SATELLITE'; - }, - - onAdd: function(map, insertAtTheBottom) { - this._map = map; - this._insertAtTheBottom = insertAtTheBottom; - - // create a container div for tiles - this._initContainer(); - this._initMapObject(); - - // set up events - map.on('viewreset', this._resetCallback, this); - - this._limitedUpdate = L.Util.limitExecByInterval(this._update, 150, this); - map.on('move', this._update, this); - - map.on('zoomanim', this._handleZoomAnim, this); - - //20px instead of 1em to avoid a slight overlap with google's attribution - map._controlCorners.bottomright.style.marginBottom = '20px'; - - this._reset(); - this._update(); - }, - - onRemove: function(map) { - this._map._container.removeChild(this._container); - //this._container = null; - - this._map.off('viewreset', this._resetCallback, this); - - this._map.off('move', this._update, this); - - this._map.off('zoomanim', this._handleZoomAnim, this); - - map._controlCorners.bottomright.style.marginBottom = '0em'; - //this._map.off('moveend', this._update, this); - }, - - getAttribution: function() { - return this.options.attribution; - }, - - setOpacity: function(opacity) { - this.options.opacity = opacity; - if (opacity < 1) { - L.DomUtil.setOpacity(this._container, opacity); - } - }, - - setElementSize: function(e, size) { - e.style.width = size.x + 'px'; - e.style.height = size.y + 'px'; - }, - - _initContainer: function() { - var tilePane = this._map._container, - first = tilePane.firstChild; - - if (!this._container) { - this._container = L.DomUtil.create('div', 'leaflet-google-layer leaflet-top leaflet-left'); - this._container.id = '_GMapContainer_' + L.Util.stamp(this); - this._container.style.zIndex = 'auto'; - } - - tilePane.insertBefore(this._container, first); - - this.setOpacity(this.options.opacity); - this.setElementSize(this._container, this._map.getSize()); - }, - - _initMapObject: function() { - if (!this._ready) return; - this._google_center = new google.maps.LatLng(0, 0); - var map = new google.maps.Map(this._container, { - center: this._google_center, - zoom: 0, - tilt: 0, - mapTypeId: google.maps.MapTypeId[this._type], - disableDefaultUI: true, - keyboardShortcuts: false, - draggable: false, - disableDoubleClickZoom: true, - scrollwheel: false, - streetViewControl: false, - styles: this.options.mapOptions.styles, - backgroundColor: this.options.mapOptions.backgroundColor - }); - - var _this = this; - this._reposition = google.maps.event.addListenerOnce(map, 'center_changed', - function() { _this.onReposition(); }); - this._google = map; - - google.maps.event.addListenerOnce(map, 'idle', - function() { _this._checkZoomLevels(); }); - }, - - _checkZoomLevels: function() { - //setting the zoom level on the Google map may result in a different zoom level than the one requested - //(it won't go beyond the level for which they have data). - // verify and make sure the zoom levels on both Leaflet and Google maps are consistent - if (this._google.getZoom() !== this._map.getZoom()) { - //zoom levels are out of sync. Set the leaflet zoom level to match the google one - this._map.setZoom( this._google.getZoom() ); - } - }, - - _resetCallback: function(e) { - this._reset(e.hard); - }, - - _reset: function() { - this._initContainer(); - }, - - _update: function(e) { - if (!this._google) return; - this._resize(); - - var center = e && e.latlng ? e.latlng : this._map.getCenter(); - var _center = new google.maps.LatLng(center.lat, center.lng); - - this._google.setCenter(_center); - this._google.setZoom(this._map.getZoom()); - - this._checkZoomLevels(); - //this._google.fitBounds(google_bounds); - }, - - _resize: function() { - var size = this._map.getSize(); - if (this._container.style.width == size.x && this._container.style.height == size.y) { - return; - } - - this.setElementSize(this._container, size); - this.onReposition(); - }, - - _handleZoomAnim: function (e) { - var center = e.center; - var _center = new google.maps.LatLng(center.lat, center.lng); - - this._google.setCenter(_center); - this._google.setZoom(e.zoom); - }, - - onReposition: function() { - if (!this._google) return; - google.maps.event.trigger(this._google, 'resize'); - } - }); - - L.Google.asyncWait = []; - L.Google.asyncInitialize = function() { - var i; - for (i = 0; i < L.Google.asyncWait.length; i++) { - var o = L.Google.asyncWait[i]; - o._ready = true; - if (o._container) { - o._initMapObject(); - o._update(); - } - } - L.Google.asyncWait = []; - }; - - return L.Google; -}); diff --git a/src/main/webapp/js/service/serviceConfiguration.js b/src/main/webapp/js/service/serviceConfiguration.js deleted file mode 100644 index 25687b35..00000000 --- a/src/main/webapp/js/service/serviceConfiguration.js +++ /dev/null @@ -1,90 +0,0 @@ -/** - * @class ServiceConfiguration - */ -define(['jQuery', 'leaflet', 'console', 'isochrone/configuration', 'util/geoUtils'], function($, L, logger, Configuration, GeoUtils) { - function ServiceConfiguration(ws) { - var actionName = 'getConfiguration'; - var websocket = null; - - // Constructor - - websocket = ws; - - // Public methods - - /** - * @public - * @method ServiceConfiguration#initFromServer - */ - this.initFromServer = function() { -// if (!$._data(document, 'events')[actionName]) { - $(document).on(actionName, onServerResponse.bind(this)); -// } - - websocket.sendWsMessage({ - action: actionName - }); - }; - - // Private methods - - /** - * Reads the enabled datasets and stores them in a client side configuration singleton - * each dataset contains: - * <ul> - * <li>bbox the spatial extent of the specified area</li> - * <li>queryNode the a 2D-coordinate of the query point</li> - * <li>time the arrival or departure time of the query point</li> - * </ul> - * - * @private - * @method ServiceConfiguration#onServerResponse - */ - function onServerResponse(data) { - var config = Configuration.getInstance(), - datasets = data.defaultDatasets, - i = 0, - result = {}; - - logger.debug('Handling event "' + actionName + '":', data); - config.setMapserverUrl(data.mapserverUrl); - - for (i = 0; i < datasets.length; i++) { - logger.debug('Adding configuration for dataset "' + datasets[i].name + '": ', datasets[i]); - - var dataset = datasets[i]; - var date = new Date(); - var boundLower = new L.Point(dataset.bbox.minX, dataset.bbox.minY); - var boundUpper = new L.Point(dataset.bbox.maxX, dataset.bbox.maxY); - var latlngLower = GeoUtils.convertToLatLng(boundLower); - var latlngUpper = GeoUtils.convertToLatLng(boundUpper); - var queryNode = new L.Point(dataset.queryNode.x, dataset.queryNode.y); - - date.setTime(dataset.date); - - var dSetConfig = { - bBox: new L.Bounds(boundLower, boundUpper), - bBoxLatLng: new L.latLngBounds(latlngLower, latlngUpper), - datasetName: dataset.name, - date: date, - isoEdgeLayer: dataset.isoEdgeLayer, - isoVertexLayer: dataset.isoVertexLayer, - isoCoverageLayer: dataset.isoCoverageLayer, - queryNode: queryNode, - queryNodeLatLng: GeoUtils.convertToLatLng(queryNode) - }; - - if (dataset.totalInhabitants) { - dSetConfig.totalInhabitants = dataset.totalInhabitants; - } - - config.addDatasetConfig(dSetConfig); - } - - $(document).off(actionName); - return result; - } - } - - return ServiceConfiguration; -}); diff --git a/src/main/webapp/js/service/serviceIsochrone.js b/src/main/webapp/js/service/serviceIsochrone.js deleted file mode 100644 index 12a8053b..00000000 --- a/src/main/webapp/js/service/serviceIsochrone.js +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @class ServiceIsochrone - */ -define(['jQuery', 'leaflet', 'console', 'spinner', 'isochrone/isochrone', 'util/geoUtils'], function($, L, logger, Spinner, Isochrone, GeoUtils) { - function ServiceIsochrone(ws, iMap) { - var actionName = 'getIsochrone'; - var isochroneO = null; - var spinnerCfg = null; - var websocket = null; - - // Constructor - - isochroneO = new Isochrone(iMap); - websocket = ws; - - // Public methods - - /** - * @public - * @method ServiceIsochrone#sentRequest - */ - this.sentRequest = function(datasetConfig, points, options) { - var msg = null, - settings = $('#settings-fields'), - startBtn = $('#' + datasetConfig.datasetName + ' .icon-isochrone-start-calc'); - - if (!options || !points || points.length <= 0 ) { - logger.warn('Can not send isochrone request, since parameters are not value'); - logger.debug(' - points: ', points); - logger.debug(' - options: ', options); - return; - } else if (!options.datetime || !options.dmax) { - logger.warn('Can not send isochrone request, since option parameter misses mandatory value'); - logger.debug(' - options: ', options); - return; - } - - if (startBtn) { - spinnerCfg = { - button: startBtn, - spinner: new Spinner() - }; - - spinnerCfg.spinner.spin(startBtn.parent()[0]); - spinnerCfg.button.hide(); - } - - msg = { - action : actionName, - algorithm : settings.children('#algorithm').val(), - coverageMode : settings.children('#enclosure').val(), - dataset : datasetConfig.datasetName, - date : options.datetime, - direction : settings.children('#direction').val(), - dmax : options.dmax, - expirationMode : settings.children('#expirationMode').is(':checked'), - mode : settings.children('#tmode').val(), - queryNodes : pointsToQueryNodes(points), - speed : $('#speed').val() - }; - $(document).on(actionName, onServerResponse.bind(this, msg)); - websocket.sendWsMessage(msg); - }; - - // Private methods - - /** - * @private - * @method ServiceIsochrone#onServerResponse - */ - function onServerResponse(requestData, responseData) { - logger.debug('Handling event "' + actionName + '":', responseData); - logger.debug('Isochrone timings are: ', responseData.logging); - - var boundLower = new L.Point(responseData.bbox.minX,responseData.bbox.minY), - boundUpper = new L.Point(responseData.bbox.maxX, responseData.bbox.maxY), - latlngLower = GeoUtils.convertToLatLng(boundLower), - latlngUpper = GeoUtils.convertToLatLng(boundUpper), - bBox = new L.Bounds(boundLower, boundUpper), - bBoxLatLng = new L.latLngBounds(latlngLower, latlngUpper), - bBoxSize = (bBox === null) ? { x : 0, y : 0 } : bBox.getSize(); - - if (spinnerCfg) { - spinnerCfg.button.show(); - spinnerCfg.spinner.stop(); - spinnerCfg = null; - } - - if ((bBoxSize.x + bBoxSize.y) <= 0) { - logger.warn('Calculated empty isochrone... not showing anything on the map'); - return; - } - - isochroneO.showLayers(requestData, bBoxLatLng); - - $(document).off(actionName); - } - - /** - * @private - * @method ServiceIsochrone#pointsToQueryNodes - */ - function pointsToQueryNodes(points) { - var i = 0, - nodes = []; - - for (i = 0; i < points.length; ++i) { - nodes[nodes.length] = GeoUtils.convertFromLatLng(points[i]); - } - - return nodes; - } - } - - return ServiceIsochrone; -}); diff --git a/src/main/webapp/js/service/websocket.js b/src/main/webapp/js/service/websocket.js deleted file mode 100644 index af2b1fb5..00000000 --- a/src/main/webapp/js/service/websocket.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * @class Websocket - */ -define(['jQuery', 'console'], function($, logger) { - // Static fields - var currentUrl = window.location.href, - wsUri = null; - - currentUrl = currentUrl.substring(0, currentUrl.lastIndexOf('/') + 1); - wsUri = 'ws' + currentUrl.substring(currentUrl.indexOf(':')) + 'websocket'; - - - /** - * Used to communicate with the server. - */ - function Websocket() { - /** - * The websocket object that holds the connection and to which the callback listeners are applied. - */ - var websocket = null; - - // Constructor - - websocket = new WebSocket(wsUri); - websocket.onopen = function(evt) { onOpen(evt); }; - websocket.onclose = function(evt) { onClose(evt); }; - websocket.onmessage = function(evt) { onMessage(evt); }; - websocket.onerror = function(evt) { onError(evt); }; - - // Public methods - - /** - * Sends the specified message to the server. - * - * @public - * @method Websocket#sendWsMessage - * @param {String/Object} msg message to send - */ - this.sendWsMessage = function(/* {String/Object} */msg) { - if (websocket.readyState === websocket.OPEN) { - if (typeof msg == 'string' || msg instanceof String) { - // msg is a string... send as is - logger.debug('Sending message to server: ', msg); - websocket.send(msg); - } else { - // msg is an object... convert object to JSON before sending - logger.debug('Sending object to server: ', msg); - websocket.send(JSON.stringify(msg)); - } - } else if (websocket.readyState === websocket.CONNECTING) { - setTimeout(this.sendWsMessage.bind(this, msg), 100); - } else { - logger.error('Could not send message using websocket: socket closed (or closing)'); - } - }; - - // Private methods - - /** - * @private - * @method Websocket#onOpen - */ - function onOpen(evt) { - var e = null; - - logger.debug('Opening connection to websocket', evt); - - e = jQuery.Event('websocket_open', evt.data); - $(document).trigger(e); - } - - /** - * @private - * @method Websocket#onClose - */ - function onClose(evt) { - var e = null; - - logger.debug('Closing connection to websocket', evt); - - e = jQuery.Event('websocket_close', evt.data); - $(document).trigger(e); - } - - /** - * @private - * @method Websocket#onMessage - */ - function onMessage(evt) { - var e1 = null, - e2 = null, - jsonString = evt.data; - - logger.debug('Message returned by server: ', jsonString); - - var jsonResponse = jQuery.parseJSON(jsonString); - if (!jsonResponse.action) { - logger.warn('Invalid server response. No action attribute set'); - return; - } - - if (!jsonResponse.httpState) { - logger.warn('Invalid server response. No httpState attribute set'); - return; - } - - if (jsonResponse.httpState !== 200) { - onError(evt); - return; - } - - e1 = jQuery.Event(jsonResponse.action, jsonResponse); - $(document).trigger(e1); - - e2 = jQuery.Event('websocket_message', evt.data); - $(document).trigger(e2); - } - - /** - * @private - * @method Websocket#onError - */ - function onError(evt) { - var e = null; - - logger.error('Could not get data from websocket'); - logger.warn('Error data: ' + evt.data); - - e = jQuery.Event('websocket_error', evt.data); - $(document).trigger(e); - } - } - - return Websocket; -}); diff --git a/src/main/webapp/js/util/geoUtils.js b/src/main/webapp/js/util/geoUtils.js deleted file mode 100644 index 30cb33b1..00000000 --- a/src/main/webapp/js/util/geoUtils.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * @class GeoUtils - */ -define(['leaflet'], function(L) { - /** - * @private - * @constructor - */ - function GeoUtils() { - } - - // Public static method - - /** - * Converts from a LatLng (EPSG:4326) to a point from projection EPSG:3857. - * - * @public - * @method GeoUtils.convertFromLatLng - * @param {L.latLng} latLng the matching L.latLng object (coordinates in EPSG:4326) - * @return {L.Point} the point to convert (containing EPSG:3857 x and y) - */ - GeoUtils.convertFromLatLng = function(latLng) { - return L.CRS.EPSG3857.project(latLng); - }; - - /** - * Converts a point from projection EPSG:3857 to LatLng (EPSG:4326). - * - * @public - * @method GeoUtils.convertToLatLng - * @param {L.Point} point the point to convert (containing EPSG:3857 x and y) - * @return {L.latLng} the matching L.latLng object (coordinates in EPSG:4326) - * @see http://developer.tomtom.com/docs/read/map_toolkit/javascript_sdk_2_0/Migration_Guide - */ - GeoUtils.convertToLatLng = function(point) { - var earthRadius = 6378137; - return L.Projection.SphericalMercator.unproject(point.divideBy(earthRadius)); - }; - - return GeoUtils; -}); diff --git a/src/main/webapp/js/util/stringUtils.js b/src/main/webapp/js/util/stringUtils.js deleted file mode 100644 index d90a87b7..00000000 --- a/src/main/webapp/js/util/stringUtils.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * @class StringUtils - */ -define([], function() { - /** - * @private - * @constructor - */ - function StringUtils() { - } - - // Public static method - - /** - * Takes a string and returns it with the first char in upper case and all the rest in lower case. - * - * @public - * @method StringUtils.capitalize - * @param {String} str string to capitalize - * @return {String} same as the input, but with first letter in uppercase (and rest in lower case) - */ - StringUtils.capitalize = function(str) { - return str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase(); - }; - - /** - * Converts a given date to a string (using pattern dd.mm.yyyy). - * - * @public - * @method StringUtils.dateToString - * @param {Date} the date to convert - * @return {String} the given date as string (using pattern dd.mm.yyyy) - */ - StringUtils.dateToString = function(date) { - var dateStr = ('0' + date.getDate()).slice(-2) + '.' + ('0' + (date.getMonth() + 1)).slice(-2) + '.' + date.getFullYear(), - timeStr = ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2); - - return dateStr + ' ' + timeStr; - }; - - return StringUtils; -}); diff --git a/src/main/webapp/js/versions.txt b/src/main/webapp/js/versions.txt deleted file mode 100644 index cc61b03c..00000000 --- a/src/main/webapp/js/versions.txt +++ /dev/null @@ -1,8 +0,0 @@ -Sources: --------- - -console.js: https://code.google.com/p/console-js/ (v0.1) -bing.js: https://github.com/shramov/leaflet-plugins/ -google.js: https://github.com/shramov/leaflet-plugins/ -geosearch.js: based on https://github.com/smeijer/L.GeoSearch -jquery-ui-timepicker-addon.js: http://trentrichardson.com/examples/timepicker (v1.4.3) -- GitLab