~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/security/views.py

  • Committer: David Coles
  • Date: 2010-07-29 10:51:30 UTC
  • Revision ID: coles.david@gmail.com-20100729105130-el3ut0zwisvgvthu
Fix issue with CodeMirror being wider than the screen and scrolling.

Seems like width: 100% + padding/margin causes the actual width to be more 
than 100%. Though if the CodeMirror element just auto-calculate the width it's 
fine. Also fixed similar issue with the <textbox>.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        fields = req.get_fieldstorage()
44
44
        nexturl = fields.getfirst('url')
45
45
 
 
46
        # XXX Warning that Internet Explorer is unsupported
 
47
        # Test if the user is in Internet Explorer
 
48
        try:
 
49
            useragent = req.headers_in['User-Agent']
 
50
            # A bit of very basic UA string detection
 
51
            ctx['msie'] = ('MSIE' in useragent
 
52
                           and 'AppleWebKit' not in useragent
 
53
                           and 'Gecko' not in useragent
 
54
                           and 'Opera' not in useragent)
 
55
        except KeyError:
 
56
            ctx['msie'] = False
 
57
 
46
58
        if nexturl is None:
47
59
            nexturl = '/'
48
60
 
101
113
                else:
102
114
                    user = None
103
115
                    try:
 
116
                        # Username is case insensitive
104
117
                        user = authenticate.authenticate(req.config, req.store,
105
 
                                    username.value, password.value)
 
118
                                    username.value.lower(), password.value)
106
119
                    except AuthError, msg:
107
120
                        badlogin = msg
108
121
                    if user is None: