From 63ac63b1799ee6fab2d0e93ce92fa2dc60a4175b Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Mon, 8 Aug 2016 14:57:10 -0300 Subject: [PATCH] =?UTF-8?q?Add=20chamadas=20do=20bot=C3=A3o=20fechar=20e?= =?UTF-8?q?=20excluir=20dispositivos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/compilacao/forms.py | 4 ++-- sapl/static/js/compilacao_edit.js | 8 ++++--- sapl/static/styles/compilacao.scss | 14 ++++++------ .../compilacao/dispositivo_form.html | 22 +++++++++---------- 4 files changed, 25 insertions(+), 23 deletions(-) diff --git a/sapl/compilacao/forms.py b/sapl/compilacao/forms.py index 7933177d9..f3c8f39a6 100644 --- a/sapl/compilacao/forms.py +++ b/sapl/compilacao/forms.py @@ -656,8 +656,8 @@ class DispositivoEdicaoBasicaForm(ModelForm): buttons = FormActions(*more, css_class='form-group') - _fields = [to_row([(buttons, 12)])] + \ - [Div(*layout, css_class="row-fluid")] + _fields = [Div(*layout, css_class="row-fluid")] + \ + [to_row([(buttons, 12)])] self.helper.layout = Layout(*_fields) diff --git a/sapl/static/js/compilacao_edit.js b/sapl/static/js/compilacao_edit.js index 975ef264b..2d15a3656 100644 --- a/sapl/static/js/compilacao_edit.js +++ b/sapl/static/js/compilacao_edit.js @@ -44,13 +44,15 @@ function DispositivoEdit() { instance.scrollTo(_this); _this.off('get_form_base') - var btn_fechar = _this.find('.btns-excluir'); - _this.find('.dpt-actions-bottom').last().append(btn_fechar); + var btn_fechar = _this.find('.btn-fechar'); btn_fechar.on('click', function() { instance.clearEditSelected(); }); - btn_fechar.on('click', function() { + var btns_excluir = _this.find('.btns-excluir'); + _this.find('.dpt-actions-bottom').last().append(btns_excluir); + + btns_excluir.find('.btn-excluir').on('click', function() { var action = this.getAttribute('action'); var pk = $(this).closest('.dpt-selected').attr('pk'); if (pk !== undefined) { diff --git a/sapl/static/styles/compilacao.scss b/sapl/static/styles/compilacao.scss index 66eb83e55..3c58ddb8b 100644 --- a/sapl/static/styles/compilacao.scss +++ b/sapl/static/styles/compilacao.scss @@ -623,9 +623,9 @@ a:link:after, a:visited:after { background-color: #fafafa; border-radius: 3px; z-index: 2; - & > .dpt-text { + & > .dpt-text1 { opacity: 1; - border: 1px solid #e0e0e0 !important; + border: 0px solid #e0e0e0 !important; margin: 1em; padding: 0.3em; position: relative; @@ -635,24 +635,24 @@ a:link:after, a:visited:after { &:before { border-width: 1rem; border-style: solid; - border-color: #e0e0e0 #e0e0e0 transparent transparent; + border-color: transparent transparent #e0e0e0 #e0e0e0 ; content: ""; display: block; height: 0px; width: 0px; position: absolute; - top: 0rem; - right: 0rem; + bottom: 0rem; + left: 0rem; } } & > .dpt-form { - margin-bottom: 1em; + margin-bottom: 0em; } & > .dpt-actions, & > .dpt-actions-bottom { display: table; background-color: #e5e5e5; padding: 1em; - margin-bottom: 1em; + margin-bottom: 0em; width: 100%; & > .btn-action { display: table-cell; diff --git a/sapl/templates/compilacao/dispositivo_form.html b/sapl/templates/compilacao/dispositivo_form.html index caa60db4b..0fa2bb4cf 100644 --- a/sapl/templates/compilacao/dispositivo_form.html +++ b/sapl/templates/compilacao/dispositivo_form.html @@ -5,17 +5,17 @@ {% endblock %} {% block sections_nav %} - + {% endblock sections_nav %}{% trans '' %} {% block title %}