From 21cd249e72c21b400b18fb4e18d7b449392dce50 Mon Sep 17 00:00:00 2001
From: Przemyslaw Ciezkowski
Date: Tue, 12 Mar 2013 12:34:53 +0100
Subject: [PATCH] Refactor virtual grid demo subpages
Move js code to 1 file, change directory structure.
Change-Id: I807e5ed1e5d6b35a74125db44ac9e2a01cf69de3
---
.../widgets/grid/{css => }/namecard.css | 0
.../widgets/grid/{js => }/virtualgrid-db-demo.js | 0
.../widgets/grid/virtualgrid-list.html | 23 +++------------------
.../widgets/grid/virtualgrid-rotation.html | 21 +++----------------
.../widgets/grid/virtualgrid-size.html | 19 +++--------------
.../tizen-winsets/widgets/grid/virtualgrid-x.html | 21 +++----------------
demos/tizen-winsets/widgets/grid/virtualgrid.html | 24 ++++------------------
demos/tizen-winsets/widgets/grid/virtualgrid.js | 12 +++++++++++
8 files changed, 28 insertions(+), 92 deletions(-)
rename demos/tizen-winsets/widgets/grid/{css => }/namecard.css (100%)
mode change 100755 => 100644
rename demos/tizen-winsets/widgets/grid/{js => }/virtualgrid-db-demo.js (100%)
mode change 100755 => 100644
create mode 100644 demos/tizen-winsets/widgets/grid/virtualgrid.js
diff --git a/demos/tizen-winsets/widgets/grid/css/namecard.css b/demos/tizen-winsets/widgets/grid/namecard.css
old mode 100755
new mode 100644
similarity index 100%
rename from demos/tizen-winsets/widgets/grid/css/namecard.css
rename to demos/tizen-winsets/widgets/grid/namecard.css
diff --git a/demos/tizen-winsets/widgets/grid/js/virtualgrid-db-demo.js b/demos/tizen-winsets/widgets/grid/virtualgrid-db-demo.js
old mode 100755
new mode 100644
similarity index 100%
rename from demos/tizen-winsets/widgets/grid/js/virtualgrid-db-demo.js
rename to demos/tizen-winsets/widgets/grid/virtualgrid-db-demo.js
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid-list.html b/demos/tizen-winsets/widgets/grid/virtualgrid-list.html
index 7603fdc..6804634 100644
--- a/demos/tizen-winsets/widgets/grid/virtualgrid-list.html
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid-list.html
@@ -1,4 +1,4 @@
-
+
Virtual Grid - List
@@ -17,23 +17,6 @@
-
-
+
+
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid-rotation.html b/demos/tizen-winsets/widgets/grid/virtualgrid-rotation.html
index ae99c4f..c4913a0 100644
--- a/demos/tizen-winsets/widgets/grid/virtualgrid-rotation.html
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid-rotation.html
@@ -1,4 +1,4 @@
-
+
Virtual Grid - Rotation
@@ -18,21 +18,6 @@
-
-
+
+
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid-size.html b/demos/tizen-winsets/widgets/grid/virtualgrid-size.html
index 8517dee..c6f0993 100644
--- a/demos/tizen-winsets/widgets/grid/virtualgrid-size.html
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid-size.html
@@ -1,4 +1,4 @@
-
+
Virtual Grid - Size
@@ -18,19 +18,6 @@
-
-
+
+
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid-x.html b/demos/tizen-winsets/widgets/grid/virtualgrid-x.html
index d45092f..914b1cc 100644
--- a/demos/tizen-winsets/widgets/grid/virtualgrid-x.html
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid-x.html
@@ -1,4 +1,4 @@
-
+
Virtual Grid - X
@@ -18,21 +18,6 @@
-
-
+
+
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid.html b/demos/tizen-winsets/widgets/grid/virtualgrid.html
index f650d59..4af4ae9 100644
--- a/demos/tizen-winsets/widgets/grid/virtualgrid.html
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid.html
@@ -1,4 +1,4 @@
-
+
Virtual Grid
@@ -13,27 +13,11 @@
-
-
-
+
+
diff --git a/demos/tizen-winsets/widgets/grid/virtualgrid.js b/demos/tizen-winsets/widgets/grid/virtualgrid.js
new file mode 100644
index 0000000..f1cea8f
--- /dev/null
+++ b/demos/tizen-winsets/widgets/grid/virtualgrid.js
@@ -0,0 +1,12 @@
+$( "div.virtualgrid_grid_demo" ).one( "pagecreate", function () {
+ $.getScript( "virtualgrid-db-demo.js", function ( data, textStatus, jqXHR ) {
+ $( ":jqmData(role='virtualgrid')" ).virtualgrid( "create", {
+ itemData: function ( idx ) {
+ return JSON_DATA[ idx ];
+ },
+ numItemData: JSON_DATA.length,
+ cacheItemData: function ( minIdx, maxIdx ) {
+ }
+ });
+ });
+});
\ No newline at end of file
--
2.7.4