<%
var currCard = DATA.cards[ DATA.lastShowCardID ];
var lastTs = DATA.ts-86400*7;
%>
<div class="pop-over" id="memberlist">
	<div class="header">
		<!--<a class="back-btn js-back-view headbtn_left" href="#"><i class="fa fa-chevron-left"></i></a>-->
		<span class="header-title">成员</span>
		<a class="headbtn_right close_memberlist"><i class="fa fa-close"></i></a>
	</div>
	<div class="popcontent" style="height: 360px;">
		<input type="text" placeholder="输入关键词筛选" class="memberlist_input"></input>

		<ul class="pop-over-list js-card-member-list" style=" height:290px;overflow-y: auto;color:#4d4d4d;">


			<%
				var order = getMemberOrder();
				for(var uid in data){
					data[uid]['_clientOrder'] = order[uid] || 0;
				}
				var values = [];
				for(var uid in data){
					if(data[uid]['lastlogin'] > lastTs){
						values.push( data[uid] );
					}
				}

				values.sort(function(a,b){
					return b._clientOrder - a._clientOrder;
				});

				for(var _i=0;_i< values.length;_i++){
					var uid = values[_i]._id;
					var _isSelect = "";
					if(currCard.members.indexOf(uid) != -1){
						_isSelect = true;
					}
			%>

			<li class="memlist_li member_list_<%=uid%>" data-select="<%=_isSelect%>" data-uid="<%=uid%>">
				<span class="full-name"><%=data[uid].profile.fullname%>@<%=data[uid].orgname%><span class="username" style="display:none">(<%=data[uid].username%>)</span></span>
				<%= (_isSelect?'<i class="fa fa-check"></i>':'')%>
			</li>

			<% } %>

		</ul>
	</div>
</div>