diff --git a/assets/static/css/main.css b/assets/static/css/main.css index 9878cd5..d568ccb 100644 --- a/assets/static/css/main.css +++ b/assets/static/css/main.css @@ -358,6 +358,10 @@ input[type='text']{ padding: 3px; } +#fields-general { + margin-top: 10px; +} + .label-checkbox { top: 4px; position: relative; diff --git a/assets/static/js/main.js b/assets/static/js/main.js index d07b040..5d3dcd2 100644 --- a/assets/static/js/main.js +++ b/assets/static/js/main.js @@ -91,11 +91,7 @@ function bm_toggle_visibility(element_id) { function bm_toggle_visibility_list_search(element_id) { element = document.getElementById(element_id); - if (element.classList.contains("hidden")) { - element.classList.remove("hidden"); - } else { - element.classList.add("hidden"); - } + element.hidden = !element.hidden; var x = document.getElementsByClassName("stickyheader"); for (var i = 0; i < x.length; i++) { @@ -196,6 +192,26 @@ function bm_type_field_undelete(sender, type_field_id) { document.getElementById('Field-' + type_field_id).classList.remove('field-opaque'); } +function bm_item_relation_delete(sender, relation_name, relation_name_remove) { + document.getElementById(relation_name_remove).value = '1'; + sender.hidden = true; + document.getElementById('Undelete-' + relation_name).hidden = false; + var x = document.getElementsByClassName(relation_name + "-Col"); + for (var i = 0; i < x.length; i++) { + x[i].classList.add("field-opaque"); + } +} + +function bm_item_relation_undelete(sender, relation_name, relation_name_remove) { + document.getElementById(relation_name_remove).value = ''; + sender.hidden = true; + document.getElementById('Delete-' + relation_name).hidden = false; + var x = document.getElementsByClassName(relation_name + "-Col"); + for (var i = 0; i < x.length; i++) { + x[i].classList.remove("field-opaque"); + } +} + function bm_showMessage() { document.getElementById('message').show(); setTimeout(() => { diff --git a/assets/templates/base.tmpl b/assets/templates/base.tmpl index 44b93ed..e4ef169 100644 --- a/assets/templates/base.tmpl +++ b/assets/templates/base.tmpl @@ -29,7 +29,7 @@