Changeset 7c0515 in indico
- Timestamp:
- 12/05/11 17:28:13 (18 months ago)
- Branches:
- master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- be157b
- Parents:
- 79778c
- git-author:
- Adrian Moennich <jerome.ernst.monnich@…> (10/21/11 14:10:44)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (12/05/11 17:28:13)
- Location:
- indico
- Files:
-
- 11 edited
-
MaKaC/conference.py (modified) (1 diff)
-
MaKaC/services/implementation/schedule.py (modified) (4 diffs)
-
MaKaC/webinterface/tpls/BreakDataModification.tpl (modified) (1 diff)
-
MaKaC/webinterface/tpls/ContributionDataModification.tpl (modified) (1 diff)
-
MaKaC/webinterface/tpls/EventLocationInfo.tpl (modified) (3 diffs)
-
MaKaC/webinterface/tpls/SessionModEditData.tpl (modified) (1 diff)
-
htdocs/js/indico/Legacy/Dialogs.js (modified) (5 diffs)
-
htdocs/js/indico/Management/RoomBooking.js (modified) (5 diffs)
-
htdocs/js/indico/Management/Timetable.js (modified) (8 diffs)
-
htdocs/js/indico/Timetable/Draw.js (modified) (3 diffs)
-
htdocs/js/indico/Timetable/Management.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/conference.py
rd4d63d r7c0515 7099 7099 information should be inherited 7100 7100 """ 7101 return self.session 7101 return self.session.conference 7102 7102 7103 7103 def delete(self): -
indico/MaKaC/services/implementation/schedule.py
r543f32 r7c0515 332 332 self.__addConveners2Slot(slot) 333 333 self._setLocationInfo(session) 334 self._setLocationInfo(slot) 334 335 335 336 logInfo = session.getLogInfo() … … 743 744 self. _addConveners(self._slot) 744 745 self._setLocationInfo(self._slot) 746 if self._slot.getSession().getOwnLocation() and self._slot.getSession().getOwnRoom(): 747 # Update session location unless it inherits 748 self._setLocationInfo(self._session) 745 749 self._setSessionTitle(self._slot) 746 750 … … 1251 1255 def _performOperation(self): 1252 1256 result = EditRoomLocationBase._performOperation(self) 1257 if self._session.getOwnLocation() and self._session.getOwnRoom(): 1258 self._setLocationInfo(self._session) 1253 1259 1254 1260 pickledDataSlotSchEntry = fossilize(self._slot.getConfSchEntry(), tz=self._conf.getTimezone()) … … 1268 1274 def _performOperation(self): 1269 1275 result = EditRoomLocationBase._performOperation(self) 1276 if self._session.getOwnLocation() and self._session.getOwnRoom(): 1277 # Update session location unless it inherits 1278 self._setLocationInfo(self._session) 1270 1279 pickledDataSlotSchEntry = fossilize(self._slot.getConfSchEntry(), tz=self._conf.getTimezone()) 1271 1280 pickledDataSession = fossilize(self._session, tz=self._conf.getTimezone()) -
indico/MaKaC/webinterface/tpls/BreakDataModification.tpl
rc0de5a r7c0515 23 23 24 24 25 <%include file="EventLocationInfo.tpl" args="event=self_._rh._break, modifying=True, parentRoomInfo=roomInfo(self_._rh._break, level='inherited'), showParent=True, conf = False "/>25 <%include file="EventLocationInfo.tpl" args="event=self_._rh._break, modifying=True, parentRoomInfo=roomInfo(self_._rh._break, level='inherited'), showParent=True, conf = False, parentName = _('session') if contrib.getSession() else _('event')"/> 26 26 27 27 </tr> -
indico/MaKaC/webinterface/tpls/ContributionDataModification.tpl
rc0de5a r7c0515 40 40 % endif 41 41 42 <%include file="EventLocationInfo.tpl" args="event=self_._rh._target, modifying=True, parentRoomInfo=roomInfo(self_._rh._target, level='inherited'), showParent=True, conf = self_._conf, eventId = self_.getContribId() "/>42 <%include file="EventLocationInfo.tpl" args="event=self_._rh._target, modifying=True, parentRoomInfo=roomInfo(self_._rh._target, level='inherited'), showParent=True, conf = self_._conf, eventId = self_.getContribId(), parentName=_('session') if contrib.getSession() else _('event')"/> 43 43 44 44 -
indico/MaKaC/webinterface/tpls/EventLocationInfo.tpl
rea3dc1 r7c0515 1 <%page args="modifying=None, showParent=None, conf=None, event=None, parentRoomInfo=None, eventId=None "/>1 <%page args="modifying=None, showParent=None, conf=None, event=None, parentRoomInfo=None, eventId=None, parentName=None"/> 2 2 <% import MaKaC %> 3 3 … … 19 19 % endif 20 20 21 var parentEvt =22 21 % if showParent: 23 $O(${ jsonEncode(parentRoomInfo) }) 22 var parentEvt = $O(${ jsonEncode(parentRoomInfo) }); 23 var parentName = ${ jsonEncode(parentName) }; 24 24 % else: 25 false 25 var parentEvt = false; 26 var parentName = null; 26 27 % endif 27 28 ; … … 40 41 <% from MaKaC.common.Conversion import Conversion %> 41 42 var bookedRooms = ${ Conversion.reservationsList(conf.getRoomBookingList()) }; 42 rbWidget = new RoomBookingReservationWidget(Indico.Data.Locations, info, parentEvt, nullRoomInfo(info), ${ eventFavorites }, ${"null" if modifying else "Indico.Data.DefaultLocation"}, bookedRooms, ttdata, null, "${ eventId }" );43 rbWidget = new RoomBookingReservationWidget(Indico.Data.Locations, info, parentEvt, nullRoomInfo(info), ${ eventFavorites }, ${"null" if modifying else "Indico.Data.DefaultLocation"}, bookedRooms, ttdata, null, "${ eventId }", parentName); 43 44 % else: 44 rbWidget = new RoomBookingWidget(Indico.Data.Locations, info, parentEvt, nullRoomInfo(info), ${ eventFavorites }, ${"null" if modifying else "Indico.Data.DefaultLocation"} );45 rbWidget = new RoomBookingWidget(Indico.Data.Locations, info, parentEvt, nullRoomInfo(info), ${ eventFavorites }, ${"null" if modifying else "Indico.Data.DefaultLocation"}, parentName); 45 46 % endif 46 47 -
indico/MaKaC/webinterface/tpls/SessionModEditData.tpl
rc0de5a r7c0515 20 20 21 21 22 <%include file="EventLocationInfo.tpl" args="event=self_._rh._target, modifying=True, parentRoomInfo=roomInfo(self_._rh._target, level='inherited'), showParent=True, conf = False "/>22 <%include file="EventLocationInfo.tpl" args="event=self_._rh._target, modifying=True, parentRoomInfo=roomInfo(self_._rh._target, level='inherited'), showParent=True, conf = False, parentName=_('event')"/> 23 23 24 24 <tr> -
indico/htdocs/js/indico/Legacy/Dialogs.js
r9f5d04 r7c0515 95 95 var self = this; 96 96 info.set('roomInfo', $O(roomInfo)); 97 roomEditor = new RoomBookingReservationWidget(Indico.Data.Locations, info.get('roomInfo'), parentRoomInfo, true, favoriteRooms, null, bookedRooms, timetable.parentTimetable?timetable.parentTimetable.getData():timetable.getData(), info );97 roomEditor = new RoomBookingReservationWidget(Indico.Data.Locations, info.get('roomInfo'), parentRoomInfo, true, favoriteRooms, null, bookedRooms, timetable.parentTimetable?timetable.parentTimetable.getData():timetable.getData(), info, undefined, $T('event')); 98 98 99 99 var convListWidget = new UserListField( … … 348 348 else { 349 349 info.set("conveners", params.sessionConveners); 350 info.set('roomInfo', $O({location: null, room: null})); 350 // using default session location or event location (if sessions's one is inheriting) 351 if (roomInfo.location !== parentRoomInfo.get('location') || 352 roomInfo.room !== parentRoomInfo.get('room') || 353 roomInfo.address !== parentRoomInfo.get('address')) { 354 info.set('roomInfo', $O(roomInfo)); 355 } else { 356 info.set('roomInfo', $O({location: null, room: null})); 357 } 351 358 } 352 359 … … 361 368 timetable.parentTimetable?timetable.parentTimetable.getData():timetable.getData(), 362 369 info, 363 editOn?params.id:null); 370 editOn?params.id:null, 371 $T('event')); 364 372 } else { 365 373 roomEditor = new RoomBookingWidget(Indico.Data.Locations, … … 368 376 nullRoomInfo(info.get('roomInfo')), 369 377 favoriteRooms, 370 null); 378 null, 379 $T('event')); 371 380 } 372 381 … … 679 688 680 689 popup.commitChanges = function() { 681 killProgress = IndicoUI.Dialogs.Util.progress($T('Saving...'));682 if(rtWidget.clean()){683 changedText.set(false);684 wasChanged = true;690 killProgress = IndicoUI.Dialogs.Util.progress($T('Saving...')); 691 if(rtWidget.clean()){ 692 changedText.set(false); 693 wasChanged = true; 685 694 saveButton.button('disable'); 686 req.set(rtWidget.get());687 }688 killProgress();695 req.set(rtWidget.get()); 696 } 697 killProgress(); 689 698 } 690 699 691 700 popup.commitChangesAndClose = function() { 692 saveAndClose = true;701 saveAndClose = true; 693 702 this.commitChanges(); 694 };703 }; 695 704 696 705 popup.closeMinutesPopup = function(){ 697 706 var self = this; 698 var confirmation = function(confirmed){699 if (confirmed == 1){707 var confirmation = function(confirmed){ 708 if (confirmed == 1){ 700 709 self.commitChangesAndClose(); 701 } 702 else if (confirmed == 2){ 710 } 711 else if (confirmed == 2){ 712 closeMinutes(); 713 } 714 }; 715 716 if (changedText.get()){ 717 var popupConfirm = new SaveConfirmPopup($T("Confirm"), Html.div({}, Html.div({style:{paddingBottom: pixels(16)}}, 718 $T("You have modified your text since you last saved.")), 719 Html.div({}, $T("Do you want to save your changes?"))), confirmation); 720 popupConfirm.open(); 721 } else { 703 722 closeMinutes(); 704 723 } 705 724 }; 706 707 if (changedText.get()){708 var popupConfirm = new SaveConfirmPopup($T("Confirm"), Html.div({}, Html.div({style:{paddingBottom: pixels(16)}},709 $T("You have modified your text since you last saved.")),710 Html.div({}, $T("Do you want to save your changes?"))), confirmation);711 popupConfirm.open();712 } else {713 closeMinutes();714 }715 };716 725 717 726 popup.draw = function() { -
indico/htdocs/js/indico/Management/RoomBooking.js
r16a341 r7c0515 45 45 draw: function() { 46 46 47 var rbActive = Indico.Settings.RoomBookingModuleActive 47 var rbActive = Indico.Settings.RoomBookingModuleActive; 48 48 49 49 this.inheritText = this.parentInfo?Html.span( 50 50 {}, 51 $T('Inherit from parent : '),51 $T('Inherit from parent {0}: ').format(this.parentName), 52 52 Html.span({}, 53 53 this.parentInfo.get('room') + " (" + … … 131 131 } 132 132 }, 133 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation ) {133 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, parentName) { 134 134 var self = this; 135 135 var rbActive = Indico.Settings.RoomBookingModuleActive 136 136 137 137 this.defaultLocation = defaultLocation; 138 this.parentName = parentName || ''; 138 139 this.locationChooser = new FlexibleSelect(locations, 177); 139 140 … … 379 380 } 380 381 }, 381 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent ){382 383 this.RoomBookingWidget(locations, info, parent, inheritDefault, [], defaultLocation )382 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent, parentName){ 383 384 this.RoomBookingWidget(locations, info, parent, inheritDefault, [], defaultLocation, parentName); 384 385 this.bookedRooms = $D(bookedRooms || {} ); 385 386 this.dateTime = dateTime; … … 396 397 this.inheritText = this.parentInfo?Html.span( 397 398 {}, 398 $T('Inherit from parent : '),399 $T('Inherit from parent {0}: ').format(this.parentName), 399 400 Html.span({}, 400 401 this.parentInfo.get('room') + " (" + … … 417 418 418 419 }, 419 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent ){420 this.RoomBookingReservationWidget(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent );420 function(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent, parentName){ 421 this.RoomBookingReservationWidget(locations, info, parent, inheritDefault, eventFavorites, defaultLocation, bookedRooms, timetableData, dateTime, editedEvent, parentName); 421 422 }); 422 423 -
indico/htdocs/js/indico/Management/Timetable.js
r1a3173 r7c0515 331 331 var ttdata = null 332 332 333 this.roomEditor = new RoomBookingReservationWidget(Indico.Data.Locations, info.get('roomInfo'), self.parentRoomData, true, self.favoriteRooms, null, self.bookedRooms, ttdata, info); 333 var parentName = { 334 Event: $T('event'), 335 Contribution: $T('contribution'), 336 SessionContribution: $T('contribution'), 337 Session: $T('session'), 338 SessionSlot: $T('session') 339 }[this.info.get('parentType')]; 340 341 this.roomEditor = new RoomBookingReservationWidget(Indico.Data.Locations, info.get('roomInfo'), self.parentRoomData, true, self.favoriteRooms, null, self.bookedRooms, ttdata, info, undefined, parentName); 334 342 335 343 var presListWidget = new UserListField( … … 481 489 } 482 490 483 each(self.args, function(value, key) { 484 self.info.set(key, value); 491 each(self.args, function(value, key) { 492 self.info.set(key, value); 493 }); 494 495 if (self.parameterManager.check()) { 496 var killProgress = IndicoUI.Dialogs.Util.progress(); 497 indicoRequest(self.method, self.info, function(result, error){ 498 killProgress(); 499 if (error) { 500 IndicoUtil.errorReport(error); 501 } 502 else { 503 self.close(); 504 // Only one element is returned but put it in an array 505 // since the successFunc expects arrays 506 self.successFunc([result]); 507 } 485 508 }); 486 487 if (self.parameterManager.check()) { 488 var killProgress = IndicoUI.Dialogs.Util.progress(); 489 indicoRequest(self.method, self.info, function(result, error){ 490 killProgress(); 491 if (error) { 492 IndicoUtil.errorReport(error); 493 } 494 else { 495 self.close(); 496 // Only one element is returned but put it in an array 497 // since the successFunc expects arrays 498 self.successFunc([result]); 499 } 500 }); 501 } 509 } 502 510 }], 503 511 [$T('Cancel'), function() { 504 self.close();512 self.close(); 505 513 }] 506 514 ]; … … 563 571 this.previousDate = dayStartDate; 564 572 this.info = new WatchObject(); 573 this.info.set('parentType', args.parentType); 565 574 566 575 if (this.timeStartMethod === null) { … … 694 703 695 704 this.ServiceDialogWithButtons(Indico.Urls.JsonRpcService, method, args, title); 696 });705 }); 697 706 698 707 … … 713 722 // check if the day changed 714 723 if(Util.formatDateTime(self.conferenceDays.get(), 715 IndicoDateTimeFormats.ServerHourless, 716 IndicoDateTimeFormats.Ordinal) != 717 self.previousDate.substr(0,10)){ 718 self.dayChanged = true; 724 IndicoDateTimeFormats.ServerHourless, 725 IndicoDateTimeFormats.Ordinal) != 726 self.previousDate.substr(0,10)){ 727 self.dayChanged = true; 728 } 729 if (self.isEdit) { 730 self._saveInfo(); 731 } else { 732 //in case we're inside a session and the break is added to a different day, we suppose it's not inside the session anymore 733 if(self.dayChanged){ 734 self.method = self.managementActions.methods.Break.add; 719 735 } 720 if (self.isEdit) { 721 self._saveInfo(); 722 } else { 723 //in case we're inside a session and the break is added to a different day, we suppose it's not inside the session anymore 724 if(self.dayChanged){ 725 self.method = self.managementActions.methods.Break.add; 736 else{ 737 if(exists(self.managementActions.timetable.parentTimetable)) { 738 self.method = self.managementActions.methods.SessionBreak.add; 726 739 } 727 else{728 if(exists(self.managementActions.timetable.parentTimetable)) {729 self.method = self.managementActions.methods.SessionBreak.add;730 }731 }732 self._submitInfo();733 740 } 741 self._submitInfo(); 742 } 734 743 }], 735 744 [$T('Cancel'), function() { … … 741 750 draw: function(){ 742 751 var self = this; 752 753 var parentName = { 754 Event: $T('event'), 755 Contribution: $T('contribution'), 756 SessionContribution: $T('contribution'), 757 Session: $T('session'), 758 SessionSlot: $T('session') 759 }[this.info.get('parentType')]; 743 760 744 761 this.roomEditor = new RoomBookingReservationWidget(Indico.Data.Locations, … … 751 768 this.managementActions.timetable.parentTimetable?this.managementActions.timetable.parentTimetable.getData():this.managementActions.timetable.getData(), 752 769 this.info, 753 this.isEdit?this.info.get("id"):null); 770 this.isEdit?this.info.get("id"):null, 771 parentName); 754 772 755 773 … … 1441 1459 return [ 1442 1460 [$T('Reschedule'), function() { 1443 self.__reschedule();1461 self.__reschedule(); 1444 1462 }], 1445 1463 [$T('Cancel'), function() { -
indico/htdocs/js/indico/Timetable/Draw.js
re6ba27 r7c0515 1163 1163 }; 1164 1164 1165 var parentName = { 1166 Event: $T('event'), 1167 Contribution: $T('contribution'), 1168 SessionContribution: $T('contribution'), 1169 Session: $T('session'), 1170 SessionSlot: $T('session') 1171 }[this.info.get('parentType')]; 1165 1172 1166 1173 this.roomEditor = new RoomBookingVerticalReservationWidget(Indico.Data.Locations, … … 1173 1180 this.timetableData, 1174 1181 this.startEndTimeField.accessor, 1175 this.eventData.id); 1182 this.eventData.id, 1183 parentName); 1176 1184 1177 1185 var roomEditorDiv = Html.div({id:'roomEditor'},this.roomEditor.draw()); … … 1193 1201 if(this.managementActions.session) 1194 1202 parent = this.managementActions.session; 1195 else if(this.eventData.sessionId)1196 parent = this.managementActions.eventInfo.sessions[this.eventData.sessionId];1197 1203 else 1198 1204 parent = this.managementActions.eventInfo; 1199 1205 1206 this.info.set('parentType', parent.entryType || 'Event'); 1200 1207 this.parentInfo = new WatchObject(); 1201 1208 this.parentInfo.set('room',parent.room); -
indico/htdocs/js/indico/Timetable/Management.js
r9b6db2 r7c0515 356 356 357 357 params.startDate = Util.formatDateTime(session.startDate, IndicoDateTimeFormats.Server); 358 params.roomInfo = { 359 location: session.location, 360 room: session.room, 361 address: session.address 362 }; 358 if(type != 'SessionSlot') { 359 // If it's not for a session slot, we take the location from the session 360 params.roomInfo = { 361 location: session.location, 362 room: session.room, 363 address: session.address 364 }; 365 } 363 366 364 367 params.sessionConveners = session.sessionConveners; … … 390 393 } 391 394 395 params.args.parentType = params.parentType; 392 396 var dialog = new AddContributionDialog( 393 397 this.methods[params.type].add, … … 510 514 this.isSessionTimetable?this.methods.Session.dayEndDate:this.methods.Event.dayEndDate, 511 515 params, 512 params.roomInfo,516 {'location': session.location, 'room': session.room, 'address': session.address}, 513 517 $O(params.roomInfo), 514 518 params.startDate, … … 541 545 }); 542 546 543 var parentRoomInfo = this.eventInfo .sessions[eventData.sessionId];547 var parentRoomInfo = this.eventInfo; 544 548 545 549 IndicoUI.Dialogs.addSessionSlot(
Note: See TracChangeset
for help on using the changeset viewer.
