Permalink
Browse files

added some sample data

  • Loading branch information...
1 parent e52d639 commit 91f47f73ad772749e093faf9cdc71970d62cf79a Boris Smus committed Nov 17, 2010
View
@@ -0,0 +1,35 @@
+{
+ "error": 0,
+ "data": [
+ {
+ "id": 0,
+ "name": "Prof. Elisa Santos",
+ "image": "images/author/santos.png"
+ },
+ {
+ "id": 1,
+ "name": "Tassio Marques",
+ "image": "images/author/marques.png"
+ },
+ {
+ "id": 2,
+ "name": "Mario Abreu",
+ "image": "images/author/abreu.png"
+ },
+ {
+ "id": 3,
+ "name": "Kelly Bennett",
+ "image": "images/author/bennett.png"
+ },
+ {
+ "id": 4,
+ "name": "Bernard Holtz",
+ "image": "images/author/holtz.png"
+ },
+ {
+ "id": 5,
+ "name": "Brett Campbell",
+ "image": "images/author/campbell.png"
+ }
+ ]
+}
View
@@ -0,0 +1,12 @@
+{
+ error: false,
+ data: [
+ {
+ id: 0,
+ posted: "October 19, 2010 11:13:00",
+ body:
+ },
+ {},
+ {}
+ ]
+}
View
@@ -14,7 +14,9 @@
<div data-role="content">
<ul data-role="listview" data-theme="c">
<li data-role="list-divider">Sunday, October 20</li>
- <li><a href="bmw.html">Portuguese assignment due</a></li>
+ <li>
+ <a href="bmw.html">Portuguese assignment due</a>
+ </li>
<li>
<h3><a href="bmw.html">School trip to Camacha</a></h3>
<p>In discussion – 2 comments</p>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -6,6 +6,7 @@
<link rel="stylesheet" href="style.css" />
<script src="external/jquery.min.js"></script>
<script src="external/jquery.mobile-1.0a2.min.js"></script>
+ <script src="jquery.mobile.listview.filter.category.js"></script>
<script src="scriptcache.js"></script>
</head>
<body>
@@ -0,0 +1,41 @@
+/*
+* jQuery Mobile Framework : "listview" filter extension
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+*/
+(function($, undefined ) {
+
+$.mobile.listview.prototype.options.categoryfilter = false;
+
+$( "[data-role='listview']" ).live( "listviewcreate", function() {
+ var list = $( this ),
+ listview = list.data( "listview" );
+ if ( !listview.options.categoryfilter ) {
+ return;
+ }
+
+ var wrapper = $( "<form>", { "class": "ui-listview-categoryfilter ui-bar-c", "role": "filter" } ),
+
+ search = $( "<input>", {
+ placeholder: "Filter results...",
+ "data-type": "search"
+ })
+ .bind( "keyup change", function() {
+ var val = this.value.toLowerCase();;
+ list.children().show();
+ if ( val ) {
+ list.children().filter(function() {
+ return $( this ).text().toLowerCase().indexOf( val ) === -1;
+ }).hide();
+ }
+
+ //listview._numberItems();
+ })
+ .appendTo( wrapper )
+ .textinput();
+
+ wrapper.insertBefore( list );
+});
+
+})( jQuery );
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Recommendations - Item</title>
+</head>
+<body>
+
+ <div data-role="page">
+
+ <div data-role="header">
+ <h1>Recommendations - Item</h1>
+ </div><!-- /header -->
+
+ <div data-role="content">
+ <div class="pt-header-rec">
+ <img src="images/person.png" />
+ Prof. Elisa Santos - Science
+ <div class="pt-date">yesterday</div>
+ </div>
+ <div>
+ <h3>Lisbon Oceanarium</h3>
+ <div>1990 Avenida do Mar, Lisbon Portugal</div>
+ <div>www.oceanarium.pt</div>
+ <img src="images/place.png" />
+ <div>
+ <h3>Details</h3>
+ <p>Price: Admission 11EUR ($14) adults, 5.25EUR
+ ($6.85) students and children under 13
+ Hours: Open Mon-Sat 9am-6pm</p>
+ </div>
+ </div>
+ <div data-role="navbar">
+ <ul>
+ <li><a href="#" data-icon="grid" data-iconpos="top">Map</a></li>
+ <li><a href="#" data-icon="star" data-iconpos="top">Email</a></li>
+ <li><a href="#" data-icon="gear" data-iconpos="top">SMS</a></li>
+ <li><a href="#" data-icon="gear" data-iconpos="top">Discuss</a></li>
+ </ul>
+ </div><!-- /navbar -->
+ </div><!-- /content -->
+
+ <div data-role="footer">
+ <h4>Page Footer</h4>
+ </div><!-- /header -->
+ </div><!-- /page -->
+
+</body>
+</html>
View
@@ -13,19 +13,36 @@
<div data-role="content">
<ul data-role="listview" data-theme="c">
+ <li data-role="list-divider">Places</li>
+ <li>
+ <h3><a href="recommendations-item.html">Lisbon Oceanarium</a></h3>
+ <p>www.oceanarium.pt</p>
+ <p>From Mario Abreu - Science</p>
+ </li>
<li data-role="list-divider">Online Readings</li>
<li>
<h3><a href="bmw.html">Ocean - Wikipedia</a></h3>
<p>An ocean is a major body of saline water, and a good source of protein</p>
<p>From Prof. Elisa Santos</p>
</li>
+ <li>
+ <h3><a href="bmw.html">Ocean Life - PBS Kids</a></h3>
+ <p>Welcome to Ocean Life for kids! Find quizzes and other fun stuff.</p>
+ <p>From Mario Abreu - Science</p>
+ </li>
+ <li data-role="list-divider">Movies</li>
+ <li>
+ <img src="images/movie.png" />
+ <h3><a href="#">Finding Nemo</a></h3>
+ <p>On Fox MEO next Thursday</p>
+ <p>From Prof. Elisa Santos</p>
+ </li>
</ul>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /header -->
</div><!-- /page -->
-
</body>
</html>
View
@@ -3,4 +3,16 @@
* We use the pt- prefix to avoid collisions with other CSS styles.
*/
-.pt-grade {position: absolute; left: 1px; width: 80px; height: 80px; font-size: 2em; text-align: center; top: 20px;}
+/* Updates screen */
+.pt-grade {position: absolute; left: 1px; width: 80px; height: 80px; font-size: 2em; text-align: center; top: 20px;}
+
+/* Accordion widget */
+.pt-accordion {display: none; height: 60px; margin-top: 20px;}
+.pt-accordion-body {position: absolute; left: 0; right: 0;}
+.pt-accordion-body * {position: relative;}
+.pt-accordion-body img {float: left;}
+
+.pt-accordion-open {background: darkgray;}
+.pt-accordion-open .pt-accordion {display: block;}
+.pt-accordion-open .pt-accordion-body {background: lightgray;}
+.pt-accordion-open .ui-icon {display: none;}
View
@@ -12,17 +12,29 @@
</div><!-- /header -->
<div data-role="content">
- <ul data-role="listview" data-theme="c">
+ <ul data-role="listview" data-theme="c" data-filter="true">
<li>
<img src="images/behavior-good.png" />
<h3><a href="index.html">Student of the week</a></h3>
<p>November 3</p>
</li>
- <li class="ui-li-has-thumb">
+ <li class="ui-li-has-thumb" id="li">
<div class="pt-grade">A-</div>
- <h3><a href="index.html">Science: Atlantic Ocean</a></h3>
+ <h3><a href="javascript:accordion();">Science: Atlantic Ocean</a></h3>
<p>October 15</p>
+ <div class="pt-accordion">
+ <div class="pt-accordion-body">
+ <img src="images/person.png" />
+ Hello World
+ </div>
+ </div>
+ </li>
+ <li class="ui-li-has-thumb">
+ <div class="pt-grade">A</div>
+ <h3><a href="">History: Romans</a></h3>
+ <p>October 12</p>
</li>
+ <li data-theme="e"><a href="graph.html">Grade History</a></li>
</ul>
</div><!-- /content -->
View
@@ -0,0 +1,13 @@
+(function() {
+ var init = function() {
+ alert('calling updates.js init');
+ };
+ // whenever this page is loaded, call init
+ scriptCache.onPageLoad('item.html', init);
+ // call init the first time it's loaded too
+ init();
+})();
+
+var accordion = function() {
+ $('#li').toggleClass('pt-accordion-open');
+};

0 comments on commit 91f47f7

Please sign in to comment.