]> git.wh0rd.org - tt-rss.git/blobdiff - js/prefs.js
login: check for stale session in login handler, instead of authenticate_user()
[tt-rss.git] / js / prefs.js
index 0512e0e34e76d69adbfde254c426c70447d46db2..c2190280c431615c94aea89f80c31b2775adf235 100755 (executable)
@@ -9,7 +9,7 @@ function notify_callback2(transport, sticky) {
        notify_info(transport.responseText, sticky);
 }
 
-function updateFeedList(sort_key) {
+function updateFeedList() {
 
        var user_search = $("feed_search");
        var search = "";
@@ -83,7 +83,7 @@ function addUser() {
 
 }
 
-function editUser(id, event) {
+function editUser(id) {
 
        var query = "backend.php?op=pref-users&method=edit&id=" +
                param_escape(id);
@@ -91,7 +91,7 @@ function editUser(id, event) {
        if (dijit.byId("userEditDlg"))
                dijit.byId("userEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "userEditDlg",
                title: __("User Editor"),
                style: "width: 600px",
@@ -126,7 +126,7 @@ function editFilter(id) {
        if (dijit.byId("filterEditDlg"))
                dijit.byId("filterEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "filterEditDlg",
                title: __("Edit Filter"),
                style: "width: 600px",
@@ -474,7 +474,7 @@ function selectedUserDetails() {
        if (dijit.byId("userDetailsDlg"))
                dijit.byId("userDetailsDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "userDetailsDlg",
                title: __("User details"),
                style: "width: 600px",
@@ -676,7 +676,7 @@ function opmlImportComplete(iframe) {
 
        var content = iframe.contentDocument.body.innerHTML;
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "opmlImportDlg",
                title: __("OPML Import"),
                style: "width: 600px",
@@ -749,7 +749,7 @@ function updateSystemList() {
                } });
 }
 
-function selectTab(id, noupdate, method) {
+function selectTab(id, noupdate) {
        if (!noupdate) {
                notify_progress("Loading, please wait...");
 
@@ -832,6 +832,10 @@ function init() {
                "dijit/Tree",
                "dijit/tree/dndSource",
                "dojo/data/ItemFileWriteStore",
+               "lib/CheckBoxStoreModel",
+               "lib/CheckBoxTree",
+               "fox/PrefFeedStore",
+               "fox/PrefFilterStore",
                "fox/PrefFeedTree",
                "fox/PrefFilterTree",
                "fox/PrefLabelTree"], function (dojo, ready, parser) {
@@ -866,7 +870,7 @@ function validatePrefsReset() {
 
        if (ok) {
 
-               query = "?op=pref-prefs&method=resetconfig";
+               var query = "?op=pref-prefs&method=resetconfig";
                console.log(query);
 
                new Ajax.Request("backend.php", {
@@ -939,7 +943,7 @@ function pref_hotkey_handler(e) {
        var hotkey_action = false;
        var hotkeys = getInitParam("hotkeys");
 
-       for (sequence in hotkeys[1]) {
+       for (var sequence in hotkeys[1]) {
                if (sequence == hotkey) {
                        hotkey_action = hotkeys[1][sequence];
                        break;
@@ -1038,7 +1042,7 @@ function showInactiveFeeds() {
        if (dijit.byId("inactiveFeedsDlg"))
                dijit.byId("inactiveFeedsDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "inactiveFeedsDlg",
                title: __("Feeds without recent updates"),
                style: "width: 600px",
@@ -1152,7 +1156,7 @@ function editProfiles() {
 
        var query = "backend.php?op=pref-prefs&method=editPrefProfiles";
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "profileEditDlg",
                title: __("Settings Profiles"),
                style: "width: 600px",
@@ -1319,7 +1323,7 @@ function resetCatOrder() {
        });
 }
 
-function editCat(id, item, event) {
+function editCat(id, item) {
        var new_name = prompt(__('Rename category to:'), item.name);
 
        if (new_name && new_name != item.name) {
@@ -1340,14 +1344,14 @@ function editCat(id, item, event) {
        }
 }
 
-function editLabel(id, event) {
+function editLabel(id) {
        var query = "backend.php?op=pref-labels&method=edit&id=" +
                param_escape(id);
 
        if (dijit.byId("labelEditDlg"))
                dijit.byId("labelEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "labelEditDlg",
                title: __("Label Editor"),
                style: "width: 600px",
@@ -1415,7 +1419,7 @@ function customizeCSS() {
        if (dijit.byId("cssEditDlg"))
                dijit.byId("cssEditDlg").destroyRecursive();
 
-       dialog = new dijit.Dialog({
+       var dialog = new dijit.Dialog({
                id: "cssEditDlg",
                title: __("Customize stylesheet"),
                style: "width: 600px",
@@ -1441,7 +1445,7 @@ function insertSSLserial(value) {
 }
 
 function gotoExportOpml(filename, settings) {
-       tmp = settings ? 1 : 0;
+       var tmp = settings ? 1 : 0;
        document.location.href = "backend.php?op=opml&method=export&filename=" + filename + "&settings=" + tmp;
 }