<%
var card = DATA.cards[ DATA.lastShowCardID ];
var board = DATA.boards[ card.boardId ];
if(!board.qalabels){
	board.qalabels = [];
}
%>
<div class="pop-over" id="addQAlabels">
	<div class="header">
		<a class="back-btn js-back-view headbtn_left qalabelback" style="display: none;"><i class="fa fa-chevron-left"></i></a>
		<span class="header-title">问题类型</span>
		<a class="headbtn_right close_addQAlabels"><i class="fa fa-close"></i></a>
	</div>
	<div class="popcontent">
		<ul class="pop-over-list js-card-label-list chooseLabelUL" style="max-height:290px;overflow-y: auto;">
			<%
				for(var i=0;i<board.qalabels.length;i++){
					var label = board.qalabels[i];
					var _isSelect = false;
					if(card.qalabelIds && card.qalabelIds.indexOf(label._id) != -1){
						_isSelect = true;
					}					
			%>
			
			<li class="qalabel_li card-label-<%=label.color%> card-labelid-<%=label._id%>" data-labelname="<%=label.name%>" data-labelcolor="<%=label.color%>" data-id="<%=label._id%>">
				<span class="full-name"><%=label.name%></span>
				<%= (_isSelect?'<i class="fa fa-check"></i>':'')%>
				
				<span class="fa fa-edit labelEdit" style="float: right; opacity: 0.5;" ></span>
				<!--span class="fa fa-clock-o labelSetTimer" id="labelTimer_<%=label._id%>" style="float: right; opacity: 0.6; margin-right: 10px;" ></span-->
			</li>
			<% } %>
			
			<li class="qalabel_li add_qalabel_li2">
				<span class="full-name">增加标签</span>
				<i class="fa fa-plus" style="float: right; opacity: 0.5;"></i>
			</li>
		</ul>
		
		
		<div class="addLabelUL" style=" display: none;">
			<input type="hidden" placeholder="id" maxlength="4" class="addLabelID">
			<input type="text" placeholder="标签内容" maxlength="4" class="addLabelName">
			<ul class="pop-over-list js-card-label-list" style="max-height:290px;overflow-y: auto;">
				<%
					var colors = ['legugreen','legupurple','legublue','leguyellow','legured','legupink','legugray','leguaqua'];
					for(var i=0;i<colors.length;i++){
				%>
				<li class="add_qalabel_li card-label-<%=colors[i]%>" data-labelcolor="<%=colors[i]%>">
					&nbsp;
					<!--<i class="fa fa-check"></i>-->
				</li>
				<% } %>
			</ul>
			<button class="button addQAlabelbtn" type="button" style="margin: 10px 0;">确定</button>
			<button class="button btn-danger delQAlabelbtn" type="button" style="margin: 10px 0;float: right;">删除</button>
		</div>
	</div>
</div>