summaryrefslogtreecommitdiff
path: root/js/PrefHelpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/PrefHelpers.js')
-rw-r--r--js/PrefHelpers.js75
1 files changed, 8 insertions, 67 deletions
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index 3f738aa95..361b653b6 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -368,15 +368,16 @@ const Helpers = {
// only user-enabled actually counts in the checkbox when saving because system plugin checkboxes are disabled (see below)
container.innerHTML += `
- <li data-row-value="${App.escapeHtml(plugin.name)}" data-plugin-local="${plugin.is_local}" data-plugin-name="${App.escapeHtml(plugin.name)}" title="${plugin.is_system ? __("System plugins are enabled using global configuration.") : ""}">
+ <li data-row-value="${App.escapeHtml(plugin.name)}" data-plugin-local="${plugin.is_local}"
+ data-plugin-name="${App.escapeHtml(plugin.name)}" title="${plugin.is_system ? __("System plugins are enabled using global configuration.") : ""}">
<label class="checkbox ${plugin.is_system ? "system text-info" : ""}">
${App.FormFields.checkbox_tag("plugins[]", plugin.user_enabled || plugin.system_enabled, plugin.name,
{disabled: plugin.is_system})}</div>
<span class='name'>${plugin.name}:</span>
+ <span class="description ${plugin.is_system ? "text-info" : ""}">
+ ${plugin.description}
+ </span>
</label>
- <div class="description ${plugin.is_system ? "text-info" : ""}">
- ${plugin.description}
- </div>
<div class='actions'>
${plugin.is_system ?
App.FormFields.button_tag(App.FormFields.icon("security"), "",
@@ -510,12 +511,10 @@ const Helpers = {
search: function() {
this.search_query = this.attr('value').search.toLowerCase();
- if ('requestIdleCallback' in window)
- window.requestIdleCallback(() => {
- this.render_contents();
- });
- else
+ window.requestIdleCallback(() => {
this.render_contents();
+ });
+
},
render_contents: function() {
const container = dialog.domNode.querySelector(".contents");
@@ -809,63 +808,5 @@ const Helpers = {
console.log("export");
window.open("backend.php?op=opml&method=export&" + dojo.formToQuery("opmlExportForm"));
},
- publish: function() {
- Notify.progress("Loading, please wait...", true);
-
- xhr.json("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => {
- try {
- const dialog = new fox.SingleUseDialog({
- title: __("Public OPML URL"),
- regenOPMLKey: function() {
- if (confirm(__("Replace current OPML publishing address with a new one?"))) {
- Notify.progress("Trying to change address...", true);
-
- xhr.json("backend.php", {op: "pref-feeds", method: "regenOPMLKey"}, (reply) => {
- if (reply) {
- const new_link = reply.link;
- const target = this.domNode.querySelector('.generated_url');
-
- if (new_link && target) {
- target.href = new_link;
- target.innerHTML = new_link;
-
- Notify.close();
-
- } else {
- Notify.error("Could not change feed URL.");
- }
- }
- });
- }
- return false;
- },
- content: `
- <header>${__("Your Public OPML URL is:")}</header>
- <section>
- <div class='panel text-center'>
- <a class='generated_url' href="${App.escapeHtml(reply.link)}" target='_blank'>${App.escapeHtml(reply.link)}</a>
- </div>
- </section>
- <footer class='text-center'>
- <button dojoType='dijit.form.Button' onclick="return App.dialogOf(this).regenOPMLKey()">
- ${App.FormFields.icon("refresh")}
- ${__('Generate new URL')}
- </button>
- <button dojoType='dijit.form.Button' type='submit' class='alt-primary'>
- ${__('Close this window')}
- </button>
- </footer>
- `
- });
-
- dialog.show();
-
- Notify.close();
-
- } catch (e) {
- App.Error.report(e);
- }
- });
- },
}
};