From 69ea0cdd1b7dbbf7aef010fd707d93030c002cae Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 4 Feb 2009 22:47:26 +0300 Subject: [PATCH] add toplink images to restart in offline or online mode --- images/offline.png | Bin 0 -> 1013 bytes images/online.png | Bin 0 -> 1019 bytes offline.js | 17 +++++++++++++---- tt-rss.css | 7 +++++-- tt-rss.php | 15 +++++++++++++++ 5 files changed, 33 insertions(+), 6 deletions(-) create mode 100755 images/offline.png create mode 100755 images/online.png diff --git a/images/offline.png b/images/offline.png new file mode 100755 index 0000000000000000000000000000000000000000..7a8291776bd6d31cbfdc706efa251136b333bb6d GIT binary patch literal 1013 zcmV4Tx0C)j~luKyTP!xv$j46V&f~d6?l;A>(v?V^!ics5Wwbqew82iv7$TV|j z8cj1XnHe95NI~5BT8bMVh>I%XLb_0Jr3;Zl>uXU2ait=NLN`*z|0eBBDpoHf`Et&G z&+CQ&RS#2+V?{Jz*v`AjuBdkC@PM{>0#&F%HMmlS=d>ph`+cTXKIgCLw@{>IvPs5@ z^&Ob_v~BhMOOImj>z?-dp85KDZ#6Cx0*XfKifq7JB@YI?SMtfclc(m0WMe3mCOhOt zw#riT4Se#lwS z#+8o&t!scqFDteI4;Z}*tXf~OHPits`+>1772D6GKOd!b+{A`0|qDVJm*eY<&{#wR+wXk~+^2z=p=Y+R=mX(oos*|%sGu!%-7M;7vjpTb7b5A$9 zf!9>V-P0SeveC?U_XHg2v#mJKMQS2-_F((~nei3X$w%cpB#(H-gEFRXKbG2;AlK8L zJf4e5O)dAfof+!k8A(>GGeaHmS$^#nk}~f)YVJ6e|IM?u$a5Tq1pyN_?>00f(S<0Q z;J`%=8G1}AOj@O1&}zcN@xLl9B+9!iD!TBQdp`SnPN2ZuGJYSTaf~#UBWU_N{hR(q zzp3BRzh0>?G*mnz?orbizxjPhMHy6s|5~ zU#Ty9G?_zOj8BKU6roH_7-T%zwd}q~w)iIed~?|rnjW<;&OWKDSQAA9qOkFZ>Mwg%u5aOFKIN000Sa zNLh0L01FcU01FcV0GgZ_0001BNkl6bsK@Na02n5CWOrFO-H5^LD4J7s=Cs=kU z)FR?Oc4HSx|J6OhLGEtqIaT;l{|D7gyn`!JU-#8|OCZ3U{esfK#ssAPf>KaW>lPx| j0V6~(a}DF~XmhF`|9>EFTf}Q(00000NkvXXu0mjfVzJ$J literal 0 HcmV?d00001 diff --git a/images/online.png b/images/online.png new file mode 100755 index 0000000000000000000000000000000000000000..749a416d27d7b266bbf286cbe7106c8450b9ce96 GIT binary patch literal 1019 zcmV4Tx0C)j~luKyTP!xv$j46V&f~d6?l;A>(v?V^!ics5Wwbqew82iv7$TV|j z8cj1XnHe95NI~5BT8bMVh>I%XLb_0Jr3;Zl>uXU2ait=NLN`*z|0eBBDpoHf`Et&G z&+CQ&RS#2+V?{Jz*v`AjuBdkC@PM{>0#&F%HMmlS=d>ph`+cTXKIgCLw@{>IvPs5@ z^&Ob_v~BhMOOImj>z?-dp85KDZ#6Cx0*XfKifq7JB@YI?SMtfclc(m0WMe3mCOhOt zw#riT4Se#lwS z#+8o&t!scqFDteI4;Z}*tXf~OHPits`+>1772D6GKOd!b+{A`0|qDVJm*eY<&{#wR+wXk~+^2z=p=Y+R=mX(oos*|%sGu!%-7M;7vjpTb7b5A$9 zf!9>V-P0SeveC?U_XHg2v#mJKMQS2-_F((~nei3X$w%cpB#(H-gEFRXKbG2;AlK8L zJf4e5O)dAfof+!k8A(>GGeaHmS$^#nk}~f)YVJ6e|IM?u$a5Tq1pyN_?>00f(S<0Q z;J`%=8G1}AOj@O1&}zcN@xLl9B+9!iD!TBQdp`SnPN2ZuGJYSTaf~#UBWU_N{hR(q zzp3BRzh0>?G*mnz?orbizxjPhMHy6s|5~ zU#Ty9G?_zOj8BKU6roH_7-T%zwd}q~w)iIed~?|rnjW<;&OWKDSQAA9qOkFZ>Mwg%u5aOFKIN000Sa zNLh0L01FcU01FcV0GgZ_0001HNkl3K|vSi7B22ug3nn3EAa9NTyH65o5uxf&7 zfYIm%V`xHGh|UKYfT9VT0+1qfakwUQ36NrBfGp1flbDu0lM%*7R)8!HlZV>`6Cj4B ppC-7Uke!9iAIS2Iq$VSfW&l{_D2gl@$Lat8002ovPDHLkV1l-Y+ynps literal 0 HcmV?d00001 diff --git a/offline.js b/offline.js index 73d70f39..8290a2fc 100644 --- a/offline.js +++ b/offline.js @@ -453,12 +453,12 @@ function init_offline() { Element.hide("dispSwitchPrompt"); Element.hide("feedBrowserPrompt"); + Element.hide("topLinksOnline"); + Element.show("topLinksOffline"); + var tb_form = document.getElementById("main_toolbar_form"); Element.hide(tb_form.update); - var top_links = document.getElementById("topLinks"); - top_links.innerHTML = __("Offline mode"); - var chooser = document.getElementById("quickMenuChooser"); chooser.disabled = true; @@ -728,8 +728,10 @@ function init_gears() { db.execute("CREATE TABLE IF NOT EXISTS feeds (id integer, title text, has_icon integer)"); db.execute("CREATE TABLE IF NOT EXISTS articles (id integer, feed_id integer, title text, link text, guid text, updated text, content text, tags text, unread text, marked text, added text, comments text)"); - db.execute("DELETE FROM cache WHERE id LIKE 'F:%' OR id LIKE 'C:%'"); + + Element.show("restartOfflinePic"); + } cache_expire(); @@ -739,4 +741,11 @@ function init_gears() { } } +function gotoOffline() { + window.location.href = "tt-rss.php?offline=1"; +} + +function gotoOnline() { + window.location.href = "tt-rss.php"; +} diff --git a/tt-rss.css b/tt-rss.css index 95938bc9..bf087b8d 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1698,10 +1698,13 @@ a.feedUpdErrLink { display : none; } -#newVersionIcon { +div.topLinks img { vertical-align : middle; cursor : pointer; - margin-left : 10px; +} + +#restartOfflinePic { + margin-left : 5px; } a.helpLinkPic { diff --git a/tt-rss.php b/tt-rss.php index 38a2c32f..f4cb8354 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -115,6 +115,8 @@ window.onload = init; -- 2.39.5