Changeset 7319f3 in indico
- Timestamp:
- 09/29/11 16:56:28 (20 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- ecda80
- Parents:
- 0bebd5
- git-author:
- Pedro Ferreira <jose.pedro.ferreira@…> (09/27/11 16:21:38)
- git-committer:
- Pedro Ferreira <jose.pedro.ferreira@…> (09/29/11 16:56:28)
- Location:
- indico
- Files:
-
- 12 edited
-
MaKaC/common/utils.py (modified) (1 diff)
-
MaKaC/plugins/Collaboration/CERNMCU/collaboration.py (modified) (12 diffs)
-
MaKaC/plugins/Collaboration/EVO/collaboration.py (modified) (6 diffs)
-
MaKaC/plugins/Collaboration/EVO/pages.py (modified) (1 diff)
-
MaKaC/plugins/Collaboration/EVO/tpls/Main.js (modified) (1 diff)
-
MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py (modified) (1 diff)
-
MaKaC/plugins/Collaboration/RecordingRequest/mail.py (modified) (2 diffs)
-
MaKaC/plugins/Collaboration/Vidyo/collaboration.py (modified) (6 diffs)
-
MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py (modified) (1 diff)
-
MaKaC/plugins/Collaboration/base.py (modified) (14 diffs)
-
MaKaC/webinterface/tpls/events/include/MeetingBody.tpl (modified) (3 diffs)
-
htdocs/js/indico/Core/Presentation.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/common/utils.py
r4137b2 r7319f3 415 415 416 416 417 def formatDateTime(dateTime, showWeek=False, format=None ):417 def formatDateTime(dateTime, showWeek=False, format=None, locale=None): 418 418 week = "" 419 locale = str( currentLocale())419 locale = str(locale or currentLocale()) 420 420 if showWeek: 421 421 week = "EEEE " -
indico/MaKaC/plugins/Collaboration/CERNMCU/collaboration.py
r9d8047 r7319f3 91 91 self._creationTriesCounter = 0 92 92 93 def canBeStarted(self): 94 if self.isHappeningNow(): 95 return self._numberOfDisconnectedParticipants > 0 96 else: 97 return False 98 99 def canBeStopped(self): 100 if self.isHappeningNow(): 101 return self._numberOfConnectedParticipants > 0 102 else: 103 return False 104 93 105 def getMCUStartTime(self): 94 106 return MCUTime(self.getAdjustedStartDate(getCERNMCUOptionValueByName("MCUTZ"))) … … 193 205 194 206 def updateNumberOfConnectedParticipants(self): 195 self._numberOfConnectedParticipants = 0 196 self._numberOfDisconnectedParticipants = 0 207 connected, disconnected = 0, 0 197 208 for participant in self.getParticipantList(): 198 209 if participant.getCallState() == "connected": 199 self._numberOfConnectedParticipants = self._numberOfConnectedParticipants +1210 connected += 1 200 211 else: 201 self._numberOfDisconnectedParticipants = self._numberOfDisconnectedParticipants + 1 212 disconnected += 1 213 214 # we do these checks since we don't want to write in the DB 215 # unless we are sure the values changed 216 # (avoids DB writes in display pages) 217 218 if connected != self._numberOfConnectedParticipants: 219 self._numberOfConnectedParticipants = connected 220 221 if disconnected != self._numberOfDisconnectedParticipants: 222 self._numberOfDisconnectedParticipants = disconnected 223 224 if self._numberOfConnectedParticipants == 0: 225 if self._numberOfDisconnectedParticipants == 0: 226 self._play_status = None 227 else: 228 self._play_status = False 229 else: 230 self._play_status = True 202 231 203 232 ## overriding methods … … 306 335 return result 307 336 308 self._statusMessage = "Booking created"309 self._statusClass = "statusMessageOK"310 337 self._bookingParams["id"] = numericId 311 338 self._oldName = self._bookingParams["name"] 312 339 self._created = True 313 self.checkCanStart() 340 341 self.updateNumberOfConnectedParticipants() 314 342 315 343 except Fault, e: … … 421 449 422 450 self._created = True 423 self. checkCanStart()451 self.updateNumberOfConnectedParticipants() 424 452 425 453 except Fault, e: … … 433 461 self._create() 434 462 435 436 463 def _start(self): 437 464 self._checkStatus() 438 if self. _canBeStarted:465 if self.canBeStarted(): 439 466 for p in self.getParticipantList(returnSorted = True): 440 467 self._connectParticipant(p) 441 468 442 self._statusMessage = "Conference started!"443 self.checkCanStart(changeMessage = False)469 # True = started 470 self.updateNumberOfConnectedParticipants() 444 471 445 472 def _connectParticipant(self, participant): … … 451 478 452 479 try: 480 self.updateNumberOfConnectedParticipants() 453 481 mcu = MCU.getInstance() 454 482 if (participant.getCallState() == "disconnected" or participant.getCallState() == "dormant") and participant.getParticipantType() != "ad_hoc": … … 462 490 463 491 participant.setCallState("connected") 492 self.updateNumberOfConnectedParticipants() 464 493 465 494 except Fault, e: … … 474 503 def startSingleParticipant(self, participant): 475 504 self._checkStatus() 476 if self. _canBeStarted:505 if self.canBeStarted(): 477 506 result = self._connectParticipant(participant) 478 self.checkCanStart(changeMessage = False)479 507 return result 508 self.updateNumberOfConnectedParticipants() 480 509 481 510 def _stop(self): 482 511 self._checkStatus() 483 if self. _canBeStopped:512 if self.canBeStopped(): 484 513 for p in self.getParticipantList(returnSorted = True): 485 514 self._disconnectParticipant(p) 486 515 487 self.checkCanStart()488 self._statusMessage = "Conference stopped" 489 self._statusClass = "statusMessageOther"516 # False = stopped 517 518 self.updateNumberOfConnectedParticipants() 490 519 491 520 def _disconnectParticipant(self, participant): 492 521 try: 522 self.updateNumberOfConnectedParticipants() 493 523 mcu = MCU.getInstance() 494 524 … … 510 540 del self._participants[participant.getId()] 511 541 542 self.updateNumberOfConnectedParticipants() 543 512 544 except Fault, e: 513 545 Logger.get('CERNMCU').warning("""Evt:%s, booking:%s, calling participant.disconnect. Got error: %s""" % (self._conf.getId(), self.getId(), str(e))) … … 521 553 def stopSingleParticipant(self, participant): 522 554 self._checkStatus() 523 if self. _canBeStopped:555 if self.canBeStopped(): 524 556 result = self._disconnectParticipant(participant) 525 self.checkCanStart(changeMessage = False)526 557 return result 527 558 528 559 def _notifyOnView(self): 529 self.checkCanStart()560 pass 530 561 531 562 def _checkStatus(self): 532 563 if self._created: 564 self.updateNumberOfConnectedParticipants() 533 565 self.queryConference() 534 566 self._cleanupAdHocParticipants() 535 self.checkCanStart()536 567 537 568 def _delete(self): … … 578 609 579 610 580 self.checkCanStart()581 611 if self._numberOfConnectedParticipants > 0: 582 612 #we have to connect the new participant 583 613 self._connectParticipant(participant) 584 self.checkCanStart(changeMessage = False)585 586 614 587 615 return True … … 661 689 Logger.get('CERNMCU').warning("""Evt:%s, calling participant.remove. Got error: %s""" % (self._conf.getId(), str(e))) 662 690 return self.handleFault('remove', e) 663 664 def checkCanStart(self, changeMessage = True):665 if self._created:666 now = nowutc()667 self._canBeNotifiedOfEventDateChanges = CSBooking._canBeNotifiedOfEventDateChanges668 self.updateNumberOfConnectedParticipants()669 if self.getStartDate() < now and self.getEndDate() > now:670 self._canBeStarted = self._numberOfDisconnectedParticipants > 0671 self._canBeStopped = self._numberOfConnectedParticipants > 0672 if changeMessage:673 self._statusMessage = "Ready to start!"674 self._statusClass = "statusMessageOK"675 else:676 self._canBeStarted = False677 self._canBeStopped = False678 if now > self.getEndDate() and changeMessage:679 self._statusMessage = "Already took place"680 self._statusClass = "statusMessageOther"681 self._needsToBeNotifiedOfDateChanges = False682 self._canBeNotifiedOfEventDateChanges = False683 691 684 692 def _cleanupAdHocParticipants(self): -
indico/MaKaC/plugins/Collaboration/EVO/collaboration.py
rd25c08 r7319f3 195 195 196 196 self.bookingOK() 197 self.checkCanStart()198 199 197 200 198 # if self._bookingParams["sendMailToManagers"]: … … 237 235 238 236 self.bookingOK() 239 self.checkCanStart()240 237 241 238 # if self._bookingParams["sendMailToManagers"]: … … 271 268 """ 272 269 self._checkStatus() 273 if self. _canBeStarted:270 if self.canBeStarted(): 274 271 self._permissionToStart = True 272 273 def _canBeNotifiedOfEventDateChanges(self): 274 return not self.hasHappened() 275 276 def needsToBeNotifiedOfDateChanges(self): 277 """ Returns if this booking in particular needs to be notified 278 of their owner Event changing start date, end date or timezone. 279 """ 280 if self.hasHappened(): 281 return False 282 else: 283 return self._needsToBeNotifiedOfDateChanges 275 284 276 285 def _notifyOnView(self): … … 284 293 remainingTime = self.getAdjustedStartDate('UTC') - nowutc() 285 294 286 checkDone = False287 288 295 for index, check in enumerate(checksToDo): 289 296 if remainingTime < check and not check in self._checksDone: 290 297 self._checkStatus() 291 298 self._checksDone.extend(checksToDo[index:]) 292 checkDone = True293 299 break 294 295 if not checkDone:296 self.checkCanStart()297 300 298 301 def _checkStatus(self): … … 305 308 306 309 self.assignAttributes(returnedAttributes) 307 self.checkCanStart()308 310 309 311 except EVOControlledException, e: … … 406 408 self._bookingParams["communityId"] = attributes["com"] 407 409 408 self.checkCanStart()409 410 410 if changesFromEVO: 411 411 return ChangesFromEVOError(changesFromEVO) 412 412 413 413 def bookingOK(self): 414 self._statusMessage = "Booking created"415 self._statusClass = "statusMessageOK"416 414 self._created = True 417 418 def checkCanStart(self, changeMessage = True):419 if self._created:420 now = nowutc()421 self._canBeDeleted = True422 self._canBeNotifiedOfEventDateChanges = CSBooking._canBeNotifiedOfEventDateChanges423 if self.getStartDate() < now and self.getEndDate() > now:424 self._canBeStarted = True425 self._canBeDeleted = False426 if changeMessage:427 self._statusMessage = "Ready to start!"428 self._statusClass = "statusMessageOK"429 else:430 self._canBeStarted = False431 if now > self.getEndDate() and changeMessage:432 self._canBeDeleted = False433 self._statusMessage = "Already took place"434 self._statusClass = "statusMessageOther"435 self._needsToBeNotifiedOfDateChanges = False436 self._canBeNotifiedOfEventDateChanges = False437 elif changeMessage:438 self.bookingOK()439 415 440 416 def _sendMail(self, operation): -
indico/MaKaC/plugins/Collaboration/EVO/pages.py
rc87441 r7319f3 201 201 @classmethod 202 202 def getLaunchInfo(cls, booking, displayTz=None): 203 booking.checkCanStart()204 203 if (booking.canBeStarted()): 205 204 return { -
indico/MaKaC/plugins/Collaboration/EVO/tpls/Main.js
rc0de5a r7319f3 139 139 return '<span class="collaborationWarning">' + booking.errorMessage + '<\/span>' 140 140 } else { 141 return booking.bookingParams.startDate.s ubstring(11) + " to " + booking.bookingParams.endDate.substring(11)+ " for " + booking.bookingParams.communityName;141 return booking.bookingParams.startDate.split(' ')[1] + " to " + booking.bookingParams.endDate.split(' ')[1] + " for " + booking.bookingParams.communityName; 142 142 } 143 143 }, -
indico/MaKaC/plugins/Collaboration/RecordingRequest/collaboration.py
r800c21 r7319f3 55 55 def __init__(self, type, conf): 56 56 CSBookingBase.__init__(self, type, conf) 57 58 def getStatusMessage(self): 59 return self._statusMessage 60 61 def hasHappened(self): 62 return False 63 64 def isHappeningNow(self): 65 return False 57 66 58 67 def _checkBookingParams(self): -
indico/MaKaC/plugins/Collaboration/RecordingRequest/mail.py
r800c21 r7319f3 98 98 </tr> 99 99 <tr> 100 <td style="vertical-align: top; white-space : nowrap;">101 <strong>Recording purpose(s):</strong>102 </td>103 <td style="vertical-align: top">104 %s105 </td>106 </tr>107 <tr>108 <td style="vertical-align: top; white-space : nowrap;">109 <strong>Intended audience(s):</strong>110 </td>111 <td style="vertical-align: top; white-space : nowrap;">112 %s113 </td>114 </tr>115 <tr>116 <td style="vertical-align: top; white-space : nowrap;">117 <strong>Subject matter(s):</strong>118 </td>119 <td style="vertical-align: top">120 %s121 </td>122 </tr>123 <tr>124 100 <td colspan="2"> 125 101 <strong>Additional comments:</strong><br /> … … 143 119 str(bp['numRemoteViewers']), 144 120 str(bp['numAttendees']), 145 self._getPurposes(),146 self._getAudiences(),147 self._getMatters(),148 121 self._getComments(), 149 122 self._getTalks()) -
indico/MaKaC/plugins/Collaboration/Vidyo/collaboration.py
r67688b r7319f3 80 80 ## setters and getters for complex params and internal params ## 81 81 82 def canBeStarted(self): 83 return self._created 84 85 def canBeStopped(self): 86 return False 87 88 def canBeDeleted(self): 89 return True 90 82 91 def getPin(self): 83 92 """ This method returns the PIN that will be displayed in the indico page … … 251 260 or if there are no more checks to do. 252 261 """ 253 if self._created: 254 checksToDo = [timedelta(hours = int(hours)) for hours in getVidyoOptionValue("checkTimes")] 255 checksToDo.sort() 256 257 minimumCheckDate = self.getConference().getAdjustedEndDate() + timedelta(days = int(getVidyoOptionValue("maxDaysBeforeClean"))) 258 for index, check in enumerate(checksToDo): 259 if nowutc() > minimumCheckDate + check and not check in self.getChecksDone(): 260 try: 261 self._checkStatus() #will call self.setBookingNotPresent() if room has been removed 262 self.getChecksDone().extend(checksToDo[index:]) 263 self._p_changed = 1 264 except Exception: 265 Logger.get("Vidyo").exception("Calling _checkStatus() during _notifyOnView() for booking %s of conf %s" % (str(self.getId()), str(self.getConference().getId()))) 266 break 267 262 pass 268 263 269 264 … … 341 336 'launchTooltip': _("Click here to join the Vidyo room!")} 342 337 338 def getStatusMessage(self): 339 """ Returns the status message as a string. 340 This attribute will be available in Javascript with the "statusMessage" 341 """ 342 status = self.getPlayStatus() 343 if not self._created: 344 return _("Room no longer exists") 345 elif status == None: 346 return _("Public room created") 347 elif status: 348 return _("Conference started") 349 elif not status: 350 return _("Conference stopped") 343 351 344 352 ## end of overriding methods … … 348 356 """ 349 357 self._created = True 350 self._statusMessage = "Public room created"351 self._statusClass = "statusMessageOK"352 self._canBeStarted = True353 354 358 355 359 def setBookingNotPresent(self): … … 358 362 """ 359 363 self._created = False 360 self._statusMessage = "Room no longer exists"361 self._statusClass = "statusMessageOther"362 self._canBeStarted = False363 364 #booking is not present remotely so no need to delete it later 364 365 VidyoTools.getEventEndDateIndex().unindexBooking(self) 365 366 366 367 367 def _sendNotificationToOldNewOwner(self, oldOwner): … … 487 487 cs.setStartDate(self.getStartDate()) 488 488 cs.setEndDate(self.getEndDate()) 489 cs.setStatusMessage(self.getStatusMessage())490 cs.setStatusClass(self.getStatusClass())491 489 cs.setCanBeDeleted(self.canBeDeleted()) 492 490 cs.setHidden(self.isHidden()) -
indico/MaKaC/plugins/Collaboration/WebcastRequest/collaboration.py
r800c21 r7319f3 54 54 55 55 def _checkBookingParams(self): 56 return False 57 58 def getStatusMessage(self): 59 return self._statusMessage 60 61 def hasHappened(self): 62 return False 63 64 def isHappeningNow(self): 56 65 return False 57 66 -
indico/MaKaC/plugins/Collaboration/base.py
rdc366d r7319f3 119 119 or if it is a list of strings, those who have a type included in filterByType. 120 120 """ 121 121 122 if not hasattr(self, "_bookingsByType"): #TODO: remove when safe 122 123 self._bookingsByType = {} … … 956 957 They will be used on the client for the local start action. 957 958 Needs to be defined by the implementing class, as keys with empty values. 958 -_statusMessage, _statusClass : they represent the status message (and its CSS class) that will be displayed.959 The status of a booking can be, for example: "Booking Accepted" (in green), "Booking refused" (in red)960 959 -_warning: A warning is a plugin-defined object, with information to show to the user when 961 960 the operation went well but we still have to show some info to the user. 962 -_canBeStarted: If its value is true, the "start" button for the booking will be able to be pushed.963 It can be false if, for example:964 + The plugin didn't like the booking parameters and doesn't give permission for the booking to be started,965 + The booking has already been started, so the "start" button has to be faded in order not to be pressed twice.966 -_canBeStopped: If its value is true, the "stop" button for the booking will be able to be pushed.967 For example, before starting a booking the "stop" button for the booking will be faded.968 961 -_permissionToStart : Even if the "start" button for a booking is able to be pushed, there may be cases where the booking should 969 962 not start. For example, if it's not the correct time yet. … … 984 977 self._startDateTimestamp = None 985 978 self._endDateTimestamp = None 986 self._statusMessage = ""987 self._statusClass = ""988 979 self._acceptRejectStatus = None #None = not yet accepted / rejected; True = accepted; False = rejected 989 980 self._rejectReason = "" 990 981 self._bookingParams = {} 991 982 self._canBeDeleted = True 992 self._canBeStarted = self._hasStart993 self._canBeStopped = False994 983 self._permissionToStart = False 995 984 self._permissionToStop = False 996 985 self._needsToBeNotifiedOfDateChanges = self._canBeNotifiedOfEventDateChanges 997 986 self._hidden = False 987 self._play_status = None 998 988 999 989 setattr(self, "_" + bookingType + "Options", CollaborationTools.getPlugin(bookingType).getOptions()) … … 1151 1141 return "" 1152 1142 else: 1153 return formatDateTime(self.getAdjustedStartDate() )1143 return formatDateTime(self.getAdjustedStartDate(), locale='en_US') 1154 1144 1155 1145 def setStartDate(self, startDate): … … 1178 1168 return self._endDate 1179 1169 1170 def isHappeningNow(self): 1171 now = nowutc() 1172 return self.getStartDate() < now and self.getEndDate() > now 1173 1174 def hasHappened(self): 1175 now = nowutc() 1176 return now > self.getEndDate() 1177 1180 1178 def getAdjustedEndDate(self, tz=None): 1181 1179 """ Returns the booking end date, adjusted to a given timezone. … … 1191 1189 def setEndDateTimestamp(self, endDateTimestamp): 1192 1190 self._endDateTimestamp = endDateTimestamp 1191 1193 1192 def getEndDateAsString(self): 1194 1193 """ Returns the start date as a string, expressed in the meeting's timezone … … 1197 1196 return "" 1198 1197 else: 1199 return formatDateTime(self.getAdjustedEndDate() )1198 return formatDateTime(self.getAdjustedEndDate(), locale='en_US') 1200 1199 1201 1200 def setEndDate(self, endDate): … … 1223 1222 This attribute will be available in Javascript with the "statusMessage" 1224 1223 """ 1225 return _(self._statusMessage) 1226 1227 def setStatusMessage(self, statusMessage): 1228 """ Sets the status message as a string. 1229 This attribute will be available in Javascript with the "statusMessage" 1230 """ 1231 self._statusMessage = statusMessage 1224 status = self.getPlayStatus() 1225 if status == None: 1226 if self.isHappeningNow(): 1227 return _("Ready to start!") 1228 elif self.hasHappened(): 1229 return _("Already took place") 1230 else: 1231 return _("Booking created") 1232 elif status: 1233 return _("Conference started") 1234 elif not status: 1235 return _("Conference stopped") 1232 1236 1233 1237 def getStatusClass(self): … … 1235 1239 This attribute will be available in Javascript with the "statusClass" 1236 1240 """ 1237 if not hasattr(self, "_statusClass"): #TODO: remove when safe 1238 self._statusClass = "" 1239 return self._statusClass 1240 1241 def setStatusClass(self, statusClass): 1242 """ Sets the status message CSS class as a string. 1243 This attribute will be available in Javascript with the "statusClass" 1244 """ 1245 self._statusClass = statusClass 1241 if self.getPlayStatus() == None or self.hasHappened(): 1242 return "statusMessageOther" 1243 else: 1244 return "statusMessageOK" 1246 1245 1247 1246 def accept(self, user = None): … … 1540 1539 """ 1541 1540 1542 if not hasattr(self, '_canBeDeleted'): 1543 self._canBeDeleted = True 1544 return self._canBeDeleted 1541 if self.isHappeningNow() or self.hasHappened(): 1542 return False 1543 else: 1544 return True 1545 1545 1546 1546 def setCanBeDeleted(self, canBeDeleted): … … 1554 1554 This attribute will be available in Javascript with the "canBeStarted" attribute 1555 1555 """ 1556 return self. _canBeStarted1556 return self.isHappeningNow() 1557 1557 1558 1558 def canBeStopped(self): … … 1560 1560 This attribute will be available in Javascript with the "canBeStopped" attribute 1561 1561 """ 1562 return self. _canBeStopped1562 return self.isHappeningNow() 1563 1563 1564 1564 def isPermittedToStart(self): … … 1589 1589 of their owner Event changing start date, end date or timezone. 1590 1590 """ 1591 return self._canBeNotifiedOfEventDateChanges1591 return False 1592 1592 1593 1593 def needsToBeNotifiedOfDateChanges(self): … … 1798 1798 raise 1799 1799 1800 def getPlayStatus(self): 1801 if not hasattr(self, '_play_status'): 1802 self._play_status = None 1803 return self._play_status 1804 1800 1805 class WCSTemplateBase(wcomponents.WTemplated): 1801 1806 """ Base class for Collaboration templates. -
indico/MaKaC/webinterface/tpls/events/include/MeetingBody.tpl
rc87441 r7319f3 13 13 <div style="position: absolute; right: 50px; top: 3px;"><span class="fakeLink dropDownMenu" id="goToDayLink"><strong>Go to day</strong></span></div> 14 14 <script type="text/javascript"> 15 var goToDayMenuItems = {}; 15 var goToDayMenuItems = $D(${dict((prettyDate(item.getAdjustedStartDate(timezone)), 16 '#%s' % getDate(item.getAdjustedStartDate(timezone))) for item in entries)| n,j}); 16 17 17 <% addedDates = set() %> 18 % for item in entries: 19 % if item.getAdjustedStartDate(timezone): 20 <% date = getDate(item.getAdjustedStartDate(timezone)) %> 21 % if date not in addedDates: 22 goToDayMenuItems['${prettyDate(item.getAdjustedStartDate(timezone))}'] = '#${date}'; 23 <% addedDates.add(date) %> 24 % endif 25 % endif 26 % endfor 18 19 goToDayMenuItems.sort(function(val1, val2){ 20 return SortCriteria.Default(goToDayMenuItems.get(val1), goToDayMenuItems.get(val2)); 21 }); 27 22 28 23 var goToDayLink = $E('goToDayLink'); … … 47 42 48 43 <ul class="dayList"> 44 <% previousDate = None %> 49 45 % for index, item in enumerate(entries): 50 46 <% 51 47 date = getDate(item.getAdjustedStartDate(timezone)) 52 previousItem = entries[index - 1] if index - 1 >= 0 else None53 nextItem = entries[index + 1] if index + 1 < len(entries) else None54 48 %> 55 % if not previousItem or date != getDate(previousItem.getAdjustedStartDate(timezone)): 49 50 % if previousDate and previousDate != date: 51 </ul> 52 </li> 53 % endif 54 55 % if not previousDate or date != previousDate: 56 56 <li> 57 57 <div style="width: 100%;"> … … 64 64 <%include file="${getItemType(item)}.tpl" args="item=item, parent=conf, minutes=minutes"/> 65 65 66 % if not nextItem or date != getDate(nextItem.getAdjustedStartDate(timezone)): 67 </ul> 68 </li> 69 % endif 66 <% previousDate = date %> 70 67 % endfor 68 % if entries: 69 </ul> 70 </li> 71 % endif 71 72 </ul> 72 73 </div> -
indico/htdocs/js/indico/Core/Presentation.js
raaf49c r7319f3 257 257 258 258 this.each = function(iterator) { 259 260 // follow the order 261 262 var self = this; 263 each(this.order, 264 function (key) { 265 iterator(self.get(key), key); 266 }); 267 }; 259 self.order.each(function(val, i){ 260 return iterator(self.get(val), val); 261 }); 262 return iterator.result; 263 } 268 264 269 265 this.set = function(key, value) {
Note: See TracChangeset
for help on using the changeset viewer.
