Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

Commit

Permalink
DNN-21317: show the pane name when put mouse hover it. (#19)
Browse files Browse the repository at this point in the history
* DNN-21317: show the pane name when put mouse hover it.

* DNN-21317: use data-name attribute.
  • Loading branch information
zyhfish authored and tpluscode committed Sep 6, 2018
1 parent 3274d0b commit 295b155
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ if (typeof dnn === "undefined" || dnn === null) { dnn = {}; };
$this.addClass('dnnModuleManager');
$this.append(this._generateLayout());

this._initPaneName();
this._injectVisualEffects();

this._handleEvents();
Expand All @@ -73,6 +74,13 @@ if (typeof dnn === "undefined" || dnn === null) { dnn = {}; };
_generateLayout: function () {
return $('<a href="#" class="addModuleHandler" aria-label="Add Module"><span></span></a><a href="#" class="addExistingModuleHandler" aria-label="Add Existing Module"><span></span></a>');
},

_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 = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 295b155

Please sign in to comment.