Просмотр исходного кода

Merge pull request #605 from bhikkhu-kosalla-china/master

目录修正
Bhikkhu China Kosalla 4 лет назад
Родитель
Сommit
04035e175f

+ 10 - 8
app/article/my_collect.js

@@ -211,26 +211,28 @@ function tocGetTreeData(articles,active=""){
 		if(active==element.article){
 			newNode["extraClasses"]="active";
 		}
+
 		if(newNode.level>iCurrLevel){
+			//新的层级比较大,为上一个的子目录
 			treeParents.push(lastInsNode);					
 			lastInsNode.children = new Array();
 			lastInsNode.children.push(newNode);
 			currParentNode = lastInsNode;
 		}
 		else if(newNode.level==iCurrLevel){
+			//目录层级相同,为平级
 			currParentNode = treeParents[treeParents.length-1];
 			treeParents[treeParents.length-1].children.push(newNode);
 		}
 		else{
-			// 小于
-			try{
-				do {
-					treeParents.pop();
-				} while (treeParents[treeParents.length-1].level>=newNode.level);
-			}catch(e){
-				console.log("toc index:"+index,articles[index]);
-			}
+			// 小于 挂在上一个层级
 
+			while(treeParents.length>1){
+				treeParents.pop();
+				if(treeParents[treeParents.length-1].level<newNode.level){
+					break;
+				}
+			}
 			
 			currParentNode = treeParents[treeParents.length-1];
 			treeParents[treeParents.length-1].children.push(newNode);

+ 24 - 1
app/dict/grm_abbr.php

@@ -64,6 +64,16 @@ define("GRM_ABBR",[
 	["dictid"=>19,"abbr"=>"caus.","replace"=>"caus"],
 	["dictid"=>19,"abbr"=>"fut.","replace"=>"fut"],
 	["dictid"=>19,"abbr"=>"grd.","replace"=>"fpp"],
+	["dictid"=>1,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>8,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>10,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>18,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>19,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>1,"abbr"=>"caus.","replace"=>"caus"],
+	["dictid"=>1,"abbr"=>"imper.","replace"=>"imp"],
+	["dictid"=>1,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>1,"abbr"=>"pp.","replace"=>"pp"],
+	["dictid"=>1,"abbr"=>"grd.","replace"=>"fpp"],
 	["dictid"=>1,"abbr"=>"pron.","replace"=>"pron"],
 	["dictid"=>1,"abbr"=>"pref.","replace"=>"pref"],
 	["dictid"=>1,"abbr"=>"grd.","replace"=>"fpp"],
@@ -132,6 +142,12 @@ define("GRM_ABBR",[
 	["dictid"=>8,"abbr"=>"f.","replace"=>"f"],
 	["dictid"=>8,"abbr"=>"n.","replace"=>"nt"],
 	["dictid"=>8,"abbr"=>":a.","replace"=>"adj"],
+	["dictid"=>3,"abbr"=>"caus.","replace"=>"caus"],
+	["dictid"=>3,"abbr"=>"imper.","replace"=>"imp"],
+	["dictid"=>3,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>3,"abbr"=>"pp.","replace"=>"pp"],
+	["dictid"=>3,"abbr"=>"grd.","replace"=>"fpp"],
+	["dictid"=>3,"abbr"=>"pr.p.","replace"=>"prp"],
 	["dictid"=>3,"abbr"=>"aor.","replace"=>"aor"],
 	["dictid"=>3,"abbr"=>"ger.","replace"=>"abs"],
 	["dictid"=>3,"abbr"=>"nom.","replace"=>"nom"],
@@ -153,6 +169,7 @@ define("GRM_ABBR",[
 	["dictid"=>3,"abbr"=>"pp.","replace"=>"pp"],
 	["dictid"=>3,"abbr"=>"[adj.]","replace"=>"adj"],
 	["dictid"=>3,"abbr"=>"[m.]","replace"=>"m"],
+	["dictid"=>3,"abbr"=>"(m.)","replace"=>"m"],
 	["dictid"=>3,"abbr"=>"[f.]","replace"=>"f"],
 	["dictid"=>3,"abbr"=>"[n.]","replace"=>"nt"],
 	["dictid"=>3,"abbr"=>"[a.]","replace"=>"adj"],
@@ -176,6 +193,7 @@ define("GRM_ABBR",[
 	["dictid"=>3,"abbr"=>"pp.","replace"=>"pp"],
 	["dictid"=>3,"abbr"=>"[adj.]","replace"=>"adj"],
 	["dictid"=>3,"abbr"=>"[m.]","replace"=>"m"],
+	["dictid"=>3,"abbr"=>"m.","replace"=>"m"],
 	["dictid"=>3,"abbr"=>"[f.]","replace"=>"f"],
 	["dictid"=>3,"abbr"=>"[n.]","replace"=>"nt"],
 	["dictid"=>3,"abbr"=>"f.","replace"=>"f"],
@@ -269,7 +287,12 @@ define("GRM_ABBR",[
 	["dictid"=>15,"abbr"=>"f.","replace"=>"f"],
 	["dictid"=>15,"abbr"=>"nt.","replace"=>"nt"],
 	["dictid"=>15,"abbr"=>"nt.","replace"=>"nt"],
-	["dictid"=>15,"abbr"=>"(adj.)","replace"=>"adj"],
+	["dictid"=>15,"abbr"=>"adj.","replace"=>"adj"],
+	["dictid"=>18,"abbr"=>"caus.","replace"=>"caus"],
+	["dictid"=>18,"abbr"=>"imper.","replace"=>"imp"],
+	["dictid"=>18,"abbr"=>"ppr.","replace"=>"prp"],
+	["dictid"=>18,"abbr"=>"pp.","replace"=>"pp"],
+	["dictid"=>18,"abbr"=>"grd.","replace"=>"fpp"],
 	["dictid"=>18,"abbr"=>"BSk.","replace"=>"bsk"],	
 	["dictid"=>18,"abbr"=>"Bsk.","replace"=>"bsk"],	
 	["dictid"=>18,"abbr"=>"aor.","replace"=>"aor"],

+ 1 - 0
app/studio/js/dictionary.js

@@ -1254,6 +1254,7 @@ function menu_file_tools_empty(opt){
 			setNodeText(xDocWords[iword],"org","?");
 			setNodeText(xDocWords[iword],"om","?");
 			setNodeText(xDocWords[iword],"case","?");
+			setNodeText(xDocWords[iword],"parent","?");
 			setNodeText(xDocWords[iword],"bmc","");
 			setNodeText(xDocWords[iword],"bmt","");
 			setNodeText(xDocWords[iword],"note","");

+ 1 - 0
app/studio/js/editor.js

@@ -1823,6 +1823,7 @@ function menu_file_tools_empty(opt) {
 			setNodeText(xDocWords[iword], "org", "?");
 			setNodeText(xDocWords[iword], "om", "?");
 			setNodeText(xDocWords[iword], "case", "?");
+			setNodeText(xDocWords[iword], "parent","?");
 			setNodeText(xDocWords[iword], "bmc", "");
 			setNodeText(xDocWords[iword], "bmt", "");
 			setNodeText(xDocWords[iword], "note", "");

+ 3 - 8
app/users_guide/zh-cn/grammar_adj.md

@@ -2,13 +2,8 @@
 
 |语种|缩写|全称|
 |-|-|-|
-|巴利||Kālātipatti|
-|汉|过|过去式|
-|英|aor.|aorist|
-
-* 中文:形容词
-* 巴利术语:无
-* 缩写:adj.
-* 英文:adjective
+|巴利|||
+|汉|形|形容词|
+|英|adj.|adjective|
 
 巴利传统语法中不存在形容词,而是统统归属于**三性词**