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;
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();
}
}
+function gotoOffline() {
+ window.location.href = "tt-rss.php?offline=1";
+}
+
+function gotoOnline() {
+ window.location.href = "tt-rss.php";
+}
<div id="header">
<div class="topLinks" id="topLinks">
+ <span id="topLinksOnline">
+
<?php if (!SINGLE_USER_MODE) { ?>
<?php echo __('Hello,') ?> <b><?php echo $_SESSION["name"] ?></b> |
<?php } ?>
| <a href="logout.php"><?php echo __('Logout') ?></a>
<?php } ?>
+ <img id="restartOfflinePic" src="images/offline.png" style="display:none"
+ onclick="gotoOffline()"
+ title="<?php echo __('Restart in offline mode') ?>"/>
+
<img id="newVersionIcon" style="display:none;" onclick="javascript:explainError(2)"
src="images/new_version.png" title="<?php echo __('New version of Tiny Tiny RSS is available!') ?>"
alt="new_version_icon"/>
+ </span>
+
+ <span id="topLinksOffline" style="display : none">
+ <img id="restartOnlinePic" src="images/online.png"
+ onclick="gotoOnline()"
+ title="<?php echo __('Restart in online mode') ?>"/>
+ </span>
+
</div>
+
<img src="<?php echo $theme_image_path ?>images/ttrss_logo.png" alt="Tiny Tiny RSS"/>
</div>