Revert manually commit weatherRequest execution...
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -1,2 +1,2 @@ | ||||
| htaccess | ||||
| php/apiKey.php | ||||
| scripts/config.js | ||||
| @@ -32,6 +32,7 @@ | ||||
|  | ||||
|         <!-- Frameworks and Tools --> | ||||
|         <script src="/scripts/libs/jquery-min.js"></script> | ||||
|         <script type='text/javascript' src='/scripts/config.js'></script> | ||||
|         <link rel="stylesheet" href="/css/libs/bootstrap-min.css"> | ||||
|         <script src="/scripts/libs/bootstrap-min.js"></script> | ||||
|         <script src="/scripts/libs/moment.js"></script> | ||||
|   | ||||
| @@ -8,7 +8,23 @@ $(function () { | ||||
|  | ||||
|     /* ÉXECUTION DES FONCTONS */ | ||||
|  | ||||
|     // $("#submitWeatherRequest") se fait exécuter dans weatherRequest.php | ||||
|     $( "#submitWeatherRequest" ).click(function()  | ||||
|     { | ||||
|         let city = $('#cityName').val(); | ||||
|         let cityName = city.split(' ').join('+');  | ||||
|         if(isEmptyValue(cityName)) | ||||
|         { | ||||
|             $('.results').html(emptyMessageError); | ||||
|             $("#cityName, #submitWeatherRequest").click(function() { | ||||
|                 document.location.replace("../function-views/weatherRequest.php"); | ||||
|             }); | ||||
|         } | ||||
|         else  | ||||
|         { | ||||
|             let url = "https://api.openweathermap.org/data/2.5/weather?q=" + cityName + "&lang=fr&units=metric&appid=" + config.APIkey + ""; | ||||
|             weatherRequest(url, 'weather'); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     $("#submitRandomNumber").click(function()  | ||||
|     { | ||||
| @@ -110,13 +126,6 @@ $(function () { | ||||
|  | ||||
|     /* Window Scroll Top Button */ | ||||
|     var $btnScrollTop = $('.scroll-top-arrow'); | ||||
|     $(window).scroll(function () { | ||||
|         if ($(this).scrollTop() > 100) { | ||||
|             $btnScrollTop.fadeIn(); | ||||
|         } else { | ||||
|             $btnScrollTop.fadeOut(); | ||||
|         } | ||||
|     }); | ||||
|  | ||||
|     $btnScrollTop.on('click', function () { | ||||
|         $('html, body').animate({scrollTop: 0}, 800); | ||||
|   | ||||
| @@ -22,33 +22,5 @@ | ||||
|     </div> | ||||
| </div> | ||||
|  | ||||
| <!-- Exécution de la fonction weatherRequest() --> | ||||
| <?php include("../../php/apiKey.php"); ?> | ||||
| <script> | ||||
|     $(function () { | ||||
|         // Fichiers qui contient les fonctions | ||||
|         $.getScript("/scripts/fonctions.js", function() { | ||||
|  | ||||
|             $( "#submitWeatherRequest" ).click(function()  | ||||
|             { | ||||
|                 let city = $('#cityName').val(); | ||||
|                 let cityName = city.split(' ').join('+');  | ||||
|                 if(isEmptyValue(cityName)) | ||||
|                 { | ||||
|                     $('.results').html(emptyMessageError); | ||||
|                     $("#cityName, #submitWeatherRequest").click(function() { | ||||
|                         document.location.replace("../function-views/weatherRequest.php"); | ||||
|                     }); | ||||
|                 } | ||||
|                 else  | ||||
|                 { | ||||
|                     let url = "https://api.openweathermap.org/data/2.5/weather?q=" + cityName + "&lang=fr&units=metric&appid=<?php echo $apiKey ?>"; | ||||
|                     weatherRequest(url, 'weather'); | ||||
|                 } | ||||
|             }); | ||||
|         }); | ||||
|     })    | ||||
| </script> | ||||
|  | ||||
| <!-- Footer --> | ||||
| <?php include("../../incl/footer.php");?> | ||||
		Reference in New Issue
	
	Block a user