<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>[icon:skin/default/toolbar/setting.png]扩展管理</title>
<link rel="stylesheet" href="mz://system/css/common.css" type="text/css" />
<link rel="stylesheet" href="mz://system/css/page.css" type="text/css" />
<link rel="stylesheet" href="mz://system/css/jquery.cluetip.css" type="text/css" />
<!--{hook ext_css}-->
</head>

<body>
<style type="text/css">
.input_field{width:98%;color:#888}
.input_field div{width:60%;float:left;display:block;padding:3px 5px;}
.input_field .th_field{width:30%; line-height:26px;text-align:right;}
.input_field div p,.input_field div em{font-size:12px;}
.input_field div .input{border-color:#CCC} 
.input_field div em{display:none; font-style:normal;color:red}
.input_error div .input{border-color:red} 
</style>
<!--{template ../include/ie6.htm}-->
<!--{hook ext_top}-->
<div class="wrap_bg"></div>
<div class="wrap_box">
	<div class="tab_box" id="tab_box">
    	<a href="#local" data-id="ext_local" class="active">本地扩展</a>
    	<a href="#server" data-id="ext_server">寻找新扩展</a>
    	<a href="#ext_site" data-id="ext_site">添加站点</a>
    	<a href="#ext_set" data-id="ext_set">设置</a>
    	<!--a href="#ext_plugin" data-id="ext_plugin">添加扩展</a-->
    	<div class="tab_option t_r">
			<a href="javascript:void 0" id="import_ext" style="float:right">导入本地扩展</a>
        </div>
    </div>
    <div class="clear"></div>
    <div class="table_box hidden" id="ext_local">
		<div id="local_list">
			<div class="tip tip_loading" id="tip_local">正在努力加载本地扩展.... <a href="#" _click="refreshSearch">重新载入</a></div>
			<span id="local_div">
			
			</span>
		</div>
		<div id="edit_local" class="hidden">
			<div class="tip" id="tip_local_edit"></div>
			<div class="input_field">
				<Textarea class="ipt" style="width:95%;height:250px;line-height:1.5;border:1px solid #CCC;margin:0 0 0 20px" id="manifest_edit"></Textarea>
			</div>
			<div class="input_field">
				<div class="th_field">&nbsp;</div>
				<div>
					<a href="javascript:void 0" class="action_btn" id="edit_back">返回</a>
					<a href="javascript:void 0" class="action_btn green" id="edit_save">保存</a>
				</div>
			</div>
		</div>
    </div>
    <div class="top_wrap table_box hidden" id="ext_server">
    </div>
    <div class="top_wrap hidden" id="ext_site">
		<div class="tip" id="tip_ext_site">请按照输入框下方提示输入需要的字段。</div>
		<div id="site_step1">
			<div class="input_field">
				<div class="th_field">信息页地址：</div>
				<div><input type="text" class="input" name="infoUrl" data-validate="^(http.+|)$" />
					<p>随意输入该网站只有小说信息（有目录链接）的地址，若没有可以不填(<a href="http://www.7kankan.com/files/article/info/25/25887.htm" target="_blank">打开示例</a>)</p>
					<em>请输入正确的信息页地址</em>
				</div>
			</div>
			<div class="input_field">
				<div class="th_field">目录页地址：</div>
				<div><input type="text" class="input" name="listUrl" data-validate="url" value="http://www.7kankan.com/files/article/html/25/25887/index.html" />
					<p><font color="red">*必须</font>，随意输入该网站的目录地址，一定要填(<a href="http://www.7kankan.com/files/article/html/25/25887/index.html" target="_blank">打开示例</a>)</p>
					<em>请输入正确的目录页地址</em>
				</div>
			</div>
			<div class="input_field">
				<div class="th_field">章节地址：</div>
				<div><input type="text" class="input" name="chapterUrl" data-validate="^(http.+|)$" value="http://www.7kankan.com/files/article/html/25/25887/4813215.html" />
					<p>随意输入该网站的章节地址，填了可以更准确地提取章节(<a href="http://www.7kankan.com/files/article/html/25/25887/4813215.html" target="_blank">打开示例</a>)</p>
					<em>请输入正确的章节页地址</em>
				</div>
			</div>
			<div class="input_field">
				<div class="th_field">站点名称：</div>
				<div><input type="text" class="input" name="title" data-validate="^.+$" />
					<p>在小说后显示出来的站点名称，例：<a>晋江文学</a></p>
					<em>请输入正确 的站点名称</em>
				</div>
			</div>
			<div class="input_field">
				<div class="th_field">开发者名称：</div>
				<div><input type="text" class="input" name="author" data-validate=".*?" />
					<p>开发者的昵称</p>
					<em>请输入正确的昵称</em>
				</div>
			</div>
			<div class="input_field">
				<div class="th_field">版本号：</div>
				<div><input type="text" class="input" name="version" data-validate="^\d+$" />
					<p>每次更新请更新版本号，例：1</p>
					<em>请输入正确的版本号:x.x</em>
				</div>
			</div>
			<!--div class="hidden" id="site_edit">
				<div class="input_field">
					<div class="th_field">域名：</div>
					<div><input type="text" class="input" name="domain" data-validate="^[\w-\.;]+$" />
						<p>若有多个域名，请用 ; 隔开，例：qq.com;sina.com</p>
						<em>请输入正确的域名</em>
					</div>
				</div>
				<div class="input_field">
					<div class="th_field">目录名：</div>
					<div><input type="text" class="input" name="oldname" data-validate="^\w+$" />
						<p>保存的在data/user_extension的目录名</p>
						<em>请输入正确的目录名</em>
					</div>
				</div>
			</div-->
			<!--div class="input_field">
				<div class="th_field">&nbsp;</div>
				<div>
					<a href="#">更多选项</a>
				</div>
			</div-->
		</div>
		<div id="site_step2" class="hidden">
			<div class="input_field">
				<Textarea class="ipt" style="width:95%;height:250px;line-height:1.5;border:1px solid #CCC;margin:0 0 0 20px" id="manifest_xml"></Textarea>
			</div>
			<div class="input_field">
				<div class="th_field">扩展将保存在：</div>
				<div>
					<a href="javascript:void 0" id="ext_savedir"></a>
				</div>
			</div>
			
			<div class="clear"></div>
			<div class="input_field">
				<div class="th_field">&nbsp;</div>
				<div>
					<a href="#">更多有关站点选项的说明</a>
				</div>
			</div>
		</div>
		<div class="input_field">
			<div class="th_field">&nbsp;</div>
			<div>
				<a href="javascript:void 0" class="action_btn" id="site_test">测试取得目录</a>
				<a href="javascript:void 0" class="action_btn hidden" id="site_prev_step">上一步</a>
				<a href="javascript:void 0" class="action_btn green" id="site_next_step">下一步</a>
			</div>
		</div>
		<div>
			<Textarea class="ipt" style="width:98%;height:250px;line-height:14px;border:1px solid #CCC;display:none" id="testlog"></Textarea>
		</div>
		
    </div>
	
	
	
    <div class="top_wrap hidden" id="ext_set">
		<div class="tip" id="tip_ext_site">本功能用于导出加密扩展时压缩js和css，<a href="http://www.imozhua.com/-ext-compress">更多详情请看这里</a></div>
		<div class="input_field">
			<div class="th_field">压缩js：</div>
			<div><input type="text" class="input input-save" name="minjs" />
				<p>%file%为js文件,例：<strong>./tools/ajaxmin.exe -comments:none -h %file% -o %file%</strong></p>
				<em></em>
			</div>
		</div>
		
		<div class="input_field">
			<div class="th_field">压缩css：</div>
			<div><input type="text" class="input input-save" name="mincss" />
				<p>%file%为css文件,例：<strong>./tools/ajaxmin.exe -CSS -clobber %file% -o %file%</strong></p>
				<em></em>
			</div>
		</div>
		<div class="input_field">
			<div class="th_field">压缩html：</div>
			<div><input type="checkbox" class="input checkbox-save" name="minhtml" />
				<p>打钩后会自动压缩html</p>
				<em></em>
			</div>
		</div>
		<div class="input_field">
			<div class="th_field">&nbsp;</div>
			<div>
				<a href="javascript:void 0" class="action_btn" id="save_ext_set">保存</a>
				<span class="red" id="set_msg"></span>
			</div>
		</div>
    </div>
	
    <div class="clear"></div>
    <div class="top_wrap hidden" id="ext_plugin">
		<div class="tip" id="tip_local">编写扩展稍后开放</div>
	</div>
    <div class="top_wrap hidden" id="ext_server">
	</div>
</div>
<Script type="mz/tpl" id="tpl_local">
<div id="ext_<%=id%>">
<li class="c1">
	<a href="javascript:void 0" data-url="<%=index%>" _click="tabopen" data-ext="<%=name%>" title="<%=title%>"><%=title%></a>
	<span class="gray f12">v<%=version%></span> 
</li>
<li class="c2">
	<span class="gray updatenum"><%=author%></span>
</li>
<li class="c3 t_c">
	<a class="autohidden"><%=external.timestamp('yyyy-mm-dd', time)%></a> &nbsp;&nbsp;
</li>
<li class="c4 t_c">
	<div class="action_btn green" data-menu="<%=name%>" data-id="<%=id%>">选项</div>
	<div class="action_btn" data-delete="<%=name%>" data-id="<%=id%>">删除</div>
</li>
<div class="clear"></div>
</div>
</script>
<script type="mz/tpl" id="tpl_header">
<ul>
	<li class="c1 f_b"><span>扩展名称</span></li>
	<li class="c2 f_b"><span>作者</span></li>
	<li class="c3 f_b t_c"><span>更新时间</span></li>
	<li class="c4 f_b t_c"><span>操作</span></li>
</ul>
</script>
<script type="mz/tpl" id="tpl_empty">
<div class="errortip">
	<p class="">空空如也，您还没有安装任何扩展~ 点击 “寻找新扩展” 查看所有扩展、或者点击 “导入扩展” 安装新扩展。</p>
</div>
</script>

<script type="mz/tpl" id="tpl_siteconfig">
<?xml version="1.0"?>
#br#
<manifest title="<%=title%>" author="<%=author%>" name="<%=domain%>" type="site" version="<%=version%>" icon16="" icon72="" desc="" url="" domain=";<%=domain%>;">
#br#
	<url_info><![CDATA[<%=infoUrl%>]]></url_info>
#br#
	<url_list><![CDATA[<%=listUrl%>]]></url_list>
#br#
	<pat_url_replace><![CDATA[]]></pat_url_replace>
#br#
	<url_chapter><![CDATA[<%=chapterUrl%>]]></url_chapter>
#br#
	<pat_url_content_replace><![CDATA[]]></pat_url_content_replace>
#br#
	<pat_info><![CDATA[]]></pat_info>
#br#
	<pat_title><![CDATA[]]></pat_title>
#br#
	<pat_author><![CDATA[]]></pat_author>
#br#
	<pat_desc><![CDATA[]]></pat_desc>
#br#
	<pat_img><![CDATA[]]></pat_img>
#br#
	<pat_content><![CDATA[]]></pat_content>
#br#
	<pat_nextpage><![CDATA[]]></pat_nextpage>
#br#
	<url_search><![CDATA[]]></url_search>
#br#
	<pat_search><![CDATA[]]></pat_search>
#br#
	<pat_search_replace><![CDATA[]]></pat_search_replace>
#br#
	<pat_search_nextpage><![CDATA[]]></pat_search_nextpage>
#br#
	<script_extra><![CDATA[]]></script_extra>
#br#
</manifest>
</script>

<script type="text/javascript" src="mz://lib/jquery.js"></script>
<script type="text/javascript" src="mz://lib/underscore.js"></script>
<script type="text/javascript" src="mz://lib/jquery.cluetip.js"></script>
<script type="text/javascript" src="mz://lib/jquery.mztab.js"></script>
<script type="text/javascript" src="mz://lib/jquery.mzform.js"></script>
<script type="text/javascript" src="mz://lib/jquery.artDialog.js?skin=chrome"></script>
<script type="text/javascript" src="mz://lib/mozhua.js"></script>
<script type="text/javascript" src="mz://lib/ext.func.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	__log('page_view', 'ext', 'index');
});
</script>
<!--{hook ext_end}-->
</body>
</html>
