prefs: Prefs global -> Helpers
This commit is contained in:
parent
b3bc638a9f
commit
4d4034091a
|
@ -49,7 +49,7 @@ class Dlg extends Handler_Protected {
|
|||
|
||||
print "<div align='center'>";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return Prefs.OPML.changeKey()\">".
|
||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return Helpers.OPML.changeKey()\">".
|
||||
__('Generate new URL')."</button> ";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return CommonDialogs.closeInfoBox()\">".
|
||||
|
|
|
@ -1274,7 +1274,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
__("Only main settings profile can be migrated using OPML."));
|
||||
|
||||
print "<iframe id=\"upload_iframe\"
|
||||
name=\"upload_iframe\" onload=\"Prefs.OPML.onImportComplete(this)\"
|
||||
name=\"upload_iframe\" onload=\"Helpers.OPML.onImportComplete(this)\"
|
||||
style=\"width: 400px; height: 100px; display: none;\"></iframe>";
|
||||
|
||||
print "<form name=\"opml_form\" style='display : block' target=\"upload_iframe\"
|
||||
|
@ -1285,7 +1285,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
</label>
|
||||
<input type=\"hidden\" name=\"op\" value=\"dlg\">
|
||||
<input type=\"hidden\" name=\"method\" value=\"importOpml\">
|
||||
<button dojoType=\"dijit.form.Button\" onclick=\"return Prefs.OPML.import();\" type=\"submit\">" .
|
||||
<button dojoType=\"dijit.form.Button\" onclick=\"return Helpers.OPML.import();\" type=\"submit\">" .
|
||||
__('Import OPML') . "</button>";
|
||||
|
||||
print "</form>";
|
||||
|
@ -1295,7 +1295,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
print "<form dojoType=\"dijit.form.Form\" id=\"opmlExportForm\">";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"Prefs.OPML.export()\" >" .
|
||||
onclick=\"Helpers.OPML.export()\" >" .
|
||||
__('Export OPML') . "</button>";
|
||||
|
||||
print "<label>";
|
||||
|
@ -1331,7 +1331,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return App.displayDlg('".__("Show as feed")."','generatedFeed', '$rss_url')\">".
|
||||
__('Display URL')."</button> ";
|
||||
|
||||
print "<button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"return Prefs.clearFeedAccessKeys()\">".
|
||||
print "<button class=\"btn-danger\" dojoType=\"dijit.form.Button\" onclick=\"return Helpers.clearFeedAccessKeys()\">".
|
||||
__('Clear all generated URLs')."</button> ";
|
||||
|
||||
print "</p>";
|
||||
|
|
|
@ -542,7 +542,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
} else if ($pref_name == "USER_STYLESHEET") {
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"Prefs.customizeCSS()\">" . __('Customize') . "</button>";
|
||||
onclick=\"Helpers.customizeCSS()\">" . __('Customize') . "</button>";
|
||||
|
||||
} else if ($pref_name == "USER_CSS_THEME") {
|
||||
|
||||
|
@ -659,10 +659,10 @@ class Pref_Prefs extends Handler_Protected {
|
|||
</div>
|
||||
</div>";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return Prefs.editProfiles()\">".
|
||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return Helpers.editProfiles()\">".
|
||||
__('Manage profiles')."</button> ";
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\" class=\"btn-danger\" onclick=\"return Prefs.confirmReset()\">".
|
||||
print "<button dojoType=\"dijit.form.Button\" class=\"btn-danger\" onclick=\"return Helpers.confirmReset()\">".
|
||||
__('Reset to defaults')."</button>";
|
||||
|
||||
print " ";
|
||||
|
@ -756,7 +756,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
if (count($tmppluginhost->get_all($plugin)) > 0) {
|
||||
if (in_array($name, $system_enabled)) {
|
||||
print "<td><a href='#' onclick=\"Prefs.clearPluginData('$name')\"
|
||||
print "<td><a href='#' onclick=\"Helpers.clearPluginData('$name')\"
|
||||
class='visibleLink'>".__("Clear data")."</a></td>";
|
||||
}
|
||||
}
|
||||
|
@ -816,7 +816,7 @@ class Pref_Prefs extends Handler_Protected {
|
|||
|
||||
if (count($tmppluginhost->get_all($plugin)) > 0) {
|
||||
if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) {
|
||||
print "<td><a href='#' onclick=\"Prefs.clearPluginData('$name')\" class='visibleLink'>".__("Clear data")."</a></td>";
|
||||
print "<td><a href='#' onclick=\"Helpers.clearPluginData('$name')\" class='visibleLink'>".__("Clear data")."</a></td>";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ class Pref_System extends Handler_Protected {
|
|||
LIMIT 100");
|
||||
|
||||
print "<button dojoType=\"dijit.form.Button\"
|
||||
onclick=\"Prefs.updateEventLog()\">".__('Refresh')."</button> ";
|
||||
onclick=\"Helpers.updateEventLog()\">".__('Refresh')."</button> ";
|
||||
|
||||
print " <button dojoType=\"dijit.form.Button\"
|
||||
class=\"btn-danger\" onclick=\"Prefs.clearEventLog()\">".__('Clear')."</button> ";
|
||||
class=\"btn-danger\" onclick=\"Helpers.clearEventLog()\">".__('Clear')."</button> ";
|
||||
|
||||
print "<p><table width=\"100%\" cellspacing=\"10\" class=\"prefErrorLog\">";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
define(["dojo/_base/declare"], function (declare) {
|
||||
Prefs = {
|
||||
Helpers = {
|
||||
clearFeedAccessKeys: function() {
|
||||
if (confirm(__("This will invalidate all previously generated feed URLs. Continue?"))) {
|
||||
Notify.progress("Clearing URLs...");
|
||||
|
@ -56,7 +56,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
|
||||
xhrPost("backend.php", query, () => {
|
||||
Notify.close();
|
||||
Prefs.editProfiles();
|
||||
Helpers.editProfiles();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
|
||||
xhrPost("backend.php", query, () => {
|
||||
Notify.close();
|
||||
Prefs.editProfiles();
|
||||
Helpers.editProfiles();
|
||||
});
|
||||
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
confirmReset: function() {
|
||||
if (confirm(__("Reset to defaults?"))) {
|
||||
xhrPost("backend.php", {op: "pref-prefs", method: "resetconfig"}, (transport) => {
|
||||
Prefs.refresh();
|
||||
Helpers.refresh();
|
||||
Notify.info(transport.responseText);
|
||||
});
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
Notify.progress("Loading, please wait...");
|
||||
|
||||
xhrPost("backend.php", {op: "pref-prefs", method: "clearplugindata", name: name}, () => {
|
||||
Prefs.refresh();
|
||||
Helpers.refresh();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -150,7 +150,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
}
|
||||
};
|
||||
|
||||
Prefs.OPML = {
|
||||
Helpers.OPML = {
|
||||
import: function() {
|
||||
const opml_file = $("opml_file");
|
||||
|
||||
|
@ -225,8 +225,7 @@ define(["dojo/_base/declare"], function (declare) {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
return Prefs;
|
||||
return Helpers;
|
||||
});
|
||||
|
|
|
@ -5,7 +5,7 @@ let App;
|
|||
let CommonDialogs;
|
||||
let Filters;
|
||||
let Users;
|
||||
let Prefs;
|
||||
let Helpers;
|
||||
|
||||
const Plugins = {};
|
||||
|
||||
|
|
Loading…
Reference in New Issue