Changeset af93a0 in indico
- Timestamp:
- 06/04/10 17:18:47 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
- Children:
- 3578b2
- Parents:
- 92af92
- git-author:
- Jose Benito <jose.benito.gonzalez@…> (06/04/10 17:16:21)
- git-committer:
- Jose Benito <jose.benito.gonzalez@…> (06/04/10 17:18:47)
- Location:
- indico
- Files:
-
- 7 edited
-
MaKaC/webinterface/pages/conferences.py (modified) (1 diff)
-
MaKaC/webinterface/tpls/ConferenceTimeTable.tpl (modified) (1 diff)
-
htdocs/css/Default.css (modified) (1 diff)
-
htdocs/js/indico/Timetable/Base.js (modified) (5 diffs)
-
htdocs/js/indico/Timetable/Draw.js (modified) (5 diffs)
-
htdocs/js/indico/Timetable/Layout.js (modified) (4 diffs)
-
htdocs/js/presentation/Loader.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/webinterface/pages/conferences.py
r0f44e4 raf93a0 1160 1160 useAttrCache = True)) 1161 1161 vars['eventInfo'] = simplejson.dumps(DictPickler.pickle(self._conf, timezone=tz)) 1162 vars['timetableLayout'] = vars.get('ttLyt','') 1162 1163 return vars 1163 1164 -
indico/MaKaC/webinterface/tpls/ConferenceTimeTable.tpl
re6c651 raf93a0 15 15 16 16 var historyBroker = new BrowserHistoryBroker(); 17 18 var timetable = new TopLevelDisplayTimeTable(ttdata,eventInfo,710,$E('timetable'), 'session', historyBroker); 17 var timetableLayout = <%= "'%s'"%timetableLayout %>; 18 if (timetableLayout === '') { 19 timetableLayout = null; 20 } 21 var timetable = new TopLevelDisplayTimeTable(ttdata,eventInfo,710,$E('timetable'), 'session', historyBroker, timetableLayout); 19 22 $E('timetable').set(timetable.draw()); 20 23 timetable.postDraw(); -
indico/htdocs/css/Default.css
re68565 raf93a0 6089 6089 vertical-align: middle; 6090 6090 } 6091 6092 .headerRoomLayoutTimeTable { 6093 text-align: center; 6094 float: left; 6095 margin-top: 10px; 6096 color: black; 6097 font-weight: bold; 6098 border-left: 1px solid #E8E8E8; 6099 } -
indico/htdocs/js/indico/Timetable/Base.js
ra217dc raf93a0 27 27 'poster': {name: 'Poster', 28 28 manager: new PosterLayoutManager() 29 } 29 }, 30 31 'room': {name: 'Room', 32 manager: new RoomLayoutManager() 33 } 30 34 }, 31 35 filters: {'session': {name: $T('Session'), … … 246 250 self.timetableDrawer.redraw(self.currentDay); 247 251 var timetableElements = translate(self.timetableDrawer.canvas.dom.childNodes, function(value) {return $E(value);}); 248 var timetableDiv = Html.div({style: { paddingTop: pixels(20), position: 'relative'}}, timetableElements);252 var timetableDiv = Html.div({style: {width:pixels(self.timetableDrawer.width), paddingTop: pixels(20), position: 'relative'}}, timetableElements); 249 253 $E(document.body).set(header, timetableDiv); 250 254 $E(document.body).setStyle('padding', pixels(30)); … … 416 420 417 421 }, 418 function(data, width, wrappingElement, detailLevel, managementActions, historyBroker ) {422 function(data, width, wrappingElement, detailLevel, managementActions, historyBroker, timetableLayoutId) { 419 423 420 424 var self = this; … … 432 436 this.loadingIndicator, 433 437 !!managementActions, 434 managementActions); 438 managementActions, 439 timetableLayoutId); 435 440 436 441 this.sortedKeys = keys(this.data); … … 784 789 785 790 }, 786 function(data, contextInfo, width, wrappingElement, detailLevel, historyBroker ) {791 function(data, contextInfo, width, wrappingElement, detailLevel, historyBroker, timetableLayoutId) { 787 792 788 793 this.DisplayTimeTable(data, width, wrappingElement, detailLevel); 789 this.TopLevelTimeTableMixin(data, width, wrappingElement, detailLevel, null, historyBroker );794 this.TopLevelTimeTableMixin(data, width, wrappingElement, detailLevel, null, historyBroker, timetableLayoutId); 790 795 791 796 this.eventInfo = contextInfo; -
indico/htdocs/js/indico/Timetable/Draw.js
rc2bed6 raf93a0 153 153 this.locationDiv = Html.div('timetableBlockLocation'); 154 154 var addComma = false; 155 if (this.eventData.room ) {155 if (this.eventData.room && this.timetable.getTimetableDrawer().layoutChooser.get().shouldShowRoom()) { 156 156 this.locationDiv.append(this.eventData.room); 157 157 addComma = true; … … 312 312 this.locationDiv.dom.style.maxWidth = pixels(locationMaxWidth); 313 313 314 // After modifying the location width, the content of the location might be expaneded 315 // on two lines. Therefore, we should re-check if there is enought space for the time. 316 if (contentWidth() >= parentDivWidth || contentHeight() >= parentDivHeight) { 317 this.timeDiv.dom.style.display = 'none'; 318 this.locationDiv.dom.style.maxWidth = pixels(parentDivWidth - 20); 319 } 320 314 321 // Presenters information should not take more than half of the space of the block 315 322 if (this.presentersDiv && this.presentersDiv.dom.offsetWidth > parentDivWidth / 2) { … … 363 370 var step = 2; 364 371 //Truncating the title since it can be displayed in a single line 365 while (contentHeight() > parentDivHeight && topContentWidth() > parentDivWidth * 0.8) { 372 // title !== "..." avoids the endless loop 373 while (title !== "..." && contentHeight() > parentDivHeight && topContentWidth() > parentDivWidth * 0.8) { 366 374 title = this.truncateTitle(-step, title); 367 375 this.titleDiv.set(title); … … 1227 1235 } 1228 1236 1229 return scaleDiv;1237 return Html.div({}, this.layoutChooser.get().getHeader(this.width), scaleDiv); 1230 1238 }, 1231 1239 … … 1277 1285 each(blocks, function(blockData) { 1278 1286 1279 var nCol = groups[blockData.group][1];1287 var nCol = self.layoutChooser.get().getNumColumnsForGroup(groups[blockData.group]); 1280 1288 1281 1289 var colWidth = Math.floor((self.width-TimetableDefaults.leftMargin) / nCol); -
indico/htdocs/js/indico/Timetable/Layout.js
rba8adf raf93a0 46 46 addCheckpoint(key, sTime, 'start', value.sessionId); 47 47 48 if (eTime > sTime) {49 addCheckpoint(key, eTime, 'end');50 } else if (eTime == '000000') {51 addCheckpoint(key, '240000', 'end');52 }53 else {54 addCheckpoint(key, 'nextday', 'end');55 }48 if (eTime > sTime) { 49 addCheckpoint(key, eTime, 'end'); 50 } else if (eTime == '000000') { 51 addCheckpoint(key, '240000', 'end'); 52 } 53 else { 54 addCheckpoint(key, 'nextday', 'end'); 55 } 56 56 } 57 57 }); … … 205 205 addWholeDayBlock: function(blocks, key) { 206 206 block = blocks[key] = {id: key}; 207 }, 208 209 getNumColumnsForGroup: function(group) { 210 return group[1]; 211 }, 212 213 getHeader: function() { 214 return null; 215 }, 216 217 shouldShowRoom: function() { 218 return true; 207 219 } 208 220 } … … 215 227 216 228 var self = this; 229 230 this.eventData = data; 217 231 218 232 this.detailLevel = any(detailLevel, 'session'); … … 490 504 }); 491 505 506 type("RoomLayoutManager", ["CompactLayoutManager"], 507 { 508 509 drawDay: function(data, detailLevel, startTime, endTime) { 510 this.roomsCols = {}; 511 return this.CompactLayoutManager.prototype.drawDay.call(this, data, detailLevel, startTime, endTime); 512 }, 513 514 assign: function(assigned, block) { 515 var roomName = this.eventData[block.id].room; 516 var col = 0; 517 if (! exists(this.roomsCols[roomName])) { 518 // If there is no room name, the block will be in the column 0 (and take all the available width) 519 if (trim(roomName) !== "") { 520 col = this.roomsCols[roomName] = keys(this.roomsCols).length; 521 } 522 } else { 523 col = this.roomsCols[roomName]; 524 } 525 526 block.assigned = col; 527 assigned[col] = block; 528 }, 529 530 reorderAssigned: function(assigned, lastAssigned, currentGroup) { 531 var self = this; 532 var roomNames = keys(this.roomsCols); 533 roomNames.sort(); 534 535 this.roomsCols = {}; 536 var counter = 0; 537 each (roomNames, function(name) { 538 self.roomsCols[name] = counter; 539 counter++; 540 }); 541 542 for (key in currentGroup) { 543 var block = currentGroup[key]; 544 var roomName = this.eventData[block.id].room; 545 // If there is no room name, the block will be in the column 0 (and take all the available width) 546 var col = 0; 547 if (trim(roomName) !== "") { 548 col = this.roomsCols[roomName]; 549 } 550 block.assigned = col; 551 assigned[col] = block; 552 } 553 554 }, 555 556 getNumColumnsForGroup: function(group) { 557 if (group[0].length == 1 && this.eventData[group[0][0].id].room === "") { 558 return 1; 559 } else { 560 return keys(this.roomsCols).length; 561 } 562 }, 563 564 getHeader: function(width) { 565 var roomNames = keys(this.roomsCols); 566 var cols = roomNames.length; 567 var borderPixels = 1; // this is because of the separators between the room names 568 return Html.div({style:{marginLeft:pixels(TimetableDefaults.leftMargin), paddingBottom:pixels(10), paddingTop:pixels(10)}}, 569 translate(roomNames, function(key){ 570 return Html.div({className: "headerRoomLayoutTimeTable", 571 style:{width:pixels(Math.floor((width-TimetableDefaults.leftMargin)/cols)-borderPixels)} 572 }, key); 573 }) 574 ); 575 }, 576 577 shouldShowRoom: function() { 578 return false; 579 } 580 }, 581 582 function() { 583 this.roomsCols = {}; 584 }); 585 492 586 493 587 type("PosterLayoutManager", ["TimetableLayoutManager"], -
indico/htdocs/js/presentation/Loader.js
rdf9ebc raf93a0 36 36 "Data/Files.js", 37 37 "Data/Cookies.js", 38 "Data/Service.js",39 38 "Ui/MimeTypes.js", 40 39 "Ui/Dom.js",
Note: See TracChangeset
for help on using the changeset viewer.
