Sfoglia il codice sorgente

在选经界面增加缅文页码

visuddhinanda 5 anni fa
parent
commit
0dba4997a9
3 ha cambiato i file con 17 aggiunte e 4 eliminazioni
  1. 12 0
      app/studio/js/wizard.js
  2. 3 3
      app/studio/pc_get_pali_text.php
  3. 2 1
      app/studio/project.php

+ 12 - 0
app/studio/js/wizard.js

@@ -1091,6 +1091,7 @@ function wizard_palicannon_pali_text_query(bookId){
 	wizard_palicannon_pali_text_xmlhttp.send();
 }
 
+//获取巴利原文
 function wizard_palicannon_pali_text_serverResponse(){
 	if (wizard_palicannon_pali_text_xmlhttp.readyState==4)// 4 = "loaded"
 	{
@@ -1099,10 +1100,21 @@ function wizard_palicannon_pali_text_serverResponse(){
 			var xmlText = wizard_palicannon_pali_text_xmlhttp.responseText;
 			$("#wizard_palicannon_par_select_text_body").html(xmlText);
 			$("#wizard_palicannon_par_select_text_head").show();
+
+			$("a[name]").each(function(){
+				let name = $(this).attr("name");
+				if(name.slice(0,1)=="M"){
+					$(this).css("background-color","rgb(255 255 0 / 42%)");
+					$(this).css("position","absolute");
+					$(this).css("right","0");
+					$(this).html(name);
+				}
+			});			
 		}
 		else
 		{
 			document.getElementById('wizard_palicannon_par_select_text_body').innerHTML="Problem retrieving data:" + wizard_palicannon_pali_text_xmlhttp.statusText;
+
 		}
 	}
 }

+ 3 - 3
app/studio/pc_get_pali_text.php

@@ -15,8 +15,8 @@ include "../public/_pdo.php";
 	//open database
 	PDO_Connect("sqlite:"._FILE_DB_PALITEXT_);
 	
-	$query="SELECT paragraph,html FROM pali_text WHERE book = ".$PDO->quote($get_book);
-	$Fetch = PDO_FetchAll($query);
+	$query="SELECT paragraph,html FROM pali_text WHERE book = ?";
+	$Fetch = PDO_FetchAll($query,array($get_book));
 	$iFetch=count($Fetch);
 	if($iFetch>0){
 		for($i=0;$i<$iFetch;$i++){
@@ -25,7 +25,7 @@ include "../public/_pdo.php";
 			echo "<div class=\"wizard_par_tools\">";
 			echo "<div class=\"wizard_par_tools_title\">";
 			echo "<input id='par_enable_$parNumber' onclick='par_enable_change($parNumber,this)' type=\"checkbox\" checked/>";				
-			echo "<a href='#toc_root' name='pali_text_par_$parNumber'>$parNumber</a><span id='par_level_$parNumber' class='par_level'></span>";
+			echo "<a href='../pcdl/reader.php?view=para&book={$get_book}&para={$parNumber}' name='pali_text_par_$parNumber' target='_blank'>$parNumber</a><span id='par_level_$parNumber' class='par_level'></span>";
 			echo "</div>";
 			echo "</div>";
 			echo "<div id=\"wizard_pali_par_text_$parNumber\">".$Fetch[$i]["html"]."</div>";

+ 2 - 1
app/studio/project.php

@@ -145,7 +145,7 @@ switch($op){
 						$para_title["{$paragraph}"][1]=$result["text"];
 					}
 						
-					$db_file = _DIR_PALICANON_TEMPLET_."/p".$res_book."_tpl.db3";					
+					$db_file = _DIR_PALICANON_TEMPLET_."/p".$res_book."_tpl.db3";
 					PDO_Connect("sqlite:$db_file");
 					foreach($aParaList as $iPar){
 						$query="SELECT * FROM 'main' WHERE (\"paragraph\" = ".$PDO->quote($iPar)." ) ";
@@ -378,6 +378,7 @@ switch($op){
 				}
 				else{
 					echo $FetchWBW.$_local->gui->para;
+					echo "<a href='../studio/editor.php?op=openchannal&book=$book&para={$paraList}'>open</a>";
 				}
 				echo '</div>';