Cambios

Busca en cnbGuatemala con Google

2728 bytes añadidos ,  hace 3 años
sin resumen de edición
Línea 1: Línea 1:  +
//collapse default TOC on opening pages
 +
function hideToc() {
 +
  var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
 +
  var toggleLink = document.getElementById('togglelink');
 +
  toc.style.display = 'none';
 +
}
 +
hideToc();
 +
 +
/*table grouping*/
 +
 +
$(function() { 
 +
function groupTable($rows, startIndex, total){
 +
if (total === 0){
 +
return;
 +
}
 +
var i , currentIndex = startIndex, count=1, lst=[];
 +
var tds = $rows.find('td:eq('+ currentIndex +')');
 +
var ctrl = $(tds[0]);
 +
lst.push($rows[0]);
 +
for (i=1;i<=tds.length;i++){
 +
if (ctrl.text() ==  $(tds[i]).text()){
 +
count++;
 +
$(tds[i]).addClass('deleted');
 +
lst.push($rows[i]);
 +
}
 +
else{
 +
if (count>1){
 +
ctrl.attr('rowspan',count);
 +
groupTable($(lst),startIndex+1,total-1)
 +
}
 +
count=1;
 +
lst = [];
 +
ctrl=$(tds[i]);
 +
lst.push($rows[i]);
 +
}
 +
}
 +
}
 +
 +
var cols;
 +
jQuery('.groupTable tr').each(function () {
 +
cols = jQuery(this).children('th, td');
 +
cols.eq(1).detach().insertBefore(cols.eq(0));
 +
});
 +
 +
groupTable($('.groupTable tr:has(td)'),0,1);
 +
$('.groupTable .deleted').remove();
 +
});
 +
 +
 +
/*hide empty table columns*/
 +
( function ( $, mw ) {
 +
$('.highlight-publication').first().css('background-color', '#bdffff');
 +
$('.smwtable tr th').each(function(i) {
 +
    //select all tds in this column
 +
    var tds = $(this).parents('table')
 +
              .find('tr td:nth-child(' + (i + 1) + ')');
 +
        //check if all the cells in this column are empty
 +
        if(tds.length == tds.filter(':empty').length) {
 +
            //hide header
 +
            $(this).hide();
 +
            //hide cells
 +
            tds.hide();
 +
        }
 +
});
 +
 +
} ( jQuery, mediaWiki ) );
 +
 +
 +
( function ( $, mw ) {
 +
 +
'use strict';
 +
 +
mw.guidedTour = mw.guidedTour || {};
 +
 +
/**
 +
* A module for launching guided tours that has no dependencies. This
 +
* stops the *ext.guidedTour.lib* being loaded if it's not needed.
 +
*
 +
* @class mw.guidedTour.launcher
 +
* @singleton
 +
*/
 +
mw.guidedTour.launcher = {
 +
 +
/**
 +
* Loads the *ext.guidedTour.lib* library and launches the
 +
* guided tour.
 +
*
 +
* See the documentation for `mw.guidedTour.launchTour` for
 +
* details of the `tourName` and `tourId` parameters.
 +
*
 +
* @param {string} tourName Name of tour
 +
* @param {string} [tourId='gt-' + tourName + '-' + step] ID of
 +
*  tour and step
 +
* @return {void} Always, regardless of the return value of
 +
*  `mw.guidedTour.launchTour`
 +
*/
 +
launchTour: function ( tourName, tourId ) {
 +
mw.loader.using( 'ext.guidedTour.lib', function () {
 +
mw.guidedTour.launchTour( tourName, tourId );
 +
} );
 +
}
 +
 +
};
 +
 +
} ( jQuery, mediaWiki ) );
 +
 +
 
/*ask users to register*/
 
/*ask users to register*/
 
/*
 
/*
Línea 10: Línea 117:  
*/
 
*/
   −
/*blinking register*/
+
/*blinking + register tour first step*/
   −
if (mw.cookie.get('inicio_tour')!==null && mw.cookie.get('registro_tour')===null && mw.user.isAnon()){
+
$( document ).ready(function() {
 +
    if (mw.cookie.get('inicio_tour')!==null && mw.cookie.get('registro_tour')===null && mw.cookie.get('registroprelude_tour')===null ){
 
$("#pt-createaccount a").prop("href", "http://cnbguatemala.org/index.php?title=Especial:SemanticSignup&tour=registro");
 
$("#pt-createaccount a").prop("href", "http://cnbguatemala.org/index.php?title=Especial:SemanticSignup&tour=registro");
 
for(i=0;i<10;i++) {
 
for(i=0;i<10;i++) {
 
   //$("#pt-createaccount").css({'background-color': 'blue'}, 'slow');
 
   //$("#pt-createaccount").css({'background-color': 'blue'}, 'slow');
 
   //$("#pt-createaccount").css({'background-color': 'red'}, 'slow');
 
   //$("#pt-createaccount").css({'background-color': 'red'}, 'slow');
  $("#pt-createaccount a").fadeTo('slow', 0.5).fadeTo('slow', 1.0);
+
  $("#pt-createaccount a").fadeTo('slow', 0.5).fadeTo('slow', 1.0);  
 
   }  
 
   }  
 +
mw.guidedTour.launcher.launchTour('registroprelude');
 +
//mw.guidedTour.setTourCookie( 'registroprelude');
 
}
 
}
 +
 +
});