Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
d7337b08
Commit
d7337b08
authored
Apr 22, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除hello mui中的app.js,精简工程代码
parent
3512eca7
Changes
55
Show whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
556 additions
and
548 deletions
+556
-548
examples/hello-mui/examples/accordion.html
examples/hello-mui/examples/accordion.html
+3
-2
examples/hello-mui/examples/actionsheet-plus.html
examples/hello-mui/examples/actionsheet-plus.html
+3
-2
examples/hello-mui/examples/actionsheet.html
examples/hello-mui/examples/actionsheet.html
+25
-23
examples/hello-mui/examples/ajax.html
examples/hello-mui/examples/ajax.html
+3
-2
examples/hello-mui/examples/badges.html
examples/hello-mui/examples/badges.html
+3
-2
examples/hello-mui/examples/buttons-with-badges.html
examples/hello-mui/examples/buttons-with-badges.html
+3
-2
examples/hello-mui/examples/buttons-with-block.html
examples/hello-mui/examples/buttons-with-block.html
+3
-2
examples/hello-mui/examples/buttons-with-icons.html
examples/hello-mui/examples/buttons-with-icons.html
+3
-2
examples/hello-mui/examples/buttons.html
examples/hello-mui/examples/buttons.html
+3
-2
examples/hello-mui/examples/checkbox.html
examples/hello-mui/examples/checkbox.html
+3
-2
examples/hello-mui/examples/dialog.html
examples/hello-mui/examples/dialog.html
+4
-5
examples/hello-mui/examples/grid-default.html
examples/hello-mui/examples/grid-default.html
+3
-2
examples/hello-mui/examples/grid-pagination.html
examples/hello-mui/examples/grid-pagination.html
+1
-4
examples/hello-mui/examples/icons.html
examples/hello-mui/examples/icons.html
+3
-4
examples/hello-mui/examples/info.html
examples/hello-mui/examples/info.html
+3
-2
examples/hello-mui/examples/input.html
examples/hello-mui/examples/input.html
+3
-2
examples/hello-mui/examples/list-triplex-row.html
examples/hello-mui/examples/list-triplex-row.html
+3
-2
examples/hello-mui/examples/list-with-input.html
examples/hello-mui/examples/list-with-input.html
+3
-2
examples/hello-mui/examples/media-list.html
examples/hello-mui/examples/media-list.html
+3
-2
examples/hello-mui/examples/nav.html
examples/hello-mui/examples/nav.html
+105
-106
examples/hello-mui/examples/oa-grid.html
examples/hello-mui/examples/oa-grid.html
+3
-2
examples/hello-mui/examples/offcanvas-drag-left-plus-main.html
...les/hello-mui/examples/offcanvas-drag-left-plus-main.html
+0
-1
examples/hello-mui/examples/offcanvas-drag-left-plus-menu.html
...les/hello-mui/examples/offcanvas-drag-left-plus-menu.html
+1
-4
examples/hello-mui/examples/offcanvas-drag-left.html
examples/hello-mui/examples/offcanvas-drag-left.html
+8
-9
examples/hello-mui/examples/offcanvas-drag-right-plus-main.html
...es/hello-mui/examples/offcanvas-drag-right-plus-main.html
+174
-175
examples/hello-mui/examples/offcanvas-drag-right-plus-menu.html
...es/hello-mui/examples/offcanvas-drag-right-plus-menu.html
+1
-5
examples/hello-mui/examples/offcanvas-drag-right.html
examples/hello-mui/examples/offcanvas-drag-right.html
+1
-4
examples/hello-mui/examples/pagination.html
examples/hello-mui/examples/pagination.html
+3
-4
examples/hello-mui/examples/popovers.html
examples/hello-mui/examples/popovers.html
+3
-2
examples/hello-mui/examples/pullrefresh.html
examples/hello-mui/examples/pullrefresh.html
+0
-2
examples/hello-mui/examples/radio.html
examples/hello-mui/examples/radio.html
+3
-2
examples/hello-mui/examples/range.html
examples/hello-mui/examples/range.html
+3
-2
examples/hello-mui/examples/slider-default.html
examples/hello-mui/examples/slider-default.html
+70
-66
examples/hello-mui/examples/slider-table-default.html
examples/hello-mui/examples/slider-table-default.html
+3
-2
examples/hello-mui/examples/slider-table-pagination.html
examples/hello-mui/examples/slider-table-pagination.html
+1
-4
examples/hello-mui/examples/slider-with-title.html
examples/hello-mui/examples/slider-with-title.html
+3
-2
examples/hello-mui/examples/switches.html
examples/hello-mui/examples/switches.html
+3
-2
examples/hello-mui/examples/tab-webview-main.html
examples/hello-mui/examples/tab-webview-main.html
+0
-1
examples/hello-mui/examples/tab-webview-subpage-about.html
examples/hello-mui/examples/tab-webview-subpage-about.html
+3
-2
examples/hello-mui/examples/tab-webview-subpage-chat.html
examples/hello-mui/examples/tab-webview-subpage-chat.html
+0
-2
examples/hello-mui/examples/tab-webview-subpage-contact.html
examples/hello-mui/examples/tab-webview-subpage-contact.html
+3
-2
examples/hello-mui/examples/tab-webview-subpage-setting.html
examples/hello-mui/examples/tab-webview-subpage-setting.html
+3
-2
examples/hello-mui/examples/tab-with-segmented-control.html
examples/hello-mui/examples/tab-with-segmented-control.html
+3
-2
examples/hello-mui/examples/tabbar-labels-only.html
examples/hello-mui/examples/tabbar-labels-only.html
+3
-2
examples/hello-mui/examples/tabbar-with-submenus.html
examples/hello-mui/examples/tabbar-with-submenus.html
+4
-3
examples/hello-mui/examples/tabbar.html
examples/hello-mui/examples/tabbar.html
+3
-2
examples/hello-mui/examples/tableviews-with-badges.html
examples/hello-mui/examples/tableviews-with-badges.html
+18
-2
examples/hello-mui/examples/tableviews-with-collapses.html
examples/hello-mui/examples/tableviews-with-collapses.html
+18
-2
examples/hello-mui/examples/tableviews-with-swipe.html
examples/hello-mui/examples/tableviews-with-swipe.html
+1
-5
examples/hello-mui/examples/tableviews.html
examples/hello-mui/examples/tableviews.html
+3
-2
examples/hello-mui/examples/template.html
examples/hello-mui/examples/template.html
+14
-2
examples/hello-mui/examples/template_pullrefresh.html
examples/hello-mui/examples/template_pullrefresh.html
+12
-2
examples/hello-mui/examples/typography.html
examples/hello-mui/examples/typography.html
+3
-2
examples/hello-mui/js/app.js
examples/hello-mui/js/app.js
+0
-44
examples/hello-mui/list.html
examples/hello-mui/list.html
+2
-9
No files found.
examples/hello-mui/examples/accordion.html
View file @
d7337b08
...
...
@@ -124,9 +124,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</body>
...
...
examples/hello-mui/examples/actionsheet-plus.html
View file @
d7337b08
...
...
@@ -77,9 +77,10 @@
<p
id=
"info"
></p>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
mui
(
'
body
'
).
on
(
'
shown
'
,
'
.mui-popover
'
,
function
(
e
)
{
//console.log('shown', e.detail.id);//detail为当前popover元素
});
...
...
examples/hello-mui/examples/actionsheet.html
View file @
d7337b08
...
...
@@ -28,13 +28,13 @@
margin-left
:
-15px
;
padding-right
:
10px
;
}
#info
{
padding
:
20px
10px
;
#info
{
padding
:
20px
10px
;
}
.des
{
.des
{
margin
:
.5em
0
;
}
.des
>
li
{
.des
>
li
{
font-size
:
14px
;
color
:
#8f8f94
;
}
...
...
@@ -69,7 +69,9 @@
<a
href=
"#picture"
class=
"mui-btn mui-btn-primary mui-btn-block mui-btn-outlined"
style=
"padding: 5px 20px;"
>
打开actionsheet
</a>
</p>
<p>
本页面为H5模式的actionsheet演示示例,该模式具有如下优点:
</p>
<ul
class=
"des"
><li>
可通过css自由定制展现样式
</li></ul>
<ul
class=
"des"
>
<li>
可通过css自由定制展现样式
</li>
</ul>
<p>
另一方面,H5模式的actionsheet也具备如下缺点:
</p>
<ul
class=
"des"
>
...
...
@@ -81,8 +83,6 @@
</div>
</div>
<div
id=
"delete"
class=
"mui-popover mui-popover-action mui-popover-bottom"
>
<ul
class=
"mui-table-view"
>
<li
class=
"mui-table-view-cell"
>
...
...
@@ -131,9 +131,10 @@
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
mui
(
'
body
'
).
on
(
'
shown
'
,
'
.mui-popover
'
,
function
(
e
)
{
//console.log('shown', e.detail.id);//detail为当前popover元素
});
...
...
@@ -141,17 +142,18 @@
//console.log('hidden', e.detail.id);//detail为当前popover元素
});
var
info
=
document
.
getElementById
(
"
info
"
);
mui
(
'
body
'
).
on
(
'
tap
'
,
'
.mui-popover-action li>a
'
,
function
()
{
var
a
=
this
,
parent
;
mui
(
'
body
'
).
on
(
'
tap
'
,
'
.mui-popover-action li>a
'
,
function
()
{
var
a
=
this
,
parent
;
//根据点击按钮,反推当前是哪个actionsheet
for
(
parent
=
a
.
parentNode
;
parent
!=
document
.
body
;
parent
=
parent
.
parentNode
)
{
if
(
parent
.
classList
.
contains
(
'
mui-popover-action
'
))
{
for
(
parent
=
a
.
parentNode
;
parent
!=
document
.
body
;
parent
=
parent
.
parentNode
)
{
if
(
parent
.
classList
.
contains
(
'
mui-popover-action
'
))
{
break
;
}
}
//关闭actionsheet
mui
(
'
#
'
+
parent
.
id
).
popover
(
'
toggle
'
);
info
.
innerHTML
=
"
你刚点击了
\"
"
+
a
.
innerHTML
+
"
\"
按钮
"
;
mui
(
'
#
'
+
parent
.
id
).
popover
(
'
toggle
'
);
info
.
innerHTML
=
"
你刚点击了
\"
"
+
a
.
innerHTML
+
"
\"
按钮
"
;
})
</script>
...
...
examples/hello-mui/examples/ajax.html
View file @
d7337b08
...
...
@@ -70,10 +70,11 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
(
function
(
$
)
{
mui
.
init
();
$
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
methodEl
=
document
.
getElementById
(
"
method
"
);
var
dataTypeEl
=
document
.
getElementById
(
"
dataType
"
);
var
respnoseEl
=
document
.
getElementById
(
"
response
"
);
...
...
examples/hello-mui/examples/badges.html
View file @
d7337b08
...
...
@@ -54,8 +54,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/buttons-with-badges.html
View file @
d7337b08
...
...
@@ -46,8 +46,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/buttons-with-block.html
View file @
d7337b08
...
...
@@ -48,8 +48,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/buttons-with-icons.html
View file @
d7337b08
...
...
@@ -69,8 +69,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/buttons.html
View file @
d7337b08
...
...
@@ -87,8 +87,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/checkbox.html
View file @
d7337b08
...
...
@@ -64,8 +64,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/dialog.html
View file @
d7337b08
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Hello MUI
</title>
...
...
@@ -50,11 +49,11 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
</script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
//mui初始化
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
info
=
document
.
getElementById
(
"
info
"
);
document
.
getElementById
(
"
alertBtn
"
).
addEventListener
(
'
tap
'
,
function
(){
mui
.
alert
(
'
欢迎使用Hello MUI
'
,
'
Hello MUI
'
,
function
(){
...
...
examples/hello-mui/examples/grid-default.html
View file @
d7337b08
...
...
@@ -61,8 +61,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/grid-pagination.html
View file @
d7337b08
...
...
@@ -228,11 +228,8 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
,
});
mui
.
init
();
mui
.
ready
(
function
()
{
var
slider
=
document
.
getElementById
(
'
Gallery
'
);
var
group
=
slider
.
querySelector
(
'
.mui-slider-group
'
);
...
...
examples/hello-mui/examples/icons.html
View file @
d7337b08
...
...
@@ -158,11 +158,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
</script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
active
=
null
,
lastid
,
span
;
mui
(
"
.mui-content
"
).
on
(
"
tap
"
,
"
a
"
,
function
()
{
...
...
examples/hello-mui/examples/info.html
View file @
d7337b08
...
...
@@ -59,9 +59,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
//处理点击事件,需要打开原生浏览器
mui
(
'
body
'
).
on
(
'
tap
'
,
'
a
'
,
function
(
e
)
{
var
href
=
this
.
getAttribute
(
'
href
'
);
...
...
examples/hello-mui/examples/input.html
View file @
d7337b08
...
...
@@ -55,9 +55,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
//语音识别完成事件
document
.
getElementById
(
"
search
"
).
addEventListener
(
'
recognized
'
,
function
(
e
)
{
console
.
log
(
e
.
detail
.
value
);
...
...
examples/hello-mui/examples/list-triplex-row.html
View file @
d7337b08
...
...
@@ -113,8 +113,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/list-with-input.html
View file @
d7337b08
...
...
@@ -76,8 +76,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/media-list.html
View file @
d7337b08
...
...
@@ -219,8 +219,9 @@
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/nav.html
View file @
d7337b08
...
...
@@ -10,22 +10,24 @@
<link
rel=
"stylesheet"
href=
"../css/mui.min.css"
>
<style>
html
,
body
{
html
,
body
{
background-color
:
#efeff4
;
}
.mui-bar
.mui-pull-left
.mui-icon
{
.mui-bar
.mui-pull-left
.mui-icon
{
padding-right
:
5px
;
font-size
:
28px
;
}
.mui-bar
.mui-btn
{
.mui-bar
.mui-btn
{
font-weight
:
normal
;
font-size
:
17px
;
}
.mui-bar
.mui-btn-link
{
.mui-bar
.mui-btn-link
{
top
:
1px
;
}
</style>
</head>
<body>
<header
id=
"header"
class=
"mui-bar mui-bar-nav"
>
...
...
@@ -34,8 +36,8 @@
</header>
<div
class=
"mui-content"
>
<p
style=
"margin: 35px 15px;"
>
这是nav bar(顶部导航栏)演示页面,
你可以在顶部导航中放置多种控件,点击如下单选框切换导航栏显示内容;
</p>
<p
style=
"margin: 35px 15px;"
>
这是nav bar(顶部导航栏)演示页面, 你可以在顶部导航中放置多种控件,点击如下单选框切换导航栏显示内容;
</p>
<h5
class=
"mui-content-padded"
>
左侧显示内容
</h5>
<form
class=
"mui-input-group"
>
<div
class=
"mui-input-row mui-radio"
>
...
...
@@ -68,43 +70,39 @@
</form>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
header
=
document
.
getElementById
(
"
header
"
);
//左侧icon
var
lefticon
=
document
.
createElement
(
'
a
'
);
lefticon
.
className
=
'
mui-action-back mui-icon mui-icon-left-nav mui-pull-left
'
;
lefticon
.
className
=
'
mui-action-back mui-icon mui-icon-left-nav mui-pull-left
'
;
//左侧图标+文字按钮
var
leftbtn
=
document
.
createElement
(
'
button
'
);
leftbtn
.
className
=
'
mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left
'
;
leftbtn
.
className
=
'
mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left
'
;
var
span
=
document
.
createElement
(
'
span
'
);
span
.
className
=
'
mui-icon mui-icon-left-nav
'
;
leftbtn
.
appendChild
(
span
);
var
text
=
document
.
createTextNode
(
'
首页
'
);
leftbtn
.
appendChild
(
text
);
//右侧icon
var
righticon
=
document
.
createElement
(
'
a
'
);
righticon
.
className
=
'
mui-icon mui-icon-bars mui-pull-right
'
;
righticon
.
className
=
'
mui-icon mui-icon-bars mui-pull-right
'
;
//右侧文字按钮
var
rightbtn
=
document
.
createElement
(
'
button
'
);
rightbtn
.
className
=
'
mui-btn mui-btn-blue mui-btn-link mui-pull-right
'
;
rightbtn
.
className
=
'
mui-btn mui-btn-blue mui-btn-link mui-pull-right
'
;
rightbtn
.
innerText
=
'
编辑
'
;
//删除原先存在的节点
function
remove
(
selector
)
{
function
remove
(
selector
)
{
var
elem
=
header
.
querySelector
(
selector
);
if
(
elem
)
{
if
(
elem
)
{
header
.
removeChild
(
elem
);
}
}
mui
(
'
.mui-input-group
'
).
on
(
'
change
'
,
'
input
'
,
function
()
{
if
(
this
.
checked
){
switch
(
this
.
value
){
mui
(
'
.mui-input-group
'
).
on
(
'
change
'
,
'
input
'
,
function
()
{
if
(
this
.
checked
)
{
switch
(
this
.
value
)
{
case
'
left-none
'
:
remove
(
'
.mui-pull-left
'
)
break
;
...
...
@@ -133,4 +131,5 @@
</script>
</body>
</html>
\ No newline at end of file
examples/hello-mui/examples/oa-grid.html
View file @
d7337b08
...
...
@@ -10,7 +10,6 @@
<link
rel=
"stylesheet"
href=
"../css/mui.min.css"
>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<style>
html
,
body
{
background-color
:
#efeff4
;
...
...
@@ -23,7 +22,9 @@
}
</style>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</head>
...
...
examples/hello-mui/examples/offcanvas-drag-left-plus-main.html
View file @
d7337b08
...
...
@@ -69,7 +69,6 @@
</form>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
var
main
,
menu
,
mask
=
mui
.
createMask
(
_closeMenu
);
var
showMenu
=
false
,
...
...
examples/hello-mui/examples/offcanvas-drag-left-plus-menu.html
View file @
d7337b08
...
...
@@ -75,11 +75,8 @@
</ul>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
mui
.
init
({
swipeBack
:
false
,
});
mui
.
init
();
var
main
=
null
;
mui
.
plusReady
(
function
()
{
main
=
plus
.
webview
.
currentWebview
().
opener
();
...
...
examples/hello-mui/examples/offcanvas-drag-left.html
View file @
d7337b08
...
...
@@ -148,7 +148,6 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
,
...
...
examples/hello-mui/examples/offcanvas-drag-right-plus-main.html
View file @
d7337b08
...
...
@@ -68,8 +68,7 @@
</form>
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
src=
"../js/mui.min.js"
></script>
<script>
var
main
,
menu
,
mask
=
mui
.
createMask
(
_closeMenu
);
var
showMenu
=
false
,
mode
=
'
main-move
'
;
...
...
examples/hello-mui/examples/offcanvas-drag-right-plus-menu.html
View file @
d7337b08
...
...
@@ -86,16 +86,12 @@
</ul>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
mui
.
init
({
swipeBack
:
false
});
mui
.
init
();
//获得侧滑主窗口webview对象
var
main
=
null
;
mui
.
plusReady
(
function
()
{
main
=
plus
.
webview
.
currentWebview
().
opener
();
})
function
closeMenu
()
{
mui
.
fire
(
main
,
"
menu:swipeleft
"
);
...
...
examples/hello-mui/examples/offcanvas-drag-right.html
View file @
d7337b08
...
...
@@ -147,11 +147,8 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
,
});
mui
.
init
();
//侧滑容器父节点
var
offCanvasWrapper
=
mui
(
'
#offCanvasWrapper
'
);
//主界面容器
...
...
examples/hello-mui/examples/pagination.html
View file @
d7337b08
...
...
@@ -189,11 +189,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
>
mui
.
init
();
</script>
<script>
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
(
function
(
$
)
{
$
(
'
.mui-pagination
'
).
on
(
'
tap
'
,
'
a
'
,
function
()
{
var
li
=
this
.
parentNode
;
...
...
examples/hello-mui/examples/popovers.html
View file @
d7337b08
...
...
@@ -156,9 +156,10 @@
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
mui
(
'
.mui-scroll-wrapper
'
).
scroll
();
mui
(
'
body
'
).
on
(
'
shown
'
,
'
.mui-popover
'
,
function
(
e
)
{
//console.log('shown', e.detail.id);//detail为当前popover元素
...
...
examples/hello-mui/examples/pullrefresh.html
View file @
d7337b08
...
...
@@ -28,10 +28,8 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
,
pullRefresh
:
{
container
:
'
#pullrefresh
'
,
down
:
{
...
...
examples/hello-mui/examples/radio.html
View file @
d7337b08
...
...
@@ -67,8 +67,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/range.html
View file @
d7337b08
...
...
@@ -69,9 +69,10 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
//监听input事件,获取range的value值,也可以直接element.value获取该range的值
var
rangeList
=
document
.
querySelectorAll
(
'
input[type="range"]
'
);
for
(
var
i
=
0
,
len
=
rangeList
.
length
;
i
<
len
;
i
++
){
...
...
examples/hello-mui/examples/slider-default.html
View file @
d7337b08
...
...
@@ -10,17 +10,19 @@
<link
rel=
"stylesheet"
href=
"../css/mui.min.css"
>
<style>
html
,
body
{
html
,
body
{
background-color
:
#efeff4
;
}
header
.mui-bar
{
header
.mui-bar
{
display
:
none
;
}
.mui-bar-nav
~
.mui-content
{
.mui-bar-nav
~
.mui-content
{
padding
:
0
;
}
</style>
</head>
<body>
<header
class=
"mui-bar mui-bar-nav"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
></a>
...
...
@@ -35,7 +37,8 @@
</div>
</li>
</ul>
<div
id=
"slider"
class=
"mui-slider"
>
</div>
<div
id=
"slider"
class=
"mui-slider"
>
<div
class=
"mui-slider-group mui-slider-loop"
>
<!-- 额外增加的一个节点(循环轮播:第一个节点是最后一张轮播) -->
<div
class=
"mui-slider-item mui-slider-item-duplicate"
>
...
...
@@ -81,11 +84,11 @@
<div
class=
"mui-indicator"
></div>
</div>
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
slider
=
mui
(
"
#slider
"
);
document
.
getElementById
(
"
switch
"
).
addEventListener
(
'
toggle
'
,
function
(
e
)
{
if
(
e
.
detail
.
isActive
)
{
...
...
@@ -100,4 +103,5 @@
});
</script>
</body>
</html>
\ No newline at end of file
examples/hello-mui/examples/slider-table-default.html
View file @
d7337b08
...
...
@@ -60,8 +60,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/slider-table-pagination.html
View file @
d7337b08
...
...
@@ -76,10 +76,7 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
});
mui
.
init
();
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/slider-with-title.html
View file @
d7337b08
...
...
@@ -87,9 +87,10 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
var
slider
=
mui
(
"
#slider
"
);
document
.
getElementById
(
"
switch
"
).
addEventListener
(
'
toggle
'
,
function
(
e
)
{
if
(
e
.
detail
.
isActive
)
{
...
...
examples/hello-mui/examples/switches.html
View file @
d7337b08
...
...
@@ -81,9 +81,10 @@
</ul>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
mui
(
'
.mui-content .mui-switch
'
).
each
(
function
()
{
//循环所有toggle
//toggle.classList.contains('mui-active') 可识别该toggle的开关状态
this
.
parentNode
.
querySelector
(
'
span
'
).
innerText
=
'
状态:
'
+
(
this
.
classList
.
contains
(
'
mui-active
'
)
?
'
true
'
:
'
false
'
);
...
...
examples/hello-mui/examples/tab-webview-main.html
View file @
d7337b08
...
...
@@ -39,7 +39,6 @@
</a>
</nav>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
charset=
"utf-8"
>
//mui初始化
mui
.
init
();
...
...
examples/hello-mui/examples/tab-webview-subpage-about.html
View file @
d7337b08
...
...
@@ -30,8 +30,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tab-webview-subpage-chat.html
View file @
d7337b08
...
...
@@ -75,10 +75,8 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
({
swipeBack
:
false
,
pullRefresh
:
{
container
:
'
#pullrefresh
'
,
down
:
{
...
...
examples/hello-mui/examples/tab-webview-subpage-contact.html
View file @
d7337b08
...
...
@@ -147,8 +147,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tab-webview-subpage-setting.html
View file @
d7337b08
...
...
@@ -65,9 +65,10 @@
</style>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
document
.
getElementById
(
"
about
"
).
addEventListener
(
'
tap
'
,
function
()
{
//获得主页面的webview
var
main
=
plus
.
webview
.
currentWebview
().
parent
();
...
...
examples/hello-mui/examples/tab-with-segmented-control.html
View file @
d7337b08
...
...
@@ -178,9 +178,10 @@
</div>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
(
function
(
$
)
{
$
(
'
#scroll
'
).
scroll
({
indicators
:
true
//是否显示滚动条
...
...
examples/hello-mui/examples/tabbar-labels-only.html
View file @
d7337b08
...
...
@@ -44,8 +44,9 @@
</nav>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tabbar-with-submenus.html
View file @
d7337b08
...
...
@@ -69,8 +69,9 @@
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tabbar.html
View file @
d7337b08
...
...
@@ -244,8 +244,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tableviews-with-badges.html
View file @
d7337b08
...
...
@@ -63,8 +63,24 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
window
.
addEventListener
(
'
toggle
'
,
function
(
event
)
{
if
(
event
.
target
.
id
===
'
M_Toggle
'
)
{
var
isActive
=
event
.
detail
.
isActive
;
var
table
=
document
.
querySelector
(
'
.mui-table-view
'
);
var
card
=
document
.
querySelector
(
'
.mui-card
'
);
if
(
isActive
)
{
card
.
appendChild
(
table
);
card
.
style
.
display
=
''
;
}
else
{
var
content
=
document
.
querySelector
(
'
.mui-content
'
);
content
.
insertBefore
(
table
,
card
);
card
.
style
.
display
=
'
none
'
;
}
}
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tableviews-with-collapses.html
View file @
d7337b08
...
...
@@ -68,8 +68,24 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
window
.
addEventListener
(
'
toggle
'
,
function
(
event
)
{
if
(
event
.
target
.
id
===
'
M_Toggle
'
)
{
var
isActive
=
event
.
detail
.
isActive
;
var
table
=
document
.
querySelector
(
'
.mui-table-view
'
);
var
card
=
document
.
querySelector
(
'
.mui-card
'
);
if
(
isActive
)
{
card
.
appendChild
(
table
);
card
.
style
.
display
=
''
;
}
else
{
var
content
=
document
.
querySelector
(
'
.mui-content
'
);
content
.
insertBefore
(
table
,
card
);
card
.
style
.
display
=
'
none
'
;
}
}
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/tableviews-with-swipe.html
View file @
d7337b08
...
...
@@ -135,12 +135,8 @@
</ul>
</div>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
//禁止右滑关闭
mui
.
init
({
swipeBack
:
false
});
mui
.
init
();
(
function
(
$
)
{
//$.swipeoutOpen(el,direction)//打开指定列的滑动菜单,el:指定列的dom对象,direction:取值left|right,指定打开的是左侧或右侧滑动菜单
//$.swipeoutClose(el);//关闭指定列的滑动菜单,el:指定列的dom对象
...
...
examples/hello-mui/examples/tableviews.html
View file @
d7337b08
...
...
@@ -79,8 +79,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/examples/template.html
View file @
d7337b08
...
...
@@ -73,7 +73,6 @@
<div
class=
"mui-loader"
>
加载中...
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
>
//启用双击监听
mui
.
init
({
...
...
@@ -81,6 +80,19 @@
doubletap
:
true
}
});
var
contentWebview
=
null
;
mui
.
back
=
function
()
{
var
current
=
plus
.
webview
.
currentWebview
();
current
.
hide
(
'
auto
'
);
setTimeout
(
function
()
{
document
.
getElementById
(
"
title
"
).
className
=
'
mui-title mui-fadeout
'
;
if
(
contentWebview
==
null
){
contentWebview
=
current
.
children
()[
0
];
}
contentWebview
.
hide
(
"
none
"
);
},
200
);
}
var
titleElem
=
document
.
getElementById
(
"
title
"
)
var
menu
=
document
.
getElementById
(
"
menu
"
)
...
...
@@ -97,7 +109,7 @@
}
menu
.
style
.
display
=
display
;
});
var
contentWebview
=
null
;
document
.
getElementById
(
"
menu
"
).
addEventListener
(
'
tap
'
,
function
(
e
)
{
e
.
stopPropagation
();
if
(
contentWebview
==
null
){
...
...
examples/hello-mui/examples/template_pullrefresh.html
View file @
d7337b08
...
...
@@ -66,7 +66,6 @@
<div
class=
"mui-content"
></div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script
type=
"text/javascript"
>
//启用双击监听
mui
.
init
({
...
...
@@ -74,13 +73,24 @@
doubletap
:
true
}
});
var
contentWebview
=
null
;
mui
.
back
=
function
()
{
var
current
=
plus
.
webview
.
currentWebview
();
current
.
hide
(
'
auto
'
);
setTimeout
(
function
()
{
document
.
getElementById
(
"
title
"
).
className
=
'
mui-title mui-fadeout
'
;
if
(
contentWebview
==
null
){
contentWebview
=
current
.
children
()[
0
];
}
contentWebview
.
hide
(
"
none
"
);
},
200
);
}
var
titleElem
=
document
.
getElementById
(
"
title
"
);
window
.
addEventListener
(
"
updateHeader
"
,
function
(
e
)
{
var
title
=
'
下拉刷新和上拉加载更多
'
;
titleElem
.
innerHTML
=
title
;
titleElem
.
className
=
"
mui-title mui-fadein
"
;
});
var
contentWebview
=
null
;
document
.
querySelector
(
'
header
'
).
addEventListener
(
'
doubletap
'
,
function
()
{
if
(
contentWebview
==
null
){
contentWebview
=
plus
.
webview
.
currentWebview
().
children
()[
0
];
...
...
examples/hello-mui/examples/typography.html
View file @
d7337b08
...
...
@@ -44,8 +44,9 @@
</div>
</body>
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/app.js"
></script>
<script>
mui
.
init
();
mui
.
init
({
swipeBack
:
true
//启用右滑关闭功能
});
</script>
</html>
\ No newline at end of file
examples/hello-mui/js/app.js
deleted
100644 → 0
View file @
3512eca7
(
function
(
$
)
{
//全局配置(通常所有页面引用该配置,特殊页面使用mui.init({})来覆盖全局配置)
$
.
initGlobal
({
swipeBack
:
true
});
var
back
=
$
.
back
;
$
.
back
=
function
()
{
var
current
=
plus
.
webview
.
currentWebview
();
if
(
current
.
mType
===
'
main
'
)
{
//模板主页面
current
.
hide
(
'
auto
'
);
setTimeout
(
function
()
{
document
.
getElementById
(
"
title
"
).
className
=
'
mui-title mui-fadeout
'
;
current
.
children
()[
0
].
hide
(
"
none
"
);
},
200
);
}
else
if
(
current
.
mType
===
'
sub
'
)
{
if
(
$
.
targets
.
_popover
)
{
$
(
$
.
targets
.
_popover
).
popover
(
'
hide
'
);
}
else
{
current
.
parent
().
evalJS
(
'
mui&&mui.back();
'
);
}
}
else
{
back
();
}
}
})(
mui
);
/**
* toggle
*/
window
.
addEventListener
(
'
toggle
'
,
function
(
event
)
{
if
(
event
.
target
.
id
===
'
M_Toggle
'
)
{
var
isActive
=
event
.
detail
.
isActive
;
var
table
=
document
.
querySelector
(
'
.mui-table-view
'
);
var
card
=
document
.
querySelector
(
'
.mui-card
'
);
if
(
isActive
)
{
card
.
appendChild
(
table
);
card
.
style
.
display
=
''
;
}
else
{
var
content
=
document
.
querySelector
(
'
.mui-content
'
);
content
.
insertBefore
(
table
,
card
);
card
.
style
.
display
=
'
none
'
;
}
}
});
\ No newline at end of file
examples/hello-mui/list.html
View file @
d7337b08
...
...
@@ -8,8 +8,6 @@
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
>
<link
rel=
"stylesheet"
href=
"css/mui.min.css"
>
<script
src=
"js/mui.min.js"
></script>
<script
src=
"js/app.js"
></script>
<style
type=
"text/css"
>
#list
{
/*避免导航边框和列表背景边框重叠,看起来像两条边框似得;*/
...
...
@@ -328,6 +326,7 @@
</li>
</ul>
</div>
<script
src=
"js/mui.min.js"
></script>
<script>
//只有ios支持的功能需要在Android平台隐藏;
if
(
mui
.
os
.
android
)
{
...
...
@@ -340,13 +339,7 @@
}
mui
.
init
({
preloadLimit
:
5
,
//同时并存的预加载窗口数量
swipeBack
:
false
,
keyEventBind
:
{
backbutton
:
false
}
});
mui
.
init
();
var
templates
=
{};
var
getTemplate
=
function
(
name
,
header
,
content
,
loading
)
{
var
template
=
templates
[
name
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment