load dijit properly, duh
This commit is contained in:
parent
ee5170424e
commit
0dbc20a8d4
1 changed files with 367 additions and 362 deletions
91
js/tt-rss.js
91
js/tt-rss.js
|
@ -216,39 +216,43 @@ function genericSanityCheck() {
|
|||
|
||||
function init() {
|
||||
try {
|
||||
require(['dojo/_base/kernel', 'dojo/ready', 'dojo/parser', 'dojo/_base/loader'], function(dojo, ready, parser) {
|
||||
|
||||
//dojo.registerModulePath("fox", "../../js/");
|
||||
|
||||
dojo.require("fox.FeedTree");
|
||||
require(['dojo/_base/kernel',
|
||||
'dojo/ready',
|
||||
'dojo/parser',
|
||||
'dojo/_base/loader',
|
||||
"dijit/ProgressBar",
|
||||
"dijit/ColorPalette",
|
||||
"dijit/Dialog",
|
||||
"dijit/form/Button",
|
||||
"dijit/form/ComboButton",
|
||||
"dijit/form/CheckBox",
|
||||
"dijit/form/DropDownButton",
|
||||
"dijit/form/FilteringSelect",
|
||||
"dijit/form/Form",
|
||||
"dijit/form/RadioButton",
|
||||
"dijit/form/Select",
|
||||
"dijit/form/SimpleTextarea",
|
||||
"dijit/form/TextBox",
|
||||
"dijit/form/ComboBox",
|
||||
"dijit/form/ValidationTextBox",
|
||||
"dijit/InlineEditBox",
|
||||
"dijit/layout/AccordionContainer",
|
||||
"dijit/layout/BorderContainer",
|
||||
"dijit/layout/ContentPane",
|
||||
"dijit/layout/TabContainer",
|
||||
"dijit/PopupMenuItem",
|
||||
"dijit/Menu",
|
||||
"dijit/Toolbar",
|
||||
"dijit/Tree",
|
||||
"dijit/tree/dndSource",
|
||||
"dijit/tree/ForestStoreModel",
|
||||
"dojo/data/ItemFileWriteStore" ], function (dojo, ready, parser) {
|
||||
|
||||
dojo.require("dijit.ColorPalette");
|
||||
dojo.require("dijit.Dialog");
|
||||
dojo.require("dijit.form.Button");
|
||||
dojo.require("dijit.form.ComboButton");
|
||||
dojo.require("dijit.form.CheckBox");
|
||||
dojo.require("dijit.form.DropDownButton");
|
||||
dojo.require("dijit.form.FilteringSelect");
|
||||
dojo.require("dijit.form.Form");
|
||||
dojo.require("dijit.form.RadioButton");
|
||||
dojo.require("dijit.form.Select");
|
||||
dojo.require("dijit.form.SimpleTextarea");
|
||||
dojo.require("dijit.form.TextBox");
|
||||
dojo.require("dijit.form.ComboBox");
|
||||
dojo.require("dijit.form.ValidationTextBox");
|
||||
dojo.require("dijit.InlineEditBox");
|
||||
dojo.require("dijit.layout.AccordionContainer");
|
||||
dojo.require("dijit.layout.BorderContainer");
|
||||
dojo.require("dijit.layout.ContentPane");
|
||||
dojo.require("dijit.layout.TabContainer");
|
||||
dojo.require("dijit.PopupMenuItem");
|
||||
dojo.require("dijit.Menu");
|
||||
dojo.require("dijit.ProgressBar");
|
||||
dojo.require("dijit.ProgressBar");
|
||||
dojo.require("dijit.Toolbar");
|
||||
dojo.require("dijit.Tree");
|
||||
dojo.require("dijit.tree.dndSource");
|
||||
dojo.require("dojo.data.ItemFileWriteStore");
|
||||
ready(function() {
|
||||
|
||||
dojo.require("fox.FeedTree");
|
||||
|
||||
dojo.parser.parse();
|
||||
|
||||
|
@ -264,6 +268,8 @@ function init() {
|
|||
var hasMp3 = !!(a.canPlayType && a.canPlayType('audio/mpeg;').replace(/no/, ''));
|
||||
var clientTzOffset = new Date().getTimezoneOffset() * 60;
|
||||
|
||||
init_hotkey_actions();
|
||||
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: {op: "rpc", method: "sanityCheck", hasAudio: hasAudio,
|
||||
hasMp3: hasMp3,
|
||||
|
@ -273,6 +279,18 @@ function init() {
|
|||
backend_sanity_check_callback(transport);
|
||||
} });
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
exception_error("init", e);
|
||||
}
|
||||
}
|
||||
|
||||
function init_hotkey_actions() {
|
||||
hotkey_actions["next_feed"] = function() {
|
||||
var rv = dijit.byId("feedTree").getNextFeed(
|
||||
getActiveFeedId(), activeFeedIsCat());
|
||||
|
@ -562,22 +580,11 @@ function init() {
|
|||
viewCurrentFeed();
|
||||
} });
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
exception_error("init", e);
|
||||
}
|
||||
}
|
||||
|
||||
function init_second_stage() {
|
||||
|
||||
try {
|
||||
Event.observe(window, 'resize', function() {
|
||||
dijit.byId("main").resize();
|
||||
});
|
||||
|
||||
//dojo.addOnLoad(function() {
|
||||
updateFeedList();
|
||||
closeArticlePanel();
|
||||
|
||||
|
@ -603,8 +610,6 @@ function init_second_stage() {
|
|||
}
|
||||
});
|
||||
|
||||
//});
|
||||
|
||||
delCookie("ttrss_test");
|
||||
|
||||
var toolbar = document.forms["main_toolbar_form"];
|
||||
|
|
Loading…
Reference in a new issue