You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-commits@incubator.apache.org by pr...@apache.org on 2012/08/15 19:16:33 UTC

svn commit: r1373583 - in /incubator/photark/mobile/trunk/assets/www: index.html scripts/MapView.js scripts/dataAccess.js scripts/tagging.js

Author: prabhathp
Date: Wed Aug 15 19:16:33 2012
New Revision: 1373583

URL: http://svn.apache.org/viewvc?rev=1373583&view=rev
Log:
help pages + bug fixes

Modified:
    incubator/photark/mobile/trunk/assets/www/index.html
    incubator/photark/mobile/trunk/assets/www/scripts/MapView.js
    incubator/photark/mobile/trunk/assets/www/scripts/dataAccess.js
    incubator/photark/mobile/trunk/assets/www/scripts/tagging.js

Modified: incubator/photark/mobile/trunk/assets/www/index.html
URL: http://svn.apache.org/viewvc/incubator/photark/mobile/trunk/assets/www/index.html?rev=1373583&r1=1373582&r2=1373583&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/index.html (original)
+++ incubator/photark/mobile/trunk/assets/www/index.html Wed Aug 15 19:16:33 2012
@@ -105,15 +105,7 @@
 					]
 				};
 
-				// if(google) {
-					var autocomplete = new google.maps.places.Autocomplete($("#editLocation")[0], options);
-					google.maps.event.addListener(autocomplete, 'place_changed', function() {
-						var place = autocomplete.getPlace();
-						//console.log(place.address_components);
-					});
-				// } else {
-// 
-				// }
+				
 			}
 
 			//Document ready function
@@ -166,6 +158,16 @@
 			    $("#tagPicture").css({ 
 					    'position': 'relative'
 			    });
+			    
+			    if(google) {
+					var autocomplete = new google.maps.places.Autocomplete($("#editLocation")[0], options);
+					google.maps.event.addListener(autocomplete, 'place_changed', function() {
+						var place = autocomplete.getPlace();
+						//console.log(place.address_components);
+					});
+				} else {
+					alert("location services not available");
+				}
 
 			});
 
@@ -188,8 +190,6 @@
 				uri= imageURI;
 				window.resolveLocalFileSystemURI(imageURI, onFileEntryComplete, isFail);
 				
-				displayTagImage(imageURI) ;
-				
 				tagObjects=new Array();
 				
 			    $('#largeImage').css({
@@ -290,6 +290,8 @@
 			});
 			
 			$('#photoTag').live('pageshow', function () {
+				$('#tagPicture').html('<img id="tagImage"/>');
+				displayTagImage(uri) ;
 				markTags(tagObjectsSaved);
 			});
 			
@@ -362,7 +364,7 @@
 			<div data-role="footer" data-position="fixed">
 				<div id="toolbar_icons" style="text-align: center" >
 					<a href="#" id="homeButton" data-role="button" data-icon="home" style="display: none" onclick="onHomeButtonClicked()">Home</a>
-					<a href="#" id="helpButton" data-role="button" data-icon="info" >Help</a>
+					<a href="#help" id="helpButton" data-role="button" data-icon="info" >Help</a>
 				</div>
 				
 			</div>
@@ -408,7 +410,7 @@
 					<textarea cols="40" rows="8" name="textarea" id="editDiscription"></textarea>
 				</div>
 			</div>
-			<div data-role="footer" data-position="fixed" style="text-align: center">
+			<div data-role="footer" style="text-align: center">
 				<a href="index.html" data-icon="check" onclick="save()">Save</a>
 				<a href="index.html" data-icon="delete">Cancel</a>
 			</div>
@@ -644,8 +646,10 @@
 					data-role="button" data-mini="false" data-icon="grid" onclick=''>View all in map</a>
 					<a href="#help"
 					data-role="button" data-mini="false" data-icon="info" onclick=''>Help</a>
+					<a href="#about"
+					data-role="button" data-mini="false" data-icon="info" onclick=''>About</a>
 					<a href="#"
-					data-role="button" data-mini="false" data-icon="back" onclick='navigator.app.exitApp()'>Exit</a>
+					data-role="button" data-mini="false" data-icon="delete" onclick='navigator.app.exitApp()'>Exit</a>
 				</div>
 			</div>
 		</div>
@@ -673,6 +677,39 @@
 		</div>
 		<!-- Page End -->
 		
+		<!-- help page-->
+		<div id="help" data-role="page" data-add-back-btn="true"  data-theme="a">
+			<div data-role="header" >
+				<h1>Help</h1>
+			</div>
+			<div data-role="content">
+				<ul>
+					<li>To get started caputre a photo, open exsisting photo or go to web albums</li>
+					<li>You can organize photoes by editing image related data and saving</li>
+					<li>You can search photoes according to data you have added</li>
+					<li>You can tag people in your photo by going to view tags section</li>
+					<li>You can view a image full screen by tapping on it</li>
+					<li>Deleting a photo through the application will delete the photo from phone memory too</li>
+				</ul>
+			</div>
+		</div>
+		<!-- Page End -->
+		
+		<!-- About page-->
+		<div id="about" data-role="dialog" data-add-back-btn="true"  data-theme="a">
+			<div data-role="header" >
+				<h1>About</h1>
+			</div>
+			<div data-role="content" style="text-align:center">
+				<p>A free and open source photo manager application for mobile devices.</p>
+				<br/>
+				<a  href="http://incubator.apache.org/photark/">Project home page</a>
+				<br/>
+				<p align="center">Apache Software foundation 2012</p>
+			</div>
+		</div>
+		<!-- Page End -->
+		
 
 	</body>
 </html>

