move dojoConfig to amalgamation

pull/1/head
Tobias Hintze 11 lat temu
rodzic 929d1a9d29
commit 84f3b6ec78

@ -1,3 +1,21 @@
var usedLocale = "C";
if (navigator && navigator.language.match(/^(de)/)) {
usedLocale = navigator.language.substr(0,2);
}
dojoConfig = {
locale: usedLocale,
paths: {
"webodf/editor": "/owncloud/apps/office/js/editor",
"dijit": "/owncloud/apps/office/js/editor/dijit",
"dojox": "/owncloud/apps/office/js/editor/dojox",
"dojo": "/owncloud/apps/office/js/editor/dojo",
"resources": "/owncloud/apps/office/js/editor/resources"
}
};
//>>built
(function(e,j){var i,l,c=function(){},g=function(a){for(var d in a)return 0;return 1},h={}.toString,b=function(a){return"[object Function]"==h.call(a)},f=function(a){return"[object String]"==h.call(a)},a=function(a){return"[object Array]"==h.call(a)},k=function(a,d){if(a)for(var b=0;b<a.length;)d(a[b++])},d=function(a,d){for(var b in d)a[b]=d[b];return a},p=function(a,b){return d(Error(a),{src:"dojoLoader",info:b})},m=1,n=function(){return"_"+m++},o=function(a,d,b){return wa(a,d,b,0,o)},r=this,q=
r.document,v=q&&q.createElement("DiV"),s=o.has=function(a){return b(u[a])?u[a]=u[a](r,q,v):u[a]},u=s.cache=j.hasCache;s.add=function(a,d,b,k){(void 0===u[a]||k)&&(u[a]=d);return b&&s(a)};for(var t in e.has)s.add(t,e.has[t],0,1);o.async=1;var y=new Function("return eval(arguments[0]);");o.eval=function(a,d){return y(a+"\r\n////@ sourceURL="+d)};var z={},I=o.signal=function(d,b){var f=z[d];k(f&&f.slice(0),function(d){d.apply(null,a(b)?b:[b])})},J=o.on=function(a,d){var b=z[a]||(z[a]=[]);b.push(d);return{remove:function(){for(var a=

@ -1,5 +1,6 @@
/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require */
/*globals $,OC,fileDownloadPath,t,document,odf,webodfEditor,alert,require,dojo */
var officeMain = {
/*
dojoConfig: {
locale: "C",
paths: {
@ -10,11 +11,13 @@ var officeMain = {
"resources": "/owncloud/apps/office/js/editor/resources"
}
},
*/
onStartup: function() {
"use strict";
OC.addScript('office', 'webodf_bootstrap', function() {
require({}, ["dojo/ready"], function(ready) {
ready(function(){
dojo.config = officeMain.dojoConfig;
// dojo.config = officeMain.dojoConfig;
alert("dojo loaded");
require({}, ["webodf/editor/Editor"], function(Editor) {
alert("Editor loaded: "+Editor);

Ładowanie…
Anuluj
Zapisz