<script>

    (function ($) {
        $(document).ready(function () {
            $('#composeProfiles option').each(function (index) {
                if (index == 2) {
                    $(this).html('<img ng-src="/contents/socioboard/images/fb_icon.png">' + $(this).html());
                }
                //if (index == 3 || index == 4)
                //{
                //     $(this).html('<img ng-src="/contents/socioboard/images/Fb_page-icon.png">' + $(this).html());
                //}
                if (index == 3) {
                    $(this).html('<img ng-src="/contents/socioboard/images/Fb_page-icon.png">' + $(this).html());
                }
                if (index == 4) {
                    $(this).html('<img ng-src="/contents/socioboard/images/twticon.png">' + $(this).html());
                }
                if (index == 5) {
                    $(this).html('<img ng-src="/contents/socioboard/images/link_icon.png">' + $(this).html());
                }
                if (index == 6) {
                    $(this).html('<img ng-src="/contents/socioboard/images/link_icon.png">' + $(this).html());
                }
                //$(this).html('<img ng-src="http://jsfiddle.net/img/logo.png">' + $(this).html());
            })
        });
    })(jQuery);
</script>

<style>
    #profile-card {
        min-height: 330px;
    }

    ul.shinh li label {
        font-size: 15px;
        color: #333;
        padding: 0 10px;
        color: #ff4081;
    }

    ul.shinh li:hover {
        background: #e5e5e5;
        color: #ff4081;
        cursor: pointer;
        padding: 0 10px;
    }

    ul.shinh li label input {
        margin-right: 10px;
        height: 20px;
        width: 20px;
        background: transparent !important;
    }

    .iconprofile {
        position: absolute;
        top: 36px;
        z-index: 1;
        left: 44px;
    }
</style>
<div data-ng-controller="CreateGroupShareathonController">
    <!-- Page name -->
    <div class="container">
        <div class="col m12">
            <h4>Create Group Shareathon</h4>
        </div>
    </div>

    <!-- START CONTENT -->
    <section id="content">
        <!-- Compose Email Structure -->
        <div class="row">
            <div class="col offset-s2 s8 offset-m2 m8 offset-l2 l8">
                <div  id="feeds">
                    <h5 class="feeds_title blue darken-4 white-text"><i class="icon-pencil"></i>Create a shareathon through which you can automate your page posts</h5>
                    <div >
                        <div class="row">
                            <form class="col s12">
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController">
                                    <select id="groupshareathonfacebookaccount" ng-model="selected" ng-change="getfacebookgroup(selected)">
                                        <option value="" disabled selected>Choose your option</option>
                                        <option data-image="{{profile.profilePic}}"  ng-repeat="profile in lstProfiles | filter:{profileType:0} | filter:{profileType:'!10'} | filter:{profileType:'!11'} | filter:{profileType:'!13'}" value="{{profile.profileId}}" my-repeat-timeout-groups-directive>  {{profile.profileName}}</option>
                                    </select>
                                    <label>Select an account to fetch groups</label>
                                </div>
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup=='123'">
                                    <span style="color: green;">Please wait we are fetching groups...</span>
                                </div>	
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup!=''">
                                    <select multiple id="facebookgroupid">
                                        <option value="" disabled selected>Choose your option</option>
                                        <option value="{{group.name}}<:>{{group.profileGroupId}}" ng-repeat="group in lstfacebookgroup" my-repeat-timeout-groups-directive>{{group.name}}</option>
                                    </select>
                                    <label>Select Groups To Automate Post</label>
                                </div>

                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup==''">
                                    <span>No Group Found In This Account</span>
                                </div>
                               
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup!=''">
                                    <select id="grouptimerinterval">
                                        <option value="" disabled selected>Choose your option</option>
                                        <option value="20">20 min</option>
                                        <option value="30">30 min</option>
                                        <option value="60">1 hr</option>
                                    </select>
                                    <label>Set Your Time Interval</label>
                                </div>
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup==''">
                                    <select id="grouptimerinterval" disabled>
                                        <option value="" disabled selected>Choose your option</option>
                                        <option value="20">20 min</option>
                                        <option value="30">30 min</option>
                                        <option value="60">1 hr</option>
                                    </select>
                                    <label>Set Your Time Interval</label>
                                </div>
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup!=''">
                                    <input id="postpage_url" type="url" class="validate">
                                    <label for="postpage_url">Enter Page Url Whose Post's You Want To Automate</label>
                                </div>
                                <div class="input-field col s12" ng-controller="CreateGroupShareathonController" ng-if="lstfacebookgroup==''">
                                    <input id="postpage_url" type="url" disabled class="validate">
                                    <label for="postpage_url">Enter Page Url Whose Post's You Want To Automate</label>
                                </div>
                                <div class="col l12 center margin-top-50">
                                    <a ng-show="dispbtn" ng-click="AddGroupShareathon()" class="btn grey darken-4 waves-effect waves-light">post</a>
                                    <a ng-show="!dispbtn"  href="javascript:;" class="btn grey darken-4 waves-effect waves-light">wait</a>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>