Bhikkhu-Kosalla 5 éve
szülő
commit
1bd68f2bcc
3 módosított fájl, 113 hozzáadás és 117 törlés
  1. 63 66
      app/calendar/index.html
  2. 43 44
      app/lib/main.css
  3. 7 7
      app/ucenter/setting.php

+ 63 - 66
app/calendar/index.html

@@ -636,77 +636,74 @@ function show_time() {
 				result.lunar = pali_nakkhatta_name[lunar_num]; //27星宿月站名称
 				return result;
 			}
-			function show_position(){
+function show_position(){
 	curr_position = localStorage.getItem("local_position");
-			if (curr_position) {
-				g_coordinate_this.AT = curr_position.split("#")[0];
-				g_coordinate_this.LT = curr_position.split("#")[1];
-				g_coordinate_this.height = curr_position.split("#")[2];
-				if (g_coordinate_this.AT >= 0) {
-					var AT_string = angle_trans(g_coordinate_this.AT)[0]+"°" +angle_trans(g_coordinate_this.AT)[1] +
-					"’" +
-					angle_trans(g_coordinate_this.AT)[2] +
-					"” N";
-
-				} else {
-					var AT_string = angle_trans(0-g_coordinate_this.AT)[0]+"°" +angle_trans(0-g_coordinate_this.AT)[1] +
-					"’" +
-					angle_trans(0-g_coordinate_this.AT)[2] +
-					"” S";
-				}
-
-				if (g_coordinate_this.LT >= 0) {
-					var LT_string = angle_trans(g_coordinate_this.LT)[0]+"°" +angle_trans(g_coordinate_this.LT)[1] +
-					"’" +
-					angle_trans(g_coordinate_this.LT)[2] +
-					"” E";
-
-				} else {
-					var LT_string = angle_trans(0-g_coordinate_this.LT)[0]+"°" +angle_trans(0-g_coordinate_this.LT)[1] +
-					"’" +
-					angle_trans(0-g_coordinate_this.LT)[2] +
-					"” W";
-				}
+		if (curr_position) {
+			g_coordinate_this.AT = curr_position.split("#")[0];
+			g_coordinate_this.LT = curr_position.split("#")[1];
+			g_coordinate_this.height = curr_position.split("#")[2];
+			if (g_coordinate_this.AT >= 0) {
+				var AT_string = angle_trans(g_coordinate_this.AT)[0]+"°" +angle_trans(g_coordinate_this.AT)[1] +
+				"’" +
+				angle_trans(g_coordinate_this.AT)[2] +
+				"” N";
+			} else {
+				var AT_string = angle_trans(0-g_coordinate_this.AT)[0]+"°" +angle_trans(0-g_coordinate_this.AT)[1] +
+				"’" +
+				angle_trans(0-g_coordinate_this.AT)[2] +
+				"” S";
+			}
+			if (g_coordinate_this.LT >= 0) {
+				var LT_string = angle_trans(g_coordinate_this.LT)[0]+"°" +angle_trans(g_coordinate_this.LT)[1] +
+				"’" +
+				angle_trans(g_coordinate_this.LT)[2] +
+				"” E";
 
-				if (g_coordinate_this.height != "null") {
-					var height_string = g_coordinate_this.height + "M";
-				} else {
-					var height_string = localString[g_language].unknown;
-				}
 			} else {
-				getLocation();
+				var LT_string = angle_trans(0-g_coordinate_this.LT)[0]+"°" +angle_trans(0-g_coordinate_this.LT)[1] +
+				"’" +
+				angle_trans(0-g_coordinate_this.LT)[2] +
+				"” W";
 			}
-			$("#AT_str").html(AT_string);
-			$("#LT_str").html(LT_string);
-			$("#altitude_string").html(height_string);
-		if(g_coordinate_this.AT<0){
-			$("#AT_°")[0].value = angle_trans(0-g_coordinate_this.AT)[0];
-			$("#AT_’")[0].value = angle_trans(0-g_coordinate_this.AT)[1];
-			$("#AT_”")[0].value = angle_trans(0-g_coordinate_this.AT)[2];
-			$("#NS")[0].value="-";
+			if (g_coordinate_this.height != "null") {
+				var height_string = g_coordinate_this.height + "M";
+			} else {
+				var height_string = localString[g_language].unknown;
+			}
+		} else {
+			getLocation();
 		}
-		else{
-			$("#AT_°")[0].value = angle_trans(g_coordinate_this.AT)[0];
-			$("#AT_’")[0].value = angle_trans(g_coordinate_this.AT)[1];
-			$("#AT_”")[0].value = angle_trans(g_coordinate_this.AT)[2];
-			$("#NS")[0].value="+";
+	$("#AT_str").html(AT_string);
+	$("#LT_str").html(LT_string);
+	$("#altitude_string").html(height_string);
 
-		}
-		if(g_coordinate_this.LT<0){
-			$("#LT_°")[0].value = angle_trans(0-g_coordinate_this.LT)[0];
-			$("#LT_’")[0].value = angle_trans(0-g_coordinate_this.LT)[1];
-			$("#LT_”")[0].value = angle_trans(0-g_coordinate_this.LT)[2];
-			$("#WE")[0].value="-";
+	if(g_coordinate_this.AT<0){
+		$("#AT_°")[0].value = angle_trans(0-g_coordinate_this.AT)[0];
+		$("#AT_’")[0].value = angle_trans(0-g_coordinate_this.AT)[1];
+		$("#AT_”")[0].value = angle_trans(0-g_coordinate_this.AT)[2];
+		$("#NS")[0].value="-";
+	}
+	else{
+		$("#AT_°")[0].value = angle_trans(g_coordinate_this.AT)[0];
+		$("#AT_’")[0].value = angle_trans(g_coordinate_this.AT)[1];
+		$("#AT_”")[0].value = angle_trans(g_coordinate_this.AT)[2];
+		$("#NS")[0].value="+";
 
-		}
-		else{
-			$("#LT_°")[0].value = angle_trans(g_coordinate_this.LT)[0];
-			$("#LT_’")[0].value = angle_trans(g_coordinate_this.LT)[1];
-			$("#LT_”")[0].value = angle_trans(g_coordinate_this.LT)[2];
-			$("#WE")[0].value="+";
-		}
-		$("#HT_M")[0].value = g_coordinate_this.height;
-		$("#city_str").html(find_city(g_coordinate_this.AT,g_coordinate_this.LT).name);
+	}
+	if(g_coordinate_this.LT<0){
+		$("#LT_°")[0].value = angle_trans(0-g_coordinate_this.LT)[0];
+		$("#LT_’")[0].value = angle_trans(0-g_coordinate_this.LT)[1];
+		$("#LT_”")[0].value = angle_trans(0-g_coordinate_this.LT)[2];
+		$("#WE")[0].value="-";
+	}
+	else{
+		$("#LT_°")[0].value = angle_trans(g_coordinate_this.LT)[0];
+		$("#LT_’")[0].value = angle_trans(g_coordinate_this.LT)[1];
+		$("#LT_”")[0].value = angle_trans(g_coordinate_this.LT)[2];
+		$("#WE")[0].value="+";
+	}
+	$("#HT_M")[0].value = g_coordinate_this.height;
+	$("#city_str").html(find_city(g_coordinate_this.AT,g_coordinate_this.LT).name);
 }
 show_position();
 function getLocation() {
@@ -777,8 +774,8 @@ function angle_trans(angle,type) {
 	}
 	angle=Math.abs(angle);
 	angle_str.d = Math.floor(angle);
-	angle_str.m = Math.floor((angle - num_d) * 60);
-	angle_str.s = Math.round((angle - num_d) * 60 - num_m);
+	angle_str.m = Math.floor((angle - angle_str.d) * 60);
+	angle_str.s = Math.round((angle - angle_str.d) * 60 - angle_str.m);
 
 	angle_str.str=angle_str.d+"°"+angle_str.m+"’"+angle_str.s+"”"+angle_str.suf;
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 43 - 44
app/lib/main.css


+ 7 - 7
app/ucenter/setting.php

@@ -238,7 +238,7 @@ para:hover{
 				<span id="tool_bar_title" style="font-family: 'Noto Serif';"><?php echo $_local->gui->title; ?></span>
 			</div>
 			<div style="display: flex;">	
-			
+
 			</div>
 		</div>	
 		
@@ -257,7 +257,7 @@ para:hover{
             echo "<a href='../ucenter/pwd_set.php'>{$_local->gui->change_password}</a><br>";
 			echo "<a href='login.php?op=logout'>{$_local->gui->logout}</a>";
 			echo "</div>";
-			
+
 
 			echo "<div id='setting_general_shell' class='setting_shell'>";
 			echo "<a name='general'></a>";
@@ -266,13 +266,13 @@ para:hover{
 			echo "</div>";
 			echo "</div>";
 
-			
+
 			echo "<div id='setting_library_shell' class='setting_shell'>";
 			echo "<a name='library'></a>";
             echo "<h2>{$_local->gui->library}</h2>";
             echo "<div id='setting_library' class='setting_content'>";
-            echo "</div>";			
-            echo "</div>";			
+            echo "</div>";
+            echo "</div>";
 
 			echo "<div id='setting_studio_shell' class='setting_shell'>";
 			echo "<a name='studio'></a>";
@@ -309,7 +309,7 @@ para:hover{
 			<div class="win_caption">
 				<div><button id="left_menu_hide" onclick="setNaviVisibility()">返回</button></div>
 			</div>
-			
+
 		<div class='toc' id='leftmenuinnerinner' style="font-family: 'Noto Serif';">	
 			<!-- toc begin -->
 			<div class="menu" id="menu_toc">
@@ -324,7 +324,7 @@ para:hover{
                 ?>
                 </div>
 
-			
+
 			</div>
 		
 		</div>

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott