Add online/offline marker in Sone top <div>.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Oct 2010 01:11:50 +0000 (03:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 Oct 2010 01:11:50 +0000 (03:11 +0200)
src/main/resources/static/javascript/sone.js
src/main/resources/templates/include/head.html

index f1603ac..cd27cc3 100644 (file)
@@ -1,5 +1,9 @@
 /* Sone JavaScript functions. */
 
+function isOnline() {
+       return $("#sone").hasClass("online");
+}
+
 function registerInputTextareaSwap(inputSelector, defaultText, inputFieldName, optional) {
        $(inputSelector).each(function() {
                textarea = $("<textarea name=\"" + inputFieldName + "\"></textarea>").blur(function() {
index 797e7a9..233a9cd 100644 (file)
@@ -1,4 +1,4 @@
-<div id="sone">
+<div id="sone" class="<%ifnull ! currentSone>online<%else>offline<%/if>">
 
        <div id="formPassword"><% formPassword|html></div>