rework dojo singleton modules to better work with phpstorm completion (ugh) - declare() is not needed there anyway

remove event.observe from login form (not needed)
load pluginhost via amd
This commit is contained in:
Andrew Dolgov 2018-12-03 09:33:44 +03:00
parent e905ce7ea9
commit 84affc7b1d
14 changed files with 101 additions and 100 deletions

View File

@ -19,30 +19,27 @@
<script type="text/javascript"> <script type="text/javascript">
require({cache:{}}); require({cache:{}});
Event.observe(window, 'load', function() {
init();
});
</script> </script>
</head> </head>
<body class="claro ttrss_main ttrss_login"> <body class="claro ttrss_main ttrss_login">
<script type="text/javascript"> <script type="text/javascript">
function init() { require(['dojo/parser', "dojo/ready", 'dijit/form/Button','dijit/form/CheckBox','dijit/form/Form',
'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser, ready){
ready(function() {
parser.parse();
require(['dojo/parser','dijit/form/Button','dijit/form/CheckBox','dijit/form/Form', //show tooltip node only after this widget is instaniated.
'dijit/form/Select','dijit/form/TextBox','dijit/form/ValidationTextBox'],function(parser){ dojo.query('div[dojoType="dijit.Tooltip"]').style({
parser.parse(); display:''
//show tooltip node only after this widget is instaniated. });
dojo.query('div[dojoType="dijit.Tooltip"]').style({
display:''
});
fetchProfiles();
dijit.byId("bw_limit").attr("checked", Cookie.get("ttrss_bwlimit") == 'true');
document.forms.loginForm.login.focus();
});
} fetchProfiles();
dijit.byId("bw_limit").attr("checked", Cookie.get("ttrss_bwlimit") == 'true');
document.forms.loginForm.login.focus();
});
});
function fetchProfiles() { function fetchProfiles() {
try { try {

View File

@ -105,7 +105,6 @@
"lib/dojo/tt-rss-layer.js", "lib/dojo/tt-rss-layer.js",
"js/tt-rss.js", "js/tt-rss.js",
"js/common.js", "js/common.js",
"js/PluginHost.js",
"errors.php?mode=js") as $jsfile) { "errors.php?mode=js") as $jsfile) {
echo javascript_tag($jsfile); echo javascript_tag($jsfile);

View File

@ -1,9 +1,9 @@
'use strict' 'use strict'
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.Article", null, { Article = {
_active_article_id: 0, _active_article_id: 0,
selectionSetScore: function() { selectionSetScore: function () {
const ids = Headlines.getSelected(); const ids = Headlines.getSelected();
if (ids.length > 0) { if (ids.length > 0) {
@ -40,7 +40,7 @@ define(["dojo/_base/declare"], function (declare) {
alert(__("No articles selected.")); alert(__("No articles selected."));
} }
}, },
setScore: function(id, pic) { setScore: function (id, pic) {
const score = pic.getAttribute("score"); const score = pic.getAttribute("score");
const new_score = prompt(__("Please enter new score for this article:"), score); const new_score = prompt(__("Please enter new score for this article:"), score);
@ -57,7 +57,7 @@ define(["dojo/_base/declare"], function (declare) {
}); });
} }
}, },
cdmUnsetActive: function(event) { cdmUnsetActive: function (event) {
const row = $("RROW-" + Article.getActive()); const row = $("RROW-" + Article.getActive());
if (row) { if (row) {
@ -119,7 +119,7 @@ define(["dojo/_base/declare"], function (declare) {
} catch (e) { } catch (e) {
} }
}, },
view: function(id, noexpand) { view: function (id, noexpand) {
this.setActive(id); this.setActive(id);
if (!noexpand) { if (!noexpand) {
@ -175,7 +175,7 @@ define(["dojo/_base/declare"], function (declare) {
return false; return false;
}, },
editTags: function(id) { editTags: function (id) {
const query = "backend.php?op=article&method=editArticleTags&param=" + encodeURIComponent(id); const query = "backend.php?op=article&method=editArticleTags&param=" + encodeURIComponent(id);
if (dijit.byId("editTagsDlg")) if (dijit.byId("editTagsDlg"))
@ -224,7 +224,7 @@ define(["dojo/_base/declare"], function (declare) {
dialog.show(); dialog.show();
}, },
cdmScrollToId: function(id, force) { cdmScrollToId: function (id, force) {
const ctr = $("headlines-frame"); const ctr = $("headlines-frame");
const e = $("RROW-" + id); const e = $("RROW-" + id);
@ -239,7 +239,7 @@ define(["dojo/_base/declare"], function (declare) {
Element.hide("floatingTitle"); Element.hide("floatingTitle");
} }
}, },
setActive: function(id) { setActive: function (id) {
console.log("setActive", id); console.log("setActive", id);
$$("div[id*=RROW][class*=active]").each((e) => { $$("div[id*=RROW][class*=active]").each((e) => {
@ -287,10 +287,10 @@ define(["dojo/_base/declare"], function (declare) {
Headlines.updateSelectedPrompt(); Headlines.updateSelectedPrompt();
}, },
getActive: function() { getActive: function () {
return this._active_article_id; return this._active_article_id;
}, },
scroll: function(offset) { scroll: function (offset) {
if (!App.isCombinedMode()) { if (!App.isCombinedMode()) {
const ci = $("content-insert"); const ci = $("content-insert");
if (ci) { if (ci) {
@ -304,7 +304,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
}, },
getRelativeIds: function(id, limit) { getRelativeIds: function (id, limit) {
const tmp = []; const tmp = [];
@ -324,14 +324,16 @@ define(["dojo/_base/declare"], function (declare) {
return tmp; return tmp;
}, },
mouseIn: function(id) { mouseIn: function (id) {
this.post_under_pointer = id; this.post_under_pointer = id;
}, },
mouseOut: function(id) { mouseOut: function (id) {
this.post_under_pointer = false; this.post_under_pointer = false;
}, },
getUnderPointer: function() { getUnderPointer: function () {
return this.post_under_pointer; return this.post_under_pointer;
} }
}); }
return Article;
}); });

View File

@ -1,9 +1,9 @@
'use strict' 'use strict'
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.ArticleCache", null, { ArticleCache = {
has_storage: 'sessionStorage' in window && window['sessionStorage'] !== null, has_storage: 'sessionStorage' in window && window['sessionStorage'] !== null,
set: function(id, obj) { set: function (id, obj) {
if (this.has_storage) if (this.has_storage)
try { try {
sessionStorage["article:" + id] = obj; sessionStorage["article:" + id] = obj;
@ -11,17 +11,19 @@ define(["dojo/_base/declare"], function (declare) {
sessionStorage.clear(); sessionStorage.clear();
} }
}, },
get: function(id) { get: function (id) {
if (this.has_storage) if (this.has_storage)
return sessionStorage["article:" + id]; return sessionStorage["article:" + id];
}, },
clear: function() { clear: function () {
if (this.has_storage) if (this.has_storage)
sessionStorage.clear(); sessionStorage.clear();
}, },
del: function(id) { del: function (id) {
if (this.has_storage) if (this.has_storage)
sessionStorage.removeItem("article:" + id); sessionStorage.removeItem("article:" + id);
}, },
}); }
return ArticleCache;
}); });

View File

@ -2,7 +2,7 @@
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
// noinspection JSUnusedGlobalSymbols // noinspection JSUnusedGlobalSymbols
return declare("fox.CommonDialogs", null, { CommonDialogs = {
closeInfoBox: function() { closeInfoBox: function() {
const dialog = dijit.byId("infoBox"); const dialog = dijit.byId("infoBox");
if (dialog) dialog.hide(); if (dialog) dialog.hide();
@ -443,5 +443,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
return false; return false;
} }
}); };
return CommonDialogs;
}); });

View File

@ -1,7 +1,7 @@
'use strict' 'use strict'
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.CommonFilters", null, { Filters = {
filterDlgCheckAction: function(sender) { filterDlgCheckAction: function(sender) {
const action = sender.value; const action = sender.value;
@ -387,5 +387,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
dialog.show(); dialog.show();
}, },
}); };
return Filters;
}); });

