merge 3.5
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 14 Sep 2009 15:11:58 +0200
branch3.5
changeset 3210 44fa8d4a25d5
parent 3208 11b84e3b9458 (current diff)
parent 3209 c2c8f88a4520 (diff)
child 3212 07d11bacfefe
child 3222 8013f8e239e9
merge
--- a/web/views/tabs.py	Mon Sep 14 12:50:27 2009 +0200
+++ b/web/views/tabs.py	Mon Sep 14 15:11:58 2009 +0200
@@ -71,6 +71,9 @@
         return str('%s_active_tab' % self.config.appid)
 
     def active_tab(self, tabs, default):
+        formtab = self.req.form.get('tab')
+        if formtab in tabs:
+            return formtab
         cookies = self.req.get_cookie()
         cookiename = self.cookie_name
         activetab = cookies.get(cookiename)
@@ -112,7 +115,7 @@
         w(u'<ul>')
         for tab in tabs:
             w(u'<li>')
-            w(u'<a href="#as-%s">' % tab)
+            w(u'<a href="#%s">' % tab)
             w(u'<span onclick="set_tab(\'%s\', \'%s\')">' % (tab, self.cookie_name))
             w(self.req._(tab))
             w(u'</span>')
@@ -121,7 +124,7 @@
         w(u'</ul>')
         w(u'</div>')
         for tab in tabs:
-            w(u'<div id="as-%s">' % tab)
+            w(u'<div id="%s">' % tab)
             if entity:
                 self.lazyview(tab, eid=entity.eid)
             else:
@@ -153,7 +156,7 @@
         role = 'subject'
         vid = 'gallery'
 
-    in this example, entities related to project entity by the'screenshot'
+    in this example, entities related to project entity by the 'screenshot'
     relation (where the project is subject of the relation) will be displayed
     using the 'gallery' view.
     """