Преглед на файлове

Minor tweaks

Fixed issues with hovering over the header area with intent not always
showing the tabs.
Made the close buttons bigger.
Nathaniel van Diepen преди 12 години
родител
ревизия
08b38f7560
променени са 2 файла, в които са добавени 12 реда и са изтрити 7 реда
  1. 2 1
      www/css/style.css
  2. 10 6
      www/js/omnomirc.js

+ 2 - 1
www/css/style.css

@@ -20,7 +20,8 @@ html,body{
 .close-button{
 	float: right;
 	font-weight: bold;
-	font-size: 16px;
+	font-size: 24px;
+	margin-top: -5px;
 	font-family: Arial,Liberation Sans,DejaVu Sans,sans-serif;
 }
 .close-button:hover{

+ 10 - 6
www/js/omnomirc.js

@@ -20,7 +20,7 @@
 (function(window,$,undefined){
 	var $o = window.OmnomIRC = window.$o = function(){
 		return 'Version: '+$o.version
-	},$i,$s,$h,$cl,$tl,log=console.log,tabs=[],selectedTab=0;
+	},$i,$s,$h,$cl,$tl,hht,log=console.log,tabs=[],selectedTab=0;
 	$.extend($o,{
 		version: '0.1',
 		send: function(msg){
@@ -81,6 +81,7 @@
 							.addClass('close-button')
 							.click(function(){
 								$o.removeTab(id);
+								return false;
 							})
 							.html('×')
 					)
@@ -149,15 +150,18 @@
 			$('#settings, #users, #head').removeClass('hovered').removeClass('open');
 		});
 		$h.hoverIntent({
-			over: function(){
-				setTimeout(function(){
-					$('#head:hover').addClass('hovered');
-				},1000);
-			},
 			out: function(){
 				$h.removeClass('hovered');
 			},
+			over: function(){},
 			timeout: 1000
+		}).hover(function(){
+			hht = setTimeout(function(){
+				$o.event('timeout','Head HoverIntent timeout');
+				$('#head:hover').addClass('hovered');
+			},1000);
+		},function(){
+			clearInterval(hht);
 		}).click(function(){
 			$(this).addClass('hovered');
 		});