From 295b155d6079d71487372ddf47271157df797f1d Mon Sep 17 00:00:00 2001
From: Ben <3364448+zyhfish@users.noreply.github.com>
Date: Thu, 6 Sep 2018 13:40:48 +0800
Subject: [PATCH] DNN-21317: show the pane name when put mouse hover it. (#19)
* DNN-21317: show the pane name when put mouse hover it.
* DNN-21317: use data-name attribute.
---
.../ContentEditorManager/Js/ModuleManager.js | 8 ++++++
.../Styles/ContentEditor.css | 27 +++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Js/ModuleManager.js b/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Js/ModuleManager.js
index f8a9b7cf3..31ee9cf53 100644
--- a/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Js/ModuleManager.js
+++ b/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Js/ModuleManager.js
@@ -49,6 +49,7 @@ if (typeof dnn === "undefined" || dnn === null) { dnn = {}; };
$this.addClass('dnnModuleManager');
$this.append(this._generateLayout());
+ this._initPaneName();
this._injectVisualEffects();
this._handleEvents();
@@ -73,6 +74,13 @@ if (typeof dnn === "undefined" || dnn === null) { dnn = {}; };
_generateLayout: function () {
return $('');
},
+
+ _initPaneName: function() {
+ if (!this.$pane.attr('data-name')) {
+ var paneName = this.$pane.attr('id').replace('dnn_', '');
+ this.$pane.attr('data-name', paneName);
+ }
+ },
_injectVisualEffects: function () {
var actionMenus = [];
diff --git a/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Styles/ContentEditor.css b/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Styles/ContentEditor.css
index 303f9529f..062e9cb2e 100644
--- a/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Styles/ContentEditor.css
+++ b/EditBar/Dnn.EditBar.UI/editBar/resources/ContentEditorManager/Styles/ContentEditor.css
@@ -39,6 +39,33 @@
.dnnModuleManager .addModuleHandler.active span {
/*display: inline-block;*/
}
+.dnnModuleManager:before {
+ content: attr(data-name);
+ display: inline-block;
+ box-sizing: border-box;
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ height: 16px;
+ line-height: 12px;
+ color: #333;
+ font-size: 9px;
+ background-color: #fff;
+ padding: 2px 4px;
+ text-transform: uppercase;
+ font-weight: bold;
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ transition-duration: 200ms;
+ opacity: 0;
+}
+.dnnModuleManager.active-pane:before {
+ opacity: 1;
+}
.dnnModuleDialog {
width: 646px;
overflow-x: hidden;