diff --git a/.htaccess b/.htaccess index e2bfcc4..ad3a01c 100644 --- a/.htaccess +++ b/.htaccess @@ -1,26 +1,14 @@ AddHandler application/x-httpd-php .html .htm - - - BrowserMatch ^Mozilla/4 gzip-only-text/html - BrowserMatch ^Mozilla/4\.0[678] no-gzip - BrowserMatch \bMSIE !no-gzip !gzip-only-text/html - BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html - - - Header append Vary User-Agent env=!dont-vary - -AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon - RewriteEngine On - RewriteRule ^index.html$ index.php [L] - RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /IlLievitarioManut/js/libs/$1.js [L] - RewriteRule ^js/(.*)\.[0-9]+\.js$ /IlLievitarioManut/js/$1.js [L] - RewriteRule ^css/(.*)\.[0-9]+\.css$ /IlLievitarioManut/css/$1.css [L] - RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /IlLievitarioManut/Resources/img/$1.png [L] - RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /IlLievitarioManut/Resources/img/$1.gif [L] - RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /IlLievitarioManut/Resources/icons/$1.png [L] + RewriteRule ^index.html$ /NewMobileWebSite/index.php [L] + RewriteRule ^js/libs/(.*)\.[0-9]+\.js$ /NewMobileWebSite/js/libs/$1.js [L] + RewriteRule ^js/(.*)\.[0-9]+\.js$ /NewMobileWebSite/js/$1.js [L] + RewriteRule ^css/(.*)\.[0-9]+\.css$ /NewMobileWebSite/css/$1.css [L] + RewriteRule ^Resources/img/(.*)\.[0-9]+\.png$ /NewMobileWebSite/Resources/img/$1.png [L] + RewriteRule ^Resources/img/(.*)\.[0-9]+\.gif$ /NewMobileWebSite/Resources/img/$1.gif [L] + RewriteRule ^Resources/icons/(.*)\.[0-9]+\.png$ /NewMobileWebSite/Resources/icons/$1.png [L] diff --git a/Resources/img/camera.png b/Resources/img/camera.png new file mode 100644 index 0000000..6b80020 Binary files /dev/null and b/Resources/img/camera.png differ diff --git a/Resources/img/notification.png b/Resources/img/notification.png new file mode 100644 index 0000000..a34201e Binary files /dev/null and b/Resources/img/notification.png differ diff --git a/Resources/img/photo.png b/Resources/img/photo.png new file mode 100644 index 0000000..bb1e242 Binary files /dev/null and b/Resources/img/photo.png differ diff --git a/Resources/img/property.png b/Resources/img/property.png new file mode 100644 index 0000000..bef0629 Binary files /dev/null and b/Resources/img/property.png differ diff --git a/Resources/originali/blocco.png b/Resources/originali/blocco.png new file mode 100644 index 0000000..45980d7 Binary files /dev/null and b/Resources/originali/blocco.png differ diff --git a/Resources/originali/converter.png b/Resources/originali/converter.png new file mode 100644 index 0000000..972ce6c Binary files /dev/null and b/Resources/originali/converter.png differ diff --git a/Resources/originali/donation.png b/Resources/originali/donation.png new file mode 100644 index 0000000..19701c4 Binary files /dev/null and b/Resources/originali/donation.png differ diff --git a/Resources/originali/faq.png b/Resources/originali/faq.png new file mode 100644 index 0000000..3a3a54e Binary files /dev/null and b/Resources/originali/faq.png differ diff --git a/Resources/originali/favorite.png b/Resources/originali/favorite.png new file mode 100644 index 0000000..5d2eebb Binary files /dev/null and b/Resources/originali/favorite.png differ diff --git a/Resources/originali/house.png b/Resources/originali/house.png new file mode 100644 index 0000000..0f3e6c8 Binary files /dev/null and b/Resources/originali/house.png differ diff --git a/Resources/originali/info.png b/Resources/originali/info.png new file mode 100644 index 0000000..03b0727 Binary files /dev/null and b/Resources/originali/info.png differ diff --git a/Resources/originali/more.png b/Resources/originali/more.png new file mode 100644 index 0000000..35f2dfa Binary files /dev/null and b/Resources/originali/more.png differ diff --git a/Resources/originali/notification.png b/Resources/originali/notification.png new file mode 100644 index 0000000..7d998db Binary files /dev/null and b/Resources/originali/notification.png differ diff --git a/Resources/originali/photo.png b/Resources/originali/photo.png new file mode 100644 index 0000000..6ccffb7 Binary files /dev/null and b/Resources/originali/photo.png differ diff --git a/Resources/originali/previous.png b/Resources/originali/previous.png new file mode 100644 index 0000000..0780989 Binary files /dev/null and b/Resources/originali/previous.png differ diff --git a/Resources/originali/ricette.png b/Resources/originali/ricette.png new file mode 100644 index 0000000..d50a5ea Binary files /dev/null and b/Resources/originali/ricette.png differ diff --git a/Resources/originali/save.png b/Resources/originali/save.png new file mode 100644 index 0000000..372261b Binary files /dev/null and b/Resources/originali/save.png differ diff --git a/Resources/originali/search.png b/Resources/originali/search.png new file mode 100644 index 0000000..32aae4a Binary files /dev/null and b/Resources/originali/search.png differ diff --git a/Resources/originali/settings.png b/Resources/originali/settings.png new file mode 100644 index 0000000..a4d2731 Binary files /dev/null and b/Resources/originali/settings.png differ diff --git a/Resources/originali/slr_camera-512.png b/Resources/originali/slr_camera-512.png new file mode 100644 index 0000000..bbbbb7e Binary files /dev/null and b/Resources/originali/slr_camera-512.png differ diff --git a/Resources/originali/sync.png b/Resources/originali/sync.png new file mode 100644 index 0000000..4ca70b7 Binary files /dev/null and b/Resources/originali/sync.png differ diff --git a/Resources/originali/toolbox.png b/Resources/originali/toolbox.png new file mode 100644 index 0000000..455cf58 Binary files /dev/null and b/Resources/originali/toolbox.png differ diff --git a/build.cmd b/build.cmd index 454beb4..0f6837b 100644 --- a/build.cmd +++ b/build.cmd @@ -1,5 +1,4 @@ REM node r.js -o app.build_dev.js node r.js -o app.build_prod.js REM call cleancss -o .\css\loadingStyle.min.css .\css\loadingStyle.css -call cleancss -o .\css\style.min.css .\css\style.css -pause \ No newline at end of file +call cleancss -o .\css\style.min.css .\css\style.css \ No newline at end of file diff --git a/css/base.style.css b/css/base.style.css index 2392c6c..20c2a26 100644 --- a/css/base.style.css +++ b/css/base.style.css @@ -3,18 +3,68 @@ height: 400px; } +.circle +{ +position: relative; +top: -6px; +left: 15px; +width: 12px; +height: 12px; +border-radius: 12px; +font-size: 10px; +color: #fff; +line-height: 12px; +text-align: center; +background: red; +z-index: 1; +text-indent: 0; +} + .nav-glyphish-example .ui-btn { padding-top: 35px !important; } .nav-glyphish-example .ui-btn:after { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; } .ui-icon-myHome:after { background: url("https://dl.dropboxusercontent.com/s/w5evmv0suijf2jd/house.png") 50% 50% no-repeat; background-size: 22px 22px; margin-top: -15px !important; - width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; + width: 30px!important; height: 30px!important; margin-left: -15px !important; + box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} +.notification:after { + background: url("https://dl.dropboxusercontent.com/s/afsciy4lipub4hf/notification.png") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; margin-left: -15px !important; + box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} +#optionBtn:after { + background: url("https://dl.dropboxusercontent.com/s/gnlhujh5a86qdhi/property.png?dl=0") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; margin-left: -15px !important; + box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} + +#favoriteBtn:after { + background: url("https://dl.dropboxusercontent.com/s/ptt4475xkrv0chu/favorite.png") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} +#scattaPhotoBtn:after { + background: url("https://dl.dropboxusercontent.com/s/kou4hv3nzau9161/camera.png") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} +#uploadPhotoBtn:after { + background: url("https://dl.dropboxusercontent.com/s/k65p3k0frglitu2/photo.png") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; +} + +#backBtn:after { background: url("https://dl.dropboxusercontent.com/s/b5feph9hnl1wvep/previous.png") 50% 50% no-repeat; background-size: 22px 22px; + margin-top: -15px !important; + width: 30px!important; height: 30px!important; margin-left: -15px !important; + box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; } -#favoriteBtn:after { background: url("https://dl.dropboxusercontent.com/s/ptt4475xkrv0chu/favorite.png") 50% 50% no-repeat; background-size: 22px 22px; } #infoBtn:after { background: url("https://dl.dropboxusercontent.com/s/uoe0goxll3anh3x/info.png") 50% 50% no-repeat; background-size: 22px 22px; } -#backBtn:after { background: url("https://dl.dropboxusercontent.com/s/b5feph9hnl1wvep/previous.png") 50% 50% no-repeat; background-size: 16px 16px; } #noteBtn:after { background: url("https://dl.dropboxusercontent.com/s/vtl7zq0b144aiep/blocco.png") 50% 50% no-repeat; background-size: 22px 22px; } #indexBtn:after { background: url("https://dl.dropboxusercontent.com/s/pn37wqdw6z1rd8s/ricette.png") 50% 50% no-repeat; background-size: 22px 22px; } #toolsBtn:after { background: url("https://dl.dropboxusercontent.com/s/8n0npemivbc6kuy/toolbox.png") 50% 50% no-repeat; background-size: 22px 22px; } @@ -27,22 +77,22 @@ box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important;} .loginfb { - content: url('https://www.dropbox.com/s/vsc19gan0ihjptr/fblogin.png'); + content: url('https://dl.dropboxusercontent.com/s/vsc19gan0ihjptr/fblogin.png'); width: 200px; } .logoutfb { - content: url('https://www.dropbox.com/s/sdbe56vqxeqevph/fblogout.png'); + content: url('https://dl.dropboxusercontent.com/s/sdbe56vqxeqevph/fblogout.png'); width: 200px; } .logingplus { - content: url('https://www.dropbox.com/s/k43w3cfzowlynhk/gpluslogin.png'); + content: url('https://dl.dropboxusercontent.com/s/k43w3cfzowlynhk/gpluslogin.png'); width: 200px; } .logoutgplus { - content: url('https://www.dropbox.com/s/nnprsunm8zg31en/gpluslogout.png'); + content: url('https://dl.dropboxusercontent.com/s/nnprsunm8zg31en/gpluslogout.png'); width: 200px; } diff --git a/css/style.min.css b/css/style.min.css index ade4f6b..642c0e8 100644 --- a/css/style.min.css +++ b/css/style.min.css @@ -1 +1 @@ -@media screen and (orientation:portrait){.loadingSfondo{padding-top:100px;width:45%}.loadingText{margin-top:35%}}@media screen and (orientation:landscape){.loadingSfondo{padding-top:40px;width:25%}.loadingText{margin-top:5%}}#sfondo{width:308px;height:400px}.nav-glyphish-example .ui-btn{padding-top:35px!important}.nav-glyphish-example .ui-btn:after{width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.ui-icon-myHome:after{background:url(https://dl.dropboxusercontent.com/s/w5evmv0suijf2jd/house.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#favoriteBtn:after{background:url(https://dl.dropboxusercontent.com/s/ptt4475xkrv0chu/favorite.png) 50% 50% no-repeat;background-size:22px 22px}#infoBtn:after{background:url(https://dl.dropboxusercontent.com/s/uoe0goxll3anh3x/info.png) 50% 50% no-repeat;background-size:22px 22px}#backBtn:after{background:url(https://dl.dropboxusercontent.com/s/b5feph9hnl1wvep/previous.png) 50% 50% no-repeat;background-size:16px 16px}#noteBtn:after{background:url(https://dl.dropboxusercontent.com/s/vtl7zq0b144aiep/blocco.png) 50% 50% no-repeat;background-size:22px 22px}#indexBtn:after{background:url(https://dl.dropboxusercontent.com/s/pn37wqdw6z1rd8s/ricette.png) 50% 50% no-repeat;background-size:22px 22px}#toolsBtn:after{background:url(https://dl.dropboxusercontent.com/s/8n0npemivbc6kuy/toolbox.png) 50% 50% no-repeat;background-size:22px 22px}#faqBtn:after{background:url(https://dl.dropboxusercontent.com/s/4ylc7moxwaz9a55/faq.png) 50% 50% no-repeat;background-size:22px 22px}#searchBtn:after{background:url(https://dl.dropboxusercontent.com/s/5gnislgpl7goj5t/search.png) 50% 50% no-repeat;background-size:22px 22px}#moreBtn:after{background:url(https://dl.dropboxusercontent.com/s/hognqeul2ra2x94/more.png) 50% 50% no-repeat;background-size:22px 22px}#settingsBtn:after{background:url(https://dl.dropboxusercontent.com/s/yobvrbi1aml6b0u/settings.png) 50% 50% no-repeat;background-size:22px 22px}#syncBtn:after{background:url(https://dl.dropboxusercontent.com/s/utqdp4t8rzyhmm0/sync.png) 50% 50% no-repeat;background-size:22px 22px}#saveBtn:after{background:url(https://dl.dropboxusercontent.com/s/dsqkblkv9zgqyab/save.png) 50% 50% no-repeat;background-size:22px 22px;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.loginfb{content:url(https://www.dropbox.com/s/vsc19gan0ihjptr/fblogin.png);width:200px}.logoutfb{content:url(https://www.dropbox.com/s/sdbe56vqxeqevph/fblogout.png);width:200px}.logingplus{content:url(https://www.dropbox.com/s/k43w3cfzowlynhk/gpluslogin.png);width:200px}.logoutgplus{content:url(https://www.dropbox.com/s/nnprsunm8zg31en/gpluslogout.png);width:200px}#backBtn,#infoBtn{font-size:x-small}h1{text-align:center}h4.ui-collapsible-heading a{white-space:normal}.ui-li-static.ui-collapsible>.ui-collapsible-heading{margin:0}.ui-li-static.ui-collapsible{padding:0}.ui-li-static.ui-collapsible>.ui-collapsible-heading>.ui-btn{border-top-width:0}.ui-li-static.ui-collapsible>.ui-collapsible-content,.ui-li-static.ui-collapsible>.ui-collapsible-heading.ui-collapsible-heading-collapsed>.ui-btn{border-bottom-width:0}#faqList p{word-wrap:break-word;white-space:normal;font-size:16px}div.ricettaTitolo{word-wrap:break-word;white-space:normal}div.ricettaAutore{float:left;font-size:13px;font-style:italic}.gallery{list-style:none;padding:0;margin:0}.gallery:after{clear:both;content:".";display:block;height:0;visibility:hidden}.gallery li{float:left;width:33.33333333%}.gallery li a{display:block;margin:5px;border:1px solid #3c3c3c}.gallery li img{display:block;width:100%;height:auto}*{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-touch-callout:none}textarea{-webkit-user-select:auto!important}.ui-input-search input,.ui-input-text input,input[type=number],input[type=password],input[type=text]{-webkit-user-select:auto}.ui-footer .ui-navbar .ui-btn{font-size:x-small}.ui-page-theme-a .ui-bar-inherit,.ui-page-theme-a .ui-footer .ui-navbar .ui-btn{background-image:url(sfondo-a.png)}.ui-page-theme-b .ui-bar-inherit,.ui-page-theme-b .ui-footer .ui-navbar .ui-btn,.ui-page-theme-c .ui-bar-inherit,.ui-page-theme-c .ui-footer .ui-navbar .ui-btn{background-image:url(sfondo.png)}.ui-page-theme-a .ui-footer .ui-navbar .ui-btn.ui-btn-active{background-color:#fff;border-color:#42609F;text-shadow:0 1px 0 #42609F;background-image:url(sfondo_selected-a.png)}.ui-page-theme-b .ui-footer .ui-navbar .ui-btn.ui-btn-active,.ui-page-theme-c .ui-footer .ui-navbar .ui-btn.ui-btn-active{background-color:#fff;border-color:#000;text-shadow:0 1px 0 #000;background-image:url(sfondo_selected.png)}label.error{color:red;font-size:16px;font-weight:400;line-height:1.4;margin-top:.5em;width:100%;float:none}@media screen{@media screen and (orientation:landscape){#sfondo{width:154px;height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px){#sfondo{width:231px;height:300px}}@media only screen and (min-device-width :320px) and (max-device-width :480px){#sfondo{width:231px;height:300px}}}div.rating-cancel,div.star-rating{float:left;width:24px;height:24px;text-indent:-999em;cursor:pointer;display:block;background:0 0;overflow:hidden}div.rating-cancel,div.rating-cancel a{background:url(delete.png) no-repeat 0 -24px}div.star-rating,div.star-rating a{background:url(star.png) no-repeat}div.rating-cancel a,div.star-rating a{display:block;width:24px;height:100%;background-position:0 0;border:0}div.star-rating-on a{background-position:0 -24px!important}div.star-rating-hover a{background-position:0 -48px}div.star-rating-readonly a{cursor:default!important}div.star-rating{background:0 0!important;overflow:hidden!important} \ No newline at end of file +@media screen and (orientation:portrait){.loadingSfondo{padding-top:100px;width:45%}.loadingText{margin-top:35%}}@media screen and (orientation:landscape){.loadingSfondo{padding-top:40px;width:25%}.loadingText{margin-top:5%}}#sfondo{width:308px;height:400px}.circle{position:relative;top:-6px;left:15px;width:12px;height:12px;border-radius:12px;font-size:10px;color:#fff;line-height:12px;text-align:center;background:red;z-index:1;text-indent:0}.nav-glyphish-example .ui-btn{padding-top:35px!important}.nav-glyphish-example .ui-btn:after{width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.ui-icon-myHome:after{background:url(https://dl.dropboxusercontent.com/s/w5evmv0suijf2jd/house.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.notification:after{background:url(https://dl.dropboxusercontent.com/s/afsciy4lipub4hf/notification.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#optionBtn:after{background:url(https://dl.dropboxusercontent.com/s/gnlhujh5a86qdhi/property.png?dl=0) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#favoriteBtn:after{background:url(https://dl.dropboxusercontent.com/s/ptt4475xkrv0chu/favorite.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#scattaPhotoBtn:after{background:url(https://dl.dropboxusercontent.com/s/kou4hv3nzau9161/camera.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#uploadPhotoBtn:after{background:url(https://dl.dropboxusercontent.com/s/k65p3k0frglitu2/photo.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#backBtn:after{background:url(https://dl.dropboxusercontent.com/s/b5feph9hnl1wvep/previous.png) 50% 50% no-repeat;background-size:22px 22px;margin-top:-15px!important;width:30px!important;height:30px!important;margin-left:-15px!important;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}#infoBtn:after{background:url(https://dl.dropboxusercontent.com/s/uoe0goxll3anh3x/info.png) 50% 50% no-repeat;background-size:22px 22px}#noteBtn:after{background:url(https://dl.dropboxusercontent.com/s/vtl7zq0b144aiep/blocco.png) 50% 50% no-repeat;background-size:22px 22px}#indexBtn:after{background:url(https://dl.dropboxusercontent.com/s/pn37wqdw6z1rd8s/ricette.png) 50% 50% no-repeat;background-size:22px 22px}#toolsBtn:after{background:url(https://dl.dropboxusercontent.com/s/8n0npemivbc6kuy/toolbox.png) 50% 50% no-repeat;background-size:22px 22px}#faqBtn:after{background:url(https://dl.dropboxusercontent.com/s/4ylc7moxwaz9a55/faq.png) 50% 50% no-repeat;background-size:22px 22px}#searchBtn:after{background:url(https://dl.dropboxusercontent.com/s/5gnislgpl7goj5t/search.png) 50% 50% no-repeat;background-size:22px 22px}#moreBtn:after{background:url(https://dl.dropboxusercontent.com/s/hognqeul2ra2x94/more.png) 50% 50% no-repeat;background-size:22px 22px}#settingsBtn:after{background:url(https://dl.dropboxusercontent.com/s/yobvrbi1aml6b0u/settings.png) 50% 50% no-repeat;background-size:22px 22px}#syncBtn:after{background:url(https://dl.dropboxusercontent.com/s/utqdp4t8rzyhmm0/sync.png) 50% 50% no-repeat;background-size:22px 22px}#saveBtn:after{background:url(https://dl.dropboxusercontent.com/s/dsqkblkv9zgqyab/save.png) 50% 50% no-repeat;background-size:22px 22px;box-shadow:none!important;-moz-box-shadow:none!important;-webkit-box-shadow:none!important;-webkit-border-radius:0!important;border-radius:0!important}.loginfb{content:url(https://dl.dropboxusercontent.com/s/vsc19gan0ihjptr/fblogin.png);width:200px}.logoutfb{content:url(https://dl.dropboxusercontent.com/s/sdbe56vqxeqevph/fblogout.png);width:200px}.logingplus{content:url(https://dl.dropboxusercontent.com/s/k43w3cfzowlynhk/gpluslogin.png);width:200px}.logoutgplus{content:url(https://dl.dropboxusercontent.com/s/nnprsunm8zg31en/gpluslogout.png);width:200px}#backBtn,#infoBtn{font-size:x-small}h1{text-align:center}h4.ui-collapsible-heading a{white-space:normal}.ui-li-static.ui-collapsible>.ui-collapsible-heading{margin:0}.ui-li-static.ui-collapsible{padding:0}.ui-li-static.ui-collapsible>.ui-collapsible-heading>.ui-btn{border-top-width:0}.ui-li-static.ui-collapsible>.ui-collapsible-content,.ui-li-static.ui-collapsible>.ui-collapsible-heading.ui-collapsible-heading-collapsed>.ui-btn{border-bottom-width:0}#faqList p{word-wrap:break-word;white-space:normal;font-size:16px}div.ricettaTitolo{word-wrap:break-word;white-space:normal}div.ricettaAutore{float:left;font-size:13px;font-style:italic}.gallery{list-style:none;padding:0;margin:0}.gallery:after{clear:both;content:".";display:block;height:0;visibility:hidden}.gallery li{float:left;width:33.33333333%}.gallery li a{display:block;margin:5px;border:1px solid #3c3c3c}.gallery li img{display:block;width:100%;height:auto}*{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;-webkit-touch-callout:none}textarea{-webkit-user-select:auto!important}.ui-input-search input,.ui-input-text input,input[type=number],input[type=password],input[type=text]{-webkit-user-select:auto}.ui-footer .ui-navbar .ui-btn{font-size:x-small}.ui-page-theme-a .ui-bar-inherit,.ui-page-theme-a .ui-footer .ui-navbar .ui-btn{background-image:url(sfondo-a.png)}.ui-page-theme-b .ui-bar-inherit,.ui-page-theme-b .ui-footer .ui-navbar .ui-btn,.ui-page-theme-c .ui-bar-inherit,.ui-page-theme-c .ui-footer .ui-navbar .ui-btn{background-image:url(sfondo.png)}.ui-page-theme-a .ui-footer .ui-navbar .ui-btn.ui-btn-active{background-color:#fff;border-color:#42609F;text-shadow:0 1px 0 #42609F;background-image:url(sfondo_selected-a.png)}.ui-page-theme-b .ui-footer .ui-navbar .ui-btn.ui-btn-active,.ui-page-theme-c .ui-footer .ui-navbar .ui-btn.ui-btn-active{background-color:#fff;border-color:#000;text-shadow:0 1px 0 #000;background-image:url(sfondo_selected.png)}label.error{color:red;font-size:16px;font-weight:400;line-height:1.4;margin-top:.5em;width:100%;float:none}@media screen{@media screen and (orientation:landscape){#sfondo{width:154px;height:200px}}@media only screen and (min-device-width :320px) and (max-device-width :568px){#sfondo{width:231px;height:300px}}@media only screen and (min-device-width :320px) and (max-device-width :480px){#sfondo{width:231px;height:300px}}}div.rating-cancel,div.star-rating{float:left;width:24px;height:24px;text-indent:-999em;cursor:pointer;display:block;background:0 0;overflow:hidden}div.rating-cancel,div.rating-cancel a{background:url(delete.png) no-repeat 0 -24px}div.star-rating,div.star-rating a{background:url(star.png) no-repeat}div.rating-cancel a,div.star-rating a{display:block;width:24px;height:100%;background-position:0 0;border:0}div.star-rating-on a{background-position:0 -24px!important}div.star-rating-hover a{background-position:0 -48px}div.star-rating-readonly a{cursor:default!important}div.star-rating{background:0 0!important;overflow:hidden!important} \ No newline at end of file diff --git a/index.php b/index.php index 8005eb9..9b9d07d 100644 --- a/index.php +++ b/index.php @@ -1,15 +1,15 @@ - - Il Lievitario - - - - - - - - + + Il Lievitario + + + + + + + + @@ -18,37 +18,37 @@ - - - - - - + + + + - - - + + + -
- -
-
Caricamento...
- +
+ +
+
Caricamento...
+ +
-
- + \ No newline at end of file diff --git a/js/app.js b/js/app.js index fd9be39..382a04b 100644 --- a/js/app.js +++ b/js/app.js @@ -1,29 +1,33 @@ -define(['jquery','underscore', 'backbone', 'router', 'classes/profile'],function -($, _, Backbone,Router, Profile) { - 'use strict'; - var init=function(){ - //create backbone router - var router=new Router(); - Backbone.history.start(); - Backbone.emulateJSON = true; - var origin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + (location.pathname?location.pathname:''); - openFB.init('1466942266882168', origin, window.localStorage); - openGPlus.init('319140243944-qk0lfhgmi8shi4go97r83l69f1k0gdf4.apps.googleusercontent.com', origin, window.localStorage); - //console.log("Backbone history start"); - // Trigger 'route' event on router instance. - router.on('route', function(name, args) { - //alert(name); - }); +define(['jquery','underscore', 'backbone', 'router', 'classes/profile'], +function($, _, Backbone, Router, Profile) { + + var Application={ + _retThis: function() { + return this; + }, + router: null, + initialize:function(){ + //create backbone router + this.router=new Router(); + Backbone.history.start(); + Backbone.emulateJSON = true; + var origin = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + (location.pathname?location.pathname:''); + openFB.init('1466942266882168', origin, window.localStorage); + openGPlus.init('319140243944-qk0lfhgmi8shi4go97r83l69f1k0gdf4.apps.googleusercontent.com', origin, window.localStorage); + //console.log("Backbone history start"); + // Trigger 'route' event on router instance. + this.router.on('route', function(name, args) { + //alert(name); + }); - if( Profile.isConnected()) { - Profile.loadProfile(); + if( Profile.isConnected()) { + Profile.loadProfile(); + } + + $('body').css('background-color', ''); + $('#loadingFrm').remove(); } - - $('body').css('background-color', ''); - $('#loadingFrm').remove(); }; - return { - initialize:init - }; + return Application._retThis(); }); \ No newline at end of file diff --git a/js/classes/profile.js b/js/classes/profile.js index 6c76073..f3d36d5 100644 --- a/js/classes/profile.js +++ b/js/classes/profile.js @@ -27,7 +27,8 @@ define(['jquery', 'backbone'], "gender":null, "tema": 'b', "risRic": '10', - "type": null + "type": null, + "lastNumRicette": null }, isConnected: function(){ @@ -64,12 +65,16 @@ define(['jquery', 'backbone'], self.data.tema = response[0].TemaUI; self.data.risRic = response[0].RisultatiRicerca; self.data.type = response[0].TipoAccesso; + self.data.lastNumRicette = response[0].NumRicette; retBool = true; } if(successFn) successFn(retBool); }, + getLastNumRicette: function(){ + return this.data.lastNumRicette; + }, getKeySave: function(){ return window.localStorage.getItem("KeySave"); }, diff --git a/js/classes/utility.js b/js/classes/utility.js new file mode 100644 index 0000000..c1768af --- /dev/null +++ b/js/classes/utility.js @@ -0,0 +1,50 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * Created by Denis on 19/06/2014. + */ +define(['jquery', 'backbone','libs/fastclick', 'jqm', 'jQueryPlugins'], + function($, Backbone, FastClick){ + + var Utility = { + retMe: function(){ + return this; + }, + changePage: function(view){ + //append to dom + $('body').append(view.$el); + + $.mobile.pageContainer.pagecontainer ("change", $(view.el), {changeHash:false}); + + FastClick.attach(document.body); + + $(":jqmData(role='page'):last").on("pageshow", function (event) { + if (view.onShowed !== null) + view.onShowed(); + }); + + $('input[type=radio].star').rating({ + callback: function(value, link){ + var tip = $('#hover-test'); + if(value === undefined) + { + $('#hover-test').html("Nessuna" || 'value: ' ); + } + else + $('#hover-test').html(link.title || 'value: ' + value); + }, + focus: function(value, link){ + var tip = $('#hover-test'); + tip[0].data = tip[0].data || tip.html(); + tip.html(link.title || 'value: ' + value); + } + }); + } + }; + + return Utility.retMe(); +}); + diff --git a/js/config.js b/js/config.js index d005173..a832cef 100644 --- a/js/config.js +++ b/js/config.js @@ -1,5 +1,6 @@ var pathJquery = "http://ajax.googleapis.com/ajax/libs/jquery/" + myManifest.Settings.JQueryVersion + "/jquery.min"; -var pathJqueryMobile = "http://ajax.googleapis.com/ajax/libs/jquerymobile/"+ myManifest.Settings.JQueryMobileVersion + "/jquery.mobile.min"; +var pathJqueryMobile = "http://code.jquery.com/mobile/" + myManifest.Settings.JQueryMobileVersion + "/jquery.mobile-" + myManifest.Settings.JQueryMobileVersion + ".min"; +// "http://ajax.googleapis.com/ajax/libs/jquerymobile/"+ myManifest.Settings.JQueryMobileVersion + "/jquery.mobile.min"; requirejs.config({ baseUrl: 'js', diff --git a/js/controls/header/header.js b/js/controls/header/header.js index de4401e..a31c685 100644 --- a/js/controls/header/header.js +++ b/js/controls/header/header.js @@ -1,5 +1,5 @@ -define(['jquery', 'underscore', 'backbone','text!controls/header/headerTemplate.html'], - function($, _, Backbone, headerTemplate){ +define(['jquery', 'underscore', 'backbone','text!controls/header/headerTemplate.html', 'classes/profile'], + function($, _, Backbone, headerTemplate, Profile){ var header = Backbone.View.extend({ @@ -22,6 +22,7 @@ define(['jquery', 'underscore', 'backbone','text!controls/header/headerTemplate. //append the compiled template into view div container this.$el.append(this.template( { "title":this.title } )); + this.$el.find('#notifyBtn').closest('.ui-btn').hide(); //return to enable chained calls return this; } diff --git a/js/controls/header/headerTemplate.html b/js/controls/header/headerTemplate.html index b51daac..810c669 100644 --- a/js/controls/header/headerTemplate.html +++ b/js/controls/header/headerTemplate.html @@ -1,2 +1,3 @@ -Home -

<%= title %>

\ No newline at end of file +Home +

<%= title %>

+News
3
\ No newline at end of file diff --git a/js/main.js b/js/main.js index 3beb54c..094564a 100644 --- a/js/main.js +++ b/js/main.js @@ -1,7 +1,8 @@ //1. load app.js, //2. configure jquery mobile to prevent default JQM ajax navigation //3. bootstrapping application -define(["app", "jqm", "jqm-config", 'jQueryPlugins'], function( app ){ +define(["app", "jqm", "jqm-config", 'jQueryPlugins'], +function( app ){ if(myManifest.Agent.browser.name == "IE Mobile" && myManifest.Agent.browser.version <= 9 ) { window.location.href = "http://old.gruppolapastamadre.it"; } diff --git a/js/manifest.js b/js/manifest.js index 0423c3d..d2b97db 100644 --- a/js/manifest.js +++ b/js/manifest.js @@ -1,20 +1,20 @@ var myManifest = { Debug: false, Name: "Il Lievitario", - Version: "2.2.3", + Version: "3.0.0.0", Author: "Denis Ironi", Settings: { - //DefaultURL: "http://localhost:8081/Service", - DefaultURL: "http://app.gruppolapastamadre.it/Service", + DefaultURL: "http://localhost:8081/Service", + //DefaultURL: "http://dev.gruppolapastamadre.it/Service", JQueryVersion: "1.11.1", - JQueryMobileVersion: "1.4.3", - Device:{ + JQueryMobileVersion: "1.4.5", + Device: { Width: (window.innerWidth > 0) ? window.innerWidth : screen.width, Height: (window.innerHeight > 0) ? window.innerHeight : screen.height } }, - Agent: (new UAParser()).getResult(), - getUrlArg: function(){ + Agent: (new UAParser()).getResult(), + getUrlArg: function() { return (this.Debug ? this.Version + "." + (Math.random() * 1000) : this.Version); } }; \ No newline at end of file diff --git a/js/model/categoryItem/categoryItemCollection.js b/js/model/categoryItem/categoryItemCollection.js index b451f47..6310393 100644 --- a/js/model/categoryItem/categoryItemCollection.js +++ b/js/model/categoryItem/categoryItemCollection.js @@ -11,7 +11,7 @@ var CategoryItems=Backbone.Collection.extend({ model:Category, url: function() { - return myManifest.Settings.DefaultURL + "/api/categoryitems/" + this.categoryId; + return myManifest.Settings.DefaultURL + "/api/ricette/" + this.categoryId; } }); diff --git a/js/model/categoryItem/categoryItemModel.js b/js/model/categoryItem/categoryItemModel.js index 8a63cfd..837e1d3 100644 --- a/js/model/categoryItem/categoryItemModel.js +++ b/js/model/categoryItem/categoryItemModel.js @@ -1,5 +1,5 @@ define(['jquery', 'underscore', 'backbone'], -function ($, _, Backbone){ + function($, _, Backbone) { var CategoryItem = Backbone.Model.extend({ //default attributes @@ -13,6 +13,6 @@ function ($, _, Backbone){ } }); - return CategoryItem; -}); + return CategoryItem; + }); diff --git a/js/model/categoryItem/foundItemCollection.js b/js/model/categoryItem/foundItemCollection.js index 5db9351..a499162 100644 --- a/js/model/categoryItem/foundItemCollection.js +++ b/js/model/categoryItem/foundItemCollection.js @@ -17,7 +17,7 @@ define(['app', 'jquery', 'underscore', 'backbone', 'model/categoryItem/categoryI model:Category, url: function() { - var u = myManifest.Settings.DefaultURL + "/api/categoryitems/search/" + this.numItems + + var u = myManifest.Settings.DefaultURL + "/api/ricette/search/" + this.numItems + "/" + this.dataFilter.categoryId + "/" + this.dataFilter.difficolta; if(this.dataFilter.titolo !== null) diff --git a/js/model/lastRicette/lastRicetteCollection.js b/js/model/lastRicette/lastRicetteCollection.js new file mode 100644 index 0000000..9bdf273 --- /dev/null +++ b/js/model/lastRicette/lastRicetteCollection.js @@ -0,0 +1,21 @@ +define(['app', 'jquery', 'underscore', 'backbone', 'model/lastRicette/lastRicetteModel'], +function (app, $, _, Backbone, LastRicette){ + +var lastRicette=Backbone.Collection.extend({ + + profileID: null, + initialize: function (options) { + this.profileID = options.profileID; + }, + // Book is the model of the collection + model:LastRicette, + + url: function() { + return myManifest.Settings.DefaultURL + "/api/ricette/lastinserted/" + this.profileID; + } + }); + + return lastRicette; +}); + + diff --git a/js/model/lastRicette/lastRicetteModel.js b/js/model/lastRicette/lastRicetteModel.js new file mode 100644 index 0000000..b95f620 --- /dev/null +++ b/js/model/lastRicette/lastRicetteModel.js @@ -0,0 +1,18 @@ +define(['jquery', 'underscore', 'backbone'], + function($, _, Backbone) { + + var LastRicette = Backbone.Model.extend({ + //default attributes + defaults: { + ricetta_id: "", + titolo: '', + autore: '', + valutazione: 0, + difficolta: 0, + categoria_name: '' + } + }); + + return LastRicette; + }); + diff --git a/js/modules/category/category.js b/js/modules/category/category.js index 60590db..4f2258b 100644 --- a/js/modules/category/category.js +++ b/js/modules/category/category.js @@ -1,54 +1,50 @@ -define(['jquery', 'underscore', 'backbone','text!modules/category/categoryViewTemplate.html', 'text!modules/category/categoryItemTemplate.html', 'modules/base/baseView'], -function($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView){ +define(['jquery', 'underscore', 'backbone', 'text!modules/category/categoryViewTemplate.html', 'text!modules/category/categoryItemTemplate.html', 'modules/base/baseView'], + function($, _, Backbone, categoryViewTemplate, categoryItemTemplate, BaseView) { - var CategoryView = BaseView.extend({ + var CategoryView = BaseView.extend({ + collection: null, + categoryName: null, + //initialize template + template: _.template(categoryViewTemplate), + itemtemplate: _.template(categoryItemTemplate), + initialize: function(options) { + var self = this; + CategoryView.__super__.initialize.call(this); + this.collection = options.collection; + this.categoryName = options.categoryName; + this.collection.fetch({ + success: function(data, textStatus, jqXHR) { + self.renderItem(); + } + //success: function(){ self.renderItem(); } + }); + }, + renderItem: function() { + var $ul = $('#allRicette'); - collection: null, - categoryName: null, - //initialize template - template:_.template(categoryViewTemplate), - itemtemplate:_.template(categoryItemTemplate), - - initialize: function (options) { - var self = this; - CategoryView.__super__.initialize.call(this); - this.collection = options.collection; - this.categoryName = options.categoryName; - this.collection.fetch({ - success: function(data, textStatus, jqXHR){ - self.renderItem(); - } - //success: function(){ self.renderItem(); } - }); - }, - - renderItem: function(){ - var $ul = $('#allRicette'); - - var items = this.itemtemplate({data:this.collection.toJSON()}); - - $ul.html( items ); - $ul.listview( "refresh" ); - $ul.trigger( "updatelayout"); - - $.mobile.loading( 'hide' ); - //$( '[data-alpha="true"]' ).alphascroll(); - }, - - //render the content into div of view - render: function(){ - //this.header.title = "pippo"; - CategoryView.__super__.render.call(this); - //this.el is the root element of Backbone.View. By default, it is a div. - //$el is cached jQuery object for the view's element. - //append the compiled template into view div container - this.$el.append(this.header.$el); - this.$el.append(this.template({ categoryName: this.categoryName })); - this.$el.append(this.footer.$el); - //return to enable chained calls - this.$el.find("#indexBtn").addClass("ui-btn-active"); - return this; - } - }); - return CategoryView; -}); \ No newline at end of file + var items = this.itemtemplate({data: this.collection.toJSON()}); + + $ul.html(items); + $ul.listview("refresh"); + $ul.trigger("updatelayout"); + + $.mobile.loading('hide'); + //$( '[data-alpha="true"]' ).alphascroll(); + }, + //render the content into div of view + render: function() { + //this.header.title = "pippo"; + CategoryView.__super__.render.call(this); + //this.el is the root element of Backbone.View. By default, it is a div. + //$el is cached jQuery object for the view's element. + //append the compiled template into view div container + this.$el.append(this.header.$el); + this.$el.append(this.template({categoryName: this.categoryName})); + this.$el.append(this.footer.$el); + //return to enable chained calls + this.$el.find("#indexBtn").addClass("ui-btn-active"); + return this; + } + }); + return CategoryView; + }); \ No newline at end of file diff --git a/js/modules/home/home.js b/js/modules/home/home.js index bbe0f1a..317fd07 100644 --- a/js/modules/home/home.js +++ b/js/modules/home/home.js @@ -1,5 +1,7 @@ -define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.html', 'modules/base/baseView', 'classes/profile'], - function($, _, Backbone, homeViewTemplate, BaseView, Profile){ +define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.html', + 'modules/base/baseView', 'classes/profile', 'classes/utility', 'model/lastRicette/lastRicetteCollection', 'modules/lastricette/lastRicette'], + function($, _, Backbone, homeViewTemplate, + BaseView, Profile, Utility, LastRicetteCollection, LastRicette ){ var HomeView = BaseView.extend({ @@ -12,7 +14,8 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h }, events: { - "click #goFbGroup": "goFbGroup" + "click #goFbGroup": "goFbGroup", + "click #notifyBtn": "onNotifyBtn" }, goFbGroup: function(){ @@ -20,6 +23,14 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h window.location.href = "https://www.facebook.com/groups/732844273469518/"; }, + onNotifyBtn:function(){ + var lastricette = new LastRicetteCollection(); + // will render home view and navigate to homeView + var lastRicetteView=new LastRicette({ collection: lastricette}); + //indexView.render(); + lastRicetteView.bind('renderCompleted:Categories',Utility.changePage,this); + }, + onShowed: function() { if(window.localStorage.getItem("goFbGroup") !== "1") @@ -38,6 +49,13 @@ define(['jquery', 'underscore', 'backbone','text!modules/home/homeViewTemplate.h this.$el.append(this.footer.$el); this.$el.find("#homeBtn").addClass("ui-btn-active"); + var lastNumRicette = Profile.getLastNumRicette(); + //if( lastNumRicette > 0) + { + this.$el.find('#notifyBtn').closest('.ui-btn').show(); + this.$el.find('#notifyBtn').addClass("notification"); + this.$el.find('.circle').text(12); + } //$("#homeBtn").addClass("ui-btn-active"); //return to enable chained calls return this; diff --git a/js/modules/home/homeViewTemplate.html b/js/modules/home/homeViewTemplate.html index 7e44a3e..c8f211f 100644 --- a/js/modules/home/homeViewTemplate.html +++ b/js/modules/home/homeViewTemplate.html @@ -1,15 +1,15 @@
-
+
<% if(profile.data.name){ %>

Bentornat<% if(profile.data.gender=="male"){%>o<%}else{%>a<%}%>
<%=profile.data.name %>

<% } %> - +

IMPORTANTE

-    
+



Le admin

Alessia, Elena e Francesca

hanno RIFONDATO IL GRUPPO!!
diff --git a/js/modules/item/item.js b/js/modules/item/item.js index 39a92fe..241dfec 100644 --- a/js/modules/item/item.js +++ b/js/modules/item/item.js @@ -1,21 +1,18 @@ -define(['jquery', 'underscore', 'backbone','text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile'], - function($, _, Backbone, itemViewTemplate, BaseView, Profile){ +define(['jquery', 'underscore', 'backbone', 'text!modules/item/itemViewTemplate.html', 'modules/base/baseView', 'classes/profile'], + function($, _, Backbone, itemViewTemplate, BaseView, Profile) { - var ItemView = BaseView.extend({ - - collRicetta: null, - collIngredienti: null, - - fetchedRicetta: false, - fetchedIngredienti: false, - //initialize template - template:_.template(itemViewTemplate), - - initialize: function (options) { - var self = this; - ItemView.__super__.initialize.call(this); - this.collRicetta = options.collRicetta; - this.collIngredienti = options.collIngredienti; + var ItemView = BaseView.extend({ + collRicetta: null, + collIngredienti: null, + fetchedRicetta: false, + fetchedIngredienti: false, + //initialize template + template: _.template(itemViewTemplate), + initialize: function(options) { + var self = this; + ItemView.__super__.initialize.call(this); + this.collRicetta = options.collRicetta; + this.collIngredienti = options.collIngredienti; this.collRicetta.fetch({success: function() { self.fetchedRicetta = true; @@ -26,88 +23,160 @@ define(['jquery', 'underscore', 'backbone','text!modules/item/itemViewTemplate.h self.render(); }}); }, - - events: { - "click #favoriteBtn": "favBtn", - "click #backBtn": "backBtn" - }, - - backBtn:function(e){ - e.preventDefault(); - window.history.back(); - }, - - favBtn:function(e){ - e.preventDefault(); - var self = this; - var ric = this.collRicetta.toJSON()[0]; - - if(!Profile.isConnected()) - { - self.$el.find('#popupDialog').popup("open"); - return; - } - - Profile.addRicettaBloccoNote(ric.ricetta_id, - function(msg) { - var favBtn = self.$el.find('#favoriteBtn'); - favBtn.addClass('ui-disabled'); - } - ); - }, - //render the content into div of view - render: function(){ - if(this.fetchedIngredienti && this.fetchedRicetta ) - { - ItemView.__super__.render.call(this); + events: { + "click #favoriteBtn": "favBtn", + "click #optionBtn": "optionBtn", + "click #backBtn": "backBtn", + "click #scattaPhotoBtn": "scattaPhotoBtn", + "change #cameraFile": "cameraFileChanged", + "click #uploadPhotoBtn": "uploadPhotoBtn", + "change #galleyFile": "galleyFileChanged" + }, + backBtn: function(e) { + e.preventDefault(); + window.history.back(); + }, + optionBtn: function(e) { + e.preventDefault(); + var self = this; + self.$el.find('#optionPopupDialog').popup("open"); + }, + scattaPhotoBtn: function(e) { + e.preventDefault(); var self = this; - var ric = self.collRicetta.toJSON()[0]; + if (!Profile.isConnected()) + { + self.$el.find('#popupDialog').popup("open"); + return; + } - Profile.existRicettaBloccoNote(ric.ricetta_id, - function(exist) { - self.$el.append(self.template({ - ricetta: self.collRicetta.toJSON()[0], - ingredienti: self.collIngredienti.toJSON() - })); + $("#cameraFile").click(); + }, + uploadPhotoBtn: function(e) { + e.preventDefault(); + var self = this; - self.$arrayContent = self.$el.find('div[data-role="content"]'); - self.$arrayNavBar = self.$el.find('div[data-role="navbar"] a'); + if (!Profile.isConnected()) + { + self.$el.find('#popupDialog').popup("open"); + return; + } - var favBtn = self.$el.find('#favoriteBtn'); - if(exist > 0) - favBtn.addClass('ui-disabled'); + $("#galleyFile").click(); + }, + loadPhoto: function(objInputFile){ + var self = this; + self.$el.find('#optionPopupDialog').popup("close"); + $.mobile.loading( "show", { + text: "Caricamento immagine in corso...", + textVisible: true, + theme: "a", + textonly: false + }); + + var ric = this.collRicetta.toJSON()[0]; - self.$arrayNavBar.on("click", function(e){ - e.preventDefault(); - var index = jQuery.inArray( this , self.$arrayNavBar); - self.goToContent(index); - }); + var data = new FormData(); + data.append("ricetta_id", ric.ricetta_id); + data.append("image", objInputFile[0].files[0]); + data.append("keyStore", Profile.getKeySave()); - self.$arrayContent.on("swipeleft", function(e) { - var index = jQuery.inArray(this, self.$arrayContent); - self.goToContent(index + 1 ); - }); - self.$arrayContent.on("swiperight", function(e) { - var index = jQuery.inArray(this, self.$arrayContent); - self.goToContent(index - 1 ); - }); - self.trigger("renderCompleted:Item",self); + $.ajax({ + url: myManifest.Settings.DefaultURL + "/api/photos", + cache: false, + contentType: false, + processData: false, + type: 'POST', + data: data, + success: function(msg) { + $.mobile.loading( "hide" ); + alert("Immagine inviata con successo\n\nSarà cura degl'admin di validare la foto inviata"); + objInputFile.val(""); } + }); + }, + galleyFileChanged: function(e) { + e.preventDefault(); + this.loadPhoto($("#galleyFile")); + }, + cameraFileChanged: function(e) { + e.preventDefault(); + this.loadPhoto($("#cameraFile")); + }, + favBtn: function(e) { + e.preventDefault(); + var self = this; + var ric = this.collRicetta.toJSON()[0]; + + if (!Profile.isConnected()) + { + self.$el.find('#popupDialog').popup("open"); + return; + } + + Profile.addRicettaBloccoNote(ric.ricetta_id, + function(msg) { + var favBtn = self.$el.find('#favoriteBtn'); + favBtn.addClass('ui-disabled'); + } ); + }, + //render the content into div of view + render: function() { + if (this.fetchedIngredienti && this.fetchedRicetta) + { + ItemView.__super__.render.call(this); + var self = this; + + var ric = self.collRicetta.toJSON()[0]; + + Profile.existRicettaBloccoNote(ric.ricetta_id, + function(exist) { + self.$el.append(self.template({ + ricetta: self.collRicetta.toJSON()[0], + ingredienti: self.collIngredienti.toJSON() + })); + + self.$arrayContent = self.$el.find('div[data-role="content"]'); + self.$arrayNavBar = self.$el.find('div[data-role="navbar"] a'); + + var favBtn = self.$el.find('#favoriteBtn'); + if (exist > 0) + favBtn.addClass('ui-disabled'); + + self.$arrayNavBar.on("click", function(e) { + e.preventDefault(); + var index = jQuery.inArray(this, self.$arrayNavBar); + self.goToContent(index); + }); + + self.$arrayContent.on("swipeleft", function(e) { + var index = jQuery.inArray(this, self.$arrayContent); + self.goToContent(index + 1 ); + }); + self.$arrayContent.on("swiperight", function(e) { + var index = jQuery.inArray(this, self.$arrayContent); + self.goToContent(index - 1 ); + }); +// self.$arrayContent.on("tap", function(e) { +// self.optionBtn(e); +// }); + self.trigger("renderCompleted:Item", self); + } + ); - //this.el is the root element of Backbone.View. By default, it is a div. - //$el is cached jQuery object for the view's element. - //append the compiled template into view div container + //this.el is the root element of Backbone.View. By default, it is a div. + //$el is cached jQuery object for the view's element. + //append the compiled template into view div container - //return to enable chained calls - return this; - } - }, - - goToContent:function(newIndex) + //return to enable chained calls + return this; + } + }, + goToContent: function(newIndex) { if(this.$arrayContent.length > newIndex && newIndex >= 0) { @@ -115,15 +184,14 @@ define(['jquery', 'underscore', 'backbone','text!modules/item/itemViewTemplate.h this.switchContent(); } }, - - switchContent: function(){ - this.$arrayContent.hide(); - this.$arrayNavBar.removeClass('ui-btn-active'); - this.$arrayNavBar.removeClass('ui-state-persist'); - $(this.$arrayContent[this.indexContent]).show(); - $(this.$arrayNavBar[this.indexContent]).addClass('ui-btn-active'); - $(this.$arrayNavBar[this.indexContent]).addClass('ui-state-persist'); - } - }); - return ItemView; - }); \ No newline at end of file + switchContent: function() { + this.$arrayContent.hide(); + this.$arrayNavBar.removeClass('ui-btn-active'); + this.$arrayNavBar.removeClass('ui-state-persist'); + $(this.$arrayContent[this.indexContent]).show(); + $(this.$arrayNavBar[this.indexContent]).addClass('ui-btn-active'); + $(this.$arrayNavBar[this.indexContent]).addClass('ui-state-persist'); + } + }); + return ItemView; + }); \ No newline at end of file diff --git a/js/modules/item/itemViewTemplate.html b/js/modules/item/itemViewTemplate.html index 6e09cf4..946a303 100644 --- a/js/modules/item/itemViewTemplate.html +++ b/js/modules/item/itemViewTemplate.html @@ -1,7 +1,7 @@

- Agg. al Blocco +

<%= unescape(ricetta.titolo)%>

- Indietro + Indietro

Ingredienti

@@ -46,6 +46,18 @@

Link Fonte

<% }%>
+
+
+

Opzioni

+
+ +

Informazione

diff --git a/js/modules/lastricette/lastRicette.js b/js/modules/lastricette/lastRicette.js new file mode 100644 index 0000000..a02e61b --- /dev/null +++ b/js/modules/lastricette/lastRicette.js @@ -0,0 +1,49 @@ +define(['jquery', 'underscore', 'backbone', 'text!modules/lastRicette/lastRicetteViewTemplate.html', + 'text!modules/lastRicette/lastRicetteItemTemplate.html', 'modules/base/baseView'], + function($, _, Backbone, lastRicetteViewTemplate, lastRicetteItemTemplate, BaseView) { + + var LastRicetteView = BaseView.extend({ + collection: null, + //initialize template + template: _.template(lastRicetteViewTemplate), + itemtemplate: _.template(lastRicetteItemTemplate), + initialize: function(options) { + var self = this; + LastRicetteView.__super__.initialize.call(this); + this.collection = options.collection; + this.collection.fetch({ + success: function(data, textStatus, jqXHR) { + self.renderItem(); + } + //success: function(){ self.renderItem(); } + }); + }, + renderItem: function() { + var $ul = $('#allRicette'); + + var items = this.itemtemplate({data: this.collection.toJSON()}); + + $ul.html(items); + $ul.listview("refresh"); + $ul.trigger("updatelayout"); + + $.mobile.loading('hide'); + //$( '[data-alpha="true"]' ).alphascroll(); + }, + //render the content into div of view + render: function() { + //this.header.title = "pippo"; + LastRicetteView.__super__.render.call(this); + //this.el is the root element of Backbone.View. By default, it is a div. + //$el is cached jQuery object for the view's element. + //append the compiled template into view div container + this.$el.append(this.header.$el); + this.$el.append(this.template()); + this.$el.append(this.footer.$el); + //return to enable chained calls + //this.$el.find("#indexBtn").addClass("ui-btn-active"); + return this; + } + }); + return LastRicetteView; + }); \ No newline at end of file diff --git a/js/modules/lastricette/lastRicetteItemTemplate.html b/js/modules/lastricette/lastRicetteItemTemplate.html new file mode 100644 index 0000000..da4a0ea --- /dev/null +++ b/js/modules/lastricette/lastRicetteItemTemplate.html @@ -0,0 +1,6 @@ +<% if(data.length == 0){ %> +

Nessuna ricetta trovata

+<%} else { for (var i = 0; i < data.length; i++) { %> + <% var item = data[i]; %> +
  • <%= unescape(item.titolo) %>
    <%= unescape(item.autore) %>
  • +<% }} %> \ No newline at end of file diff --git a/js/modules/lastricette/lastRicetteViewTemplate.html b/js/modules/lastricette/lastRicetteViewTemplate.html new file mode 100644 index 0000000..0525aa4 --- /dev/null +++ b/js/modules/lastricette/lastRicetteViewTemplate.html @@ -0,0 +1,5 @@ +
    +

    Ultime Ricette Inserite

    +
      +
    +
    \ No newline at end of file diff --git a/js/router.js b/js/router.js index 015ed90..c5ebc60 100644 --- a/js/router.js +++ b/js/router.js @@ -1,203 +1,182 @@ define(['jquery', 'underscore', 'backbone', - 'modules/home/home', 'modules/faq/faq', 'modules/index/index', 'modules/category/category', 'modules/item/item', + 'modules/home/home','modules/faq/faq','modules/index/index', 'modules/category/category', 'modules/item/item', 'modules/about/about', 'modules/search/search', 'modules/search/found', 'modules/more/more', 'modules/note/note', - 'modules/sync/sync', 'modules/converter/converter', 'modules/donation/donation', 'modules/settings/settings', - 'model/note/noteCollection', 'model/category/categoryCollection', 'model/categoryItem/categoryItemCollection', - 'model/item/itemCollection', 'model/item/ingredientiCollection', 'model/categoryItem/foundItemCollection', - 'libs/fastclick', 'jqm', 'jQueryPlugins'], - function ($, _, Backbone, - HomeView, FaqView, IndexView, CategoryView, ItemView, - AboutView, SearchView, FoundView, MoreView, NoteView, - SyncView, ConverterView, DonationView, SettingsView, - NoteCollection, CategoryCollection, CategoryItemCollection, - ItemCollection, IngredientiCollection, FoundItemCollection, - FastClick) { + 'modules/sync/sync', 'modules/donation/donation','modules/settings/settings', + 'model/note/noteCollection', 'model/category/categoryCollection','model/categoryItem/categoryItemCollection', + 'model/item/itemCollection','model/item/ingredientiCollection','model/categoryItem/foundItemCollection', + 'classes/utility', 'jqm', 'jQueryPlugins'], + function($, _, Backbone, + HomeView, FaqView, IndexView, CategoryView, ItemView, + AboutView, SearchView, FoundView, MoreView, NoteView, + SyncView, DonationView, SettingsView, + NoteCollection, CategoryCollection, CategoryItemCollection, + ItemCollection, IngredientiCollection, FoundItemCollection, + Utility) { + + 'use strict'; + var Router = Backbone.Router.extend({ + //define routes and mapping route to the function + routes: { + '': 'showHome', //home view + 'homeView': 'showHome', //home view as well + 'faqView': 'showFaq', //home view as well + 'indexView': 'showIndex', //home view as well + 'category/:categoryName/:categoryId' : 'showCategory', + 'ricetta/:itemId' : 'showItem', + 'aboutView' : 'showAbout', + 'syncView(/)*founded' : 'showSync', + 'noteView': 'showNote', + 'searchView': 'showSearch', + 'settingsView': 'showSettings', + 'donationView': 'showDonation', + 'search/:nresult/:categoria/:difficolta/*titolo': 'searchFn', + 'converterView': 'showConverter', + 'moreView': 'showMore', + '*actions': 'defaultAction' //default action + }, + + defaultAction: function(actions){ + this.showHome(actions); + }, - 'use strict'; - var Router = Backbone.Router.extend({ - //define routes and mapping route to the function - routes: { - '': 'showHome', //home view - 'homeView': 'showHome', //home view as well - 'faqView': 'showFaq', //home view as well - 'indexView': 'showIndex', //home view as well - 'category/:categoryName/:categoryId': 'showCategory', - 'ricetta/:itemId': 'showItem', - 'aboutView': 'showAbout', - 'syncView(/)*founded': 'showSync', - 'noteView': 'showNote', - 'searchView': 'showSearch', - 'settingsView': 'showSettings', - 'donationView': 'showDonation', - 'search/:nresult/:categoria/:difficolta/*titolo': 'searchFn', - 'converterView': 'showConverter', - 'moreView': 'showMore', - '*actions': 'defaultAction' //default action - }, - defaultAction: function (actions) { - this.showHome(actions); - }, - showHome: function (actions) { - // will render home view and navigate to homeView - var homeView = new HomeView(); - homeView.render(); - this.changePage(homeView); - }, - showSettings: function (actions) { - var settingsView = new SettingsView(); - settingsView.render(); - this.changePage(settingsView); - }, - showDonation: function (actions) { - var donationView = new DonationView(); - donationView.render(); - this.changePage(donationView); - }, - showAbout: function (actions) { - // will render home view and navigate to homeView - var aboutView = new AboutView(); - aboutView.render(); - this.changePage(aboutView); - }, - showSync: function (actions) { - var option = {}; - if (actions) - { - option = {tokenFound: 1}; - } - // will render home view and navigate to homeView - var syncView = new SyncView(option); - syncView.render(); - this.changePage(syncView); - }, - showNote: function (actions) { - var notes = new NoteCollection(); - // will render home view and navigate to homeView - var noteView = new NoteView({collection: notes}); - noteView.render(); - this.changePage(noteView); - }, - showFaq: function (actions) { - // will render home view and navigate to homeView - var faqView = new FaqView(); - faqView.render(); - this.changePage(faqView); - }, - showIndex: function (actions) { - var categories = new CategoryCollection(); - // will render home view and navigate to homeView - var indexView = new IndexView({collection: categories}); - //indexView.render(); - indexView.bind('renderCompleted:Categories', this.changePage, this); - }, - showCategory: function (categoryName, categoryId) { - var categories = new CategoryItemCollection({categoryId: categoryId}); - // will render home view and navigate to homeView - var categoryView = new CategoryView({categoryName: categoryName, collection: categories}); + showHome:function(actions){ + // will render home view and navigate to homeView + var homeView=new HomeView(); + homeView.render(); + this.changePage(homeView); + }, - categoryView.render(); - this.changePage(categoryView); + showSettings:function(actions){ + var settingsView=new SettingsView(); + settingsView.render(); + this.changePage(settingsView); + }, - $.mobile.loading('show', { - text: 'Caricamento categoria ' + categoryName + '...', - textVisible: true, - //theme: 'z', - html: "" - }); - //categoryView.bind('renderCompleted:Category',this.changePage,this); - }, - showItem: function (itemId) { - var item = new ItemCollection({ricettaId: itemId}); - var ingr = new IngredientiCollection({ricettaId: itemId}); - // will render home view and navigate to homeView - var itemView = new ItemView({ - collRicetta: item, - collIngredienti: ingr - }); - //indexView.render(); - itemView.bind('renderCompleted:Item', this.changePage, this); - }, - showConverter: function () { - var converterView = new ConverterView(); - converterView.render(); - this.changePage(converterView); - }, - showMore: function () { - var moreView = new MoreView(); - moreView.render(); - this.changePage(moreView); - }, - showSearch: function () { - var categories = new CategoryCollection(); - // will render home view and navigate to homeView - var searchView = new SearchView({collection: categories}); - //indexView.render(); - searchView.bind('renderCompleted:Search', this.changePage, this); - }, - searchFn: function (nresult, categoria, difficolta, titolo) { + showDonation:function(actions){ + var donationView=new DonationView(); + donationView.render(); + this.changePage(donationView); + }, + + showAbout:function(actions){ + // will render home view and navigate to homeView + var aboutView=new AboutView(); + aboutView.render(); + this.changePage(aboutView); + }, - //console.log("Search by Titolo: " + titolo + ", Categoria: " + categoria + ", Difficoltà: " + difficolta); - var foundedItems = new FoundItemCollection({categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult: nresult}); - var foundView = new FoundView({collection: foundedItems}); + showSync:function(actions){ + var option = {}; + if(actions) + { + option = { tokenFound: 1 }; + } + // will render home view and navigate to homeView + var syncView=new SyncView(option); + syncView.render(); + this.changePage(syncView); + }, - foundView.render(); - this.changePage(foundView); - - $.mobile.loading('show', { - text: 'Caricamento ricerca ricette...', - textVisible: true, - //theme: 'z', - html: "" - }); - }, - init: true, - //1. changePage will insert view into DOM and then call changePage to enhance and transition - //2. for the first page, jQuery mobile will present and enhance automatically - //3. for the other page, we will call $.mobile.changePage() to enhance page and make transition - //4. argument 'view' is passed from event trigger - changePage: function (view) { - - //append to dom - $('body').append(view.$el); - - $.mobile.pageContainer.pagecontainer("change", $(view.el), {changeHash: false}); - - FastClick.attach(document.body); - - $(":jqmData(role='page'):last").on("pageshow", function (event) { - if (view.onShowed !== null) - view.onShowed(); - }); - - $('input[type=radio].star').rating({ - callback: function (value, link) { - var tip = $('#hover-test'); - if (value == undefined) - { - $('#hover-test').html("Nessuna" || 'value: '); - } - else - $('#hover-test').html(link.title || 'value: ' + value); - }, - focus: function (value, link) { - var tip = $('#hover-test'); - tip[0].data = tip[0].data || tip.html(); - tip.html(link.title || 'value: ' + value); - } -// , -// blur: function(value, link){ -// var tip = $('#hover-test'); -// $('#hover-test').html(tip[0].data || ''); -// } - }); - - if (!this.init) { - - } else { - this.init = false; - } - } + showNote:function(actions){ + var notes = new NoteCollection(); + // will render home view and navigate to homeView + var noteView=new NoteView({collection: notes}); + noteView.render(); + this.changePage(noteView); + }, + + showFaq:function(actions){ + // will render home view and navigate to homeView + var faqView=new FaqView(); + faqView.render(); + this.changePage(faqView); + }, + + showIndex:function(actions){ + var categories = new CategoryCollection(); + // will render home view and navigate to homeView + var indexView=new IndexView({ collection: categories}); + //indexView.render(); + indexView.bind('renderCompleted:Categories',this.changePage,this); + }, + + showCategory: function(categoryName, categoryId){ + var categories = new CategoryItemCollection({ categoryId: categoryId }); + // will render home view and navigate to homeView + var categoryView=new CategoryView({ categoryName: categoryName, collection: categories}); + + categoryView.render(); + this.changePage(categoryView); + + $.mobile.loading( 'show', { + text: 'Caricamento categoria ' + categoryName + '...', + textVisible: true, + //theme: 'z', + html: "" }); + //categoryView.bind('renderCompleted:Category',this.changePage,this); + }, + + showItem: function(itemId){ + var item = new ItemCollection({ ricettaId: itemId }); + var ingr = new IngredientiCollection({ ricettaId: itemId }); + // will render home view and navigate to homeView + var itemView=new ItemView({ + collRicetta: item, + collIngredienti: ingr + }); + //indexView.render(); + itemView.bind('renderCompleted:Item',this.changePage,this); + }, - return Router; - }); \ No newline at end of file + showMore: function(){ + var moreView = new MoreView(); + moreView.render(); + this.changePage(moreView); + }, + + showSearch: function(){ + var categories = new CategoryCollection(); + // will render home view and navigate to homeView + var searchView=new SearchView({ collection: categories}); + //indexView.render(); + searchView.bind('renderCompleted:Search',this.changePage,this); + }, + + searchFn: function(nresult, categoria, difficolta, titolo){ + + //console.log("Search by Titolo: " + titolo + ", Categoria: " + categoria + ", Difficoltà: " + difficolta); + var foundedItems = new FoundItemCollection({ categoryId: categoria, difficolta: difficolta, titolo: titolo, nResult:nresult }); + var foundView = new FoundView({ collection: foundedItems }); + + foundView.render(); + this.changePage(foundView); + + $.mobile.loading( 'show', { + text: 'Caricamento ricerca ricette...', + textVisible: true, + //theme: 'z', + html: "" + }); + }, + + init:true, + + //1. changePage will insert view into DOM and then call changePage to enhance and transition + //2. for the first page, jQuery mobile will present and enhance automatically + //3. for the other page, we will call $.mobile.changePage() to enhance page and make transition + //4. argument 'view' is passed from event trigger + changePage:function (view) { + + Utility.changePage(view); + + if(!this.init){ + + }else{ + this.init = false; + } + } + }); + + return Router; +}); \ No newline at end of file diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 8ecf5ae..5e0e7c8 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1 +1,3 @@ browser=Chrome.INTEGRATED +external.project.url= +server=INTERNAL diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 284eeec..2cb6252 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -2,6 +2,18 @@ - + + file:/E:/Sviluppo/IlLievitario/WebClient/js/manifest.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/config.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/modules/lastricette/lastRicetteViewTemplate.html + file:/E:/Sviluppo/IlLievitario/WebClient/js/router.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/app.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/classes/profile.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/jqm-config.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/modules/lastricette/lastRicette.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/main.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/modules/home/home.js + file:/E:/Sviluppo/IlLievitario/WebClient/js/modules/lastricette/lastRicetteItemTemplate.html + diff --git a/nbproject/private/retriever/catalog.xml b/nbproject/private/retriever/catalog.xml new file mode 100644 index 0000000..129baa6 --- /dev/null +++ b/nbproject/private/retriever/catalog.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/nbproject/private/retriever/www.sitemaps.org/schemas/sitemap/0.9/index b/nbproject/private/retriever/www.sitemaps.org/schemas/sitemap/0.9/index new file mode 100644 index 0000000..51ea18f --- /dev/null +++ b/nbproject/private/retriever/www.sitemaps.org/schemas/sitemap/0.9/index @@ -0,0 +1,3 @@ +www.sitemaps.org - /schemas/sitemap/0.9/

    www.sitemaps.org - /schemas/sitemap/0.9/


    + +
    [To Parent Directory]

    2/1/2013 8:18 PM 2591 siteindex.xsd
    2/1/2013 8:19 PM 4451 sitemap.xsd

    \ No newline at end of file diff --git a/nbproject/project.properties b/nbproject/project.properties index e27ad3f..471e55f 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,3 +1,17 @@ -file.reference.IlLievitario-WebClient_210=. +auxiliary.org-netbeans-modules-css-prep.less_2e_compiler_2e_options= +auxiliary.org-netbeans-modules-css-prep.less_2e_enabled=false +auxiliary.org-netbeans-modules-css-prep.less_2e_mappings=/less:/css +auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options= +auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=false +auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css +auxiliary.org-netbeans-modules-javascript2-requirejs.enabled=true +auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=app-build_prod/libs +browser.autorefresh.SL[/Browsers/webviewBrowser=true +browser.highlightselection.SL[/Browsers/webviewBrowser=true +config.folder= +file.reference.IlLievitario-WebClient=. files.encoding=UTF-8 -site.root.folder=${file.reference.IlLievitario-WebClient_210} +site.root.folder=${file.reference.IlLievitario-WebClient} +start.file=index.php +test.folder= +web.context.root=/WebClient diff --git a/nbproject/project.xml b/nbproject/project.xml index 4dc06ae..6cee9a3 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -3,7 +3,7 @@ org.netbeans.modules.web.clientproject - WebClient_Manut + Il Lievitario diff --git a/r.js b/r.js index 4254eb3..ed177d8 100644 --- a/r.js +++ b/r.js @@ -1,5 +1,5 @@ /** - * @license r.js 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. + * @license r.js 2.1.15 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 */ @@ -20,7 +20,7 @@ var requirejs, require, define, xpcUtil; (function (console, args, readFileFunc) { var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire, nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci, - version = '2.1.14', + version = '2.1.15', jsSuffixRegExp = /\.js$/, commandOption = '', useLibLoaded = {}, @@ -238,7 +238,7 @@ var requirejs, require, define, xpcUtil; } /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. + * @license RequireJS 2.1.15 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 */ @@ -251,7 +251,7 @@ var requirejs, require, define, xpcUtil; (function (global) { var req, s, head, baseElement, dataMain, src, interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.14', + version = '2.1.15', commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, jsSuffixRegExp = /\.js$/, @@ -22949,7 +22949,7 @@ define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) { //Like traverse, but skips if branches that would not be processed //after has application that results in tests of true or false boolean //literal values. - var key, child, result, i, params, param, + var key, child, result, i, params, param, tempObject, hasHas = options && options.has; fnExpScope = fnExpScope || emptyScope; @@ -22979,23 +22979,23 @@ define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) { //Build up a "scope" object that informs nested recurse calls if //the define call references an identifier that is likely a UMD - //wrapped function expresion argument. + //wrapped function expression argument. if (object.type === 'ExpressionStatement' && object.expression && object.expression.type === 'CallExpression' && object.expression.callee && object.expression.callee.type === 'FunctionExpression') { - object = object.expression.callee; + tempObject = object.expression.callee; - if (object.params && object.params.length) { - params = object.params; - fnExpScope = mixin({}, fnExpScope, true); - for (i = 0; i < params.length; i++) { - param = params[i]; - if (param.type === 'Identifier') { - fnExpScope[param.name] = true; - } + if (tempObject.params && tempObject.params.length) { + params = tempObject.params; + fnExpScope = mixin({}, fnExpScope, true); + for (i = 0; i < params.length; i++) { + param = params[i]; + if (param.type === 'Identifier') { + fnExpScope[param.name] = true; } } } + } for (key in object) { if (object.hasOwnProperty(key)) { @@ -23014,12 +23014,12 @@ define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) { //wrapping. if (typeof result === 'string') { if (hasProp(fnExpScope, result)) { - //Just a plain return, parsing can continue past this - //point. - return; + //result still in scope, keep jumping out indicating the + //identifier still in use. + return result; } - return result; + return; } } }; @@ -26539,7 +26539,8 @@ define('build', function (require) { "excludeShallow": true, "insertRequire": true, "stubModules": true, - "deps": true + "deps": true, + "mainConfigFile": true }; for (i = 0; i < ary.length; i++) { diff --git a/sitemap.php b/sitemap.php new file mode 100644 index 0000000..e3b967f --- /dev/null +++ b/sitemap.php @@ -0,0 +1,63 @@ +' . "\n"; +$url = "http://app.gruppolapastamadre.it/"; +$blog_timezone = 'UTC'; +$timezone_offset = '+01:00'; +$W3C_datetime_format_php = 'Y-m-d\Th:i:s'; // See http://www.w3.org/TR/NOTE-datetime + + +function dinamicSite() { + global $url, $blog_timezone, $timezone_offset, $W3C_datetime_format_php; + $mysqlconnetion = new MysqlClass; + //$mysqlconneti on->connetti(); + $retObj = $mysqlconnetion->queryToObject("select ID as category_id, NAME as name from categorie order by name"); + + foreach ($retObj as $key => $value) + { + $catStr = "#category/". $value["name"] ."/" . $value["category_id"]; + $lastModified = $mysqlconnetion->queryToObject("select MAX(Data_creazione) as lastModified from ricette where ID_CATEGORIA = ". $value["category_id"]); + + $date = DateTime::createFromFormat('Y-m-d H:i:s', $lastModified[0]["lastModified"], new DateTimeZone("Europe/Rome")); + + $lastDate = date_format($date, $W3C_datetime_format_php) . $timezone_offset; + ?> + + + + queryToObject($query); + + foreach ($ricItems as $keyRic => $valueRic) + { + $itemStr= "#ricetta/" . $valueRic["ricetta_id"]; + ?> + + + disconnetti(); +} + +?> + + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..845d101 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,15 @@ + + + + http://app.gruppolapastamadre.it/ + 2014-04-09 + monthly + 0.8 + + + http://app.gruppolapastamadre.it/ + 2014-04-09 + monthly + 0.8 + +