Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zui
提交
3c6d4d57
Z
zui
项目概览
易企天创
/
zui
大约 1 年 前同步成功
通知
6
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
37
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
37
Issue
37
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3c6d4d57
编写于
4月 20, 2015
作者:
C
Catouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* update document.
上级
76b4487e
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
911 addition
and
274 deletion
+911
-274
docs/2/css/doc.css
docs/2/css/doc.css
+2
-2
docs/2/css/doc.css.map
docs/2/css/doc.css.map
+1
-1
docs/2/css/doc.min.css
docs/2/css/doc.min.css
+2
-2
docs/2/icons.json
docs/2/icons.json
+778
-208
docs/2/index.html
docs/2/index.html
+1
-1
docs/2/index.json
docs/2/index.json
+3
-3
docs/2/js/doc.js
docs/2/js/doc.js
+108
-47
docs/2/js/doc.min.js
docs/2/js/doc.min.js
+2
-2
docs/css/zui.css
docs/css/zui.css
+1
-1
docs/css/zui.min.css
docs/css/zui.min.css
+1
-1
docs/js/zui.js
docs/js/zui.js
+7
-2
docs/js/zui.min.js
docs/js/zui.min.js
+2
-2
src/js/doc.js
src/js/doc.js
+2
-1
src/less/doc.less
src/less/doc.less
+1
-1
未找到文件。
docs/2/css/doc.css
浏览文件 @
3c6d4d57
/*!
* ZUI - v1.3.0 - 2015-04-
18
* ZUI - v1.3.0 - 2015-04-
20
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
@@ -417,7 +417,7 @@ body {
display
:
block
;
padding
:
3px
8px
;
color
:
#fff
;
content
:
'
轻
按Enter键打开'
;
content
:
'按Enter键打开'
;
-webkit-transition
:
all
.1s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
-o-transition
:
all
.1s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
transition
:
all
.1s
cubic-bezier
(
.175
,
.885
,
.32
,
1
);
...
...
docs/2/css/doc.css.map
浏览文件 @
3c6d4d57
此差异已折叠。
点击以展开。
docs/2/css/doc.min.css
浏览文件 @
3c6d4d57
此差异已折叠。
点击以展开。
docs/2/icons.json
浏览文件 @
3c6d4d57
此差异已折叠。
点击以展开。
docs/2/index.html
浏览文件 @
3c6d4d57
...
...
@@ -29,7 +29,7 @@
</ul>
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a
href=
"https://github.com/easysoft/zui"
target=
"_blank"
>
论坛
</a></li>
<li><a
href=
"https://github.com/easysoft/zui"
target=
"_blank"
>
Github
</a></li>
<li><a
href=
"https://github.com/easysoft/zui"
target=
"_blank"
>
<i
class=
"icon icon-github"
></i>
</a></li>
</ul>
</nav>
</div>
...
...
docs/2/index.json
浏览文件 @
3c6d4d57
...
...
@@ -9,8 +9,8 @@
[
{
"id"
:
"qqgroup"
,
"name"
:
"QQ
群
"
,
"desc"
:
"384135104"
,
"name"
:
"QQ
讨论
"
,
"desc"
:
"
官方QQ群:
384135104"
,
"icon"
:
"icon-qq"
,
"url"
:
null
},
...
...
@@ -24,7 +24,7 @@
{
"id"
:
"github"
,
"name"
:
"Github"
,
"icon"
:
"icon-
code-fork
"
,
"icon"
:
"icon-
github
"
,
"desc"
:
"Star或Fork来支持项目"
,
"url"
:
"https://github.com/easysoft/zui"
},
...
...
docs/2/js/doc.js
浏览文件 @
3c6d4d57
/*!
* ZUI - v1.3.0 - 2015-04-
18
* ZUI - v1.3.0 - 2015-04-
20
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
@@ -52,11 +52,14 @@
var
INDEX_JSON
=
'
index.json
'
;
var
UNDEFINED
=
undefined
;
var
PAGE_SHOW_FULL
=
'
page-show-full
'
;
var
dataVersion
;
var
storageEnable
;
var
dataset
=
{
// 'index.json': null
};
if
(
debug
)
window
.
dataset
=
dataset
;
var
sectionsShowed
;
var
scrollBarWidth
=
-
1
;
var
bestPageWidth
=
1120
;
var
$body
,
$window
,
$grid
,
$sectionTemplate
,
...
...
@@ -65,6 +68,20 @@
$pageContainer
,
$pageBody
,
$navbar
,
$header
,
$sections
,
$chapterHeadings
;
// elements
var
limitString
=
function
(
str
,
len
)
{
if
(
str
&&
str
.
length
>
len
)
{
return
str
.
substr
(
0
,
len
)
+
'
...[
'
+
str
.
length
+
'
]
'
;
}
return
str
;
};
var
getQueryString
=
function
(
name
)
{
var
reg
=
new
RegExp
(
"
(^|&)
"
+
name
+
"
=([^&]*)(&|$)
"
,
"
i
"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
unescape
(
r
[
2
]);
return
null
;
};
var
checkScrollbar
=
function
()
{
if
(
document
.
body
.
clientWidth
>=
window
.
innerWidth
)
return
;
...
...
@@ -77,8 +94,6 @@
$body
[
0
].
removeChild
(
scrollDiv
);
}
console
.
log
(
'
checkScrollbar
'
,
scrollBarWidth
);
if
(
scrollBarWidth
)
{
var
bodyPad
=
parseInt
((
$body
.
css
(
'
padding-right
'
)
||
0
),
10
);
$body
.
css
(
'
padding-right
'
,
bodyPad
+
scrollBarWidth
);
...
...
@@ -92,42 +107,57 @@
$navbar
.
css
(
'
padding-right
'
,
''
);
};
var
loadData
=
function
(
url
,
callback
,
forceLoad
)
{
var
data
=
dataset
[
url
];
var
isFirstLoad
=
data
===
UNDEFINED
||
data
===
null
;
if
(
isFirstLoad
)
{
data
=
$
.
store
.
get
(
url
,
null
);
dataset
[
url
]
=
data
;
if
(
data
!==
null
)
{
if
(
debug
)
{
console
.
log
(
'
Load data from storage:
'
,
url
,
'
, size:
'
,
data
.
length
);
var
loadData
=
function
(
url
,
callback
)
{
var
cacheData
=
dataset
[
url
];
var
isHasCache
=
cacheData
&&
cacheData
.
version
;
var
isIndexJson
=
url
===
INDEX_JSON
;
if
(
!
isHasCache
&&
storageEnable
)
{
var
storedData
=
$
.
store
.
get
(
'
//
'
+
url
,
null
);
if
(
storedData
!==
null
)
{
var
storedVersion
=
$
.
store
.
get
(
'
//
'
+
url
+
'
::V
'
);
if
(
storedVersion
)
{
cacheData
=
{
data
:
storedData
,
version
:
storedVersion
};
dataset
[
url
]
=
cacheData
;
isHasCache
=
true
;
if
(
debug
)
console
.
log
(
'
Load
'
,
url
,
'
from storage:
'
,
cacheData
);
}
callback
(
data
);
}
}
else
if
(
data
!==
null
)
{
if
(
debug
)
console
.
log
(
'
Load data from cache:
'
,
url
,
'
, size:
'
,
data
.
length
);
callback
(
data
);
}
if
(
isFirstLoad
||
data
===
null
||
forceLoad
||
isFirstLoad
||
(
!
saveTraffic
))
{
var
dataType
=
url
.
endsWith
(
'
.json
'
)
?
'
json
'
:
'
html
'
;
$
.
get
(
url
,
function
(
remoteData
){
if
(
!
debug
&&
data
!==
null
)
{
if
(
dataType
===
'
json
'
&&
$
.
isPlainObject
(
remoteData
)
&&
data
.
version
&&
remoteData
.
version
&&
remoteData
.
version
===
data
.
version
)
return
;
if
(
dataType
===
'
html
'
&&
data
===
remoteData
)
return
;
}
dataset
[
url
]
=
remoteData
;
if
(
debug
)
{
console
.
log
(
'
Load data from remote:
'
,
url
,
'
, size:
'
,
remoteData
.
length
);
}
callback
(
remoteData
);
$
.
store
.
set
(
url
,
remoteData
);
},
dataType
);
if
(
isHasCache
&&
(
isIndexJson
||
cacheData
.
version
===
dataVersion
))
{
if
(
debug
)
console
.
log
(
'
Load
'
,
url
,
'
from cache:
'
,
cacheData
);
callback
(
cacheData
.
data
);
if
(
!
isIndexJson
)
return
;
}
var
dataType
=
url
.
endsWith
(
'
.json
'
)
?
'
json
'
:
'
html
'
;
$
.
get
(
url
,
function
(
data
){
if
(
data
!==
null
)
{
if
(
isIndexJson
)
{
dataVersion
=
data
.
version
;
}
cacheData
=
{
data
:
data
,
version
:
dataVersion
};
dataset
[
url
]
=
cacheData
;
$
.
store
.
set
(
'
//
'
+
url
,
data
);
$
.
store
.
set
(
'
//
'
+
url
+
'
::V
'
,
dataVersion
);
if
(
debug
)
console
.
log
(
'
Load
'
,
url
,
'
from remote:
'
,
cacheData
);
callback
(
data
);
}
else
if
(
isHasCache
&&
!
isIndexJson
)
{
if
(
debug
)
console
.
log
(
'
Failed load
'
,
url
,
'
from remote, instead load cache:
'
,
cacheData
);
callback
(
cacheData
.
data
);
}
},
dataType
).
error
(
function
(){
if
(
debug
)
console
.
error
(
"
Ajax error:
"
,
url
);
if
(
isHasCache
&&
!
isIndexJson
)
{
if
(
debug
)
console
.
log
(
'
Failed load
'
,
url
,
'
from remote with error, instead load cache:
'
,
cacheData
);
callback
(
cacheData
.
data
);
}
});
};
var
eachSection
=
function
(
callback
,
eachChapterCallback
)
{
var
docIndex
=
dataset
[
INDEX_JSON
];
var
docIndex
=
dataset
[
INDEX_JSON
]
.
data
;
if
(
!
docIndex
)
{
console
.
error
(
"
Document index is empty.
"
);
return
false
;
...
...
@@ -184,18 +214,22 @@
$topics
.
remove
(
'
.card-content
'
);
$tpl
.
addClass
(
'
without-topics
'
);
}
$sectionList
.
append
(
$tpl
.
addClass
(
'
show
'
));
$sectionList
.
append
(
$tpl
.
addClass
(
'
show
'
+
(
sectionsShowed
?
'
in
'
:
''
)
));
},
function
(
chapter
,
sections
){
var
$sectionList
=
chapter
.
$sections
;
$sectionList
.
children
().
remove
();
return
$sectionList
;
}))
{
$body
.
children
(
'
.loader
'
).
removeClass
(
'
loading
'
);
clearTimeout
(
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
));
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
,
setTimeout
(
function
(){
$sections
=
$grid
.
find
(
'
.section
'
).
addClass
(
'
in
'
);
$chapterHeadings
.
addClass
(
'
in
'
);
},
100
));
$sections
=
$grid
.
find
(
'
.section
'
);
if
(
!
sectionsShowed
)
{
clearTimeout
(
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
));
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
,
setTimeout
(
function
(){
$sections
.
addClass
(
'
in
'
);
$chapterHeadings
.
addClass
(
'
in
'
);
},
100
));
sectionsShowed
=
true
;
}
}
else
if
(
debug
)
{
console
.
error
(
"
Display sections failed.
"
);
}
...
...
@@ -361,7 +395,10 @@
};
var
query
=
function
(
keyString
)
{
if
(
!
$sections
)
return
;
if
(
!
$sections
)
{
if
(
debug
)
console
.
log
(
'
Query failed, $sections is empty. key:
'
,
keyString
);
return
;
}
if
(
$queryInput
.
data
(
'
queryString
'
)
!==
keyString
)
{
$queryInput
.
data
(
'
queryString
'
,
keyString
).
val
(
keyString
);
...
...
@@ -697,7 +734,7 @@
var
$section
;
if
(
$
.
isArray
(
section
))
{
var
docIndex
=
dataset
[
INDEX_JSON
];
var
docIndex
=
dataset
[
INDEX_JSON
]
.
data
;
if
(
docIndex
&&
section
.
length
>
1
)
{
var
sectionId
=
section
[
1
];
var
sections
=
docIndex
.
chapters
[
section
[
0
]].
sections
;
...
...
@@ -792,18 +829,42 @@
chapter
.
id
=
chapterId
;
chapter
.
$sections
=
$
(
'
#sections-
'
+
chapterId
);
});
bestPageWidth
=
$grid
.
children
(
'
.container
'
).
outerWidth
();
$body
.
toggleClass
(
PAGE_SHOW_FULL
,
$
.
store
.
get
(
PAGE_SHOW_FULL
,
false
));
// check storage
storageEnable
=
$
.
store
&&
$
.
store
.
enable
;
// Get document version
// dataVersion = $body.data('version');
// Setup ajax
$
.
ajaxSetup
({
cache
:
false
});
// Load index.json
loadData
(
INDEX_JSON
,
function
(
data
){
var
firstLoad
=
!
sectionsShowed
;
displaySection
(
data
);
var
hash
=
window
.
location
.
hash
if
(
hash
)
{
hash
=
hash
.
substr
(
1
);
setTimeout
(
function
(){
openSection
(
hash
.
split
(
'
-
'
));
},
300
);
}
else
{
$queryInput
.
focus
();
if
(
!
firstLoad
)
{
var
q
=
getQueryString
(
'
q
'
);
if
(
q
)
{
setTimeout
(
function
(){
query
(
q
);
},
300
);
}
var
hash
=
window
.
location
.
hash
if
(
hash
)
{
hash
=
hash
.
substr
(
1
);
setTimeout
(
function
(){
openSection
(
hash
.
split
(
'
-
'
));
},
600
);
}
else
{
$queryInput
.
focus
();
}
}
});
...
...
docs/2/js/doc.min.js
浏览文件 @
3c6d4d57
此差异已折叠。
点击以展开。
docs/css/zui.css
浏览文件 @
3c6d4d57
/*!
* ZUI - v1.3.0 - 2015-04-
18
* ZUI - v1.3.0 - 2015-04-
20
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
docs/css/zui.min.css
浏览文件 @
3c6d4d57
/*!
* ZUI - v1.3.0 - 2015-04-
18
* ZUI - v1.3.0 - 2015-04-
20
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
docs/js/zui.js
浏览文件 @
3c6d4d57
/*!
* ZUI - v1.3.0 - 2015-04-
18
* ZUI - v1.3.0 - 2015-04-
20
* http://zui.sexy
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2015 cnezsoft.com; Licensed MIT
...
...
@@ -1585,7 +1585,12 @@
Store
.
prototype
.
get
=
function
(
key
,
defaultValue
)
{
var
val
=
this
.
deserialize
(
this
.
getItem
(
key
));
return
(
defaultValue
!==
undefined
&&
(
typeof
val
===
'
undefined
'
||
val
===
null
||
val
===
undefined
))
?
defaultValue
:
val
;
if
(
typeof
val
===
'
undefined
'
||
val
===
null
)
{
if
(
typeof
defaultValue
!==
'
undefined
'
)
{
return
defaultValue
;
}
}
return
val
;
};
/* Get item key by index and deserialize it */
...
...
docs/js/zui.min.js
浏览文件 @
3c6d4d57
此差异已折叠。
点击以展开。
src/js/doc.js
浏览文件 @
3c6d4d57
...
...
@@ -214,10 +214,11 @@
return
$sectionList
;
}))
{
$body
.
children
(
'
.loader
'
).
removeClass
(
'
loading
'
);
$sections
=
$grid
.
find
(
'
.section
'
);
if
(
!
sectionsShowed
)
{
clearTimeout
(
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
));
$grid
.
data
(
LAST_RELOAD_ANIMATE_ID
,
setTimeout
(
function
(){
$sections
=
$grid
.
find
(
'
.section
'
)
.
addClass
(
'
in
'
);
$sections
.
addClass
(
'
in
'
);
$chapterHeadings
.
addClass
(
'
in
'
);
},
100
));
sectionsShowed
=
true
;
...
...
src/less/doc.less
浏览文件 @
3c6d4d57
...
...
@@ -535,7 +535,7 @@ body {
&:before {
.transition-quickly();
content: '
轻
按Enter键打开';
content: '按Enter键打开';
display: block;
position: absolute;
right: -100%;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录