Changeset 397:5b078a6d8909 in documentViewer


Ignore:
Timestamp:
Nov 8, 2010, 4:08:18 PM (14 years ago)
Author:
casties
Branch:
default
Message:

new toggle option method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r396 r397  
    412412    def getOptionToggle(self, newState=None, optionName='text_options_open', initialState=True):
    413413        """returns new option state"""
    414         opt = self.REQUEST.SESSION.get(optionName,None)
    415         if opt is None:
     414        if not self.REQUEST.SESSION.has_key(optionName):
    416415            # not in session -- initial
    417416            opt = {'lastState': newState, 'state': initialState}
    418417        else:
     418            opt = self.REQUEST.SESSION.get(optionName)
    419419            if opt['lastState'] != newState:
    420420                # state in session has changed -- toggle
Note: See TracChangeset for help on using the changeset viewer.