70
| <![CDATA[<script language ="JavaScript">
function confirmar(caminho,comando,mensagem) {
if (confirm (mensagem)) {
window.location=caminho + comando;
return true;
} else
window.location=caminho;
//return false;
}
</script>]]>
|
752
| <![CDATA[<script type="text/javascript">
var channelName = 'assembleia006';
$(document).ready(function() {
$.get(
"https://www.googleapis.com/youtube/v3/channels",{
part: 'contentDetails',
forUsername: channelName,
key: 'AIzaSyBBLQuOgl5JY7SIyI7YLSxo_xSL1XrQB08'},
function(data){
$.each(data.items, function(i, item){
console.log(item);
pid = item.contentDetails.relatedPlaylists.uploads
getVids(pid);
})
}
);
function getVids(pid){
$.get(
"https://www.googleapis.com/youtube/v3/playlistItems",{
part: 'snippet',
maxResults: 17,
playlistId: pid,
key: 'AIzaSyBBLQuOgl5JY7SIyI7YLSxo_xSL1XrQB08'},
function(data){
var output;
var cont = 0;
$.each(data.items, function(i, item){
cont++;
if(cont <= 6) {
console.log(item);
videTitle = item.snippet.title;
videoId = item.snippet.resourceId.videoId;
//output = '<li><iframe src=\"//www.youtube.com/embed/'+videoId+'\"></iframe></li>';
output = '<div class=\"col-md-2 col-sm-6 col-xs-12 divv\" style="padding: 0px 2px;\"><iframe class=\"quadroGaleria\" style=\"width:100%\" src=\"//www.youtube.com/embed/'+videoId+'\"></iframe></div>';
$('#anima').append(output);
}
})
}
);
}
});
</script>]]>
|
868
| <![CDATA[<script>window.jQuery || document.write('<script src="bootstrap/assets/js/vendor/jquery.min.js"><\/script>')</script>]]>
|
876
| <![CDATA[<script type="text/javascript">
$(function(){
// Iframe subChamados
$('.mostrarDeputado').click(function(){
var id = $(this).attr('id').substring(2,10);
var valor = 'deputado.php?iddeputado=' + id;
//$('#SpanModalDeputado').html(id);
$('#iframeSub').attr('src',valor);
$('#modalIframe').show();
$('#iframeSub').show();
$('#label').hide();
});
$('#fechar').click(function(){
$('#modalIframe').hide();
});
$('#modalIframe').click(function(){
$('#modalIframe').hide();
});
// Iframe subChamados /
});
// comissoes técnicas
$(function(){
$('#idcomissaotecnica').change(function(){
if( $(this).val() ) {
$('#idcomissaotecnicamembros').hide();
$.getJSON('comissaotecnicamembros.ajax.php?search=',{idcomissaotecnica: $(this).val(), ajax: 'true'}, function(j){
var options = '';
for (var i = 0; i < j.length; i++) {
if(i == 0) {
options += '<table id="sample-table-2" class="table table-striped table-bordered table-hover"><thead><tr><th scope="col">Deputado / Membro</th><th scope="col">Cargo</th></tr></thead><tfoot></tfoot><tbody>';
}
options += '<th scope="row" id="r100">' + j[i].membros + '</th><td>' + j[i].cargo + '</td></tr>';
if(i == j.length - 1) {
options += '</tbody></table>';
}
}
$('#idcomissaotecnicamembros').html(options).show();
});
}
});
});
// comissoes técnicas //
// para modal da galeria de fotos
let modalId = $('#image-gallery');
$(document)
.ready(function () {
loadGallery(true, 'a.thumbnail');
//This function disables buttons when needed
function disableButtons(counter_max, counter_current) {
$('#show-previous-image, #show-next-image')
.show();
if (counter_max === counter_current) {
$('#show-next-image')
.hide();
} else if (counter_current === 1) {
$('#show-previous-image')
.hide();
}
}
/**
*
* @param setIDs Sets IDs when DOM is loaded. If using a PHP counter, set to false.
* @param setClickAttr Sets the attribute for the click handler.
*/
function loadGallery(setIDs, setClickAttr) {
let current_image,
selector,
counter = 0;
$('#show-next-image, #show-previous-image')
.click(function () {
if ($(this)
.attr('id') === 'show-previous-image') {
current_image--;
} else {
current_image++;
}
selector = $('[data-image-id="' + current_image + '"]');
updateGallery(selector);
});
function updateGallery(selector) {
let $sel = selector;
current_image = $sel.data('image-id');
$('#image-gallery-title')
.text($sel.data('title'));
$('#image-gallery-image')
.attr('src', $sel.data('image'));
disableButtons(counter, $sel.data('image-id'));
}
if (setIDs == true) {
$('[data-image-id]')
.each(function () {
counter++;
$(this)
.attr('data-image-id', counter);
});
}
$(setClickAttr)
.on('click', function () {
updateGallery($(this));
});
}
});
// build key actions
$(document)
.keydown(function (e) {
switch (e.which) {
case 37: // left
if ((modalId.data('bs.modal') || {})._isShown && $('#show-previous-image').is(":visible")) {
$('#show-previous-image')
.click();
}
break;
case 39: // right
if ((modalId.data('bs.modal') || {})._isShown && $('#show-next-image').is(":visible")) {
$('#show-next-image')
.click();
}
break;
default:
return; // exit this handler for other keys
}
e.preventDefault(); // prevent the default action (scroll / move caret)
});
// para modal da galeria de fotos /
</script>]]>
|