Commit f9cec3d9 authored by François Billioud's avatar François Billioud

asynchron load

parent 03d57c2a
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
// initialize // initialize
var initPage = function() { var initPage = function() {
var pageIWantToTest = "illustration"; var pageIWantToTest = "editor";
addressOfTestDocument = "dav/temp.json";
setCurrentPage(pageIWantToTest); setCurrentPage(pageIWantToTest);
} }
...@@ -44,13 +45,13 @@ ...@@ -44,13 +45,13 @@
} }
var initDocument = function() { var initDocument = function() {
loadXHR("dav/temp2.json"); loadXHR(addressOfTestDocument);
} }
var init = function() { var init = function() {
initPage(); initPage();
waitBeforeExecution(getCurrentPage(),initUser); requireBeforeSucceed(function() {return getCurrentPage().getXML();},initUser);
waitBeforeExecution(getCurrentPage().getEditor(),initDocument); requireBeforeSucceed(function() {return getCurrentPage().getEditor();},initDocument);
} }
$(document).ready(init); $(document).ready(init);
</script> </script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment