File tree 6 files changed +18
-8
lines changed
6 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " mobilebone" ,
3
- "version" : " 1.1 .3" ,
3
+ "version" : " 2.4 .3" ,
4
4
"main" : " src/mobilebone.js" ,
5
5
"license" : " MIT" ,
6
6
"dependencies" : {},
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " mobilebone" ,
3
- "version" : " 2.4.2 " ,
3
+ "version" : " 2.4.3 " ,
4
4
"description" : " Bone main for mobile web APP with a sigle page mode." ,
5
5
"main" : " src/mobilebone.js" ,
6
6
"directories" : {
Original file line number Diff line number Diff line change 38
38
*
39
39
* @type string
40
40
**/
41
- Mobilebone . VERSION = '2.4.2 ' ;
41
+ Mobilebone . VERSION = '2.4.3 ' ;
42
42
43
43
/**
44
44
* Whether catch attribute of href from element with tag 'a'
285
285
}
286
286
287
287
// do transition
288
- if ( pageOut ) pageInto . classList . add ( params_in . form ) ;
288
+ if ( pageOut ) pageInto . classList . add ( params_in . form ) ;
289
289
// iOS bug
290
290
// reflow for fixing issues #80, #86
291
291
pageInto . offsetWidth = pageInto . offsetWidth ;
298
298
299
299
// do callback when come in first time
300
300
var onpagefirstinto = params_in . onpagefirstinto ;
301
- if ( ! store [ pageid ] ) {
301
+ if ( ! store [ pageid ] && ! store [ hashid ] ) {
302
302
if ( typeof onpagefirstinto == "string" && params_in . root [ onpagefirstinto ] ) {
303
303
params_in . root [ onpagefirstinto ] ( pageInto , pageOut , options ) ;
304
304
} else if ( typeof onpagefirstinto == "function" ) {
362
362
// store page-id, just once
363
363
if ( ! store [ pageid ] ) {
364
364
store [ pageid ] = pageInto ;
365
+ // when we back/prev, we need to get true
366
+ if ( hashid !== pageid ) {
367
+ store [ hashid ] = pageInto ;
368
+ }
365
369
}
366
370
367
371
// do callback every time
Original file line number Diff line number Diff line change 27
27
< li > < a href ="root-reload.php?id=2 " data-reload ="root "> 根地址不缓存2</ a > </ li >
28
28
</ ul >
29
29
< ul >
30
- < li > < a href ="b.html "> 连续加载测试-加载b页面</ a > </ li >
30
+ < li > < a href ="b.html " data-reload ="root "> 连续加载测试-加载b页面</ a > </ li >
31
+ < li > < a href ="b.html?a=1 " data-reload ="true "> 连续加载测试-加载b页面</ a > </ li >
31
32
</ ul >
32
33
< ul >
33
34
< li > < a href ="http://www.zhangxinxu.com/sp/char.html " target ="_blank "> 外部地址测试,应该直接跳转</ a > </ li >
38
39
</ div >
39
40
40
41
< script src ="../../src/mobilebone.js "> </ script >
42
+ < script src ="../complex/js/zepto-docs.js "> </ script >
41
43
< script >
42
44
var optionsTest = function ( elein , eleout , options ) {
43
45
// ajax过场回调options参数测试
60
62
} ;
61
63
62
64
var page_b_first = function ( ) {
63
- // console.log("first?");
65
+ console . log ( "first?" ) ;
66
+ } ;
67
+ var page_root_first = function ( ) {
68
+ console . log ( "root?" ) ;
64
69
} ;
65
70
</ script >
66
71
</ body >
Original file line number Diff line number Diff line change 5
5
</head>
6
6
7
7
<body>
8
- <div class="page out" data-callback="root_reload">
8
+ <div class="page out" data-callback="root_reload" data-onpagefirstinto="page_root_first" >
9
9
<p>document.getElementById("idShow").innerHTML是:<strong id="idShow"> </strong>,应该结果是<strong id="idShould"><?php echo $ _GET ['id ' ]; ?> </strong>.</p>
10
10
<ul>
11
11
<li><a href="#pageHome" data-rel="back">返回</a></li>
Original file line number Diff line number Diff line change 14
14
< li class ="p5 bgf0 mt1 btc "> 搜索结果1</ li >
15
15
< li class ="p5 bgf0 mt1 btc "> 搜索结果2</ li >
16
16
< li class ="p5 bgf0 mt1 btc "> 搜索结果3</ li >
17
+ < li > < a href ="../ajax-html/c.html "> C页面</ a > </ li >
17
18
< li > < a href ="#pageHome " data-rel ="back "> 点此返回</ a > </ li >
18
19
</ ul >
19
20
</ div >
You can’t perform that action at this time.
0 commit comments