Changeset 17897
- Timestamp:
- 08/14/08 11:20:31 (3 months ago)
- Files:
-
- trunk/core/src/net/project/hibernate/service/IPnAssignmentWorkService.java (modified) (4 diffs)
- trunk/core/src/net/project/hibernate/service/impl/PnAssignmentWorkServiceImpl.java (modified) (14 diffs)
- trunk/core/src/net/project/view/pages/assignments/MyAssignments.java (modified) (3 diffs)
- trunk/core/web/css/blog.css (modified) (3 diffs)
- trunk/core/web/html/assignments/MyAssignments.html (modified) (4 diffs)
- trunk/core/web/src/blogit.js (modified) (11 diffs)
- trunk/core/web/src/components/myAssignments-dashboard.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/core/src/net/project/hibernate/service/IPnAssignmentWorkService.java
r17871 r17897 52 52 * @param request a <code>HttpServletRequest</code> object that we can use 53 53 * to look up what time the user has entered. 54 * @param ObjectID55 * @param dateToStart to load the date list according to scrolling56 * null for first time.57 54 * The date value list has been set according to this paramaeter and pass it to 58 55 * getTimeValueForJS method to set the date value list. 59 56 * and after that in session. 60 57 */ 61 public String getModifiedTimeSheetEntries( String objectId ,String dateToStart,HttpServletRequest request);62 63 /** 64 * Return the String as array for time values as array in blogit.js for so emvalidations58 public String getModifiedTimeSheetEntries(HttpServletRequest request); 59 60 /** 61 * Return the String as array for time values as array in blogit.js for some validations 65 62 * while updating the time sheet. 66 * @param dateToStrart string sent while scrolling the week 63 * @param dateToStrart string sent while scrolling the week/days 64 * @param scrollType string sent while scrolling to identify for week/days 65 * @param objectId to filter data 67 66 * and null for First time load. 68 67 */ 69 public String getTimeValueForJS(String dateToStart );68 public String getTimeValueForJS(String dateToStart,String scrollType,String objectId); 70 69 71 70 /** … … 77 76 * the database. 78 77 */ 79 public void setDateValues( );78 public void setDateValues(String objectId,String scrollType); 80 79 81 80 /** … … 84 83 * and set to dateHeaders and dateLongNames list. 85 84 */ 86 public void getDateHeaders( );85 public void getDateHeaders(String scrollType); 87 86 88 87 /** … … 129 128 * 130 129 */ 131 public String findUpdatedPercentComplete(HttpServletRequest request , String id) throws ParseException;130 public String findUpdatedPercentComplete(HttpServletRequest request) throws ParseException; 132 131 133 132 /** trunk/core/src/net/project/hibernate/service/impl/PnAssignmentWorkServiceImpl.java
r17871 r17897 119 119 private TimeQuantity currentWork = assnWork; 120 120 121 Date scrollBackStartDate;121 private Date scrollBackStartDate; 122 122 123 Date scrollForwardStartDate;123 private Date scrollForwardStartDate; 124 124 125 125 private TaskFinder finder = new TaskFinder(); … … 161 161 * @see net.project.hibernate.service.IPnAssignmentWorkService#getModifiedTimeSheetEntries(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest) 162 162 */ 163 public String getModifiedTimeSheetEntries(String objectId, 164 String dateToStart, HttpServletRequest request) { 163 public String getModifiedTimeSheetEntries(HttpServletRequest request) { 164 String objectId = request.getParameter("objectId"); 165 String dateToStart = request.getParameter("scroll"); 165 166 NumberFormat nf = NumberFormat.getInstance(); 167 String scrollType=request.getParameter("scrollType")==null?"week":request.getParameter("scrollType"); 168 166 169 // Get Get/Set Date values List while scrolling and first Time Laod. 167 getTimeValueForJS(dateToStart);170 String jsTimesValueArray=getTimeValueForJS(dateToStart,scrollType,objectId); 168 171 169 172 // Get the assignments that we are displaying … … 176 179 String strTDwidth = "52px"; 177 180 String timeSheetTable = ""; 178 timeSheetTable += "<table align='left' id='timecard' border='0' width='100%' align=\"center\">"; 179 timeSheetTable += "<tr>"; 180 181 timeSheetTable += "<td width='50%'><div id='div1' style='display:block'><table width='100%'><tr class='tableHeader'>"; 182 timeSheetTable += "<td width='15'><img src='" 181 timeSheetTable += "<table align='left' id='timecard' border='0' width='100%' align=\"center\">\n"; 182 timeSheetTable += "\t<tr>\n"; 183 timeSheetTable += "\t\t<td width='75%'><div id='div1' style='display:block'><table align=\"center\"><tr class='timeSheetHeader'>\n"; 184 timeSheetTable += "\t\t\t<td><img src='" 183 185 + SessionManager.getJSPRootURL() 184 + "/images/ icons/prev_page_sm.gif' border='0' onClick='scrollBack(\""185 + scrollBackStartDate.getTime() + "\" );'/></td>";186 + "/images/leftsingle.gif' border='0' onClick='scrollBack(\"" 187 + scrollBackStartDate.getTime() + "\",\""+scrollType+"\");'/></td>\n"; 186 188 187 189 for (Iterator it = dateHeaders.iterator(); it.hasNext();) { 188 190 DateHeader dateHeader = (DateHeader) it.next(); 189 timeSheetTable += " <td align=\"center\" width='" + strTDwidth191 timeSheetTable += "\t\t\t<td align=\"center\" width='" + strTDwidth 190 192 + "'>" + dateHeader.dayOfWeek + "<br>" + dateHeader.date 191 + "</td> ";192 } 193 194 timeSheetTable += " <td width='15'><img src='"193 + "</td>\n"; 194 } 195 196 timeSheetTable += "\t\t\t<td><img src='" 195 197 + SessionManager.getJSPRootURL() 196 + "/images/icons/next_page_sm.gif' border='0' onClick='scrollForward(\"" 197 + scrollForwardStartDate.getTime() + "\");'/></td>"; 198 timeSheetTable += "</tr>"; 199 timeSheetTable += "<tr><td colspan='9' align='center'><a href='javascript:showdiv2();'>day</a> week</td></tr>"; 200 timeSheetTable += "</table></div>"; 201 202 timeSheetTable += "<div id='div2' style='display:none'><table width='50%' align=\"center\"><tr class='tableHeader'>"; 203 timeSheetTable += "<td width='15'><img src='" 204 + SessionManager.getJSPRootURL() 205 + "/images/icons/prev_page_sm.gif' border='0' onClick='scrollBack();'/></td>"; 206 timeSheetTable += "<td align='center'>Today</td>"; 207 timeSheetTable += "<td width='15'><img src='" 208 + SessionManager.getJSPRootURL() 209 + "/images/icons/next_page_sm.gif' border='0' onClick='scrollForward();'/></td>"; 210 timeSheetTable += "</tr>"; 211 timeSheetTable += "<tr><td colspan='3' align='center'>day <a href='javascript:showdiv1();'>week</a></td></tr>"; 212 timeSheetTable += "</table></div></td>"; 213 214 timeSheetTable += "<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Total Days<br/>Reported<br/><a href='#' class='bluelink'>history</a></td>"; 215 timeSheetTable += "<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Estimated <br/>Remaining</td>"; 216 timeSheetTable += "<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Total <br/>Est.Days</td>"; 217 timeSheetTable += "<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >% <br/>complete<br/><a href='#' class='redlink'>not accurate?</a></td>"; 218 timeSheetTable += "<td></td>"; 219 220 timeSheetTable += "</tr><tr><td colspan='7' class='blogbar'></td></tr>"; 221 222 timeSheetTable += "<tr class='tableContent'>"; 223 224 timeSheetTable += "<td width='50%'><div id='div11' style='display:block'><table width='100%' align=\"center\"><tr class='tableContent'>"; 225 timeSheetTable += "<td width='15'></td>"; 198 + "/images/rightsingle.gif' border='0' align=\"right\" onClick='scrollForward(\"" 199 + scrollForwardStartDate.getTime() + "\",\""+scrollType+"\");'/></td>\n"; 200 timeSheetTable += "\t\t</tr>"; 201 timeSheetTable += "\t\t<tr>\n"; 202 timeSheetTable += "\t\t\t<td colspan='9' align='center'>\n"; 203 if(scrollType.equalsIgnoreCase("week")){ 204 timeSheetTable += "\t\t\t\t <a href='javascript:changeScrollType(\"day\");'>day</a> week\n"; 205 }else{ 206 timeSheetTable += "\t\t\t\t day <a href='javascript:changeScrollType(\"week\");'>week</a>\n"; 207 } 208 timeSheetTable += "\t\t\t</td></tr></table></div>\n"; 209 210 timeSheetTable += "\t\t</td>\n"; 211 212 timeSheetTable += "\t\t<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Total Days<br/>Reported<br/><a href='#' class='bluelink'>history</a></td>\n"; 213 timeSheetTable += "\t\t<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Estimated <br/>Remaining</td>\n"; 214 timeSheetTable += "\t\t<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >Total <br/>Est.Days</td>\n"; 215 timeSheetTable += "\t\t<td align='center' valign='top' class='blogEntryLabel' nowrap='nowrap' >% <br/>complete<br/><a href='#' class='redlink'>not accurate?</a></td>\n"; 216 timeSheetTable += "\t\t<td></td>\n"; 217 218 timeSheetTable += "\t</tr>\n"; 219 timeSheetTable += "\t<tr><td colspan='7' class='blogbar2'></td></tr>\n"; 220 221 timeSheetTable += "\t<tr class='tableContent'>\n"; 222 223 timeSheetTable += "\t\t<td width='75%'><div id='div11' style='display:block'><table align=\"center\"><tr class='tableContent'>\n"; 224 timeSheetTable += "\t\t\t<td></td>\n"; 226 225 double percenComplete = 1.0; 227 226 int forcount = 0; … … 266 265 String valueValue = (request.getParameter(valueName) == null ? " " 267 266 : " value='" + request.getParameter(valueName) + "' "); 268 timeSheetTable += " <td nowrap='nowrap' width='" + strTDwidth269 + "' align=\"center\"> ";267 timeSheetTable += "\t\t\t<td nowrap='nowrap' width='" + strTDwidth 268 + "' align=\"center\">\n"; 270 269 timeSheetTable += work.toShortString(0, 2); 271 timeSheetTable += " <br>";272 273 timeSheetTable += " <input type='text' size='1' maxlength='2' id='timesheetbox"270 timeSheetTable += "\t\t\t\t<br>\n"; 271 272 timeSheetTable += "\t\t\t\t<input type='text' size='1' maxlength='2' id='timesheetbox" 274 273 + forcount 275 274 + "' name='" … … 283 282 + "','" 284 283 + Module.PERSONAL_SPACE 285 + "')\";/><a id='timerLink' href=\"javascript:showtime('timesheetbox" 284 + "','"+scrollType+"')\";/>\n" 285 + "\t\t\t\t<a id='timerLink' href=\"javascript:showtime('timesheetbox" 286 286 + forcount 287 287 + "');\"><img src='" 288 288 + SessionManager.getJSPRootURL() 289 + "/images/sm_clock.gif' border='0'/></a> ";289 + "/images/sm_clock.gif' border='0'/></a>\n"; 290 290 forcount++; 291 timeSheetTable += "</td>"; 292 } 293 } 294 timeSheetTable += "<td width='15'></td></tr>"; 295 timeSheetTable += "</table></div>"; 296 297 timeSheetTable += "<div id='div22' style='display:none'><table width='50%' align=\"center\"><tr class='tableContent'>"; 298 timeSheetTable += " <td width='15'></td>"; 299 timeSheetTable += " <td nowrap='nowrap'> 0 hrs <br><input type='text' size='1' maxlength='2' id='txt8'/><img src='" 300 + SessionManager.getJSPRootURL() 301 + "/images/sm_clock.gif' border='0' name='8' onclick='showtime(this);'/></td>"; 302 timeSheetTable += " <td width='15'></td>"; 303 timeSheetTable += "</tr></table><div></td>"; 304 305 timeSheetTable += "<td align='center'><span name='wk' id='wk'>" 306 + strWork + "</span></td>"; 307 timeSheetTable += "<td align='center'><span name='wkrm' id='wkrm'>" 308 + strWorkRemaining + "</span></td>"; 309 timeSheetTable += "<td align='center'><span name='wkrp' id='wkrp'>" 310 + strWorkComplete + "</span></td>"; 311 timeSheetTable += "<td align='center'><span name='pc' id='pc'>" 312 + nf.formatPercent(percenComplete, 2) + "</span></td>"; 313 314 timeSheetTable += "<td nowrap='nowrap'><b>Done?</b> <input type='checkbox' style='border-style: none;'/></td>"; 315 timeSheetTable += "</tr>"; 291 timeSheetTable += "\t\t\t</td>\n"; 292 } 293 } 294 timeSheetTable += "\t\t\t<td></td>\n"; 295 timeSheetTable += "\t\t</tr></table></div>\n"; 296 297 timeSheetTable += "\t\t</td>\n"; 298 299 timeSheetTable += "\t\t<td align='center'><span name='wk' id='wk'>" 300 + strWork + "</span></td>\n"; 301 timeSheetTable += "\t\t<td align='center'><span name='wkrm' id='wkrm'>" 302 + strWorkRemaining + "</span></td>\n"; 303 timeSheetTable += "\t\t<td align='center'><span name='wkrp' id='wkrp'>" 304 + strWorkComplete + "</span></td>\n"; 305 timeSheetTable += "\t\t<td align='center'><span name='pc' id='pc'>" 306 + nf.formatPercent(percenComplete, 2) + "</span></td>\n"; 307 308 timeSheetTable += "\t\t<td nowrap='nowrap'><b>Done?</b> <input type='checkbox' style='border-style: none;'/></td>\n"; 309 timeSheetTable += "\t</tr>\n"; 316 310 317 311 // Put some date objects into the session that we'll use repeatedly … … 322 316 + e.getMessage()); 323 317 } 324 return timeSheetTable ;318 return timeSheetTable+"TimesValueArray"+jsTimesValueArray; 325 319 } 326 320 … … 328 322 * @see net.project.hibernate.service.IPnAssignmentWorkService#getTimeValueForJS(java.lang.String) 329 323 */ 330 public String getTimeValueForJS(String dateToStart ) {324 public String getTimeValueForJS(String dateToStart,String scrollType,String objectId) { 331 325 PnCalendar cal = new PnCalendar(); 332 if (dateToStart != null) { 333 startDate = new Date(Long.parseLong(dateToStart)); 334 } else { 335 cal.setTime(new Date()); 336 startDate = cal.startOfWeek(); 337 } 338 cal.setTime(startDate); 339 cal.add(PnCalendar.DATE, -7); 340 scrollBackStartDate = cal.getTime(); 341 342 cal.setTime(startDate); 343 cal.add(PnCalendar.DATE, 7); 344 scrollForwardStartDate = cal.getTime(); 345 346 endDate = cal.endOfDay(); 326 if(scrollType.equalsIgnoreCase("week")){ 327 if (dateToStart != null) { 328 startDate = new Date(Long.parseLong(dateToStart)); 329 } else { 330 cal.setTime(new Date()); 331 startDate = cal.startOfWeek(); 332 } 333 cal.setTime(startDate); 334 cal.add(PnCalendar.DATE, -7); 335 scrollBackStartDate = cal.getTime(); 336 337 cal.setTime(startDate); 338 cal.add(PnCalendar.DATE, 7); 339 scrollForwardStartDate = cal.getTime(); 340 endDate = cal.endOfDay(); 341 } 342 else{ 343 if (dateToStart != null) { 344 startDate = new Date(Long.parseLong(dateToStart)); 345 } else { 346 cal.setTime(new Date()); 347 startDate = cal.startOfDay(); 348 } 349 cal.setTime(startDate); 350 cal.add(PnCalendar.DATE, -1); 351 scrollBackStartDate = cal.getTime(); 352 353 cal.setTime(startDate); 354 cal.add(PnCalendar.DATE, 1); 355 scrollForwardStartDate = cal.getTime(); 356 endDate = cal.getTime(); 357 } 358 347 359 348 360 // Get the column headers for each day 349 getDateHeaders( );361 getDateHeaders(scrollType); 350 362 // Figure out how many hours were worked on each day 351 setDateValues( );363 setDateValues(objectId,scrollType); 352 364 String timesValueString = ""; 353 365 for (Iterator it = dateLongNames.iterator(); it.hasNext();) { … … 362 374 * @see net.project.hibernate.service.IPnAssignmentWorkService#setDateValues() 363 375 */ 364 public void setDateValues( ){376 public void setDateValues(String objectId,String scrollType){ 365 377 dateValues = new HashMap(); 366 378 summaryDateValues = new HashMap(); … … 450 462 .get(dateID.date); 451 463 if (existingSummaryWork == null) { 452 summaryDateValues.put(dateID.date, work);464 this.summaryDateValues.put(dateID.date, work); 453 465 } else { 454 summaryDateValues.put(dateID.date, existingSummaryWork.add(work));466 this.summaryDateValues.put(dateID.date, existingSummaryWork.add(work)); 455 467 } 456 468 … … 466 478 * @see net.project.hibernate.service.IPnAssignmentWorkService#getDateHeaders() 467 479 */ 468 public void getDateHeaders( ) {480 public void getDateHeaders(String scrollType) { 469 481 PnCalendar cal = new PnCalendar(); 470 482 dateHeaders = new LinkedList(); … … 477 489 dayOfWeekFormatter.setTimeZone(cal.getTimeZone()); 478 490 cal.setTime(startDate); 479 for (int i = 0; i < 7; i++) { 491 if(scrollType.equalsIgnoreCase("week")){ 492 for (int i = 0; i < 7; i++) { 493 DateHeader dh = new DateHeader(); 494 dh.date = dateFormat.formatDate(cal.getTime(), 495 java.text.DateFormat.SHORT); 496 dh.dayOfWeek = dayOfWeekFormatter.format(cal.getTime()); 497 dateHeaders.add(dh); 498 dateLongNames.add(String.valueOf(cal.getTime().getTime())); 499 cal.add(Calendar.DATE, 1); 500 } 501 }else{ 480 502 DateHeader dh = new DateHeader(); 481 503 dh.date = dateFormat.formatDate(cal.getTime(), … … 719 741 * @see net.project.hibernate.service.IPnAssignmentWorkService#findUpdatedPercentComplete(javax.servlet.http.HttpServletRequest, java.lang.String) 720 742 */ 721 public String findUpdatedPercentComplete(HttpServletRequest request ,722 String id) throws ParseException {743 public String findUpdatedPercentComplete(HttpServletRequest request) throws ParseException { 744 String id = request.getParameter("objectId"); 723 745 errorReporter = new ErrorReporter(); 746 String scrollType=request.getParameter("scrollType")==null?"week":request.getParameter("scrollType"); 747 int for_cnt; 748 if(scrollType.equalsIgnoreCase("week")){ 749 for_cnt=7; 750 }else{ 751 for_cnt=1; 752 } 724 753 Date earliestStartDate = null; 725 754 Date latestStartDate = null; … … 734 763 List workCompleteStrings = new ArrayList(); 735 764 //Total work check. It should not be below zero. 765 736 766 double totalRowWork = 0; 737 for (int i = 0; i < 7; i++) {767 for (int i = 0; i < for_cnt; i++) { 738 768 String workString = request.getParameter("wc" + i); 739 769 Date startDate = new Date(Long.parseLong(request.getParameter("tv" + i))); … … 768 798 continue; 769 799 } else if (!Validator.isNumeric(workString)) { 770 //this is verified above771 //errorReporter.addError(new ErrorDescription(PropertyProvider.get("prm.resource.updatework.error.invalid.message", workString, DateFormat.getInstance().formatDate(workDate))));772 800 continue; 773 801 } 774 802 totalColumnWork += Double.parseDouble(workString); 775 803 } 776 //if(Validator.isNegative(""+totalColumnWork)) {777 // errorReporter.addError(new ErrorDescription(PropertyProvider.get("prm.resource.updatework.total.negative.error.message")));778 //}779 780 //String percentComplete = null;781 //TimeQuantity assnWork = TimeQuantity.O_HOURS;782 //TimeQuantity currentWork = assnWork;783 804 NumberFormat nf = NumberFormat.getInstance(); 784 805 assignmentMap = (Map) request.getSession().getAttribute("updateAssignmentsMap"); trunk/core/src/net/project/view/pages/assignments/MyAssignments.java
r17884 r17897 201 201 // otherwise generate a blank time sheet div for js and return 202 202 else if (action.equalsIgnoreCase(WorkCaptureAction.GET_TIME_SHEET_ENTRIES.toString())) { 203 String objectId = request.getParameter("objectId"); 204 String dateToStart = request.getParameter("scroll"); 205 String timeSheetTable = pnAssignmentWorkService.getModifiedTimeSheetEntries(objectId, dateToStart, 206 request); 203 String timeSheetTable = pnAssignmentWorkService.getModifiedTimeSheetEntries(request); 207 204 return new TextStreamResponse("text", timeSheetTable); 208 205 } … … 211 208 // update time sheet call if no error found 212 209 else if (action.equalsIgnoreCase(WorkCaptureAction.UPDATE_TIME_SHEET_ENTRIES.toString())) { 213 String objectId = request.getParameter("objectId");214 210 String updatedJSCall = ""; 215 211 try { 216 updatedJSCall = pnAssignmentWorkService.findUpdatedPercentComplete(request , objectId);212 updatedJSCall = pnAssignmentWorkService.findUpdatedPercentComplete(request); 217 213 } catch (Exception e) { 218 214 log.error("Error occured while updating the work caputre" + e.getMessage()); … … 221 217 222 218 } 223 // Get the times value array for js array variable224 // to do some validations while updating the hours of work done on each day.225 else if (action.equalsIgnoreCase(WorkCaptureAction.GET_TIME_VALUES_ARRAY.toString())) {226 String dateToStart = request.getParameter("scroll");227 return new TextStreamResponse("text", pnAssignmentWorkService.getTimeValueForJS(dateToStart));228 229 }230 219 // Action to save the time sheet in database if error free, 231 220 // otherwise return a js error message call like not a working day. trunk/core/web/css/blog.css
r17829 r17897 42 42 text-decoration: none; 43 43 } 44 .blogEntryTitle { 45 padding-left:80px; 46 font-family: Verdana,Arial,Helvetica; 47 font-size: 12px; 48 font-weight: bold; 49 width: 30%; 50 51 } 44 52 .blogEntryLabel { 45 53 font-family: Verdana,Arial,Helvetica; … … 47 55 font-weight: bold; 48 56 width: 30%; 57 color:#999999; 49 58 } 50 59 #weblogEntryContents … … 74 83 padding:0pt; 75 84 } 85 .blogbar2 { 86 background-color:#CC99FF; 87 border-collapse:collapse; 88 height:1px; 89 padding:0pt; 90 } 76 91 .redlink{ 77 92 color:#CC0000; 78 93 } 79 94 .bluelink{ 80 95 color:#005CB9; 81 96 } 97 .timeSheetHeader { 98 background-color:#FFFFFF; 99 color:#666666; 100 font-weight: bold; 101 } trunk/core/web/html/assignments/MyAssignments.html
r17884 r17897 4 4 <style> 5 5 .x-date-middle { 6 padding-top: 2px;padding-bottom:2px;7 width: 130px; /* FF3 */6 padding-top: 2px; padding-bottom: 2px; 7 width: 130px; /* FF3 */ 8 8 } 9 9 .filter-icon { … … 12 12 13 13 html, body { 14 font:normal 12px verdana;15 margin:0;16 padding:0;17 border:0 none;18 overflow:hidden;19 height:100%;20 }21 p {22 margin:5px;23 }24 .settings {25 background-image:url(${JSPRootURL}/shared/icons/fam/folder_wrench.png);26 }27 .nav {28 background-image:url(${JSPRootURL}/shared/icons/fam/folder_go.png);29 }14 font: normal 12px verdana; 15 margin: 0; 16 padding: 0; 17 border: 0 none; 18 overflow: hidden; 19 height: 100%; 20 } 21 p { 22 margin: 5px; 23 } 24 .settings { 25 background-image:url(${JSPRootURL}/shared/icons/fam/folder_wrench.png); 26 } 27 .nav { 28 background-image:url(${JSPRootURL}/shared/icons/fam/folder_go.png); 29 } 30 30 31 31 #assignmentPanelPosition{ … … 39 39 40 40 <script type="text/javascript"> 41 var JSPRootURL = '${JSPRootURL}'; 42 var moduleId = ${moduleId}; 43 var spaceId = ${spaceId}; 44 var userId = '${userId}'; 45 var blogItFor = 'myAssignments'; 46 var validationMessageForBlogEntry = '${validationMessageForBlogEntry}'; 47 var validationMessageForBlogComment = '${validationMessageForBlogComment}'; 48 var noSelectionErrMes = 'Please select a node from tree before posting a blog entry.'; 49 var assigneeOrAssignorParameter = '${assigneeOrAssignorParameter}'; 50 var projectOptionsData = ${projectOptionsString}; 51 var businessOptionsData = ${businessOptionsString}; 52 var treeViewParamerer ='${treeViewParamerer}'; 53 </script> 41 var JSPRootURL = '${JSPRootURL}'; 42 var moduleId = ${moduleId}; 43 var spaceId = ${spaceId}; 44 var userId = '${userId}'; 45 var blogItFor = 'myAssignments'; 46 var validationMessageForBlogEntry = '${validationMessageForBlogEntry}'; 47 var validationMessageForBlogComment = '${validationMessageForBlogComment}'; 48 var noSelectionErrMes = 'Please select a node from tree before posting a blog entry.'; 49 var assigneeOrAssignorParameter = '${assigneeOrassignorParameter}'; 50 var projectOptionsData = ${projectOptionsString}; 51 var businessOptionsData = ${businessOptionsString}; 52 var treeViewParamerer ='${treeViewParamerer}'; 53 54 // About Timeline 55 var tl; 56 function onLoad() { 57 var eventSource = new Timeline.DefaultEventSource(); 58 var bandInfos = [ 59 Timeline.createBandInfo({ 60 eventSource: eventSource, 61 date: "Aug 11 2008 00:00:00 GMT", 62 width: "70%", 63 intervalUnit: Timeline.DateTime.DAY, 64 intervalPixels: 100 65 }), 66 Timeline.createBandInfo({ 67 showEventText: false, 68 trackHeight: 0.5, 69 trackGap: 0.2, 70 eventSource: eventSource, 71 date: "Aug 11 2008 00:00:00 GMT", 72 width: "30%", 73 intervalUnit: Timeline.DateTime.WEEK, 74 intervalPixels: 200 75 }) 76 ]; 77 78 bandInfos[1].syncWith = 0; 79 bandInfos[1].highlight = true; 80 81 //tl = Timeline.create(document.getElementById("my-timeline"), bandInfos); 82 //Timeline.loadXML("example1.xml", function(xml, url) { eventSource.loadXML(xml, url); }); 83 } 84 85 var resizeTimerID = null; 86 function onResize() { 87 if (resizeTimerID == null) { 88 resizeTimerID = window.setTimeout(function() { 89 resizeTimerID = null; 90 tl.layout(); 91 }, 500); 92 } 93 } 94 95 //document.body.onload = onLoad(); 96 //document.body.onresizeend = onResize(); 97 98 </script> 54 99 <script type='text/javascript' src='${JSPRootURL}/src/RowExpander.js'></script> 55 100 <script type="text/javascript" src="${jSPRootURL}/src/extjs/extensions/treeGrid.js"></script> … … 64 109 65 110 <t:PersonalMenu /> 66 <t:SpaceMainMenu /> 111 <t:SpaceMainMenu /> 67 112 68 <div id ="assignmentPanelPosition"></div> 113 <!-- div> 114 <div id="my-timeline" style="left: 23%; height: 20%; width : 76%; border: 1px solid #aaa"></div> 115 </div --> 116 117 <div id ="assignmentPanelPosition"></div> 69 118 </t:BlogLayout> trunk/core/web/src/blogit.js
r17891 r17897 58 58 var paramString = ''; 59 59 60 function scrollBack(scrollby ) {60 function scrollBack(scrollby,scrolltype) { 61 61 Ext.Ajax.request({ 62 62 url: JSPRootURL +'/assignments/My/Get_Time_Sheet_Entries?module='+moduleId, 63 params: {module: moduleId, objectId: objectId,scroll:scrollby },63 params: {module: moduleId, objectId: objectId,scroll:scrollby, scrollType:scrolltype}, 64 64 method: 'POST', 65 65 success: function(result, request){ 66 66 var responseText = result.responseText; 67 document.getElementById('timeWorkedDiv').innerHTML = responseText; 68 Ext.Ajax.request({ 69 url: JSPRootURL +'/assignments/My/get_Time_Values_Array?module='+moduleId, 70 params: {module: moduleId, objectId: objectId,scroll:scrollby}, 71 method: 'POST', 72 success: function(result, request){ 73 var responseText =result.responseText; 74 timeValues=new Array(); 75 timeValues = responseText.split(","); 76 }, 77 failure: function(result, response){ 78 extAlert(errorTitle, 'Server Request Failed..', Ext.MessageBox.ERROR); 79 hidePopup(); 80 } 81 }); 67 var splitVal=responseText.split('TimesValueArray'); 68 document.getElementById("timeWorkedDiv").innerHTML = splitVal[0]; 69 timeValues = new Array(); 70 timeValues = splitVal[1].split(","); 82 71 }, 83 72 failure: function(result, response){ … … 88 77 } 89 78 90 function scrollForward(scrollby ) {79 function scrollForward(scrollby,scrolltype) { 91 80 Ext.Ajax.request({ 92 81 url: JSPRootURL +'/assignments/My/Get_Time_Sheet_Entries?module='+moduleId, 93 params: {module: moduleId, objectId: objectId,scroll:scrollby },82 params: {module: moduleId, objectId: objectId,scroll:scrollby,scrollType:scrolltype}, 94 83 method: 'POST', 95 84 success: function(result, request){ 96 85 var responseText = result.responseText; 97 document.getElementById('timeWorkedDiv').innerHTML = responseText; 98 Ext.Ajax.request({ 99 url: JSPRootURL +'/assignments/My/get_Time_Values_Array?module='+moduleId, 100 params: {module: moduleId, objectId: objectId,scroll:scrollby}, 101 method: 'POST', 102 success: function(result, request){ 103 var responseText =result.responseText; 104 timeValues=new Array(); 105 timeValues = responseText.split(","); 106 }, 107 failure: function(result, response){ 108 extAlert(errorTitle, 'Server Request Failed..', Ext.MessageBox.ERROR); 109 hidePopup(); 110 } 111 }); 86 var splitVal=responseText.split('TimesValueArray'); 87 document.getElementById("timeWorkedDiv").innerHTML = splitVal[0]; 88 timeValues = new Array(); 89 timeValues = splitVal[1].split(","); 112 90 }, 113 91 failure: function(result, response){ … … 142 120 } 143 121 } 144 145 function showdiv1(){ 146 document.getElementById("div1").style.display="block"; 147 document.getElementById("div11").style.display="block"; 148 document.getElementById("div2").style.display="none"; 149 document.getElementById("div22").style.display="none"; 150 } 151 152 function showdiv2(){ 153 document.getElementById("div2").style.display="block"; 154 document.getElementById("div22").style.display="block"; 155 document.getElementById("div1").style.display="none"; 156 document.getElementById("div11").style.display="none"; 122 function changeScrollType(scrolltype) 123 { 124 getTimeSheetEntries(objectId,scrolltype); 157 125 } 158 126 … … 218 186 timeSheetTable += '<table align="left" border="0" width="100%">'; 219 187 timeSheetTable += '<tr>'; 220 timeSheetTable += ' <td width="30%" class="blogEntryLabel">Date:</td>'; 221 timeSheetTable += ' <td width="70%" nowrap="nowrap" class="blogEntryLabel">'+days[now.getDay()]+', '+months[now.getMonth()]+' '+now.getDate()+', '+now.getFullYear()+'</td>'; 188 timeSheetTable += ' <td width="70%" nowrap="nowrap" class="blogEntryTitle">'+days[now.getDay()]+', '+months[now.getMonth()]+' '+now.getDate()+', '+now.getFullYear()+'</td>'; 222 189 timeSheetTable += '</tr>'; 223 timeSheetTable += '<tr><td colspan=" 2" class="blogbar"></td></tr>';190 timeSheetTable += '<tr><td colspan="1" class="blogbar"></td></tr>'; 224 191 timeSheetTable += '<tr>'; 225 timeSheetTable += ' <td width="30%" class="blogEntryLabel">Topic:</td>'; 226 timeSheetTable += ' <td width="70%"><input type="text" size="40" maxlength="50" name="txttopic"/></td>'; 192 timeSheetTable += ' <td width="70%" nowrap="nowrap" class="blogEntryTitle">Task :'+selectedTask+'</td>'; 227 193 timeSheetTable += '</tr></table>'; 228 194 timeSheetTable += '</td></tr><tr><td>'; 229 195 timeSheetTable += '<table width="100%"><tr><td width="100%">'; 230 timeSheetTable += '<font class="blogEntryLabel">Time Worked </font>';196 timeSheetTable += '<font class="blogEntryLabel">Time Worked: </font>'; 231 197
