Skip to content
Snippets Groups Projects
Commit 4798dbd5 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

Merge branch 'master' of gitlab.c3sl.ufpr.br:portalmec/portalmec

parents f73c9c81 de370788
No related branches found
No related tags found
No related merge requests found
...@@ -18,12 +18,30 @@ ...@@ -18,12 +18,30 @@
//= require select2 //= require select2
//= require_tree ./application //= require_tree ./application
/*
$('h2').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
});
$('h3').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
});
$('h4').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
});
$('h5').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
});
$('h6').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
});
*/
$(document).ready(function(){ $(document).ready(function(){
size_c = readCookie('fontSize'); size_c = readCookie('fontSize');
if (size_c != null) { if (size_c != null) {
document.body.style.fontSize = size_c + 'px'; document.body.style.fontSize = size_c + 'px';
$('.dropdown-menu').css('fontSize', document.body.style.fontSize); $('.dropdown-menu').css('fontSize', document.body.style.fontSize);
$('h1').each(function(index,value) { $('h1,h2,h3,h4,h5,h6').each(function(index,value) {
$(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px'); $(this).css('fontSize', (parseFloat($(this).css('fontSize')) + (size_c - 15)) + 'px');
}); });
} }
...@@ -62,22 +80,7 @@ function resizeText(increment) { ...@@ -62,22 +80,7 @@ function resizeText(increment) {
if (size < 25) { if (size < 25) {
document.body.style.fontSize = parseFloat(document.body.style.fontSize) + increment + "px"; document.body.style.fontSize = parseFloat(document.body.style.fontSize) + increment + "px";
$('.dropdown-menu').css('fontSize', document.body.style.fontSize); $('.dropdown-menu').css('fontSize', document.body.style.fontSize);
$('h1').each(function(index,value) { $('h1 ,h2 ,h3, h4, h5 ,h6').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h2').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h3').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h4').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h5').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h6').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px'); $(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
}); });
} }
...@@ -85,22 +88,7 @@ function resizeText(increment) { ...@@ -85,22 +88,7 @@ function resizeText(increment) {
if (size > 10) { if (size > 10) {
document.body.style.fontSize = parseFloat(document.body.style.fontSize) + increment + "px"; document.body.style.fontSize = parseFloat(document.body.style.fontSize) + increment + "px";
$('.dropdown-menu').css('fontSize', document.body.style.fontSize); $('.dropdown-menu').css('fontSize', document.body.style.fontSize);
$('h1').each(function(index,value) { $('h1 ,h2 ,h3, h4, h5 ,h6').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h2').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h3').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h4').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h5').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h6').each(function(index,value) {
$(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px'); $(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
}); });
} }
...@@ -109,73 +97,42 @@ function resizeText(increment) { ...@@ -109,73 +97,42 @@ function resizeText(increment) {
size = parseFloat(document.body.style.fontSize); size = parseFloat(document.body.style.fontSize);
document.body.style.fontSize = '15px'; document.body.style.fontSize = '15px';
$('.dropdown-menu').css('fontSize', document.body.style.fontSize); $('.dropdown-menu').css('fontSize', document.body.style.fontSize);
$('h1').each(function(index,value) { $('h1 ,h2 ,h3, h4, h5 ,h6').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px'); $(this).css('fontSize', parseFloat($(this).css('fontSize')) + increment + 'px');
});
$('h2').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px');
});
$('h3').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px');
});
$('h4').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px');
});
$('h5').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px');
});
$('h6').each(function(index,value) {
$(this).css('fontSize',Math.abs(parseFloat($(this).css('fontSize'))-(size-15)) + 'px');
}); });
} }
createCookie('fontSize', parseFloat(document.body.style.fontSize), 365); createCookie('fontSize', parseFloat(document.body.style.fontSize), 365);
} }
function changeContrast() { function changeContrast() {
if (readCookie('contrast') == null || readCookie('contrast') == "true") { if (readCookie('contrast') == null || readCookie('contrast') == "false") {
createCookie('contrast',"false",0);
} else {
createCookie('contrast',"true",0); createCookie('contrast',"true",0);
} else {
createCookie('contrast',"false",0);
} }
Contrast(); Contrast();
} }
function Contrast() { function Contrast() {
contrast_c = readCookie('contrast'); contrast_c = readCookie('contrast');
if (contrast_c == null || contrast_c != "false"){ if (contrast_c == null || contrast_c != "true"){
$('body').removeClass("contraste"); $('body').addClass('contraste');
$('body').removeClass("alto-contraste"); $('.barra-brasil').addClass('contraste');
$('.searchbar').removeClass("searchbar-contraste"); $('.search-bar').addClass('contraste');
$('header a').removeClass("link-contraste"); $('.search-bar').css('border-top','2px solid white');
$('#footer').removeClass("footer-contraste"); $('#menu-bar').addClass('menu-bar-contrast');
$('#footer div').removeClass("footer-contraste"); $('.object-vertical .panel').addClass('contraste');
$('.dropdown-menu').removeClass("dropdown-menu-contrast"); $('.navbar').addClass('contraste');
$('.general-highlights').removeClass("general-highlights-contrast"); $('.well').addClass('contraste');
$(".nav > li > a").css('background-color','none');
$(".nav > li > a").hover(
function(){
$(this).css('background-color','#eee')
},function(){
$(this).css('background-color','transparent')
}
);
}else { }else {
$('body').addClass("contraste"); $('body').removeClass('contraste');
$('body').addClass("alto-contraste"); $('.barra-brasil').removeClass('contraste');
$('.searchbar').addClass("searchbar-contraste"); $('.search-bar').removeClass('contraste');
$('header a').addClass("link-contraste"); $('.search-bar').css('border-top','none');
$('#footer').addClass("footer-contraste"); $('#menu-bar').removeClass('menu-bar-contrast');
$('#footer div').addClass("footer-contraste"); $('.object-vertical .panel').removeClass('contraste');
$('.dropdown-menu').addClass("dropdown-menu-contrast"); $('.navbar').removeClass('contraste');
$('.general-highlights').addClass("general-highlights-contrast"); $('.well').removeClass('contraste');
$(".nav > li > a").css('background-color','#transparent');
$(".nav > li > a").hover(
function(){
$(this).css('background-color','#000');
}, function() {
$(this).css('background-color','#transparent')
}
);
} }
} }
......
...@@ -33,6 +33,20 @@ a, a:focus, a:hover { ...@@ -33,6 +33,20 @@ a, a:focus, a:hover {
color: #000; color: #000;
} }
.caret {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #000000;
}
.caret-up {
transform: rotate(180deg);
}
.caret-align-right {
position: absolute;
left: 90%;
top: 45%;
}
//// HEADER //// HEADER
header { header {
border: 0; border: 0;
...@@ -46,21 +60,21 @@ header { ...@@ -46,21 +60,21 @@ header {
} }
// barra brasil // barra brasil
.barra-brasil {
.barra-brasil {
background:#F1F1F1; background:#F1F1F1;
height: 32px; height: 32px;
padding:0 0 0 10px; padding:0 0 0 10px;
display:block; display:block;
#barra-brasil .brasil-flag{
height: 50px !important;
}
#wrapper-barra-brasil { #wrapper-barra-brasil {
max-width: 100% !important; max-width: 100% !important;
} }
} }
.brasil-flag{
height: 100% !important;
}
// bar with logo, search and user info // bar with logo, search and user info
.search-bar { .search-bar {
color: #FFF; color: #FFF;
...@@ -187,6 +201,7 @@ header { ...@@ -187,6 +201,7 @@ header {
} }
} }
//// FOOTER //// FOOTER
footer { footer {
width:100%; width:100%;
...@@ -261,26 +276,47 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; } ...@@ -261,26 +276,47 @@ table.tipo1 p{ font-size: 15px; font-weight: bold; }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
/* Alto Contraste*/ /* Alto Contraste*/
.contraste{
background-color: black !important;
color: white !important;
a{
color: yellow;
}
.search-bar{
color: white !important;
}
#myCarousel{
a{
color: white !important;
}
}
.alto-contraste{ #search{
background-color: black; .form-control{
color: white; background-color: black !important;
} color:white;
}
.link-contraste{ }
color: yellow !important; #subject-highlight{
text-decoration: underline; background-color: black !important;
} }
.footer-contraste{
background-color: black !important;
color: white;
}
.dropdown-menu-contrast{
background-color: black !important;
border: 1px solid white;
} }
.general-highlights-contrast{ .menu-bar-contrast{
border: 1px solid white; background-color: black !important;
border-top: 2px solid white;
border-bottom: 2px solid white;
li{
a{
color:white !important;
}
a:hover{
background-color: #1E1E1E !important;
}
}
.divider{
background-color: white;
}
.dropdown-menu{
background-color: black;
}
} }
#nestedAccordion{ .search-sidebar {
width:100%; margin-top: 40px;
}
#nestedAccordion h2, #nestedAccordion h3,
#nestedAccordion div, #nestedAccordion ol,
#nestedAccordion li{
/* reset styles for accordion */
margin:0;
padding:0;
font-size:1em;
font-weight:normal;
list-style:none;
}
#nestedAccordion div{
color:#555;/*#555 #003300*/
overflow:hidden;
display:none;
} }
#nestedAccordion h2{ .select2-container {
cursor:pointer; width: 100% !important;
color:#fff;
font-size:1.1em;
moz-border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
padding:3px;
margin-top:5px;
background-color: #3F434F;
background-image: -webkit-gradient(linear, left top, left bottom, from(#4B8CFF), to(#447FE8));
background-image: -webkit-linear-gradient(top, #4B8CFF, #447FE8);/*#4B8CFF, #447FE8*/
background-image: -moz-linear-gradient(top, #4B8CFF, #447FE8);
background-image: -ms-linear-gradient(top, #4B8CFF, #447FE8);
background-image: -o-linear-gradient(top, #4B8CFF, #447FE8);
background-image: linear-gradient(to bottom, #4B8CFF, #447FE8);
background-image: url("arrow.ico");
background-repeat: no-repeat;
background-position: right bottom;
} }
#nestedAccordion h3{
cursor:pointer;
padding:4px;
color: #666;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
background-color: #f5f5f5;
background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#ededed));
background-image: -webkit-linear-gradient(top, #f5f5f5, #ededed);
background-image: -moz-linear-gradient(top, #f5f5f5, #ededed);
background-image: -ms-linear-gradient(top, #f5f5f5, #ededed);
background-image: -o-linear-gradient(top, #f5f5f5, #ededed);
background-image: linear-gradient(to bottom, #f5f5f5, #ededed);
} // #nestedAccordion{
#nestedAccordion h3:hover{ // width:100%;
color:#000; // }
} // #nestedAccordion h2, #nestedAccordion h3,
#nestedAccordion h3 + div{ // #nestedAccordion div, #nestedAccordion ol,
display:none; // #nestedAccordion li{
background-color:#F5F5F5; // /* reset styles for accordion */
padding:5px 5px 5px 30px; // margin:0;
} // padding:0;
#nestedAccordion li:hover{ // font-size:1em;
color:#000; // font-weight:normal;
cursor:pointer; // list-style:none;
} // }
#nestedAccordion h2 +div.aberto{ // #nestedAccordion div{
display:inherit; // color:#555;/*#555 #003300*/
} // overflow:hidden;
// display:none;
// }
//
// #nestedAccordion h2{
// cursor:pointer;
// color:#fff;
// font-size:1.1em;
// moz-border-radius: 5px 5px 0 0;
// -webkit-border-radius: 5px 5px 0 0;
// border-radius: 5px 5px 0 0;
// padding:3px;
// margin-top:5px;
// background-color: #3F434F;
// background-image: -webkit-gradient(linear, left top, left bottom, from(#4B8CFF), to(#447FE8));
// background-image: -webkit-linear-gradient(top, #4B8CFF, #447FE8);/*#4B8CFF, #447FE8*/
// background-image: -moz-linear-gradient(top, #4B8CFF, #447FE8);
// background-image: -ms-linear-gradient(top, #4B8CFF, #447FE8);
// background-image: -o-linear-gradient(top, #4B8CFF, #447FE8);
// background-image: linear-gradient(to bottom, #4B8CFF, #447FE8);
// background-image: url("arrow.ico");
// background-repeat: no-repeat;
// background-position: right bottom;
// }
// #nestedAccordion h3{
// cursor:pointer;
// padding:4px;
// color: #666;
// text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
// background-color: #f5f5f5;
// background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#ededed));
// background-image: -webkit-linear-gradient(top, #f5f5f5, #ededed);
// background-image: -moz-linear-gradient(top, #f5f5f5, #ededed);
// background-image: -ms-linear-gradient(top, #f5f5f5, #ededed);
// background-image: -o-linear-gradient(top, #f5f5f5, #ededed);
// background-image: linear-gradient(to bottom, #f5f5f5, #ededed);
//
// }
// #nestedAccordion h3:hover{
// color:#000;
// }
// #nestedAccordion h3 + div{
// display:none;
// background-color:#F5F5F5;
// padding:5px 5px 5px 30px;
// }
// #nestedAccordion li:hover{
// color:#000;
// cursor:pointer;
// }
// #nestedAccordion h2 +div.aberto{
// display:inherit;
// }
// ///Contrast
// .contraste{
// .thumbnail{
// background-color: black !important;
// }
// .navbar{
// select{
// color: black;
// }
// }
// #nestedAccordion{
// div{
// background-color: black !important;
// color: white !important;
// }
// h3{
// color: white;
// background-color: black !important;
// background-image: none !important;
// border-bottom: 1px solid white;
// }
// h3:hover{
// color: white;
// }
// }
// }
...@@ -11,16 +11,26 @@ ...@@ -11,16 +11,26 @@
<body> <body>
<%= render 'shared/application/header' %> <%= render 'shared/application/header' %>
<% if notice %>
<%= notice %>
<% end %>
<div class="container"> <div class="container">
<% if notice %>
<div class="alert alert-info" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Fechar"><span aria-hidden="true">&times;</span></button>
<%= notice %>
</div>
<% end %>
<% if alert %>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Fechar"><span aria-hidden="true">&times;</span></button>
<%= alert %>
</div>
<% end %>
<%= yield %> <%= yield %>
</div> </div>
<%= render 'shared/application/footer' %> <%= render 'shared/application/footer' %>
<script defer="defer" src="//barra.brasil.gov.br/barra.js" type="text/javascript"></script> <script defer="defer" src="//barra.brasil.gov.br/barra.js" type="text/javascript"></script>
</body> </body>
</html> </html>
This diff is collapsed.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
<div class="search-input"> <div class="search-input">
<form action="/search" method="get"> <form action="/search" method="get">
<div class="input-group"> <div class="input-group" id="search">
<input type="text" placeholder="buscar" class="form-control" name="qry"> <input type="text" placeholder="buscar" class="form-control" name="qry">
<div class="input-group-btn"> <div class="input-group-btn">
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button> <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<% if user_signed_in? %> <% if user_signed_in? %>
<div class="media"> <div class="media">
<div class="media-body"> <div class="media-body">
<h4 class="media-heading"><%= link_to current_user.name, edit_user_registration_path %></h4> <h4 class="media-heading"><%= link_to current_user.name.split(" ").first, edit_user_registration_path %></h4>
<%= link_to 'sair', destroy_user_session_path, method: 'delete', class: "quit-link" %> <%= link_to 'sair', destroy_user_session_path, method: 'delete', class: "quit-link" %>
</div> </div>
<div class="media-right"> <div class="media-right">
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</div> </div>
</div> </div>
<nav class="navigation"> <nav class="navigation" id="menu-bar">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">
......
...@@ -5,7 +5,7 @@ module OrientDb ...@@ -5,7 +5,7 @@ module OrientDb
## ##
# Count the number of edges existent # Count the number of edges existent
def get_in_edges_count(edge_class, id) def get_in_edges_count(edge_class, id)
result = connection.query "SELECT COUNT(@rid) FROM #{edge_class} WHERE in = #{id}" result = connection.query "SELECT in('#{edge_class}').size() AS COUNT FROM #{id}"
result.first["COUNT"].to_i result.first["COUNT"].to_i
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment