Selaa lähdekoodia

pali text 显示和隐藏

visuddhinanda 5 vuotta sitten
vanhempi
sitoutus
35b21bc384
4 muutettua tiedostoa jossa 77 lisäystä ja 15 poistoa
  1. 18 15
      app/dict/index.php
  2. 1 0
      app/reader/index.php
  3. 16 0
      app/term/note.js
  4. 42 0
      app/term/related_para.php

+ 18 - 15
app/dict/index.php

@@ -46,22 +46,25 @@ require_once "../pcdl/html_head.php";
 			flex:2;
 			flex:2;
         }
         }
 		.dict_word_card{
 		.dict_word_card{
-		border-bottom: 1px solid var(--border-line-color);
-    	padding: 5px 0;			
-		display: block;
-		border-radius: unset;
-		margin: 10px 0;
-		transition: unset;
-		box-shadow: unset;
+			border-bottom: 1px solid var(--border-line-color);
+			padding: 5px 0;			
+			display: block;
+			border-radius: unset;
+			margin: 10px 0;
+			transition: unset;
+			box-shadow: unset;
 		}
 		}
 		.dict_word{
 		.dict_word{
-		border-bottom: 1px solid var(--border-line-color);
-    	padding: 5px 0;			
-		display: block;
-		border-radius: unset;
-		margin: 10px 0;
-		transition: unset;
-		box-shadow: unset;
+			border-left: none;
+			border-right: none;
+			border-top: none;
+			border-bottom: 1px solid var(--border-line-color);
+			padding: 5px 0;			
+			display: block;
+			border-radius: unset;
+			margin: 10px 0;
+			transition: unset;
+			box-shadow: unset;
 		}
 		}
 		.dict_word>.dict {
 		.dict_word>.dict {
 			font-size: 110%;
 			font-size: 110%;
@@ -93,7 +96,7 @@ require_once "../pcdl/html_head.php";
             display:none;
             display:none;
         }
         }
         .dropdown_ctl>.menu{
         .dropdown_ctl>.menu{
-		background-color: white;
+			background-color: white;
         }
         }
         .dropdown_ctl>.content>.main_view>part{
         .dropdown_ctl>.content>.main_view>part{
             margin:0 0.5em;
             margin:0 0.5em;

+ 1 - 0
app/reader/index.php

@@ -247,6 +247,7 @@ require_once "../pcdl/html_head.php";
 
 
 	<div>
 	<div>
 		<span>
 		<span>
+		<input type="checkbox" onchange="setVisibility('palitext',this)" checked>Pali Text Visible
 		<?php
 		<?php
 		echo "<button class='icon_btn'  title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
 		echo "<button class='icon_btn'  title='{$_local->gui->modify} {$_local->gui->composition_structure}'>";
 		echo "<a href='";
 		echo "<a href='";

+ 16 - 0
app/term/note.js

@@ -893,3 +893,19 @@ function tool_bar_show(element) {
 		$(element).css("visibility", "");
 		$(element).css("visibility", "");
 	}
 	}
 }
 }
+
+function setVisibility(key, value) {
+	switch (key) {
+		case "palitext":
+			if ($(value).is(":checked")) {
+				$(".palitext").show();
+			} else {
+				$(".palitext").hide();
+			}
+
+			break;
+
+		default:
+			break;
+	}
+}

+ 42 - 0
app/term/related_para.php

@@ -0,0 +1,42 @@
+<?php
+require_once "../public/_pdo.php";
+require_once "../path.php";
+
+$result["error"]="";
+$result["data"]=array();
+
+if(isset($_GET["book"])){
+	$book = $_GET["book"];
+}
+else{
+	$result["error"]="no param:book";
+	echo json_encode($result, JSON_UNESCAPED_UNICODE);
+	exit;
+}
+if(isset($_GET["para"])){
+	$para = $_GET["para"];
+}
+else{
+	$result["error"]="no param :para";
+	echo json_encode($result, JSON_UNESCAPED_UNICODE);
+	exit;
+}
+
+	PDO_Connect("sqlite:"._FILE_DB_PAGE_INDEX_);
+	$query="select bookid,cspara ,book_name from cs6_para where book = ? and para=?";
+	$fetch = PDO_FetchAll($query,array($book,$para));
+	if(count($fetch)>0){
+		$place_holders = implode(',', array_fill(0, count($fetch), '?'));
+		$query="SELECT book, para from cs6_para where bookid = ? and cspara in  ($place_holders) and book_name <> ?  ";
+		$param[] = $fetch[0]["bookid"];
+
+		foreach ($fetch as $key => $value) {
+			$param[] =$value["cspara"];
+		}		
+		$param[] = $fetch[0]["book_name"];
+		$fetch = PDO_FetchAll($query,$param);
+		$result["data"]=$fetch;
+	}
+echo json_encode($result, JSON_UNESCAPED_UNICODE);
+
+?>