The Unified and Autonomous Development Platform
Full screen comment support in source view page.
robin shineaea008a40a5f
diff --git a/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/markdown/markdown.js b/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/markdown/markdown.jsindex efcb1fad1f..d2bc897b72 100644--- a/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/markdown/markdown.js+++ b/commons.wicket/src/main/java/com/pmease/commons/wicket/behavior/markdown/markdown.js@@ -4,7 +4,10 @@ gitplex.markdown = {$input.markdown({onFullscreen: function(e) {- $("body").append($input.closest(".md-editor"));+ $input.trigger("fullscreen");+ },+ onExitFullscreen: function(e) {+ $input.trigger("exitFullscreen");},onPreview: function(e) {callback("markdownPreview", e.getContent());diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.cssindex f39689ddfe..f361546c3f 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/comment/comment.css@@ -1,6 +1,9 @@.comment .md-editor {margin-bottom: 16px;}+.comment>.body>form {+ margin-bottom: 12px;+}.reply>.activity {padding: 8px;}diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/source-view.js b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/source-view.jsindex a879df2b92..9e4cba609e 100644--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/source-view.js+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/repofile/blobview/source/source-view.js@@ -187,10 +187,19 @@ gitplex.sourceview = {},commentResized: function(commentId) {- var lineWidget = document.getElementById(commentId).lineWidget;- lineWidget.changed();- $("#" + commentId + " .md-editor").on("mouseup resized", function() {- lineWidget.changed();+ var $comment = $("#" + commentId);+ $comment[0].lineWidget.changed();+ var $detail = $comment.find(">.detail");+ $detail.on("mouseup resized", function() {+ $comment[0].lineWidget.changed();+ });+ $detail.on("fullscreen", function() {+ // full screen mode is abnormal if we do not do this+ $("body").append($detail);+ });+ $detail.on("exitFullscreen", function() {+ $comment.append($detail);+ $comment[0].lineWidget.changed();});},