From a9326c87e96c48b8b13444099d06a51ae85a423d Mon Sep 17 00:00:00 2001 From: Melissa Wen Date: Wed, 10 Feb 2016 13:44:48 -0200 Subject: [PATCH] JS to shorter user bar labels --- theme.js | 58 ++++++++-------------------------------------------------- 1 file changed, 8 insertions(+), 50 deletions(-) diff --git a/theme.js b/theme.js index 83f0916..42d47eb 100644 --- a/theme.js +++ b/theme.js @@ -1,52 +1,10 @@ -function alignBlocks(containerIndex){ - //Needed to save the original reference to jQuery(this) - jt = jQuery(this); - longerBlock = 0; - jt.find(".block-outer").each(function () { - if(jQuery(this).height() > longerBlock) - longerBlock = jQuery(this).height(); - }); - - jt.find("#block-48504 .block-inner-2").height(492); - jt.find("#block-55304 .block-inner-2").height(378); - - //Aligns the blocks in the most common situations - jt.find(".block-outer").height(longerBlock); - //Only used for blocks with video, since it uses the size of the iframe - if(jt.find("iframe").length > 0){ - jt.find(".block-inner-1 .block-inner-2").each(function (idx) { - if(idx==2){ - jQuery(this).height(jt.find("iframe").height()); - } - }); - } +function shortAdminButtonLabels() { + // Abreviar opcões de administração + $('#user #homepage-link strong').text('Perfil'); + $('#user .ctrl-panel strong').text('Painel'); + $('#user .admin-link strong').text('Adm'); } -jQuery( document ).ready(function( $ ) { - // Run code - if($.cookie("high_contrast") === 'true'){ - $( "body" ).toggleClass( "contraste" ); - } - $( "#siteaction-contraste a" ).click(function() { - $( "body" ).toggleClass( "contraste" ); - if($('body').hasClass('contraste')){ - $.cookie('high_contrast', 'true', {path: '/'}); - } else { - $.cookie('high_contrast', null, { path: '/' }); - } - }); - - $( ".profile-image" ).prepend( "" ); - //insere a mensagem no bloco de trilhas na página inicial// - $( ".action-home-index #content .community-track-plugin_track-card-list-block .track_list" ).prepend( "Construa seu caminho de participação na elaboração de políticas públicas..." ); - //insere a mensagem no bloco de comunidades na página inicial// - $( ".action-home-index #content .communities-block .block-inner-2>div" ).prepend( "Participe dos dialogos entre governo e sociedade em comunidades temáticas..." ); - $( ".action-home-index #content .communities-block .block-inner-2>div.block-footer-content .msg_block" ).remove(); - //insere a mensagem na página de registro// - $( ".action-account-signup #content form" ).prepend( "

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.

A gestão pública nunca esteve tão próxima das pessoas como agora. Faça parte desta mudança!

Seja bem vind@!

" ); - //Alinha os blocos do tipo container lado a lado - $('.container-block-plugin_container-block').each(alignBlocks); - - $('#block-48500 > .block-inner-1 > .block-inner-2').append('
'); - -}); +$(document).ready(function(){ + shortAdminButtonLabels(); +})(jQuery); -- libgit2 0.21.2