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 (diff)
parent 7268 cd14e03124be (current diff)
child 7271 2bd70418b601
child 7279 eb73ce823622
merge stable
--- a/misc/migration/3.10.9_Any.py	Thu Apr 28 15:25:46 2011 +0200
+++ b/misc/migration/3.10.9_Any.py	Thu Apr 28 15:29:21 2011 +0200
@@ -15,14 +15,14 @@
     nbops = rset.rowcount
     enabled = interactive_mode
     with progress(title=title, nbops=nbops, size=30, enabled=enabled) as pb:
-        with hooks_control(session, session.HOOKS_DENY_ALL, 'integrity'):
-            for i,  row in enumerate(rset):
+        for i,  row in enumerate(rset):
+            with hooks_control(session, session.HOOKS_DENY_ALL, 'integrity'):
                 data = {'eid': row[0], 'cwuri': row[1].replace(u'/eid', u'')}
                 rql('SET X cwuri %(cwuri)s WHERE X eid %(eid)s', data)
-                if not i % 100: # commit every 100 entities to limit memory consumption
-                    pb.text = "%i committed" % i
-                    commit(ask_confirm=False)
-                pb.update()
+            if not i % 100: # commit every 100 entities to limit memory consumption
+                pb.text = "%i committed" % i
+                commit(ask_confirm=False)
+            pb.update()
         commit(ask_confirm=False)
 
 try:
--- a/web/data/cubicweb.compat.js	Thu Apr 28 15:25:46 2011 +0200
+++ b/web/data/cubicweb.compat.js	Thu Apr 28 15:29:21 2011 +0200
@@ -15,7 +15,7 @@
 
 // ========== ARRAY EXTENSIONS ========== ///
 Array.prototype.contains = cw.utils.deprecatedFunction(
-    '[3.9] array.contains(elt) is deprecated, use $.inArray(elt, array) instead',
+    '[3.9] array.contains(elt) is deprecated, use $.inArray(elt, array)!=-1 instead',
     function(element) {
         return jQuery.inArray(element, this) != - 1;
     }
--- a/web/data/cubicweb.edition.js	Thu Apr 28 15:25:46 2011 +0200
+++ b/web/data/cubicweb.edition.js	Thu Apr 28 15:29:21 2011 +0200
@@ -45,7 +45,7 @@
     var tabindex = (start == null) ? 15: start;
     cw.utils.nodeWalkDepthFirst(form, function(elem) {
         var tagName = elem.tagName.toUpperCase();
-        if ($.inArray(tagName, inputTypes)) {
+        if (jQuery.inArray(tagName, inputTypes) != -1) {
             if (jQuery(elem).attr('tabindex') != null) {
                 tabindex += 1;
                 jQuery(elem).attr('tabindex', tabindex);
@@ -58,7 +58,7 @@
 
 function showMatchingSelect(selectedValue, eid) {
     if (selectedValue) {
-        divId = 'div' + selectedValue + '_' + eid;
+        var divId = 'div' + selectedValue + '_' + eid;
         var divNode = jQuery('#' + divId);
         if (!divNode.length) {
             var args = {
--- a/web/data/cubicweb.widgets.js	Thu Apr 28 15:25:46 2011 +0200
+++ b/web/data/cubicweb.widgets.js	Thu Apr 28 15:29:21 2011 +0200
@@ -491,8 +491,8 @@
         var group = null;
         var variableRegexp = /%\((\w+)\)s/g;
         // emulates rgx.findAll()
-        while (group = variableRegexp.exec(text)) {
-            if (!$.inArray(group[1], self.variables)) {
+        while ( (group = variableRegexp.exec(text)) ) {
+            if ($.inArray(group[1], self.variables) == -1) {
                 unknownVariables.push(group[1]);
             }
             it++;