Changeset 84c86e in indico


Ignore:
Timestamp:
05/12/10 18:44:29 (3 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
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, 4c7d4152dff271ba5df5a8606605969cab454080
Children:
77cb9e
Parents:
27f686
Message:

[FIX] Changed the way start/end date/time works

  • checkbox changed from "keep" to "move", since the default was most likely not the most used use case;
  • changed the algorithm so that an operation that only changes the end date sets moveEntries to 0;
Location:
indico
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    ra217dc r84c86e  
    28062806        """ 
    28072807 
    2808         # just store the old values for later 
    2809         oldStartDate = copy.copy(self.getStartDate()) 
    2810         oldEndDate = copy.copy(self.getEndDate()) 
    2811  
     2808        oldStartDate = self.getStartDate() 
     2809        oldEndDate = self.getEndDate() 
    28122810 
    28132811        # do some checks first 
     
    28202818            return 
    28212819 
    2822         elif moveEntries == 1: 
     2820        # if we reached this point, it means either the start or 
     2821        # the end date (or both) changed 
     2822        # If only the end date was changed, moveEntries = 0 
     2823        if sDate == oldStartDate: 
     2824            moveEntries = 0 
     2825 
     2826        # Pre-check for moveEntries 
     2827        if moveEntries == 1: 
    28232828            # in case the entries are to be simply shifted 
    28242829            # we should make sure the interval is big enough 
     2830            # just store the old values for later 
     2831 
     2832            oldInterval = oldEndDate - oldStartDate 
    28252833            newInterval = eDate - sDate 
    2826             oldInterval = oldEndDate - oldStartDate 
    28272834 
    28282835            if oldInterval > newInterval: 
     
    28302837                    _("The start/end dates were not changed since the selected " 
    28312838                      "timespan is not large enough to accomodate the contained " 
    2832                       "timetable entries."), 
     2839                      "timetable entries and spacings."), 
    28332840                    explanation = 
    2834                     _("You should try using a larger timespan or checking " 
    2835                       "the <em>Don't change session/contribution times...</em> " 
    2836                       "checkbox")) 
     2841                    _("You should try using a larger timespan.")) 
    28372842 
    28382843        # so, we really need to try changing something 
  • indico/MaKaC/services/implementation/conference.py

    r0b2441 r84c86e  
    342342        self._startDate = pm.extract('startDate', pType=datetime.datetime) 
    343343        self._endDate = pm.extract('endDate', pType=datetime.datetime) 
    344         self._keepTimes = pm.extract('keepTimes', pType=bool) 
     344        self._shiftTimes = pm.extract('shiftTimes', pType=bool) 
    345345 
    346346    def _getAnswer(self): 
     
    348348        ContextManager.set('dateChangeNotificationProblems', {}) 
    349349 
    350         if (self._keepTimes): 
     350        if (self._shiftTimes): 
     351            moveEntries = 1 
     352        else: 
    351353            moveEntries = 0 
    352         else: 
    353             moveEntries = 1 
    354354 
    355355        # first sanity check 
  • indico/htdocs/css/Default.css

    r0a4b4c r84c86e  
    60786078} 
    60796079 
    6080 .widgetCheckboxOption strong { 
    6081     font-weight: bold; 
    6082 } 
    60836080 
    60846081.widgetCheckboxOption span { 
    60856082    vertical-align: middle; 
    6086     font-style: italic; 
     6083    font-size: 12px; 
     6084    color: #555; 
    60876085    margin-left: 2px; 
    60886086} 
  • indico/htdocs/js/indico/Core/Widgets/DateTime.js

    r0b2441 r84c86e  
    135135         _handleEditMode: function(value) { 
    136136 
    137              this.keepTimes = Html.checkbox({}); 
     137             this.shiftTimes = Html.checkbox({}); 
    138138 
    139139             // create datefields 
     
    160160                             this.__buildStructure(this.startDate.draw(), this.endDate.draw()), 
    161161                             Html.div("widgetCheckboxOption", 
    162                                       this.keepTimes, 
    163                                       Html.unescaped.span({}, 
    164                                       $T("<strong>Don't change</strong> session/contribution times in the timetable")))); 
     162                                      this.shiftTimes, 
     163                                      Html.span({}, 
     164                                      $T("Move session/contribution times in the timetable accordingly")))); 
    165165         }, 
    166166 
     
    177177                     endDate: Util.parseDateTime(this.endDate.get(), 
    178178                                                 IndicoDateTimeFormats.Server), 
    179                      keepTimes: this.keepTimes 
     179                     shiftTimes: this.shiftTimes 
    180180                     }; 
    181181         }, 
Note: See TracChangeset for help on using the changeset viewer.