<ion-view view-title="权限设置">
    <ion-nav-buttons style="border:none" side="right">
        <button class="button button-icon ion-ios-more" ng-if="isshowdelete.showDelete!=true && !loading" ng-click="popover.show($event)"></button>
        <button class="button button-clear" ng-if="isshowdelete.showDelete && !loading" ng-click="ok();">完成</button>
    </ion-nav-buttons>
    <ion-content>
        <div class="item item-divider dividercolor">允许发通知的成员</div>
        <div ng-show="loading" class="center init-load action-sheet-backdrop">
            <ion-spinner icon="android"></ion-spinner>
        </div>
        <ion-list ng-if="!loading">
            <ion-item class="rj-contacts-item">
                <div ng-repeat="result in resultdata  track by $index">
                    <div class="rj-contacts-index-bar item-remove-animate" id="index_{{result.sortchar}}">{{result.sortchar}}</div>
                    <ion-list class="rj-list item-icon-right">
                        <ion-item class="rj-item item-remove-animate" ng-repeat="person in result.persons track by $index">
                            <div class="rj-contacts-pic">
                                <img src="../../../img/panda.png">
                            </div>
                            <i ng-if="isshowdelete.showDelete" ng-click="removeItem(person.nid,result.sortchar);" class="icon ion-android-remove-circle" style="color:red;"></i>
                            <h2>{{person.username}}</h2>
                        </ion-item>
                    </ion-list>
                </div>
            </ion-item>
            <ion-item class="item-border">
            </ion-item>
        </ion-list>
    </ion-content>
    <div class="rj-contacts-right-bar" rj-position-middle on-drag="contacts_right_bar_swipe($event)">
        <div>&uarr;</div>
        <div>☆</div>
        <div ng-repeat="char in sortchars" ng-click="sortByChar(char,'index_{{char}}')">{{char}}</div>
    </div>
    <div class="rj-contacts-middle-bar" ng-show="Isshowmiddle">
        {{sortchar}}
    </div>
    <script id="templates/add.html" type="text/ng-template">
        <ion-popover-view class="popver_view">
            <ion-content>
                <ion-list>
                    <ion-item class="item item-button" type="item-text-wrap" ng-click="toadd();">添加成员</ion-item>
                    <ion-item class="item item-button" type="item-text-wrap" ng-click="displayremove();">移除成员</ion-item>
                </ion-list>
            </ion-content>
        </ion-popover-view>
    </script>
</ion-view>
