Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Miykael_xxm
amazeui
提交
1c43c22a
A
amazeui
项目概览
Miykael_xxm
/
amazeui
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
amazeui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1c43c22a
编写于
8月 19, 2014
作者:
M
Minwe
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updage gulp config
上级
40219909
变更
10
展开全部
隐藏空白更改
内联
并排
Showing
10 changed file
with
139 addition
and
69 deletion
+139
-69
dist/assets/css/amui.all.css
dist/assets/css/amui.all.css
+9
-1
dist/assets/css/amui.all.min.css
dist/assets/css/amui.all.min.css
+5
-5
dist/assets/js/amui.js
dist/assets/js/amui.js
+1
-1
dist/assets/js/amui.min.js
dist/assets/js/amui.min.js
+1
-1
dist/assets/js/amui.widget.helper.js
dist/assets/js/amui.widget.helper.js
+2
-39
dist/assets/js/amui.widget.helper.min.js
dist/assets/js/amui.widget.helper.min.js
+1
-1
gulpfile.js
gulpfile.js
+68
-18
less/amui.all.less
less/amui.all.less
+5
-2
less/amui.less
less/amui.less
+1
-1
vendor/amazeui.hbs.partials.js
vendor/amazeui.hbs.partials.js
+46
-0
未找到文件。
dist/assets/css/amui.all.css
浏览文件 @
1c43c22a
/*!
* Amaze UI
1.0.0 alpha
* Amaze UI
0.9.0
*
* @author: Amaze UI Team
* @copyright: AllMobilize Inc.
...
...
@@ -9537,6 +9537,14 @@ tbody.am-collapse.am-in {
.am-map-default
#BMap_mask
{
width
:
100%
;
}
.am-mechat
{
margin
:
1rem
;
}
.am-mechat
.section-cbox-wap
.cbox-post-wap
.post-action-wap
.action-function-wap
.function-list-wap
.list-upload-wap
.upload-mutual-wap
{
-webkit-box-sizing
:
content-box
;
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
}
.am-menu
{
padding
:
0
;
margin
:
0
;
...
...
dist/assets/css/amui.all.min.css
浏览文件 @
1c43c22a
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
dist/assets/js/amui.js
浏览文件 @
1c43c22a
/*! AmazeUI - v
1.0.0 | (c) 2014 AllMobilize, Inc. | @license MIT | 2014-08-15 14:08:01
*/
/*! Sea.js 2.2.1 | seajs.org/LICENSE.md */
/*! AmazeUI - v
0.9.0 | (c) 2014 AllMobilize, Inc. | @license MIT | 2014-08-19 14:08:16
*/
/*! Sea.js 2.2.1 | seajs.org/LICENSE.md */
!
function
(
a
,
b
){
function
c
(
a
){
return
function
(
b
){
return
{}.
toString
.
call
(
b
)
==
"
[object
"
+
a
+
"
]
"
}}
function
d
(){
return
A
++
}
function
e
(
a
){
return
a
.
match
(
D
)[
0
]}
function
f
(
a
){
for
(
a
=
a
.
replace
(
E
,
"
/
"
);
a
.
match
(
F
);)
a
=
a
.
replace
(
F
,
"
/
"
);
return
a
=
a
.
replace
(
G
,
"
$1/
"
)}
function
g
(
a
){
var
b
=
a
.
length
-
1
,
c
=
a
.
charAt
(
b
);
return
"
#
"
===
c
?
a
.
substring
(
0
,
b
):
"
.js
"
===
a
.
substring
(
b
-
2
)
||
a
.
indexOf
(
"
?
"
)
>
0
||
"
.css
"
===
a
.
substring
(
b
-
3
)
||
"
/
"
===
c
?
a
:
a
+
"
.js
"
}
function
h
(
a
){
var
b
=
v
.
alias
;
return
b
&&
x
(
b
[
a
])?
b
[
a
]:
a
}
function
i
(
a
){
var
b
=
v
.
paths
,
c
;
return
b
&&
(
c
=
a
.
match
(
H
))
&&
x
(
b
[
c
[
1
]])
&&
(
a
=
b
[
c
[
1
]]
+
c
[
2
]),
a
}
function
j
(
a
){
var
b
=
v
.
vars
;
return
b
&&
a
.
indexOf
(
"
{
"
)
>-
1
&&
(
a
=
a
.
replace
(
I
,
function
(
a
,
c
){
return
x
(
b
[
c
])?
b
[
c
]:
a
})),
a
}
function
k
(
a
){
var
b
=
v
.
map
,
c
=
a
;
if
(
b
)
for
(
var
d
=
0
,
e
=
b
.
length
;
e
>
d
;
d
++
){
var
f
=
b
[
d
];
if
(
c
=
z
(
f
)?
f
(
a
)
||
a
:
a
.
replace
(
f
[
0
],
f
[
1
]),
c
!==
a
)
break
}
return
c
}
function
l
(
a
,
b
){
var
c
,
d
=
a
.
charAt
(
0
);
if
(
J
.
test
(
a
))
c
=
a
;
else
if
(
"
.
"
===
d
)
c
=
f
((
b
?
e
(
b
):
v
.
cwd
)
+
a
);
else
if
(
"
/
"
===
d
){
var
g
=
v
.
cwd
.
match
(
K
);
c
=
g
?
g
[
0
]
+
a
.
substring
(
1
):
a
}
else
c
=
v
.
base
+
a
;
return
0
===
c
.
indexOf
(
"
//
"
)
&&
(
c
=
location
.
protocol
+
c
),
c
}
function
m
(
a
,
b
){
if
(
!
a
)
return
""
;
a
=
h
(
a
),
a
=
i
(
a
),
a
=
j
(
a
),
a
=
g
(
a
);
var
c
=
l
(
a
,
b
);
return
c
=
k
(
c
)}
function
n
(
a
){
return
a
.
hasAttribute
?
a
.
src
:
a
.
getAttribute
(
"
src
"
,
4
)}
function
o
(
a
,
b
,
c
){
var
d
=
S
.
test
(
a
),
e
=
L
.
createElement
(
d
?
"
link
"
:
"
script
"
);
if
(
c
){
var
f
=
z
(
c
)?
c
(
a
):
c
;
f
&&
(
e
.
charset
=
f
)}
p
(
e
,
b
,
d
,
a
),
d
?(
e
.
rel
=
"
stylesheet
"
,
e
.
href
=
a
):(
e
.
async
=!
0
,
e
.
src
=
a
),
T
=
e
,
R
?
Q
.
insertBefore
(
e
,
R
):
Q
.
appendChild
(
e
),
T
=
null
}
function
p
(
a
,
c
,
d
,
e
){
function
f
(){
a
.
onload
=
a
.
onerror
=
a
.
onreadystatechange
=
null
,
d
||
v
.
debug
||
Q
.
removeChild
(
a
),
a
=
null
,
c
()}
var
g
=
"
onload
"
in
a
;
return
!
d
||!
V
&&
g
?(
g
?(
a
.
onload
=
f
,
a
.
onerror
=
function
(){
C
(
"
error
"
,{
uri
:
e
,
node
:
a
}),
f
()}):
a
.
onreadystatechange
=
function
(){
/loaded|complete/
.
test
(
a
.
readyState
)
&&
f
()},
b
):(
setTimeout
(
function
(){
q
(
a
,
c
)},
1
),
b
)}
function
q
(
a
,
b
){
var
c
=
a
.
sheet
,
d
;
if
(
V
)
c
&&
(
d
=!
0
);
else
if
(
c
)
try
{
c
.
cssRules
&&
(
d
=!
0
)}
catch
(
e
){
"
NS_ERROR_DOM_SECURITY_ERR
"
===
e
.
name
&&
(
d
=!
0
)}
setTimeout
(
function
(){
d
?
b
():
q
(
a
,
b
)},
20
)}
function
r
(){
if
(
T
)
return
T
;
if
(
U
&&
"
interactive
"
===
U
.
readyState
)
return
U
;
for
(
var
a
=
Q
.
getElementsByTagName
(
"
script
"
),
b
=
a
.
length
-
1
;
b
>=
0
;
b
--
){
var
c
=
a
[
b
];
if
(
"
interactive
"
===
c
.
readyState
)
return
U
=
c
}}
function
s
(
a
){
var
b
=
[];
return
a
.
replace
(
X
,
""
).
replace
(
W
,
function
(
a
,
c
,
d
){
d
&&
b
.
push
(
d
)}),
b
}
function
t
(
a
,
b
){
this
.
uri
=
a
,
this
.
dependencies
=
b
||
[],
this
.
exports
=
null
,
this
.
status
=
0
,
this
.
_waitings
=
{},
this
.
_remain
=
0
}
if
(
!
a
.
seajs
){
var
u
=
a
.
seajs
=
{
version
:
"
2.2.1
"
},
v
=
u
.
data
=
{},
w
=
c
(
"
Object
"
),
x
=
c
(
"
String
"
),
y
=
Array
.
isArray
||
c
(
"
Array
"
),
z
=
c
(
"
Function
"
),
A
=
0
,
B
=
v
.
events
=
{};
u
.
on
=
function
(
a
,
b
){
var
c
=
B
[
a
]
||
(
B
[
a
]
=
[]);
return
c
.
push
(
b
),
u
},
u
.
off
=
function
(
a
,
b
){
if
(
!
a
&&!
b
)
return
B
=
v
.
events
=
{},
u
;
var
c
=
B
[
a
];
if
(
c
)
if
(
b
)
for
(
var
d
=
c
.
length
-
1
;
d
>=
0
;
d
--
)
c
[
d
]
===
b
&&
c
.
splice
(
d
,
1
);
else
delete
B
[
a
];
return
u
};
var
C
=
u
.
emit
=
function
(
a
,
b
){
var
c
=
B
[
a
],
d
;
if
(
c
)
for
(
c
=
c
.
slice
();
d
=
c
.
shift
();)
d
(
b
);
return
u
},
D
=
/
[^
?#
]
*
\/
/
,
E
=
/
\/\.\/
/g
,
F
=
/
\/[^/]
+
\/\.\.\/
/
,
G
=
/
([^
:
/])\/\/
/g
,
H
=
/^
([^/
:
]
+
)(\/
.+
)
$/
,
I
=
/{
([^
{
]
+
)
}/g
,
J
=
/^
\/\/
.|:
\/
/
,
K
=
/^.*
?\/\/
.*
?\/
/
,
L
=
document
,
M
=
e
(
L
.
URL
),
N
=
L
.
scripts
,
O
=
L
.
getElementById
(
"
seajsnode
"
)
||
N
[
N
.
length
-
1
],
P
=
e
(
n
(
O
)
||
M
);
u
.
resolve
=
m
;
var
Q
=
L
.
head
||
L
.
getElementsByTagName
(
"
head
"
)[
0
]
||
L
.
documentElement
,
R
=
Q
.
getElementsByTagName
(
"
base
"
)[
0
],
S
=
/
\.
css
(?:\?
|$
)
/i
,
T
,
U
,
V
=+
navigator
.
userAgent
.
replace
(
/.*
(?:
AppleWebKit|AndroidWebKit
)\/(\d
+
)
.*/
,
"
$1
"
)
<
536
;
u
.
request
=
o
;
var
W
=
/"
(?:\\
"|
[^
"
])
*"|'
(?:\\
'|
[^
'
])
*'|
\/\*[\S\s]
*
?\*\/
|
\/(?:\\\/
|
[^\/\r\n])
+
\/(?=[^\/])
|
\/\/
.*|
\.\s
*require|
(?:
^|
[^
$
])\b
require
\s
*
\(\s
*
([
"'
])(
.+
?)\1\s
*
\)
/g
,
X
=
/
\\\\
/g
,
Y
=
u
.
cache
=
{},
Z
,
$
=
{},
_
=
{},
ab
=
{},
bb
=
t
.
STATUS
=
{
FETCHING
:
1
,
SAVED
:
2
,
LOADING
:
3
,
LOADED
:
4
,
EXECUTING
:
5
,
EXECUTED
:
6
};
t
.
prototype
.
resolve
=
function
(){
for
(
var
a
=
this
,
b
=
a
.
dependencies
,
c
=
[],
d
=
0
,
e
=
b
.
length
;
e
>
d
;
d
++
)
c
[
d
]
=
t
.
resolve
(
b
[
d
],
a
.
uri
);
return
c
},
t
.
prototype
.
load
=
function
(){
var
a
=
this
;
if
(
!
(
a
.
status
>=
bb
.
LOADING
)){
a
.
status
=
bb
.
LOADING
;
var
c
=
a
.
resolve
();
C
(
"
load
"
,
c
);
for
(
var
d
=
a
.
_remain
=
c
.
length
,
e
,
f
=
0
;
d
>
f
;
f
++
)
e
=
t
.
get
(
c
[
f
]),
e
.
status
<
bb
.
LOADED
?
e
.
_waitings
[
a
.
uri
]
=
(
e
.
_waitings
[
a
.
uri
]
||
0
)
+
1
:
a
.
_remain
--
;
if
(
0
===
a
.
_remain
)
return
a
.
onload
(),
b
;
var
g
=
{};
for
(
f
=
0
;
d
>
f
;
f
++
)
e
=
Y
[
c
[
f
]],
e
.
status
<
bb
.
FETCHING
?
e
.
fetch
(
g
):
e
.
status
===
bb
.
SAVED
&&
e
.
load
();
for
(
var
h
in
g
)
g
.
hasOwnProperty
(
h
)
&&
g
[
h
]()}},
t
.
prototype
.
onload
=
function
(){
var
a
=
this
;
a
.
status
=
bb
.
LOADED
,
a
.
callback
&&
a
.
callback
();
var
b
=
a
.
_waitings
,
c
,
d
;
for
(
c
in
b
)
b
.
hasOwnProperty
(
c
)
&&
(
d
=
Y
[
c
],
d
.
_remain
-=
b
[
c
],
0
===
d
.
_remain
&&
d
.
onload
());
delete
a
.
_waitings
,
delete
a
.
_remain
},
t
.
prototype
.
fetch
=
function
(
a
){
function
c
(){
u
.
request
(
g
.
requestUri
,
g
.
onRequest
,
g
.
charset
)}
function
d
(){
delete
$
[
h
],
_
[
h
]
=!
0
,
Z
&&
(
t
.
save
(
f
,
Z
),
Z
=
null
);
var
a
,
b
=
ab
[
h
];
for
(
delete
ab
[
h
];
a
=
b
.
shift
();)
a
.
load
()}
var
e
=
this
,
f
=
e
.
uri
;
e
.
status
=
bb
.
FETCHING
;
var
g
=
{
uri
:
f
};
C
(
"
fetch
"
,
g
);
var
h
=
g
.
requestUri
||
f
;
return
!
h
||
_
[
h
]?(
e
.
load
(),
b
):
$
[
h
]?(
ab
[
h
].
push
(
e
),
b
):(
$
[
h
]
=!
0
,
ab
[
h
]
=
[
e
],
C
(
"
request
"
,
g
=
{
uri
:
f
,
requestUri
:
h
,
onRequest
:
d
,
charset
:
v
.
charset
}),
g
.
requested
||
(
a
?
a
[
g
.
requestUri
]
=
c
:
c
()),
b
)},
t
.
prototype
.
exec
=
function
(){
function
a
(
b
){
return
t
.
get
(
a
.
resolve
(
b
)).
exec
()}
var
c
=
this
;
if
(
c
.
status
>=
bb
.
EXECUTING
)
return
c
.
exports
;
c
.
status
=
bb
.
EXECUTING
;
var
e
=
c
.
uri
;
a
.
resolve
=
function
(
a
){
return
t
.
resolve
(
a
,
e
)},
a
.
async
=
function
(
b
,
c
){
return
t
.
use
(
b
,
c
,
e
+
"
_async_
"
+
d
()),
a
};
var
f
=
c
.
factory
,
g
=
z
(
f
)?
f
(
a
,
c
.
exports
=
{},
c
):
f
;
return
g
===
b
&&
(
g
=
c
.
exports
),
delete
c
.
factory
,
c
.
exports
=
g
,
c
.
status
=
bb
.
EXECUTED
,
C
(
"
exec
"
,
c
),
g
},
t
.
resolve
=
function
(
a
,
b
){
var
c
=
{
id
:
a
,
refUri
:
b
};
return
C
(
"
resolve
"
,
c
),
c
.
uri
||
u
.
resolve
(
c
.
id
,
b
)},
t
.
define
=
function
(
a
,
c
,
d
){
var
e
=
arguments
.
length
;
1
===
e
?(
d
=
a
,
a
=
b
):
2
===
e
&&
(
d
=
c
,
y
(
a
)?(
c
=
a
,
a
=
b
):
c
=
b
),
!
y
(
c
)
&&
z
(
d
)
&&
(
c
=
s
(
""
+
d
));
var
f
=
{
id
:
a
,
uri
:
t
.
resolve
(
a
),
deps
:
c
,
factory
:
d
};
if
(
!
f
.
uri
&&
L
.
attachEvent
){
var
g
=
r
();
g
&&
(
f
.
uri
=
g
.
src
)}
C
(
"
define
"
,
f
),
f
.
uri
?
t
.
save
(
f
.
uri
,
f
):
Z
=
f
},
t
.
save
=
function
(
a
,
b
){
var
c
=
t
.
get
(
a
);
c
.
status
<
bb
.
SAVED
&&
(
c
.
id
=
b
.
id
||
a
,
c
.
dependencies
=
b
.
deps
||
[],
c
.
factory
=
b
.
factory
,
c
.
status
=
bb
.
SAVED
)},
t
.
get
=
function
(
a
,
b
){
return
Y
[
a
]
||
(
Y
[
a
]
=
new
t
(
a
,
b
))},
t
.
use
=
function
(
b
,
c
,
d
){
var
e
=
t
.
get
(
d
,
y
(
b
)?
b
:[
b
]);
e
.
callback
=
function
(){
for
(
var
b
=
[],
d
=
e
.
resolve
(),
f
=
0
,
g
=
d
.
length
;
g
>
f
;
f
++
)
b
[
f
]
=
Y
[
d
[
f
]].
exec
();
c
&&
c
.
apply
(
a
,
b
),
delete
e
.
callback
},
e
.
load
()},
t
.
preload
=
function
(
a
){
var
b
=
v
.
preload
,
c
=
b
.
length
;
c
?
t
.
use
(
b
,
function
(){
b
.
splice
(
0
,
c
),
t
.
preload
(
a
)},
v
.
cwd
+
"
_preload_
"
+
d
()):
a
()},
u
.
use
=
function
(
a
,
b
){
return
t
.
preload
(
function
(){
t
.
use
(
a
,
b
,
v
.
cwd
+
"
_use_
"
+
d
())}),
u
},
t
.
define
.
cmd
=
{},
a
.
define
=
t
.
define
,
u
.
Module
=
t
,
v
.
fetchedList
=
_
,
v
.
cid
=
d
,
u
.
require
=
function
(
a
){
var
b
=
t
.
get
(
t
.
resolve
(
a
));
return
b
.
status
<
bb
.
EXECUTING
&&
(
b
.
onload
(),
b
.
exec
()),
b
.
exports
};
var
cb
=
/^
(
.+
?\/)(\?\?)?(
seajs
\/)
+/
;
v
.
base
=
(
P
.
match
(
cb
)
||
[
""
,
P
])[
1
],
v
.
dir
=
P
,
v
.
cwd
=
M
,
v
.
charset
=
"
utf-8
"
,
v
.
preload
=
function
(){
var
a
=
[],
b
=
location
.
search
.
replace
(
/
(
seajs-
\w
+
)(
&|$
)
/g
,
"
$1=1$2
"
);
return
b
+=
"
"
+
L
.
cookie
,
b
.
replace
(
/
(
seajs-
\w
+
)
=1/g
,
function
(
b
,
c
){
a
.
push
(
c
)}),
a
}(),
u
.
config
=
function
(
a
){
for
(
var
b
in
a
){
var
c
=
a
[
b
],
d
=
v
[
b
];
if
(
d
&&
w
(
d
))
for
(
var
e
in
c
)
d
[
e
]
=
c
[
e
];
else
y
(
d
)?
c
=
d
.
concat
(
c
):
"
base
"
===
b
&&
(
"
/
"
!==
c
.
slice
(
-
1
)
&&
(
c
+=
"
/
"
),
c
=
l
(
c
)),
v
[
b
]
=
c
}
return
C
(
"
config
"
,
a
),
u
}}}(
this
);
define
(
"
core
"
,
[
"
zepto.extend.fx
"
,
"
zepto.extend.data
"
,
"
zepto.extend.selector
"
],
function
(
require
,
exports
,
module
)
{
...
...
dist/assets/js/amui.min.js
浏览文件 @
1c43c22a
此差异已折叠。
点击以展开。
dist/assets/js/amui.widget.helper.js
浏览文件 @
1c43c22a
(
function
(
undefined
)
{
var
registerIfCondHelper
=
function
(
hbs
)
{
hbs
.
registerHelper
(
'
ifCond
'
,
function
(
v1
,
operator
,
v2
,
options
)
{
switch
(
operator
)
{
case
'
==
'
:
return
(
v1
==
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
case
'
===
'
:
return
(
v1
===
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
case
'
<
'
:
return
(
v1
<
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
case
'
<=
'
:
return
(
v1
<=
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
case
'
>
'
:
return
(
v1
>
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
case
'
>=
'
:
return
(
v1
>=
v2
)
?
options
.
fn
(
this
)
:
options
.
inverse
(
this
);
break
;
default
:
return
options
.
inverse
(
this
)
break
;
}
return
options
.
inverse
(
this
);
});
};
if
(
typeof
module
!==
'
undefined
'
&&
module
.
exports
)
{
module
.
exports
=
registerIfCondHelper
;
}
this
.
Handlebars
&&
registerIfCondHelper
(
Handlebars
);
}).
call
(
this
);
(
function
(
undefined
){
var
registerAMUIPartials
=
function
(
hbs
)
{
hbs
.
registerPartial
(
"
accordion
"
,
"
{{#this}}
\n
<section data-am-widget=
\"
accordion
\"
class=
\"
am-accordion {{#if theme}}am-accordion-{{theme}}{{else}}am-accordion-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}
\"
{{#if id}} id=
\"
{{id}}
\"
{{/if}} data-accordion-settings='{ {{#if options.multiple}}
\"
multiple
\"
: true{{/if}} }'>
\n
{{#each content}}
\n
<dl class=
\"
am-accordion-item{{#if active}} am-active{{/if}}
\"
>
\n
<dt class=
\"
am-accordion-title
\"
>
\n
{{{title}}}
\n
</dt>
\n
<dd class=
\"
am-accordion-content
\"
>
\n
{{{content}}}
\n
</dd>
\n
</dl>
\n
{{/each}}
\n
</section>
\n
{{/this}}
"
);
...
...
@@ -57,6 +18,8 @@
hbs
.
registerPartial
(
"
map
"
,
"
{{#this}}
\n
<div data-am-widget=
\"
map
\"
class=
\"
am-map {{#if theme}}am-map-{{theme}}{{else}}am-map-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}
\"\n
data-name=
\"
{{options.name}}
\"
data-address=
\"
{{options.address}}
\"
data-longitude=
\"
{{options.longitude}}
\"
data-latitude=
\"
{{options.latitude}}
\"
>
\n
<div id=
\"
bd-map
\"
></div>
\n
</div>
\n
{{/this}}
"
);
hbs
.
registerPartial
(
"
mechat
"
,
"
{{#this}}
\n
<section data-am-widget=
\"
mechat
\"
class=
\"
am-mechat{{#if theme}} am-mechat-{{theme}}{{else}} am-mechat-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}
\"
{{#if id}} id=
\"
{{id}}
\"
{{/if}} {{#if options.unitid}}data-am-mechat-unitid=
\"
{{options.unitid}}
\"
{{/if}}>
\n
<div id=
\"
mechat
\"
></div>
\n
</section>
\n
{{/this}}
"
);
hbs
.
registerPartial
(
"
menu
"
,
"
{{#this}}
\n
{{#if options.offCanvas}} {{!-- offCanvas Wrap--}}
\n
<div class=
\"
am-offcanvas
\"
id=
\"
{{options.offCanvasId}}
\"
>
\n
<div class=
\"
am-offcanvas-bar{{#if options.offCanvasFlip}} am-offcanvas-bar-flip{{/if}}
\"
>
\n
{{/if}}
\n
{{#if content}}
\n
<ul data-am-widget=
\"
menu
\"
class=
\"
{{#if options.cols}}sm-block-grid-{{options.cols}}{{else}}sm-block-grid-1{{/if}} am-menu am-menu-lv1{{#if theme}} am-menu-{{theme}}{{else}} am-menu-default{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}
\"
{{options.dataset}} {{#if id}}id=
\"
{{id}}
\"
{{/if}}>
\n
{{#each content}}
\n
<li class=
\"
am-menu-item{{#if subMenu}} am-parent{{/if}}{{#if className}} {{className}}{{/if}}
\"
>
\n
<a href=
\"
{{link}}
\"
>{{{title}}}</a>
\n
{{#if subMenu}}
\n
<ul class=
\"
am-menu-sub am-menu-lv2{{#if subCols}} sm-block-grid-{{subCols}}{{else}} sm-block-grid-1{{/if}} {{subMenuClassName}}
\"
>
\n
{{#each subMenu}}
\n
<li class=
\"
am-menu-item{{#if subMenu}} am-parent{{/if}}{{#if className}} {{className}}{{/if}}
\"
>
\n
<a href=
\"
{{link}}
\"
>{{{title}}}</a>
\n
{{#if subMenu}}{{!--三级菜单--}}
\n
<ul class=
\"
am-menu-sub am-menu-lv3{{#if subCols}} sm-block-grid-{{subCols}}{{else}} sm-block-grid-1{{/if}}
\"
>
\n
{{#each subMenu}}
\n
<li class=
\"
am-menu-item{{#if className}} {{className}}{{/if}}
\"
>
\n
<a href=
\"
{{link}}
\"
>{{{title}}}</a>
\n
</li>
\n
{{/each}}
\n
</ul>
\n
{{/if}}
\n
</li>
\n
{{/each}}
\n
</ul>
\n
{{/if}}
\n
</li>
\n
{{/each}}
\n
</ul>
\n
{{/if}}
\n
{{#if options.offCanvas}}
\n
</div>
\n
</div>
\n
{{/if}}
\n
{{/this}}
"
);
hbs
.
registerPartial
(
"
navbar
"
,
"
{{#this}}
\n
<div data-am-widget=
\"
navbar
\"
class=
\"
am-navbar am-cf {{#if theme}}am-navbar-{{theme}}{{else}}am-navbar-default{{/if}} {{#if options.iconpos}}am-navbar-{{options.iconpos}}{{/if}}{{#if widgetId}} {{widgetId}}{{/if}}{{#if className}} {{className}}{{/if}}
\"\n
id=
\"
{{id}}
\"
>
\n
{{#if content}}
\n
<ul class=
\"
am-cf {{#if options.cols}}sm-block-grid-{{options.cols}}{{/if}}
\"
>
\n
{{#each content}}
\n
<li class=
\"
am-navbar-item
\"
{{#if dataApi}}{{dataApi}}{{/if}}>
\n
<a href=
\"
{{#if link}}{{link}}{{/if}}
\"
>
\n
{{#if customIcon}}
\n
<img src=
\"
{{customIcon}}
\"
alt=
\"
{{{title}}}
\"
/>
\n
{{else}}
\n
{{#if icon}}
\n
<span class=
\"
am-icon-{{icon}}
\"
></span>
\n
{{/if}}
\n
{{/if}}
\n
{{#if title}}
\n
{{{title}}}
\n
{{/if}}
\n
</a>
\n
</li>
\n
{{/each}}
\n
</ul>
\n
{{/if}}
\n
</div>
\n
{{/this}}
\n
"
);
...
...
dist/assets/js/amui.widget.helper.min.js
浏览文件 @
1c43c22a
此差异已折叠。
点击以展开。
gulpfile.js
浏览文件 @
1c43c22a
var
path
=
require
(
'
path
'
);
var
fs
=
require
(
'
fs-extra
'
);
var
_
=
require
(
'
lodash
'
);
var
format
=
require
(
'
util
'
).
format
;
var
gulp
=
require
(
'
gulp
'
);
var
gutil
=
require
(
'
gulp-util
'
);
...
...
@@ -23,29 +25,75 @@ var buildTmpDir = '.build/tmp/';
var
jsPaths
=
{
widgets
:
[
'
*/src/*.js
'
,
'
!{powered_by,switch_mode,toolbar,tech_support,layout*,blank,container}/src/*.js
'
]
'
!{powered_by,switch_mode,toolbar,tech_support,layout*,blank,container}/src/*.js
'
],
hbsHelper
:
[
'
vendor/amazeui.hbs.helper.js
'
,
'
vendor/amazeui.hbs.partials.js
'
]
};
var
now
=
new
Date
();
var
banner
=
[
'
/*! <%= pkg.name %> - v<%= pkg.version %>
'
,
'
(c)
'
+
gutil
.
date
(
now
,
'
yyyy
'
)
+
'
AllMobilize, Inc.
'
,
'
(c)
'
+
gutil
.
date
(
now
,
'
yyyy
'
)
+
'
AllMobilize, Inc.
'
,
'
@license <%= pkg.license %>
'
,
gutil
.
date
(
now
,
'
yyyy-mm-dd HH:mm:ss
'
)
+
'
*/
\r
'
gutil
.
date
(
now
,
'
yyyy-mm-dd HH:mm:ss
'
)
+
'
*/
\r
'
].
join
(
'
|
'
);
// write widgets style and tpl
var
getWidgetFiles
=
function
()
{
var
fsOptions
=
{
encoding
:
'
utf8
'
};
var
uiBase
=
fs
.
readFileSync
(
'
./less/amui.less
'
,
fsOptions
);
var
WIDGET_DIR
=
'
./widget
'
;
var
rejectWidgets
=
[
'
.DS_Store
'
,
'
blank
'
,
'
layout2
'
,
'
layout3
'
,
'
layout4
'
,
'
container
'
,
'
powered_by
'
,
'
tech_support
'
,
'
toolbar
'
,
'
switch_mode
'
];
var
allWidgets
=
_
.
reject
(
fs
.
readdirSync
(
WIDGET_DIR
),
function
(
widget
)
{
return
rejectWidgets
.
indexOf
(
widget
)
>
-
1
;
});
var
partials
=
'
(function(undefined){
\n
'
;
partials
+=
'
var registerAMUIPartials = function(hbs) {
\n
'
;
_
.
forEach
(
allWidgets
,
function
(
widget
)
{
// read widget package.json
var
pkg
=
fs
.
readJsonFileSync
(
path
.
join
(
WIDGET_DIR
,
widget
,
'
package.json
'
));
var
srcPath
=
'
../widget/
'
+
widget
+
'
/src/
'
;
uiBase
+=
'
\r\n
//
'
+
widget
+
'
\r\n
'
;
uiBase
+=
'
@import "
'
+
srcPath
+
pkg
.
style
+
'
";
'
+
"
\r\n
"
;
_
.
forEach
(
pkg
.
themes
,
function
(
item
,
index
)
{
if
(
!
item
.
hidden
&&
item
.
name
)
{
uiBase
+=
'
@import "
'
+
srcPath
+
widget
+
'
.
'
+
item
.
name
+
'
.less";
'
+
"
\r\n
"
;
}
});
// read tpl
var
tpl
=
fs
.
readFileSync
(
path
.
join
(
WIDGET_DIR
,
widget
,
'
src
'
,
widget
+
'
.hbs
'
),
fsOptions
);
partials
+=
format
(
'
hbs.registerPartial("%s", %s);
\n\n
'
,
widget
,
JSON
.
stringify
(
tpl
));
});
fs
.
writeFileSync
(
'
./less/amui.all.less
'
,
uiBase
);
partials
+=
'
};
\n\n
'
;
partials
+=
'
if (typeof module !==
\'
undefined
\'
&& module.exports) {
\n
'
;
partials
+=
'
module.exports = registerAMUIPartials;
\n
'
+
'
}
\n\n
'
;
partials
+=
'
this.Handlebars && registerAMUIPartials(Handlebars);
\n
'
;
partials
+=
'
}).call(this);
\n
'
;
// write partials
fs
.
writeFileSync
(
path
.
join
(
'
./vendor/amazeui.hbs.partials.js
'
),
partials
);
};
// build to dist dir
// build to dist dir
gulp
.
task
(
'
buildLess
'
,
function
()
{
gulp
.
src
([
'
./less/amui.all.less
'
])
//.pipe(watch())
.
pipe
(
less
({
paths
:
[
path
.
join
(
__dirname
,
'
less
'
),
path
.
join
(
__dirname
,
'
widget/*/src
'
)]
}))
.
pipe
(
gulp
.
dest
(
'
./dist/assets/css
'
))
.
pipe
(
minifyCSS
())
// Disable advanced optimizations - selector & property merging, reduction, etc.
// for Issue #19 https://github.com/allmobilize/amazeui/issues/19
.
pipe
(
minifyCSS
({
noAdvanced
:
true
}))
.
pipe
(
rename
({
suffix
:
'
.min
'
,
extname
:
"
.css
"
...
...
@@ -95,8 +143,8 @@ gulp.task('transport', ['copyUIJs'], function() {
// concat
gulp
.
task
(
'
concat
'
,
[
'
transport
'
],
function
()
{
var
seajs
=
path
.
join
(
__dirname
,
'
vendor/seajs/sea.js
'
);
var
seaUse
=
path
.
join
(
__dirname
,
'
/.build/seaUse.js
'
);
var
seajs
=
path
.
join
(
__dirname
,
'
vendor/seajs/sea.js
'
);
var
seaUse
=
path
.
join
(
__dirname
,
'
/.build/seaUse.js
'
);
fs
.
outputFileSync
(
seaUse
,
'
seajs.use(
'
+
JSON
.
stringify
(
modules
)
+
'
);
'
);
modules
=
[];
...
...
@@ -128,7 +176,7 @@ gulp.task('clean', ['concat'], function() {
gulp
.
task
(
'
hbsHelper
'
,
function
()
{
gulp
.
src
(
[
'
docs/assets/helper/handlebars.js
'
,
'
vendor/amazeui.partials.js
'
]
)
gulp
.
src
(
jsPaths
.
hbsHelper
)
.
pipe
(
concat
(
'
amui.widget.helper.js
'
))
.
pipe
(
gulp
.
dest
(
'
./dist/assets/js
'
))
.
pipe
(
uglify
({
...
...
@@ -144,6 +192,7 @@ gulp.task('hbsHelper', function() {
.
pipe
(
gulp
.
dest
(
'
./dist/assets/js
'
))
});
gulp
.
task
(
'
widgetsFile
'
,
getWidgetFiles
);
// Rerun the task when a file changes
...
...
@@ -152,24 +201,25 @@ gulp.task('watch', function() {
gulp
.
watch
([
'
less/**/*.less
'
,
'
widget/*/src/*.less
'
],
[
'
buildLess
'
]);
gulp
.
watch
([
'
dist/amui*js
'
],
[
'
copyFiles
'
]);
gulp
.
watch
([
'
docs/assets/js/main.js
'
],
[
'
amazeMain
'
]);
gulp
.
watch
([
'
widget/**/*.json
'
,
'
widget/**/*.hbs
'
],
[
'
widgetsFile
'
]);
gulp
.
watch
(
jsPaths
.
hbsHelper
,
[
'
hbsHelper
'
]);
});
gulp
.
task
(
'
zip
'
,
function
()
{
gulp
.
task
(
'
zip
'
,
function
()
{
return
gulp
.
src
([
'
./docs/boilerplate/**
'
,
'
./dist/**
'
,
'
!dist/demo/**/*
'
,
'
!dist/test/**/*
'
,
'
!dist/docs/**/*
'
,
'
!dist/*.zip
'
,
'
docs/examples/blog.html
'
,
'
docs/examples/landing.html
'
,
'
docs/examples/login.html
'
,
'
docs/examples/sidebar.html
'
'
docs/examples/blog.html
'
,
'
docs/examples/landing.html
'
,
'
docs/examples/login.html
'
,
'
docs/examples/sidebar.html
'
])
.
pipe
(
zip
(
'
AmazeUI.zip
'
,
{
comment
:
'
Created on
'
+
gutil
.
date
(
now
,
'
yyyy-mm-dd HH:mm:ss
'
)}))
.
pipe
(
zip
(
'
AmazeUI
-1.0.0-beta1
.zip
'
,
{
comment
:
'
Created on
'
+
gutil
.
date
(
now
,
'
yyyy-mm-dd HH:mm:ss
'
)}))
.
pipe
(
gulp
.
dest
(
'
dist
'
));
});
gulp
.
task
(
'
buildJs
'
,
[
'
copyWidgetJs
'
,
'
copyUIJs
'
,
'
transport
'
,
'
concat
'
,
'
clean
'
]);
gulp
.
task
(
'
init
'
,
[
'
bower
'
,
'
buildJs
'
,
'
hbsHelper
'
,
'
buildLess
'
,
'
watch
'
]);
//
gulp.task('init', ['bower', 'buildJs', 'hbsHelper', 'buildLess', 'watch']);
gulp
.
task
(
'
default
'
,
[
'
buildJs
'
,
'
buildLess
'
,
'
hbsHelper
'
,
'
watch
'
]);
gulp
.
task
(
'
default
'
,
[
'
widgetsFile
'
,
'
buildJs
'
,
'
buildLess
'
,
'
hbsHelper
'
,
'
watch
'
]);
\ No newline at end of file
less/amui.all.less
浏览文件 @
1c43c22a
/*!
* Amaze UI
1.0.0 alpha
* Amaze UI
0.9.0
*
* @author: Amaze UI Team
* @copyright: AllMobilize Inc.
...
...
@@ -62,7 +62,6 @@
// Print
@import "print.less";
// accordion
@import "../widget/accordion/src/accordion.less";
@import "../widget/accordion/src/accordion.default.less";
...
...
@@ -114,6 +113,10 @@
@import "../widget/map/src/map.less";
@import "../widget/map/src/map.default.less";
// mechat
@import "../widget/mechat/src/mechat.less";
@import "../widget/mechat/src/mechat.default.less";
// menu
@import "../widget/menu/src/menu.less";
@import "../widget/menu/src/menu.default.less";
...
...
less/amui.less
浏览文件 @
1c43c22a
/*!
* Amaze UI
1.0.0 alpha
* Amaze UI
0.9.0
*
* @author: Amaze UI Team
* @copyright: AllMobilize Inc.
...
...
vendor/amazeui.hbs.partials.js
0 → 100644
浏览文件 @
1c43c22a
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录