Prev | Current Page 840 | Next

Frank Zammetti

"Practical DWR 2 Projects"


We??™re making good progress getting through this method, so let??™s keep that going. The
previous blocks of code we??™ve examined were concerned with building tables and the elements
within those tables. At this point, however, the iteration over the collection of projects
has ended, and the next bit of code is concerned with adding the lines onto those tables that
allow the user to add new projects, specifically in the Administer Projects dialog box.
CHAPTER 9 n TIMEKEEPER: DWR EVEN MAKES PROJECT MANAGEMENT FUN! 501
var cellFuncs = [
function(data) { return data.split("~~")[0]; },
function(data) { return data.split("~~")[1]; },
function(data) { return data.split("~~")[2]; }
];
dwr.util.addRows("divAdminProjects_projectList",
[
"
~~" +
"
~~" +
"
"
],
cellFuncs, { escapeHtml : false }
);
dwr.util.addRows("divAdminProjects_projectList",
[
""onClick=\"timekeeper.addProject();\">" + "~~" +
""id=\"divAdminProjects_add_name\">" + "~~" +
""
],
cellFuncs, { escapeHtml : false }
);
for (var j = 0; j < timekeeper.


Pages:
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852