summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-05-14 06:41:04 +0100
committerAndrew Dolgov <[email protected]>2007-05-14 06:41:04 +0100
commit442d77f1ccd670c0fde1db0038d3388e64f885e6 (patch)
treeda60127dad7caff8b6a2f8791e30ce060d5ff875
parent144f32d94100151ed1c0d4e22422a04d8e6068bc (diff)
help uses popup window, recolor infoBox, use subscribe dialog in prefs
-rw-r--r--functions.js16
-rw-r--r--modules/help.php14
-rw-r--r--modules/popup-dialog.php3
-rw-r--r--modules/pref-feeds.php13
-rw-r--r--prefs.js42
-rw-r--r--tt-rss.css39
-rw-r--r--tt-rss.js11
-rw-r--r--utility.css15
8 files changed, 119 insertions, 34 deletions
diff --git a/functions.js b/functions.js
index 1f031f149..21a0da799 100644
--- a/functions.js
+++ b/functions.js
@@ -1389,6 +1389,22 @@ function infobox_callback() {
}
}
+function helpbox_callback() {
+ if (xmlhttp.readyState == 4) {
+ var box = document.getElementById('helpBox');
+ var shadow = document.getElementById('helpBoxShadow');
+ if (box) {
+ box.innerHTML=xmlhttp.responseText;
+ if (shadow) {
+ shadow.style.display = "block";
+ } else {
+ box.style.display = "block";
+ }
+ }
+ notify("");
+ }
+}
+
function addFilter() {
if (!xmlhttp_ready(xmlhttp)) {
diff --git a/modules/help.php b/modules/help.php
index 751d6082e..3f6968db7 100644
--- a/modules/help.php
+++ b/modules/help.php
@@ -4,30 +4,22 @@
if (!$_GET["noheaders"]) {
print "<html><head>
<title>Tiny Tiny RSS : Help</title>
- <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\">
- <script type=\"text/javascript\" src=\"prototype.js\"></script>
- <script type=\"text/javascript\" src=\"functions.js?$script_dt_add\"></script>
+ <link rel=\"stylesheet\" href=\"utility.css\" type=\"text/css\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
</head><body>";
}
$tid = sprintf("%d", $_GET["tid"]);
- print "<div id=\"infoBoxTitle\">".__('Help')."</div>";
-
- print "<div class='infoBoxContents'>";
-
if (file_exists("help/$tid.php")) {
include("help/$tid.php");
} else {
print "<p>".__("Help topic not found.")."</p>";
}
-
- print "</div>";
-
print "<div align='center'>
<input type='submit' class='button'
- onclick=\"closeInfoBox()\" value=\"".__('Close this window')."\"></div>";
+ onclick=\"javascript:window.close()\"
+ value=\"".__('Close this window')."\"></div>";
if (!$_GET["noheaders"]) {
print "</body></html>";
diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php
index 7eab1bae7..56ba9f19c 100644
--- a/modules/popup-dialog.php
+++ b/modules/popup-dialog.php
@@ -47,8 +47,9 @@
print "<form id='feed_add_form' onsubmit='return false'>";
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
- print "<input type=\"hidden\" name=\"quiet\" value=\"1\">";
+ print "<input type=\"hidden\" name=\"quiet\" value=\"0\">";
print "<input type=\"hidden\" name=\"subop\" value=\"add\">";
+ print "<input type=\"hidden\" name=\"from\" value=\"tt-rss\">";
print "<table width='100%'>
<tr><td>Feed URL:</td><td>
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index 78a2cff27..dbd610714 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -479,6 +479,7 @@
print "</div></body></html>";
return;
}
+
}
}
@@ -589,8 +590,6 @@
}
}
- set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
-
print "<div class=\"prefGenericAddBox\">
<input id=\"fadd_cat\"
onkeypress=\"return filterCR(event, addFeedCat)\"
@@ -732,6 +731,8 @@
if ($quiet) return;
+ set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
+
$result = db_query($link, "SELECT COUNT(id) AS num_errors
FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]);
@@ -758,13 +759,17 @@
onclick=\"javascript:updateFeedList()\" value=\"".__('Search')."\">
</div>";
- print "<input id=\"fadd_link\"
+/* print "<input id=\"fadd_link\"
onkeyup=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
onchange=\"toggleSubmitNotEmpty(this, 'fadd_submit_btn')\"
size=\"40\">
<input type=\"submit\" class=\"button\"
disabled=\"true\" id=\"fadd_submit_btn\"
- onclick=\"addFeed()\" value=\"".__('Subscribe')."\">";
+ onclick=\"addFeed()\" value=\"".__('Subscribe')."\">"; */
+
+ print "<input onclick=\"javascript:displayDlg('quickAddFeed')\"
+ type=\"submit\" id=\"fadd_subscribe_btn\"
+ class=\"button\" value=\"".__('Subscribe to feed')."\">";
if (ENABLE_FEED_BROWSER && !SINGLE_USER_MODE) {
print " <input type=\"submit\" class=\"button\"
diff --git a/prefs.js b/prefs.js
index d9eb9024d..6901b08cf 100644
--- a/prefs.js
+++ b/prefs.js
@@ -54,6 +54,35 @@ function feedlist_callback() {
}
}
+/* stub for subscription dialog */
+
+function dlg_frefresh_callback() {
+ if (xmlhttp.readyState == 4) {
+ // setTimeout("updateFeedList()", 500);
+
+ try {
+ var container = document.getElementById('prefContent');
+ container.innerHTML=xmlhttp.responseText;
+ selectTab("feedConfig", true);
+
+ if (caller_subop) {
+ var tuple = caller_subop.split(":");
+ if (tuple[0] == 'editFeed') {
+ window.setTimeout('editFeed('+tuple[1]+')', 100);
+ }
+
+ caller_subop = false;
+ }
+ if (typeof correctPNG != 'undefined') {
+ correctPNG();
+ }
+ notify("");
+ } catch (e) {
+ exception_error("feedlist_callback", e);
+ }
+ }
+}
+
function filterlist_callback() {
var container = document.getElementById('prefContent');
if (xmlhttp.readyState == 4) {
@@ -705,7 +734,7 @@ function labelTest() {
function displayHelpInfobox(topic_id) {
- if (!xmlhttp_ready(xmlhttp)) {
+/* if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
return
}
@@ -713,10 +742,15 @@ function displayHelpInfobox(topic_id) {
notify_progress("Loading help...");
xmlhttp.open("GET", "backend.php?op=help&tid=" +
- param_escape(topic_id) + "&noheaders=1", true);
+ param_escape(topic_id), true);
- xmlhttp.onreadystatechange=infobox_callback;
- xmlhttp.send(null);
+ xmlhttp.onreadystatechange=helpbox_callback;
+ xmlhttp.send(null); */
+
+ var url = "backend.php?op=help&tid=" + param_escape(topic_id);
+
+ var w = window.open(url, "ttrss_help",
+ "status=0,toolbar=0,location=0,width=400,height=450,menubar=0");
}
diff --git a/tt-rss.css b/tt-rss.css
index 57627aa58..87e3fb2bf 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -462,13 +462,33 @@ div.helpResponse {
#infoBoxTitle {
border-width : 1px 1px 1px 1px;
border-style : solid;
+ border-color : #99d67a;
+ background-color : #99d67a;
+ padding : 2px;
+ color : white;
+}
+
+#infoBox {
+ border-width : 1px 1px 1px 1px;
+ border-style : solid;
+ border-color : #99d67a;
+ position : relative;
+ bottom : 2px;
+ right : 2px;
+ padding-bottom : 5px;
+ background-color : #f8fcf5;
+}
+
+/*
+#infoBoxTitle {
+ border-width : 1px 1px 1px 1px;
+ border-style : solid;
border-color : #88b0f0;
background-color : #88b0f0;
padding : 2px;
color : white;
}
-
#infoBox {
border-width : 1px 1px 1px 1px;
border-style : solid;
@@ -477,11 +497,8 @@ div.helpResponse {
bottom : 2px;
right : 2px;
padding-bottom : 5px;
- background-image : url("images/prefs-content.png");
- background-position : top left;
- background-repeat : repeat-x;
- background-color : white;
-}
+ background-color : #f7faff;
+} */
#infoBoxShadow {
background-image : url("images/shadow.png");
@@ -491,7 +508,7 @@ div.helpResponse {
z-index : 3;
position : absolute;
display : none;
-}
+}
div.infoBoxContents {
padding : 10px;
@@ -914,7 +931,7 @@ ul.userFeedList {
height : 300px;
overflow : auto;
list-style-type : none;
- border : 1px solid #88b0f0;
+ border : 1px solid #99d67a;
background-color : white;
margin : 0px 0px 5px 0px;
padding : 0px;
@@ -932,7 +949,7 @@ ul.labelTestResults {
list-style-type : none;
margin : 0px 0px 5px 0px;
padding : 0px;
- border : 1px solid #88b0f0;
+ border : 1px solid #99d67a;
background-color : white;
}
@@ -942,7 +959,7 @@ ul.filterTestResults {
list-style-type : none;
margin : 0px 0px 5px 0px;
padding : 0px;
- border : 1px solid #88b0f0;
+ border : 1px solid #99d67a;
background-color : white;
}
@@ -952,7 +969,7 @@ ul.browseFeedList {
list-style-type : none;
margin : 0px 0px 5px 0px;
padding : 0px;
- border : 1px solid #88b0f0;
+ border : 1px solid #99d67a;
background-color : white;
}
diff --git a/tt-rss.js b/tt-rss.js
index 6660a5d90..b46c859ac 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -476,8 +476,13 @@ function quickMenuGo(opid) {
if (opid == "qmcRemoveFeed") {
var actid = getActiveFeedId();
-
- if (!actid || activeFeedIsCat()) {
+
+ if (activeFeedIsCat()) {
+ alert("You can't unsubscribe from the category.");
+ return;
+ }
+
+ if (!actid) {
alert("Please select some feed first.");
return;
}
@@ -640,7 +645,7 @@ function editFeedDlg(feed) {
return;
}
- if (feed <= 0 || active_feed_is_cat || tagsAreDisplayed()) {
+ if (feed <= 0 || activeFeedIsCat() || tagsAreDisplayed()) {
alert("You can't edit this kind of feed.");
return;
}
diff --git a/utility.css b/utility.css
index 8a254afc1..54e5b0552 100644
--- a/utility.css
+++ b/utility.css
@@ -61,3 +61,18 @@ div.error {
width : 50%;
}
+h1 {
+ color : #88b0f0;
+ font-size : 16pt;
+ border-width : 0px 0px 1px 0px;
+ border-color : black;
+ border-style : solid;
+}
+
+h2 {
+ color : #88b0f0;
+ font-size : 14pt;
+ border-width : 0px 0px 1px 0px;
+ border-color : black;
+ border-style : solid;
+}