Changeset 3cd3b7 in indico


Ignore:
Timestamp:
01/25/10 16:12:56 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
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:
c10907
Parents:
dbc739
git-author:
Pedro Ferreira <jose.pedro.ferreira@…> (01/25/10 15:42:41)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (01/25/10 16:12:56)
Message:

[FIXED] Small issues - Cesar's fixes

  • Unnecessary variable storage;
  • Some trailing spaces
  • jslinting
Location:
indico
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/services/implementation/schedule.py

    rdbc739 r3cd3b7  
    442442        sessionServices.SessionSlotModifCoordinationBase._checkParams(self) 
    443443        ScheduleEditBreakBase._checkParams(self) 
     444        self._brk = self._schEntry 
     445 
     446    def _addToSchedule(self, b): 
     447        # if the schedule target day is different from the current 
    444448        if self._schEntry.getStartDate().date() != self._dateTime.date(): 
    445             self._dayChanged = True 
    446         else: 
    447             self._dayChanged = False 
    448         self._brk = self._schEntry 
    449  
    450     def _addToSchedule(self, b): 
    451         if self._dayChanged: 
    452449            owner = self._schEntry.getOwner() 
    453450 
     451            # remove the entry 
    454452            self._schEntry.getSchedule().removeEntry(self._schEntry) 
    455453 
     454            # set it to the new date 
    456455            self._schEntry.setStartDate(self._dateTime) 
     456            # add it on the new date 
    457457            self._conf.getSchedule().addEntry(self._schEntry, check=2) 
    458458 
  • indico/htdocs/js/indico/Legacy/Dialogs.js

    rdbc739 r3cd3b7  
    291291                                   endDate.setHours(startDate.getHours()+1); 
    292292                               } 
    293                                 
     293 
    294294                               dateArgs.startDate = startDate; 
    295295                               dateArgs.endDate = endDate; 
  • indico/htdocs/js/indico/Management/Timetable.js

    rdbc739 r3cd3b7  
    300300            //to make the request for the session timetable or the top level timetable 
    301301            if(exists(self.timetable.parentTimetable)){ 
    302                 if(self.previousDate.substr(0,10) != self.dateArgs.selectedDay) 
    303                     self.timeStartMethod = self.timetable.managementActions.methods['Event'].getDayEndDate; 
    304                 else 
    305                     self.timeStartMethod = self.timetable.managementActions.methods['SessionSlot'].getDayEndDate; 
     302                if(self.previousDate.substr(0,10) != self.dateArgs.selectedDay) { 
     303                    self.timeStartMethod = self.timetable.managementActions.methods.Event.getDayEndDate; 
     304                } else { 
     305                    self.timeStartMethod = self.timetable.managementActions.methods.SessionSlot.getDayEndDate; 
     306                } 
    306307            } 
    307308 
     
    366367                [$T('Place'), Html.div({style: {marginBottom: '15px'}}, this.roomEditor.draw())], 
    367368                [$T('Date'), conferenceDays], 
    368                 [$T('Start time'), Html.div({class: 'popUpLabel', style:{textAlign: 'left'}}, this.startTimeField, 
     369                [$T('Start time'), Html.div({className: 'popUpLabel', style:{textAlign: 'left'}}, this.startTimeField, 
    369370                            $T(' Duration '), this.timeField, $T('min'))], 
    370371                [$T('Presenter(s)'), presListWidget.draw()] 
     
    500501            //if we are inside a session and the new contribution is set for a different day, we suppose that the contribution is not part of the session 
    501502            if(self.dayChanged){ 
    502                 self.method = self.timetable.managementActions.methods['Contribution'].add; 
     503                self.method = self.timetable.managementActions.methods.Contribution.add; 
    503504            } 
    504505            submitInfo(); 
     
    711712                     //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 
    712713                     if(self.dayChanged){ 
    713                          self.method = self.managementActions.methods['Break'].add; 
     714                         self.method = self.managementActions.methods.Break.add; 
    714715                     } 
    715716                     else{ 
    716                          if(exists(self.managementActions.timetable.parentTimetable)) 
    717                              self.method = self.managementActions.methods['SessionBreak'].add; 
     717                         if(exists(self.managementActions.timetable.parentTimetable)) { 
     718                             self.method = self.managementActions.methods.SessionBreak.add; 
     719                         } 
    718720                     } 
    719721                     self._submitInfo(); 
     
    744746                    /* if we chose a different day, it doesn't matter 
    745747                        if we are inside a session */ 
    746                          self.timeStartMethod = self.managementActions.methods['Event'].dayEndDate; 
     748                         self.timeStartMethod = self.managementActions.methods.Event.dayEndDate; 
    747749                 } else { 
    748                          if(exists(self.managementActions.timetable.parentTimetable)) 
     750                     if(exists(self.managementActions.timetable.parentTimetable)) { 
    749751                             self.timeStartMethod = self.managementActions.methods[self.originalArgs.parentType].dayEndDate; 
     752                     } 
    750753                 } 
    751                   
     754 
    752755                 //we make a timeStartMethod request specifying the date for the request 
    753756                 //and we get the result of the request as a result 
     
    815818                 [$T('Place'), this.roomEditor.draw()], 
    816819                 [$T('Date'), conferenceDays], 
    817                  [$T('Start time'), Html.div({class: 'popUpLabel', style:{textAlign: 'left'}}, this.startTimeField, 
     820                 [$T('Start time'), Html.div({className: 'popUpLabel', style:{textAlign: 'left'}}, this.startTimeField, 
    818821                             $T(' Duration '), this.timeField, $T('min'))] 
    819822                  ]), 
     
    840843                      else { 
    841844                          //if we are moving the result to the top timetable we don't need the session slot 
    842                           if(self.dayChanged && exists(result.slotEntry)) 
     845                          if(self.dayChanged && exists(result.slotEntry)) { 
    843846                              result.slotEntry = null; 
    844                            self.managementActions.timetable._updateMovedEntry(result, args.get('scheduleEntryId')); 
    845                            self.close(); 
     847                          } 
     848                          self.managementActions.timetable._updateMovedEntry(result, args.get('scheduleEntryId')); 
     849                          self.close(); 
    846850                      } 
    847851             }); 
     
    899903                                   $T("Add Break"), 
    900904                                   function(result) { 
    901                                          if(exists(managementActions.timetable.parentTimetable) && this.dayChanged) 
    902                                              managementActions.timetable.parentTimetable._updateEntry(result, result.id); 
    903                                          else 
    904                                              managementActions.timetable._updateEntry(result, result.id); 
     905                                       if(exists(managementActions.timetable.parentTimetable) && this.dayChanged) { 
     906                                           managementActions.timetable.parentTimetable._updateEntry(result, result.id); 
     907                                       } else { 
     908                                           managementActions.timetable._updateEntry(result, result.id); 
     909                                       } 
    905910                                   }); 
    906911 
  • indico/htdocs/js/indico/Timetable/Base.js

    rdbc739 r3cd3b7  
    268268    }, 
    269269 
    270     getDays: function() {         
     270    getDays: function() { 
    271271        return this.sortedKeys; 
    272272    }, 
Note: See TracChangeset for help on using the changeset viewer.