Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1753 from woocommerce/release-2-7-2
Browse files Browse the repository at this point in the history
Release 2 7 2
  • Loading branch information
jeffikus authored Mar 7, 2019
2 parents d04ac5a + 9ec6d3b commit 690832b
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 25 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Gitter chat](https://badges.gitter.im/woothemes/FlexSlider.png)](https://gitter.im/woothemes/FlexSlider)

# FlexSlider 2.7.1
# FlexSlider 2.7.2
http://www.woocommerce.com/flexslider/ - Copyright (c) 2015 WooThemes

## Releases
Expand All @@ -19,6 +19,10 @@ To keep up to date with how FlexSlider's development roadmap looks, please see o

## Updates

** Version 2.7.2 **

** Refactor jQuery HTML output for img attributes.

** Version 2.7.1 **

** RTL fixes for Firefox browser.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flexslider",
"version": "2.7.1",
"version": "2.7.2",
"homepage": "https://github.com/woocommerce/FlexSlider",
"authors": [
"Automattic <[email protected]>"
Expand Down
5 changes: 4 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ FLEXSLIDER CHANGELOG

2018.06.15 - Version 2.7.1
* Firefox RTL fixes.
* Adds "isFirefox" param.
* Adds "isFirefox" param.

2019.03.07 - Version 2.7.2
* Refactor jQuery HTML output for img attributes.
2 changes: 1 addition & 1 deletion demo/css/flexslider-rtl-min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
2 changes: 1 addition & 1 deletion demo/css/flexslider-rtl.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
2 changes: 1 addition & 1 deletion demo/css/flexslider.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
32 changes: 26 additions & 6 deletions demo/js/jquery.flexslider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* Copyright 2012 WooThemes
* Contributing Author: Tyler Smith
*/
Expand Down Expand Up @@ -236,15 +236,35 @@
if (slider.pagingCount > 1) {
for (var i = 0; i < slider.pagingCount; i++) {
slide = slider.slides.eq(i);
if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
var altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';

if ( undefined === slide.attr( 'data-thumb-alt' ) ) {
slide.attr( 'data-thumb-alt', '' );
}

item = $( '<a></a>' ).attr( 'href', '#' ).text( j );
if ( slider.vars.controlNav === "thumbnails" ) {
item = $( '<img/>' ).attr( 'src', slide.attr( 'data-thumb' ) );
}

if ( '' !== slide.attr( 'data-thumb-alt' ) ) {
item.attr( 'alt', slide.attr( 'data-thumb-alt' ) );
}

if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
var captn = slide.attr( 'data-thumbcaption' );
if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
if ( '' !== captn && undefined !== captn ) {
var caption = $('<span></span>' ).addClass( namespace + 'caption' ).text( captn );
item.append( caption );
}
}
slider.controlNavScaffold.append('<li>' + item + '</li>');

var liElement = $( '<li>' );
item.appendTo( liElement );
liElement.append( '</li>' );

slider.controlNavScaffold.append(liElement);
j++;

}
}

Expand Down
2 changes: 1 addition & 1 deletion flexslider-rtl-min.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
2 changes: 1 addition & 1 deletion flexslider-rtl.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
2 changes: 1 addition & 1 deletion flexslider.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
2 changes: 1 addition & 1 deletion flexslider.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* https://www.woocommerce.com/flexslider/
*
* Copyright 2012 WooThemes
Expand Down
4 changes: 2 additions & 2 deletions jquery.flexslider-min.js

Large diffs are not rendered by default.

32 changes: 26 additions & 6 deletions jquery.flexslider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery FlexSlider v2.7.1
* jQuery FlexSlider v2.7.2
* Copyright 2012 WooThemes
* Contributing Author: Tyler Smith
*/
Expand Down Expand Up @@ -236,15 +236,35 @@
if (slider.pagingCount > 1) {
for (var i = 0; i < slider.pagingCount; i++) {
slide = slider.slides.eq(i);
if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
var altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';

if ( undefined === slide.attr( 'data-thumb-alt' ) ) {
slide.attr( 'data-thumb-alt', '' );
}

item = $( '<a></a>' ).attr( 'href', '#' ).text( j );
if ( slider.vars.controlNav === "thumbnails" ) {
item = $( '<img/>' ).attr( 'src', slide.attr( 'data-thumb' ) );
}

if ( '' !== slide.attr( 'data-thumb-alt' ) ) {
item.attr( 'alt', slide.attr( 'data-thumb-alt' ) );
}

if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
var captn = slide.attr( 'data-thumbcaption' );
if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
if ( '' !== captn && undefined !== captn ) {
var caption = $('<span></span>' ).addClass( namespace + 'caption' ).text( captn );
item.append( caption );
}
}
slider.controlNavScaffold.append('<li>' + item + '</li>');

var liElement = $( '<li>' );
item.appendTo( liElement );
liElement.append( '</li>' );

slider.controlNavScaffold.append(liElement);
j++;

}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flexslider",
"version": "2.7.1",
"version": "2.7.2",
"description": "An awesome, fully responsive jQuery slider toolkit.",
"main": "jquery.flexslider.js",
"scripts": {
Expand Down

0 comments on commit 690832b

Please sign in to comment.