<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	// nginx proxy: proxy_set_header 	X-Scheme 	$scheme; 
	String scheme = request.getHeader("X-Scheme");
	if (scheme == null) {
		scheme = request.getScheme();
	}
	int port = request.getServerPort();
	String basePath = scheme + "://" + request.getServerName() + ((port == 80 || port == 443) ? "" : (":" + port)) + path + "/";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<title>控制台-账户中心</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="<%=basePath%>">
<link rel="shortcut icon" href="static/img/icon.png">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css"
	href="static/lib/css/toastr.min.css">
<link rel="stylesheet" type="text/css" href="static/css/console.css" />
<meta name="referrer" content="origin" />
</head>
<body class="home-template">
	<!-- navigation start -->
	<c:set var="module" value="asset" scope="session" />
	<jsp:include page="header.jsp" />
	<!-- navigation end -->

	<!-- main area start -->
	<div class="x-container">
		<div class="container">
			<div class="x-content-wrap clearfix" style="margin: 0 -15px">
				<div class="x-content">
					<!-- tab切换 start-->
					<ul class="nav nav-tabs x-nav-tabs x-navbar-right hidden-xs">
						<li style="margin-left: 30px"><a class="x-editor-trigger"
							href="javascript:void(0);"><i class="fa fa-fw fa-plus-square-o"></i>添加</a></li>
						<c:if test="${fn:length(content) > 4}">
							<li class="dropdown"><a class="dropdown-toggle">更多<i
									class="fa fa-fw fa-angle-double-right"></i></a>
								<ul class="dropdown-menu" style="padding: 15px; width: 240px;">
									<c:forEach items="${content}" var="app" begin="4">
										<li><a data-app-id="${app.uid}">${app.description}</a></li>
									</c:forEach>
								</ul></li>
						</c:if>
						<c:forEach items="${content}" var="app" end="3">
							<li><a data-app-id="${app.uid}">${app.description}</a></li>
						</c:forEach>
						<li class="active"><a>全部</a></li>

						<h2 class="hidden-xs dropdown x-dropdown">
							<span class="dropdown-toggle"><i class="fa fa-list"></i>
								资源</span>
							<div class="dropdown-menu" style="padding: 15px; width: 240px;">
								<form>
									<div class="form-group">
										<div>
											<label>分页设置</label>
										</div>
										<label class="radio-inline"> <input type="radio"
											name="pageSize" value="10" checked> 10
										</label> <label class="radio-inline"> <input type="radio"
											name="pageSize" value="20"> 20
										</label> <label class="radio-inline"> <input type="radio"
											name="pageSize" value="50"> 50
										</label>
									</div>
									<button class="btn btn-default btn-block btn-search"
										type="button">搜索</button>
								</form>
							</div>
						</h2>
					</ul>
					<!-- tab切换 end-->
					<!-- 列表 start -->
					<div class="x-mod x-list x-img-list-wrap">
						<div class="x-mod-body">
							<div class="x-img-list">
								<!-- items -->
							</div>
							<div class="x-empty" style="display: none">
								<i class="fa fa-coffee"></i>
								<p>
									还没有添加资源！<a class="x-editor-trigger">添加一个</a>吧
								</p>
							</div>
						</div>
						<div class="x-mod-footer">
							<div class="text-center">
								<ul class="pagination pull-right"></ul>
							</div>
						</div>
					</div>
					<!-- 列表 end -->
				</div>
			</div>
		</div>
	</div>
	<!-- main area end -->
	<!-- loading -->
	<div id="loading">
		<div class="x-loading-wrap"></div>
		<div class="x-loading">
			<div></div>
			<div></div>
			<div></div>
		</div>
	</div>
	<script src="static/lib/js/jquery.min.js"></script>
	<script src="static/lib/js/bootstrap.min.js"></script>
	<script src="static/js/upload.js"></script>
	<script src="static/js/base.js"></script>
	<script src="static/js/asset.js"></script>
	<!-- modal -->
	<script type="text/html" id="assetModal">
<div class="modal fade" role="dialog" aria-labelledby="assetModal_title">
	<div class="modal-dialog x-modal-dialog modal-lg" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="assetModal_title">资源</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal x-form" name="assetForm">
					<input type="hidden" name="id">
					<input type="hidden" name="idx">
					<div class="form-group">
						<label class="control-label col-sm-2">指定应用</label> <input
							type="hidden" name="appId" required>
						<div class="col-sm-10 x-listbox" id="apps-box">
							<button type="button" class="btn btn-blank dropdown-toggle"
								data-toggle="dropdown" aria-haspopup="true"
								aria-expanded="false">
								<span class="active">&nbsp;</span> <span class="caret"></span>
							</button>
							<ul class="dropdown-menu">
							</ul>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">背景图片</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="url" required
								placeholder="填写图片链接">
							<div class="help-block">
								还没有图片？<input type="file" id="assetModal_backgroundImage" name="file">
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">背景链接</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="imgLink" required
								placeholder="点击背景图片时，跳转链接">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">背景颜色</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" name="background"
								required>
							<ul class="help-block x-menu">
								<li>用于屏幕适配，一定要与背景图片搭配</li>
								<li>格式例如：<code>#eeeeee</code>、<code>rgba(123,123,123,.5)</code>
								</li>
							</ul>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">文字颜色</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" name="color" required
								placeholder="用于主标题、副标题和按钮的文字及边框颜色">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">文字反色</label>
						<div class="col-sm-5">
							<input type="text" class="form-control" name="reserveColor"
								required placeholder="用于按钮获得焦点时的文字颜色">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">主标题</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="title" required
								placeholder="简单概述，文字加粗、44px">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">副标题</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" name="subTitle" required
								placeholder="简单说明，文字18px">
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-2">按钮</label>
						<div class="col-sm-10">
							<textarea name="btns" rows="4" class="form-control"
								placeholder='输入JSON格式，例如：[{"text": "查看详情","link": "http://www.baidu.com"},{"text": "立即查看","link": "http://www.google.com"}]；或者属性对，例如：查看详情=http://www.baidu.com,立即查看=http://www.google.com'></textarea>
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-blank" data-dismiss="modal">取消</button>
				<button type="button" class="btn btn-blank btn-del">删除</button>
				<button type="button" class="btn btn-default btn-submit">保存</button>
			</div>
		</div>
	</div>
</div>
	</script>
</body>
</html>