From d01ad09800b67d2c83e2707188c8e5c58991db1e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Jun 2020 07:44:57 +0300 Subject: eslint-related fixes; move a few things from global context to App --- js/Article.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'js/Article.js') diff --git a/js/Article.js b/js/Article.js index 5044b6e0e..e7946776e 100644 --- a/js/Article.js +++ b/js/Article.js @@ -1,6 +1,6 @@ 'use strict' -/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, escapeHtml */ +/* global __, ngettext, App, Headlines, xhrPost, xhrJson, dojo, dijit, PluginHost, Notify, $$, Ajax */ const Article = { _scroll_reset_timeout: false, @@ -86,6 +86,22 @@ const Article = { } } }, + popupOpenUrl: function(url) { + const w = window.open(""); + + w.opener = null; + w.location = url; + }, + /* popupOpenArticle: function(id) { + const w = window.open("", + "ttrss_article_popup", + "height=900,width=900,resizable=yes,status=no,location=no,menubar=no,directories=no,scrollbars=yes,toolbar=no"); + + if (w) { + w.opener = null; + w.location = "backend.php?op=article&method=view&mode=raw&html=1&zoom=1&id=" + id + "&csrf_token=" + App.getInitParam("csrf_token"); + } + }, */ cdmUnsetActive: function (event) { const row = $("RROW-" + Article.getActive()); @@ -157,14 +173,14 @@ const Article = { comments_msg = hl.num_comments + " " + ngettext("comment", "comments", hl.num_comments) } - comments = `(${comments_msg})`; + comments = `(${comments_msg})`; } return comments; }, formatOriginallyFrom: function(hl) { return hl.orig_feed ? ` - ${__('Originally from:')} ${hl.orig_feed[0]} + ${__('Originally from:')} ${hl.orig_feed[0]} ` : ""; }, unpack: function(row) { @@ -213,8 +229,8 @@ const Article = {
+ title="${App.escapeHtml(hl.title)}" + href="${App.escapeHtml(hl.link)}">${hl.title}
${hl.updated_long}
-- cgit v1.2.3