Compare commits
26 Commits
Author | SHA1 | Date |
---|---|---|
Serghei Mihai | 6d71c4cb30 | |
Serghei Mihai | 4e4865937c | |
Serghei Mihai | 2fb8d1a5c1 | |
Serghei Mihai | bc2da76b36 | |
Serghei Mihai | c222a266a0 | |
Serghei Mihai | 91dc01d28d | |
Serghei Mihai | 4d06872306 | |
Serghei Mihai | 915d84831d | |
Serghei Mihai | 4d82e7dfd7 | |
Serghei Mihai | f07ba2b9af | |
Serghei Mihai | c7db07a92d | |
Serghei Mihai | 940f8dd5b6 | |
Serghei Mihai | 3a9a28f997 | |
Frédéric Péters | 0bc84f8daf | |
Serghei Mihai | 1f8a7cc708 | |
Serghei Mihai | c02d3b645f | |
Serghei Mihai | 72723e8549 | |
Serghei Mihai | 6e507559ad | |
Frédéric Péters | 8d862c00a8 | |
Frédéric Péters | bc4b018fee | |
Thomas NOËL | 7cb9f9be59 | |
Thomas NOËL | 6d558f0840 | |
Thomas NOËL | bc504cccaf | |
Thomas NOËL | 049aea5fbf | |
Thomas NOËL | 613a53ef6e | |
Thomas NOËL | 32b98be496 |
14
config.xml
|
@ -1,17 +1,17 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="com.cadoles.momo" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
|
||||
<name>Momo</name>
|
||||
<widget id="com.entrouvert.mymeaux2" version="1.0.2" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
|
||||
<name>myMeaux</name>
|
||||
<description>
|
||||
Momo template that serves application from JSON manifest
|
||||
Application mobile de la ville de Meaux
|
||||
</description>
|
||||
<author email="contact@cadoles.com" href="http://cadoles.com">
|
||||
Cadoles Team
|
||||
<author email="info@entrouvert.com" href="http://www.entrouvert.com/">
|
||||
Entr'ouvert
|
||||
</author>
|
||||
<content src="index.html" />
|
||||
<preference name="permissions" value="none" />
|
||||
<preference name="orientation" value="default" />
|
||||
<preference name="target-device" value="universal" />
|
||||
<preference name="fullscreen" value="true" />
|
||||
<preference name="fullscreen" value="false" />
|
||||
<preference name="webviewbounce" value="true" />
|
||||
<preference name="prerendered-icon" value="true" />
|
||||
<preference name="stay-in-webview" value="false" />
|
||||
|
@ -21,7 +21,7 @@
|
|||
<preference name="show-splash-screen-spinner" value="true" />
|
||||
<preference name="auto-hide-splash-screen" value="true" />
|
||||
<preference name="disable-cursor" value="false" />
|
||||
<preference name="android-minSdkVersion" value="10" />
|
||||
<preference name="android-minSdkVersion" value="14" />
|
||||
<preference name="android-installLocation" value="auto" />
|
||||
<feature name="http://api.phonegap.com/1.0/file" />
|
||||
<gap:plugin name="org.apache.cordova.file" version="1.3.1" />
|
||||
|
|
|
@ -57,19 +57,19 @@
|
|||
},
|
||||
"installed_plugins": {
|
||||
"cordova-plugin-file": {
|
||||
"PACKAGE_NAME": "com.cadoles.momo"
|
||||
"PACKAGE_NAME": "com.entrouvert.mymeaux"
|
||||
},
|
||||
"cordova-plugin-file-transfer": {
|
||||
"PACKAGE_NAME": "com.cadoles.momo"
|
||||
"PACKAGE_NAME": "com.entrouvert.mymeaux"
|
||||
},
|
||||
"cordova-plugin-inappbrowser": {
|
||||
"PACKAGE_NAME": "com.cadoles.momo"
|
||||
"PACKAGE_NAME": "com.entrouvert.mymeaux"
|
||||
},
|
||||
"cordova-plugin-whitelist": {
|
||||
"PACKAGE_NAME": "com.cadoles.momo"
|
||||
"PACKAGE_NAME": "com.entrouvert.mymeaux"
|
||||
},
|
||||
"cordova-plugin-zip": {
|
||||
"PACKAGE_NAME": "com.cadoles.momo"
|
||||
"PACKAGE_NAME": "com.entrouvert.mymeaux"
|
||||
}
|
||||
},
|
||||
"dependent_plugins": {}
|
||||
|
|
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.9 KiB |
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 180 225"
|
||||
enable-background="new 0 0 90 90"
|
||||
xml:space="preserve"
|
||||
id="svg2"
|
||||
inkscape:version="0.48.5 r10040"
|
||||
width="100%"
|
||||
height="100%"
|
||||
sodipodi:docname="icon-commerce.svg"><metadata
|
||||
id="metadata14"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs12" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1301"
|
||||
inkscape:window-height="847"
|
||||
id="namedview10"
|
||||
showgrid="false"
|
||||
inkscape:zoom="2.0977778"
|
||||
inkscape:cx="45.95339"
|
||||
inkscape:cy="94.385593"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg2" /><path
|
||||
d="m 69.058356,115.77119 -2.007238,-7.63876 h 80.844622 c 3.17377,0 5.95333,-2.12591 6.78599,-5.18906 l 16.8785,-62.117773 c 0.57723,-2.111823 0.13274,-4.37248 -1.19871,-6.114231 -1.33145,-1.739741 -3.39903,-2.761461 -5.58728,-2.761461 H 47.024998 L 42.678664,15.419356 C 41.866115,12.33006 39.072475,10.176 35.876582,10.176 H 16.717315 c -3.883744,0 -7.0313658,3.147623 -7.0313658,7.031366 0,3.883744 3.1476218,7.031367 7.0313658,7.031367 H 30.454224 L 55.116299,118.058 c -4.883341,3.15768 -8.123481,8.64037 -8.123481,14.88936 0,9.79282 7.938445,17.73328 17.733283,17.73328 9.442867,0 17.139961,-7.38736 17.68099,-16.69547 h 38.342669 c 0.0483,9.7526 7.96459,17.64479 17.72725,17.64479 9.79283,0 17.73328,-7.93845 17.73328,-17.73329 0,-9.79484 -7.93844,-17.73328 -17.73328,-17.73328 -4.10901,0 -7.88012,1.40989 -10.88695,3.75703 H 76.72528 c -2.137969,-1.97103 -4.75663,-3.41713 -7.666924,-4.14923 z M 114.98549,75.668672 110.88453,94.067683 H 96.606589 L 91.968623,75.668672 H 114.98549 z M 89.132746,64.417682 84.492768,46.014649 h 37.101722 l -4.10096,18.403033 H 89.132746 z M 85.003628,94.067683 H 64.062385 L 59.062392,75.668672 h 21.301259 l 4.639977,18.399011 z m 37.409442,0 4.10096,-18.399011 h 21.00359 l -4.99999,18.399011 h -20.10456 z m 28.16167,-29.650001 h -21.55267 l 4.10096,-18.403033 h 22.4517 l -4.99999,18.403033 z M 72.887796,46.014649 77.527773,64.417682 H 56.005276 L 51.005282,46.014649 h 21.882514 z"
|
||||
id="path4"
|
||||
style="fill:#ffffff;fill-opacity:1"
|
||||
inkscape:connector-curvature="0" /></svg>
|
After Width: | Height: | Size: 3.0 KiB |
|
@ -1,7 +1,7 @@
|
|||
.momo-image {
|
||||
width: 100%;
|
||||
border: 1px solid #FFF;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, .3);
|
||||
box-shadow: 0 0 10px rgba(49, 50, 45, .95);
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,6 @@
|
|||
background: #2A80AF;
|
||||
color: #FFF;
|
||||
}
|
||||
.text-cadoles {
|
||||
color: #2A80AF;
|
||||
}
|
||||
.btn-cadoles:hover {
|
||||
background: #1A709F;
|
||||
}
|
||||
|
@ -28,26 +25,6 @@
|
|||
border-color: #3e3f3a;
|
||||
}
|
||||
|
||||
#home {
|
||||
background: #93c54b;
|
||||
|
||||
background: -webkit-linear-gradient(0deg, #348F50 10%, #56B4D3 90%); /* Chrome 10+, Saf5.1+ */
|
||||
background: -moz-linear-gradient(0deg, #348F50 10%, #56B4D3 90%); /* FF3.6+ */
|
||||
background: -ms-linear-gradient(0deg, #348F50 10%, #56B4D3 90%); /* IE10 */
|
||||
background: -o-linear-gradient(0deg, #348F50 10%, #56B4D3 90%); /* Opera 11.10+ */
|
||||
background: linear-gradient(0deg, #348F50 10%, #56B4D3 90%); /* W3C */
|
||||
|
||||
background-image: url("bg.jpg");
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
#dijon {
|
||||
color: #FFF;
|
||||
background: rgba(49, 50, 45, .95);
|
||||
}
|
||||
#dijon .navbar-inverse,
|
||||
#dijon .navbar-inverse .btn,
|
||||
#home .navbar-inverse,
|
||||
#home .navbar-inverse .btn {
|
||||
background: none;
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/* this script will be run after the assets are loaded */
|
||||
/* it could for example flash some new information, like this:
|
||||
* setTimeout(function(){
|
||||
* app.flash('<i class="fa fa-arrow-up pull-right" style="margin-right: 10px;"></i>' +
|
||||
* 'There is a search tool available here', 'info');
|
||||
* }, 10000);
|
||||
*/
|
||||
setTimeout(function(){
|
||||
app.flash('<i class="fa fa-arrow-up pull-right" style="margin-right: 10px;"></i> There is a search tool available here', 'info');
|
||||
}, 10000);
|
||||
|
|
|
@ -0,0 +1,285 @@
|
|||
body {
|
||||
background: #ffffff;
|
||||
font-family: 'latoregular',Arial,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
span.momo-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#home, .momo-page {
|
||||
background-color: none;
|
||||
background: none;
|
||||
background-image: none;
|
||||
background-size: normal;
|
||||
|
||||
}
|
||||
|
||||
#home {
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
.momo-page {
|
||||
top: 100px;
|
||||
}
|
||||
|
||||
.bg {
|
||||
background: none;
|
||||
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: grey;
|
||||
}
|
||||
|
||||
|
||||
#momo-header {
|
||||
background: url(banniere2.png) #ffffff no-repeat;
|
||||
background-size: 100%;
|
||||
background-position: center left;
|
||||
height: 100px;
|
||||
border: 1px red;
|
||||
}
|
||||
|
||||
.navbar-default .navbar-brand, .navbar-default .navbar-brand:hover{
|
||||
color: #6f7d86;
|
||||
font-size: 150%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
div.tiny-gutters > div a,
|
||||
.btn-red {
|
||||
background-image: url("bt-red.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
div.tiny-gutters > div:nth-child(4) a,
|
||||
div.tiny-gutters > div:nth-child(5) a,
|
||||
div.tiny-gutters > div:nth-child(6) a,
|
||||
.btn-green {
|
||||
background-image: url("bt-green.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
div.tiny-gutters > div a:hover,
|
||||
.btn-red:hover, .btn-green:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.btn-commerce {
|
||||
background-image: url("icon-commerce.png");
|
||||
}
|
||||
|
||||
footer div.row > div {
|
||||
display: inline-block;
|
||||
min-height: 42px;
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
footer div.row > div a {
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div#footer-connexion {
|
||||
margin-left: 5%;
|
||||
margin-right: 8%;
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div#footer-connexion a {
|
||||
background-color : #afc966;
|
||||
border-radius: 20px;
|
||||
font-family: "Playfair Display Bold Italic" , sans;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div#footer-connexion a:hover {
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-connexion i.fa-external-link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn-transparent, .btn-transparent:hover{
|
||||
background-color: transparent;
|
||||
margin-top: 10px;
|
||||
min-height: 42px;
|
||||
}
|
||||
|
||||
.btn-transparent img{
|
||||
|
||||
|
||||
}
|
||||
|
||||
div#footer-facebook,
|
||||
div#footer-twitter,
|
||||
div#footer-instagram {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
div#footer-facebook a,
|
||||
div#footer-twitter a,
|
||||
div#footer-instagram a {
|
||||
text-indent: -10000px;
|
||||
}
|
||||
|
||||
div#footer-facebook a {
|
||||
background: url("btn_facebook.png") #ffffff center no-repeat;
|
||||
}
|
||||
|
||||
div#footer-twitter a {
|
||||
background: url("btn_twitter.png") #ffffff center no-repeat;
|
||||
}
|
||||
|
||||
div#footer-instagram a {
|
||||
background: url("btn_instagram.png") #ffffff center no-repeat;
|
||||
}
|
||||
|
||||
.block-green {
|
||||
background-image: url("bt-green.jpg");
|
||||
background-size: cover;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.block-green h4 {
|
||||
font-family: 'playfair_displaybold_italic',Arial,Verdana,sans-serif;
|
||||
}
|
||||
|
||||
.block-green a {
|
||||
color: #3e3f3a;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.momo-footer .text-left {
|
||||
/*background-color : #afc966;
|
||||
border-radius: 20px;*/
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-color: #ffffff;
|
||||
border-color: #ffffff;
|
||||
}
|
||||
|
||||
.momo-title {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.empty {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
|
||||
.liste-actu h3 {
|
||||
border-top: 1px solid #cdcdcd;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.liste-actu h3 a {
|
||||
color : #3e3f3a;
|
||||
}
|
||||
|
||||
.momo-footer {
|
||||
}
|
||||
|
||||
.elus {
|
||||
border-top : 1px solid #cfcfcf;
|
||||
border-bottom: 1px solid #cfcfcf;
|
||||
min-height: 102px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.elus img {
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.elus p {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.elus .elu {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top : 1px solid #cfcfcf;
|
||||
margin-top: 30px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.btn .fa-heart::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
background-image: url(coeur-ville.png);
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
display: block;
|
||||
background-size: 80px;
|
||||
top: 0px;
|
||||
left: 50%;
|
||||
margin-left: -40px;
|
||||
}
|
||||
|
||||
.btn .fa-heart::before {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.momo-page {
|
||||
top: 110px;
|
||||
}
|
||||
|
||||
.navbar-fixed-top .container-fluid {
|
||||
background-color: #ffffff;
|
||||
background: url(banniere2.png) #ffffff top left no-repeat;
|
||||
}
|
||||
|
||||
#momo-header {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#momo-search-input {
|
||||
background-color: grey;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#momo-menu {
|
||||
background-color: grey;
|
||||
color: #ffffff;
|
||||
float: right;
|
||||
|
||||
}
|
||||
|
||||
#momo-menu a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#momo-menu a:hover {
|
||||
color: #93c54b;
|
||||
}
|
||||
|
||||
.navbar-left {
|
||||
float:right !important;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
BIN
www/icon.png
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 49 KiB |
116
www/index.html
|
@ -84,41 +84,41 @@
|
|||
</script>
|
||||
|
||||
<script type="text/x-tmpl" id="momo-header-tmpl">
|
||||
<div class="navbar-btn pull-left">
|
||||
{% if(o.id && o.id != 'home'){ %}
|
||||
<a href="#" class="btn btn-default pull-left momo-back-btn" onclick="window.history.back(); return false;">
|
||||
<span class="sr-only"> History back </span>
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
</a>
|
||||
{% } %}
|
||||
</div>
|
||||
<div class="parent-navbar-brand">
|
||||
<span class="navbar-brand" href="#home">
|
||||
{% if(!(o.titlePersistent || o.meta.titlePersistent)){ %}
|
||||
{%# (o.titleSeparator || o.meta.titleSeparator) %}
|
||||
{% } %}
|
||||
<span class="momo-icon">
|
||||
{% var icon = (o.titlePersistent || o.meta.titlePersistent) ? o.meta.icon : o.icon || o.meta.icon; %}
|
||||
{% if(icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: icon, size: 20, header: true }) %}
|
||||
<div class="navbar-btn">
|
||||
{% if(o.id && o.id != 'home'){ %}
|
||||
<a href="#{%= o.parent.id %}" class="btn btn-default pull-left momo-back-btn">
|
||||
<span class="sr-only"> History back </span>
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
</a>
|
||||
{% } %}
|
||||
</span>
|
||||
<span class="momo-title">
|
||||
{% if(o.titlePersistent || o.meta.titlePersistent){ %}
|
||||
{%= o.meta.title %}
|
||||
</div>
|
||||
<span class="navbar-brand" href="#home">
|
||||
{% if(!(o.titlePersistent || o.meta.titlePersistent || o.id == 'home')){ %}
|
||||
{%# (o.titleSeparator || o.meta.titleSeparator) %}
|
||||
<small>
|
||||
{% if(o.meta.icon && o.icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: o.icon, size: 20, header: true }) %}
|
||||
{% } %}
|
||||
{%# o.title %}
|
||||
</small>
|
||||
{% } else { %}
|
||||
{%# (o.title || o.meta.title) %}
|
||||
{% } %}
|
||||
<span class="momo-icon">
|
||||
{% var icon = (o.titlePersistent || o.meta.titlePersistent || o.id == 'home') ? o.meta.icon : o.icon || o.meta.icon; %}
|
||||
{% if(icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: icon, size: 20, header: true }) %}
|
||||
{% } %}
|
||||
</span>
|
||||
<span class="momo-title">
|
||||
{% if(o.titlePersistent || o.meta.titlePersistent || o.id == 'home'){ %}
|
||||
{%= o.meta.title %}
|
||||
{%# (o.titleSeparator || o.meta.titleSeparator) %}
|
||||
<small>
|
||||
{% if(o.meta.icon && o.icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: o.icon, size: 20, header: true }) %}
|
||||
{% } %}
|
||||
{%# o.title %}
|
||||
</small>
|
||||
{% } else { %}
|
||||
{%# (o.title || o.meta.title) %}
|
||||
{% } %}
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- Main Template -->
|
||||
|
@ -163,7 +163,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<ul id="momo-menu" class="nav navbar-nav navbar-left"></ul>
|
||||
<ul id="momo-menu" class="nav navbar-nav navbar-right"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -174,7 +174,7 @@
|
|||
</script>
|
||||
|
||||
<script type="text/x-tmpl" id="momo-list-item-tmpl">
|
||||
<a href="#{%= o.id %}" class="{% if(!o.header){ %} list-group-item {% } %} clearfix">
|
||||
<a href="#{%= o.id %}" class="{% if(!o.header){ %} list-group-item {% } %} clearfix {%= o.external ? 'offline-disable' : '' %} {%=o.style %}">
|
||||
{% if(o.header){ %}
|
||||
<span class="pull-left">
|
||||
{% if(o.icon){ %}
|
||||
|
@ -192,24 +192,36 @@
|
|||
<i class="fa fa-angle-right pull-right visible-xs-inline"></i>
|
||||
{% } %}
|
||||
{% } else { %}
|
||||
<span class="pull-left">
|
||||
{% if(o.icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: o.icon, size: 20 }) %}
|
||||
{% if(o.external) { %}
|
||||
<i class="fa fa-external-link pull-right"></i>
|
||||
{% } else { %}
|
||||
<i class="fa fa-angle-right pull-right"></i>
|
||||
{% } %}
|
||||
{%# o.title %}
|
||||
</span>
|
||||
{% if(o.external) { %}
|
||||
<i class="fa fa-external-link pull-right"></i>
|
||||
{% if(o.description){ %}
|
||||
<h5 class="list-group-item-heading">
|
||||
{% if(o.icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: o.icon, size: 20 }) %}
|
||||
{% } %}
|
||||
{%# o.title %}
|
||||
</h5>
|
||||
<p class="list-group-item-text">
|
||||
{%# o.description %}
|
||||
</p>
|
||||
{% } else { %}
|
||||
<i class="fa fa-angle-right pull-right"></i>
|
||||
<h5 class="pull-left bottom-0 top-0">
|
||||
{% if(o.icon){ %}
|
||||
{%# tmpl('momo-icon-tmpl', { icon: o.icon, size: 20 }) %}
|
||||
{% } %}
|
||||
{%# o.title %}
|
||||
</h5>
|
||||
{% } %}
|
||||
{% } %}
|
||||
</a>
|
||||
</script>
|
||||
|
||||
<script type="text/x-tmpl" id="momo-icon-item-tmpl">
|
||||
<div class="col-xs-{%= o.colxs %} col-sm-{%= o.colsm %} col-md-{%= o.colmd %} col-lg-{%= o.collg %}">
|
||||
<a href="#{%= o.id %}" class="btn btn-block text-center {%= o.className || 'btn-default' %}">
|
||||
<div class="col-xs-{%= o.colxs %} col-sm-{%= o.colsm %} col-md-{%= o.colmd %} col-lg-{%= o.collg %} {%=o.style %}">
|
||||
<a href="#{%= o.id %}" class="btn btn-block text-center {%= o.className || 'btn-default' %} {%= o.external ? 'offline-disable' : '' %}">
|
||||
{% if(o.external){ %}
|
||||
<i class="fa fa-external-link top-right"></i>
|
||||
{% } %}
|
||||
|
@ -249,12 +261,31 @@
|
|||
<div class="clearfix"></div>
|
||||
</script>
|
||||
|
||||
<!-- Offline template -->
|
||||
<script type="text/x-tmpl" id="momo-offline-tmpl">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-warning"></i>
|
||||
Application hors-ligne
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<!-- Page template -->
|
||||
<script type="text/x-tmpl" id="momo-page-tmpl">
|
||||
{% var displayFooter = true; %}
|
||||
|
||||
<div class="{% if(o.url){ %}{% } else { %}momo-page-wrapper{% } %} clearfix">
|
||||
|
||||
{% if(o.url && !o.url.isImage()){ %}
|
||||
<div class="momo-frame-spinner offline-hidden">
|
||||
<div class="momo-loading text-muted">
|
||||
<i class="fa fa-spinner fa-pulse fa-3x"></i>
|
||||
<p class="momo-loading-text">
|
||||
Chargement du contenu
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% } %}
|
||||
|
||||
{% if(!(o.url && o.url.isImage())){ %}
|
||||
<div class="momo-flash-messages"></div>
|
||||
<div class="container-fluid">
|
||||
|
@ -278,7 +309,6 @@
|
|||
|
||||
{% if(o.url && !o.url.isImage()){ %}
|
||||
<iframe src="{%= o.url %}" class="momo-iframe"></iframe>
|
||||
<!--div class="momo-frame-overlay"></div-->
|
||||
{% } %}
|
||||
|
||||
{% if(o.pages){ %}
|
||||
|
|
1467
www/index.json
203
www/js/index.js
|
@ -28,6 +28,7 @@ var ANIMATION_IN_CLASS = 'pt-page-moveFromRight';
|
|||
var ANIMATION_BACK_OUT_CLASS = 'pt-page-moveToRightEasing pt-page-ontop';
|
||||
var ANIMATION_BACK_IN_CLASS = 'pt-page-moveFromLeft';
|
||||
var ON_PULL = 'checkForUpdate'; // || 'update'
|
||||
var CHECK_FOR_CONNECTION_INTERVAL = 3000;
|
||||
|
||||
// Application
|
||||
var app = {
|
||||
|
@ -38,12 +39,12 @@ var app = {
|
|||
// Minimal Default Manifest
|
||||
manifest: {
|
||||
meta: {
|
||||
'title': 'Momo Application',
|
||||
'title': 'myMeaux',
|
||||
'icon': 'icon.png',
|
||||
'contact': 'contact@cadoles.com',
|
||||
'contact': 'mobile@mymeaux.fr',
|
||||
'manifestUrl': 'index.json',
|
||||
'assetsUrl': 'assets.zip',
|
||||
'updateFreq': 60000,
|
||||
'updateFreq': 600,
|
||||
'default': true,
|
||||
'titlePersitent': true,
|
||||
'titleSeparator': "<br>",
|
||||
|
@ -70,6 +71,7 @@ var app = {
|
|||
},
|
||||
|
||||
// Misc Data
|
||||
online : true,
|
||||
current : 0,
|
||||
isAnimating : false,
|
||||
endCurrPage : false,
|
||||
|
@ -107,10 +109,10 @@ var app = {
|
|||
}
|
||||
|
||||
// Phone Context
|
||||
if( window.isphone ) {
|
||||
if( window.isphone ) {
|
||||
document.addEventListener("deviceready", this.onDeviceReady, false);
|
||||
// Testing Context
|
||||
} else {
|
||||
} else {
|
||||
this.onDeviceReady();
|
||||
}
|
||||
},
|
||||
|
@ -118,7 +120,7 @@ var app = {
|
|||
// Device ready callback
|
||||
onDeviceReady: function() {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', '../index.json');
|
||||
request.open('GET', './index.json');
|
||||
request.onload = function() {
|
||||
if (request.status != 200) {
|
||||
/* this should never happen */
|
||||
|
@ -134,6 +136,9 @@ var app = {
|
|||
app.manifest.content = new_manifest.content;
|
||||
app.manifest.pages = new_manifest.pages;
|
||||
app.manifest.footer = new_manifest.footer;
|
||||
app.manifest.display = new_manifest.display;
|
||||
app.manifest.menu = new_manifest.menu;
|
||||
app.manifest._pages = new_manifest._pages;
|
||||
app.onDefaultManifestLoaded();
|
||||
}
|
||||
};
|
||||
|
@ -158,13 +163,16 @@ var app = {
|
|||
app.loadLocalManifest();
|
||||
|
||||
// Check for new updates
|
||||
app.checkForUpdate(app.start, app.start);
|
||||
//app.checkForUpdate(app.start, app.start);
|
||||
|
||||
// Update Reminder
|
||||
app.updateTimeout = setTimeout( app.checkForLastUpdateCheck, app.manifest.meta.updateFreq );
|
||||
|
||||
// Touch events faster response patch
|
||||
FastClick.attach(document.body);
|
||||
|
||||
// Start Application
|
||||
app.start();
|
||||
},
|
||||
|
||||
initFileSystem: function(){
|
||||
|
@ -179,7 +187,7 @@ var app = {
|
|||
window.requestFileSystem(LocalFileSystem.TEMPORARY, 0,
|
||||
function(fileSystem){
|
||||
app.rootPath = fileSystem.root.toURL();
|
||||
},
|
||||
},
|
||||
function(err){
|
||||
if(DEBUG){ console.log('FileSystem unreachable'); }
|
||||
app.flash("Impossible d'écrire sur le périphérique", 'danger');
|
||||
|
@ -225,11 +233,78 @@ var app = {
|
|||
});
|
||||
},
|
||||
|
||||
checkConnection: function(resolve, reject){
|
||||
try {
|
||||
switch(navigator.network.connection.type){
|
||||
case Connection.ETHERNET:
|
||||
case Connection.WIFI:
|
||||
case Connection.CELL_4G:
|
||||
case Connection.CELL_3G:
|
||||
case Connection.CELL_2G:
|
||||
app.online = true;
|
||||
if(typeof resolve === "function"){
|
||||
resolve();
|
||||
}
|
||||
break;
|
||||
case Connection.NONE:
|
||||
case Connection.UNKNOWN:
|
||||
default:
|
||||
app.online = false;
|
||||
if(typeof reject === "function"){
|
||||
reject();
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch(e) {
|
||||
if(navigator.onLine){
|
||||
app.online = true;
|
||||
if(typeof resolve === "function"){
|
||||
resolve();
|
||||
}
|
||||
} else {
|
||||
app.online = false;
|
||||
if(typeof reject === "function"){
|
||||
reject();
|
||||
}
|
||||
}
|
||||
}
|
||||
// Hide offline specific elements
|
||||
var i, elements;
|
||||
elements = document.getElementsByClassName("offline-hidden");
|
||||
for (i = 0; i < elements.length; i++){
|
||||
if(app.online){
|
||||
elements[i].classList.remove('hidden');
|
||||
} else {
|
||||
elements[i].classList.add('hidden');
|
||||
}
|
||||
}
|
||||
// Show offline specific elements
|
||||
var i, elements;
|
||||
elements = document.getElementsByClassName("offline-visible");
|
||||
for (i = 0; i < elements.length; i++){
|
||||
if(app.online){
|
||||
elements[i].classList.add('hidden');
|
||||
} else {
|
||||
elements[i].classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
// Disable offline specific elements
|
||||
elements = document.getElementsByClassName("offline-disable");
|
||||
for (i = 0; i < elements.length; i++){
|
||||
if(app.online){
|
||||
elements[i].classList.remove('disabled');
|
||||
} else {
|
||||
elements[i].classList.add('disabled');
|
||||
}
|
||||
}
|
||||
return app.online;
|
||||
},
|
||||
|
||||
// Check for last update check
|
||||
checkForLastUpdateCheck: function(resolve, reject){
|
||||
// Checklast Update
|
||||
var lastUpdate = localStorage.getItem("momo-timestamp") ? new Date(localStorage.getItem("momo-timestamp")) : new Date(0);
|
||||
var timeDiff = ((new Date()).getTime() - lastUpdate.getTime()) / 1000;
|
||||
var timeDiff = ((new Date()).getTime() - lastUpdate.getTime());
|
||||
var updateRequired = timeDiff > app.manifest.meta.updateFreq;
|
||||
|
||||
if(updateRequired){
|
||||
|
@ -249,10 +324,24 @@ var app = {
|
|||
var updateAvailable = false;
|
||||
var updateError = false;
|
||||
|
||||
if(!app.online){
|
||||
var msg = "Impossible de détecter une mise à jour car votre appareil n'est pas connecté à Internet. ";
|
||||
var updatedAt = localStorage.getItem('momo-updated-at');
|
||||
if(updatedAt){
|
||||
msg += "Pour information, la dernière mise à jour date du " + app.utils.formatDate(new Date(updatedAt)) + ".";
|
||||
}
|
||||
app.utils.setLoadingMsg("Application hors-ligne");
|
||||
app.flash(msg, 'danger');
|
||||
if(typeof resolve === 'function'){
|
||||
resolve(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var onGetMtime = function(key, mtime, ready){
|
||||
var old_mtime = localStorage.getItem("momo-"+key+"-mtime");
|
||||
if (mtime) {
|
||||
if(mtime.toString() !== old_mtime) {
|
||||
if(mtime != old_mtime) {
|
||||
updateAvailable = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -265,6 +354,9 @@ var app = {
|
|||
if(typeof reject === 'function'){
|
||||
reject();
|
||||
}
|
||||
if(typeof resolve === 'function'){
|
||||
resolve(false);
|
||||
}
|
||||
} else {
|
||||
/* record that a check for update was succesfully done */
|
||||
localStorage.setItem("momo-timestamp", (new Date()).toString());
|
||||
|
@ -273,7 +365,7 @@ var app = {
|
|||
app.flash(tmpl('momo-update-available-tmpl', { mtime: app.utils.formatDate(mtime) }), 'success');
|
||||
app.utils.setLoadingMsg("Mise à jour disponible !");
|
||||
} else {
|
||||
app.utils.setLoadingMsg("Aucune nouvelle mises à jour");
|
||||
app.utils.setLoadingMsg("Aucune nouvelles mises à jour");
|
||||
}
|
||||
if(typeof resolve === 'function'){
|
||||
resolve(updateAvailable);
|
||||
|
@ -344,7 +436,7 @@ var app = {
|
|||
|
||||
// Override meta
|
||||
app.manifest.meta = app.utils.extend(app.safeManifest.meta, app.manifest.meta);
|
||||
|
||||
|
||||
// Store manifest if parsable
|
||||
localStorage.setItem("momo-manifest", manifestResponse);
|
||||
|
||||
|
@ -392,9 +484,9 @@ var app = {
|
|||
if(DEBUG){ console.log("Cannot load "+url+" [Error "+(request ? request.status : 'Unknown')+"]. Loading local manifest instead."); }
|
||||
|
||||
// Store proper manifest
|
||||
localStorage.setItem("momo-manifest", JSON.stringify(app.safeManifest));
|
||||
localStorage.setItem("momo-manifest", app.safeManifest);
|
||||
|
||||
// Restore safe manifest
|
||||
// Restore safe manifest
|
||||
app.manifest = app.safeManifest;
|
||||
},
|
||||
|
||||
|
@ -402,7 +494,7 @@ var app = {
|
|||
patchResponse: function(response, cb){
|
||||
|
||||
var patch = function(jsonText, path) {
|
||||
return jsonText.replace(/(['"\(])\/?(assets\/[^'"\)]*)(['"\)])/g, function(match, q1, p, q2){
|
||||
return jsonText.replace(/(['"\(])\/?(assets|media\/[^'"\)]*)(['"\)])/g, function(match, q1, p, q2){
|
||||
return q1+path+p+q2;
|
||||
});
|
||||
};
|
||||
|
@ -451,10 +543,10 @@ var app = {
|
|||
// Fetch Assets Zip Archive
|
||||
fileTransfer.download(
|
||||
// Source
|
||||
uri,
|
||||
uri,
|
||||
// Destination
|
||||
filePath,
|
||||
// Success callback
|
||||
filePath,
|
||||
// Success callback
|
||||
function(entry) {
|
||||
app.utils.setLoadingMsg("Extraction de la mise à jour");
|
||||
// Unzip Assets
|
||||
|
@ -467,7 +559,7 @@ var app = {
|
|||
if(typeof resolve === 'function') {
|
||||
resolve();
|
||||
}
|
||||
} else
|
||||
} else
|
||||
if(ret === -1) {
|
||||
if(typeof reject === 'function') {
|
||||
reject();
|
||||
|
@ -549,7 +641,7 @@ var app = {
|
|||
script.src = file;
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Refresh stylesheets
|
||||
|
@ -574,7 +666,7 @@ var app = {
|
|||
link.href = file;
|
||||
document.getElementsByTagName("head")[0].appendChild(link);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -649,12 +741,12 @@ var app = {
|
|||
|
||||
// Default route to home
|
||||
app.manifest.id = app.currentPage = 'home';
|
||||
|
||||
|
||||
// Dev page refresh : redirect to home
|
||||
window.location.replace('#home');
|
||||
// Regiter pages tree
|
||||
app.registerPage(app.manifest, app.defaultPage);
|
||||
|
||||
|
||||
// Render Homepage
|
||||
app.render(app.manifest);
|
||||
|
||||
|
@ -683,7 +775,7 @@ var app = {
|
|||
|
||||
// Extends default page
|
||||
data = app.utils.extend(app.defaultPage, data);
|
||||
|
||||
|
||||
// Set page's parent
|
||||
data.parent = parentPage;
|
||||
|
||||
|
@ -787,7 +879,7 @@ var app = {
|
|||
body: data.content,
|
||||
keywords: data.keywords
|
||||
});
|
||||
|
||||
|
||||
// Return ID string
|
||||
return data.id;
|
||||
} else
|
||||
|
@ -894,14 +986,9 @@ var app = {
|
|||
// Navigate to page
|
||||
navigate: function(page, back, cb, force){
|
||||
var page_obj = app.pages[page];
|
||||
|
||||
if(page_obj.external && back){
|
||||
window.history.back();
|
||||
return false;
|
||||
} else
|
||||
if(page_obj.external){
|
||||
app.utils.openExternalURL(page_obj.url, page_obj.inAppBrowser);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Keep try to navigate until previous animation is done.
|
||||
|
@ -1022,13 +1109,13 @@ var app = {
|
|||
|
||||
// Location Hash change event (sorry & good luck)
|
||||
onHashChange: function(e) {
|
||||
var hash = window.location.hash,
|
||||
var hash = window.location.hash,
|
||||
length = window.history.length,
|
||||
page = window.location.hash.slice(1),
|
||||
prev, next;
|
||||
|
||||
|
||||
console.warn(app.previousPage + " -> " + page);
|
||||
//console.warn(app.previousPage + " -> " + page);
|
||||
|
||||
// Hack of the century ?
|
||||
if(app.ignoreHash){ return false; }
|
||||
|
@ -1063,7 +1150,7 @@ var app = {
|
|||
app.ignoreHash = false;
|
||||
app.previousPage = page;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
if(page === 'momo-back'){
|
||||
prev = app.pages[app.currentPage].prev;
|
||||
|
@ -1121,17 +1208,17 @@ var app = {
|
|||
|
||||
if(!app.pages.hasOwnProperty(page)){
|
||||
page = 'home';
|
||||
}
|
||||
}
|
||||
|
||||
var back = page === 'home';
|
||||
|
||||
console.log(app.pageHistory.join(',')+ " (index = "+app.pageIndex+")");
|
||||
//console.log(app.pageHistory.join(',')+ " (index = "+app.pageIndex+")");
|
||||
|
||||
if (app.pageHistory.length/* && app.historyLength == length*/) {
|
||||
// Goind Back
|
||||
if (app.pageHistory[app.pageIndex - 1] === page) {
|
||||
//app.pageHistory = app.pageHistory.slice(0, app.pageIndex);
|
||||
back = true;
|
||||
back = true;
|
||||
app.pageIndex--;
|
||||
} else
|
||||
// Going Forward
|
||||
|
@ -1152,6 +1239,9 @@ var app = {
|
|||
}
|
||||
|
||||
if(app.currentPage !== page){
|
||||
if(app.pages[page].external && app.online) {
|
||||
return app.utils.openExternalURL(app.pages[page].url);
|
||||
}
|
||||
app.navigate(page, back);
|
||||
}
|
||||
app.parentPage = page;
|
||||
|
@ -1228,14 +1318,14 @@ var app = {
|
|||
setTimeout(function(){
|
||||
var elements = document.getElementsByClassName("momo-flash-messages");
|
||||
for (i = 0; i < elements.length; i++){
|
||||
elements[i].innerHTML += tmpl('momo-flash-message-tmpl', {
|
||||
elements[i].innerHTML += tmpl('momo-flash-message-tmpl', {
|
||||
message: message,
|
||||
type: type ? type : 'info'
|
||||
type: type ? type : 'info'
|
||||
});
|
||||
}
|
||||
}, 200);
|
||||
},
|
||||
|
||||
|
||||
update: function( resolve, reject ) {
|
||||
var els = document.getElementsByTagName("a"),
|
||||
els_length = els.length;
|
||||
|
@ -1250,7 +1340,7 @@ var app = {
|
|||
app.appendAssets(
|
||||
function(){
|
||||
app.reset(_resolve, _reject);
|
||||
},
|
||||
},
|
||||
function(){
|
||||
app.reset(_reject, _reject);
|
||||
}
|
||||
|
@ -1260,22 +1350,22 @@ var app = {
|
|||
var loadAssets = function(_resolve, _reject){
|
||||
app.loadAssets(
|
||||
function(){
|
||||
appendAssets(_resolve, _reject);
|
||||
appendAssets(_resolve, _reject);
|
||||
},
|
||||
function(){
|
||||
app.reset(_reject, _reject);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
app.loadManifest(
|
||||
function(){
|
||||
localStorage.setItem('momo-manifest-mtime', app.manifestMtime);
|
||||
localStorage.setItem('momo-assets-mtime', app.assetsMtime);
|
||||
localStorage.setItem('momo-updated-at', new Date());
|
||||
loadAssets(resolve, reject);
|
||||
},
|
||||
function(){
|
||||
loadAssets(resolve, reject);
|
||||
function() {
|
||||
app.flash("Mise à jour impossible. Veuillez vous assurer que vous êtes connectés", 'danger');
|
||||
}
|
||||
);
|
||||
},
|
||||
|
@ -1361,16 +1451,11 @@ var app = {
|
|||
return false;
|
||||
},
|
||||
|
||||
openExternalURL: function(url, inAppBrowser){
|
||||
//if(inAppBrowser){
|
||||
// cordova.InAppBrowser.open(url);
|
||||
//} else {
|
||||
if(navigator.app){ // Android
|
||||
navigator.app.loadUrl(encodeURI(url), { openExternal:true });
|
||||
} else { // iOS and others
|
||||
window.open(encodeURI(url), "_system", 'location=yes'); // opens in the app, not in safari
|
||||
}
|
||||
//}
|
||||
openExternalURL: function(url){
|
||||
window.replaceHash(app.parentPage);
|
||||
if(navigator.app){ // Android
|
||||
navigator.app.loadUrl(encodeURI(url), { openExternal:true });
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
|
@ -1538,17 +1623,17 @@ var app = {
|
|||
|
||||
clone: function (obj){
|
||||
var copy;
|
||||
|
||||
|
||||
// Handle the 3 simple types, and null or undefined
|
||||
if (null === obj || "object" !== typeof obj){ return obj; }
|
||||
|
||||
|
||||
// Handle Date
|
||||
if (obj instanceof Date) {
|
||||
copy = new Date();
|
||||
copy.setTime(obj.getTime());
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
// Handle Array
|
||||
if (obj instanceof Array) {
|
||||
copy = [];
|
||||
|
@ -1557,7 +1642,7 @@ var app = {
|
|||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
// Handle Object
|
||||
if (obj instanceof Object) {
|
||||
copy = {};
|
||||
|
@ -1566,7 +1651,7 @@ var app = {
|
|||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
throw new Error("Unable to copy obj! Its type isn't supported.");
|
||||
},
|
||||
|
||||
|
|