Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Script loading optimized

uggrocke1ef68ab1032
diff --git a/data/js/main.js b/data/js/main.js
index 4fb7e0031..3d5c86d50 100644
--- a/data/js/main.js
+++ b/data/js/main.js
@@ -4,11 +4,11 @@
define([
'jquery',
'jqueryui',
- 'dynatree',
+// 'dynatree',
'datatables',
'jsoneditor',
'jquerylayout',
- 'jquerydropdown',
+ 'jquerydropdown',
'less'
], function($){
"use strict";
@@ -53,7 +53,8 @@ var initApp = function(){
DirectoriesUI.initDialogs();
DirectoriesUI.initButtons();
- DirectoriesUI.initDirectoryTree();
+ DirectoriesUI.initContextMenus();
+ //DirectoriesUI.initDirectoryTree();
SettingsUI.initButtons();
SettingsUI.initDialogs();
@@ -78,19 +79,18 @@ var initApp = function(){
DirectoriesUI.initFavorites();
TagsUI.generateTagGroups();
-
- // TODO workarround for a bug
- $("#dirTree").css("display", "block");
$( "#loading" ).hide();
$( "#container" ).show();
+
+ UIAPI.hideLoadingAnimation();
// TODO check if document.ready is really needed
- $(document).ready(function() {
+ //$(document).ready(function() {
UIAPI.initLayout();
- SettingsUI.initJSONEditor();
- }
- );
- UIAPI.hideLoadingAnimation();
+ console.debug("Layout initialized");
+ //
+ // }
+ //);
});
}
diff --git a/data/loader.js b/data/loader.js
index 0adb4543b..9777b8746 100644
--- a/data/loader.js
+++ b/data/loader.js
@@ -46,7 +46,10 @@ require.config({
shim: {
'jquerylayout': {
deps: [
- 'jquery'
+ 'jquery',
+ 'jqueryui',
+ 'jqueryuidraggable',
+ 'jqueryuiresizable',
]
},
'jquerydropdown': {
@@ -62,7 +65,7 @@ require.config({
'jqueryuiposition',
'jqueryuimenu',
'jqueryuibutton',
- 'jqueryuidialog',
+ 'jqueryuidialog',
'jqueryuiselectable',
'jqueryuiautocomplete',
'jqueryuidatepicker',