diff --git a/backend.php b/backend.php
index c64ceaa97..410f89864 100644
--- a/backend.php
+++ b/backend.php
@@ -526,6 +526,10 @@
$print_exec_time = false;
break; // digestSend
+ case "loading":
+ print __("Loading, please wait...") . " " .
+ "
";
+
case "getProfiles":
$login = db_escape_string($_REQUEST["login"]);
$password = db_escape_string($_REQUEST["password"]);
@@ -553,6 +557,7 @@
} // Select action according to $op value.
+
// We close the connection to database.
db_close($link);
?>
diff --git a/digest.css b/digest.css
index 2ed6aae93..a31680325 100644
--- a/digest.css
+++ b/digest.css
@@ -1,7 +1,7 @@
-body {
+body#ttrssDigest {
background : #f0f0f0;
color : black;
- font-family : sans-serif;
+ font-family : "Lucida Grande", Arial, sans-serif;
font-size : 12px;
}
@@ -298,3 +298,13 @@ a:hover {
#overlay img {
vertical-align : middle;
}
+
+div.fatalError button {
+ margin-top : 5px;
+}
+
+div.fatalError textarea {
+ width : 100%;
+ height : 100px;
+}
+
diff --git a/digest.js b/digest.js
index d282f4ee2..520c3d619 100644
--- a/digest.js
+++ b/digest.js
@@ -429,6 +429,7 @@ function add_headline_entry(article, feed, no_effects) {
"
" +
"
" +
"
" +
@@ -622,6 +623,7 @@ function init_second_stage() {
function init() {
try {
+ dojo.require("dijit.Dialog");
new Ajax.Request("backend.php", {
parameters: "?op=rpc&subop=sanityCheck",
@@ -793,3 +795,33 @@ function update_title(unread) {
}
}
+function tweet_article(id) {
+ try {
+
+ var query = "?op=rpc&subop=getTweetInfo&id=" + param_escape(id);
+
+ console.log(query);
+
+ var d = new Date();
+ var ts = d.getTime();
+
+ var w = window.open('backend.php?op=loading', 'ttrss_tweet',
+ "status=0,toolbar=0,location=0,width=500,height=400,scrollbars=1,menubar=0");
+
+ new Ajax.Request("backend.php", {
+ parameters: query,
+ onComplete: function(transport) {
+ var ti = JSON.parse(transport.responseText);
+
+ var share_url = "http://twitter.com/share?_=" + ts +
+ "&text=" + param_escape(ti.title) +
+ "&url=" + param_escape(ti.link);
+
+ w.location.href = share_url;
+
+ } });
+
+ } catch (e) {
+ exception_error("tweet_article", e);
+ }
+}
diff --git a/digest.php b/digest.php
index 184e2b362..913cd10ae 100644
--- a/digest.php
+++ b/digest.php
@@ -23,8 +23,9 @@