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

Stops 'revert' link in dropdown being selectable

parent fc7286a0
...@@ -650,6 +650,11 @@ ...@@ -650,6 +650,11 @@
} else if(value) { } else if(value) {
field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value.toString().replace(/'/g, '\\\'') + "']"); 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)) { if (el.hasClass(ACTIVE_CLASS)) {
el.removeClass(ACTIVE_CLASS); el.removeClass(ACTIVE_CLASS);
if (field && field.length) { if (field && field.length) {
......
...@@ -32,6 +32,11 @@ ...@@ -32,6 +32,11 @@
$btn.glDropdown({ $btn.glDropdown({
selectable: true, selectable: true,
isSelectable (selected, $el) {
const $link = $($el);
return $link.data('revert') ? false : true;
},
fieldName: $btn.data('field-name'), fieldName: $btn.data('field-name'),
id (selected, $el) { id (selected, $el) {
return $el.data('id'); return $el.data('id');
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
} }
.form-horizontal { .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