Browse Source

Substitui arquivos de front-end

pull/590/head
LeandroRoberto 9 years ago
parent
commit
2719e546bd
  1. 541
      sapl/static/js/compilacao_edit.js
  2. 21
      sapl/static/js/compilacao_view.js
  3. 7
      sapl/static/styles/app.scss
  4. 294
      sapl/static/styles/compilacao.scss

541
sapl/static/js/compilacao_edit.js

@ -1,317 +1,312 @@
function DispositivoEdit() {
// Função única - Singleton pattern - operador new sempre devolve o mesmo objeto
var instance;
var editortype = "textarea"; var editortype = "textarea";
var onSubmitEditForm = function(event) {
var texto = ''; if (!(this instanceof DispositivoEdit)) {
var editorTiny = tinymce.get('editdi_texto'); if (!instance) {
instance = new DispositivoEdit();
if (editorTiny != null) }
texto = editorTiny.getContent(); return instance;
else }
texto = $('#editdi_texto').val(); instance = this;
DispositivoEdit = function() {
var formData = { return instance;
'csrfmiddlewaretoken' : $('input[name=csrfmiddlewaretoken]').val(),
'texto' : texto
}; };
instance.clearEditSelected = function() {
$('.dpt-selected .dpt-form').html('');
$('.dpt-actions, .dpt-actions-bottom').html('');
tinymce.remove();
$('.dpt-selected').removeClass('dpt-selected');
}
var url = $('.csform form').attr( "action_ajax" ); instance.editDispositivo = function(event) {
$("#message_block").css("display", "block"); var obj_click = (event.target.classList.contains('dpt-link')
? event.target
$.post(url, formData) : (event.target.parentElement.classList.contains('dpt-link')
.done(function(data) { ? event.target.parentElement
: null));
if (typeof data == "string") { if (obj_click && obj_click.getAttribute('href') && obj_click.getAttribute('href').length > 0)
$('.dpt-selected').html(data);
clearEditSelected();
reloadFunctionClicks();
return; return;
}
clearEditSelected();
if (data.pk != null) var dpt = $(this).closest('.dpt');
refreshScreenFocusPk(data); if (dpt.hasClass('dpt-selected')) {
else { instance.clearEditSelected();
alert('Erro na inserção!'); return;
flag_refresh_all = false;
} }
instance.clearEditSelected();
}).always(function() {
$("#message_block").css("display", "none"); dpt.on('get_form_base', function () {
}); var _this = $(this);
if (event != null) _this.addClass('dpt-selected');
event.preventDefault(); instance.scrollTo(_this);
} _this.off('get_form_base')
var btn_fechar = _this.find('.btns-excluir');
var clickEditDispositivo = function(event) { _this.find('.dpt-actions-bottom').last().append(btn_fechar);
var _pk = event.currentTarget.getAttribute('pk'); btn_fechar.on('click', function() {
if ($('#dpt'+_pk).hasClass("dpt-selected")) { instance.clearEditSelected();
clearEditSelected(); });
return;
btn_fechar.on('click', function() {
var action = this.getAttribute('action');
var pk = $(this).closest('.dpt-selected').attr('pk');
if (pk !== undefined) {
var url = pk+'/refresh?action='+action;
instance.waitShow();
$.get(url).done(function(data) {
instance.clearEditSelected();
if (data.pk != null) {
if (!instance.modalMessage(data.message.value, 'alert-'+data.message.value, function() {
instance.waitHide();
}))
instance.refreshScreenFocusPk(data);
}
});
}
});
});
instance.loadForm(dpt, 'get_form_base');
} }
clearEditSelected();
clickUpdateDispositivo(event);
}
var clickUpdateDispositivo = function(event, __pk_refresh, __pk_edit, __action, flag_actions_vibible, flag_refresh_all) { instance.loadForm = function(dpt, trigger) {
if (editortype == "construct")
var pk_refresh = __pk_refresh; return;
var pk_edit = __pk_edit; var dpt_form = dpt.children().filter('.dpt-form');
var _action = __action; if (dpt_form.length == 1) {
var _variacao = ''; var pk = dpt.attr('pk');
var _tipo_pk = ''; var url = pk+'/refresh?action='+trigger;
var _perfil_pk = ''; $.get(url).done(function(data) {
dpt_form.html(data);
if (event != null) { dpt_form.find('form').submit(instance.onSubmitEditFormBase);
pk_refresh = event.currentTarget.getAttribute('pk'); if (editortype == 'tinymce' ) {
_action = $(this).attr('action'); initTinymce();
_variacao = $(this).attr('variacao'); }
_tipo_pk = $(this).attr('tipo_pk'); dpt.trigger(trigger);
_perfil_pk = $(this).attr('perfil_pk'); }).always(function() {
instance.waitHide();
});
}
} }
if (pk_edit == null) instance.modalMessage = function(message, alert, closeFunction) {
pk_edit = pk_refresh; if (message != null && message != '') {
$('#modal-message #message').html(message);
var url = ''; $('#modal-message').modal('show');
if (_action == '') $('#modal-message, #modal-message .alert button').off();
return; $('#modal-message .alert').removeClass('alert-success alert-info alert-warning alert-danger alert-danger');
else if ( _action == null) { $('#modal-message .alert').addClass(alert);
url = pk_refresh+'/refresh?edit='+pk_edit;
} if (closeFunction != null)
else if (_action.startsWith('refresh')) { $('#modal-message').on('hidden.bs.modal', closeFunction);
var str = _action.split(':');
if (str.length > 1) { $('#modal-message .alert button').on('click', function() {
if(_action.endsWith('perfil')) { $('#modal-message').modal('hide');
url = '&perfil_pk='+_perfil_pk; });
$("#message_block").css("display", "block"); return true;
}
else {
editortype = str[1];
SetCookie("editortype", editortype, 30)
}
} }
url = pk_refresh+'/refresh?edit='+pk_edit+url; return false;
} }
else if (_action.startsWith('add_')) {
url = pk_refresh+'/actions?action='+_action;
url += '&tipo_pk='+_tipo_pk;
url += '&variacao='+_variacao;
$("#message_block").css("display", "block");
instance.message = function(data) {
if (!('message' in data))
return;
var cp_notify = $(".cp-notify")
cp_notify.removeClass('hide')
var msg = cp_notify.find('.message');
msg.text(data.message.value);
msg.removeClass('bg-primary bg-success bg-info bg-warning bg-danger').addClass('bg-'+data.message.type);
setTimeout(function() {
cp_notify.addClass('hide');
}, (data.message.time?data.message.time: 3000));
} }
else if (_action.startsWith('set_')) { instance.offClicks = function() {
$('.btn-dpt-edit').off()
url = pk_refresh+'/actions?action='+_action;
$("#message_block").css("display", "block");
} }
else if (_action.startsWith('delete_')) { instance.onClicks = function(container) {
var r = confirm("Confirma Exclusão deste dispositivo?"); var objects;
if (!r) { if (container == null)
return objects = $('.btn-dpt-edit');
} else
url = pk_refresh+'/actions?action='+_action; objects = $(container).find('.btn-dpt-edit');
$("#message_block").css("display", "block"); objects.on('click', instance.editDispositivo);
} }
instance.onSubmitEditFormBase = function(event) {
$.get(url).done(function( data ) {
if ( _action == null || _action.startsWith('refresh')) { var _this = this;
var texto = '';
if (flag_refresh_all) { var texto_atualizador = '';
if (flag_actions_vibible) var visibilidade = '';
clearEditSelected(); var editor_tiny_texto = tinymce.get('id_texto');
var editor_tiny_texto_atualizador = tinymce.get('id_texto_atualizador');
$( '#dpt' + pk_refresh ).html( data);
} if (editor_tiny_texto != null)
else { texto = editor_tiny_texto.getContent();
//console.log(pk_refresh + ' - '+pk_edit) else
if (flag_actions_vibible == null || flag_actions_vibible) texto = this['id_texto'].value;
clearEditSelected();
if (editor_tiny_texto_atualizador != null)
//$( '#dpt' + pk_refresh+' > .bloco' ).addClass('displaynone' ); texto_atualizador = editor_tiny_texto_atualizador.getContent();
$( '#dpt' + pk_refresh ).prepend( data ); else if ('id_texto_atualizador' in this)
texto_atualizador = this['id_texto_atualizador'].value;
if ('visibilidade' in this)
visibilidade = this['visibilidade'].value;
var form_data = {
'csrfmiddlewaretoken' : this['csrfmiddlewaretoken'].value,
'texto' : texto,
'texto_atualizador' : texto_atualizador,
'visibilidade' : visibilidade
};
var url = $(this).closest('.dpt').attr( "pk" )+'/refresh';
instance.waitShow();
$.post(url, form_data)
.done(function(data) {
if (typeof data == "string") { /* if obsoleto */
var dpt = $(_this).closest('.dpt');
dpt = $('#'+dpt.replaceWith(data).attr('id'));
instance.onClicks(dpt);
instance.waitHide();
return;
} }
instance.clearEditSelected();
reloadFunctionClicks();
var _editortype = editortype;
if ( $('.edt-'+_editortype).length == 0) {
_editortype = 'construct';
}
if ( _editortype == 'tinymce' ) {
initTinymce();
}
else if (_editortype == 'textarea') {
$('.csform form').submit(onSubmitEditForm);
}
else if (_editortype == 'construct') {
$('.csform .btn-salvar').parent().addClass("displaynone");
$('.csform .btn-salvar, .csform .fields').addClass("displaynone");
$('#dpt'+pk_refresh).css('min-height', $('.actions_right').height()*2);
$('.actions_inserts').removeClass('menu_flutuante');
}
else if (_editortype == 'detail') { //TODO: código obsoleto - confirmar retirada desta condição
$('.csform .btn-salvar').parent().removeClass("displaynone");
$('.csform .btn-salvar, .csform .fields').removeClass("displaynone");
$('#dpt'+pk_refresh).css('min-height', $('.actions_right').height()*2);
$('.actions_inserts').addClass('menu_flutuante');
}
$(".edt-"+_editortype).addClass('selected');
if (flag_actions_vibible == null || flag_actions_vibible) {
$('#dpt'+pk_edit).addClass('dpt-selected');
try {
$('html, body').animate({
scrollTop: $('#dpt' + pk_edit ).offset().top - window.innerHeight / 9
}, 100);
}
catch(err) {
}
}
}
else if (_action == 'add_next' || _action == 'add_in') {
clearEditSelected();
if (data.pk != null) { if (data.pk != null) {
refreshScreenFocusPk(data); instance.refreshScreenFocusPk(data);
instance.message(data);
} }
else { else {
alert('Erro na inserção!'); alert('Erro na resposta!');
} }
}
else if (_action.startsWith('delete_')) { }).always(function() {
$("#message_block").css("display", "block"); instance.waitHide();
clearEditSelected(); });
if (data.pk != null) { if (event != null)
if (!modalMessage(data.message, 'alert-danger', function() { event.preventDefault();
//refreshScreenFocusPk(data); }
})) instance.refreshContent = function(pk, trigger_edit_pk) {
refreshScreenFocusPk(data); var url = pk+'/refresh';
$.get(url).done(function(data) {
var dpt = $('#id'+pk).closest('.dpt');
dpt = $('#'+dpt.replaceWith(data).attr('id'));
instance.onClicks(dpt);
if (trigger_edit_pk != null && trigger_edit_pk != 0) {
instance.triggerBtnDptEdit(trigger_edit_pk)
} }
else { else {
alert('Erro exclusão de Dispositivo!'); instance.waitHide();
}
});
}
instance.refreshScreenFocusPk = function (data) {
if (data.pai[0] == -1) {
instance.waitShow()
href = location.href.split('#')[0]
location.href = href+'#'+data.pk;
location.reload(true)
} }
}
else { else {
clearEditSelected(); instance.refreshContent(data.pai[0], data.pk);
reloadFunctionClicks(); setTimeout(function() {
modalMessage(data.message, 'alert-success', null); for (var pai = 1; pai < data.pai.length; pai++)
instance.refreshContent(data.pai[pai]);
}, 1000);
} }
}
}).always(function() { instance.reloadFunctionsDraggables = function() {
$("#message_block").css("display", "none"); $( ".dpt-alts" ).sortable({
}); revert: true,
} distance: 15,
start: function( event, ui ) {
function modalMessage(message, alert, closeFunction) { }
if (message != null && message != '') { ,
$('#modal-message #message').html(message); stop: function( event, ui ) {
$('#modal-message').modal('show'); var pk = ui.item.attr('pk');
$('#modal-message, #modal-message .alert button').off(); var bloco_pk = ui.item.closest('.dpt-alts').closest('.dpt').attr('pk');
$('#modal-message .alert').removeClass('alert-success alert-info alert-warning alert-danger alert-danger');
$('#modal-message .alert').addClass(alert); var url = pk+'/refresh?action=json_drag_move_dpt_alterado&index='+ui.item.index()+'&bloco_pk='+bloco_pk;
$.get(url).done(function( data ) {
if (closeFunction != null) console.log(pk+ ' - '+ bloco_pk);
$('#modal-message').on('hidden.bs.modal', closeFunction); //reloadFunctionsForObjectsOfCompilacao();
});
$('#modal-message .alert button').on('click', function() { }
$('#modal-message').modal('hide');
}); });
return true;
}
return false;
}
function refreshScreenFocusPk(data) { $( ".dpt-alts .dpt" ).draggable({
connectToSortable: ".dpt-alts",
revert: 'invalid',
zIndex: 1,
distance: 15,
drag: function( event, ui ) {
//$('.dpt-comp-selected').removeClass('dpt-comp-selected');
$(".dpt-alts").addClass('drag');
},
stop: function( event, ui ) {
$(".dpt-alts").removeClass('drag');
},
});
if (data.pai[0] == -1) { $(".dpt-alts").disableSelection();
$("#message_block").css("display", "block"); }
href = location.href.split('#')[0] instance.scrollTo = function(dpt) {
location.href = href+'#'+data.pk; try {
location.reload(true) $('html, body').animate({
scrollTop: dpt.offset().top - window.innerHeight / 9
}, 100);
}
catch(err) {
} }
else {
clickUpdateDispositivo(null, data.pai[0], data.pk, 'refresh', true, true);
setTimeout(function() {
for (var pai = 1; pai < data.pai.length; pai++)
clickUpdateDispositivo(null, data.pai[pai], data.pk, 'refresh', false, true);
}, 1000);
} }
} instance.triggerBtnDptEdit =function(pk) {
var btn_dpt_edit = $('#id'+pk + ' > .dpt-text.btn-dpt-edit');
if (btn_dpt_edit.length == 0)
btn_dpt_edit = $('#id'+pk + ' > .dpt-actions-fixed > .btn-dpt-edit');
btn_dpt_edit.trigger( "click" );
}
instance.waitHide = function() {
$("#wait_message").addClass("displaynone");
}
instance.waitShow = function() {
$("#wait_message").removeClass("displaynone");
}
function clearEditSelected() {
$('.bloco' ).removeClass('displaynone' );
$(".container").removeClass('class_color_container'); instance.init = function() {
tinymce.remove(); editortype = ReadCookie("editortype");
$('.dpt-selected').removeClass('dpt-selected'); if (editortype == null || editortype == '') {
$('.dpt').css('min-height', ''); editortype = "textarea"
$('.csform').remove(); SetCookie("editortype", editortype, 30)
}
editortype = "textarea";
instance.offClicks();
instance.onClicks();
instance.reloadFunctionsDraggables();
href = location.href.split('#')
if (href.length == 2 && href[1] != '') {
instance.triggerBtnDptEdit(href[1])
}
$('main').click(function(event) {
if (event.target == this || event.target == this.firstElementChild)
instance.clearEditSelected();
});
instance.waitHide();
}
instance.init();
} }
function reloadFunctionClicks() {
$('.dpt .de, .btn-action, .btn-edit').off();
$('.dpt .de, .btn-edit').on('click', clickEditDispositivo);
$('.btn-action').on('click', clickUpdateDispositivo);
$('#editdi_texto').focus();
$( ".bloco_alteracao" ).sortable({
revert: true,
stop: function( event, ui ) {
var pk = ui.item.attr('pk');
var bloco_pk = ui.item.closest('.bloco').closest('.dpt').attr('pk');
url = pk+'/actions?action=move_dpt_alterado&index='+ui.item.index()+'&bloco_pk='+bloco_pk;
$.get(url).done(function( data ) {
console.log(pk+ ' - '+ bloco_pk);
});
}
});
$( ".bloco_alteracao .dpt" ).draggable({
connectToSortable: ".bloco_alteracao",
revert: 'invalid',
zIndex: 1,
drag: function( event, ui ) {
$( ".bloco_alteracao" ).addClass('drag');
},
stop: function( event, ui ) {
$( ".bloco_alteracao" ).removeClass('drag');
},
});
$( ".bloco_alteracao" ).disableSelection();
}
$(document).ready(function() { $(document).ready(function() {
editortype = ReadCookie("editortype") DispositivoEdit();
if (editortype == null || editortype == "") {
editortype = "textarea"
SetCookie("editortype", editortype, 30)
}
reloadFunctionClicks();
$("#message_block").css("display", "none");
href = location.href.split('#')
if (href.length == 2 && href[1] != '') {
clickUpdateDispositivo(null, href[1], href[1], 'refresh', true);
}
$('main').click(function(event) {
if (event.target == this || event.target == this.firstElementChild)
clearEditSelected();
});
}); });

21
sapl/static/js/compilacao_view.js

@ -95,9 +95,14 @@ function textoMultiVigente(item, diff) {
} }
if (elv) { if (elv) {
$('html, body').animate({ try {
scrollTop: $(elv).parent().offset().top - 60 $('html, body').animate({
}, 0); scrollTop: $(elv).parent().offset().top - 60
}, 0);
}
catch(err) {
}
} }
} }
@ -126,9 +131,13 @@ function textoVigente(item, link) {
$(".link_alterador").addClass("displaynone"); $(".link_alterador").addClass("displaynone");
if (elv) { if (elv) {
$('html, body').animate({ try {
scrollTop: $(elv).parent().offset().top - 60 $('html, body').animate({
}, 0); scrollTop: $(elv).parent().offset().top - 60
}, 0);
}
catch(err) {
}
} }
} }

