Changeset 75eb781 in indico
- Timestamp:
- 03/28/11 16:32:29 (2 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
- Children:
- ce4589
- Parents:
- 55c97c
- git-author:
- Adrian Moennich <jerome.ernst.monnich@…> (03/22/11 14:12:44)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (03/28/11 16:32:29)
- Location:
- indico
- Files:
-
- 2 edited
-
MaKaC/webinterface/rh/roomBooking.py (modified) (2 diffs)
-
htdocs/js/indico/RoomBooking/MapOfRooms.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/rh/roomBooking.py
r55c97c r75eb781 515 515 monthM = params.get("month") 516 516 yearY = params.get("year") 517 dayEnd = params.get("dayEnd") 518 monthEnd = params.get("monthEnd") 519 yearEnd = params.get("yearEnd") 520 521 hourStart = params.get("hour") 522 minuteStart = params.get("minute") 523 hourEnd = params.get("hourEnd") 524 minuteEnd = params.get("minuteEnd") 525 repeatability = params.get("repeatability") 526 527 if hourStart and minuteStart and hourStart.isdigit() and minuteStart.isdigit(): 528 hourStart = int(hourStart) 529 minuteStart = int(minuteStart) 530 else: 531 hourStart = 8 532 minuteStart = 30 533 534 if hourEnd and minuteEnd and hourEnd.isdigit() and minuteEnd.isdigit(): 535 hourEnd = int(hourEnd) 536 minuteEnd = int(minuteEnd) 537 else: 538 hourEnd = 17 539 minuteEnd = 30 517 540 518 541 if dayD != None and dayD.isdigit() and \ 519 542 monthM != None and monthM.isdigit() and \ 520 543 yearY != None and yearY.isdigit(): 521 candResv.startDT = datetime(int(yearY), int(monthM), int(dayD), 8, 30) 522 candResv.endDT = datetime(int(yearY), int(monthM), int(dayD), 17, 30) 544 candResv.startDT = datetime(int(yearY), int(monthM), int(dayD), hourStart, minuteStart) 545 if dayEnd != None and dayEnd.isdigit() and \ 546 monthEnd != None and monthEnd.isdigit() and \ 547 yearEnd!= None and yearEnd.isdigit(): 548 candResv.endDT = datetime(int(yearEnd), int(monthEnd), int(dayEnd), hourEnd, minuteEnd) 549 if candResv.endDT.date() != candResv.startDT.date() and candResv.repeatability is None: 550 candResv.repeatability = RepeatabilityEnum.daily 551 else: 552 candResv.endDT = datetime(int(yearY), int(monthM), int(dayD), hourEnd, minuteEnd) 523 553 else: 524 554 if candResv.startDT == None: 525 candResv.startDT = datetime( now.year, now.month, now.day, 8, 30)555 candResv.startDT = datetime( now.year, now.month, now.day, hourStart, minuteStart ) 526 556 if candResv.endDT == None: 527 candResv.endDT = datetime( now.year, now.month, now.day, 17, 30 ) 557 candResv.endDT = datetime( now.year, now.month, now.day, hourEnd, minuteEnd ) 558 if repeatability is not None: 559 if repeatability == 'None': 560 candResv.repeatability = None 561 else: 562 candResv.repeatability = int(repeatability) 528 563 if self._getUser(): 529 564 if candResv.bookedForName == None: … … 542 577 candResv.needsAVCSupport = False 543 578 544 if not ws.getVar( "dontAssign" ) :579 if not ws.getVar( "dontAssign" ) and not params.get("ignoreSession"): 545 580 if ws.getVar( "defaultStartDT" ): 546 581 candResv.startDT = ws.getVar( "defaultStartDT" ) -
indico/htdocs/js/indico/RoomBooking/MapOfRooms.js
rc31158 r75eb781 197 197 198 198 // "Book" link 199 var book = Html.a({href:room.bookingUrl, target:'_parent', className:'mapBookRoomLink'}, $T("Book")); 199 var bookingUrl = room.bookingUrl; 200 if($E('isAvailable').dom.checked) { 201 bookingUrl += '&ignoreSession=on'; 202 each({ 203 sDay: 'day', 204 sMonth: 'month', 205 sYear: 'year', 206 eDay: 'dayEnd', 207 eMonth: 'monthEnd', 208 eYear: 'yearEnd', 209 repeatability: 'repeatability' 210 }, function(param, field) { 211 bookingUrl += '&' + param + '=' + encodeURIComponent($E(field).dom.value); 212 }); 213 214 var sTime = $E('sTime').dom.value.split(':'); 215 var eTime = $E('eTime').dom.value.split(':'); 216 if(sTime.length == 2 && eTime.length == 2) { 217 bookingUrl += '&hour=' + parseInt(sTime[0], 10); 218 bookingUrl += '&minute=' + parseInt(sTime[1], 10); 219 bookingUrl += '&hourEnd=' + parseInt(eTime[0], 10); 220 bookingUrl += '&minuteEnd=' + parseInt(eTime[1], 10); 221 } 222 } 223 var book = Html.a({href:bookingUrl, target:'_parent', className:'mapBookRoomLink'}, $T("Book")); 200 224 201 225 // "More" link - for room details
Note: See TracChangeset
for help on using the changeset viewer.
