From 4a1d122c8758c61955ca8344d6c1017ef80bc62e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 8 Oct 2014 16:38:03 +0400 Subject: edit feed: smaller buttons for icon upload; allow uploading larger favicons --- css/dijit.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'css') diff --git a/css/dijit.css b/css/dijit.css index bd51929a7..eb4f767db 100644 --- a/css/dijit.css +++ b/css/dijit.css @@ -346,6 +346,10 @@ button[disabled], line-height : 20px; } +.claro .dijitButton.small .dijitButtonText { + font-size : 11px; +} + .claro .dijitMenu { border-color : #ccc; } -- cgit v1.2.3-54-g00ecf From d9c93ebfdb860878609c6a59ef4df99f8f93643f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 2 Nov 2014 20:58:46 +0300 Subject: tweak notifications; use css animations for notifications --- css/tt-rss.css | 30 +++++++++++++++++++++--------- index.php | 2 +- js/functions.js | 28 +++++++++++----------------- prefs.php | 2 +- 4 files changed, 34 insertions(+), 28 deletions(-) (limited to 'css') diff --git a/css/tt-rss.css b/css/tt-rss.css index d732c13ba..d5737989a 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -138,18 +138,30 @@ a:hover { position : absolute; } +#notify.visible { + transform: translate(0, -35px); + -webkit-transform: translate(0, -35px); + -o-transform: translate(0, -35px); + -moz-transform: translate(0, -35px); + + transition: all 0.5s ease-in-out; + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; +} + #notify { - bottom : 10px; - right : 20px; - border-width : 1px; + bottom : -35px; + right : 0px; + height : 20px; + left : 0px; + border-width : 1px 0px 0px 0px; border-style : solid; position : absolute; font-size : 12px; z-index : 99; - max-width : 200px; - min-width : 100px; padding : 5px; - -width : 200px; + box-shadow : 0px -2px 2px rgba(0,0,0,0.1); } #notify img { @@ -176,17 +188,17 @@ a:hover { background-color : #fff7d5; } -.notify.progress { +.notify.notify_progress { border-color : #d7c47a; background-color : #fff7d5; } -.notify.info { +.notify.notify_info { border-color : #88b0f0; background-color : #ecf4ff; } -.notify.error { +.notify.notify_error { background-color : #ffcccc; border-color : #ff0000; } diff --git a/index.php b/index.php index 79d4ad58d..74498b8f4 100644 --- a/index.php +++ b/index.php @@ -138,7 +138,7 @@ - +
diff --git a/js/functions.js b/js/functions.js index 9915e6808..720a5654a 100644 --- a/js/functions.js +++ b/js/functions.js @@ -182,11 +182,6 @@ function param_unescape(arg) { return unescape(arg); } - -function hide_notify() { - Element.hide('notify'); -} - function notify_real(msg, no_hide, n_type) { var n = $("notify"); @@ -198,13 +193,11 @@ function notify_real(msg, no_hide, n_type) { } if (msg == "") { - if (Element.visible(n)) { - notify_hide_timerid = window.setTimeout("hide_notify()", 0); + if (n.hasClassName("visible")) { + notify_hide_timerid = window.setTimeout(function() { + n.removeClassName("visible") }, 0); } return; - } else { - Element.show(n); - new Effect.Highlight(n); } /* types: @@ -218,18 +211,18 @@ function notify_real(msg, no_hide, n_type) { msg = " " + __(msg) + ""; - if (n_type == 1) { - n.className = "notify"; - } else if (n_type == 2) { - n.className = "notify progress"; + if (n_type == 2) { + n.className = "notify notify_progress visible"; msg = "" + msg; no_hide = true; } else if (n_type == 3) { - n.className = "notify error"; + n.className = "notify notify_error visible"; msg = "" + msg; } else if (n_type == 4) { - n.className = "notify info"; + n.className = "notify notify_info visible"; msg = "" + msg; + } else { + n.className = "notify visible"; } msg += " - +
-- cgit v1.2.3-54-g00ecf From 2f43089de1ead3f164b8b31967d1abbb784319fa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 3 Nov 2014 10:54:54 +0300 Subject: body: disable overflow --- css/tt-rss.css | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'css') diff --git a/css/tt-rss.css b/css/tt-rss.css index d5737989a..8d692cfa5 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -7,6 +7,10 @@ body#ttrssMain, body#ttrssPrefs, body#ttrssLogin, body { font-size: 14px; } +body#ttrssMain { + overflow : hidden; +} + div.postReply { padding : 0px; } -- cgit v1.2.3-54-g00ecf From 343eb770960a5922642e14b5db4da912116a5005 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 5 Nov 2014 09:18:41 +0300 Subject: use position:fixed for notify --- css/tt-rss.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'css') diff --git a/css/tt-rss.css b/css/tt-rss.css index 8d692cfa5..ca0284a66 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -9,6 +9,7 @@ body#ttrssMain, body#ttrssPrefs, body#ttrssLogin, body { body#ttrssMain { overflow : hidden; + max-height : 100%; } div.postReply { @@ -161,7 +162,7 @@ a:hover { left : 0px; border-width : 1px 0px 0px 0px; border-style : solid; - position : absolute; + position : fixed; font-size : 12px; z-index : 99; padding : 5px; -- cgit v1.2.3-54-g00ecf From 0d41fd76d3be37903ee405e03cc7bd2e444c7e91 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 9 Nov 2014 20:31:29 +0300 Subject: notify fixes --- css/tt-rss.css | 10 +++++----- js/functions.js | 29 +++++++++++++++++++---------- 2 files changed, 24 insertions(+), 15 deletions(-) (limited to 'css') diff --git a/css/tt-rss.css b/css/tt-rss.css index ca0284a66..48f02f924 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -148,11 +148,6 @@ a:hover { -webkit-transform: translate(0, -35px); -o-transform: translate(0, -35px); -moz-transform: translate(0, -35px); - - transition: all 0.5s ease-in-out; - -webkit-transition: all 0.5s ease-in-out; - -moz-transition: all 0.5s ease-in-out; - -o-transition: all 0.5s ease-in-out; } #notify { @@ -167,6 +162,11 @@ a:hover { z-index : 99; padding : 5px; box-shadow : 0px -2px 2px rgba(0,0,0,0.1); + + transition: all 0.5s ease-in-out; + -webkit-transition: all 0.5s ease-in-out; + -moz-transition: all 0.5s ease-in-out; + -o-transition: all 0.5s ease-in-out; } #notify img { diff --git a/js/functions.js b/js/functions.js index 720a5654a..98a531851 100644 --- a/js/functions.js +++ b/js/functions.js @@ -212,30 +212,39 @@ function notify_real(msg, no_hide, n_type) { msg = " " + __(msg) + ""; if (n_type == 2) { - n.className = "notify notify_progress visible"; msg = "" + msg; no_hide = true; } else if (n_type == 3) { - n.className = "notify notify_error visible"; msg = "" + msg; } else if (n_type == 4) { - n.className = "notify notify_info visible"; msg = "" + msg; - } else { - n.className = "notify visible"; } msg += " "; -// msg = " " + msg; - n.innerHTML = msg; - if (!no_hide) { - notify_hide_timerid = window.setTimeout(function() { + window.setTimeout(function() { + // goddamnit firefox + if (n_type == 2) { + n.className = "notify notify_progress visible"; + } else if (n_type == 3) { + n.className = "notify notify_error visible"; + msg = "" + msg; + } else if (n_type == 4) { + n.className = "notify notify_info visible"; + } else { + n.className = "notify visible"; + } + + if (!no_hide) { + notify_hide_timerid = window.setTimeout(function() { n.removeClassName("visible") }, 5*1000); - } + } + + }, 10); + } function notify(msg, no_hide) { -- cgit v1.2.3-54-g00ecf From bd076268264c2b57d9fb26baf818b7524d7306f9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Dec 2014 00:29:54 +0300 Subject: tweak selected feed display a bit --- css/dijit.css | 4 ++++ css/tt-rss.css | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'css') diff --git a/css/dijit.css b/css/dijit.css index eb4f767db..c49b469e5 100644 --- a/css/dijit.css +++ b/css/dijit.css @@ -93,6 +93,10 @@ background : white; } +.claro #feedTree.dijitTree .dijitTreeRowSelected { + box-shadow : -1px 0px 2px -1px rgba(0,0,0,0.1); +} + .claro .dijitTree .dijitTreeRowHover { background : #f0f0f0; border-color : #ddd; diff --git a/css/tt-rss.css b/css/tt-rss.css index 48f02f924..3db8dc1d5 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -813,7 +813,7 @@ div.fatalError textarea { #feeds-holder { padding : 0px; - border-width : 0px 1px 0px 0px; + border-width : 0px 0px 0px 0px; border-style : solid; border-color : #ddd; overflow : hidden; -- cgit v1.2.3-54-g00ecf From f52879fed516925a1cc026401671bcb083880e13 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 19 Jan 2015 15:46:15 +0300 Subject: trgm: add basic related stories dialog --- css/tt-rss.css | 4 ++++ plugins/af_psql_trgm/init.js | 6 ++--- plugins/af_psql_trgm/init.php | 54 +++++++++++++++++++++++++++++++------------ 3 files changed, 46 insertions(+), 18 deletions(-) (limited to 'css') diff --git a/css/tt-rss.css b/css/tt-rss.css index 3db8dc1d5..693541a7c 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -341,6 +341,10 @@ div.prefHelp { color : #555; } +.small { + font-size : 11px; +} + #main-toolbar > * { white-space : nowrap; display : table-cell; diff --git a/plugins/af_psql_trgm/init.js b/plugins/af_psql_trgm/init.js index 8affb72d4..621ccb746 100644 --- a/plugins/af_psql_trgm/init.js +++ b/plugins/af_psql_trgm/init.js @@ -3,11 +3,11 @@ function showTrgmRelated(id) { var query = "backend.php?op=pluginhandler&plugin=af_psql_trgm&method=showrelated¶m=" + param_escape(id); - if (dijit.byId("editNoteDlg")) - dijit.byId("editNoteDlg").destroyRecursive(); + if (dijit.byId("trgmRelatedDlg")) + dijit.byId("trgmRelatedDlg").destroyRecursive(); dialog = new dijit.Dialog({ - id: "editNoteDlg", + id: "trgmRelatedDlg", title: __("Related articles"), style: "width: 600px", execute: function() { diff --git a/plugins/af_psql_trgm/init.php b/plugins/af_psql_trgm/init.php index a451dce23..97187a602 100644 --- a/plugins/af_psql_trgm/init.php +++ b/plugins/af_psql_trgm/init.php @@ -33,11 +33,11 @@ class Af_Psql_Trgm extends Plugin { $host->add_hook($host::HOOK_PREFS_TAB, $this); $host->add_hook($host::HOOK_PREFS_EDIT_FEED, $this); $host->add_hook($host::HOOK_PREFS_SAVE_FEED, $this); - //$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); + $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); } - /* function get_js() { + function get_js() { return file_get_contents(__DIR__ . "/init.js"); } @@ -53,35 +53,59 @@ class Af_Psql_Trgm extends Plugin { print "

$title

"; $title = db_escape_string($title); - $result = db_query("SELECT id,title,updated - FROM ttrss_entries, ttrss_user_entries - WHERE owner_uid = $owner_uid AND - id = ref_id AND - id != $id AND - date_entered >= NOW() - INTERVAL '1 day' AND - SIMILARITY(title, '$title') >= 0.5 - LIMIT 30"); + $result = db_query("SELECT ttrss_entries.id AS id, + feed_id, + ttrss_entries.title AS title, + updated, link, + ttrss_feeds.title AS feed_title, + SIMILARITY(ttrss_entries.title, '$title') AS sm + FROM + ttrss_entries, ttrss_user_entries LEFT JOIN ttrss_feeds ON (ttrss_feeds.id = feed_id) + WHERE + ttrss_entries.id = ref_id AND + ttrss_user_entries.owner_uid = $owner_uid AND + ttrss_entries.id != $id AND + date_entered >= NOW() - INTERVAL '1 week' + ORDER BY + sm DESC, date_entered DESC + LIMIT 10"); print "
    "; while ($line = db_fetch_assoc($result)) { print "
  • "; - print "
    " . smart_date_time($line["updated"]) + print "
    " . + smart_date_time(strtotime($line["updated"])) . "
    "; - print $line["title"]; + + print ""; + + $article_link = htmlspecialchars($line["link"]); + print " ". + $line["title"].""; + + print " (". + htmlspecialchars($line["feed_title"]).")"; + print "
  • "; } print "
"; - } */ + print "
"; + print ""; + print "
"; - /* function hook_article_button($line) { + + } + + function hook_article_button($line) { return ""; - } */ + } function hook_prefs_tab($args) { if ($args != "prefFeeds") return; -- cgit v1.2.3-54-g00ecf