View File

@ -1,7 +1,7 @@
'use strict' 'use strict'
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.Feeds", null, { Feeds = {
counters_last_request: 0, counters_last_request: 0,
_active_feed_id: 0, _active_feed_id: 0,
_active_feed_is_cat: false, _active_feed_is_cat: false,
@ -636,5 +636,7 @@ define(["dojo/_base/declare"], function (declare) {
App.handleRpcJson(transport, true); App.handleRpcJson(transport, true);
}); });
}, },
}); };
return Feeds;
}); });

View File

@ -1,13 +1,13 @@
'use strict'; 'use strict';
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.Headlines", null, { Headlines = {
vgroup_last_feed: undefined, vgroup_last_feed: undefined,
_headlines_scroll_timeout: 0, _headlines_scroll_timeout: 0,
loaded_article_ids: [], loaded_article_ids: [],
current_first_id: 0, current_first_id: 0,
catchup_id_batch: [], catchup_id_batch: [],
click: function(event, id, in_body) { click: function (event, id, in_body) {
in_body = in_body || false; in_body = in_body || false;
if (App.isCombinedMode()) { if (App.isCombinedMode()) {
@ -34,16 +34,16 @@ define(["dojo/_base/declare"], function (declare) {
return false; return false;
} }
}, },
initScrollHandler: function() { initScrollHandler: function () {
$("headlines-frame").onscroll = (event) => { $("headlines-frame").onscroll = (event) => {
clearTimeout(this._headlines_scroll_timeout); clearTimeout(this._headlines_scroll_timeout);
this._headlines_scroll_timeout = window.setTimeout(function() { this._headlines_scroll_timeout = window.setTimeout(function () {
//console.log('done scrolling', event); //console.log('done scrolling', event);
Headlines.scrollHandler(); Headlines.scrollHandler();
}, 50); }, 50);
} }
}, },
loadMore: function() { loadMore: function () {
const view_mode = document.forms["main_toolbar_form"].view_mode.value; const view_mode = document.forms["main_toolbar_form"].view_mode.value;
const unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length; const unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length;
const num_all = $$("#headlines-frame > div[id*=RROW]").length; const num_all = $$("#headlines-frame > div[id*=RROW]").length;
@ -71,7 +71,7 @@ define(["dojo/_base/declare"], function (declare) {
Feeds.open({feed: Feeds.getActive(), is_cat: Feeds.activeIsCat(), offset: offset}); Feeds.open({feed: Feeds.getActive(), is_cat: Feeds.activeIsCat(), offset: offset});
}, },
scrollHandler: function() { scrollHandler: function () {
try { try {
Headlines.unpackVisible(); Headlines.unpackVisible();
@ -149,7 +149,7 @@ define(["dojo/_base/declare"], function (declare) {
console.warn("scrollHandler", e); console.warn("scrollHandler", e);
} }
}, },
updateFloatingTitle: function(unread_only) { updateFloatingTitle: function (unread_only) {
if (!App.isCombinedMode()/* || !App.getInitParam("cdm_expanded")*/) return; if (!App.isCombinedMode()/* || !App.getInitParam("cdm_expanded")*/) return;
const hf = $("headlines-frame"); const hf = $("headlines-frame");
@ -200,7 +200,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
} }
}, },
unpackVisible: function() { unpackVisible: function () {
if (!App.isCombinedMode() || !App.getInitParam("cdm_expanded")) return; if (!App.isCombinedMode() || !App.getInitParam("cdm_expanded")) return;
const rows = $$("#headlines-frame div[id*=RROW][data-content]"); const rows = $$("#headlines-frame div[id*=RROW][data-content]");
@ -221,7 +221,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
} }
}, },
onLoaded: function(transport, offset) { onLoaded: function (transport, offset) {
const reply = App.handleRpcJson(transport); const reply = App.handleRpcJson(transport);
console.log("Headlines.onLoaded: offset=", offset); console.log("Headlines.onLoaded: offset=", offset);
@ -383,7 +383,7 @@ define(["dojo/_base/declare"], function (declare) {
Notify.close(); Notify.close();
}, },
reverse: function() { reverse: function () {
const toolbar = document.forms["main_toolbar_form"]; const toolbar = document.forms["main_toolbar_form"];
const order_by = dijit.getEnclosingWidget(toolbar.order_by); const order_by = dijit.getEnclosingWidget(toolbar.order_by);
@ -398,7 +398,7 @@ define(["dojo/_base/declare"], function (declare) {
Feeds.reloadCurrent(); Feeds.reloadCurrent();
}, },
selectionToggleUnread: function(params) { selectionToggleUnread: function (params) {
params = params || {}; params = params || {};
const cmode = params.cmode || 2; const cmode = params.cmode || 2;
@ -442,7 +442,7 @@ define(["dojo/_base/declare"], function (declare) {
if (callback) callback(transport); if (callback) callback(transport);
}); });
}, },
selectionToggleMarked: function(ids) { selectionToggleMarked: function (ids) {
const rows = ids || Headlines.getSelected(); const rows = ids || Headlines.getSelected();
if (rows.length == 0) { if (rows.length == 0) {
@ -463,7 +463,7 @@ define(["dojo/_base/declare"], function (declare) {
App.handleRpcJson(transport); App.handleRpcJson(transport);
}); });
}, },
selectionTogglePublished: function(ids) { selectionTogglePublished: function (ids) {
const rows = ids || Headlines.getSelected(); const rows = ids || Headlines.getSelected();
if (rows.length == 0) { if (rows.length == 0) {
@ -486,7 +486,7 @@ define(["dojo/_base/declare"], function (declare) {
}); });
} }
}, },
toggleMark: function(id, client_only) { toggleMark: function (id, client_only) {
const query = {op: "rpc", id: id, method: "mark"}; const query = {op: "rpc", id: id, method: "mark"};
const row = $("RROW-" + id); const row = $("RROW-" + id);
@ -511,7 +511,7 @@ define(["dojo/_base/declare"], function (declare) {
}); });
} }
}, },
togglePub: function(id, client_only) { togglePub: function (id, client_only) {
const row = $("RROW-" + id); const row = $("RROW-" + id);
if (row) { if (row) {
@ -538,7 +538,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
}, },
move: function(mode, noscroll, noexpand) { move: function (mode, noscroll, noexpand) {
const rows = Headlines.getLoaded(); const rows = Headlines.getLoaded();
let prev_id = false; let prev_id = false;
@ -620,7 +620,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
} }
}, },
updateSelectedPrompt: function() { updateSelectedPrompt: function () {
const count = Headlines.getSelected().length; const count = Headlines.getSelected().length;
const elem = $("selected_prompt"); const elem = $("selected_prompt");
@ -631,7 +631,7 @@ define(["dojo/_base/declare"], function (declare) {
count > 0 ? Element.show(elem) : Element.hide(elem); count > 0 ? Element.show(elem) : Element.hide(elem);
} }
}, },
toggleUnread: function(id, cmode) { toggleUnread: function (id, cmode) {
const row = $("RROW-" + id); const row = $("RROW-" + id);
if (row) { if (row) {
@ -658,7 +658,7 @@ define(["dojo/_base/declare"], function (declare) {
}); });
} }
}, },
selectionRemoveLabel: function(id, ids) { selectionRemoveLabel: function (id, ids) {
if (!ids) ids = Headlines.getSelected(); if (!ids) ids = Headlines.getSelected();
if (ids.length == 0) { if (ids.length == 0) {
@ -676,7 +676,7 @@ define(["dojo/_base/declare"], function (declare) {
this.onLabelsUpdated(transport); this.onLabelsUpdated(transport);
}); });
}, },
selectionAssignLabel: function(id, ids) { selectionAssignLabel: function (id, ids) {
if (!ids) ids = Headlines.getSelected(); if (!ids) ids = Headlines.getSelected();
if (ids.length == 0) { if (ids.length == 0) {
@ -694,7 +694,7 @@ define(["dojo/_base/declare"], function (declare) {
this.onLabelsUpdated(transport); this.onLabelsUpdated(transport);
}); });
}, },
deleteSelection: function() { deleteSelection: function () {
const rows = Headlines.getSelected(); const rows = Headlines.getSelected();
if (rows.length == 0) { if (rows.length == 0) {
@ -725,7 +725,7 @@ define(["dojo/_base/declare"], function (declare) {
Feeds.reloadCurrent(); Feeds.reloadCurrent();
}); });
}, },
getSelected: function() { getSelected: function () {
const rv = []; const rv = [];
$$("#headlines-frame > div[id*=RROW][class*=Selected]").each( $$("#headlines-frame > div[id*=RROW][class*=Selected]").each(
@ -739,7 +739,7 @@ define(["dojo/_base/declare"], function (declare) {
return rv.uniq(); return rv.uniq();
}, },
getLoaded: function() { getLoaded: function () {
const rv = []; const rv = [];
const children = $$("#headlines-frame > div[id*=RROW-]"); const children = $$("#headlines-frame > div[id*=RROW-]");
@ -752,7 +752,7 @@ define(["dojo/_base/declare"], function (declare) {
return rv; return rv;
}, },
onRowChecked: function(elem) { onRowChecked: function (elem) {
// account for dojo checkboxes // account for dojo checkboxes
elem = elem.domNode || elem; elem = elem.domNode || elem;
@ -760,7 +760,7 @@ define(["dojo/_base/declare"], function (declare) {
this.updateSelectedPrompt(); this.updateSelectedPrompt();
}, },
select: function(mode) { select: function (mode) {
// mode = all,none,unread,invert,marked,published // mode = all,none,unread,invert,marked,published
let query = "#headlines-frame > div[id*=RROW]"; let query = "#headlines-frame > div[id*=RROW]";
@ -814,7 +814,7 @@ define(["dojo/_base/declare"], function (declare) {
Headlines.updateSelectedPrompt(); Headlines.updateSelectedPrompt();
} }
}, },
archiveSelection: function() { archiveSelection: function () {
const rows = Headlines.getSelected(); const rows = Headlines.getSelected();
if (rows.length == 0) { if (rows.length == 0) {
@ -854,7 +854,7 @@ define(["dojo/_base/declare"], function (declare) {
Feeds.reloadCurrent(); Feeds.reloadCurrent();
}); });
}, },
catchupSelection: function() { catchupSelection: function () {
const rows = Headlines.getSelected(); const rows = Headlines.getSelected();
if (rows.length == 0) { if (rows.length == 0) {
@ -875,7 +875,7 @@ define(["dojo/_base/declare"], function (declare) {
Headlines.selectionToggleUnread({callback: Feeds.reloadCurrent, no_error: 1}); Headlines.selectionToggleUnread({callback: Feeds.reloadCurrent, no_error: 1});
}, },
catchupBatched: function(callback) { catchupBatched: function (callback) {
console.log("catchupBatched, size=", this.catchup_id_batch.length); console.log("catchupBatched, size=", this.catchup_id_batch.length);
if (this.catchup_id_batch.length > 0) { if (this.catchup_id_batch.length > 0) {
@ -908,7 +908,7 @@ define(["dojo/_base/declare"], function (declare) {
if (callback) callback(); if (callback) callback();
} }
}, },
catchupRelativeTo: function(below, id) { catchupRelativeTo: function (below, id) {
if (!id) id = Article.getActive(); if (!id) id = Article.getActive();
@ -970,7 +970,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
} }
}, },
onLabelsUpdated: function(transport) { onLabelsUpdated: function (transport) {
const data = JSON.parse(transport.responseText); const data = JSON.parse(transport.responseText);
if (data) { if (data) {
@ -981,11 +981,11 @@ define(["dojo/_base/declare"], function (declare) {
}); });
} }
}, },
onActionChanged: function(elem) { onActionChanged: function (elem) {
eval(elem.value); eval(elem.value);
elem.attr('value', 'false'); elem.attr('value', 'false');
}, },
correctHeadlinesOffset: function(id) { correctHeadlinesOffset: function (id) {
const container = $("headlines-frame"); const container = $("headlines-frame");
const row = $("RROW-" + id); const row = $("RROW-" + id);
@ -1005,7 +1005,7 @@ define(["dojo/_base/declare"], function (declare) {
container.scrollTop = row.offsetTop + row.offsetHeight - viewport; container.scrollTop = row.offsetTop + row.offsetHeight - viewport;
} }
}, },
initFloatingMenu: function() { initFloatingMenu: function () {
if (!dijit.byId("floatingMenu")) { if (!dijit.byId("floatingMenu")) {
const menu = new dijit.Menu({ const menu = new dijit.Menu({
@ -1018,7 +1018,7 @@ define(["dojo/_base/declare"], function (declare) {
menu.startup(); menu.startup();
} }
}, },
headlinesMenuCommon: function(menu) { headlinesMenuCommon: function (menu) {
menu.addChild(new dijit.MenuItem({ menu.addChild(new dijit.MenuItem({
label: __("Open original article"), label: __("Open original article"),
@ -1146,7 +1146,7 @@ define(["dojo/_base/declare"], function (declare) {
} }
}, },
initHeadlinesMenu: function() { initHeadlinesMenu: function () {
if (!dijit.byId("headlinesMenu")) { if (!dijit.byId("headlinesMenu")) {
const menu = new dijit.Menu({ const menu = new dijit.Menu({
@ -1209,5 +1209,7 @@ define(["dojo/_base/declare"], function (declare) {
menu.startup(); menu.startup();
} }
} }
}); }
return Headlines;
}); });

View File

@ -1,6 +1,6 @@
// based on http://www.velvetcache.org/2010/08/19/a-simple-javascript-hooks-system // based on http://www.velvetcache.org/2010/08/19/a-simple-javascript-hooks-system
const PluginHost = { PluginHost = {
HOOK_ARTICLE_RENDERED: 1, HOOK_ARTICLE_RENDERED: 1,
HOOK_ARTICLE_RENDERED_CDM: 2, HOOK_ARTICLE_RENDERED_CDM: 2,
HOOK_ARTICLE_SET_ACTIVE: 3, HOOK_ARTICLE_SET_ACTIVE: 3,

View File

@ -1,5 +1,5 @@
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
return declare("fox.PrefHelpers", null, { Prefs = {
clearFeedAccessKeys: function() { clearFeedAccessKeys: function() {
if (confirm(__("This will invalidate all previously generated feed URLs. Continue?"))) { if (confirm(__("This will invalidate all previously generated feed URLs. Continue?"))) {
Notify.progress("Clearing URLs..."); Notify.progress("Clearing URLs...");
@ -148,5 +148,7 @@ define(["dojo/_base/declare"], function (declare) {
Notify.close(); Notify.close();
}); });
} }
}); }
return Prefs;
}); });

View File

@ -1,8 +1,7 @@
'use strict' 'use strict'
/* global __, ngettext */ /* global __, ngettext */
define(["dojo/_base/declare"], function (declare) { define(["dojo/_base/declare"], function (declare) {
Users = {
return declare("fox.PrefUsers", null, {
reload: function(sort) { reload: function(sort) {
const user_search = $("user_search"); const user_search = $("user_search");
const search = user_search ? user_search.value : ""; const search = user_search ? user_search.value : "";
@ -115,7 +114,9 @@ define(["dojo/_base/declare"], function (declare) {
getSelection :function() { getSelection :function() {
return Tables.getSelected("prefUserList"); return Tables.getSelected("prefUserList");
} }
}); }
return Users;
}); });

View File

@ -60,11 +60,6 @@ require(["dojo/_base/kernel",
report_error(message, filename, lineno, colno, error); report_error(message, filename, lineno, colno, error);
}; };
CommonDialogs = fox.CommonDialogs();
Filters = fox.CommonFilters();
Users = fox.PrefUsers();
Prefs = fox.PrefHelpers();
parser.parse(); parser.parse();
this.setLoadingProgress(50); this.setLoadingProgress(50);

View File

@ -8,6 +8,7 @@ let Feeds;
let Headlines; let Headlines;
let Article; let Article;
let ArticleCache; let ArticleCache;
let PluginHost;
require(["dojo/_base/kernel", require(["dojo/_base/kernel",
"dojo/_base/declare", "dojo/_base/declare",
@ -45,8 +46,9 @@ require(["dojo/_base/kernel",
"dijit/tree/dndSource", "dijit/tree/dndSource",
"dijit/tree/ForestStoreModel", "dijit/tree/ForestStoreModel",
"dojo/data/ItemFileWriteStore", "dojo/data/ItemFileWriteStore",
"fox/CommonDialogs", "fox/PluginHost",
"fox/CommonFilters", "fox/CommonFilters",
"fox/CommonDialogs",
"fox/Feeds", "fox/Feeds",
"fox/Headlines", "fox/Headlines",
"fox/Article", "fox/Article",
@ -65,13 +67,6 @@ require(["dojo/_base/kernel",
report_error(message, filename, lineno, colno, error); report_error(message, filename, lineno, colno, error);
}; };
CommonDialogs = fox.CommonDialogs();
Filters = fox.CommonFilters();
Feeds = fox.Feeds();
Headlines = fox.Headlines();
Article = fox.Article();
ArticleCache = fox.ArticleCache();
parser.parse(); parser.parse();
if (!this.genericSanityCheck()) if (!this.genericSanityCheck())

View File

@ -115,7 +115,7 @@
} }
var query = "register.php?action=check&login=" + var query = "register.php?action=check&login=" +
param_escape(login); encodeURIComponent(login);
new Ajax.Request(query, { new Ajax.Request(query, {
onComplete: function(transport) { onComplete: function(transport) {