import * as React from "react"; import * as ReactDOM from "react-dom"; import "es6-promise"; import {Table, Button} from "react-bootstrap"; import {AsyncAjax} from "../../../Shared/AsyncAjax"; declare var smartformsrecordingparams:any; class SettingsApp extends React.Component{ constructor(){ super(); this.OnClick=this.OnClick.bind(this); this.state={ Saving:false, SelectedValue:smartformsrecordingparams.currentSchedule, Seconds:smartformsrecordingparams.seconds }; } render(){ console.log('rendering'); return(
Delete old records
Ignore recordings smaller than {this.setState({Seconds:e.target.value})}}/> Seconds
); } public async OnClick(){ this.setState({Saving:true}); let result=await AsyncAjax.Post( { 'action':'rednao_ssr_update_schedule', 'schedule':this.state.SelectedValue, 'seconds':this.state.Seconds }); if(result.success=='y') alert('Changes applied successfully'); this.setState({Saving:false}); } /* async DeleteRecords(event:any){ this.setState({IsDeleting:true}); let result:any=await AsyncAjax.Post({'action':'rednao_ssr_delete_recordings','type':event}); this.setState({IsDeleting:false}); this.playerList.Refresh(); } componentDidMount(): void { jQuery('#ssrLoadingScreen').velocity({opacity:0},300,'easeInExp',()=>{jQuery('#ssrLoadingScreen').remove();}) }*/ } interface SettingsAppState{ Saving:boolean, SelectedValue:any, Seconds:string } jQuery(()=> { ReactDOM.render(, document.getElementById('srfwp-settings')); }); // //