Commit 6263d8dd authored by 赵啸非's avatar 赵啸非

添加菜单资源配置

parent 6b1de969
...@@ -13,7 +13,7 @@ import lombok.Data; ...@@ -13,7 +13,7 @@ import lombok.Data;
* 菜单信息业务实体对象 * 菜单信息业务实体对象
* *
* @author zxfei * @author zxfei
* @date 2024-09-11 * @date 2024-12-06
*/ */
@Data @Data
public class MenuEntity extends MenuVo { public class MenuEntity extends MenuVo {
...@@ -107,6 +107,10 @@ public class MenuEntity extends MenuVo { ...@@ -107,6 +107,10 @@ public class MenuEntity extends MenuVo {
* 是否隐藏(0.否,1.是) * 是否隐藏(0.否,1.是)
*/ */
private Integer hideChildrenInMenu; private Integer hideChildrenInMenu;
/**
* 资源访问路径,多个逗号分割
*/
private String resourceUrl;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -146,5 +150,6 @@ public class MenuEntity extends MenuVo { ...@@ -146,5 +150,6 @@ public class MenuEntity extends MenuVo {
this.cache = 0; this.cache = 0;
this.activeDir = ""; this.activeDir = "";
this.hideChildrenInMenu = 0; this.hideChildrenInMenu = 0;
this.resourceUrl = "";
} }
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity; ...@@ -6,7 +6,7 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
* 菜单信息业务查询对象 * 菜单信息业务查询对象
* *
* @author zxfei * @author zxfei
* @date 2024-09-11 * @date 2024-12-06
*/ */
public class MenuQuery extends MenuEntity { public class MenuQuery extends MenuEntity {
/** 开始 菜单ID,主键,自增长 */ /** 开始 菜单ID,主键,自增长 */
...@@ -276,6 +276,11 @@ public class MenuQuery extends MenuEntity { ...@@ -276,6 +276,11 @@ public class MenuQuery extends MenuEntity {
/** 是否隐藏(0.否,1.是)排除列表 */ /** 是否隐藏(0.否,1.是)排除列表 */
private List <Integer> hideChildrenInMenuNotList; private List <Integer> hideChildrenInMenuNotList;
/** 资源访问路径,多个逗号分割 */
private List<String> resourceUrlList;
/** 资源访问路径,多个逗号分割排除列表 */
private List <String> resourceUrlNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<MenuQuery> orConditionList; private List<MenuQuery> orConditionList;
...@@ -1785,6 +1790,38 @@ public class MenuQuery extends MenuEntity { ...@@ -1785,6 +1790,38 @@ public class MenuQuery extends MenuEntity {
} }
/**
* 获取 资源访问路径,多个逗号分割
* @return resourceUrlList
*/
public List<String> getResourceUrlList(){
return this.resourceUrlList;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlList
*/
public void setResourceUrlList(List<String> resourceUrlList){
this.resourceUrlList = resourceUrlList;
}
/**
* 获取 资源访问路径,多个逗号分割
* @return resourceUrlNotList
*/
public List<String> getResourceUrlNotList(){
return this.resourceUrlNotList;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlNotList
*/
public void setResourceUrlNotList(List<String> resourceUrlNotList){
this.resourceUrlNotList = resourceUrlNotList;
}
/** /**
* 设置 菜单ID,主键,自增长 * 设置 菜单ID,主键,自增长
* @param id * @param id
...@@ -2717,6 +2754,25 @@ public class MenuQuery extends MenuEntity { ...@@ -2717,6 +2754,25 @@ public class MenuQuery extends MenuEntity {
return this; return this;
} }
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrl
*/
public MenuQuery resourceUrl(String resourceUrl){
setResourceUrl(resourceUrl);
return this;
}
/**
* 设置 资源访问路径,多个逗号分割
* @param resourceUrlList
*/
public MenuQuery resourceUrlList(List<String> resourceUrlList){
this.resourceUrlList = resourceUrlList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -56,6 +56,12 @@ public class MenuTreeSelect implements Serializable { ...@@ -56,6 +56,12 @@ public class MenuTreeSelect implements Serializable {
*/ */
private String perms; private String perms;
/**
* 权限标识,多个逗号分割
*/
private String resourceUrl;
/** /**
* 是否隐藏(0.否,1.是) * 是否隐藏(0.否,1.是)
*/ */
...@@ -81,6 +87,7 @@ public class MenuTreeSelect implements Serializable { ...@@ -81,6 +87,7 @@ public class MenuTreeSelect implements Serializable {
this.menuType = entity.getMenuType(); this.menuType = entity.getMenuType();
this.visible = entity.getVisible(); this.visible = entity.getVisible();
this.perms = entity.getPerms(); this.perms = entity.getPerms();
this.resourceUrl=entity.getResourceUrl();
this.checked=entity.getChecked(); this.checked=entity.getChecked();
this.hideChildrenInMenu = entity.getHideChildrenInMenu(); this.hideChildrenInMenu = entity.getHideChildrenInMenu();
if(!ObjectUtils.isEmpty(entity.getChildren())){ if(!ObjectUtils.isEmpty(entity.getChildren())){
...@@ -99,6 +106,7 @@ public class MenuTreeSelect implements Serializable { ...@@ -99,6 +106,7 @@ public class MenuTreeSelect implements Serializable {
node.setMenuType(jsonObject.getInteger("menuType")); node.setMenuType(jsonObject.getInteger("menuType"));
node.setVisible(jsonObject.getInteger("visible")); node.setVisible(jsonObject.getInteger("visible"));
node.setPerms(jsonObject.getString("perms")); node.setPerms(jsonObject.getString("perms"));
node.setResourceUrl(jsonObject.getString("resourceUrl"));
node.setChecked(jsonObject.getInteger("checked")); node.setChecked(jsonObject.getInteger("checked"));
node.setHideChildrenInMenu(jsonObject.getInteger("hideChildrenInMenu")); node.setHideChildrenInMenu(jsonObject.getInteger("hideChildrenInMenu"));
JSONArray jsonArray = jsonObject.getJSONArray("children"); JSONArray jsonArray = jsonObject.getJSONArray("children");
......
...@@ -18,6 +18,8 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity; ...@@ -18,6 +18,8 @@ import com.mortals.xhx.base.system.menu.model.MenuEntity;
import com.mortals.xhx.base.system.menu.model.MenuQuery; import com.mortals.xhx.base.system.menu.model.MenuQuery;
import com.mortals.xhx.base.system.menu.model.MenuTreeSelect; import com.mortals.xhx.base.system.menu.model.MenuTreeSelect;
import com.mortals.xhx.base.system.menu.service.MenuService; import com.mortals.xhx.base.system.menu.service.MenuService;
import com.mortals.xhx.base.system.resource.model.ResourceEntity;
import com.mortals.xhx.base.system.resource.model.ResourceQuery;
import com.mortals.xhx.base.system.resource.service.ResourceService; import com.mortals.xhx.base.system.resource.service.ResourceService;
import com.mortals.xhx.base.system.role.dao.RoleAuthDao; import com.mortals.xhx.base.system.role.dao.RoleAuthDao;
import com.mortals.xhx.base.system.role.model.RoleAuthEntity; import com.mortals.xhx.base.system.role.model.RoleAuthEntity;
...@@ -115,16 +117,38 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro ...@@ -115,16 +117,38 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
//todo 一个菜单可以对应多个资源 //todo 一个菜单可以对应多个资源
MenuEntity menuEntity = menuService.get(menuId, context); MenuEntity menuEntity = menuService.get(menuId, context);
if(!ObjectUtils.isEmpty(menuEntity)){ if(!ObjectUtils.isEmpty(menuEntity)){
String perms = menuEntity.getPerms(); String resourceUrl = menuEntity.getResourceUrl();
if(!ObjectUtils.isEmpty(perms)){ if(!ObjectUtils.isEmpty(resourceUrl)){
List<String> split = StrUtil.split(perms, ","); List<String> split = StrUtil.split(resourceUrl, ",");
for (String s : split) { for (String s : split) {
RoleAuthEntity entity = new RoleAuthEntity(); RoleAuthEntity entity = new RoleAuthEntity();
entity.setRoleId(roleId); entity.setRoleId(roleId);
entity.setMenuId(menuId); entity.setMenuId(menuId);
entity.setResourceId(DataUtil.converStr2Long(s,0L));
entity.setCreateTime(new Date()); entity.setCreateTime(new Date());
entity.setCreateUserId(1L); entity.setCreateUserId(1L);
//判断资源路径类型 如果是/xxx开头 查询资源是否存在,不存在则创建
if (StrUtil.startWith(s, "/")) {
//根据路径查询资源是否存在
ResourceEntity resourceEntity = resourceService.selectOne(new ResourceQuery().url(s));
if(ObjectUtils.isEmpty(resourceEntity)){
ResourceEntity resource = new ResourceEntity();
resource.initAttrValue();
resource.setName(menuEntity.getName());
resource.setGroupName("菜单自定义");
resource.setUrl(s);
resource.setCreateTime(new Date());
resource.setCreateUserId(1L);
resourceService.save(resource, context);
entity.setResourceId(resource.getId());
}else{
entity.setResourceId(resourceEntity.getId());
}
}else{
//查询下id是否存在 如果存在 添加
ResourceEntity resource = resourceService.get(DataUtil.converStr2Long(s, 0L), context);
if(ObjectUtils.isEmpty(resource)) continue;
entity.setResourceId(resource.getId());
}
list.add(entity); list.add(entity);
} }
}else{ }else{
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
<result property="cache" column="cache" /> <result property="cache" column="cache" />
<result property="activeDir" column="activeDir" /> <result property="activeDir" column="activeDir" />
<result property="hideChildrenInMenu" column="hideChildrenInMenu" /> <result property="hideChildrenInMenu" column="hideChildrenInMenu" />
<result property="resourceUrl" column="resourceUrl" />
</resultMap> </resultMap>
<!-- 表所有列 --> <!-- 表所有列 -->
...@@ -118,23 +119,26 @@ ...@@ -118,23 +119,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hideChildrenInMenu') or colPickMode == 1 and data.containsKey('hideChildrenInMenu')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hideChildrenInMenu') or colPickMode == 1 and data.containsKey('hideChildrenInMenu')))">
a.hideChildrenInMenu, a.hideChildrenInMenu,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('resourceUrl') or colPickMode == 1 and data.containsKey('resourceUrl')))">
a.resourceUrl,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MenuEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_menu insert into mortals_xhx_menu
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu) (name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu,resourceUrl)
VALUES VALUES
(#{name},#{url},#{ancestors},#{parentId},#{linkType},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{component},#{menuType},#{authType},#{visible},#{perms},#{remark},#{orderId},#{status},#{createTime},#{createUserId},#{createUserName},#{updateUserId},#{updateUserName},#{updateTime},#{cache},#{activeDir},#{hideChildrenInMenu}) (#{name},#{url},#{ancestors},#{parentId},#{linkType},#{imgPath},#{buttonImgPath},#{imgCommPath},#{commMenu},#{component},#{menuType},#{authType},#{visible},#{perms},#{remark},#{orderId},#{status},#{createTime},#{createUserId},#{createUserName},#{updateUserId},#{updateUserName},#{updateTime},#{cache},#{activeDir},#{hideChildrenInMenu},#{resourceUrl})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_menu insert into mortals_xhx_menu
(name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu) (name,url,ancestors,parentId,linkType,imgPath,buttonImgPath,imgCommPath,commMenu,component,menuType,authType,visible,perms,remark,orderId,status,createTime,createUserId,createUserName,updateUserId,updateUserName,updateTime,cache,activeDir,hideChildrenInMenu,resourceUrl)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.name},#{item.url},#{item.ancestors},#{item.parentId},#{item.linkType},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.component},#{item.menuType},#{item.authType},#{item.visible},#{item.perms},#{item.remark},#{item.orderId},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.updateUserId},#{item.updateUserName},#{item.updateTime},#{item.cache},#{item.activeDir},#{item.hideChildrenInMenu}) (#{item.name},#{item.url},#{item.ancestors},#{item.parentId},#{item.linkType},#{item.imgPath},#{item.buttonImgPath},#{item.imgCommPath},#{item.commMenu},#{item.component},#{item.menuType},#{item.authType},#{item.visible},#{item.perms},#{item.remark},#{item.orderId},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.updateUserId},#{item.updateUserName},#{item.updateTime},#{item.cache},#{item.activeDir},#{item.hideChildrenInMenu},#{item.resourceUrl})
</foreach> </foreach>
</insert> </insert>
...@@ -258,6 +262,9 @@ ...@@ -258,6 +262,9 @@
<if test="(colPickMode==0 and data.containsKey('hideChildrenInMenuIncrement')) or (colPickMode==1 and !data.containsKey('hideChildrenInMenuIncrement'))"> <if test="(colPickMode==0 and data.containsKey('hideChildrenInMenuIncrement')) or (colPickMode==1 and !data.containsKey('hideChildrenInMenuIncrement'))">
a.hideChildrenInMenu=ifnull(a.hideChildrenInMenu,0) + #{data.hideChildrenInMenuIncrement}, a.hideChildrenInMenu=ifnull(a.hideChildrenInMenu,0) + #{data.hideChildrenInMenuIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('resourceUrl')) or (colPickMode==1 and !data.containsKey('resourceUrl'))">
a.resourceUrl=#{data.resourceUrl},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -512,6 +519,13 @@ ...@@ -512,6 +519,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="resourceUrl=(case" suffix="ELSE resourceUrl end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('resourceUrl')) or (colPickMode==1 and !item.containsKey('resourceUrl'))">
when a.id=#{item.id} then #{item.resourceUrl}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1269,6 +1283,27 @@ ...@@ -1269,6 +1283,27 @@
${_conditionType_} a.hideChildrenInMenu <![CDATA[ <= ]]> #{${_conditionParam_}.hideChildrenInMenuEnd} ${_conditionType_} a.hideChildrenInMenu <![CDATA[ <= ]]> #{${_conditionParam_}.hideChildrenInMenuEnd}
</if> </if>
<if test="conditionParamRef.containsKey('resourceUrl')">
<if test="conditionParamRef.resourceUrl != null and conditionParamRef.resourceUrl != ''">
${_conditionType_} a.resourceUrl like #{${_conditionParam_}.resourceUrl}
</if>
<if test="conditionParamRef.resourceUrl == null">
${_conditionType_} a.resourceUrl is null
</if>
</if>
<if test="conditionParamRef.containsKey('resourceUrlList') and conditionParamRef.resourceUrlList.size() > 0">
${_conditionType_} a.resourceUrl in
<foreach collection="conditionParamRef.resourceUrlList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('resourceUrlNotList') and conditionParamRef.resourceUrlNotList.size() > 0">
${_conditionType_} a.resourceUrl not in
<foreach collection="conditionParamRef.resourceUrlNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1599,6 +1634,11 @@ ...@@ -1599,6 +1634,11 @@
<if test='orderCol.hideChildrenInMenu != null and "DESC".equalsIgnoreCase(orderCol.hideChildrenInMenu)'>DESC</if> <if test='orderCol.hideChildrenInMenu != null and "DESC".equalsIgnoreCase(orderCol.hideChildrenInMenu)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('resourceUrl')">
a.resourceUrl
<if test='orderCol.resourceUrl != null and "DESC".equalsIgnoreCase(orderCol.resourceUrl)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
......
This diff is collapsed.
This diff is collapsed.
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;padding: 0;border: 0;outline: 0;font-weight: inherit;font-style: inherit;font-size: 100%;font-family: inherit;vertical-align: baseline;}
body {color: #2f332a;font: 15px/21px Arial, Helvetica, simsun, sans-serif;background: #f0f6e4 \9;}
h1, h2, h3, h4, h5, h6 {color: #2f332a;font-weight: bold;font-family: Helvetica, Arial, sans-serif;padding-bottom: 5px;}
h1 {font-size: 24px;line-height: 34px;text-align: center;}
h2 {font-size: 14px;line-height: 24px;padding-top: 5px;}
h6 {font-weight: normal;font-size: 12px;letter-spacing: 1px;line-height: 24px;text-align: center;}
a {color:#3C6E31;text-decoration: underline;}
a:hover {background-color:#3C6E31;color:white;}
input.radio {margin: 0 2px 0 8px;}
input.radio.first {margin-left:0;}
input.empty {color: lightgray;}
code {color: #2f332a;}
.highlight_red {color:#A60000;}
.highlight_green {color:#A7F43D;}
li {list-style: circle;font-size: 12px;}
li.title {list-style: none;}
ul.list {margin-left: 17px;}
div.content_wrap {width: 600px;height:380px;}
div.content_wrap div.left{float: left;width: 250px;}
div.content_wrap div.right{float: right;width: 340px;}
div.zTreeDemoBackground {width:250px;height:362px;text-align:left;}
ul.ztree {margin-top: 10px;border: 1px solid #617775;background: #f0f6e4;width:220px;height:360px;overflow-y:scroll;overflow-x:auto;}
ul.log {border: 1px solid #617775;background: #f0f6e4;width:300px;height:170px;overflow: hidden;}
ul.log.small {height:45px;}
ul.log li {color: #666666;list-style: none;padding-left: 10px;}
ul.log li.dark {background-color: #E3E3E3;}
/* ruler */
div.ruler {height:20px; width:220px; background-color:#f0f6e4;border: 1px solid #333; margin-bottom: 5px; cursor: pointer}
div.ruler div.cursor {height:20px; width:30px; background-color:#3C6E31; color:white; text-align: right; padding-right: 5px; cursor: pointer}
\ No newline at end of file
/*-------------------------------------
zTree Style
version: 3.4
author: Hunter.z
email: hunter.z@263.net
website: http://code.google.com/p/jquerytree/
-------------------------------------*/
.ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif}
.ztree {margin:0; padding:5px; color:#333}
.ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap; outline:0}
.ztree li ul{ margin:0; padding:0 0 0 18px}
.ztree li ul.line{ background:url(./img/line_conn.gif) 0 0 repeat-y;}
.ztree li a {padding:1px 3px 0 0; margin:0; cursor:pointer; height:17px; color:#333; background-color: transparent;
text-decoration:none; vertical-align:top; display: inline-block}
.ztree li a:hover {text-decoration:underline}
.ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; height:16px; border:1px #FFB951 solid; opacity:0.8;}
.ztree li a.tmpTargetNode_inner {padding-top:0px; background-color:#316AC5; color:white; height:16px; border:1px #316AC5 solid;
opacity:0.8; filter:alpha(opacity=80)}
.ztree li a.tmpTargetNode_prev {}
.ztree li a.tmpTargetNode_next {}
.ztree li a input.rename {height:14px; width:80px; padding:0; margin:0;
font-size:12px; border:1px #7EC4CC solid; *border:0px}
.ztree li span {line-height:16px; margin-right:2px}
.ztree li span.button {line-height:0; margin:0; width:16px; height:16px; display: inline-block; vertical-align:middle;
border:0 none; cursor: pointer;outline:none;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
.ztree li span.button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto}
.ztree li span.button.chk.checkbox_false_full {background-position:0 0}
.ztree li span.button.chk.checkbox_false_full_focus {background-position:0 -14px}
.ztree li span.button.chk.checkbox_false_part {background-position:0 -28px}
.ztree li span.button.chk.checkbox_false_part_focus {background-position:0 -42px}
.ztree li span.button.chk.checkbox_false_disable {background-position:0 -56px}
.ztree li span.button.chk.checkbox_true_full {background-position:-14px 0}
.ztree li span.button.chk.checkbox_true_full_focus {background-position:-14px -14px}
.ztree li span.button.chk.checkbox_true_part {background-position:-14px -28px}
.ztree li span.button.chk.checkbox_true_part_focus {background-position:-14px -42px}
.ztree li span.button.chk.checkbox_true_disable {background-position:-14px -56px}
.ztree li span.button.chk.radio_false_full {background-position:-28px 0}
.ztree li span.button.chk.radio_false_full_focus {background-position:-28px -14px}
.ztree li span.button.chk.radio_false_part {background-position:-28px -28px}
.ztree li span.button.chk.radio_false_part_focus {background-position:-28px -42px}
.ztree li span.button.chk.radio_false_disable {background-position:-28px -56px}
.ztree li span.button.chk.radio_true_full {background-position:-42px 0}
.ztree li span.button.chk.radio_true_full_focus {background-position:-42px -14px}
.ztree li span.button.chk.radio_true_part {background-position:-42px -28px}
.ztree li span.button.chk.radio_true_part_focus {background-position:-42px -42px}
.ztree li span.button.chk.radio_true_disable {background-position:-42px -56px}
.ztree li span.button.switch {width:18px; height:18px}
.ztree li span.button.root_open{background-position:-92px -54px}
.ztree li span.button.root_close{background-position:-74px -54px}
.ztree li span.button.roots_open{background-position:-92px 0}
.ztree li span.button.roots_close{background-position:-74px 0}
.ztree li span.button.center_open{background-position:-92px -18px}
.ztree li span.button.center_close{background-position:-74px -18px}
.ztree li span.button.bottom_open{background-position:-92px -36px}
.ztree li span.button.bottom_close{background-position:-74px -36px}
.ztree li span.button.noline_open{background-position:-92px -72px}
.ztree li span.button.noline_close{background-position:-74px -72px}
.ztree li span.button.root_docu{ background:none;}
.ztree li span.button.roots_docu{background-position:-56px 0}
.ztree li span.button.center_docu{background-position:-56px -18px}
.ztree li span.button.bottom_docu{background-position:-56px -36px}
.ztree li span.button.noline_docu{ background:none;}
.ztree li span.button.ico_open{margin-right:2px; background-position:-110px -16px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_close{margin-right:2px; background-position:-110px 0; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_docu{margin-right:2px; background-position:-110px -32px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.edit {margin-right:2px; background-position:-110px -48px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.remove {margin-right:2px; background-position:-110px -64px; vertical-align:top; *vertical-align:middle}
.ztree li span.button.ico_loading{margin-right:2px; background:url(./img/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle}
ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)}
span.tmpzTreeMove_arrow {width:16px; height:16px; display: inline-block; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute;
background-color:transparent; background-repeat:no-repeat; background-attachment: scroll;
background-position:-110px -80px; background-image:url("./img/zTreeStandard.png"); *background-image:url("./img/zTreeStandard.gif")}
ul.ztree.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:hidden; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)}
.zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute}
/* level style*/
/*.ztree li span.button.level0 {
display:none;
}
.ztree li ul.level0 {
padding:0;
background:none;
}*/
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*! ztree_toc - v0.2.2 - 2014-02-08
* https://github.com/i5ting/jQuery.zTree_Toc.js
* Copyright (c) 2014 alfred.sang; Licensed MIT */
function encode_id_with_array(opts,arr) {
var result = 0;
for(var z = 0; z < arr.length; z++ ) {
result += factor(opts, arr.length - z ,arr[z]);
}
return result;
}
/**
* 1.1.1 = 1*100*100 + 1*100 + 1
* 1.2.2 = 1*100*100 + 2*100 + 3
*
* 1 = 0*100 +1
1,1 = 100
*/
function get_parent_id_with_array(opts,arr) {
var result_arr = [];
for(var z = 0; z < arr.length; z++ ) {
result_arr.push(arr[z]);
}
result_arr.pop();
var result = 0;
for(var z = 0; z < result_arr.length; z++ ) {
result += factor(opts,result_arr.length - z,result_arr[z]);
}
return result;
}
function factor(opts ,count,current) {
if(1 == count) {
return current;
}
var str = '';
for(var i = count - 1;i > 0; i-- ) {
str += current * opts.step+'*';
}
return eval( str + '1' );
}
;(function($) {
/*
* 根据header创建目录内容
*/
function create_toc(opts) {
$(opts.documment_selector).find(':header').each(function() {
var level = parseInt(this.nodeName.substring(1), 10);
_rename_header_content(opts,this,level);
_add_header_node(opts,$(this));
});//end each
}
/*
* 渲染ztree
*/
function render_with_ztree(opts) {
var t = $(opts._zTree);
t = $.fn.zTree.init(t,opts.ztreeSetting,opts._header_nodes).expandAll(opts.is_expand_all);
// alert(opts._headers * 88);
// $(opts._zTree).height(opts._headers * 33 + 33);
$(opts._zTree).css(opts.ztreeStyle);
}
/*
* 将已有header编号,并重命名
*/
function _rename_header_content(opts ,header_obj ,level) {
if(opts._headers.length == level) {
opts._headers[level - 1]++;
} else if(opts._headers.length > level) {
opts._headers = opts._headers.slice(0, level);
opts._headers[level - 1] ++;
} else if(opts._headers.length < level) {
for(var i = 0; i < (level - opts._headers.length); i++) {
// console.log('push 1');
opts._headers.push(1);
}
}
if(opts.is_auto_number == true) {
//另存为的文件里会有编号,所以有编号的就不再重新替换
if($(header_obj).text().indexOf( opts._headers.join('.') ) != -1){
}else{
$(header_obj).text(opts._headers.join('.') + '. ' + $(header_obj).text());
}
}
}
/*
* 给ztree用的header_nodes增加数据
*/
function _add_header_node(opts ,header_obj) {
var id = encode_id_with_array(opts,opts._headers);
var pid = get_parent_id_with_array(opts,opts._headers);
// 设置锚点id
$(header_obj).attr('id',id);
log($(header_obj).text());
opts._header_offsets.push($(header_obj).offset().top - opts.highlight_offset);
log('h offset ='+( $(header_obj).offset().top - opts.highlight_offset ) );
opts._header_nodes.push({
id:id,
pId:pid ,
name:$(header_obj).text()||'null',
open:true,
url:'#'+ id,
target:'_self'
});
}
/*
* 根据滚动确定当前位置,并更新ztree
*/
function bind_scroll_event_and_update_postion(opts) {
var timeout;
var highlight_on_scroll = function(e) {
if (timeout) {
clearTimeout(timeout);
}
timeout = setTimeout(function() {
var top = $(window).scrollTop(),highlighted;
if(opts.debug) console.log('top='+top);
for (var i = 0, c = opts._header_offsets.length; i < c; i++) {
// fixed: top+5防止点击ztree的时候,出现向上抖动的情况
if (opts._header_offsets[i] >= (top + 5) ) {
console.log('opts._header_offsets['+ i +'] = '+opts._header_offsets[i]);
$('a').removeClass('curSelectedNode');
// 由于有root节点,所以i应该从1开始
var obj = $('#tree_' + (i+1) + '_a').addClass('curSelectedNode');
break;
}
}
}, opts.refresh_scroll_time);
};
if (opts.highlight_on_scroll) {
$(window).bind('scroll', highlight_on_scroll);
highlight_on_scroll();
}
}
/*
* 初始化
*/
function init_with_config(opts) {
opts.highlight_offset = $(opts.documment_selector).offset().top;
}
/*
* 日志
*/
function log(str) {
return;
if($.fn.ztree_toc.defaults.debug == true) {
console.log(str);
}
}
$.fn.ztree_toc = function(options) {
// 将defaults 和 options 参数合并到{}
var opts = $.extend({},$.fn.ztree_toc.defaults,options);
return this.each(function() {
opts._zTree = $(this);
// 初始化
init_with_config(opts);
// 创建table of content,获取元数据_headers
create_toc(opts);
// 根据_headers生成ztree
render_with_ztree(opts);
// 根据滚动确定当前位置,并更新ztree
bind_scroll_event_and_update_postion(opts);
});
// each end
}
//定义默认
$.fn.ztree_toc.defaults = {
_zTree: null,
_headers: [],
_header_offsets: [],
_header_nodes: [{ id:1, pId:0, name:"Table of Content",open:true}],
debug: true,
highlight_offset: 0,
highlight_on_scroll: true,
/*
* 计算滚动判断当前位置的时间,默认是50毫秒
*/
refresh_scroll_time: 50,
documment_selector: 'body',
is_posion_top: false,
/*
* 默认是否显示header编号
*/
is_auto_number: false,
/*
* 默认是否展开全部
*/
is_expand_all: true,
/*
* 是否对选中行,显示高亮效果
*/
is_highlight_selected_line: true,
step: 100,
ztreeStyle: {
width:'260px',
overflow: 'auto',
position: 'fixed',
'z-index': 2147483647,
border: '0px none',
left: '0px',
bottom: '0px',
// height:'100px'
},
ztreeSetting: {
view: {
dblClickExpand: false,
showLine: true,
showIcon: false,
selectedMulti: false
},
data: {
simpleData: {
enable: true,
idKey : "id",
pIdKey: "pId",
// rootPId: "0"
}
},
callback: {
beforeClick: function(treeId, treeNode) {
$('a').removeClass('curSelectedNode');
if(treeNode.id == 1){
// TODO: when click root node
console.log('click root table of content');
}
if($.fn.ztree_toc.defaults.is_highlight_selected_line == true) {
$('#' + treeNode.id).css('color' ,'red').fadeOut("slow" ,function() {
// Animation complete.
$(this).show().css('color','black');
});
}
},
onRightClick: function(event, treeId, treeNode) {
if(treeNode.id == 1){
// TODO: when right_click root node:table content
console.log('right_click root table of content');
}
}
}
}
};
})(jQuery);
\ No newline at end of file
/*! ztree_toc - v0.2.2 - 2014-02-08
* https://github.com/i5ting/jQuery.zTree_Toc.js
* Copyright (c) 2014 alfred.sang; Licensed MIT */
function encode_id_with_array(a,b){for(var c=0,d=0;d<b.length;d++)c+=factor(a,b.length-d,b[d]);return c}function get_parent_id_with_array(a,b){for(var c=[],d=0;d<b.length;d++)c.push(b[d]);c.pop();for(var e=0,d=0;d<c.length;d++)e+=factor(a,c.length-d,c[d]);return e}function factor(opts,count,current){if(1==count)return current;for(var str="",i=count-1;i>0;i--)str+=current*opts.step+"*";return eval(str+"1")}!function(a){function b(b){a(b.documment_selector).find(":header").each(function(){var c=parseInt(this.nodeName.substring(1),10);d(b,this,c),e(b,a(this))})}function c(b){var c=a(b._zTree);c=a.fn.zTree.init(c,b.ztreeSetting,b._header_nodes).expandAll(b.is_expand_all),a(b._zTree).css(b.ztreeStyle)}function d(b,c,d){if(b._headers.length==d)b._headers[d-1]++;else if(b._headers.length>d)b._headers=b._headers.slice(0,d),b._headers[d-1]++;else if(b._headers.length<d)for(var e=0;e<d-b._headers.length;e++)b._headers.push(1);1==b.is_auto_number&&(-1!=a(c).text().indexOf(b._headers.join("."))||a(c).text(b._headers.join(".")+". "+a(c).text()))}function e(b,c){var d=encode_id_with_array(b,b._headers),e=get_parent_id_with_array(b,b._headers);a(c).attr("id",d),h(a(c).text()),b._header_offsets.push(a(c).offset().top-b.highlight_offset),h("h offset ="+(a(c).offset().top-b.highlight_offset)),b._header_nodes.push({id:d,pId:e,name:a(c).text()||"null",open:!0,url:"#"+d,target:"_self"})}function f(b){var c,d=function(){c&&clearTimeout(c),c=setTimeout(function(){var c=a(window).scrollTop();b.debug&&console.log("top="+c);for(var d=0,e=b._header_offsets.length;e>d;d++)if(b._header_offsets[d]>=c+5){console.log("opts._header_offsets["+d+"] = "+b._header_offsets[d]),a("a").removeClass("curSelectedNode"),a("#tree_"+(d+1)+"_a").addClass("curSelectedNode");break}},b.refresh_scroll_time)};b.highlight_on_scroll&&(a(window).bind("scroll",d),d())}function g(b){b.highlight_offset=a(b.documment_selector).offset().top}function h(a){}a.fn.ztree_toc=function(d){var e=a.extend({},a.fn.ztree_toc.defaults,d);return this.each(function(){e._zTree=a(this),g(e),b(e),c(e),f(e)})},a.fn.ztree_toc.defaults={_zTree:null,_headers:[],_header_offsets:[],_header_nodes:[{id:1,pId:0,name:"Table of Content",open:!0}],debug:!0,highlight_offset:0,highlight_on_scroll:!0,refresh_scroll_time:50,documment_selector:"body",is_posion_top:!1,is_auto_number:!1,is_expand_all:!0,is_highlight_selected_line:!0,step:100,ztreeStyle:{width:"260px",overflow:"auto",position:"fixed","z-index":2147483647,border:"0px none",left:"0px",bottom:"0px"},ztreeSetting:{view:{dblClickExpand:!1,showLine:!0,showIcon:!1,selectedMulti:!1},data:{simpleData:{enable:!0,idKey:"id",pIdKey:"pId"}},callback:{beforeClick:function(b,c){a("a").removeClass("curSelectedNode"),1==c.id&&console.log("click root table of content"),1==a.fn.ztree_toc.defaults.is_highlight_selected_line&&a("#"+c.id).css("color","red").fadeOut("slow",function(){a(this).show().css("color","black")})},onRightClick:function(a,b,c){1==c.id&&console.log("right_click root table of content")}}}}}(jQuery);
\ No newline at end of file
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #fff;
background-color: #282a36;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #59acf3;
}
a:hover {
color: #a7d8ff;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #fff;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
color: #ff4a14;
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #bf370f;
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #282a36;
color: #ff4a14;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
\ No newline at end of file
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote {
margin: 0;
padding: 0;
}
body {
font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", Arial, sans-serif;
font-size: 13px;
line-height: 18px;
color: #737373;
background-color: white;
margin: 10px 13px 10px 13px;
}
table {
margin: 10px 0 15px 0;
border-collapse: collapse;
}
td,th {
border: 1px solid #ddd;
padding: 3px 10px;
}
th {
padding: 5px 10px;
}
a {
color: #0069d6;
}
a:hover {
color: #0050a3;
text-decoration: none;
}
a img {
border: none;
}
p {
margin-bottom: 9px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #404040;
line-height: 36px;
}
h1 {
margin-bottom: 18px;
font-size: 30px;
}
h2 {
font-size: 24px;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
font-size: 13px;
}
hr {
margin: 0 0 19px;
border: 0;
border-bottom: 1px solid #ccc;
}
blockquote {
padding: 13px 13px 21px 15px;
margin-bottom: 18px;
font-family:georgia,serif;
font-style: italic;
}
blockquote:before {
content:"\201C";
font-size:40px;
margin-left:-10px;
font-family:georgia,serif;
color:#eee;
}
blockquote p {
font-size: 14px;
font-weight: 300;
line-height: 18px;
margin-bottom: 0;
font-style: italic;
}
code, pre {
font-family: Monaco, Andale Mono, Courier New, monospace;
}
code {
background-color: #fee9cc;
color: rgba(0, 0, 0, 0.75);
padding: 1px 3px;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
pre {
display: block;
padding: 14px;
margin: 0 0 18px;
line-height: 16px;
font-size: 11px;
border: 1px solid #d9d9d9;
white-space: pre-wrap;
word-wrap: break-word;
}
pre code {
background-color: #fff;
color:#737373;
font-size: 11px;
padding: 0;
}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:10px auto;
}
}
@media print {
body,code,pre code,h1,h2,h3,h4,h5,h6 {
color: black;
}
table, pre {
page-break-inside: avoid;
}
}
\ No newline at end of file
*{margin:0;padding:0;}
body {
font:13.34px helvetica,arial,freesans,clean,sans-serif;
color:black;
line-height:1.4em;
background-color: #F8F8F8;
padding: 0.7em;
}
p {
margin:1em 0;
line-height:1.5em;
}
table {
font-size:inherit;
font:100%;
margin:1em;
}
table th{border-bottom:1px solid #bbb;padding:.2em 1em;}
table td{border-bottom:1px solid #ddd;padding:.2em 1em;}
input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}
select,option{padding:0 .25em;}
optgroup{margin-top:.5em;}
pre,code{font:12px Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;}
pre {
margin:1em 0;
font-size:12px;
background-color:#eee;
border:1px solid #ddd;
padding:5px;
line-height:1.5em;
color:#444;
overflow:auto;
-webkit-box-shadow:rgba(0,0,0,0.07) 0 1px 2px inset;
-webkit-border-radius:3px;
-moz-border-radius:3px;border-radius:3px;
}
pre code {
padding:0;
font-size:12px;
background-color:#eee;
border:none;
}
code {
font-size:12px;
background-color:#f8f8ff;
color:#444;
padding:0 .2em;
border:1px solid #dedede;
}
img{border:0;max-width:100%;}
abbr{border-bottom:none;}
a{color:#4183c4;text-decoration:none;}
a:hover{text-decoration:underline;}
a code,a:link code,a:visited code{color:#4183c4;}
h2,h3{margin:1em 0;}
h1,h2,h3,h4,h5,h6{border:0;}
h1{font-size:170%;border-top:4px solid #aaa;padding-top:.5em;margin-top:1.5em;}
h1:first-child{margin-top:0;padding-top:.25em;border-top:none;}
h2{font-size:150%;margin-top:1.5em;border-top:4px solid #e0e0e0;padding-top:.5em;}
h3{margin-top:1em;}
hr{border:1px solid #ddd;}
ul{margin:1em 0 1em 2em;}
ol{margin:1em 0 1em 2em;}
ul li,ol li{margin-top:.5em;margin-bottom:.5em;}
ul ul,ul ol,ol ol,ol ul{margin-top:0;margin-bottom:0;}
blockquote{margin:1em 0;border-left:5px solid #ddd;padding-left:.6em;color:#555;}
dt{font-weight:bold;margin-left:1em;}
dd{margin-left:2em;margin-bottom:1em;}
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
\ No newline at end of file
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
margin-top: 0 !important; }
body > *:last-child {
margin-bottom: 0 !important; }
a {
color: #4183C4; }
a.absent {
color: #cc0000; }
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0; }
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative; }
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA09pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoMTMuMCAyMDEyMDMwNS5tLjQxNSAyMDEyLzAzLzA1OjIxOjAwOjAwKSAgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUM2NjlDQjI4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUM2NjlDQjM4ODBGMTFFMTg1ODlEODNERDJBRjUwQTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QzY2OUNCMDg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QzY2OUNCMTg4MEYxMUUxODU4OUQ4M0REMkFGNTBBNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsQhXeAAAABfSURBVHjaYvz//z8DJYCRUgMYQAbAMBQIAvEqkBQWXI6sHqwHiwG70TTBxGaiWwjCTGgOUgJiF1J8wMRAIUA34B4Q76HUBelAfJYSA0CuMIEaRP8wGIkGMA54bgQIMACAmkXJi0hKJQAAAABJRU5ErkJggg==) no-repeat 10px center;
text-decoration: none; }
h1 tt, h1 code {
font-size: inherit; }
h2 tt, h2 code {
font-size: inherit; }
h3 tt, h3 code {
font-size: inherit; }
h4 tt, h4 code {
font-size: inherit; }
h5 tt, h5 code {
font-size: inherit; }
h6 tt, h6 code {
font-size: inherit; }
h1 {
font-size: 28px;
color: black; }
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black; }
h3 {
font-size: 18px; }
h4 {
font-size: 16px; }
h5 {
font-size: 14px; }
h6 {
color: #777777;
font-size: 14px; }
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0; }
hr {
background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC) repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0;
}
body > h2:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child {
margin-top: 0;
padding-top: 0; }
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0; }
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0; }
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0; }
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0; }
li p.first {
display: inline-block; }
li {
margin: 0; }
ul, ol {
padding-left: 30px; }
ul :first-child, ol :first-child {
margin-top: 0; }
dl {
padding: 0; }
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px; }
dl dt:first-child {
padding: 0; }
dl dt > :first-child {
margin-top: 0; }
dl dt > :last-child {
margin-bottom: 0; }
dl dd {
margin: 0 0 15px;
padding: 0 15px; }
dl dd > :first-child {
margin-top: 0; }
dl dd > :last-child {
margin-bottom: 0; }
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777; }
blockquote > :first-child {
margin-top: 0; }
blockquote > :last-child {
margin-bottom: 0; }
table {
padding: 0;border-collapse: collapse; }
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0; }
table tr:nth-child(2n) {
background-color: #f8f8f8; }
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr td {
border: 1px solid #cccccc;
margin: 0;
padding: 6px 13px; }
table tr th :first-child, table tr td :first-child {
margin-top: 0; }
table tr th :last-child, table tr td :last-child {
margin-bottom: 0; }
img {
max-width: 100%; }
span.frame {
display: block;
overflow: hidden; }
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto; }
span.frame span img {
display: block;
float: left; }
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0; }
span.align-center {
display: block;
overflow: hidden;
clear: both; }
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center; }
span.align-center span img {
margin: 0 auto;
text-align: center; }
span.align-right {
display: block;
overflow: hidden;
clear: both; }
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right; }
span.align-right span img {
margin: 0;
text-align: right; }
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left; }
span.float-left span {
margin: 13px 0 0; }
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right; }
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right; }
code, tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px; }
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent; }
.highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px; }
pre code, pre tt {
background-color: transparent;
border: none; }
sup {
font-size: 0.83em;
vertical-align: super;
line-height: 0;
}
* {
-webkit-print-color-adjust: exact;
}
@media screen and (min-width: 914px) {
body {
width: 854px;
margin:0 auto;
}
}
@media print {
table, pre {
page-break-inside: avoid;
}
pre {
word-wrap: break-word;
}
}
\ No newline at end of file
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
}
/* BODY
=============================================================================*/
body {
font-family: Helvetica, arial, freesans, clean, sans-serif;
font-size: 14px;
line-height: 1.6;
color: #333;
background-color: #fff;
padding: 20px;
max-width: 960px;
margin: 0 auto;
}
body>*:first-child {
margin-top: 0 !important;
}
body>*:last-child {
margin-bottom: 0 !important;
}
/* BLOCKS
=============================================================================*/
p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}
/* HEADERS
=============================================================================*/
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}
h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}
h1 {
font-size: 28px;
color: #000;
}
h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777;
font-size: 14px;
}
body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}
h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}
/* LINKS
=============================================================================*/
a {
color: #4183C4;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* LISTS
=============================================================================*/
ul, ol {
padding-left: 30px;
}
ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}
ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}
dl {
padding: 0;
}
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}
dl dt:first-child {
padding: 0;
}
dl dt>:first-child {
margin-top: 0px;
}
dl dt>:last-child {
margin-bottom: 0px;
}
dl dd {
margin: 0 0 15px;
padding: 0 15px;
}
dl dd>:first-child {
margin-top: 0px;
}
dl dd>:last-child {
margin-bottom: 0px;
}
/* CODE
=============================================================================*/
pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}
code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}
pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
pre code, pre tt {
background-color: transparent;
border: none;
}
kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}
/* QUOTES
=============================================================================*/
blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}
blockquote>:first-child {
margin-top: 0px;
}
blockquote>:last-child {
margin-bottom: 0px;
}
/* HORIZONTAL RULES
=============================================================================*/
hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}
/* TABLES
=============================================================================*/
table th {
font-weight: bold;
}
table th, table td {
border: 1px solid #ccc;
padding: 6px 13px;
}
table tr {
border-top: 1px solid #ccc;
background-color: #fff;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
/* IMAGES
=============================================================================*/
img {
max-width: 100%
}
var jquery_ztree_toc_opts = {
debug:false,
is_auto_number:true,
documment_selector:'.markdown-body',
ztreeStyle: {
width:'326px',
overflow: 'auto',
position: 'fixed',
'z-index': 2147483647,
border: '0px none',
left: '0px',
top: '0px',
// 'overflow-x': 'hidden',
'height': $(window).height() + 'px'
}
}
var markdown_panel_style = {
'width':'70%',
'margin-left':'25%'
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment