Sha256: 7f1d62a7399144a4512e062a69c6a3fcbe4b2944af8097f86010dd6b39936ab3

Contents?: true

Size: 1.7 KB

Versions: 32

Compression:

Stored size: 1.7 KB

Contents

var React = require('react');
var Mui = require('material-ui');
var ChannelCard = require('./ChannelCard');

var ChannelsCatalogue = React.createClass({

    handleSelectedChannel: function(ch) {
        this.props.onSelectedChannel(ch);
    },

    handleStyleRespectiveChannel: function() {
        var selected = this.props.selectedChannel;
        for(ref in this.refs) {
            console.log(ref, selected);
            if(this.refs[ref].props.id===selected.id) {
                console.log(selected.imgNode);
                break;
            }
        }
    },

    render: function() {

        var channels = [];
        var chs = this.props.channels;
        var keys = Object.keys(chs).sort();
        for(var i = 0; i < keys.length; i++) {
            var key = keys[i];

            // set respective selected channel in channels list
            var respectiveSelected = null;
            if(this.props.selectedChannel && key===this.props.selectedChannel.id) {
                respectiveSelected = true;
            }

            channels.push(<ChannelCard
                id={key}
                key={key}
                channelData={chs[key]}
                channelId={key}
                currentSelectedChannel={this.props.selectedChannel}
                respectiveSelected={respectiveSelected}
                onSelectedChannel={this.handleSelectedChannel} />
            );
        }

        var backgroundMessage = null; //TODO

        return (
            <div className='content-div'>

                {backgroundMessage}

                <div className="grid" ref='gridRef' >
                    {channels}
                </div>
            </div>
        )
    }

});

module.exports = ChannelsCatalogue;

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
nutella_framework-0.6.12 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.11 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.10 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.9 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.8 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.7 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.6 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.5 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.4 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.3 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.2 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.1 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.6.0 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.5.1 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.5.0 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.4.32 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.4.31 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.4.30 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.4.29 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js
nutella_framework-0.4.28 framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js