[web request] drop no more necessary request.document_surrounding_div method
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 06 May 2013 15:58:52 +0200
changeset 8974 c8520188eb4b
parent 8973 6711f78c18be
child 8975 045e449617ad
[web request] drop no more necessary request.document_surrounding_div method This is awful and no more necessary since we dropped xhtml support
web/request.py
web/views/ajaxcontroller.py
web/views/basecontrollers.py
web/views/basetemplates.py
--- a/web/request.py	Mon May 06 17:13:43 2013 +0200
+++ b/web/request.py	Mon May 06 15:58:52 2013 +0200
@@ -975,9 +975,6 @@
     def html_content_type(self):
         return 'text/html'
 
-    def document_surrounding_div(self):
-        return u'<div>'
-
     @deprecated('[3.9] use req.uiprops[rid]')
     def external_resource(self, rid, default=_MARKER):
         """return a path to an external resource, using its identifier
--- a/web/views/ajaxcontroller.py	Mon May 06 17:13:43 2013 +0200
+++ b/web/views/ajaxcontroller.py	Mon May 06 15:58:52 2013 +0200
@@ -268,7 +268,7 @@
                 return content
             elif self.output_type == 'xhtml':
                 self._cw.set_content_type(self._cw.html_content_type())
-                return ''.join((self._cw.document_surrounding_div(),
+                return ''.join((u'<div>',
                                 content.strip(), u'</div>'))
             elif self.output_type == 'json':
                 self._cw.set_content_type('application/json')
--- a/web/views/basecontrollers.py	Mon May 06 17:13:43 2013 +0200
+++ b/web/views/basecontrollers.py	Mon May 06 15:58:52 2013 +0200
@@ -54,7 +54,7 @@
     def wrapper(self, *args, **kwargs):
         self._cw.set_content_type(self._cw.html_content_type())
         result = func(self, *args, **kwargs)
-        return ''.join((self._cw.document_surrounding_div(), result.strip(),
+        return ''.join((u'<div>', result.strip(),
                         u'</div>'))
     wrapper.__name__ = func.__name__
     return wrapper
--- a/web/views/basetemplates.py	Mon May 06 17:13:43 2013 +0200
+++ b/web/views/basetemplates.py	Mon May 06 15:58:52 2013 +0200
@@ -108,7 +108,7 @@
         if (('__notemplate' in self._cw.form)
             and view.templatable
             and view.content_type == self._cw.html_content_type()):
-            view.w(self._cw.document_surrounding_div())
+            view.w(u'<div>')
             view.render()
             view.w(u'</div>')
         else: