[gen] When param Ref.select is a Search instance, Search.name can be ommitted; added code that shows a warning: Appy is not compatible with MSIE below 9.

This commit is contained in:
Gaetan Delannay 2014-07-28 17:35:49 +02:00
parent a45dfa8dd0
commit dda894089a
14 changed files with 54 additions and 4 deletions

View file

@ -1410,4 +1410,16 @@ class ToolMixin(BaseMixin):
'''Returns the PX allowing to close the iframe popup and refresh the
base page.'''
return self.appy().pxBack({'ztool': self})
ieRex = re.compile('MSIE\s+(\d\.\d)')
ieMin = '9' # We do not support IE below this version.
def getBrowserIncompatibility(self):
'''Produces an error message if the browser in use is not compatible
with Appy.'''
res = self.ieRex.search(self.REQUEST.get('HTTP_USER_AGENT'))
if not res: return
version = res.group(1)
if version < self.ieMin:
mapping = {'version': version, 'min': self.ieMin}
return self.translate('wrong_browser', mapping=mapping)
# ------------------------------------------------------------------------------