merge stable stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 28 Apr 2011 15:29:21 +0200
branchstable
changeset 7270 5a1e9b90b5c4
parent 7262 373212d1fa33 (current diff)
parent 7268 cd14e03124be (diff)
child 7271 2bd70418b601
child 7279 eb73ce823622
merge stable
--- a/cwconfig.py	Thu Apr 28 10:11:14 2011 +0200
+++ b/cwconfig.py	Thu Apr 28 15:29:21 2011 +0200
@@ -1070,9 +1070,10 @@
     def instance_md5_version(self):
         import hashlib
         infos = []
-        for pkg in self.cubes():
+        for pkg in sorted(self.cubes()):
             version = self.cube_version(pkg)
             infos.append('%s-%s' % (pkg, version))
+        infos.append('cubicweb-%s' % str(self.cubicweb_version()))
         return hashlib.md5(';'.join(infos)).hexdigest()
 
     def load_configuration(self):
--- a/utils.py	Thu Apr 28 10:11:14 2011 +0200
+++ b/utils.py	Thu Apr 28 15:29:21 2011 +0200
@@ -230,7 +230,10 @@
     Request objects use a HTMLHead instance to ease adding of
     javascripts and stylesheets
     """
-    js_unload_code = u'jQuery(window).unload(unloadPageData);'
+    js_unload_code = u'''if (typeof(pageDataUnloaded) == 'undefined') {
+    jQuery(window).unload(unloadPageData);
+    pageDataUnloaded = true;
+}'''
     # Making <script> tag content work properly with all possible
     # content-types (xml/html) and all possible browsers is very
     # tricky, see http://www.hixie.ch/advocacy/xhtml for an in-depth discussion
--- a/web/request.py	Thu Apr 28 10:11:14 2011 +0200
+++ b/web/request.py	Thu Apr 28 15:29:21 2011 +0200
@@ -135,12 +135,12 @@
         """
         return self.set_varmaker()
 
-    def _get_tabindex_func(self):
+    def next_tabindex(self):
         nextfunc = self.get_page_data('nexttabfunc')
         if nextfunc is None:
             nextfunc = count(1).next
             self.set_page_data('nexttabfunc', nextfunc)
-        return nextfunc
+        return nextfunc()
 
     def set_varmaker(self):
         varmaker = self.get_page_data('rql_varmaker')
@@ -154,8 +154,6 @@
         or an anonymous connection is open
         """
         super(CubicWebRequestBase, self).set_session(session, user)
-        # tabindex generator
-        self.next_tabindex = self._get_tabindex_func()
         # set request language
         vreg = self.vreg
         if self.user:
--- a/web/views/startup.py	Thu Apr 28 10:11:14 2011 +0200
+++ b/web/views/startup.py	Thu Apr 28 15:29:21 2011 +0200
@@ -125,7 +125,7 @@
     def create_links(self):
         self.w(u'<ul class="createLink">')
         for etype in self.add_etype_links:
-            eschema = self.schema.eschema(etype)
+            eschema = self._cw.vreg.schema.eschema(etype)
             if eschema.has_perm(self._cw, 'add'):
                 self.w(u'<li><a href="%s">%s</a></li>' % (
                         self._cw.build_url('add/%s' % eschema),