Changeset 07a40b in indico
- Timestamp:
- 09/01/09 12:41:47 (4 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, prov-dual-interface, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- c53245
- Parents:
- 64c827
- Location:
- indico/MaKaC/webinterface
- Files:
-
- 3 edited
-
pages/sessions.py (modified) (3 diffs)
-
rh/conferenceModif.py (modified) (1 diff)
-
tpls/ConfModifScheduleGraphic.tpl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/pages/sessions.py
r9033fd r07a40b 643 643 self._tabMain = self._tabCtrl.newTab( "main", _("Main"), \ 644 644 urlHandlers.UHSessionModification.getURL( self._session ) ) 645 self._tabContribs=self._tabCtrl.newTab( "contribs", _("Contributions"), \ 646 urlHandlers.UHSessionModContribList.getURL(self._session) ) 647 self._tabTimetable=self._tabCtrl.newTab( "sessionTimetable", _("Session timetable"), \ 648 urlHandlers.UHSessionModifSchedule.getURL(self._session) ) 649 self._tabComm = self._tabCtrl.newTab( "comment", _("Comment"), \ 650 urlHandlers.UHSessionModifComm.getURL( self._session ) ) 645 651 self._tabMaterials = self._tabCtrl.newTab( "materials", _("Files"), \ 646 652 urlHandlers.UHSessionModifMaterials.getURL( self._session ) ) 647 self._tabContribs=self._tabCtrl.newTab( "contribs", _("Contributions"), \648 urlHandlers.UHSessionModContribList.getURL(self._session) )649 653 self._tabAC = self._tabCtrl.newTab( "ac", _("Protection"), \ 650 654 urlHandlers.UHSessionModifAC.getURL( self._session ) ) … … 655 659 urlHandlers.UHSessionModifTools.getURL( self._session ) ) 656 660 self._tabTools.setEnabled(canModify) 657 self._tabComm = self._tabCtrl.newTab( "comment", _("Comment"), \658 urlHandlers.UHSessionModifComm.getURL( self._session ) )659 661 self._setActiveTab() 660 662 self._setupTabCtrl() … … 1447 1449 self._session = session 1448 1450 1449 def _setActiveTab( self):1450 self._tab Schedule.setActive()1451 def _setActiveTab(self): 1452 self._tabTimetable.setActive() 1451 1453 1452 1454 def _generateSessionTimetable(self): 1453 1455 1454 1456 tz = self._conf.getTimezone() 1455 timeTable = timetable.TimeTable(self._ conf.getSchedule(), tz)1457 timeTable = timetable.TimeTable(self._session.getSchedule(), tz) 1456 1458 sDate,eDate=self._session.getAdjustedStartDate(tz),self._session.getAdjustedEndDate(tz) 1457 1459 timeTable.setStartDate(sDate) -
indico/MaKaC/webinterface/rh/conferenceModif.py
r039e77 r07a40b 605 605 else: 606 606 607 session = self._target.getSessionById(params['sessions'][0]) 607 session = self._target.getSessionById(params['sessions'][0]) 608 608 609 609 p = sessions.WPSessionModifSchedule( self, session ) -
indico/MaKaC/webinterface/tpls/ConfModifScheduleGraphic.tpl
re369e7 r07a40b 1 <%! 2 declareTemplate(newTemplateStyle=True) 3 location = self._conf.getLocation() 4 room = self._conf.getRoom() 5 6 if location: 7 locationName = location.getName() 8 address = self._conf.getLocation().getAddress().replace('\r\n','\\n').replace('\n','\\n') 9 else: 10 locationName = 'None' 11 address = '' 12 13 if room: 14 roomName = room.name 15 else: 16 roomName = 'None' 17 18 %> 1 <% declareTemplate(newTemplateStyle=True)%> 19 2 20 3 21 4 <div class="groupTitleNoBorder"><%= _("Timetable")%> <em>(<%=_("from")+" "%> <%= start_date %> <%=" "+_("to")+" "%> <%= end_date %> <a href=<%= editURL %>>[<%=_("edit")%>]</a> <%=_("Timezone")%>: <%= timezone %>)</em></div> 22 <div class="shit" style="display: none;">23 <%= content %>24 </div>25 26 27 <div style="overflow: auto; display: none; padding: 10px; auto; margin-right: auto; margin-left: auto; margin-bottom: 10px; margin-top: 15px;">28 29 <% if self.addControlsEnabled(): %>30 <a href="#" style="margin-left: 15px; margin-right: 8px;" id="addLink" class="dropDownMenu highlight">add</a> <span style="color: #AAAAAA;">|</span>31 <a href="<%= urlHandlers.UHConfModifReschedule.getURL(self._conf, targetDay=dayDate.strftime("%Y-%m-%d")) %>" style="margin-left: 8px;">reschedule</a>32 33 <% end %>34 <% else: %>35 36 <a href="<%= urlHandlers.UHConfModifSchedule.getURL(self._conf, day = days) %>" style="margin-left: 20px;"><%= _("go to timetable")%></a>37 <% end %>38 39 </div>40 41 42 43 5 <div id="timetableDiv" style="position: relative;"> 44 6 … … 62 24 }); 63 25 </script> 64 65 66 67 68 69 <script type="text/javascript">70 71 var parentEventRoomData = $O(<%= jsonEncode(roomInfo(self._rh._target)) %>);72 73 74 75 var addSession = curry(IndicoUI.Dialogs.addSession,76 'schedule.event.addSession',77 'schedule.event.getDayEndDate',78 <%= jsonEncode({'conference': self._conf.id }) %>,79 <%= jsonEncode({'location': locationName,80 'room': roomName,81 'address': address }) %>,82 parentEventRoomData,83 '<%= dayDate.strftime("%d/%m/%Y") %>',84 <%= jsBoolean(rbActive) %>,85 timetable86 );87 88 var addContribution = function() {89 var dialog = new AddContributionDialog(<%= map(lambda x: x.getDate().strftime("%d/%m/%Y"), dayList) %>,90 <%= map(lambda x: x.getDate().strftime("%d/%m/%Y"), self._dayList) %>,91 'schedule.event.addContribution',92 'schedule.event.getDayEndDate',93 <%= jsonEncode({'conference': self._conf.id }) %>,94 <%= jsonEncode({'location': locationName,95 'room': roomName,96 'address': address }) %>,97 parentEventRoomData,98 '<%= self._conf.getStartDate().strftime("%d/%m/%Y %H:%M") %>',99 '<%= dayDate.strftime("%d/%m/%Y") %>',100 <%= jsBoolean(rbActive) %>,101 <%= jsBoolean(self._conf.getType() != 'meeting') %>,102 timetable);103 104 dialog.execute();105 };106 107 var addBreak = curry(IndicoUI.Dialogs.addBreak,108 'schedule.event.addBreak',109 'schedule.event.getDayEndDate',110 <%= jsonEncode({'conference': self._conf.id }) %>,111 <%= jsonEncode({'location': locationName,112 'room': roomName,113 'address': address }) %>,114 parentEventRoomData,115 '<%= self._conf.getStartDate().strftime("%d/%m/%Y %H:%M") %>',116 '<%= dayDate.strftime("%d/%m/%Y") %>',117 <%= jsBoolean(rbActive) %>,118 timetable);119 120 <% if self.addControlsEnabled(): %>121 var addLink = $E('addLink');122 var manageMenu = null;123 addLink.observeClick(function(e) {124 // Close the menu if clicking the link when menu is open125 if (manageMenu != null && manageMenu.isOpen()) {126 manageMenu.close();127 manageMenu = null;128 return;129 }130 var menuItems = {};131 <% if self._conf.getEnableSessions(): %>132 menuItems['<%= _("Session") %>'] = addSession;133 <% end %>134 menuItems['<%= _("Contribution") %>'] = addContribution;135 menuItems['<%= _("Break") %>'] = addBreak;136 137 manageMenu = new PopupMenu(menuItems, [addLink], 'categoryDisplayPopupList');138 var pos = addLink.getAbsolutePosition();139 manageMenu.open(pos.x - 5, pos.y + addLink.dom.offsetHeight + 2);140 return false;141 });142 <% end %>143 144 var breakMenu = function(link, editURL, deleteURL, relocateURL) {145 146 var manageBreakMenu = null;147 // Close the menu if clicking the link when menu is open148 if (manageBreakMenu && manageBreakMenu.isOpen()) {149 manageBreakMenu.close();150 manageBreakMenu = null;151 return;152 }153 var menuItems = {};154 menuItems['<%= _("Edit") %>'] = editURL;155 menuItems['<%= _("Delete") %>'] = function() {156 if (confirm("<%= _("Are you sure you want to delete this break?") %>")) {157 window.location = deleteURL;158 }159 return false;160 };161 menuItems['<%= _("Relocate") %>'] = relocateURL;162 163 manageBreakMenu = new PopupMenu(menuItems, [link], 'categoryDisplayPopupList', true, true);164 var pos = link.getAbsolutePosition();165 166 manageBreakMenu.open(pos.x + 15, pos.y + link.dom.offsetHeight + 2);167 return false;168 }169 170 var contributionMenu = function(link, editURL, contributionId, conferenceId, deleteURL, relocateURL) {171 172 var manageContribMenu = null;173 // Close the menu if clicking the link when menu is open174 if (manageContribMenu && manageContribMenu.isOpen()) {175 manageContribMenu.close();176 manageContribMenu = null;177 return;178 }179 var menuItems = {};180 menuItems['<%= _("Edit") %>'] = editURL;181 menuItems['<%= _("Add Subcontribution") %>'] = function() {182 IndicoUI.Dialogs.addSubContribution(contributionId, conferenceId);183 return false;184 }185 menuItems['<%= _("Delete") %>'] = function() {186 if (confirm('<%= _("Are you sure you want to delete this contribution")%> ?')) {187 window.location = deleteURL;188 }189 };190 menuItems['<%= _("Relocate") %>'] = relocateURL;191 192 manageContribMenu = new PopupMenu(menuItems, [link], 'categoryDisplayPopupList', true, true);193 var pos = link.getAbsolutePosition();194 195 manageContribMenu.open(pos.x + 15, pos.y + link.dom.offsetHeight + 2);196 return false;197 }198 199 var sessionMenu = function(link, editURL, confId, sessionId, timetableURL) {200 201 var manageSessionMenu = null;202 // Close the menu if clicking the link when menu is open203 if (manageSessionMenu && manageSessionMenu.isOpen()) {204 manageSessionMenu.close();205 manageSessionMenu = null;206 return;207 }208 var menuItems = {};209 menuItems['<%= _("Edit") %>'] = editURL;210 menuItems['<%= _("Delete") %>'] = function() {211 if (confirm('<%= _("Are you sure you want to delete this session?")%> ?')) {212 IndicoUI.Services.deleteSession(confId, sessionId);213 }214 };215 menuItems['<%= _("View timetable") %>'] = timetableURL;216 217 manageSessionMenu = new PopupMenu(menuItems, [link], 'categoryDisplayPopupList', true, true);218 var pos = link.getAbsolutePosition();219 220 manageSessionMenu.open(pos.x + 15, pos.y + link.dom.offsetHeight + 2);221 return false;222 }223 224 function validClick(element, event)225 /* Checks if the button area was clicked */226 {227 return !($E(element).getElementsByClassName('nonLinked')[0].ancestorOf($E(eventTarget(event))));228 }229 230 // Add highlight effect231 232 each($E(document).getElementsByClassName('ttSessionManagementBlock'),233 function(elem) {234 highlightWithMouse(elem, elem);235 });236 237 </script>238 239 240 241 242
Note: See TracChangeset
for help on using the changeset viewer.
