mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 16:45:55 +00:00
remove xml stuff from backend/dlg
This commit is contained in:
@@ -4,21 +4,15 @@ class Dlg extends Handler_Protected {
|
|||||||
|
|
||||||
function before($method) {
|
function before($method) {
|
||||||
if (parent::before($method)) {
|
if (parent::before($method)) {
|
||||||
header("Content-Type: text/xml; charset=utf-8");
|
header("Content-Type: text/html"); # required for iframe
|
||||||
|
|
||||||
$this->param = db_escape_string($this->link, $_REQUEST["param"]);
|
$this->param = db_escape_string($this->link, $_REQUEST["param"]);
|
||||||
print "<dlg>";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function after() {
|
|
||||||
print "</dlg>";
|
|
||||||
}
|
|
||||||
|
|
||||||
function importOpml() {
|
function importOpml() {
|
||||||
header("Content-Type: text/html"); # required for iframe
|
|
||||||
|
|
||||||
print __("If you have imported labels and/or filters, you might need to reload preferences to see your new data.") . "</p>";
|
print __("If you have imported labels and/or filters, you might need to reload preferences to see your new data.") . "</p>";
|
||||||
|
|
||||||
print "<div class=\"prefFeedOPMLHolder\">";
|
print "<div class=\"prefFeedOPMLHolder\">";
|
||||||
@@ -165,9 +159,6 @@ class Dlg extends Handler_Protected {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function pubOPMLUrl() {
|
function pubOPMLUrl() {
|
||||||
print "<title>".__('Public OPML URL')."</title>";
|
|
||||||
print "<content><![CDATA[";
|
|
||||||
|
|
||||||
$url_path = Opml::opml_publish_url($this->link);
|
$url_path = Opml::opml_publish_url($this->link);
|
||||||
|
|
||||||
print __("Your Public OPML URL is:");
|
print __("Your Public OPML URL is:");
|
||||||
@@ -185,15 +176,11 @@ class Dlg extends Handler_Protected {
|
|||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "]]></content>";
|
|
||||||
|
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function explainError() {
|
function explainError() {
|
||||||
print "<title>".__('Notice')."</title>";
|
|
||||||
print "<content><![CDATA[";
|
|
||||||
|
|
||||||
print "<div class=\"errorExplained\">";
|
print "<div class=\"errorExplained\">";
|
||||||
|
|
||||||
if ($this->param == 1) {
|
if ($this->param == 1) {
|
||||||
@@ -222,7 +209,6 @@ class Dlg extends Handler_Protected {
|
|||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "]]></content>";
|
|
||||||
|
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
@@ -442,9 +428,6 @@ class Dlg extends Handler_Protected {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function printTagCloud() {
|
function printTagCloud() {
|
||||||
print "<title>".__('Tag Cloud')."</title>";
|
|
||||||
print "<content><![CDATA[";
|
|
||||||
|
|
||||||
print "<div class=\"tagCloudContainer\">";
|
print "<div class=\"tagCloudContainer\">";
|
||||||
|
|
||||||
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
|
// from here: http://www.roscripts.com/Create_tag_cloud-71.html
|
||||||
@@ -506,14 +489,10 @@ class Dlg extends Handler_Protected {
|
|||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
print "]]></content>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function printTagSelect() {
|
function printTagSelect() {
|
||||||
|
|
||||||
print "<title>" . __('Select item(s) by tags') . "</title>";
|
|
||||||
print "<content><![CDATA[";
|
|
||||||
|
|
||||||
print __("Match:"). " " .
|
print __("Match:"). " " .
|
||||||
"<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\" type=\"radio\" checked value=\"any\" name=\"tag_mode\" id=\"tag_mode_any\">";
|
"<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\" type=\"radio\" checked value=\"any\" name=\"tag_mode\" id=\"tag_mode_any\">";
|
||||||
print "<label for=\"tag_mode_any\">".__("Any")."</label>";
|
print "<label for=\"tag_mode_any\">".__("Any")."</label>";
|
||||||
@@ -541,14 +520,10 @@ class Dlg extends Handler_Protected {
|
|||||||
__('Close this window') . "</button>";
|
__('Close this window') . "</button>";
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
print "]]></content>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function generatedFeed() {
|
function generatedFeed() {
|
||||||
|
|
||||||
print "<title>".__('View as RSS')."</title>";
|
|
||||||
print "<content><![CDATA[";
|
|
||||||
|
|
||||||
$this->params = explode(":", $this->param, 3);
|
$this->params = explode(":", $this->param, 3);
|
||||||
$feed_id = db_escape_string($this->link, $this->params[0]);
|
$feed_id = db_escape_string($this->link, $this->params[0]);
|
||||||
$is_cat = (bool) $this->params[1];
|
$is_cat = (bool) $this->params[1];
|
||||||
@@ -572,7 +547,6 @@ class Dlg extends Handler_Protected {
|
|||||||
__('Close this window')."</button>";
|
__('Close this window')."</button>";
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
print "]]></content>";
|
|
||||||
|
|
||||||
//return;
|
//return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class Feeds extends Handler_Protected {
|
|||||||
$reply .= "
|
$reply .= "
|
||||||
<a href=\"#\"
|
<a href=\"#\"
|
||||||
title=\"".__("View as RSS feed")."\"
|
title=\"".__("View as RSS feed")."\"
|
||||||
onclick=\"displayDlg('generatedFeed', '$feed_id:$is_cat:$rss_link')\">
|
onclick=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">
|
||||||
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.svg\"></a>";
|
<img class=\"noborder\" style=\"vertical-align : middle\" src=\"images/pub_set.svg\"></a>";
|
||||||
|
|
||||||
$reply .= "</span>";
|
$reply .= "</span>";
|
||||||
@@ -135,7 +135,7 @@ class Feeds extends Handler_Protected {
|
|||||||
|
|
||||||
//$reply .= "<option value=\"catchupPage()\">".__('Mark as read')."</option>";
|
//$reply .= "<option value=\"catchupPage()\">".__('Mark as read')."</option>";
|
||||||
|
|
||||||
$reply .= "<option value=\"displayDlg('generatedFeed', '$feed_id:$is_cat:$rss_link')\">".__('View as RSS')."</option>";
|
$reply .= "<option value=\"displayDlg('".__("View as RSS")."','generatedFeed', '$feed_id:$is_cat:$rss_link')\">".__('View as RSS')."</option>";
|
||||||
|
|
||||||
$reply .= "</select>";
|
$reply .= "</select>";
|
||||||
|
|
||||||
|
|||||||
@@ -1399,7 +1399,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||||||
|
|
||||||
print __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "</p>";
|
print __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "</p>";
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('pubOPMLUrl')\">".
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('".__("Public OPML URL")."','pubOPMLUrl')\">".
|
||||||
__('Display published OPML URL')."</button> ";
|
__('Display published OPML URL')."</button> ";
|
||||||
|
|
||||||
global $pluginhost;
|
global $pluginhost;
|
||||||
@@ -1436,7 +1436,7 @@ class Pref_Feeds extends Handler_Protected {
|
|||||||
$rss_url = '-2::' . htmlspecialchars(get_self_url_prefix() .
|
$rss_url = '-2::' . htmlspecialchars(get_self_url_prefix() .
|
||||||
"/public.php?op=rss&id=-2&view-mode=all_articles");;
|
"/public.php?op=rss&id=-2&view-mode=all_articles");;
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('generatedFeed', '$rss_url')\">".
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"return displayDlg('".__("View as RSS")."','generatedFeed', '$rss_url')\">".
|
||||||
__('Display URL')."</button> ";
|
__('Display URL')."</button> ";
|
||||||
|
|
||||||
print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearFeedAccessKeys()\">".
|
print "<button dojoType=\"dijit.form.Button\" onclick=\"return clearFeedAccessKeys()\">".
|
||||||
|
|||||||
@@ -415,7 +415,7 @@ function closeInfoBox(cleanup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function displayDlg(id, param, callback) {
|
function displayDlg(title, id, param, callback) {
|
||||||
|
|
||||||
notify_progress("Loading, please wait...", true);
|
notify_progress("Loading, please wait...", true);
|
||||||
|
|
||||||
@@ -425,14 +425,14 @@ function displayDlg(id, param, callback) {
|
|||||||
new Ajax.Request("backend.php", {
|
new Ajax.Request("backend.php", {
|
||||||
parameters: query,
|
parameters: query,
|
||||||
onComplete: function (transport) {
|
onComplete: function (transport) {
|
||||||
infobox_callback2(transport);
|
infobox_callback2(transport, title);
|
||||||
if (callback) callback(transport);
|
if (callback) callback(transport);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function infobox_callback2(transport) {
|
function infobox_callback2(transport, title) {
|
||||||
try {
|
try {
|
||||||
var dialog = false;
|
var dialog = false;
|
||||||
|
|
||||||
@@ -443,13 +443,7 @@ function infobox_callback2(transport) {
|
|||||||
//console.log("infobox_callback2");
|
//console.log("infobox_callback2");
|
||||||
notify('');
|
notify('');
|
||||||
|
|
||||||
var title = transport.responseXML.getElementsByTagName("title")[0];
|
var content = transport.responseText;
|
||||||
if (title)
|
|
||||||
title = title.firstChild.nodeValue;
|
|
||||||
|
|
||||||
var content = transport.responseXML.getElementsByTagName("content")[0];
|
|
||||||
|
|
||||||
content = content.firstChild.nodeValue;
|
|
||||||
|
|
||||||
if (!dialog) {
|
if (!dialog) {
|
||||||
dialog = new dijit.Dialog({
|
dialog = new dijit.Dialog({
|
||||||
@@ -639,7 +633,7 @@ function filterDlgCheckDate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function explainError(code) {
|
function explainError(code) {
|
||||||
return displayDlg("explainError", code);
|
return displayDlg(__("Error explained"), "explainError", code);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loading_set_progress(p) {
|
function loading_set_progress(p) {
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ function init() {
|
|||||||
viewfeed(-2);
|
viewfeed(-2);
|
||||||
};
|
};
|
||||||
hotkey_actions["goto_tagcloud"] = function() {
|
hotkey_actions["goto_tagcloud"] = function() {
|
||||||
displayDlg("printTagCloud");
|
displayDlg(__("Tag cloud"), "printTagCloud");
|
||||||
};
|
};
|
||||||
hotkey_actions["goto_prefs"] = function() {
|
hotkey_actions["goto_prefs"] = function() {
|
||||||
gotoPreferences();
|
gotoPreferences();
|
||||||
@@ -581,10 +581,10 @@ function quickMenuGo(opid) {
|
|||||||
gotoLogout();
|
gotoLogout();
|
||||||
break;
|
break;
|
||||||
case "qmcTagCloud":
|
case "qmcTagCloud":
|
||||||
displayDlg("printTagCloud");
|
displayDlg(__("Tag cloud"), "printTagCloud");
|
||||||
break;
|
break;
|
||||||
case "qmcTagSelect":
|
case "qmcTagSelect":
|
||||||
displayDlg("printTagSelect");
|
displayDlg(__("Select item(s) by tags"), "printTagSelect");
|
||||||
break;
|
break;
|
||||||
case "qmcSearch":
|
case "qmcSearch":
|
||||||
search();
|
search();
|
||||||
|
|||||||
Reference in New Issue
Block a user