define(
    [
        'react',
        'react-dom',
        'jquery',
        '../../../widgets.src'
    ],
    function (React, ReactDOM, $, reactjsAdminlte) {
        var HeaderBar = reactjsAdminlte.HeaderBar;
        var NavigationMenu = reactjsAdminlte.NavigationMenu;
        var Timeline = reactjsAdminlte.Timeline;

        var commonFunctions = reactjsAdminlte.commonFunctions;

        var TimelinePage = React.createClass({
            getInitialState: function() {
                return {
                    timelineInfo: []
                }
            },
            componentDidMount: function() {
                var timelineInfo = [
                    {
                        startDate: '17 Mar. 2017',
                        endDate: '17 Mar. 2017',
                        items: [
                            /*{
                                icon: 'fa fa-envelope',
                                iconTheme: 'bg-blue',
                                time: ' 12:05',
                                header: {
                                    url: '#',
                                    title: 'Support Team ',
                                    content: 'sent you an email'
                                },
                                body: {
                                    content: 'Etsy doostang zoodles disqus groupon greplin oooj voxy zoodles, weebly ning heekya handango imeem plugg dopplr jibjab, movity jajah plickers sifteo edmodo ifttt zimbra. Babblely odeo kaboodle quora plaxo ideeli hulu weebly balihoo...',
                                },
                                footer: {
                                    content: '',
                                    markup: [
                                        <a key="1" className="btn btn-primary btn-xs">Read more</a>,
                                        <a key="2" className="btn btn-danger btn-xs">Delete</a>
                                    ]
                                }
                            },*/
                            {
                                icon: 'fa fa-user',
                                iconTheme: 'bg-aqua',
                                time: ' 8:30',
                                header: {
                                    url: '#',
                                    title: '高等数学（1）',
                                    //content: 'accepted your friend request'
                                },
                                body: {
                                    content1: '地点：教学楼A205',
                                    content2: '任课老师：赵冰',
                                    content3: '备注：无'
                                },
                            },
                            {
                                icon: 'fa fa-user',
                                iconTheme: 'bg-aqua',
                                time: ' 10:20',
                                header: {
                                    url: '#',
                                    title: '大学物理（1）',
                                    //content: 'accepted your friend request'
                                },
                                body: {
                                    content1: '地点：教学楼B406',
                                    content2: '任课老师：万浪辉',
                                    content3: '备注：无'
                                },
                            },
                            {
                                icon: 'fa fa-user',
                                iconTheme: 'bg-aqua',
                                time: ' 14:00',
                                header: {
                                    url: '#',
                                    title: '计算机系统（1）',
                                    //content: 'accepted your friend request'
                                },
                                body: {
                                    content1: '地点：教学楼C307',
                                    content2: '任课老师：李志',
                                    content3: '备注：无'
                                },
                            },
                            {
                                icon: 'fa fa-user',
                                iconTheme: 'bg-aqua',
                                time: ' 15:50',
                                header: {
                                    url: '#',
                                    title: '近代史纲要（1）',
                                    //content: 'accepted your friend request'
                                },
                                body: {
                                    content1: '地点：文科楼H3-201',
                                    content2: '任课老师：鲍和平',
                                    content3: '备注：无'
                                },
                            },
                            /*{
                                icon: 'fa fa-comments',
                                iconTheme: 'bg-yellow',
                                time: ' 27 mins ago',
                                header: {
                                    url: '#',
                                    title: 'Jay White ',
                                    content: 'commented on your post'
                                },
                                body: {
                                    content: 'Take me to your leader! Switzerland is small and neutral! We are more like Germany, ambitious and misunderstood!'
                                },
                                footer: {
                                    content: '',
                                    markup: <a className="btn btn-warning btn-flat btn-xs">View comment</a>
                                }
                            }*/
                        ]
                    },{
                        items: [
                            {
                                icon: 'fa fa-camera',
                                iconTheme: 'bg-purple',
                                time: ' 2 days ago',
                                header: {
                                    url: '#',
                                    title: 'Mina Lee ',
                                    content: 'uploaded new photos'
                                },
                                body: {
                                    content: '',
                                    markup: [
                                        <img key="1" src="http://placehold.it/150x100" alt="..." className="margin" />,
                                        <img key="2" src="http://placehold.it/150x100" alt="..." className="margin" />,
                                        <img key="3" src="http://placehold.it/150x100" alt="..." className="margin" />,
                                        <img key="4" src="http://placehold.it/150x100" alt="..." className="margin" />
                                    ]
                                }
                            },
                            {
                                icon: 'fa fa-video-camera',
                                iconTheme: 'bg-maroon',
                                time: ' 5 days ago',
                                header: {
                                    url: '#',
                                    title: 'Mr. Doe ',
                                    content: 'shared a video'
                                },
                                body: {
                                    content: '',
                                    markup: <div className="embed-responsive embed-responsive-16by9">
                                        <iframe className="embed-responsive-item" src="https://www.youtube.com/embed/tMWkeBIohBs" frameBorder="0" allowFullScreen="">
                                        </iframe>
                                    </div>
                                },
                                footer: {
                                    content: '',
                                    markup: <a href="#" className="btn btn-xs bg-maroon">See comments</a>
                                }
                            }
                        ]       
                    }
                ];

                this.setState({
                    timelineInfo: timelineInfo
                });
            },
            render: function() {
                return (
                    <div className="wrapper">
                        <HeaderBar
                            title = '这很深大'
                        />
                        
                        <NavigationMenu />
                        
                        <div className="content-wrapper">
                            <section className="content-header">
                                <h1>
                                    课表
                                    <small></small>
                                </h1>
                                {/*<ol className="breadcrumb">
                                    <li><a href="#"><i className="fa fa-dashboard"></i> Home</a></li>
                                    <li className="active">Dashboard</li>
                                </ol>*/}
                            </section>

                            <section className="content">
                                <div className="row">
                                    <Timeline timelineInfo={this.state.timelineInfo}/>
                                </div>

                            </section>

                        </div>

                        <footer className="main-footer">
                            <div className="pull-right hidden-xs">
                                <b>Version</b> 1.0.0
                            </div>
                            <strong>This project is a derivative of <a href="http://almsaeedstudio.com">Almsaeed Studio</a>.</strong>
                        </footer>

                        {/*<ControlsMenu />*/}
                    </div>
                )
            }
        });

        ReactDOM.render(<TimelinePage />,  document.getElementById('timeline-container'));

        //commonFunctions.initialize().bootstrapTooltips("[data-toggle='tooltip']");
    }
)