diff --git a/js/tm/adminhtml/core/actions.css b/js/tm/adminhtml/core/actions.css
index c5d7384..f209080 100644
--- a/js/tm/adminhtml/core/actions.css
+++ b/js/tm/adminhtml/core/actions.css
@@ -26,7 +26,11 @@
border-top-color: #ea7601;
border-bottom: none;
}
+.active .tm-action-select::after {
+ transform: rotate(180deg);
+}
.tm-action-menu {
+ display: none;
z-index: 10;
position: absolute;
top: 18px;
@@ -35,10 +39,12 @@
border: 1px solid #aaa;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
+.active .tm-action-menu {
+ display: block;
+}
.tm-action-menu li {
margin: 5px 0;
}
.tm-action-menu a {
display: block;
- text-decoration: none;
}
diff --git a/js/tm/adminhtml/core/actions.js b/js/tm/adminhtml/core/actions.js
index c2419c3..79b09e0 100644
--- a/js/tm/adminhtml/core/actions.js
+++ b/js/tm/adminhtml/core/actions.js
@@ -4,13 +4,13 @@ TmcoreActions.prototype = {
document.on('click', '.tm-action-select', function(e, el) {
e.stop();
- var menu = el.next(),
- isVisible = menu.visible();
+ var wrapper = el.up(),
+ isVisible = wrapper.hasClassName('active');
- $$('.tm-action-menu').invoke('hide');
+ $$('.tm-action-select-wrap').invoke('removeClassName', 'active');
if (!isVisible) {
- el.next().show();
+ wrapper.addClassName('active');
}
});
}