[IMP] website editor: the snippet overlay fadeout on keypress and fadein on mousemove

This commit is contained in:
Christophe Matthieu
2015-01-23 12:14:15 +01:00
parent c27930ccb6
commit 5a2fc7b15c
3 changed files with 25 additions and 0 deletions
@@ -427,6 +427,13 @@
.oe_overlay.block-n-bottom .n:before {
content: "" !important;
}
.oe_overlay.o_keypress {
opacity: 0;
-webkit-transition: 0.8s;
-moz-transition: 0.8s;
-o-transition: 0.8s;
-transition: 0.8s;
}
.s-resize-important, .s-resize-important * {
cursor: s-resize !important;
@@ -332,6 +332,13 @@
&.block-n-bottom .n:before
content: "\f062" !important
&.o_keypress
opacity: 0
-webkit-transition: .8s
-moz-transition: .8s
-o-transition: .8s
-transition: .8s
.s-resize-important, .s-resize-important *
cursor: s-resize !important
@@ -140,6 +140,17 @@
self.cover_target(self.$active_snipped_id.data("snippet-editor").$overlay, self.$active_snipped_id);
}
});
$(document).on('keydown', function () {
if (self.$active_snipped_id && self.$active_snipped_id.data("snippet-editor")) {
self.$active_snipped_id.data("snippet-editor").$overlay.addClass('o_keypress');
}
});
$(document).on('mousemove', function () {
if (self.$active_snipped_id && self.$active_snipped_id.data("snippet-editor")) {
self.$active_snipped_id.data("snippet-editor").$overlay.removeClass('o_keypress');
}
});
},
show_blocks: function () {