Initial commit
This commit is contained in:
commit
65e0da7e11
1397 changed files with 596542 additions and 0 deletions
20
site/OFF_plugins/field-engineer/assets/js/toggleDropdown.js
Normal file
20
site/OFF_plugins/field-engineer/assets/js/toggleDropdown.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
var EgrToggleDropdown = (function () {
|
||||
var fn = {};
|
||||
|
||||
fn.toggle = function(obj, this_obj) {
|
||||
if(fn.count(this_obj) > 1) {
|
||||
if(this_obj.parent().hasClass('egr-dropdown-active')) {
|
||||
this_obj.parent().removeClass('egr-dropdown-active');
|
||||
} else {
|
||||
obj.find('.egr-dropdown-active').removeClass('egr-dropdown-active');
|
||||
this_obj.parent().addClass('egr-dropdown-active');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
fn.count = function(this_obj) {
|
||||
return this_obj.find('.egr-add-select').length;
|
||||
};
|
||||
|
||||
return fn;
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue