浏览代码

Improvements in glossary tool

iflores 15 年之前
父节点
当前提交
dab56c37f3

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary_automatic.js

@@ -56,8 +56,8 @@ $(document).ready(function() {
 	            div_show_id="div_show_id"+random_id;
 	            div_content_id="div_content_id"+random_id;
 	             $(this).append("<div id="+div_show_id+" ><div id="+div_content_id+">&nbsp;</div></div>");
-	             $("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F5F6CE;border-bottom: 1px dashed #dddddd;border-right: 1px dashed #dddddd;border-left: 1px dashed #dddddd;border-top: 1px dashed #dddddd;color:#305582;margin-left:5px;margin-right:5px;");
-	             $("div#"+div_content_id).attr("style","background-color:#F5F6CE;color:#305582;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;");
+	             $("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F2F2F2;border-bottom: 1px solid #2E2E2E;border-right: 1px solid #2E2E2E;border-left: 1px solid #2E2E2E;border-top: 1px solid #2E2E2E;color:#305582;margin-left:5px;margin-right:5px;");
+	             $("div#"+div_content_id).attr("style","background-color:#F2F2F2;color:#0B3861;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;");
 	                notebook_id=$(this).attr("name");
 	                data_notebook=notebook_id.split("link");
 	                my_glossary_id=data_notebook[1];

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/glossary/fck_glossary_manual.js

@@ -9,8 +9,8 @@ $(document).ready(function() {
 	        div_show_id="div_show_id"+random_id;
 	        div_content_id="div_content_id"+random_id;
 	         $(this).append("<div id="+div_show_id+" ><div id="+div_content_id+">&nbsp;</div></div>");
-	         $("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F5F6CE;border-bottom: 1px dashed #dddddd;border-right: 1px dashed #dddddd;border-left: 1px dashed #dddddd;border-top: 1px dashed #dddddd;color:#305582;margin-left:5px;margin-right:5px;");
-	         $("div#"+div_content_id).attr("style","background-color:#F5F6CE;color:#305582;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;");
+	         $("div#"+div_show_id).attr("style","display:inline;float:left;position:absolute;background-color:#F2F2F2;border-bottom: 1px solid #2E2E2E;border-right: 1px solid #2E2E2E;border-left: 1px solid #2E2E2E;border-top: 1px solid #2E2E2E;color:#305582;margin-left:5px;margin-right:5px;");
+	         $("div#"+div_content_id).attr("style","background-color:#F2F2F2;color:#0B3861;margin-left:8px;margin-right:8px;margin-top:5px;margin-bottom:5px;");
 
 	       $.ajax({
 	            contentType: "application/x-www-form-urlencoded",

+ 3 - 3
main/inc/lib/javascript/jquery.highlight.js

@@ -22,7 +22,8 @@ jQuery.fn.highlight = function(pat,real_code) {
    if (pos >= 0) {
     var spannode = document.createElement('a');
     spannode.className = 'glossary-ajax';
-    spannode.style.color = 'blue';
+    spannode.style.color = '#084B8A';
+    spannode.style.fontWeight='100';
 	spannode.style.textDecoration = 'none';
     spannode.name = 'link'+real_code;
     spannode.href = '#';
@@ -32,11 +33,10 @@ jQuery.fn.highlight = function(pat,real_code) {
     if (MatchRegExp == null) {
         MatchRegExp = new Array();
     }
-	//alert(node.nodeValue+'-----'+'---'+node.nodeValue[pat.length+1])
     if (MatchRegExp.length > 0 && node.nodeValue[pat.length+1] != '') {
      	var middlebit = node.splitText(pos);
     	var endbit = middlebit.splitText(pat.length);
-    	if (endbit.nodeValue[0] == null || endbit.nodeValue[0] == ' ') {
+    	if (endbit.nodeValue[0] == null || endbit.nodeValue[0] == ' ' || endbit.nodeValue[0] == '.' || endbit.nodeValue[0] == ',' || endbit.nodeValue[0] == ';' || endbit.nodeValue[0] == '"') {
         	var middleclone = middlebit.cloneNode(true);
     		spannode.appendChild(middleclone);
         	middlebit.parentNode.replaceChild(spannode, middlebit);