moving AMD-require code around
This commit is contained in:
parent
37f1c94d8f
commit
6296326701
13
js/office.js
13
js/office.js
@ -2,11 +2,6 @@
|
|||||||
var officeMain = {
|
var officeMain = {
|
||||||
onView: function(dir, file) {
|
onView: function(dir, file) {
|
||||||
"use strict";
|
"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() {
|
(function no_op() {return {no_op:function(){}};}()).no_op(function() {
|
||||||
OC.addScript('office', 'webodf').done(function() {
|
OC.addScript('office', 'webodf').done(function() {
|
||||||
OC.addScript('office', 'webodf_bootstrap').done(function() {
|
OC.addScript('office', 'webodf_bootstrap').done(function() {
|
||||||
@ -70,6 +65,14 @@ var officeMain = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(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) {
|
$('.documentslist tr').click(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
officeMain.onView('', $(this).attr('data-file'));
|
officeMain.onView('', $(this).attr('data-file'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user