Shape 5

Joomla Templates => EZ Web Hosting - Club => : ajstevens July 27, 2013, 09:08:26 AM



: Making the Slider Circles disappear if there is no text in them [FIXED]
: ajstevens July 27, 2013, 09:08:26 AM
Hi All.

Just wanted to share a nice little addition to the template.  Shape5.com staff, please feel free to add this to the current code, to improve the next templates as they are released.

As it stands, if you leave the text fields empty on the Image and Content Fader module, the large circles still appear, which can get in the way of your images.

I have added a few lines to the javascript to change the CSS opacity depending on the text fields content.  In other words, no text in the field?  Then no cirlces are displayed.

Follow these instructions:

JOOMLA DIRECTORY/modules/mod_s5_image_and_content_fader/js/jd.gallery.js

1. Change line 1161 and 1163 to:
:
var slideInfoZoneTitle = new Fx.Morph(new Element('h2').injectInside(this.slideInfoZone.element)).set({'opacity':0});

var slideInfoZoneDescription = new Fx.Morph(new Element('p').injectInside(this.slideInfoZone.element)).set({'opacity':0});

2. Line 1187 change
:
showInfoSlideShow: function() { ....
to this:
:
showInfoSlideShow: function() {

this.fireEvent('onShowInfopane');

this.slideInfoZone.cancel();

element = this.slideInfoZone.element;

element.getElement('h2').set('html', this.galleryData[this.currentIter].title);

if(this.galleryData[this.currentIter].title){
element.getElement('h2').set('opacity', 1);
};
if(!this.galleryData[this.currentIter].title){
element.getElement('h2').set('opacity', 0);
};

element.getElement('p').set('html', this.galleryData[this.currentIter].description);

if(this.galleryData[this.currentIter].description){
element.getElement('p').set('opacity', 1);
};
if(!this.galleryData[this.currentIter].description){
element.getElement('p').set('opacity', 0);
};

if(this.options.slideInfoZoneSlide)

this.slideInfoZone.start({'opacity': [0, this.options.slideInfoZoneOpacity], 'height': [0, this.slideInfoZone.normalHeight]});

else

this.slideInfoZone.start({'opacity': [0, this.options.slideInfoZoneOpacity]});

if (this.options.showCarousel)

this.slideInfoZone.chain(this.centerCarouselOn.pass(this.currentIter, this));

return this.slideInfoZone;

},


: Re: Making the Slider Circles disappear if there is no text in them [FIXED]
: mikenicoll August 05, 2013, 06:00:24 PM
Hello,

Thanks for the coding addition.

-Mike