[TemporaryStorage] add files required for SDK build
[samples/web/TemporaryStorage.git] / tizen-web-ui-fw / latest / themes / tizen-white / theme.js
1 (function( $, undefined ) {
2 //$.mobile.page.prototype.options.backBtnTheme  = "s";
3
4 // Clear default theme for child elements
5 $( function ( o ) {
6         o.headerTheme = "s";
7         o.footerTheme = "s";
8 } ( $.mobile.page.prototype.options ) );
9
10 // clear listview
11 ( function ( o ) {
12         o.theme = "s";
13         o.countTheme = "s";
14         o.headerTheme = "s";
15         o.dividerTheme = "s";
16         o.splitTheme = "s";
17 } ( $.mobile.listview.prototype.options ) );
18
19 // Collapsible
20 ( function ( o ) {
21         o.heading = o.heading + ',li';          // Add listitem as a heading
22         o.inset = false;
23         o.iconPos = "right";    // Move iconPos to right position
24         o.collapsedIcon = "arrow-u";
25         o.expandedIcon = "arrow-d";
26         o.animation = true;
27         o.customEventHandler = function ( isCollapse ) {
28                 var self = this,
29                         c = $(self).children('.ui-collapsible-content')[0];
30
31                 function _getHeight( el ) {
32                         var h = 0,
33                                 heading = $( el ).children('.ui-collapsible-heading')[0],
34                                 content = $( el ).children('.ui-collapsible-content')[0];
35
36                         h += heading.clientHeight;
37                         $( content ).children().each ( function ( idx, _el ) {
38                                 if ( $( _el ).hasClass( 'ui-collapsible' ) ) {  // recursive call for nested collapsible list
39                                         h += _getHeight( _el );
40
41                                 } else {
42                                         h += _el.clientHeight;
43                                 }
44                         } );
45                         return h;
46                 }
47
48                 if ( isCollapse ) {     // collapse!
49                         // remember current height
50                         $( c ).data( 'max-height', _getHeight( self ) );
51                         $( self ).parentsUntil( '.ui-page', '.ui-collapsible' ).each( function( idx, el ) {
52                                 var content = $( el ).children('.ui-collapsible-content')[0];
53                                 $( content ).data( 'max-height', _getHeight( el ) );
54                         } );
55
56                 } else {        // expand!
57                         h = $( c ).data( 'max-height' );
58                         if ( !h ) {
59                                 h = document.body.clientHeight;
60                                 $( c ).data( 'max-height', h );
61                         }
62                         $( c ).css( 'max-height', h );
63                         $( self ).parentsUntil( '.ui-page', '.ui-collapsible' ).each( function( idx, el ) {
64                                 var content = $( el ).children('.ui-collapsible-content')[0];
65                                 $( content ).css( 'max-height', _getHeight( el ) );
66                         } );
67                 }
68         };
69 } ( $.mobile.collapsible.prototype.options ) );
70
71 //clear button theme
72 $.mobile.button.prototype.options.theme = "s";
73 $.fn.buttonMarkup.defaults.theme = "s";
74
75 // Default theme swatch
76 $.mobile.page.prototype.options.theme = "s";
77
78 // Original scale of the theme
79 $.tizen.frameworkData.defaultViewportWidth = 360;       // Fit to device-width
80 $.tizen.frameworkData.defaultFontSize = 22;
81
82 })(jQuery);