diff --git a/compilacao/views.py b/compilacao/views.py index 1abcb1f58..44e4821e7 100644 --- a/compilacao/views.py +++ b/compilacao/views.py @@ -1,6 +1,6 @@ +import sys from collections import OrderedDict from datetime import datetime, timedelta -import sys from braces.views import FormMessagesMixin from django import forms @@ -37,7 +37,6 @@ from compilacao.models import (Dispositivo, Nota, from compilacao.utils import DISPOSITIVO_SELECT_RELATED from crud.base import Crud, CrudListView, make_pagination - TipoNotaCrud = Crud.build(TipoNota, 'tipo_nota') TipoVideCrud = Crud.build(TipoVide, 'tipo_vide') TipoPublicacaoCrud = Crud.build(TipoPublicacao, 'tipo_publicacao') @@ -134,7 +133,7 @@ def choice_models_in_extenal_views(): class CompMixin: @property - def title(self): + def title(self): try: return self.get_object() except: diff --git a/parlamentares/views.py b/parlamentares/views.py index fcd3c42ca..75f61426e 100644 --- a/parlamentares/views.py +++ b/parlamentares/views.py @@ -10,8 +10,8 @@ import crud.masterdetail from crud.base import Crud from crud.masterdetail import MasterDetailCrud -from .forms import (FiliacaoForm, LegislaturaForm, - ParlamentarCreateForm, ParlamentarForm) +from .forms import (FiliacaoForm, LegislaturaForm, ParlamentarCreateForm, + ParlamentarForm) from .models import (CargoMesa, Coligacao, ComposicaoMesa, Dependente, Filiacao, Legislatura, Mandato, NivelInstrucao, Parlamentar, Partido, SessaoLegislativa, SituacaoMilitar, diff --git a/static/js/compilacao_edit.js b/static/js/compilacao_edit.js index 146deba12..c460ed3c7 100644 --- a/static/js/compilacao_edit.js +++ b/static/js/compilacao_edit.js @@ -266,17 +266,23 @@ function reloadFunctionClicks() { $('#editdi_texto').focus(); $( ".bloco_alteracao" ).sortable({ revert: true, - stop: function( event, ui ) { - var pk = ui.item.attr('pk'); - var pk_bloco = ui.item.closest('.bloco').closest('.dpt').attr('pk'); - console.log(pk+ ' - '+ pk_bloco); - }, + stop: function( event, ui ) { + var pk = ui.item.attr('pk'); + var pk_bloco = ui.item.closest('.bloco').closest('.dpt').attr('pk'); + console.log(pk+ ' - '+ pk_bloco); + }, }); $( ".bloco_alteracao .dpt" ).draggable({ connectToSortable: ".bloco_alteracao", revert: 'invalid', zIndex: 1, + drag: function( event, ui ) { + $( ".bloco_alteracao" ).css('border-width', '2px'); + }, + stop: function( event, ui ) { + $( ".bloco_alteracao" ).css('border-width', '0px'); + }, }); $( ".bloco_alteracao" ).disableSelection(); diff --git a/static/styles/compilacao.scss b/static/styles/compilacao.scss index f33c84b6b..40163d5ad 100644 --- a/static/styles/compilacao.scss +++ b/static/styles/compilacao.scss @@ -563,12 +563,13 @@ a:link:after, a:visited:after { .bloco_alteracao { margin: 1em 0; padding: 0em ; - background-color: #edf0f1; - min-height: 36px; + background-color: transparent; + min-height: 100px; + border: 0px dashed #d9ddde; .dpt { width: 100% !important; box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24); - padding: 0em 1em; + padding: 0.3em 1em; margin: 1px 0; background-color: #edf0f1; z-index: 1;