Commit a9326c87e96c48b8b13444099d06a51ae85a423d
1 parent
72c0951a
Exists in
master
and in
5 other branches
JS to shorter user bar labels
Showing
1 changed file
with
8 additions
and
50 deletions
Show diff stats
theme.js
| 1 | -function alignBlocks(containerIndex){ | |
| 2 | - //Needed to save the original reference to jQuery(this) | |
| 3 | - jt = jQuery(this); | |
| 4 | - longerBlock = 0; | |
| 5 | - jt.find(".block-outer").each(function () { | |
| 6 | - if(jQuery(this).height() > longerBlock) | |
| 7 | - longerBlock = jQuery(this).height(); | |
| 8 | - }); | |
| 9 | - | |
| 10 | - jt.find("#block-48504 .block-inner-2").height(492); | |
| 11 | - jt.find("#block-55304 .block-inner-2").height(378); | |
| 12 | - | |
| 13 | - //Aligns the blocks in the most common situations | |
| 14 | - jt.find(".block-outer").height(longerBlock); | |
| 15 | - //Only used for blocks with video, since it uses the size of the iframe | |
| 16 | - if(jt.find("iframe").length > 0){ | |
| 17 | - jt.find(".block-inner-1 .block-inner-2").each(function (idx) { | |
| 18 | - if(idx==2){ | |
| 19 | - jQuery(this).height(jt.find("iframe").height()); | |
| 20 | - } | |
| 21 | - }); | |
| 22 | - } | |
| 1 | +function shortAdminButtonLabels() { | |
| 2 | + // Abreviar opcões de administração | |
| 3 | + $('#user #homepage-link strong').text('Perfil'); | |
| 4 | + $('#user .ctrl-panel strong').text('Painel'); | |
| 5 | + $('#user .admin-link strong').text('Adm'); | |
| 23 | 6 | } |
| 24 | 7 | |
| 25 | -jQuery( document ).ready(function( $ ) { | |
| 26 | - // Run code | |
| 27 | - if($.cookie("high_contrast") === 'true'){ | |
| 28 | - $( "body" ).toggleClass( "contraste" ); | |
| 29 | - } | |
| 30 | - $( "#siteaction-contraste a" ).click(function() { | |
| 31 | - $( "body" ).toggleClass( "contraste" ); | |
| 32 | - if($('body').hasClass('contraste')){ | |
| 33 | - $.cookie('high_contrast', 'true', {path: '/'}); | |
| 34 | - } else { | |
| 35 | - $.cookie('high_contrast', null, { path: '/' }); | |
| 36 | - } | |
| 37 | - }); | |
| 38 | - | |
| 39 | - $( ".profile-image" ).prepend( "<span class='helper'></span>" ); | |
| 40 | - //insere a mensagem no bloco de trilhas na página inicial// | |
| 41 | - $( ".action-home-index #content .community-track-plugin_track-card-list-block .track_list" ).prepend( "<span class='msg_block'>Construa seu caminho de participação na elaboração de políticas públicas...</span>" ); | |
| 42 | - //insere a mensagem no bloco de comunidades na página inicial// | |
| 43 | - $( ".action-home-index #content .communities-block .block-inner-2>div" ).prepend( "<span class='msg_block'>Participe dos dialogos entre governo e sociedade em comunidades temáticas...</span>" ); | |
| 44 | - $( ".action-home-index #content .communities-block .block-inner-2>div.block-footer-content .msg_block" ).remove(); | |
| 45 | - //insere a mensagem na página de registro// | |
| 46 | - $( ".action-account-signup #content form" ).prepend( "<div class='singup_text'><p>Registre-se. Crie sua conta no Participa Brasil! Este é mais um espaço de diálogo entre governo e sociedade civil. Depois que você se registrar será possível fazer comentários e/ou contribuições, participar de consultas públicas, criar blogs, participar e/ou criar comunidades, etc.</p><p>A gestão pública nunca esteve tão próxima das pessoas como agora. Faça parte desta mudança!</p><p>Seja bem vind@!</p></div>" ); | |
| 47 | - //Alinha os blocos do tipo container lado a lado | |
| 48 | - $('.container-block-plugin_container-block').each(alignBlocks); | |
| 49 | - | |
| 50 | - $('#block-48500 > .block-inner-1 > .block-inner-2').append('<div class="more_button" style="position: absolute; top: 5px; left: 519px;"><div class="view_all"><a href="/portal/blog">Ler todas</a></div></div>'); | |
| 51 | - | |
| 52 | -}); | |
| 8 | +$(document).ready(function(){ | |
| 9 | + shortAdminButtonLabels(); | |
| 10 | +})(jQuery); | ... | ... |