causefx преди 8 години
родител
ревизия
fc3b608a55
променени са 1 файла, в които са добавени 44 реда и са изтрити 57 реда
  1. 44 57
      index.php

+ 44 - 57
index.php

@@ -489,9 +489,6 @@ if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon =
 			<div class="table-row">
 				<div class="table-cell">
 					<div class="la-ball-scale-multiple la-3x" style="color: <?=$topbar;?>">
-						<?php if ($loadingIcon == "images/organizr-load-w-thick.gif") : 
-							echo "<div></div><div></div><div></div>";
-						endif; ?>
 						<logo class="logo"><img height="192px" src="<?=$loadingIcon;?>"></logo>
 					</div>
 				</div>
@@ -1192,11 +1189,18 @@ if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon =
 									<div id="user-menu-div" class="col-lg-12 gray-bg" style="display: block;">
 										<div class="gray-bg"  style="overflow: hidden; width: auto; height: calc(100vh - 62px)">
 											<br>
-											<div class="content-box top-clock" style="left: 0;right: 0;">
+											<div class="content-box" style="left: 0;right: 0;">
 												<span style="display: block" class="current-time gray text-center"></span>
 											</div>
-											<div id="weather" class="content-box ultra-widget yellow-bg"></div>
 											<div class="content-box">
+											<!--
+											<div class="member-info zero-m">
+												<img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=50&d=mm" alt="user" class="img-circle pull-left">
+												<p><i class="fa fa-user green zero-m"></i><span class="member-name gray"><strong><?php echo strtoupper($USER->username); ?></strong></span></p>
+												<p><i class="fa fa-group green zero-m"></i><span class="member-name gray"><strong> <?php echo strtoupper($USER->role); ?></strong></span></p>
+
+											</div>
+											-->
 												<div class="profile-usertitle">
 													<?php if(GRAVATAR == "true") : ?>
 													<img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=100&d=mm" class="img-responsive img-circle center-block" alt="user">
@@ -1210,6 +1214,7 @@ if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon =
 												</div>
 												<div class="clearfix"></div>
 											</div>
+											<div id="weather" class="content-box ultra-widget yellow-bg"></div>
 											<?php if($USER->authenticated){?>
 											<div id="editInfoDiv" class="content-box" style="display: none">
 
@@ -1330,59 +1335,41 @@ if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon =
    		</script>
 		<?php }?>
 		<script>
+		/* Does your browser support geolocation? */
+		if ("geolocation" in navigator) {
+			$('#weather').show(); 
+		} else {
+			$('#weathern').hide();
+		}
 
-
-
-		
-/* Does your browser support geolocation? */
-if ("geolocation" in navigator) {
-  $('#weather').show(); 
-} else {
-  $('#weathern').hide();
-}
-
-$(document).ready(function() {
-	getWeather();
-	setInterval(getWeather, 600000);
-    
-});
-function getWeather(){
-	navigator.geolocation.getCurrentPosition(function(position) {
-    	loadWeather(position.coords.latitude+','+position.coords.longitude);
-  	});
-	  console.log('grabbing weather');
-}
-
-function loadWeather(location, woeid) {
-  $.simpleWeather({
-    location: location,
-    woeid: woeid,
-    unit: 'f',
-    success: function(weather) {
-      //html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'&deg;'+weather.units.temp+'</h2>';
-      //html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
-      //html += '<li class="currently">'+weather.currently+'</li>';
-      //html += '<li>'+weather.alt.temp+'&deg;C</li></ul>';  
-	  html = '<div class="w-content">';
-	  html += '<div class="w-icon right pull-right"><i class="icon-'+weather.code+'"></i></div>';
-	  html += '<div class="w-descr left pull-left text-center">';
-	  html += '<span class="text-uppercase w-name">'+weather.city+', '+weather.region+'</span><br><span class="w-name">'+weather.temp+'&deg;'+weather.units.temp+' / '+weather.alt.temp+'&deg;C</span><br><span class="w-name">'+weather.currently+'</span></div></div>';
-      
-      $("#weather").html(html);
-    },
-    error: function(error) {
-      $("#weather").html('<p>'+error+'</p>');
-    }
-  });
-}
-
-
-
-
-
-
-
-
+		$(document).ready(function() {
+			getWeather();
+			setInterval(getWeather, 600000);
+		});
+		function getWeather(){
+			navigator.geolocation.getCurrentPosition(function(position) {
+				loadWeather(position.coords.latitude+','+position.coords.longitude);
+			});
+			console.log('grabbing weather');
+		}
+		function loadWeather(location, woeid) {
+			$.simpleWeather({
+				location: location,
+				woeid: woeid,
+				unit: 'f',
+				success: function(weather) {
+					html = '<div class="w-content">';
+					//html += '<div class="w-icon right pull-right"><i class="icon-'+weather.code+'"></i></div>';
+					html += '<div class="w-icon right pull-right"><img class="pull-right" style="width: 85%;margin-right: -50px;" src="'+weather.image+'"></div>';
+					html += '<div class="w-descr left pull-left text-center">';
+					html += '<span class="text-uppercase w-name">'+weather.city+', '+weather.region+'</span><br><span class="w-name">'+weather.temp+'&deg;'+weather.units.temp+' / '+weather.alt.temp+'&deg;C</span><br><span class="w-name">'+weather.currently+'</span></div></div>';
+					$("#weather").html(html);
+				},
+				error: function(error) {
+					$("#weather").html('<p>'+error+'</p>');
+				}
+			});
+		}
 
 		var datetime = null,
         date = null;