Commit 403c91db authored by Phil Hughes's avatar Phil Hughes

Stops 'revert' link in dropdown being selectable

parent fc7286a0
......@@ -650,6 +650,11 @@
} else if(value) {
field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value.toString().replace(/'/g, '\\\'') + "']");
}
if (this.options.isSelectable && !this.options.isSelectable(selectedObject, el)) {
return;
}
if (el.hasClass(ACTIVE_CLASS)) {
el.removeClass(ACTIVE_CLASS);
if (field && field.length) {
......
......@@ -32,6 +32,11 @@
$btn.glDropdown({
selectable: true,
isSelectable (selected, $el) {
const $link = $($el);
return $link.data('revert') ? false : true;
},
fieldName: $btn.data('field-name'),
id (selected, $el) {
return $el.data('id');
......
......@@ -10,7 +10,9 @@
}
.form-horizontal {
margin-right: 45px;
@media (min-width: $screen-sm-min) {
margin-right: 45px;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment