2
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
08b38f7560

+ 2 - 1
www/css/style.css

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

+ 10 - 6
www/js/omnomirc.js

@@ -20,7 +20,7 @@
 (function(window,$,undefined){
 (function(window,$,undefined){
 	var $o = window.OmnomIRC = window.$o = function(){
 	var $o = window.OmnomIRC = window.$o = function(){
 		return 'Version: '+$o.version
 		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,{
 	$.extend($o,{
 		version: '0.1',
 		version: '0.1',
 		send: function(msg){
 		send: function(msg){
@@ -81,6 +81,7 @@
 							.addClass('close-button')
 							.addClass('close-button')
 							.click(function(){
 							.click(function(){
 								$o.removeTab(id);
 								$o.removeTab(id);
+								return false;
 							})
 							})
 							.html('×')
 							.html('×')
 					)
 					)
@@ -149,15 +150,18 @@
 			$('#settings, #users, #head').removeClass('hovered').removeClass('open');
 			$('#settings, #users, #head').removeClass('hovered').removeClass('open');
 		});
 		});
 		$h.hoverIntent({
 		$h.hoverIntent({
-			over: function(){
-				setTimeout(function(){
-					$('#head:hover').addClass('hovered');
-				},1000);
-			},
 			out: function(){
 			out: function(){
 				$h.removeClass('hovered');
 				$h.removeClass('hovered');
 			},
 			},
+			over: function(){},
 			timeout: 1000
 			timeout: 1000
+		}).hover(function(){
+			hht = setTimeout(function(){
+				$o.event('timeout','Head HoverIntent timeout');
+				$('#head:hover').addClass('hovered');
+			},1000);
+		},function(){
+			clearInterval(hht);
 		}).click(function(){
 		}).click(function(){
 			$(this).addClass('hovered');
 			$(this).addClass('hovered');
 		});
 		});