Modified: incubator/photark/mobile/trunk/assets/www/scripts/MapView.js
URL: http://svn.apache.org/viewvc/incubator/photark/mobile/trunk/assets/www/scripts/MapView.js?rev=1373583&r1=1373582&r2=1373583&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/scripts/MapView.js (original)
+++ incubator/photark/mobile/trunk/assets/www/scripts/MapView.js Wed Aug 15 19:16:33 2012
@@ -23,7 +23,7 @@ $('#mapView').live("pageshow", function(
 		var geocoder2 = new google.maps.Geocoder();
 		geocoder2.geocode({'address': getLocation()}, function(results, status) {
 		    if (status == google.maps.GeocoderStatus.OK) {		        
-		        $('#map_canvas').gmap({'center': new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()), 'zoom': 10, 'disableDefaultUI':true, 'callback': function() {
+		        $('#map_canvas').gmap({'center': new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()), 'zoom': 10, 'disableDefaultUI':false, 'callback': function() {
 					var self = this;
 					self.addMarker({'position': this.get('map').getCenter() }).click(function() {
 						self.openInfoWindow({ 'content': 'Hello World!' }, this);

Modified: incubator/photark/mobile/trunk/assets/www/scripts/dataAccess.js
URL: http://svn.apache.org/viewvc/incubator/photark/mobile/trunk/assets/www/scripts/dataAccess.js?rev=1373583&r1=1373582&r2=1373583&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/scripts/dataAccess.js (original)
+++ incubator/photark/mobile/trunk/assets/www/scripts/dataAccess.js Wed Aug 15 19:16:33 2012
@@ -101,7 +101,6 @@ function querySuccess(tx, results){
 		loc=results.rows.item(i).location;
 		description=results.rows.item(i).description;
 	}
-	updateHome();
 }
 
 function clearData(){
@@ -116,12 +115,12 @@ function clearData(){
 
 function queryPeopleSuccess(tx, results) {
 	var len = results.rows.length;
-	
 	for (var i=0; i<len; i++){
-		people[i]=results.rows.item(i).name;
+		people.push(results.rows.item(i).name);
 		var tg1=new TagObject(results.rows.item(i).name,results.rows.item(i).x,results.rows.item(i).y);
 		tagObjectsSaved.push(tg1);
 	}
+	updateHome();
 }
 
 function updateDB(){
@@ -138,11 +137,15 @@ function insertToDB(tx) {	
 }
 
 function updateHome(){
+	temp4="";
+	for (i = 0; i < tagObjectsSaved.length; i++) {
+		temp4+=tagObjectsSaved[i].name+", ";
+	}
 	$("#metadata").html("");
 	$("#metadata").append("<p> Name: "+nickname+"</p>");
 	$("#metadata").append("<p> Location: "+loc+"</p>");
 	$("#metadata").append("<p> Description: "+description+"</p>");
-	$("#metadata").append("<p> Tags: "+people+"</p>");
+	$("#metadata").append("<p> Tags: "+temp4+"</p>");
 	$("#metadata").append("<p> Date: "+date+"</p>");
 	$("#metadata").append("<p> Time: "+time+"</p>");
 }
@@ -170,7 +173,6 @@ function searchPeople(s) {
 }
 
 function queryDB(tx){
-	alert(clause);
 	tx.executeSql(clause,[], searchSuccess, errorCB);
 }
 

Modified: incubator/photark/mobile/trunk/assets/www/scripts/tagging.js
URL: http://svn.apache.org/viewvc/incubator/photark/mobile/trunk/assets/www/scripts/tagging.js?rev=1373583&r1=1373582&r2=1373583&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/scripts/tagging.js (original)
+++ incubator/photark/mobile/trunk/assets/www/scripts/tagging.js Wed Aug 15 19:16:33 2012
@@ -20,23 +20,27 @@
 var tagEnabled=false;
 
 function showDialog(e, x, y) {
-	$('<div>').simpledialog2({
-		mode : 'button',
-		headerText : 'Tag',
-		headerClose : true,
-		buttonPrompt : 'Type Name',
-		buttonInput : true,
-		buttons : {
-			'OK' : {
-				click : function() {
-					var name = $.mobile.sdLastInput;
-					showTag(name, x, y);
-					var tgx = new TagObject(name, x, y);
-					tagObjects.push(tgx);
-				}
-			},
-		}
-	})
+	if(tagEnabled){
+		$('<div>').simpledialog2({
+			mode : 'button',
+			headerText : 'Tag',
+			headerClose : true,
+			buttonPrompt : 'Type Name',
+			buttonInput : true,
+			buttons : {
+				'OK' : {
+					click : function() {
+							var name = $.mobile.sdLastInput;
+							showTag(name, x, y);
+							var tgx = new TagObject(name, x, y);
+							tagObjects.push(tgx);
+					}
+				},
+			}
+		})
+	}else{
+		alert("Tagging not enabled.");
+	}
 }
 
 function TagObject(name, x, y) {