Author: jruchaud Date: 2015-04-16 09:00:43 +0000 (Thu, 16 Apr 2015) New Revision: 1213 Url: http://forge.nuiton.org/projects/sandbox/repository/revisions/1213 Log: Plug db Modified: wit/index.html wit/js/main.js Modified: wit/index.html =================================================================== --- wit/index.html 2015-04-16 08:54:51 UTC (rev 1212) +++ wit/index.html 2015-04-16 09:00:43 UTC (rev 1213) @@ -23,10 +23,14 @@ <div id="stop"> <div class="icon"></div> </div> + <div id="rapport"> + <div class="icon">R</div> + </div> </div> <div id="time"></div> <script type="application/javascript" src="js/main.js"></script> + <script type="application/javascript" src="js/database.js"></script> </body> </html> Modified: wit/js/main.js =================================================================== --- wit/js/main.js 2015-04-16 08:54:51 UTC (rev 1212) +++ wit/js/main.js 2015-04-16 09:00:43 UTC (rev 1213) @@ -6,6 +6,7 @@ var playNode = document.getElementById("play"); var stopNode = document.getElementById("stop"); var timeNode = document.getElementById("time"); +var rapportNode = document.getElementById("rapport"); var templateTag = "<li class=\"tag\"><span class=\"remove\">x</span>{{value}}</li>"; @@ -66,3 +67,30 @@ setTimeout(updateTime.bind(), 1000); } updateTime(); + + +rapportNode.onclick = function(e) { + +} + +// Load library +var gui = require('nw.gui'); + +// Reference to window and tray +var win = gui.Window.get(); +var tray; + + // Get the minimize event + win.on('minimize', function() { + // Hide window + this.hide(); + + // Show tray + tray = new gui.Tray({ icon: 'icon.png' }); + + // Show window and remove tray when clicked + tray.on('click', function() { + win.show(); + this.remove(); + tray = null; +}); \ No newline at end of file
participants (1)
-
jruchaud@users.nuiton.org