Load minified scripts on production
This commit is contained in:
parent
dc20d19313
commit
29da4e5bff
@ -107,8 +107,8 @@ var documentsMain = {
|
|||||||
documentsMain.UI.showOverlay();
|
documentsMain.UI.showOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var webodfSource = (oc_debug !== true) ? 'webodf-debug' : 'webodf';
|
||||||
OC.addScript('documents', '3rdparty/webodf/webodf-debug').done(function() {
|
OC.addScript('documents', '3rdparty/webodf/' + webodfSource).done(function() {
|
||||||
// preload stuff in the background
|
// preload stuff in the background
|
||||||
require({}, ["dojo/ready"], function(ready) {
|
require({}, ["dojo/ready"], function(ready) {
|
||||||
ready(function() {
|
ready(function() {
|
||||||
@ -127,7 +127,9 @@ var documentsMain = {
|
|||||||
prepareSession : function(){
|
prepareSession : function(){
|
||||||
documentsMain.isEditorMode = true;
|
documentsMain.isEditorMode = true;
|
||||||
documentsMain.UI.showOverlay();
|
documentsMain.UI.showOverlay();
|
||||||
$(window).on('beforeunload', function(){return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead.")})
|
$(window).on('beforeunload', function(){
|
||||||
|
return t('documents', "Leaving this page in Editor mode might cause unsaved data. It is recommended to use 'Close' button instead.");
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
prepareGrid : function(){
|
prepareGrid : function(){
|
||||||
@ -148,7 +150,7 @@ var documentsMain = {
|
|||||||
|
|
||||||
//Wait for 3 sec if editor is still loading
|
//Wait for 3 sec if editor is still loading
|
||||||
if (!documentsMain.ready){
|
if (!documentsMain.ready){
|
||||||
setTimeout(function(){ documentsMain.initSession(response) }, 3000);
|
setTimeout(function(){ documentsMain.initSession(response); }, 3000);
|
||||||
console.log('Waiting for the editor to start...');
|
console.log('Waiting for the editor to start...');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -183,9 +185,9 @@ var documentsMain = {
|
|||||||
console.log('joining session '+fileId);
|
console.log('joining session '+fileId);
|
||||||
var url;
|
var url;
|
||||||
if (documentsMain.isGuest){
|
if (documentsMain.isGuest){
|
||||||
url = OC.Router.generate('documents_session_joinasguest') + '/' + fileId
|
url = OC.Router.generate('documents_session_joinasguest') + '/' + fileId;
|
||||||
} else {
|
} else {
|
||||||
url = OC.Router.generate('documents_session_joinasuser') + '/' + fileId
|
url = OC.Router.generate('documents_session_joinasuser') + '/' + fileId;
|
||||||
}
|
}
|
||||||
$.post(
|
$.post(
|
||||||
url,
|
url,
|
||||||
|
@ -37,7 +37,10 @@ var odfViewer = {
|
|||||||
onView: function(filename) {
|
onView: function(filename) {
|
||||||
OC.addStyle('documents', 'viewer/webodf');
|
OC.addStyle('documents', 'viewer/webodf');
|
||||||
OC.addStyle('documents', 'viewer/odfviewer');
|
OC.addStyle('documents', 'viewer/odfviewer');
|
||||||
OC.addScript('documents', 'viewer/webodf').done(function() {
|
|
||||||
|
var webodfSource = (oc_debug !== true) ? 'webodf-debug' : 'webodf';
|
||||||
|
|
||||||
|
OC.addScript('documents', 'viewer/' + webodfSource).done(function() {
|
||||||
var location = fileDownloadPath($('#dir').val(), filename);
|
var location = fileDownloadPath($('#dir').val(), filename);
|
||||||
|
|
||||||
// fade out files menu and add odf menu
|
// fade out files menu and add odf menu
|
||||||
|
Loading…
x
Reference in New Issue
Block a user