From 629632670181e2e5ba15def8b3ee110a3ad8b4bd Mon Sep 17 00:00:00 2001 From: Tobias Hintze Date: Thu, 11 Jul 2013 16:25:46 +0200 Subject: [PATCH] moving AMD-require code around --- js/office.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/js/office.js b/js/office.js index 17f5b842..62001102 100644 --- a/js/office.js +++ b/js/office.js @@ -2,11 +2,6 @@ var officeMain = { onView: function(dir, file) { "use strict"; - OC.addScript('office', 'dojo-amalgamation').done(function() { - document.dojoAnchor.require(["dojo/ready"], function(ready) { - ready(function(){alert("ready!");}); - }); - }); (function no_op() {return {no_op:function(){}};}()).no_op(function() { OC.addScript('office', 'webodf').done(function() { OC.addScript('office', 'webodf_bootstrap').done(function() { @@ -70,6 +65,14 @@ var officeMain = { }; $(document).ready(function() { + alert("ready A"); + OC.addScript('office', 'dojo-amalgamation', function() { + require(["dojo/ready"], function(ready) { + ready(function(){alert("ready B!");}); + }); + }); + + $('.documentslist tr').click(function(event) { event.preventDefault(); officeMain.onView('', $(this).attr('data-file'));