From adfdec9cb81fe9825f0108954bacccd57695d6c2 Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Thu, 14 Aug 2014 17:19:16 +0200 Subject: [PATCH] changed style of validation in modal views --- js/apps/system/aardvark/frontend/js/templates/modalTable.ejs | 4 ++-- js/apps/system/aardvark/frontend/js/views/modalView.js | 2 ++ js/apps/system/aardvark/frontend/scss/_modals.scss | 3 +++ js/apps/system/aardvark/frontend/scss/generated.css | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/js/apps/system/aardvark/frontend/js/templates/modalTable.ejs b/js/apps/system/aardvark/frontend/js/templates/modalTable.ejs index 9bc3a5d308..5464a2d06b 100644 --- a/js/apps/system/aardvark/frontend/js/templates/modalTable.ejs +++ b/js/apps/system/aardvark/frontend/js/templates/modalTable.ejs @@ -7,7 +7,7 @@ } %> - <%=row.label%><%=mandatory%>: +
<%=row.label%><%=mandatory%>:
<% switch(row.type) { @@ -118,4 +118,4 @@ <% } %> - \ No newline at end of file + diff --git a/js/apps/system/aardvark/frontend/js/views/modalView.js b/js/apps/system/aardvark/frontend/js/views/modalView.js index 5a833e6fe5..273ebc944c 100644 --- a/js/apps/system/aardvark/frontend/js/views/modalView.js +++ b/js/apps/system/aardvark/frontend/js/views/modalView.js @@ -342,6 +342,7 @@ $('#' + r.id).addClass('invalid-input'); $('.modal-footer .button-success').prop('disabled', true); $('.modal-footer .button-success').addClass('disabled'); + $('#' + r.id).parent().prev().find("div").addClass("collectionThDiv"); if (errorElement) { //error element available @@ -358,6 +359,7 @@ $('#' + r.id).removeClass('invalid-input'); $('.modal-footer .button-success').prop('disabled', false); $('.modal-footer .button-success').removeClass('disabled'); + $('#' + r.id).parent().prev().find("div").removeClass("collectionThDiv"); if (errorElement) { $(errorElement).remove(); } diff --git a/js/apps/system/aardvark/frontend/scss/_modals.scss b/js/apps/system/aardvark/frontend/scss/_modals.scss index 47d0a498d2..f3118a7040 100644 --- a/js/apps/system/aardvark/frontend/scss/_modals.scss +++ b/js/apps/system/aardvark/frontend/scss/_modals.scss @@ -90,6 +90,9 @@ margin-top: 10px; } + .collectionThDiv { + margin-bottom: 20px; + } } .icon-info-sign { diff --git a/js/apps/system/aardvark/frontend/scss/generated.css b/js/apps/system/aardvark/frontend/scss/generated.css index fd21840ce1..fc17196233 100644 --- a/js/apps/system/aardvark/frontend/scss/generated.css +++ b/js/apps/system/aardvark/frontend/scss/generated.css @@ -4421,6 +4421,8 @@ div.breadcrumb a.disabledBread { .modal-body th div.select2-container { margin-bottom: 10px; margin-top: 10px; } + .modal-body th .collectionThDiv { + margin-bottom: 20px; } .modal-body .icon-info-sign { margin-bottom: 10px; margin-left: 10px;