Plugin Directory

Changeset 1443219


Ignore:
Timestamp:
06/25/2016 12:48:47 AM (10 years ago)
Author:
r0bsc0tt
Message:

make javascript for shortcode have conditonal height and width

Location:
eazy-flickity-slider/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • eazy-flickity-slider/trunk/eazy_flickity_slider.php

    r1442528 r1443219  
    44Plugin URI: http://robjscott.com/wordpress/
    55Description:  Easily create slides to use with responsive sliders. Add them to page or post. Displays them using flickity.js by metafizzy. 
    6 Version: 1.2.0
     6Version: 1.2.1
    77Author: Rob Scott, LLC
    88Author URI: http://robjscott.com
     
    3434  wp_enqueue_style( 'eazy-flickity-slider',  EZ_FLICKITY_ELEMENTS_URL  . 'resources/css/style.css' );
    3535  wp_enqueue_script('flickity',  EZ_FLICKITY_ELEMENTS_URL  . 'resources/js/flickity.pkgd.min.js', array('jquery'), false, true );
     36  wp_enqueue_script('flickity-shortcode',  EZ_FLICKITY_ELEMENTS_URL  . 'resources/js/flickity.shortcode.js', array('jquery'), false, true );
    3637  if (is_front_page() && function_exists('eazy_flickity_slider_homepage')) {
    3738  wp_enqueue_script('flickity-homepage',  EZ_FLICKITY_ELEMENTS_URL  . 'resources/js/flickity.homepage.js', array('jquery'), false, true );
    3839  }
    39   wp_enqueue_script('flickity-shortcode',  EZ_FLICKITY_ELEMENTS_URL  . 'resources/js/flickity.shortcode.js', array('jquery'), false, true );
    4040}
  • eazy-flickity-slider/trunk/readme.txt

    r1442528 r1443219  
    4646
    4747== Changelog ==
     48= 1.2.1 =
     49*Update flickity.shortcode.dimensions.js to make height and width conditional
     50
    4851= 1.2.0 =
    4952*Update shortcode function to declare width and height of shortcode
  • eazy-flickity-slider/trunk/resources/js/flickity.shortcode.dimensions.js

    r1426188 r1443219  
    55 * Licensed GPLv3 for open source use
    66 */
    7 if (eazyoptions != null) {
    8 var changeSliderSize = document.getElementById('slider-' + eazyoptions[0].sliderid);
    9 changeSliderSize.style.maxWidth = eazyoptions[0].width;
    10 changeSliderSize.style.maxHeight = eazyoptions[0].height;
     7
     8if (eazyoptions !== null) {
     9  var changeSliderSize = document.getElementById('slider-' + eazyoptions[0].sliderid);
     10  if (typeof eazyoptions[0]['width'] !== 'undefined') {
     11    changeSliderSize.style.maxWidth = eazyoptions[0].width;
     12  }
     13  if (typeof eazyoptions[0]['height'] !== 'undefined') {
     14    changeSliderSize.style.maxHeight = eazyoptions[0].height;
     15  }
    1116}
Note: See TracChangeset for help on using the changeset viewer.