/* Deriva del fichero wp-content/themes/wmes-theme/home-page.php del tema para WordPress */\r
\r
$wgHooks['ParserFirstCallInit'][] = 'efSetupHomepageWMES';\r
+$wgResourceModules['ext.homepage-wmes'] = array(\r
+ 'scripts' => 'home.js',\r
+ 'dependencies' => 'jquery',\r
+ 'localBasePath' => dirname( __FILE__ ) . '/js',\r
+ 'remoteExtPath' => 'HomePageWMES/js'\r
+);\r
\r
function efSetupHomepageWMES(&$parser) {\r
$parser->setHook( 'Portada', 'efHookHomepageWMES' );\r
function efHookHomepageWMES( $input, array $args, Parser $parser, PPFrame $frame ) {\r
global $wgOut;\r
$wgOut->addInlineStyle('h1 { display: none }'); // FIXME\r
+ $wgOut->addModules( 'ext.homepage-wmes' );\r
\r
$html = \r
'<div class="dm_zones clearfix">\r
--- /dev/null
+(function($) {
+
+$.fn.extend({
+ dmWidgetContentLandingboxForm: function(widget)
+ {
+ var $form = this.find('form:first');
+ this.dmWidgetContentBaseMediaForm(widget, {
+ accept: '#dm_media_bar li.file.image'
+ });
+ }
+});
+})(jQuery);
+
+(function($) {
+$(document).ready(function() {
+
+ var position = 0;
+ var img_count = 5;
+ var slideshowItems = $('.slideshow-item');
+ slideshowItems.hide();
+ $('#slideshow-item-0').show();
+ function nextSlide(){
+ var oldItem = $('#slideshow-item-'+position);
+ if (position < img_count -1){
+ position ++;
+ }else{
+ position = 0;
+ }
+ var newItem = $('#slideshow-item-'+position);
+ hideSlide(oldItem);
+ showSlide(newItem);
+ interval();
+ }
+ function showSlide(item){
+ item.fadeIn('slow');
+ }
+ function hideSlide(item){
+ item.hide();
+ }
+ var intervalTimeout = null;
+ function interval()
+ {
+ if (intervalTimeout)
+ {
+ clearTimeout(intervalTimeout);
+ }
+ intervalTimeout = setTimeout(nextSlide, 5 * 700);
+ }
+ interval();
+});
+})(jQuery);
+
+