Browse Source

[spark] Fixes loading of the editor lines and content

Enrico Berti 11 years ago
parent
commit
c087815796
1 changed files with 4 additions and 3 deletions
  1. 4 3
      apps/spark/src/spark/templates/editor.mako

+ 4 - 3
apps/spark/src/spark/templates/editor.mako

@@ -796,9 +796,6 @@ ${ commonheader(_('Query'), app_name, user, "68px") | n,unicode }
       element.editor = editor;
       element.editor = editor;
       $("#snippet_" + options.id).data("editor", editor);
       $("#snippet_" + options.id).data("editor", editor);
       editor.setValue(allBindingsAccessor().value());
       editor.setValue(allBindingsAccessor().value());
-      window.setTimeout(function () {
-        editor.refresh();
-      }, 200);
       editor.setSize("100%", "100px");
       editor.setSize("100%", "100px");
       var wrapperElement = $(editor.getWrapperElement());
       var wrapperElement = $(editor.getWrapperElement());
 
 
@@ -1049,6 +1046,10 @@ ${ commonheader(_('Query'), app_name, user, "68px") | n,unicode }
         }
         }
       });
       });
     });
     });
+
+    $(".CodeMirror").each(function(){
+      $(this)[0].CodeMirror.refresh();
+    });
   });
   });