1 2/* - kss-bbb.js - */ 3// https://www2.camara.leg.br/portal_javascripts/kss-bbb.js?original=1 4(function($){$(function(){if(typeof($('body').attr('data-portal-url'))!=='undefined'&&typeof($('body').attr('data-base-url'))!=='undefined'){return} 5$('body').attr('data-portal-url',window.location.origin);$('body').attr('data-base-url',window.location.href)}); 6function refreshPortlet(hash,_options){var options={data:{},success: function(){},error: function(){},ajaxOptions:{}};$.extend(options,_options);options.data.portlethash=hash;var ajaxOptions=options.ajaxOptions;ajaxOptions.url=$('body').attr('data-base-url')+'/@@render-portlet';ajaxOptions.success=function(data){var container=$('[data-portlethash="'+hash+'"]');var portlet=$(data);container.html(portlet);options.success(data,portlet)};ajaxOptions.error=function(){options.error()};ajaxOptions.data=options.data;$.ajax(ajaxOptions)} 7function applyPortletTimeout(portlet){var timeout=portlet.data('timeout');if(timeout==undefined){timeout=30}else{timeout=parseInt(timeout)} 8timeout=timeout * 1000;setTimeout($.proxy(function(){refreshPortlet(this.parents('.portletWrapper').data('portlethash'),{success: function(data,portlet){apply_timeout(portlet)}})},portlet),timeout)} 9$(document).ready(function(){var spinner=$('<div id="ajax-spinner"><img src="'+portal_url+'/spinner.gif" alt=""/></div>');spinner.appendTo('body').hide();$(document).ajaxStart(function(){spinner.show()});$(document).ajaxStop(function(){spinner.hide()});$('body').delegate('#calendar-next,#calendar-previous','click', function(e){e.preventDefault();var el=$(this);var container=el.parents('.portletWrapper');refreshPortlet(container.data('portlethash'),{data:{month:el.data('month'),year:el.data('year')}});return false});$('.kssPortletRefresh,.refreshPortlet').each(function(){applyPortletTimeout($(this))});$('.portlet-deferred').each(function(){refreshPortlet($(this).parents('.portletWrapper').data('portlethash'))}); 10function updateSharing(data){var sharing=data.body;var messages=$(data.messages).filter(function(){return $('#kss-portal-message')});$('.portalMessage').remove();$('#user-group-sharing').replaceWith(sharing);$('#content').prepend(messages);$('.barra-carregando').hide()} 11$('#content-core').delegate('#sharing-search-button','click', function(){$.ajax({url:$('body').attr('data-base-url')+'/@@updateSharingInfo',data:{search_term:$('#sharing-user-group-search').val(),'form.button.Search':'Search'},type:'GET',dataType:'json',beforeSend: function(){$('.barra-carregando').show()},success:updateSharing});return false});$('#content-core').delegate('#sharing-save-button','click', function(){var btn=$(this);var form=btn.parents('form');var data=form.serializeArray();data.push({name:'form.button.Save',value:'Save'});$.ajax({url:$('body').attr('data-base-url')+'/@@updateSharingInfo',data:data,type:'POST',dataType:'json',beforeSend: function(){$('.barra-carregando').show()},success:updateSharing});return false});$(".template-atct_edit.portaltype-news-item input#title").attr("maxlength",120)})})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.