File tree Expand file tree Collapse file tree 1 file changed +23
-10
lines changed Expand file tree Collapse file tree 1 file changed +23
-10
lines changed Original file line number Diff line number Diff line change @@ -24,27 +24,40 @@ typecode-js v 0.1
24
24
25
25
o = $ . extend ( {
26
26
name :'' ,
27
- classes :{ } ,
28
- features :[ ]
27
+ page :{
28
+ classes : { } ,
29
+ features : [ ]
30
+ } ,
31
+ inner_page : {
32
+ classes : { } ,
33
+ features : [ ]
34
+ }
29
35
} , options ) ;
30
36
31
- this . features = o . features ;
32
37
this . classes = o . classes ;
33
38
this . events = $ ( { } ) ;
34
39
this . runtime = { } ;
35
40
36
- if ( o . features . length ) {
37
- for ( i in o . features ) {
38
- if ( $ . isFunction ( o . features [ i ] ) ) {
39
- if ( this . features [ i ] ( this ) === false ) {
41
+ this . initialize_features ( o . page . features ) ;
42
+ this . initialize_features ( o . inner_page . features ) ;
43
+ o . page . initialized = true ;
44
+
45
+ this . events . trigger ( 'app.featuresInitialized' ) ;
46
+ }
47
+
48
+ App . prototype . initialize_features = function ( features ) {
49
+ var i ;
50
+
51
+ if ( features . length ) {
52
+ for ( i in features ) {
53
+ if ( $ . isFunction ( features [ i ] ) ) {
54
+ if ( features [ i ] ( this ) === false ) {
40
55
break ;
41
56
}
42
57
}
43
58
}
44
59
}
45
-
46
- this . events . trigger ( 'app.featuresInitialized' ) ;
47
- }
60
+ } ;
48
61
49
62
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
50
63
You can’t perform that action at this time.
0 commit comments