7
sapl/static/styles/app.scss

@ -8,6 +8,12 @@
float: none; float: none;
} }
nav {
&.navbar {
border-radius: 0;
}
}
.masthead { .masthead {
padding: 10px; padding: 10px;
.nav { .nav {
@ -139,7 +145,6 @@ fieldset {
} }
} }
} }
.btn-primary, .btn-danger{ .btn-primary, .btn-danger{
font-size: 16px; font-size: 16px;
height: 40px !important; height: 40px !important;

294
sapl/static/styles/compilacao.scss

@ -61,6 +61,7 @@ a:link:after, a:visited:after {
-webkit-transition-delay: 0.4s; /* Safari */ -webkit-transition-delay: 0.4s; /* Safari */
transition-delay: 0.4s; transition-delay: 0.4s;
li { li {
a { a {
border-right: 0px !important; border-right: 0px !important;
@ -84,7 +85,6 @@ a:link:after, a:visited:after {
} }
} }
} }
// This bridges the gap between the top bar and a dropdown.
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
@ -93,27 +93,23 @@ a:link:after, a:visited:after {
top: rem-calc(-25px); top: rem-calc(-25px);
height: rem-calc(25px); height: rem-calc(25px);
width: 100%; width: 100%;
// This transition is for hover-on.
transition: all 0.3s cubic-bezier(0.55,0,0.1,1); transition: all 0.3s cubic-bezier(0.55,0,0.1,1);
} }
} }
&:hover > ul { &:hover > ul {
transform: translateY(7px); transform: translateY(7px);
// This transition is actually for when we hover-out of the dropdown.
transition: transform 0.4s linear, transition: transform 0.4s linear,
opacity 0.4s linear, opacity 0.4s linear,
clip 0s 0.2s; clip 0s 0.2s;
opacity: 1; opacity: 1;
clip: rect(-100px, 2000px, 2000px, -100px); clip: rect(-100px, 2000px, 2000px, -100px);
} }
} }
.test_import:nth-child(even) { .test_import:nth-child(even) {
background-color: #ccc; background-color: #ccc;
} }
#message_block { #wait_message {
display: block; display: block;
position: fixed; position: fixed;
top: 0; top: 0;
@ -137,7 +133,35 @@ a:link:after, a:visited:after {
box-shadow: 0 1px 2px #999; box-shadow: 0 1px 2px #999;
} }
} }
.text-center {
text-align: center;
}
.cp-notify {
z-index: 9999;
position:fixed;
top: 2em;
left: 50%;
min-width: 600px;
transform: translate(-50%, 0);
transition: all 0.4s ease;
opacity: 0.97;
&.hide {
opacity: 0;
top: -1000px;
display: block !important;
transition: all 0.4s ease;
}
.message {
padding: 1em;
border: 2px solid rgba(0, 0, 0, 0.1);
border-radius: 4px;
color: rgba(0, 0, 0, 0.6);
line-height: 1em;
font-size: 1.3em;
text-align: center;
box-shadow: 0 0 100px rgba(0, 0, 0, 0.2);
}
}
.cp { .cp {
.desativado { .desativado {
@ -372,7 +396,7 @@ a:link:after, a:visited:after {
& > a { & > a {
color: #444444; color: #444444;
&.link_alterador { &.nota-alteracao {
color: #2980B9; color: #2980B9;
font-size: 0.75em; font-size: 0.75em;
&:hover { &:hover {
@ -491,6 +515,198 @@ a:link:after, a:visited:after {
} /* end cp */ } /* end cp */
.cp.cpe { .cp.cpe {
.desativado {
text-decoration: line-through;
color: #999 !important;
table, table td {
border: 1px dotted #ccc;
}
}
.dpt {
display: block;
& > .dpt-actions-fixed {
position: absolute;
right: 0px;
z-index: 2;
opacity: 0;
}
& > .dpt-actions, & > .dpt-actions-bottom {
display: none;
}
& > .dpt-text {
cursor: pointer;
&:hover {
color: $color_buttons;
transition: color 0.3s ease;
}
&.artigo {
float: none;
}
a {
&.link-rotulo {
color: #000;
}
}
}
&:hover {
& > .dpt-actions-fixed {
opacity: 1;
}
}
.semtexto {
font-weight: bold;
color: #9aaed6;
&:hover {
color: #5f76a4;
}
}
} /* fim .dpt */
.dpt-alts {
margin: 0;
margin-bottom: 1em;
padding: 0;
background-color: transparent;
min-height: 100px;
border: 2px dashed #fff;
&:hover {
border-color: #d9ddde;
}
&:empty {
border-color: #ddd;
}
&.drag {
width: 100% !important;
border-color: #d9ddde;
.dpt {
transition-duration: 0s !important;
}
}
.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: 0;
margin: 0;
background-color: #edf0f1;
height: auto !important;
min-height: 2em;
z-index: 1;
&:not(:first-child) {
border-top: 1px solid white;
}
& > .dpt-text {
padding: 0.3em 1em;
margin-top: 0;
margin-bottom: 0;
a {
&.link-rotulo {
text-decoration: underline;
}
}
}
}
.dpt-selected {
&.dpt {
margin: -0.2em -0.5em;
}
}
} /* fim dpt-alts */
.dpt-selected {
&.dpt {
width: auto !important;
margin: 1em -0.5em;
border: 1px solid #ddd !important;
padding: 0;
background-color: #fafafa;
border-radius: 3px;
z-index: 2;
& > .dpt-text {
opacity: 1;
border: 1px solid #e0e0e0 !important;
margin: 1em;
padding: 0.3em;
position: relative;
background-color: white;
min-height: 2em;
&:before {
border-width: 1rem;
border-style: solid;
border-color: #e0e0e0 #e0e0e0 transparent transparent;
content: "";
display: block;
height: 0px;
width: 0px;
position: absolute;
top: 0rem;
right: 0rem;
}
}
& > .dpt-form {
margin-bottom: 1em;
}
& > .dpt-actions, & > .dpt-actions-bottom {
display: table;
background-color: #e5e5e5;
padding: 1em;
margin-bottom: 1em;
width: 100%;
& > .btn-action {
display: table-cell;
float: none;
}
.btn-excluir {
display: inline-block;
opacity: 0.3;
&:hover {
opacity: 1;
}
}
}
& > .dpt-actions-bottom {
margin:0;
}
}
.dpt-block {
border-top: 1px solid #e5e5e5 !important;
}
.dpt {
&:only-child {
border-bottom: 1px solid #e5e5e5 !important;
}
&:not(:last-child) {
border-bottom: 1px solid #e5e5e5 !important;
}
}
.dpt-text {
opacity: 0.7;
margin: 0;
padding: 0.7em;
&:hover {
opacity: 1;
background-color: #f5f5f5;
}
}
& > .dpt-alts {
margin: 0;
border: 0px;
.dpt {
box-shadow: 0 0 0;
}
}
& > .dpt-actions-fixed {
display: none;
}
}
}
.cp.cpe1 {
margin-bottom: 15em; margin-bottom: 15em;
@ -530,14 +746,19 @@ a:link:after, a:visited:after {
position: absolute; position: absolute;
opacity: 0; opacity: 0;
transition: all 0.4s ease-in-out; transition: all 0.4s ease-in-out;
z-index: 2000; z-index: 1000;
a { a {
&.btn-edit { &.btn-bloco {
background-color: #3498db; background-color: #3498db;
color: #ffffff !important; color: #ffffff !important;
padding: 8px 18px 6px; padding: 8px 18px 6px;
display: inline-block; display: inline-block;
line-height: 1; line-height: 1;
float: right;
&:hover{
opacity: 1;
@include background-top-down(#1c81c4, #0b6dad);
}
} }
} }
} }
@ -570,13 +791,17 @@ a:link:after, a:visited:after {
border-color: #d9ddde; border-color: #d9ddde;
} }
&.drag { &.drag {
width: 100% !important;
border-color: #d9ddde; border-color: #d9ddde;
.dpt {
transition-duration: 0s !important;
}
} }
.dpt { .dpt {
width: 100% !important; 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); box-shadow: 0 -1px 0 #e5e5e5, 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
padding: 0.3em 1em; padding: 0.3em 1em;
margin: 1px 0; margin: 0;
background-color: #edf0f1; background-color: #edf0f1;
z-index: 1; z-index: 1;
&:not(:first-child) { &:not(:first-child) {
@ -585,6 +810,12 @@ a:link:after, a:visited:after {
&.ui-draggable div { &.ui-draggable div {
cursor: pointer; cursor: pointer;
} }
&.dpt-comp-selected {
transition: all 0.3s ease;
width: auto !important;
margin: 2em -3.7em;
box-shadow: 0 0 6px rgba(0,0,0,.16),0 6px 12px rgba(0,0,0,.32);
}
} }
} }
} /* fim dpt */ } /* fim dpt */
@ -592,7 +823,7 @@ a:link:after, a:visited:after {
.dpt-selected { .dpt-selected {
font-size: 1em; font-size: 1em;
border: 0px solid $color_actions_border; border: 0px solid $color_actions_border;
margin: 1em -2em 1em -2.8em; margin: 1em -1.8em 1em -1.8em;
padding: 2.2em 2.2em 1.6em 2.2em; padding: 2.2em 2.2em 1.6em 2.2em;
box-shadow: -4px 15px 15px rgba(0, 0, 0, 0.1), 0px 6px 6px rgba(0, 0, 0, 0.23); box-shadow: -4px 15px 15px rgba(0, 0, 0, 0.1), 0px 6px 6px rgba(0, 0, 0, 0.23);
@ -626,12 +857,26 @@ a:link:after, a:visited:after {
.bloco_alteracao { .bloco_alteracao {
margin: 0; margin: 0;
padding: 1em; padding: 1em;
border: 0 transparent;
@include background-top-down(#eaeaee, #ddd); @include background-top-down(#eaeaee, #ddd);
&:not(:first-child) {
border-top: 0px solid white; &:hover {
border-color: transparent;
}
&.drag {
width: 100% !important;
.dpt {
transition-duration: 0s !important;
}
} }
.dpt { .dpt {
width: auto !important;
transition: all 0.3s ease;
background-color: white; background-color: white;
&:not(:first-child) {
border-top: 0px solid white;
}
} }
} }
@ -643,7 +888,11 @@ a:link:after, a:visited:after {
} }
& > .actions_right { & > .actions_right {
display: none; a {
&.btn-bloco {
display: none;
}
}
} }
.csform { /* compilacao simple form */ .csform { /* compilacao simple form */
@ -910,6 +1159,7 @@ a:link:after, a:visited:after {
.menu_flutuante, .menu_flutuante_fixo { .menu_flutuante, .menu_flutuante_fixo {
z-index: 2000;
& > li { & > li {
@include li_flutuante(); @include li_flutuante();
@ -956,7 +1206,8 @@ a:link:after, a:visited:after {
} }
} }
} /* fim csform*/ } /* fim csform*/
} } /* fim dpt-selected */
.selected { .selected {
background-color: rgba(255, 255, 255, 0.5); background-color: rgba(255, 255, 255, 0.5);
@ -1108,16 +1359,16 @@ a:link:after, a:visited:after {
display: none !important; display: none !important;
} }
@media only screen and (max-width: 40.0625em) { @media only screen and (max-width: 800px) {
.cp .fixed{ .cp .fixed{
z-index:98; z-index:98;
position: relative; position: relative;
} }
.cpe { .cp.cpe1 {
.dpt-selected { .dpt-selected {
margin:1em -1em 1em -1.8em; margin: 1em 0;
.csform { .csform {
.actions_parents, .label_status { .actions_parents, .label_status {
@ -1126,6 +1377,9 @@ a:link:after, a:visited:after {
display: block !important; display: block !important;
padding: 0em; padding: 0em;
height: auto !important; height: auto !important;
left: 0;
right: auto;
text-align: left;
div, li { div, li {
display: inline-block !important; display: inline-block !important;
} }
@ -1179,7 +1433,7 @@ a:link:after, a:visited:after {
margin-left: 0; margin-left: 0;
margin-right: 0.5em; margin-right: 0.5em;
li:first-child::before { li:first-child::before {
right: 27%; right: 0;
left: auto; left: auto;
} }
} }

Loading…
Cancel
Save