PageSourceSearch

https://portal.camaranh.rs.gov.br/pm3/portal_javascripts/Sunburst%…achekey-147613bb2b41c175e187deb55e6b3bf5.js

js camaranh.rs.gov.br collected 2026-10-02 23:40:20 UTC 3,114 bytes, 5 lines download raw bytes

1
2/* - ++resource++collective.polls/js/collective.poll.js - */
3// https://portal.camaranh.rs.gov.br/pm3/portal_javascripts/++resource++collective.polls/js/collective.poll.js?original=1
4!function($){"use strict";var DrawPoll=function(element,options){this.init(element)};DrawPoll.prototype={constructor:DrawPoll,init:function(poll){this.poll=$(poll);this.ajax_submit();this.content_handler=this.get_handler();if(this.content_handler[0]!==undefined){this.type=this.get_type();this.data=this.get_data();this.extra_conf={'width':undefined};switch(this.type){case 'portlet':this.setup_portlet(this.data.type);break;default:this.setup_default(this.data.type)}this.draw(this.data,this.content_handler,this.extra_conf)}},draw:function(data,content_handler,extra_conf){content_handler.polls({width:extra_conf.width,type:data.type,data:data.result_data})},get_data:function(poll){var poll=poll!==undefined?poll:this.poll,raw_results=poll.find('.poll-results'),result={},result_data=[];raw_results.find('li').each(function(i){var li=$(this),data={};data['label']=li.find('.option_description').text();data['data']=li.find('.option_result').text()*1;result_data[i]=data});result['type']=this.get_graph_type(poll);result['result_data']=result_data;raw_results.hide();return result},get_handler:function(poll){var poll=poll!==undefined?poll:this.poll,handler=poll.find('[class*=pollresultholder]');return handler},get_type:function(handler){var handler=handler!==undefined?handler:this.content_handler,re=/\w+(?=pollresultholder)/,match=handler.attr('class').match(re),type=match?match[0]:match;if(type===undefined){type='default'}return type},get_graph_type:function(poll){var poll=poll!==undefined?poll:this.poll,re=/\w+(?=-poll)/,match=poll.attr('class').match(re),type=match?match[0]:match;return type},setup_portlet:function(type){if(type=='pie'){this.content_handler.height(150)}},setup_default:function(type){var width=350;switch(type){case 'pie':this.content_handler.height(200);this.content_handler.width(width);break;case 'bar':width=300;this.content_handler.width(width);break}this.extra_conf['width']=width},ajax_submit:function(){this.poll.submit(function(event){var t=$(this);var p=t.parents('.votePortlet');var url=t.attr('action');var data=t.serialize()+'&ajax_load=True&poll.submit=True';$('.poll-spinner',p).show();t.css({'visibility':'hidden'});$.ajax({url:url,data:data,type:'POST',success:function(html){var manager=''
5if(p[0]!==undefined){manager=p.attr('data-manager')}if(!manager){window.location=window.location}else{var base=p.attr('data-url');if(!base){base='.'}$.ajax({url:base+'/@@poll_portlet_render',data:{'column':manager},success:function(data){p.replaceWith(data);$('.poll-data').drawpoll();$('.spinner',p).hide()}})}}});return false})}};$.fn.drawpoll=function(option){return this.each(function(){var t=$(this),data=t.data('drawpoll'),options=typeof option=='object'&&option;if(!data)t.data('drawpoll',(data=new DrawPoll(this,options)));if(typeof option=='string')data[option]()})};$.fn.drawpoll.Constructor=DrawPoll;$(function(){$('.poll-data, .votePortlet form').drawpoll()})}(window.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.