import React, { Component, PropTypes } from 'react'; import styles from './styles.scss'; import Button from '/imports/ui/components/button/component'; import { callServer } from '/imports/ui/services/api/index.js'; import classNames from 'classnames'; import { FormattedMessage } from 'react-intl'; export default class SlideControls extends Component { constructor(props) { super(props); this.state = { sliderValue: 100 }; this.nextSlide = this.nextSlide.bind(this); this.previousSlide = this.previousSlide.bind(this); this.skipToSlide = this.skipToSlide.bind(this); this.clickHandler = this.clickHandler.bind(this); this.handleValuesChange = this.handleValuesChange.bind(this); } handleValuesChange(event) { this.setState({ sliderValue: event.target.value }); } // Change to the next slide nextSlide() { const currentSlideNum = this.props.currentSlideNum; if (this.nextSlideAvailable()) { callServer('publishSwitchToXSlideMessage', currentSlideNum + 1); } } nextSlideAvailable() { const currentSlideNum = this.props.currentSlideNum; let nextSlideAvailable = true; if (currentSlideNum == this.props.numberOfSlides) { nextSlideAvailable = false; } return nextSlideAvailable; } // Change to the previous slide previousSlide() { const currentSlideNum = this.props.currentSlideNum; if (this.prevSlideAvailable()) { callServer('publishSwitchToXSlideMessage', currentSlideNum - 1); } } prevSlideAvailable() { const currentSlideNum = this.props.currentSlideNum; let prevSlideAvailable = true; if (currentSlideNum == 1) { prevSlideAvailable = false; } return prevSlideAvailable; } // Change to a specific slide (using dropdown menu) skipToSlide(event) { const requestedSlideNum = event.target.value; callServer('publishSwitchToXSlideMessage', requestedSlideNum); } clickHandler(buttonComponent) { console.log('SlideControls::clickHandler()'); } renderSkipSlideOpts(numberOfSlides) { // Fill drop down menu with all the slides in presentation let optionList = []; for (i = 1; i <= numberOfSlides; i++) { optionList.push( ); } return optionList; } render() { const { currentSlideNum, numberOfSlides, } = this.props; return (
{this.renderAriaLabelsDescs()} {/*Previous Slide button*/}
); } renderAriaLabelsDescs() { return (
{/*Previous Slide button aria*/}

{/*Next Slide button aria*/}

{/*Skip Slide drop down aria*/}

{/*Fit to width button aria*/}

{/*Fit to screen button aria*/}

{/*Zoom slider aria*/}

); } }