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/16 15:49:30 UTC

svn commit: r1373890 - in /incubator/photark/mobile/trunk/assets/www: index.html scripts/utils.js

Author: prabhathp
Date: Thu Aug 16 15:49:29 2012
New Revision: 1373890

URL: http://svn.apache.org/viewvc?rev=1373890&view=rev
Log:
fixed broken delete photo feature, edit metadata UI update

Modified:
    incubator/photark/mobile/trunk/assets/www/index.html
    incubator/photark/mobile/trunk/assets/www/scripts/utils.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=1373890&r1=1373889&r2=1373890&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/index.html (original)
+++ incubator/photark/mobile/trunk/assets/www/index.html Thu Aug 16 15:49:29 2012
@@ -266,7 +266,7 @@
 				date = $("#editDate").val();
 				time = $("#editTime").val();
 				loc= $("#editLocation").val();
-				people=$("#editPeople").val().split(",");
+				//people=$("#editPeople").val().split(",");
 				description=$("#editDiscription").val();
 				if(loc!=""){
 					adressToCoordinate(loc);
@@ -281,12 +281,12 @@
 				$("#editTime").val(getTime());
 				$("#editLocation").val(getLocation());
 				$("#editDiscription").val(getDescription());
-				var people=getPeople();
-				var s="";
-				for (var i=0; i < people.length; i++) {
-				  s=s+people[i]+',';
-				};
-				$("#editPeople").val(s);
+				// var people=getPeople();
+				// var s="";
+				// for (var i=0; i < people.length; i++) {
+				  // s=s+people[i]+',';
+				// };
+				// $("#editPeople").val(s);
 			});
 			
 			$('#photoTag').live('pageshow', function () {
@@ -301,7 +301,7 @@
 				$("#editTime").val("");
 				$("#editLocation").val("");
 				$("#editDiscription").val("");
-				$("#editPeople").val("");
+			//	$("#editPeople").val("");
 			}
         
         	function onMenuClick(){
@@ -399,11 +399,11 @@
 					<label for="textarea"> Location </label>
 					<input type="text" name="searchbox" id="editLocation" value="" />
 				</div>
-				<div data-role="fieldcontain">
+				<!-- <div data-role="fieldcontain">
 					<label for="textarea"> People: </label>
 					<textarea cols="40" rows="8" name="textarea" id="editPeople"></textarea>
 					<a href="#ContactsPage" data-role="button" data-theme="a"  data-mini="true">Browse</a>
-				</div>
+				</div> -->
 
 				<div data-role="fieldcontain">
 					<label for="textarea"> Discription </label>
@@ -432,21 +432,18 @@
 		<!-- Page End -->
 
 		<!-- Confirm Delete Dialog-->
-		<div id="ConfirmDelete" data-role="page">
+		<div id="ConfirmDelete" data-role="dialog">
 			<div data-role="header">
 				<h1>Confirm Delete</h1>
 			</div>
 			<div data-role="content">
-
 				<p>
 					Are you sure you want to delete this photo?
 				</p>
 				<a href="index.html"
-				data-role="button" onclick="deleteFile()"
-				data-theme="b">Delete</a>
+				data-role="button" onclick="deleteFile()">Delete</a>
 				<a href="index.html"
-				data-role="button"
-				data-theme="b">Cancel</a>
+				data-role="button">Cancel</a>
 			</div>
 		</div>
 		<!-- Page End -->

Modified: incubator/photark/mobile/trunk/assets/www/scripts/utils.js
URL: http://svn.apache.org/viewvc/incubator/photark/mobile/trunk/assets/www/scripts/utils.js?rev=1373890&r1=1373889&r2=1373890&view=diff
==============================================================================
--- incubator/photark/mobile/trunk/assets/www/scripts/utils.js (original)
+++ incubator/photark/mobile/trunk/assets/www/scripts/utils.js Thu Aug 16 15:49:29 2012
@@ -19,16 +19,17 @@
 
 var fileURI;
 
-function deleteFile(filepath) {
-	window.resolveLocalFileSystemURI(filepath, deleteEntry, function() {
+function deleteFile() {
+	window.resolveLocalFileSystemURI(uri, deleteEntry, function() {
 		alert('error: unable to resovle local fs uri')
 	});
-	reset();
+	
 }
 
 function deleteEntry(entry) {
 	entry.remove(function(entry) {
 		alert('Removal succeeded');
+		onHomeButtonClicked();
 	}, function(error) {
 		alert('Error removing file: ' + error.code);
 	});
@@ -154,10 +155,12 @@ function onHomeButtonClicked(){
 	$('#photoTagButton').hide();
 	$('#deleteButton').hide();
 	$('#homeButton').hide();
+	$('#editDataButton').hide();
 	
 	$('#captureButton').show();
 	$('#galleryButton').show();
 	$('#webAlbumButton').show();
+	$('#searchButton').show();
 	$('#helpButton').show();
 }