Browse Source

pre,  tags support

CrazyDoctor 6 months ago
parent
commit
a7552195c8
3 changed files with 19 additions and 1 deletions
  1. 4 0
      static/CDClientLib/CDClientLib.js
  2. 4 1
      static/page/class/script.js
  3. 11 0
      static/page/class/style.css

+ 4 - 0
static/CDClientLib/CDClientLib.js

@@ -66,6 +66,10 @@ class CDElement {
 		return children;
 		return children;
 	}
 	}
 
 
+	getTag() {
+		return this.get().tagName.toLowerCase();
+	}
+
 	getParent() {
 	getParent() {
 		return CDElement.get(this.get().parentElement);
 		return CDElement.get(this.get().parentElement);
 	}
 	}

+ 4 - 1
static/page/class/script.js

@@ -321,7 +321,8 @@ class ClassPage {
 					|| element.hasClass('property-item-comment-input')
 					|| element.hasClass('property-item-comment-input')
 					|| element.hasClass('property-item-comment-button')
 					|| element.hasClass('property-item-comment-button')
 					|| element.hasClass('property-item-saving-filler')
 					|| element.hasClass('property-item-saving-filler')
-					|| (el.hasClass('property-item-comment-static') && el.hasClass(ClassPage.StyleClasses.Clickable));
+					|| (el.hasClass('property-item-comment-static') && el.hasClass(ClassPage.StyleClasses.Clickable))
+					|| element.getTag() === DOM.Tags.A;
 		};
 		};
 
 
 		if(type !== ClassPage.PropertyType.Inherited) {
 		if(type !== ClassPage.PropertyType.Inherited) {
@@ -484,6 +485,8 @@ class ClassPage {
 					});
 					});
 
 
 					itemCommentStatic.on(DOM.Events.Click, (e) => {
 					itemCommentStatic.on(DOM.Events.Click, (e) => {
+						if(CDElement.get(e.target).getTag() === DOM.Tags.A)
+							return;
 						itemCommentInput.switchClass(ClassPage.StyleClasses.Hidden);
 						itemCommentInput.switchClass(ClassPage.StyleClasses.Hidden);
 						itemCommentInput.focus();
 						itemCommentInput.focus();
 						itemCommentInput.style('height', `${Math.min(422, itemCommentStatic.get().scrollHeight + 2)}px`);
 						itemCommentInput.style('height', `${Math.min(422, itemCommentStatic.get().scrollHeight + 2)}px`);

+ 11 - 0
static/page/class/style.css

@@ -321,6 +321,17 @@
 	overflow: auto;
 	overflow: auto;
 }
 }
 
 
+.right > .content > .content-tab > .properties-list > .property-item > .property-item-comment > .property-item-comment-static pre {
+	border-left: 2px solid #777;
+	padding-left: 8px;
+	background-color: rgba(0, 0, 0, 0.2);
+	margin: 0;
+}
+
+.right > .content > .content-tab > .properties-list > .property-item > .property-item-comment > .property-item-comment-static a:hover {
+	background-color: #ffffff40;
+}
+
 .right > .content > .content-tab > .properties-list > .property-item > .property-item-comment > .property-item-comment-static:after {
 .right > .content > .content-tab > .properties-list > .property-item > .property-item-comment > .property-item-comment-static:after {
   content: '\2060';
   content: '\2060';
 }
 }