1 $( document ).bind("pagecreate", function () {
3 $("#demo-date").bind("date-changed", function ( e, newDate ) {
4 $("#selected-date1").text( newDate.toString() );
7 $("#demo-date2").bind("date-changed", function ( e, newDate ) {
8 $("#selected-date2").text( newDate.toString() );
11 $("#demo-date3").bind("date-changed", function ( e, newDate ) {
12 $("#selected-date3").text( newDate.toString() );
15 $("#demo-date4").bind("date-changed", function ( e, newDate ) {
16 $("#selected-date4").text( newDate.toString() );
19 $("#demo-date5").bind("date-changed", function ( e, newDate ) {
20 $("#selected-date5").text( newDate.toString() );
23 $("#demo-date6").bind("date-changed", function ( e, newDate ) {
24 $("#selected-date6").text( newDate.toString() );
27 $('#noti-demo').bind('vmouseup', function ( e ) {
28 $('#notification').notification('open');
31 $('#noti-icon1').bind('vclick', function ( e ) {
32 $('#notification').notification('icon', './test/icon02.png');
35 $('#noti-icon2').bind('vclick', function ( e ) {
36 $('#notification').notification('icon', './test/icon01.png');
39 $('#gallery-demo').bind('pageshow', function () {
40 $('#gallery').gallery('add', './test/01.jpg');
41 $('#gallery').gallery('add', './test/02.jpg');
42 $('#gallery').gallery('add', './test/03.jpg');
43 $('#gallery').gallery('add', './test/04.jpg');
44 $('#gallery').gallery('add', './test/05.jpg');
45 $('#gallery').gallery('add', './test/06.jpg');
46 $('#gallery').gallery('add', './test/07.jpg');
47 $('#gallery').gallery('add', './test/08.jpg');
48 $('#gallery').gallery('add', './test/09.jpg');
49 $('#gallery').gallery('refresh', 3);
52 $('#gallery-demo').bind('pagebeforehide', function () {
53 $('#gallery').gallery('empty');
56 $('#gallery-add').bind('vmouseup', function ( e ) {
57 $('#gallery').gallery('add', './test/10.jpg');
58 $('#gallery').gallery('add', './test/11.jpg');
59 $('#gallery').gallery('refresh');
62 $('#gallery-del').bind('vmouseup', function ( e ) {
63 $('#gallery').gallery('remove');
66 /* Gen list : Dummy DB load */
67 $( document ).on( "pagecreate", ".virtuallist_demo_page", function () {
68 /* ?_=ts code for no cache mechanism */
69 $.getScript( "./virtuallist-db-demo.js", function ( data, textStatus ) {
70 $("ul").filter( function () {
71 return $( this ).data("role") == "virtuallistview";
72 }).addClass("vlLoadSuccess");
74 $(".virtuallist_demo_page").die();
75 $("ul.ui-virtual-list-container").virtuallistview("create");
79 /*Expandable list : Dummy DB load*/
80 $( document ).on( "pagecreate", "#genlist_extendable_page", function () {
81 /*?_=ts code for no cache mechanism*/
82 $.getScript( "./virtuallist-db-demo.js", function ( data, textStatus ) {
83 $("ul").filter( function () {
84 return $( this ).data("role") == "extendablelist";
85 }).addClass("elLoadSuccess");
87 $("#genlist-extendable-page").die();
88 $("ul.ui-extendable-list-container").extendablelist("create");
89 // TODO: 'create' is called twice!!
93 // Expand all textarea height automatically
94 $( document ).on( "pagecreate", "#ButtonNolist", function ( ev ) {
95 var page = $( ev.target );
96 $( page ).bind( 'pageshow' , function ( ) {
97 var textarea = page.find('textarea');
98 $( textarea ).each( function ( idx, el ) {
99 var h = Math.max( el.clientHeight, el.scrollHeight );
107 $(document).bind( "pageinit" , function() {
108 $.mobile.tizen.enableSelection( $("div:jqmData(role='page')"), 'none' );
110 $(document).ready( function () {
111 // add current datetime with browser language format
112 // NOTE: Globalize.* functions must be run after docoument ready.
113 $('#current_date').html(Globalize.culture().name + " -- " +
114 Globalize.format( new Date(), "F" ));
115 $('#html_font_size').html('html font size:' + $('html').css('font-size'));