Skip to content

Commit 1395a03

Browse files
committed
Merge pull request #30 from zhangxinxu/develop
Develop
2 parents c8e0201 + cb9370a commit 1395a03

File tree

7 files changed

+93
-3
lines changed

7 files changed

+93
-3
lines changed

ReadMe.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@ Single Page Switching bone for mobile web APP, Hybird APP, Phonegap, ...
77
use <code>npm</code>:
88
<pre>npm install mobilebone</pre>
99

10+
Examples and Tests and Documents
11+
------------------
12+
<ul>
13+
<li>Example1: [http://iancj.github.io/qq/](http://iancj.github.io/qq/)</li>
14+
<li>Example2: [http://baozoumanhua.com/mobile_makers/](http://baozoumanhua.com/mobile_makers/)</li>
15+
</ul>
16+
17+
<ul>
18+
<li>Test page: [test/index.html](http://rawgit.com/zhangxinxu/mobilebone/develop/test/index.html)</li>
19+
</ul>
20+
21+
<ul>
22+
<li>Documents: [docs/index.html](http://rawgit.com/zhangxinxu/mobilebone/develop/docs/index.html)</li>
23+
</ul>
24+
1025
Why need this?
1126
-----------------
1227
Interaction experience is good enough to compare with the native APP. <br>
@@ -49,6 +64,23 @@ mobilebone.js
4964
=============
5065
单页切换骨架。适用于移动web APP, Hybird混合APP, Phonegap开发等。
5166

67+
后面为使用Mobilebone实现的栗子一枚:[http://iancj.github.io/qq/](http://iancj.github.io/qq/)
68+
69+
实例、测试和文档
70+
------------------
71+
<ul>
72+
<li>实例1-仿QQ界面:[http://iancj.github.io/qq/](http://iancj.github.io/qq/)</li>
73+
<li>实例2-暴走漫画制作器:[http://baozoumanhua.com/mobile_makers/](http://baozoumanhua.com/mobile_makers/)</li>
74+
</ul>
75+
76+
<ul>
77+
<li>测试页面:[test/index.html](http://rawgit.com/zhangxinxu/mobilebone/develop/test/index.html)</li>
78+
</ul>
79+
80+
<ul>
81+
<li>中文文档:[docs/index.html](http://rawgit.com/zhangxinxu/mobilebone/develop/docs/index.html)</li>
82+
</ul>
83+
5284
为何需要?
5385
-------------
5486
类原生APP的过场体验,适用于这些场景:<br>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mobilebone",
3-
"version": "1.2.0",
3+
"version": "2.0.1",
44
"description": "Bone main for mobile web APP with a sigle page mode.",
55
"main": "src/mobilebone.js",
66
"directories": {

src/mobilebone.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
*
4141
* @type string
4242
**/
43-
Mobilebone.VERSION = '1.2.0';
43+
Mobilebone.VERSION = '2.0.1';
4444

4545
/**
4646
* Whether catch attribute of href from element with tag 'a'
@@ -865,6 +865,7 @@
865865
var element = null, parent = this;
866866
var popup = function() {
867867
parent = parent.parentElement;
868+
if (!parent) return null;
868869
var tagParent = parent.tagName.toLowerCase();
869870
if (tagParent === tag) {
870871
element = parent;

test/form-submit/zxx.lib.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
/* 大小不定元素垂直居中 */
273273
.dib_vm{display:inline-block; width:0; height:100%; vertical-align:middle;}
274274
/* 加载中背景图片 */
275-
.loading{background:url(http://www.zhangxinxu.com/study/image/loading.gif) no-repeat center;}
275+
/*.loading{background:url(http://www.zhangxinxu.com/study/image/loading.gif) no-repeat center;}*/
276276
/* 无框文本框文本域 */
277277
.bd_none{border:0; outline:none;}
278278
/* 按钮禁用 */

test/history/ajax-page.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<html>
2+
<head>
3+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4+
<title>被请求的HTML</title>
5+
</head>
6+
7+
<body>
8+
<div class="page out"><a href="#pageHome" data-rel="back">返回</a></div>
9+
</body>
10+
</html>

test/history/history.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
6+
<title>复杂url与history前进后退测试</title>
7+
<link rel="stylesheet" href="../../src/mobilebone.css">
8+
<link rel="stylesheet" href="../test.css">
9+
</head>
10+
11+
<body>
12+
<div id="pageHome" class="page out">
13+
<ul>
14+
<li><a href="#page1">浏览器返回测试-页面1</a></li>
15+
<li><a href="#page2">浏览器返回测试-页面2</a></li>
16+
<li><a href="#page3">浏览器返回测试-页面3</a></li>
17+
</ul>
18+
<ul>
19+
<li><a href="ajax-page.html?for=test-history">ajax请求页面</a></li>
20+
</ul>
21+
<ul>
22+
<li><a href="../index.html" data-ajax="false">&laquo; 返回测试引导首页</a></li>
23+
</ul>
24+
</div>
25+
<div id="page1" class="page out"><a href="#pageHome" data-rel="back">&laquo;返回1</a></div>
26+
<div id="page2" class="page out"><a href="#pageHome" data-rel="back">&laquo;返回2</a></div>
27+
<div id="page3" class="page out"><a href="#pageHome" data-rel="back">&laquo;返回3</a></div>
28+
29+
<script src="../../src/mobilebone.js"></script>
30+
</body>
31+
</html>

test/history/index.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
6+
<title>跳转</title>
7+
</head>
8+
9+
<body>
10+
跳转中...
11+
12+
<script>
13+
location.replace('history.html?redirect_url=aHR0cDovL3d3dy5qaW5yaXRlbWFpLmNvbS9wcm9kdWN0L2RldGFpbD9waWQ9MTQwMDEzMTAzMDgzODM=&buy_now=1');
14+
</script>
15+
</body>
16+
</html>

0 commit comments

Comments
 (0)