Your Electronic Books
WHAT'S HOT
PARTS:
Part 38
Part 39
Part 40
Part 41
Part 42
Part 43
Part 44
Part 45
Part 46
Part 47
Part 48
Part 49
Part 50
Part 51
Part 52
Part 53
Part 54
Part 55
Part 56
Part 57
Resources
Prev
|
Current Page 838
|
Next
Frank Zammetti
"Practical DWR 2 Projects"
For those who are,
we use the dwr.util.addOptions() function to add it to the
element with the ID
divAdminProjects_edit_pm_XXXX, where XXXX is the ID of the project.
Once the list of project managers is populated, the last task is to select the current project
manager, if any, and that??™s where the final line with the dwr.util.setValue() comes in.
Creating the Table of Projects for the Project Management Dialog Box
Next up is a relatively lengthy bit of code that builds the project list on the Manage Projects
dialog box. As it turns out, this is virtually identical to the chunk of code we just looked at.
if (project.projectManager == timekeeper.currentUser.id) {
var cellFuncs = [
function(data) { return data.split("~~")[0]; },
...SNIP...
];
dwr.util.addRows("divManageProjects_projectList",
CHAPTER 9 n TIMEKEEPER: DWR EVEN MAKES PROJECT MANAGEMENT FUN! 500
[
project.name + "~~" +
"
"value=\"" + project.allocatedHours + "\" " +
"onBlur=\"timekeeper.updateProject('allocatedHours', '" +
project.id + "', this.value);\">~~" +
"
"value=\"" + targetDate + "\" " +
"onBlur=\"timekeeper.
Pages:
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850