Commits

aleray committed 8ca9b2d

Fixed bug related to #43.2: layout gets no longer broken on module reodering

However something is still weird when the number of columns set in the
dashboard options is to high... On a 6 modules dashboard things go wrong from a
4 columns layout.

see: https://bitbucket.org/izi/django-admin-tools/issue/43/issues-with-dashboard-preferences-and

Comments (0)

Files changed (1)

admin_tools/media/admin_tools/js/jquery/jquery.dashboard.js

         var percent = Math.floor(100 / options.columns);
         var start = 0;
         var stop = 0;
-        for (i = 0; i < options.columns; i++) {
+        for (var i = 0; i < options.columns; i++) {
             if (typeof(sizes[i]) == 'undefined') {
                 start = i * size;
                 stop  = start + size;
                 );
                 continue;
             } else {
-                start = (i == 0) ? 0 : sizes[i-1];
+                start = (i == 0) ? 0 : start + sizes[i-1];
                 stop  = start + sizes[i];
             }
             elts.slice(start, stop).wrapAll(