Browse Source

Merge pull request #511 from visuddhinanda/master

stuidio 用 字典栏目字典 iframe
visuddhinanda 4 năm trước cách đây
mục cha
commit
50ef64fec4

+ 6 - 7
app/dict/css/style.css

@@ -94,13 +94,12 @@ body {
 
 .dropdown_ctl > .menu {
 	position: absolute;
-	box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
 	display: none;
+    background-color: var(--tool-bg-color);
+    box-shadow: 0 0 10px var(--border-shadow);
+    color: var(--tool-color);	
 }
 
-.dropdown_ctl > .menu {
-	background-color: white;
-}
 
 .dropdown_ctl > .content > .main_view > part {
 	margin: 0 0.5em;
@@ -114,7 +113,8 @@ body {
 }
 
 .dropdown_ctl > .menu > .part_list:hover {
-	background-color: azure;
+	background-color: var(--btn-hover-bg-color);
+    color: var(--btn-hover-color);
 }
 
 .dropdown_ctl > .content > .more_button {
@@ -298,6 +298,7 @@ input[type="submit"] {
 .dict_word .dict {
 	font-size: 100%;
 	font-style: normal;
+	color: var(--link-color);
 }
 
 .dict_word .mean {
@@ -321,8 +322,6 @@ textarea {
 	font-size: 130%;
 	font-weight: 500;
 	padding: 0.3em 0.6em;
-	color: var(--btn-hover-bg-color);
-	background-color: var(--btn-color);
 }
 #left_menu_button {
 	display: none;

+ 3 - 1
app/dict/css/style_mobile.css

@@ -142,7 +142,9 @@ body {
 guide{
 	display:none;
 }
-
+.dict_find_gramma guide{
+	display:unset;
+}
 #search_info {
     display: block;
 }

+ 1 - 1
app/dict/index.php

@@ -108,7 +108,7 @@ if (!(isset($_GET["builtin"]) && $_GET["builtin"] == 'true')) {
 	</div>
 
 	<div>
-		<div id="main_view" class='section_inner'  style="background-color:white;color:black;">
+		<div id="main_view" class='section_inner' >
 			<div id='dict_list_shell' style="display:none" onclick='setNaviVisibility()'>
 				<div id='dict_list' class='dict_list_off'></div>
 			</div>

+ 1 - 0
app/pcdl/css/color_night.css

@@ -5,6 +5,7 @@
         --tool-color:#C6BAAE;
     --btn-color: #A9A9A9;
     --btn-hover-color: #F9F9F9;
+	--btn-border-line-color:#F9F9F9;
     --link-color: #498EFF;
         --mean-user-color:#F9468F;
 

+ 17 - 1
app/pcdl/html_head.php

@@ -25,7 +25,20 @@ if (isset($_GET["language"])) {
 	<link type="text/css" rel="stylesheet" href="../pcdl/css/font.css" />
 	<link type="text/css" rel="stylesheet" href="../pcdl/css/basic_style.css" />
 	<link type="text/css" rel="stylesheet" href="../pcdl/css/style.css" />
-	<link type="text/css" rel="stylesheet" href="../pcdl/css/color_day.css" id="colorchange" />
+	<?php 
+	if(isset($_GET["theme"]) && $_GET["theme"]==="dark"){
+		?>
+	<link type="text/css" rel="stylesheet" href="../pcdl/css/color_night.css"  id="colorchange" />		
+		<?php
+	}else{
+		?>
+	<link type="text/css" rel="stylesheet" href="../pcdl/css/color_day.css" id="colorchange" />		
+		<?php	
+	}
+	?>
+
+
+
 	<link type="text/css" rel="stylesheet" href="../pcdl/css/style_mobile.css" media="screen and (max-width:800px)">
 	<link href="https://fonts.googleapis.com/css2?family=Padauk:wght@400;700&display=swap" rel="stylesheet">
 
@@ -125,6 +138,9 @@ if (isset($_GET["language"])) {
 	<script src="../../node_modules/diff/dist/diff.js"></script>
 	
 	<style>
+		body{
+			background-color: var(--bg-color);
+		}
 		.list_with_head {
 			display: flex;
 			margin: 3px 0;

+ 1 - 1
app/public/lang/default.json

@@ -66,7 +66,7 @@
 		"delete": "Delete",
 		"departure_in_detail": "departure in detail",
 		"desc": "DESC",
-		"detaile": "Detaile",
+		"detaile": "Detail",
 		"dhamma_time": "5000 Years of the Buddha’s Dispensation ",
 		"dict": "Dict",
 		"dict_match": "Match the Dictionary and Document",

+ 1 - 1
app/public/lang/en.json

@@ -66,7 +66,7 @@
 		"delete": "delete",
 		"departure_in_detail": "departure in detail",
 		"desc": "DESC",
-		"detaile": "Detaile",
+		"detaile": "Detail",
 		"dhamma_time": "5000 Years of the Buddha’s Dispensation ",
 		"dict": "Dict",
 		"dict_match": "Match the Dictionary and Document",

+ 1 - 1
app/public/lang/my.json

@@ -66,7 +66,7 @@
 		"delete": "Delete",
 		"departure_in_detail": "departure in detail",
 		"desc": "DESC",
-		"detaile": "Detaile",
+		"detaile": "Detail",
 		"dhamma_time": "5000 Years of the Buddha’s Dispensation ",
 		"dict": "Dict",
 		"dict_match": "Match the Dictionary and Document",

+ 1 - 1
app/reader/get_para.php

@@ -65,7 +65,7 @@ $paraBegin=0;
 $paraEnd=0;
 
 PDO_Connect(_FILE_DB_PALITEXT_);
-			$query = "SELECT level , parent, chapter_len FROM 'pali_text'  WHERE book= ? AND paragraph= ?";
+			$query = "SELECT level , parent, chapter_len,chapter_strlen FROM 'pali_text'  WHERE book= ? AND paragraph= ?";
 			$FetchParInfo = PDO_FetchRow($query, array($_book, $_para));
 if ($FetchParInfo) {
     switch ($_view) {

+ 4 - 2
app/studio/js/editor.js

@@ -3041,7 +3041,9 @@ function on_word_click(sWordId) {
 
 	//参考字典
 	if (mouse_action_lookup) {
-		dict_search(sReal);
+		//dict_search(sReal);
+		window.open("../dict/index.php?builtin=true&theme=dark&key="+sReal,target="dict");
+
 	}
 
 	//添加词到翻译框
@@ -3332,7 +3334,7 @@ function showModifyWin(sWordId) {
 		var eDetail = document.getElementById(sDetail);
 		eWord.insertBefore(eWin, eDetail);
 
-		document.getElementById("dict_ref_search_input").value = sReal;
+		//document.getElementById("dict_ref_search_input").value = sReal;
 
 		//editor_refresh_inline_dict(sReal);
 	}

+ 14 - 4
app/studio/plugin/system_dict/gui.html

@@ -1,7 +1,16 @@
 			<!--  参考字典查询结果 -->
-			<div id="dict_ref_search">
+			<style>
+				#sys_dict {
+					height: 100%;
+				}
+				#right_tool_bar_inner{
+					padding:0;
+				}
+			</style>
+			<div id="dict_ref_search" style="height: 100%;padding:0;">
+				<iframe id="dict" src="../dict/index.php?builtin=true&theme=dark" name="dict" title="wikipali" style="width:100%;height:100%;border: none;"></iframe>
+				<!--
 				<div id="right_tool_bar_title" >
-
 					<ul id="id_select_modyfy_type" class="common-tab" >
 						<button class="res_button" style="padding: 0" onclick="editor_show_right_tool_bar(false)">
 							<svg class="button_icon"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="svg/icon.svg#ic_input"></use></svg>
@@ -15,7 +24,7 @@
 							</svg>
 						</a>
 					</ul>
-					<!--  右侧工具条 -->
+
 					<div>
 						<div id="dict_ref_search_head">
 							<div id="dict_ref_search_input_div">
@@ -36,7 +45,7 @@
 										</tr>
 									</table>
 								</div>
-								<!--  查词工具 拆分 -->
+
 								<div>
 									<div id="input_parts"></div>
 									<div id="dict_word_auto_split"></div>
@@ -49,5 +58,6 @@
 				</div>
 				<div id="dict_ref_search_result">
 				</div>
+			-->
 			</div>
 			

+ 27 - 20
app/ucenter/forgot_pwd.php

@@ -172,28 +172,29 @@ require_once "../public/function.php";
 			</div>
 
 			<div class="login_form" style="    padding: 3em 0 3em 0;">
-			<div class="form_help">
-				我们将向您的注册邮箱发送电子邮件。里面包含了重置密码链接。点击链接后按照提示操作,重置账户密码。
-			</div>
-			<div class="form_help" id="message"> </div>			
-				<form action="../api/user.php" method="get">
-					<div>
+				<div id="message" class="form_help">
+					我们将向您的注册邮箱发送电子邮件。里面包含了重置密码链接。点击链接后按照提示操作,重置账户密码。
+				</div>	
+				<div id="form_div">	
+					<form action="../api/user.php" method="get">
 						<div>
-							<span id='tip_email' class='form_field_name'><?php echo $_local->gui->email_address; ?></span>
-							<input id="form_email" type="input" name="email"  value="" />
+							<div>
+								<span id='tip_email' class='form_field_name'><?php echo $_local->gui->email_address; ?></span>
+								<input id="form_email" type="input" name="email"  value="" />
+							</div>
+							<div id="error_email" class="form_error"> </div>
+							<div class="form_help"></div>
 						</div>
-						<div id="error_email" class="form_error"> </div>
-						<div class="form_help"></div>
-					</div>
 
-					<input type="hidden" name="_method" value="reset_email" />
+						<input type="hidden" name="_method" value="reset_email" />
 
 
-				</form>
-				<div id="button_area">
-					<button  onclick="submit()" style="background-color: var(--link-hover-color);border-color: var(--link-hover-color);" >
-					<?php echo $_local->gui->continue; ?>
-					</button>
+					</form>
+					<div id="button_area">
+						<button  onclick="submit()" style="background-color: var(--link-hover-color);border-color: var(--link-hover-color);" >
+						<?php echo $_local->gui->continue; ?>
+						</button>
+					</div>
 				</div>				
 			</div>
 		</div>
@@ -204,7 +205,9 @@ require_once "../public/function.php";
 	login_init();
 	
 	function submit(){
-			$.getJSON(
+		$("#message").text("正在发送...");
+		$(this).prop("disabled",true);
+	$.getJSON(
 		"../api/user.php",
 		{
 			_method:"reset_email",
@@ -214,14 +217,18 @@ require_once "../public/function.php";
 		$("#message").text(data.message);
 		if(data.ok){
 			$("#message").removeClass("form_error");
+			$("#form_div").hide();			
 		}else{
 			$("#message").addClass("form_error");
+			//发送失败enable发送按钮
+			$(this).prop("disabled",false);
 		}
 		}).fail(function(jqXHR, textStatus, errorThrown){
 			$("#message").removeClass("form_error");
-			$("#message").text(textStatus);				
+			$("#message").text(textStatus);	
+			//发送失败enable发送按钮
+			$(this).prop("disabled",false);		
 			switch (textStatus) {
-		
 				case "timeout":
 					break;
 				case "error":