Watch, Read, Listen
!function(a){a.fn.datepicker.dates.sk={days:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"],daysShort:["Ned","Pon","Uto","Str","Štv","Pia","Sob"],daysMin:["Ne","Po","Ut","St","Št","Pia","So"],months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Máj","Jún","Júl","Aug","Sep","Okt","Nov","Dec"],today:"Dnes",clear:"Vymazať",weekStart:1,format:"d.m.yyyy"}}(jQuery);jQuery(document).ready(function($){ $( ".fw-accordion" ).accordion({ heightStyle: "content" }); });
/** * Crawler simulation module * @author Hai Zheng */ class CrawlerSimulate extends React.Component { constructor( props ) { super( props ); this.state = { list: props.list }; this.handleInputChange = this.handleInputChange.bind( this ); this.delRow = this.delRow.bind( this ); this.addNew = this.addNew.bind( this ); } handleInputChange( e, index ) { const target = e.target; const value = target.type === 'checkbox' ? target.checked : target.value; const list = this.state.list; list[ index ][ target.dataset.type ] = value; this.setState( { list: list } ); } delRow( index ) { const data = this.state.list; data.splice( index, 1 ); this.setState( { list: data } ); } addNew() { const list = this.state.list; list.push( { name: '', vals: '' } ); this.setState( { list: list } ); } render() { return (
{ this.state.list.map( (item, i) => (
) ) }
{litespeed_data[ 'lang' ][ 'add_cookie_simulation_row' ]}
); } } // { name: '', vals: '' } class SimulationBlock extends React.Component { constructor( props ) { super( props ); this.handleInputChange = this.handleInputChange.bind( this ); this.delRow = this.delRow.bind( this ); } handleInputChange( e ) { this.props.handleInputChange( e, this.props.index ); } delRow() { this.props.delRow( this.props.index ); } render() { const item = this.props.item; return (
{ litespeed_data[ 'lang' ][ 'cookie_name' ] }
{ litespeed_data[ 'lang' ][ 'cookie_values' ] }
</div> <div className="litespeed-col-auto"> <button type="button" className="button button-link litespeed-collection-button litespeed-danger" onClick={this.delRow}> <span className="dashicons dashicons-dismiss"></span> <span className="screen-reader-text">{ litespeed_data[ 'lang' ][ 'remove_cookie_simulation' ] }</span> </button> </div> </div> ); } }