[seam-commits] Seam SVN: r14046 - branches/enterprise/JBPAPP_5_0/examples/tasks/view.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Feb 15 08:40:09 EST 2011


Author: jharting
Date: 2011-02-15 08:40:09 -0500 (Tue, 15 Feb 2011)
New Revision: 14046

Modified:
   branches/enterprise/JBPAPP_5_0/examples/tasks/view/tasks.js
Log:
JBPAPP-5039

Modified: branches/enterprise/JBPAPP_5_0/examples/tasks/view/tasks.js
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/tasks/view/tasks.js	2011-02-15 13:23:11 UTC (rev 14045)
+++ branches/enterprise/JBPAPP_5_0/examples/tasks/view/tasks.js	2011-02-15 13:40:09 UTC (rev 14046)
@@ -20,16 +20,17 @@
 	
 	var update = $('<input/>').attr('type', 'button').attr('id', 'update').val('Update').click(function() {
 		var newCategoryName = $(categories).val();
+		var taskName = $(name).val();
 		var callback = function(data) {
 			removeTaskEditForm(taskId, taskName);
 				if (categoryName == newCategoryName) {
-					updateTaskNameOnUI(taskId, data); // just update the name
+					updateTaskNameOnUI(taskId, taskName); // just update the name
 				} else {
 					$('#' + taskId).remove(); // add the task into new category
 					addTask(data, newCategoryName);
 				}
 		}
-		putTask(newCategoryName, taskId, $(name).val(), false, callback);
+		putTask(newCategoryName, taskId, taskName, false, callback);
 	});
 	var form = $('<form/>').attr('id', 'updateTask').append(categories).append(name).append(update);
 	$('#' + taskId + ' .name').replaceWith(form);
@@ -91,7 +92,6 @@
 	$('<tr/>').attr('id', taskId).append(buttonCell).append(nameCell).insertAfter('[id=' + categoryName + ']');
 }
 
-function updateTaskNameOnUI(taskId, task) {
-	var taskName = $(task).find('name').text();
+function updateTaskNameOnUI(taskId, taskName) {
 	$('#' + taskId + " .name").text(taskName);
 }



More information about the seam-commits mailing list