From: Andrew Dolgov Date: Wed, 4 Feb 2009 19:47:26 +0000 (+0300) Subject: add toplink images to restart in offline or online mode X-Git-Tag: 1.3.1~89 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=69ea0cdd1b7dbbf7aef010fd707d93030c002cae;p=tt-rss.git add toplink images to restart in offline or online mode --- diff --git a/images/offline.png b/images/offline.png new file mode 100755 index 00000000..7a829177 Binary files /dev/null and b/images/offline.png differ diff --git a/images/online.png b/images/online.png new file mode 100755 index 00000000..749a416d Binary files /dev/null and b/images/online.png differ 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;