Changeset eb09202 in indico


Ignore:
Timestamp:
01/28/10 17:46:06 (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, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
f6f550
Parents:
019367
git-author:
Cesar Munoz Orena <cesar.munoz.orena@…> (01/26/10 10:40:09)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (01/28/10 17:46:06)
Message:

[FIXED] Default room inheriting always

  • When adding or editing a session, a contribution or a break, even if the "inherit from parent" checkbox was not checked it kept inheriting the field.

-fixes #141

Location:
indico
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    r03e2c9 reb09202  
    56645664        return color 
    56655665 
    5666     def setValues( self, sessionData,check=2,moveEntries=0 ): 
     5666    def setValues( self, sessionData,check=2,moveEntries=0, isEdit = False ): 
    56675667        """Sets all the values of the current session object from a dictionary 
    56685668            containing the following key-value pairs: 
     
    57155715        #   to None so it will be considered to be the same as for the 
    57165716        #   conference 
    5717         if sessionData.get( "locationName", "" ).strip() == "": 
     5717        #if we are creating the session we need to set the location as none, but if it's an edit 
     5718        #it is neccesary to leave the location as "", because otherwise it will inherit it from the 
     5719        #parent even if the checkbox is not checked 
     5720        if sessionData.get( "locationName", "" ).strip() == "" and not isEdit: 
    57185721            self.setLocation( None ) 
    57195722        else: 
     
    57275730            loc.setAddress( sessionData.get("locationAddress", "") ) 
    57285731        #same as for the location 
    5729         if sessionData.get( "roomName", "" ).strip() == "": 
     5732        if sessionData.get( "roomName", "" ).strip() == "" and not isEdit: 
    57305733                self.setRoom( None ) 
    57315734        else: 
     
    80398042        #   conference 
    80408043        if data.has_key("locationName"): 
    8041             if data["locationName"].strip()=="": 
    8042                 self.setLocation(None) 
    8043             else: 
     8044           # if data["locationName"].strip()=="": 
     8045            #    self.setLocation(None) 
     8046            #else: 
    80448047                #if the location name is defined we must set a new location (or 
    80458048                #   modify the existing one) for the contribution 
     
    80528055        #same as for the location 
    80538056        if data.has_key("roomName"): 
    8054             if data["roomName"].strip()=="": 
    8055                 self.setRoom(None) 
    8056             else: 
     8057           # if data["roomName"].strip()=="": 
     8058            #    self.setRoom(None) 
     8059            #else: 
    80578060                room=self.getOwnRoom() 
    80588061                if not room: 
  • indico/MaKaC/schedule.py

    r03e2c9 reb09202  
    137137            1: check and raise error in case of problem 
    138138            2: check and adapt the owner dates""" 
    139  
    140139        if entry.isScheduled(): 
    141140            # remove it from the old schedule and add it to this one 
     
    728727 
    729728        owner = self.getOwner() 
    730  
    731729        if (entry is None) or self.hasEntry(entry): 
    732730            return 
     
    11711169 
    11721170    def setValues( self, data, check=2, moveEntriesBelow=0, tz='UTC'): 
    1173  
    11741171        from MaKaC.conference import CustomLocation, CustomRoom 
    11751172        # In order to move the entries below, it is needed to know the diff (we have to move them) 
  • indico/MaKaC/services/implementation/schedule.py

    rc10907 reb09202  
    5656 
    5757        if location != None: 
    58             if location.strip()=="": 
    59                 target.setLocation(None) 
    60             else: 
     58            #if location.strip()=="": 
     59            #    target.setLocation(None) 
     60            #else: 
    6161                loc = target.getOwnLocation() 
    6262                if not loc: 
     
    6767        #same as for the location 
    6868        if room != None: 
    69             if room.strip()=="": 
    70                 target.setRoom(None) 
    71             else: 
     69            #if room.strip()=="": 
     70            #    target.setRoom(None) 
     71            #else: 
    7272                r = target.getOwnRoom() 
    7373                if not r: 
     
    380380 
    381381        self._setLocationInfo(self._brk) 
    382  
    383382        self._addToSchedule(self._brk) 
    384383 
  • indico/MaKaC/webinterface/pages/contributions.py

    rcbf814 reb09202  
    12771277            locationName = self._contrib.getLocation().getName() 
    12781278            locationAddress = self._contrib.getLocation().getAddress() 
     1279 
    12791280        if self._contrib.getOwnRoom(): 
    12801281            defaultDefineRoom= "checked" 
     
    13381339        minfo = info.HelperMaKaCInfo.getMaKaCInfoInstance() 
    13391340        vars["useRoomBookingModule"] = minfo.getRoomBookingModuleActive() 
    1340  
    13411341        return vars 
    13421342 
  • indico/MaKaC/webinterface/rh/contribMod.py

    r9033fd reb09202  
    752752                params["durMins"] = params["duration"]; 
    753753            else: 
    754                 params["durMins"] = "" 
    755              
     754                params["durMins"] = ""         
    756755            self._target.setValues(params) 
    757756            self._target.setType(self._type) 
  • indico/MaKaC/webinterface/rh/sessionModif.py

    r9033fd reb09202  
    254254                                    int( params["eMinute"] ))) 
    255255        params["eDate"] = ed.astimezone(timezone('UTC')) 
    256         self._target.setValues(params,self._check,self._slmove) 
     256        self._target.setValues(params,self._check,self._slmove, True) 
    257257        self._target.setScheduleType(params.get("tt_type",self._target.getScheduleType())) 
    258258     
  • indico/htdocs/js/indico/Management/RoomBooking.js

    r66eb31 reb09202  
    159159                     self.roomChooser.enable(); 
    160160                     self.addressArea.enable(); 
     161 
    161162                     self._startBind(); 
     163                     self.info.set('location', ''); 
     164                     self.info.set('room', ''); 
     165                     self.info.set('address', ''); 
    162166                 } 
    163167             }); 
  • indico/htdocs/js/indico/Management/Timetable.js

    rc10907 reb09202  
    634634             var self = this; 
    635635 
    636  
    637636             each(self.args, function(value, key) { 
    638637                 self.info.set(key, value); 
     
    799798                            this.timeField, 
    800799                            this.isEdit); 
     800              
     801             invertableBind(this.info.accessor('inheritLoc'), 
     802                            this.roomEditor.inheritCheckbox.get(), 
     803                            false); 
     804              
     805             invertableBind(this.info.accessor('inheritRoom'), 
     806                            this.roomEditor.inheritCheckbox.get(), 
     807                            false);              
    801808 
    802809             self.parameterManager.add(self.startTimeField, 'time', false); 
  • indico/htdocs/js/indico/Timetable/Management.js

    rc10907 reb09202  
    396396 
    397397        args.set('startDate', Util.formatDateTime(eventData.startDate, IndicoDateTimeFormats.Server)); 
    398         args.set('roomInfo',$O({"location": eventData.inheritLoc?null:eventData.location, 
     398        args.set('roomInfo',$O({"location": eventData.inheritLoc?'':eventData.location, 
    399399                                "room": eventData.inheritRoom?null:eventData.room, 
    400400                                "address": eventData.inheritLoc?'':eventData.address})); 
Note: See TracChangeset for help on using the changeset viewer.